Merge remote-tracking branch 'origin/master-echart' into ce
This commit is contained in:
commit
e89d5fc719
|
|
@ -962,6 +962,7 @@ export const LOCK_ENTITY_EXPLORER_MESSAGE = () => `固定侧边栏`;
|
|||
export const CLOSE_ENTITY_EXPLORER_MESSAGE = () => `关闭侧边栏`;
|
||||
export const JS_TOGGLE_DISABLED_MESSAGE = "清空字段回退";
|
||||
export const PROPERTY_PANE_EMPTY_SEARCH_RESULT_MESSAGE = "没有发现任何属性";
|
||||
export const HELP_MESSAGE = "帮助";
|
||||
|
||||
// API Pane
|
||||
export const API_PANE_NO_BODY = () => "当前请求没有请求体";
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export type PropertyPaneControlConfig = {
|
|||
// TODO(abhinav): To fix this, rename the options property of the controls which use this
|
||||
// Alternatively, create a new structure
|
||||
options?: any;
|
||||
helpLink?: string;
|
||||
};
|
||||
|
||||
type ValidationConfigParams = {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import {
|
|||
ControlWrapper,
|
||||
} from "components/propertyControls/StyledControls";
|
||||
import { JSToggleButton } from "design-system";
|
||||
import { HelpIcons } from "icons/HelpIcons";
|
||||
import PropertyControlFactory from "utils/PropertyControlFactory";
|
||||
import PropertyHelpLabel from "pages/Editor/PropertyPane/PropertyHelpLabel";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
|
@ -50,7 +51,10 @@ import { getSelectedAppTheme } from "selectors/appThemingSelectors";
|
|||
import { TooltipComponent } from "design-system";
|
||||
import { ReactComponent as ResetIcon } from "assets/icons/control/undo_2.svg";
|
||||
import { AppTheme } from "entities/AppTheming";
|
||||
import { JS_TOGGLE_DISABLED_MESSAGE } from "@appsmith/constants/messages";
|
||||
import {
|
||||
JS_TOGGLE_DISABLED_MESSAGE,
|
||||
HELP_MESSAGE,
|
||||
} from "@appsmith/constants/messages";
|
||||
import { AppState } from "@appsmith/reducers";
|
||||
import {
|
||||
getPropertyControlFocusElement,
|
||||
|
|
@ -59,6 +63,10 @@ import {
|
|||
import PropertyPaneHelperText from "./PropertyPaneHelperText";
|
||||
import { generateKeyAndSetFocusablePropertyPaneField } from "actions/propertyPaneActions";
|
||||
|
||||
import { Colors } from "constants/Colors";
|
||||
|
||||
const HelpIcon = HelpIcons.HELP_ICON;
|
||||
|
||||
type Props = PropertyPaneControlConfig & {
|
||||
panel: IPanelProps;
|
||||
theme: EditorTheme;
|
||||
|
|
@ -520,6 +528,7 @@ const PropertyControl = memo((props: Props) => {
|
|||
propertyName,
|
||||
);
|
||||
const isConvertible = !!props.isJSConvertible;
|
||||
const helpLink = props.helpLink;
|
||||
const className = label
|
||||
.split(" ")
|
||||
.join("")
|
||||
|
|
@ -646,6 +655,26 @@ const PropertyControl = memo((props: Props) => {
|
|||
/>
|
||||
</TooltipComponent>
|
||||
)}
|
||||
{helpLink && (
|
||||
<div
|
||||
onClick={() => {
|
||||
window.open(helpLink, "_blank");
|
||||
}}
|
||||
>
|
||||
<TooltipComponent
|
||||
content={HELP_MESSAGE}
|
||||
openOnTargetFocus={false}
|
||||
position="auto"
|
||||
>
|
||||
<HelpIcon
|
||||
className={"help-icon"}
|
||||
color={Colors.GREY_7}
|
||||
height={13}
|
||||
width={13}
|
||||
/>
|
||||
</TooltipComponent>
|
||||
</div>
|
||||
)}
|
||||
{isPropertyDeviatedFromTheme && (
|
||||
<>
|
||||
<TooltipComponent
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ export const contentConfig = [
|
|||
isBindProperty: true,
|
||||
isTriggerProperty: false,
|
||||
validation: { type: ValidationTypes.TEXT },
|
||||
hidden: (x: any) => x.chartType === "CUSTOM_CHART",
|
||||
// hidden: (x: any) => x.chartType === "CUSTOM_CHART",
|
||||
dependencies: ["chartType"],
|
||||
},
|
||||
{
|
||||
|
|
@ -205,7 +205,7 @@ export const contentConfig = [
|
|||
isBindProperty: true,
|
||||
isTriggerProperty: false,
|
||||
validation: { type: ValidationTypes.TEXT },
|
||||
hidden: (x: any) => x.chartType === "CUSTOM_CHART",
|
||||
// hidden: (x: any) => x.chartType === "CUSTOM_CHART",
|
||||
dependencies: ["chartType"],
|
||||
},
|
||||
],
|
||||
|
|
@ -227,8 +227,8 @@ export const contentConfig = [
|
|||
regex: /\w+/,
|
||||
},
|
||||
},
|
||||
// hidden: (x: any) => x.chartType === "CUSTOM_CHART",
|
||||
dependencies: ["chartType"],
|
||||
// hidden: (x: EchartWidgetProps) => x.chartType !== "CUSTOM_CHART",
|
||||
// dependencies: ["chartType"],
|
||||
},
|
||||
{
|
||||
helpText: "地图注册 GeoJSON 数据",
|
||||
|
|
@ -247,6 +247,8 @@ export const contentConfig = [
|
|||
// regex: /(http(s?):)([/|.|\w|\s|-])*\.(?:json)/,
|
||||
},
|
||||
},
|
||||
// hidden: (x: EchartWidgetProps) => x.chartType !== "CUSTOM_CHART",
|
||||
// dependencies: ["chartType"],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue