@next-libs/visual-builder 1.7.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -165,9 +165,35 @@ function LegacyVisualPropertyForm(props, ref) {
165
165
  }]
166
166
  }, /*#__PURE__*/_react.default.createElement(_antd.Input, (_item$editorProps = item.editorProps) !== null && _item$editorProps !== void 0 ? _item$editorProps : {}));
167
167
  };
168
- const renderSingleRadio = props => {
169
- var _props$options;
170
- return (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(item => {
168
+ const renderTextareaItem = item => {
169
+ var _item$editorProps2;
170
+ return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
171
+ key: item.name,
172
+ label: renderLabel(item),
173
+ name: item.name,
174
+ rules: [{
175
+ required: item.required === _interfaces.Required.True,
176
+ message: `请输入${item.name}`
177
+ }]
178
+ }, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, (_item$editorProps2 = item.editorProps) !== null && _item$editorProps2 !== void 0 ? _item$editorProps2 : {}));
179
+ };
180
+ const renderSingleRadio = item => {
181
+ var _prop$options;
182
+ const {
183
+ editorProps: prop,
184
+ name
185
+ } = item;
186
+ const handleRadioUncheck = e => {
187
+ var _e$target;
188
+ const value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
189
+ const formValue = form.getFieldsValue();
190
+ const changeValue = {
191
+ [name]: formValue[name] === value ? undefined : value
192
+ };
193
+ form.setFieldsValue(changeValue);
194
+ props.onValuesChange(changeValue, formValue);
195
+ };
196
+ return (_prop$options = prop.options) === null || _prop$options === void 0 ? void 0 : _prop$options.map(item => {
171
197
  const icon = item.icon;
172
198
  let buttonIcon = null;
173
199
  if (icon) {
@@ -193,7 +219,7 @@ function LegacyVisualPropertyForm(props, ref) {
193
219
  });
194
220
  }
195
221
  }
196
- if (props.optionType === "button") {
222
+ if (prop.optionType === "button") {
197
223
  return /*#__PURE__*/_react.default.createElement(_antd.Radio.Button, {
198
224
  key: item.value,
199
225
  value: item.value,
@@ -202,7 +228,8 @@ function LegacyVisualPropertyForm(props, ref) {
202
228
  textAlign: "center",
203
229
  flex: "1 1 0",
204
230
  ...item.style
205
- }
231
+ },
232
+ onClick: !(prop !== null && prop !== void 0 && prop.disableUnchek) ? handleRadioUncheck : () => null
206
233
  }, buttonIcon, item.label && /*#__PURE__*/_react.default.createElement("span", {
207
234
  style: {
208
235
  paddingLeft: "5px"
@@ -213,7 +240,8 @@ function LegacyVisualPropertyForm(props, ref) {
213
240
  key: item.value,
214
241
  value: item.value,
215
242
  disabled: item.disabled,
216
- style: item.style
243
+ style: item.style,
244
+ onClick: !(prop !== null && prop !== void 0 && prop.disableUnchek) ? handleRadioUncheck : () => null
217
245
  }, buttonIcon, item.label && /*#__PURE__*/_react.default.createElement("span", {
218
246
  style: {
219
247
  paddingLeft: "5px"
@@ -237,10 +265,10 @@ function LegacyVisualPropertyForm(props, ref) {
237
265
  style: item.editorProps.optionType === "button" ? {
238
266
  display: "flex"
239
267
  } : {}
240
- }, radioProps !== null && radioProps !== void 0 ? radioProps : {}), renderSingleRadio(item.editorProps)));
268
+ }, radioProps !== null && radioProps !== void 0 ? radioProps : {}), renderSingleRadio(item)));
241
269
  };
242
270
  const renderBooleanItem = item => {
243
- var _item$editorProps2;
271
+ var _item$editorProps3;
244
272
  return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
245
273
  key: item.name,
246
274
  label: renderLabel(item),
@@ -252,10 +280,10 @@ function LegacyVisualPropertyForm(props, ref) {
252
280
  valuePropName: "checked"
253
281
  }, /*#__PURE__*/_react.default.createElement(_antd.Switch, (0, _extends2.default)({
254
282
  defaultChecked: props.brickProperties[item.name]
255
- }, (_item$editorProps2 = item.editorProps) !== null && _item$editorProps2 !== void 0 ? _item$editorProps2 : {})));
283
+ }, (_item$editorProps3 = item.editorProps) !== null && _item$editorProps3 !== void 0 ? _item$editorProps3 : {})));
256
284
  };
257
285
  const renderInputNumberItem = item => {
258
- var _item$editorProps3;
286
+ var _item$editorProps4;
259
287
  return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
260
288
  key: item.name,
261
289
  label: renderLabel(item),
@@ -264,10 +292,10 @@ function LegacyVisualPropertyForm(props, ref) {
264
292
  required: item.required === _interfaces.Required.True,
265
293
  message: `请输入${item.name}`
266
294
  }]
267
- }, /*#__PURE__*/_react.default.createElement(_antd.InputNumber, (_item$editorProps3 = item.editorProps) !== null && _item$editorProps3 !== void 0 ? _item$editorProps3 : {}));
295
+ }, /*#__PURE__*/_react.default.createElement(_antd.InputNumber, (_item$editorProps4 = item.editorProps) !== null && _item$editorProps4 !== void 0 ? _item$editorProps4 : {}));
268
296
  };
269
297
  const renderStringListItem = item => {
270
- var _item$editorProps4;
298
+ var _item$editorProps5;
271
299
  return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
272
300
  key: item.name,
273
301
  label: renderLabel(item),
@@ -278,7 +306,7 @@ function LegacyVisualPropertyForm(props, ref) {
278
306
  }]
279
307
  }, /*#__PURE__*/_react.default.createElement(_antd.Select, (0, _extends2.default)({
280
308
  mode: "tags"
281
- }, (_item$editorProps4 = item.editorProps) !== null && _item$editorProps4 !== void 0 ? _item$editorProps4 : {})));
309
+ }, (_item$editorProps5 = item.editorProps) !== null && _item$editorProps5 !== void 0 ? _item$editorProps5 : {})));
282
310
  };
283
311
  const renderIconItem = item => {
284
312
  return /*#__PURE__*/_react.default.createElement(_IconSelectFormItem.IconSelectFormItem, {
@@ -502,6 +530,30 @@ function LegacyVisualPropertyForm(props, ref) {
502
530
  }))
503
531
  }));
504
532
  };
533
+ const renderSelectItem = item => {
534
+ var _item$editorProps6;
535
+ return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
536
+ key: item.name,
537
+ label: renderLabel(item),
538
+ name: item.name,
539
+ rules: [{
540
+ required: item.required === _interfaces.Required.True,
541
+ message: `请输入${item.name}`
542
+ }]
543
+ }, /*#__PURE__*/_react.default.createElement(_antd.Select, (_item$editorProps6 = item.editorProps) !== null && _item$editorProps6 !== void 0 ? _item$editorProps6 : {}));
544
+ };
545
+ const renderCheckboxItem = item => {
546
+ var _item$editorProps7;
547
+ return item.mode === _interfaces.ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
548
+ key: item.name,
549
+ label: renderLabel(item),
550
+ name: item.name,
551
+ rules: [{
552
+ required: item.required === _interfaces.Required.True,
553
+ message: `请输入${item.name}`
554
+ }]
555
+ }, /*#__PURE__*/_react.default.createElement(_antd.Checkbox.Group, (_item$editorProps7 = item.editorProps) !== null && _item$editorProps7 !== void 0 ? _item$editorProps7 : {}));
556
+ };
505
557
  const getFormItem = item => {
506
558
  // todo(sailor): update unit text
507
559
  switch (item.editor) {
@@ -517,6 +569,16 @@ function LegacyVisualPropertyForm(props, ref) {
517
569
  return renderIconItem(item);
518
570
  case "message":
519
571
  return renderMessageItem(item);
572
+ case "number":
573
+ return renderInputNumberItem(item);
574
+ case "textarea":
575
+ return renderTextareaItem(item);
576
+ case "select":
577
+ return renderSelectItem(item);
578
+ case "checkbox":
579
+ return renderCheckboxItem(item);
580
+ case "code":
581
+ return renderCodeEditorItem(item);
520
582
  }
521
583
  if (/true|false/.test(item.type)) {
522
584
  return renderBooleanItem(item);
@@ -1 +1 @@
1
- {"version":3,"file":"VisualPropertyForm.js","names":["ButtonTypeEmun","typeMatched","actualValue","selectedValue","type","LegacyVisualPropertyForm","props","ref","theme","useCurrentTheme","projectId","labelIcon","propertyTypeList","brickProperties","brickInfo","emptyConfig","hiddenPropsCategory","menuSettingClick","childMountPointList","form","Form","useForm","typeList","setTypeList","useState","mergeProperties","useImperativeHandle","validateFields","resetPropertyFields","properties","restValue","resetFields","getCurTypeList","map","item","pick","getFieldsValue","useEffect","newTypeList","newValue","calculateValue","setFieldsValue","handleLabelClick","name","selected","find","index","findIndex","nextMode","mode","ItemModeType","Advanced","Normal","value","getFieldValue","modeValueMap","isNil","supportMenuType","includes","matchNoramlMenuValue","supportBasicType","parsedValue","yaml","undefined","isString","yamlStringify","update","$splice","renderLabel","hideIcon","description","styles","iconContainer","advanced","normal","renderEditorItem","required","Required","True","jsonSchema","schemaRef","span","style","padding","editor","model","renderStringItem","message","editorProps","renderSingleRadio","options","icon","buttonIcon","mergedIcon","imgSrc","imgStyle","verticalAlign","fontSize","iconStyle","optionType","disabled","textAlign","flex","label","paddingLeft","renderRadioItem","radioProps","omit","radioGroup","display","renderBooleanItem","renderInputNumberItem","renderStringListItem","renderIconItem","renderMessageItem","changeValue","onValuesChange","renderCodeEditorItem","renderColorItem","renderMenuItem","renderGeneralOptipns","renderFormItem","renderCustomColumn","dataIndex","key","title","useChildren","filter","startsWith","endsWith","inputValue","option","children","toUpperCase","indexOf","renderCustomButtons","id","text","tooltip","eventName","buttonType","hide","isDivider","isDropdown","renderEnumItem","enumList","getFormItem","test","enums","emunList","replace","split","renderOthersItem","OTHER_FORM_ITEM_FIELD","Infinity","gorupList","React","useMemo","groupByType","isEmpty","empty","Empty","PRESENTED_IMAGE_SIMPLE","imageStyle","visualPropertyForm","minWidth","_","String","panelContainer","category","list","upperFirst","otherPanel","VisualPropertyForm","forwardRef"],"sources":["../../../src/visual-property-form/VisualPropertyForm.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from \"react\";\nimport {\n Form,\n Input,\n InputNumber,\n Select,\n Tooltip,\n Collapse,\n Empty,\n Switch,\n AutoComplete,\n Radio,\n} from \"antd\";\nimport { EmptyProps } from \"antd/lib/empty\";\nimport { useCurrentTheme } from \"@next-core/brick-kit\";\nimport { MenuIcon, SrcIcon } from \"@next-core/brick-types\";\nimport { GeneralIcon } from \"@next-libs/basic-components\";\nimport update from \"immutability-helper\";\nimport _, {\n isNil,\n pick,\n upperFirst,\n isEmpty,\n cloneDeep,\n isString,\n omit,\n} from \"lodash\";\nimport styles from \"./VisualPropertyForm.module.css\";\nimport { FormProps } from \"antd/lib/form\";\nimport { CodeEditorFormItem } from \"./components/CodeEditor/CodeEditorFormItem\";\nimport { IconSelectFormItem } from \"./components/IconSelect/IconSelectFormItem\";\nimport { ColorEditorItem } from \"./components/ColorEditor/ColorEditorItem\";\nimport { MenuEditorItem } from \"./components/MenuEditor/MenuEditorItem\";\nimport { ListEditor } from \"./components/ListEditor/ListEditor\";\nimport { ReactComponent as DarkEmpty } from \"./images/empty-dark.svg\";\nimport {\n mergeProperties,\n calculateValue,\n groupByType,\n yamlStringify,\n yaml,\n} from \"./processor\";\nimport {\n OTHER_FORM_ITEM_FIELD,\n supportBasicType,\n supportMenuType,\n} from \"./constant\";\nimport { matchNoramlMenuValue } from \"./processor\";\nimport {\n PropertyType,\n BrickProperties,\n visualFormUtils,\n ItemModeType,\n UnionPropertyType,\n Required,\n} from \"../interfaces\";\nimport { MessageEditor } from \"./components/MessageEditor/MessageEditor\";\nimport { options } from \"marked\";\nimport { GeneralOption } from \"@next-libs/forms\";\n\nconst ButtonTypeEmun = [\n \"link\",\n \"default\",\n \"primary\",\n \"ghost\",\n \"dashed\",\n \"icon\",\n \"text\",\n];\n\nexport type CustomColumn = {\n dataIndex: string;\n title: string;\n useChildren?: string;\n [k: string]: any;\n};\n\nexport type GeneralOptionProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type CustomButtonProps = {\n id: string;\n buttonType: string;\n eventName: string;\n text: string;\n tooltip: string;\n icon: MenuIcon;\n hide: boolean;\n disabled: boolean;\n isDivider: boolean;\n isDropdown: boolean;\n};\nexport interface VisualPropertyFormProps {\n projectId?: string;\n propertyTypeList: PropertyType[];\n labelIcon: {\n normal?: MenuIcon;\n advanced?: MenuIcon;\n };\n brickProperties: BrickProperties;\n onValuesChange?: FormProps[\"onValuesChange\"];\n brickInfo?: {\n type: \"brick\" | \"provider\" | \"template\";\n };\n emptyConfig?: EmptyProps;\n menuSettingClick?: () => void;\n hiddenPropsCategory?: boolean;\n childMountPointList?: string[];\n}\n\nexport function typeMatched(\n actualValue: any,\n selectedValue: UnionPropertyType\n): boolean {\n if (typeof actualValue === (selectedValue.type as string)) {\n return true;\n }\n // TODO: 补充更多的类型检查,例如 enum 等\n return false;\n}\nexport function LegacyVisualPropertyForm(\n props: VisualPropertyFormProps,\n ref: React.Ref<visualFormUtils>\n): React.ReactElement {\n const theme = useCurrentTheme();\n const {\n projectId,\n labelIcon,\n propertyTypeList,\n brickProperties,\n brickInfo,\n emptyConfig,\n hiddenPropsCategory,\n menuSettingClick,\n childMountPointList,\n } = props;\n const [form] = Form.useForm();\n const [typeList, setTypeList] = useState<UnionPropertyType[]>(\n mergeProperties(propertyTypeList, brickProperties)\n );\n\n useImperativeHandle(ref, () => ({\n validateFields: form.validateFields,\n resetPropertyFields: (\n typeList: PropertyType[],\n properties: BrickProperties\n ) => {\n const restValue = mergeProperties(typeList, properties);\n setTypeList(restValue);\n form.resetFields();\n },\n getCurTypeList: (): UnionPropertyType[] => {\n return typeList?.map((item) => pick(item, [\"name\", \"type\", \"mode\"]));\n },\n getFieldsValue: form.getFieldsValue,\n }));\n\n useEffect(() => {\n const newTypeList = mergeProperties(propertyTypeList, brickProperties);\n setTypeList(newTypeList);\n\n const newValue = calculateValue(\n propertyTypeList,\n brickProperties,\n newTypeList\n );\n form.resetFields();\n form.setFieldsValue(newValue);\n }, [propertyTypeList, brickProperties]);\n\n const handleLabelClick = (name: string): void => {\n const selected = typeList.find((item) => item.name === name);\n const index = typeList.findIndex((item) => item.name === name);\n const nextMode =\n selected.mode === ItemModeType.Advanced\n ? ItemModeType.Normal\n : ItemModeType.Advanced;\n selected.value = form.getFieldValue(selected.name);\n // 记录切换前的模式下的值\n selected.modeValueMap = {\n ...selected.modeValueMap,\n ...{ [selected.mode]: selected.value },\n };\n // let value = cloneDeep(selected.value);\n if (!isNil(selected.modeValueMap[nextMode])) {\n // 切换后的模式原本有值时,则用原本的值\n selected.value = selected.modeValueMap[nextMode];\n } else if (nextMode === ItemModeType.Normal) {\n // 切换到普通模式没有值时可以根据高级模式来更新值\n if (supportMenuType.includes(selected.type as string)) {\n selected.value = matchNoramlMenuValue(selected.value);\n } else if (supportBasicType.includes(selected.type as string)) {\n // yaml解析后检查下类型,不符合属性类型就不更新了\n const parsedValue = yaml(selected.value);\n if (typeMatched(parsedValue, selected)) {\n selected.value = parsedValue;\n } else {\n selected.value = undefined;\n }\n }\n } else {\n // 切换到高级模式没有值时可以根据普通模式来更新值\n if (isNil(selected.value)) {\n selected.value = \"\";\n } else if (isString(selected.value)) {\n // do nothing\n } else {\n selected.value = yamlStringify(selected.value);\n }\n }\n selected.modeValueMap[nextMode] = selected.value;\n form.setFieldsValue({\n [name]: selected.value,\n });\n const newTypeList = update(typeList, {\n $splice: [[index, 1, { ...selected, mode: nextMode }]],\n });\n setTypeList(newTypeList);\n };\n\n const renderLabel = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <span>\n <Tooltip title={item.description}>{item.name}</Tooltip>{\" \"}\n {!hideIcon && labelIcon && (\n <span\n className={styles.iconContainer}\n onClick={() => handleLabelClick(item.name)}\n >\n <GeneralIcon\n icon={\n item.mode === ItemModeType.Advanced\n ? labelIcon?.advanced\n : labelIcon.normal\n }\n />\n </span>\n )}\n </span>\n );\n };\n\n const renderEditorItem = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <CodeEditorFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, hideIcon) as any}\n required={item.required === Required.True}\n theme={theme === \"dark-v2\" ? \"monokai\" : \"tomorrow\"}\n jsonSchema={item?.jsonSchema}\n schemaRef={item?.schemaRef}\n showLineNumbers={true}\n showGutter={true}\n labelCol={{\n span: 24,\n style: {\n padding: 0,\n },\n }}\n wrapperCol={{\n span: 24,\n }}\n mode={\n (typeof item?.editor !== \"string\" && item?.editor?.model) ||\n \"brick_next_yaml\"\n }\n />\n );\n };\n\n const renderStringItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderSingleRadio = (props: Record<string, any>) => {\n return props.options?.map((item: any) => {\n const icon = item.icon;\n let buttonIcon: JSX.Element = null;\n if (icon) {\n if (\"imgSrc\" in icon) {\n const mergedIcon = {\n imgSrc: icon.imgSrc,\n imgStyle: {\n verticalAlign: \"-0.125em\",\n ...icon.imgStyle,\n },\n };\n buttonIcon = <GeneralIcon icon={mergedIcon} size={14} />;\n } else {\n buttonIcon = (\n <GeneralIcon\n icon={icon}\n style={{\n fontSize: \"14px\",\n ...icon.iconStyle,\n }}\n />\n );\n }\n }\n if (props.optionType === \"button\") {\n return (\n <Radio.Button\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={{ textAlign: \"center\", flex: \"1 1 0\", ...item.style }}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio.Button>\n );\n } else {\n return (\n <Radio\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={item.style}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio>\n );\n }\n });\n };\n\n const renderRadioItem = (item: UnionPropertyType): React.ReactElement => {\n const radioProps = omit(item.editorProps, \"options\");\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Radio.Group\n className={styles.radioGroup}\n style={\n item.editorProps.optionType === \"button\" ? { display: \"flex\" } : {}\n }\n {...(radioProps ?? {})}\n >\n {renderSingleRadio(item.editorProps)}\n </Radio.Group>\n </Form.Item>\n );\n };\n\n const renderBooleanItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n valuePropName=\"checked\"\n >\n <Switch\n defaultChecked={props.brickProperties[item.name]}\n {...(item.editorProps ?? {})}\n />\n </Form.Item>\n );\n };\n\n const renderInputNumberItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <InputNumber {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderStringListItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select mode=\"tags\" {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderIconItem = (item: UnionPropertyType): React.ReactElement => {\n return (\n <IconSelectFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true) as any}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMessageItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MessageEditor\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n value={item.value}\n required={item.required === Required.True}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCodeEditorItem = (item: PropertyType): React.ReactElement => {\n return renderEditorItem(item, true);\n };\n\n const renderColorItem = (item: PropertyType): React.ReactElement => {\n return (\n <ColorEditorItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true)}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMenuItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MenuEditorItem\n projectId={projectId}\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n menuSettingClick={menuSettingClick}\n />\n );\n };\n\n const renderGeneralOptipns = (\n item: UnionPropertyType\n ): React.ReactElement => {\n const renderFormItem = (item: GeneralOptionProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"label\" label=\"label\">\n <Input defaultValue={item.label} />\n </Form.Item>\n <Form.Item name=\"value\" label=\"value\">\n <Input defaultValue={item.value} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"label\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n label: value,\n value: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomColumn = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomColumn): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"dataIndex\" label=\"dataIndex\">\n <Input defaultValue={item.dataIndex} />\n </Form.Item>\n <Form.Item name=\"key\" label=\"key\">\n <Input defaultValue={item.key} />\n </Form.Item>\n <Form.Item name=\"title\" label=\"title\">\n <Input defaultValue={item.title} />\n </Form.Item>\n <Form.Item\n name=\"useChildren\"\n label=\"useChildren\"\n tooltip=\"useBrick代替用法,数据来源于子插槽名称,并且插槽名称必须使用'[]'包裹\"\n >\n <AutoComplete\n defaultValue={item.useChildren}\n dataSource={(childMountPointList ?? []).filter(\n (item) => item.startsWith(\"[\") && item.endsWith(\"]\")\n )}\n filterOption={(inputValue, option) =>\n option.props.children\n .toUpperCase()\n .indexOf(inputValue.toUpperCase()) !== -1\n }\n />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"title\"\n getDefaultItem={(value: any) => ({\n dataIndex: value,\n title: value,\n key: value,\n })}\n renderFormItem={renderFormItem}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomButtons = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomButtonProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"id\" label=\"id\">\n <Input defaultValue={item.id} />\n </Form.Item>\n <Form.Item name=\"text\" label=\"text\">\n <Input defaultValue={item.text} />\n </Form.Item>\n <Form.Item name=\"tooltip\" label=\"tooltip\">\n <Input defaultValue={item.tooltip} />\n </Form.Item>\n <Form.Item name=\"eventName\" label=\"eventName\">\n <Input defaultValue={item.eventName} />\n </Form.Item>\n <IconSelectFormItem name=\"icon\" label=\"icon\" />\n <Form.Item name=\"buttonType\" label=\"buttonType\">\n <Select defaultValue={item.buttonType}>\n {ButtonTypeEmun.map((item) => (\n <Select.Option key={item} value={item}>\n {item}\n </Select.Option>\n ))}\n </Select>\n </Form.Item>\n <Form.Item name=\"hide\" label=\"hide\">\n <Switch checked={item.hide} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n <Form.Item name=\"isDivider\" label=\"isDivider\">\n <Switch checked={item.isDivider} />\n </Form.Item>\n <Form.Item name=\"isDropdown\" label=\"isDropdown\">\n <Switch checked={item.isDropdown} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"text\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n text: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderEnumItem = (\n item: UnionPropertyType,\n enumList: string[]\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select\n options={enumList.map((item) => ({ label: item, value: item }))}\n />\n </Form.Item>\n );\n };\n\n const getFormItem = (item: PropertyType): React.ReactElement => {\n // todo(sailor): update unit text\n switch (item.editor) {\n case \"input\":\n return renderStringItem(item);\n case \"radio\":\n return renderRadioItem(item);\n case \"switch\":\n return renderBooleanItem(item);\n case \"color\":\n return renderColorItem(item);\n case \"icon\":\n return renderIconItem(item);\n case \"message\":\n return renderMessageItem(item);\n }\n if (/true|false/.test(item.type as string)) {\n return renderBooleanItem(item);\n }\n if (item.enums) {\n const emunList = (item.enums as string).replace(/\"|'/g, \"\").split(\"|\");\n return renderEnumItem(item, emunList);\n }\n switch (item.type) {\n case \"string\":\n return renderStringItem(item);\n case \"string[]\":\n return renderStringListItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"boolean\":\n return renderBooleanItem(item);\n case \"MenuIcon\":\n return renderIconItem(item);\n case \"Color\":\n return renderColorItem(item);\n case \"Menu\":\n case \"SidebarSubMenu\":\n return renderMenuItem(item);\n // todo(sailor): update unit text\n case \"GeneralOption[]\":\n return renderGeneralOptipns(item);\n case \"CustomColumn[]\":\n return renderCustomColumn(item);\n case \"CustomButton[]\":\n return renderCustomButtons(item);\n default:\n return renderCodeEditorItem(item);\n }\n };\n\n const renderOthersItem = (): React.ReactElement => {\n return (\n <CodeEditorFormItem\n name={OTHER_FORM_ITEM_FIELD}\n label={\n brickInfo?.type === \"template\" ? \"other params\" : \"other properties\"\n }\n mode=\"brick_next_yaml\"\n maxLines={Infinity}\n />\n );\n };\n\n const gorupList = React.useMemo(() => {\n return groupByType(typeList);\n }, [typeList]);\n\n return isEmpty(typeList) ? (\n <Empty\n className={styles.empty}\n description={emptyConfig?.description}\n image={theme === \"dark-v2\" ? <DarkEmpty /> : Empty.PRESENTED_IMAGE_SIMPLE}\n imageStyle={emptyConfig?.imageStyle}\n />\n ) : (\n <Form\n className={styles.visualPropertyForm}\n name=\"propertyForm\"\n layout=\"horizontal\"\n labelAlign=\"left\"\n labelCol={{\n span: 8,\n style: {\n minWidth: \"120px\",\n },\n }}\n wrapperCol={{ span: 16 }}\n size=\"small\"\n form={form}\n onValuesChange={props.onValuesChange}\n initialValues={calculateValue(\n propertyTypeList,\n brickProperties,\n typeList\n )}\n colon={false}\n >\n {!hiddenPropsCategory ? (\n <Collapse\n ghost\n defaultActiveKey={gorupList.map((_, index) => String(index))}\n className={styles.panelContainer}\n expandIconPosition=\"left\"\n >\n {gorupList?.map(([category, list], index) => {\n return (\n <Collapse.Panel\n header={upperFirst(category)}\n key={index}\n forceRender={true}\n >\n {list.map((item) => getFormItem(item))}\n </Collapse.Panel>\n );\n })}\n\n <Collapse.Panel\n className={styles.otherPanel}\n forceRender={true}\n header={upperFirst(OTHER_FORM_ITEM_FIELD)}\n key={OTHER_FORM_ITEM_FIELD}\n >\n {renderOthersItem()}\n </Collapse.Panel>\n </Collapse>\n ) : (\n <>\n {typeList?.map((item) => {\n return getFormItem(item);\n })}\n <div className={styles.otherPanel}>{renderOthersItem()}</div>\n </>\n )}\n </Form>\n );\n}\n\nexport const VisualPropertyForm = React.forwardRef(LegacyVisualPropertyForm);\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AAaA;AAEA;AACA;AACA;AASA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AAMA;AAQA;AAIA,MAAMA,cAAc,GAAG,CACrB,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,CACP;AA6CM,SAASC,WAAW,CACzBC,WAAgB,EAChBC,aAAgC,EACvB;EACT,IAAI,OAAOD,WAAW,KAAMC,aAAa,CAACC,IAAe,EAAE;IACzD,OAAO,IAAI;EACb;EACA;EACA,OAAO,KAAK;AACd;AACO,SAASC,wBAAwB,CACtCC,KAA8B,EAC9BC,GAA+B,EACX;EACpB,MAAMC,KAAK,GAAG,IAAAC,yBAAe,GAAE;EAC/B,MAAM;IACJC,SAAS;IACTC,SAAS;IACTC,gBAAgB;IAChBC,eAAe;IACfC,SAAS;IACTC,WAAW;IACXC,mBAAmB;IACnBC,gBAAgB;IAChBC;EACF,CAAC,GAAGZ,KAAK;EACT,MAAM,CAACa,IAAI,CAAC,GAAGC,UAAI,CAACC,OAAO,EAAE;EAC7B,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EACtC,IAAAC,0BAAe,EAACb,gBAAgB,EAAEC,eAAe,CAAC,CACnD;EAED,IAAAa,0BAAmB,EAACnB,GAAG,EAAE,OAAO;IAC9BoB,cAAc,EAAER,IAAI,CAACQ,cAAc;IACnCC,mBAAmB,EAAE,CACnBN,QAAwB,EACxBO,UAA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Value","type","LegacyVisualPropertyForm","props","ref","theme","useCurrentTheme","projectId","labelIcon","propertyTypeList","brickProperties","brickInfo","emptyConfig","hiddenPropsCategory","menuSettingClick","childMountPointList","form","Form","useForm","typeList","setTypeList","useState","mergeProperties","useImperativeHandle","validateFields","resetPropertyFields","properties","restValue","resetFields","getCurTypeList","map","item","pick","getFieldsValue","useEffect","newTypeList","newValue","calculateValue","setFieldsValue","handleLabelClick","name","selected","find","index","findIndex","nextMode","mode","ItemModeType","Advanced","Normal","value","getFieldValue","modeValueMap","isNil","supportMenuType","includes","matchNoramlMenuValue","supportBasicType","parsedValue","yaml","undefined","isString","yamlStringify","update","$splice","renderLabel","hideIcon","description","styles","iconContainer","advanced","normal","renderEditorItem","required","Required","True","jsonSchema","schemaRef","span","style","padding","editor","model","renderStringItem","message","editorProps","renderTextareaItem","renderSingleRadio","prop","handleRadioUncheck","e","target","formValue","changeValue","onValuesChange","options","icon","buttonIcon","mergedIcon","imgSrc","imgStyle","verticalAlign","fontSize","iconStyle","optionType","disabled","textAlign","flex","disableUnchek","label","paddingLeft","renderRadioItem","radioProps","omit","radioGroup","display","renderBooleanItem","renderInputNumberItem","renderStringListItem","renderIconItem","renderMessageItem","renderCodeEditorItem","renderColorItem","renderMenuItem","renderGeneralOptipns","renderFormItem","renderCustomColumn","dataIndex","key","title","useChildren","filter","startsWith","endsWith","inputValue","option","children","toUpperCase","indexOf","renderCustomButtons","id","text","tooltip","eventName","buttonType","hide","isDivider","isDropdown","renderEnumItem","enumList","renderSelectItem","renderCheckboxItem","getFormItem","test","enums","emunList","replace","split","renderOthersItem","OTHER_FORM_ITEM_FIELD","Infinity","gorupList","React","useMemo","groupByType","isEmpty","empty","Empty","PRESENTED_IMAGE_SIMPLE","imageStyle","visualPropertyForm","minWidth","_","String","panelContainer","category","list","upperFirst","otherPanel","VisualPropertyForm","forwardRef"],"sources":["../../../src/visual-property-form/VisualPropertyForm.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from \"react\";\nimport {\n Form,\n Input,\n InputNumber,\n Select,\n Tooltip,\n Collapse,\n Empty,\n Switch,\n AutoComplete,\n Radio,\n Checkbox,\n} from \"antd\";\nimport { EmptyProps } from \"antd/lib/empty\";\nimport { useCurrentTheme } from \"@next-core/brick-kit\";\nimport { MenuIcon, SrcIcon } from \"@next-core/brick-types\";\nimport { GeneralIcon } from \"@next-libs/basic-components\";\nimport update from \"immutability-helper\";\nimport _, {\n isNil,\n pick,\n upperFirst,\n isEmpty,\n cloneDeep,\n isString,\n omit,\n} from \"lodash\";\nimport styles from \"./VisualPropertyForm.module.css\";\nimport { FormProps } from \"antd/lib/form\";\nimport { CodeEditorFormItem } from \"./components/CodeEditor/CodeEditorFormItem\";\nimport { IconSelectFormItem } from \"./components/IconSelect/IconSelectFormItem\";\nimport { ColorEditorItem } from \"./components/ColorEditor/ColorEditorItem\";\nimport { MenuEditorItem } from \"./components/MenuEditor/MenuEditorItem\";\nimport { ListEditor } from \"./components/ListEditor/ListEditor\";\nimport { ReactComponent as DarkEmpty } from \"./images/empty-dark.svg\";\nimport {\n mergeProperties,\n calculateValue,\n groupByType,\n yamlStringify,\n yaml,\n} from \"./processor\";\nimport {\n OTHER_FORM_ITEM_FIELD,\n supportBasicType,\n supportMenuType,\n} from \"./constant\";\nimport { matchNoramlMenuValue } from \"./processor\";\nimport {\n PropertyType,\n BrickProperties,\n visualFormUtils,\n ItemModeType,\n UnionPropertyType,\n Required,\n} from \"../interfaces\";\nimport { MessageEditor } from \"./components/MessageEditor/MessageEditor\";\nimport { options } from \"marked\";\nimport { GeneralOption } from \"@next-libs/forms\";\n\nconst ButtonTypeEmun = [\n \"link\",\n \"default\",\n \"primary\",\n \"ghost\",\n \"dashed\",\n \"icon\",\n \"text\",\n];\n\nexport type CustomColumn = {\n dataIndex: string;\n title: string;\n useChildren?: string;\n [k: string]: any;\n};\n\nexport type GeneralOptionProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type CustomButtonProps = {\n id: string;\n buttonType: string;\n eventName: string;\n text: string;\n tooltip: string;\n icon: MenuIcon;\n hide: boolean;\n disabled: boolean;\n isDivider: boolean;\n isDropdown: boolean;\n};\nexport interface VisualPropertyFormProps {\n projectId?: string;\n propertyTypeList: PropertyType[];\n labelIcon: {\n normal?: MenuIcon;\n advanced?: MenuIcon;\n };\n brickProperties: BrickProperties;\n onValuesChange?: FormProps[\"onValuesChange\"];\n brickInfo?: {\n type: \"brick\" | \"provider\" | \"template\";\n };\n emptyConfig?: EmptyProps;\n menuSettingClick?: () => void;\n hiddenPropsCategory?: boolean;\n childMountPointList?: string[];\n}\n\nexport function typeMatched(\n actualValue: any,\n selectedValue: UnionPropertyType\n): boolean {\n if (typeof actualValue === (selectedValue.type as string)) {\n return true;\n }\n // TODO: 补充更多的类型检查,例如 enum 等\n return false;\n}\nexport function LegacyVisualPropertyForm(\n props: VisualPropertyFormProps,\n ref: React.Ref<visualFormUtils>\n): React.ReactElement {\n const theme = useCurrentTheme();\n const {\n projectId,\n labelIcon,\n propertyTypeList,\n brickProperties,\n brickInfo,\n emptyConfig,\n hiddenPropsCategory,\n menuSettingClick,\n childMountPointList,\n } = props;\n const [form] = Form.useForm();\n const [typeList, setTypeList] = useState<UnionPropertyType[]>(\n mergeProperties(propertyTypeList, brickProperties)\n );\n\n useImperativeHandle(ref, () => ({\n validateFields: form.validateFields,\n resetPropertyFields: (\n typeList: PropertyType[],\n properties: BrickProperties\n ) => {\n const restValue = mergeProperties(typeList, properties);\n setTypeList(restValue);\n form.resetFields();\n },\n getCurTypeList: (): UnionPropertyType[] => {\n return typeList?.map((item) => pick(item, [\"name\", \"type\", \"mode\"]));\n },\n getFieldsValue: form.getFieldsValue,\n }));\n\n useEffect(() => {\n const newTypeList = mergeProperties(propertyTypeList, brickProperties);\n setTypeList(newTypeList);\n\n const newValue = calculateValue(\n propertyTypeList,\n brickProperties,\n newTypeList\n );\n form.resetFields();\n form.setFieldsValue(newValue);\n }, [propertyTypeList, brickProperties]);\n\n const handleLabelClick = (name: string): void => {\n const selected = typeList.find((item) => item.name === name);\n const index = typeList.findIndex((item) => item.name === name);\n const nextMode =\n selected.mode === ItemModeType.Advanced\n ? ItemModeType.Normal\n : ItemModeType.Advanced;\n selected.value = form.getFieldValue(selected.name);\n // 记录切换前的模式下的值\n selected.modeValueMap = {\n ...selected.modeValueMap,\n ...{ [selected.mode]: selected.value },\n };\n // let value = cloneDeep(selected.value);\n if (!isNil(selected.modeValueMap[nextMode])) {\n // 切换后的模式原本有值时,则用原本的值\n selected.value = selected.modeValueMap[nextMode];\n } else if (nextMode === ItemModeType.Normal) {\n // 切换到普通模式没有值时可以根据高级模式来更新值\n if (supportMenuType.includes(selected.type as string)) {\n selected.value = matchNoramlMenuValue(selected.value);\n } else if (supportBasicType.includes(selected.type as string)) {\n // yaml解析后检查下类型,不符合属性类型就不更新了\n const parsedValue = yaml(selected.value);\n if (typeMatched(parsedValue, selected)) {\n selected.value = parsedValue;\n } else {\n selected.value = undefined;\n }\n }\n } else {\n // 切换到高级模式没有值时可以根据普通模式来更新值\n if (isNil(selected.value)) {\n selected.value = \"\";\n } else if (isString(selected.value)) {\n // do nothing\n } else {\n selected.value = yamlStringify(selected.value);\n }\n }\n selected.modeValueMap[nextMode] = selected.value;\n form.setFieldsValue({\n [name]: selected.value,\n });\n const newTypeList = update(typeList, {\n $splice: [[index, 1, { ...selected, mode: nextMode }]],\n });\n setTypeList(newTypeList);\n };\n\n const renderLabel = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <span>\n <Tooltip title={item.description}>{item.name}</Tooltip>{\" \"}\n {!hideIcon && labelIcon && (\n <span\n className={styles.iconContainer}\n onClick={() => handleLabelClick(item.name)}\n >\n <GeneralIcon\n icon={\n item.mode === ItemModeType.Advanced\n ? labelIcon?.advanced\n : labelIcon.normal\n }\n />\n </span>\n )}\n </span>\n );\n };\n\n const renderEditorItem = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <CodeEditorFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, hideIcon) as any}\n required={item.required === Required.True}\n theme={theme === \"dark-v2\" ? \"monokai\" : \"tomorrow\"}\n jsonSchema={item?.jsonSchema}\n schemaRef={item?.schemaRef}\n showLineNumbers={true}\n showGutter={true}\n labelCol={{\n span: 24,\n style: {\n padding: 0,\n },\n }}\n wrapperCol={{\n span: 24,\n }}\n mode={\n (typeof item?.editor !== \"string\" && item?.editor?.model) ||\n \"brick_next_yaml\"\n }\n />\n );\n };\n\n const renderStringItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderTextareaItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input.TextArea {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderSingleRadio = (item: UnionPropertyType) => {\n const { editorProps: prop, name } = item;\n\n const handleRadioUncheck = (e: any) => {\n const value = e?.target?.value;\n const formValue = form.getFieldsValue();\n const changeValue = {\n [name]: formValue[name] === value ? undefined : value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, formValue);\n };\n\n return prop.options?.map((item: any) => {\n const icon = item.icon;\n let buttonIcon: JSX.Element = null;\n if (icon) {\n if (\"imgSrc\" in icon) {\n const mergedIcon = {\n imgSrc: icon.imgSrc,\n imgStyle: {\n verticalAlign: \"-0.125em\",\n ...icon.imgStyle,\n },\n };\n buttonIcon = <GeneralIcon icon={mergedIcon} size={14} />;\n } else {\n buttonIcon = (\n <GeneralIcon\n icon={icon}\n style={{\n fontSize: \"14px\",\n ...icon.iconStyle,\n }}\n />\n );\n }\n }\n if (prop.optionType === \"button\") {\n return (\n <Radio.Button\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={{ textAlign: \"center\", flex: \"1 1 0\", ...item.style }}\n onClick={!prop?.disableUnchek ? handleRadioUncheck : () => null}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio.Button>\n );\n } else {\n return (\n <Radio\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={item.style}\n onClick={!prop?.disableUnchek ? handleRadioUncheck : () => null}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio>\n );\n }\n });\n };\n\n const renderRadioItem = (item: UnionPropertyType): React.ReactElement => {\n const radioProps = omit(item.editorProps, \"options\");\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Radio.Group\n className={styles.radioGroup}\n style={\n item.editorProps.optionType === \"button\" ? { display: \"flex\" } : {}\n }\n {...(radioProps ?? {})}\n >\n {renderSingleRadio(item)}\n </Radio.Group>\n </Form.Item>\n );\n };\n\n const renderBooleanItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n valuePropName=\"checked\"\n >\n <Switch\n defaultChecked={props.brickProperties[item.name]}\n {...(item.editorProps ?? {})}\n />\n </Form.Item>\n );\n };\n\n const renderInputNumberItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <InputNumber {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderStringListItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select mode=\"tags\" {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderIconItem = (item: UnionPropertyType): React.ReactElement => {\n return (\n <IconSelectFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true) as any}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMessageItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MessageEditor\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n value={item.value}\n required={item.required === Required.True}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCodeEditorItem = (item: PropertyType): React.ReactElement => {\n return renderEditorItem(item, true);\n };\n\n const renderColorItem = (item: PropertyType): React.ReactElement => {\n return (\n <ColorEditorItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true)}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMenuItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MenuEditorItem\n projectId={projectId}\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n menuSettingClick={menuSettingClick}\n />\n );\n };\n\n const renderGeneralOptipns = (\n item: UnionPropertyType\n ): React.ReactElement => {\n const renderFormItem = (item: GeneralOptionProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"label\" label=\"label\">\n <Input defaultValue={item.label} />\n </Form.Item>\n <Form.Item name=\"value\" label=\"value\">\n <Input defaultValue={item.value} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"label\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n label: value,\n value: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomColumn = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomColumn): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"dataIndex\" label=\"dataIndex\">\n <Input defaultValue={item.dataIndex} />\n </Form.Item>\n <Form.Item name=\"key\" label=\"key\">\n <Input defaultValue={item.key} />\n </Form.Item>\n <Form.Item name=\"title\" label=\"title\">\n <Input defaultValue={item.title} />\n </Form.Item>\n <Form.Item\n name=\"useChildren\"\n label=\"useChildren\"\n tooltip=\"useBrick代替用法,数据来源于子插槽名称,并且插槽名称必须使用'[]'包裹\"\n >\n <AutoComplete\n defaultValue={item.useChildren}\n dataSource={(childMountPointList ?? []).filter(\n (item) => item.startsWith(\"[\") && item.endsWith(\"]\")\n )}\n filterOption={(inputValue, option) =>\n option.props.children\n .toUpperCase()\n .indexOf(inputValue.toUpperCase()) !== -1\n }\n />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"title\"\n getDefaultItem={(value: any) => ({\n dataIndex: value,\n title: value,\n key: value,\n })}\n renderFormItem={renderFormItem}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomButtons = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomButtonProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"id\" label=\"id\">\n <Input defaultValue={item.id} />\n </Form.Item>\n <Form.Item name=\"text\" label=\"text\">\n <Input defaultValue={item.text} />\n </Form.Item>\n <Form.Item name=\"tooltip\" label=\"tooltip\">\n <Input defaultValue={item.tooltip} />\n </Form.Item>\n <Form.Item name=\"eventName\" label=\"eventName\">\n <Input defaultValue={item.eventName} />\n </Form.Item>\n <IconSelectFormItem name=\"icon\" label=\"icon\" />\n <Form.Item name=\"buttonType\" label=\"buttonType\">\n <Select defaultValue={item.buttonType}>\n {ButtonTypeEmun.map((item) => (\n <Select.Option key={item} value={item}>\n {item}\n </Select.Option>\n ))}\n </Select>\n </Form.Item>\n <Form.Item name=\"hide\" label=\"hide\">\n <Switch checked={item.hide} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n <Form.Item name=\"isDivider\" label=\"isDivider\">\n <Switch checked={item.isDivider} />\n </Form.Item>\n <Form.Item name=\"isDropdown\" label=\"isDropdown\">\n <Switch checked={item.isDropdown} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"text\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n text: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderEnumItem = (\n item: UnionPropertyType,\n enumList: string[]\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select\n options={enumList.map((item) => ({ label: item, value: item }))}\n />\n </Form.Item>\n );\n };\n\n const renderSelectItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderCheckboxItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Checkbox.Group {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const getFormItem = (item: PropertyType): React.ReactElement => {\n // todo(sailor): update unit text\n switch (item.editor) {\n case \"input\":\n return renderStringItem(item);\n case \"radio\":\n return renderRadioItem(item);\n case \"switch\":\n return renderBooleanItem(item);\n case \"color\":\n return renderColorItem(item);\n case \"icon\":\n return renderIconItem(item);\n case \"message\":\n return renderMessageItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"textarea\":\n return renderTextareaItem(item);\n case \"select\":\n return renderSelectItem(item);\n case \"checkbox\":\n return renderCheckboxItem(item);\n case \"code\":\n return renderCodeEditorItem(item);\n }\n if (/true|false/.test(item.type as string)) {\n return renderBooleanItem(item);\n }\n if (item.enums) {\n const emunList = (item.enums as string).replace(/\"|'/g, \"\").split(\"|\");\n return renderEnumItem(item, emunList);\n }\n switch (item.type) {\n case \"string\":\n return renderStringItem(item);\n case \"string[]\":\n return renderStringListItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"boolean\":\n return renderBooleanItem(item);\n case \"MenuIcon\":\n return renderIconItem(item);\n case \"Color\":\n return renderColorItem(item);\n case \"Menu\":\n case \"SidebarSubMenu\":\n return renderMenuItem(item);\n // todo(sailor): update unit text\n case \"GeneralOption[]\":\n return renderGeneralOptipns(item);\n case \"CustomColumn[]\":\n return renderCustomColumn(item);\n case \"CustomButton[]\":\n return renderCustomButtons(item);\n default:\n return renderCodeEditorItem(item);\n }\n };\n\n const renderOthersItem = (): React.ReactElement => {\n return (\n <CodeEditorFormItem\n name={OTHER_FORM_ITEM_FIELD}\n label={\n brickInfo?.type === \"template\" ? \"other params\" : \"other properties\"\n }\n mode=\"brick_next_yaml\"\n maxLines={Infinity}\n />\n );\n };\n\n const gorupList = React.useMemo(() => {\n return groupByType(typeList);\n }, [typeList]);\n\n return isEmpty(typeList) ? (\n <Empty\n className={styles.empty}\n description={emptyConfig?.description}\n image={theme === \"dark-v2\" ? <DarkEmpty /> : Empty.PRESENTED_IMAGE_SIMPLE}\n imageStyle={emptyConfig?.imageStyle}\n />\n ) : (\n <Form\n className={styles.visualPropertyForm}\n name=\"propertyForm\"\n layout=\"horizontal\"\n labelAlign=\"left\"\n labelCol={{\n span: 8,\n style: {\n minWidth: \"120px\",\n },\n }}\n wrapperCol={{ span: 16 }}\n size=\"small\"\n form={form}\n onValuesChange={props.onValuesChange}\n initialValues={calculateValue(\n propertyTypeList,\n brickProperties,\n typeList\n )}\n colon={false}\n >\n {!hiddenPropsCategory ? (\n <Collapse\n ghost\n defaultActiveKey={gorupList.map((_, index) => String(index))}\n className={styles.panelContainer}\n expandIconPosition=\"left\"\n >\n {gorupList?.map(([category, list], index) => {\n return (\n <Collapse.Panel\n header={upperFirst(category)}\n key={index}\n forceRender={true}\n >\n {list.map((item) => getFormItem(item))}\n </Collapse.Panel>\n );\n })}\n\n <Collapse.Panel\n className={styles.otherPanel}\n forceRender={true}\n header={upperFirst(OTHER_FORM_ITEM_FIELD)}\n key={OTHER_FORM_ITEM_FIELD}\n >\n {renderOthersItem()}\n </Collapse.Panel>\n </Collapse>\n ) : (\n <>\n {typeList?.map((item) => {\n return getFormItem(item);\n })}\n <div className={styles.otherPanel}>{renderOthersItem()}</div>\n </>\n )}\n </Form>\n );\n}\n\nexport const VisualPropertyForm = React.forwardRef(LegacyVisualPropertyForm);\n"],"mappings":";;;;;;;;;;;AAAA;AACA;AAcA;AAEA;AACA;AACA;AASA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AAMA;AAQA;AAIA,MAAMA,cAAc,GAAG,CACrB,MAAM,EACN,SAAS,EACT,SAAS,EACT,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,CACP;AA6CM,SAASC,WAAW,CACzBC,WAAgB,EAChBC,aAAgC,EACvB;EACT,IAAI,OAAOD,WAAW,KAAMC,aAAa,CAACC,IAAe,EAAE;IACzD,OAAO,IAAI;EACb;EACA;EACA,OAAO,KAAK;AACd;AACO,SAASC,wBAAwB,CACtCC,KAA8B,EAC9BC,GAA+B,EACX;EACpB,MAAMC,KAAK,GAAG,IAAAC,yBAAe,GAAE;EAC/B,MAAM;IACJC,SAAS;IACTC,SAAS;IACTC,gBAAgB;IAChBC,eAAe;IACfC,SAAS;IACTC,WAAW;IACXC,mBAAmB;IACnBC,gBAAgB;IAChBC;EACF,CAAC,GAAGZ,KAAK;EACT,MAAM,CAACa,IAAI,CAAC,GAAGC,UAAI,CAACC,OAAO,EAAE;EAC7B,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EACtC,IAAAC,0BAAe,EAACb,gBAAgB,EAAEC,eAAe,CAAC,CACnD;EAED,IAAAa,0BAAmB,EAACnB,GAAG,EAAE,OAAO;IAC9BoB,cA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AAEC,IAAI,IAAK;IACvB,OAAOyH,WAAW,CAACzH,IAAI,CAAC;EAC1B,CAAC,CAAC,eACF;IAAK,SAAS,EAAEqC,iCAAM,CAAC8G;EAAW,GAAEpB,gBAAgB,EAAE,CAAO,CAEhE,CAEJ;AACH;AAEO,MAAMqB,kBAAkB,gBAAGjB,cAAK,CAACkB,UAAU,CAAClL,wBAAwB,CAAC;AAAC"}
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
3
  import React, { useEffect, useImperativeHandle, useState } from "react";
4
- import { Form, Input, InputNumber, Select, Tooltip, Collapse, Empty, Switch, AutoComplete, Radio } from "antd";
4
+ import { Form, Input, InputNumber, Select, Tooltip, Collapse, Empty, Switch, AutoComplete, Radio, Checkbox } from "antd";
5
5
  import { useCurrentTheme } from "@next-core/brick-kit";
6
6
  import { GeneralIcon } from "@next-libs/basic-components";
7
7
  import update from "immutability-helper";
@@ -153,9 +153,35 @@ export function LegacyVisualPropertyForm(props, ref) {
153
153
  }]
154
154
  }, /*#__PURE__*/React.createElement(Input, (_item$editorProps = item.editorProps) !== null && _item$editorProps !== void 0 ? _item$editorProps : {}));
155
155
  };
156
- var renderSingleRadio = props => {
157
- var _props$options;
158
- return (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(item => {
156
+ var renderTextareaItem = item => {
157
+ var _item$editorProps2;
158
+ return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
159
+ key: item.name,
160
+ label: renderLabel(item),
161
+ name: item.name,
162
+ rules: [{
163
+ required: item.required === Required.True,
164
+ message: "\u8BF7\u8F93\u5165".concat(item.name)
165
+ }]
166
+ }, /*#__PURE__*/React.createElement(Input.TextArea, (_item$editorProps2 = item.editorProps) !== null && _item$editorProps2 !== void 0 ? _item$editorProps2 : {}));
167
+ };
168
+ var renderSingleRadio = item => {
169
+ var _prop$options;
170
+ var {
171
+ editorProps: prop,
172
+ name
173
+ } = item;
174
+ var handleRadioUncheck = e => {
175
+ var _e$target;
176
+ var value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value;
177
+ var formValue = form.getFieldsValue();
178
+ var changeValue = {
179
+ [name]: formValue[name] === value ? undefined : value
180
+ };
181
+ form.setFieldsValue(changeValue);
182
+ props.onValuesChange(changeValue, formValue);
183
+ };
184
+ return (_prop$options = prop.options) === null || _prop$options === void 0 ? void 0 : _prop$options.map(item => {
159
185
  var icon = item.icon;
160
186
  var buttonIcon = null;
161
187
  if (icon) {
@@ -179,7 +205,7 @@ export function LegacyVisualPropertyForm(props, ref) {
179
205
  });
180
206
  }
181
207
  }
182
- if (props.optionType === "button") {
208
+ if (prop.optionType === "button") {
183
209
  return /*#__PURE__*/React.createElement(Radio.Button, {
184
210
  key: item.value,
185
211
  value: item.value,
@@ -187,7 +213,8 @@ export function LegacyVisualPropertyForm(props, ref) {
187
213
  style: _objectSpread({
188
214
  textAlign: "center",
189
215
  flex: "1 1 0"
190
- }, item.style)
216
+ }, item.style),
217
+ onClick: !(prop !== null && prop !== void 0 && prop.disableUnchek) ? handleRadioUncheck : () => null
191
218
  }, buttonIcon, item.label && /*#__PURE__*/React.createElement("span", {
192
219
  style: {
193
220
  paddingLeft: "5px"
@@ -198,7 +225,8 @@ export function LegacyVisualPropertyForm(props, ref) {
198
225
  key: item.value,
199
226
  value: item.value,
200
227
  disabled: item.disabled,
201
- style: item.style
228
+ style: item.style,
229
+ onClick: !(prop !== null && prop !== void 0 && prop.disableUnchek) ? handleRadioUncheck : () => null
202
230
  }, buttonIcon, item.label && /*#__PURE__*/React.createElement("span", {
203
231
  style: {
204
232
  paddingLeft: "5px"
@@ -222,10 +250,10 @@ export function LegacyVisualPropertyForm(props, ref) {
222
250
  style: item.editorProps.optionType === "button" ? {
223
251
  display: "flex"
224
252
  } : {}
225
- }, radioProps !== null && radioProps !== void 0 ? radioProps : {}), renderSingleRadio(item.editorProps)));
253
+ }, radioProps !== null && radioProps !== void 0 ? radioProps : {}), renderSingleRadio(item)));
226
254
  };
227
255
  var renderBooleanItem = item => {
228
- var _item$editorProps2;
256
+ var _item$editorProps3;
229
257
  return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
230
258
  key: item.name,
231
259
  label: renderLabel(item),
@@ -237,10 +265,10 @@ export function LegacyVisualPropertyForm(props, ref) {
237
265
  valuePropName: "checked"
238
266
  }, /*#__PURE__*/React.createElement(Switch, _extends({
239
267
  defaultChecked: props.brickProperties[item.name]
240
- }, (_item$editorProps2 = item.editorProps) !== null && _item$editorProps2 !== void 0 ? _item$editorProps2 : {})));
268
+ }, (_item$editorProps3 = item.editorProps) !== null && _item$editorProps3 !== void 0 ? _item$editorProps3 : {})));
241
269
  };
242
270
  var renderInputNumberItem = item => {
243
- var _item$editorProps3;
271
+ var _item$editorProps4;
244
272
  return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
245
273
  key: item.name,
246
274
  label: renderLabel(item),
@@ -249,10 +277,10 @@ export function LegacyVisualPropertyForm(props, ref) {
249
277
  required: item.required === Required.True,
250
278
  message: "\u8BF7\u8F93\u5165".concat(item.name)
251
279
  }]
252
- }, /*#__PURE__*/React.createElement(InputNumber, (_item$editorProps3 = item.editorProps) !== null && _item$editorProps3 !== void 0 ? _item$editorProps3 : {}));
280
+ }, /*#__PURE__*/React.createElement(InputNumber, (_item$editorProps4 = item.editorProps) !== null && _item$editorProps4 !== void 0 ? _item$editorProps4 : {}));
253
281
  };
254
282
  var renderStringListItem = item => {
255
- var _item$editorProps4;
283
+ var _item$editorProps5;
256
284
  return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
257
285
  key: item.name,
258
286
  label: renderLabel(item),
@@ -263,7 +291,7 @@ export function LegacyVisualPropertyForm(props, ref) {
263
291
  }]
264
292
  }, /*#__PURE__*/React.createElement(Select, _extends({
265
293
  mode: "tags"
266
- }, (_item$editorProps4 = item.editorProps) !== null && _item$editorProps4 !== void 0 ? _item$editorProps4 : {})));
294
+ }, (_item$editorProps5 = item.editorProps) !== null && _item$editorProps5 !== void 0 ? _item$editorProps5 : {})));
267
295
  };
268
296
  var renderIconItem = item => {
269
297
  return /*#__PURE__*/React.createElement(IconSelectFormItem, {
@@ -487,6 +515,30 @@ export function LegacyVisualPropertyForm(props, ref) {
487
515
  }))
488
516
  }));
489
517
  };
518
+ var renderSelectItem = item => {
519
+ var _item$editorProps6;
520
+ return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
521
+ key: item.name,
522
+ label: renderLabel(item),
523
+ name: item.name,
524
+ rules: [{
525
+ required: item.required === Required.True,
526
+ message: "\u8BF7\u8F93\u5165".concat(item.name)
527
+ }]
528
+ }, /*#__PURE__*/React.createElement(Select, (_item$editorProps6 = item.editorProps) !== null && _item$editorProps6 !== void 0 ? _item$editorProps6 : {}));
529
+ };
530
+ var renderCheckboxItem = item => {
531
+ var _item$editorProps7;
532
+ return item.mode === ItemModeType.Advanced ? renderEditorItem(item) : /*#__PURE__*/React.createElement(Form.Item, {
533
+ key: item.name,
534
+ label: renderLabel(item),
535
+ name: item.name,
536
+ rules: [{
537
+ required: item.required === Required.True,
538
+ message: "\u8BF7\u8F93\u5165".concat(item.name)
539
+ }]
540
+ }, /*#__PURE__*/React.createElement(Checkbox.Group, (_item$editorProps7 = item.editorProps) !== null && _item$editorProps7 !== void 0 ? _item$editorProps7 : {}));
541
+ };
490
542
  var getFormItem = item => {
491
543
  // todo(sailor): update unit text
492
544
  switch (item.editor) {
@@ -502,6 +554,16 @@ export function LegacyVisualPropertyForm(props, ref) {
502
554
  return renderIconItem(item);
503
555
  case "message":
504
556
  return renderMessageItem(item);
557
+ case "number":
558
+ return renderInputNumberItem(item);
559
+ case "textarea":
560
+ return renderTextareaItem(item);
561
+ case "select":
562
+ return renderSelectItem(item);
563
+ case "checkbox":
564
+ return renderCheckboxItem(item);
565
+ case "code":
566
+ return renderCodeEditorItem(item);
505
567
  }
506
568
  if (/true|false/.test(item.type)) {
507
569
  return renderBooleanItem(item);
@@ -1 +1 @@
1
- {"version":3,"file":"VisualPropertyForm.js","names":["React","useEffect","useImperativeHandle","useState","Form","Input","InputNumber","Select","Tooltip","Collapse","Empty","Switch","AutoComplete","Radio","useCurrentTheme","GeneralIcon","update","isNil","pick","upperFirst","isEmpty","isString","omit","styles","CodeEditorFormItem","IconSelectFormItem","ColorEditorItem","MenuEditorItem","ListEditor","ReactComponent","DarkEmpty","mergeProperties","calculateValue","groupByType","yamlStringify","yaml","OTHER_FORM_ITEM_FIELD","supportBasicType","supportMenuType","matchNoramlMenuValue","ItemModeType","Required","MessageEditor","ButtonTypeEmun","typeMatched","actualValue","selectedValue","type","LegacyVisualPropertyForm","props","ref","theme","projectId","labelIcon","propertyTypeList","brickProperties","brickInfo","emptyConfig","hiddenPropsCategory","menuSettingClick","childMountPointList","form","useForm","typeList","setTypeList","validateFields","resetPropertyFields","properties","restValue","resetFields","getCurTypeList","map","item","getFieldsValue","newTypeList","newValue","setFieldsValue","handleLabelClick","name","selected","find","index","findIndex","nextMode","mode","Advanced","Normal","value","getFieldValue","modeValueMap","includes","parsedValue","undefined","$splice","renderLabel","hideIcon","description","iconContainer","advanced","normal","renderEditorItem","required","True","jsonSchema","schemaRef","span","style","padding","editor","model","renderStringItem","message","editorProps","renderSingleRadio","options","icon","buttonIcon","mergedIcon","imgSrc","imgStyle","verticalAlign","fontSize","iconStyle","optionType","disabled","textAlign","flex","label","paddingLeft","renderRadioItem","radioProps","radioGroup","display","renderBooleanItem","renderInputNumberItem","renderStringListItem","renderIconItem","renderMessageItem","changeValue","onValuesChange","renderCodeEditorItem","renderColorItem","renderMenuItem","renderGeneralOptipns","renderFormItem","renderCustomColumn","dataIndex","key","title","useChildren","filter","startsWith","endsWith","inputValue","option","children","toUpperCase","indexOf","renderCustomButtons","id","text","tooltip","eventName","buttonType","hide","isDivider","isDropdown","renderEnumItem","enumList","getFormItem","test","enums","emunList","replace","split","renderOthersItem","Infinity","gorupList","useMemo","empty","PRESENTED_IMAGE_SIMPLE","imageStyle","visualPropertyForm","minWidth","_","String","panelContainer","category","list","otherPanel","VisualPropertyForm","forwardRef"],"sources":["../../../src/visual-property-form/VisualPropertyForm.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from \"react\";\nimport {\n Form,\n Input,\n InputNumber,\n Select,\n Tooltip,\n Collapse,\n Empty,\n Switch,\n AutoComplete,\n Radio,\n} from \"antd\";\nimport { EmptyProps } from \"antd/lib/empty\";\nimport { useCurrentTheme } from \"@next-core/brick-kit\";\nimport { MenuIcon, SrcIcon } from \"@next-core/brick-types\";\nimport { GeneralIcon } from \"@next-libs/basic-components\";\nimport update from \"immutability-helper\";\nimport _, {\n isNil,\n pick,\n upperFirst,\n isEmpty,\n cloneDeep,\n isString,\n omit,\n} from \"lodash\";\nimport styles from \"./VisualPropertyForm.module.css\";\nimport { FormProps } from \"antd/lib/form\";\nimport { CodeEditorFormItem } from \"./components/CodeEditor/CodeEditorFormItem\";\nimport { IconSelectFormItem } from \"./components/IconSelect/IconSelectFormItem\";\nimport { ColorEditorItem } from \"./components/ColorEditor/ColorEditorItem\";\nimport { MenuEditorItem } from \"./components/MenuEditor/MenuEditorItem\";\nimport { ListEditor } from \"./components/ListEditor/ListEditor\";\nimport { ReactComponent as DarkEmpty } from \"./images/empty-dark.svg\";\nimport {\n mergeProperties,\n calculateValue,\n groupByType,\n yamlStringify,\n yaml,\n} from \"./processor\";\nimport {\n OTHER_FORM_ITEM_FIELD,\n supportBasicType,\n supportMenuType,\n} from \"./constant\";\nimport { matchNoramlMenuValue } from \"./processor\";\nimport {\n PropertyType,\n BrickProperties,\n visualFormUtils,\n ItemModeType,\n UnionPropertyType,\n Required,\n} from \"../interfaces\";\nimport { MessageEditor } from \"./components/MessageEditor/MessageEditor\";\nimport { options } from \"marked\";\nimport { GeneralOption } from \"@next-libs/forms\";\n\nconst ButtonTypeEmun = [\n \"link\",\n \"default\",\n \"primary\",\n \"ghost\",\n \"dashed\",\n \"icon\",\n \"text\",\n];\n\nexport type CustomColumn = {\n dataIndex: string;\n title: string;\n useChildren?: string;\n [k: string]: any;\n};\n\nexport type GeneralOptionProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type CustomButtonProps = {\n id: string;\n buttonType: string;\n eventName: string;\n text: string;\n tooltip: string;\n icon: MenuIcon;\n hide: boolean;\n disabled: boolean;\n isDivider: boolean;\n isDropdown: boolean;\n};\nexport interface VisualPropertyFormProps {\n projectId?: string;\n propertyTypeList: PropertyType[];\n labelIcon: {\n normal?: MenuIcon;\n advanced?: MenuIcon;\n };\n brickProperties: BrickProperties;\n onValuesChange?: FormProps[\"onValuesChange\"];\n brickInfo?: {\n type: \"brick\" | \"provider\" | \"template\";\n };\n emptyConfig?: EmptyProps;\n menuSettingClick?: () => void;\n hiddenPropsCategory?: boolean;\n childMountPointList?: string[];\n}\n\nexport function typeMatched(\n actualValue: any,\n selectedValue: UnionPropertyType\n): boolean {\n if (typeof actualValue === (selectedValue.type as string)) {\n return true;\n }\n // TODO: 补充更多的类型检查,例如 enum 等\n return false;\n}\nexport function LegacyVisualPropertyForm(\n props: VisualPropertyFormProps,\n ref: React.Ref<visualFormUtils>\n): React.ReactElement {\n const theme = useCurrentTheme();\n const {\n projectId,\n labelIcon,\n propertyTypeList,\n brickProperties,\n brickInfo,\n emptyConfig,\n hiddenPropsCategory,\n menuSettingClick,\n childMountPointList,\n } = props;\n const [form] = Form.useForm();\n const [typeList, setTypeList] = useState<UnionPropertyType[]>(\n mergeProperties(propertyTypeList, brickProperties)\n );\n\n useImperativeHandle(ref, () => ({\n validateFields: form.validateFields,\n resetPropertyFields: (\n typeList: PropertyType[],\n properties: BrickProperties\n ) => {\n const restValue = mergeProperties(typeList, properties);\n setTypeList(restValue);\n form.resetFields();\n },\n getCurTypeList: (): UnionPropertyType[] => {\n return typeList?.map((item) => pick(item, [\"name\", \"type\", \"mode\"]));\n },\n getFieldsValue: form.getFieldsValue,\n }));\n\n useEffect(() => {\n const newTypeList = mergeProperties(propertyTypeList, brickProperties);\n setTypeList(newTypeList);\n\n const newValue = calculateValue(\n propertyTypeList,\n brickProperties,\n newTypeList\n );\n form.resetFields();\n form.setFieldsValue(newValue);\n }, [propertyTypeList, brickProperties]);\n\n const handleLabelClick = (name: string): void => {\n const selected = typeList.find((item) => item.name === name);\n const index = typeList.findIndex((item) => item.name === name);\n const nextMode =\n selected.mode === ItemModeType.Advanced\n ? ItemModeType.Normal\n : ItemModeType.Advanced;\n selected.value = form.getFieldValue(selected.name);\n // 记录切换前的模式下的值\n selected.modeValueMap = {\n ...selected.modeValueMap,\n ...{ [selected.mode]: selected.value },\n };\n // let value = cloneDeep(selected.value);\n if (!isNil(selected.modeValueMap[nextMode])) {\n // 切换后的模式原本有值时,则用原本的值\n selected.value = selected.modeValueMap[nextMode];\n } else if (nextMode === ItemModeType.Normal) {\n // 切换到普通模式没有值时可以根据高级模式来更新值\n if (supportMenuType.includes(selected.type as string)) {\n selected.value = matchNoramlMenuValue(selected.value);\n } else if (supportBasicType.includes(selected.type as string)) {\n // yaml解析后检查下类型,不符合属性类型就不更新了\n const parsedValue = yaml(selected.value);\n if (typeMatched(parsedValue, selected)) {\n selected.value = parsedValue;\n } else {\n selected.value = undefined;\n }\n }\n } else {\n // 切换到高级模式没有值时可以根据普通模式来更新值\n if (isNil(selected.value)) {\n selected.value = \"\";\n } else if (isString(selected.value)) {\n // do nothing\n } else {\n selected.value = yamlStringify(selected.value);\n }\n }\n selected.modeValueMap[nextMode] = selected.value;\n form.setFieldsValue({\n [name]: selected.value,\n });\n const newTypeList = update(typeList, {\n $splice: [[index, 1, { ...selected, mode: nextMode }]],\n });\n setTypeList(newTypeList);\n };\n\n const renderLabel = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <span>\n <Tooltip title={item.description}>{item.name}</Tooltip>{\" \"}\n {!hideIcon && labelIcon && (\n <span\n className={styles.iconContainer}\n onClick={() => handleLabelClick(item.name)}\n >\n <GeneralIcon\n icon={\n item.mode === ItemModeType.Advanced\n ? labelIcon?.advanced\n : labelIcon.normal\n }\n />\n </span>\n )}\n </span>\n );\n };\n\n const renderEditorItem = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <CodeEditorFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, hideIcon) as any}\n required={item.required === Required.True}\n theme={theme === \"dark-v2\" ? \"monokai\" : \"tomorrow\"}\n jsonSchema={item?.jsonSchema}\n schemaRef={item?.schemaRef}\n showLineNumbers={true}\n showGutter={true}\n labelCol={{\n span: 24,\n style: {\n padding: 0,\n },\n }}\n wrapperCol={{\n span: 24,\n }}\n mode={\n (typeof item?.editor !== \"string\" && item?.editor?.model) ||\n \"brick_next_yaml\"\n }\n />\n );\n };\n\n const renderStringItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderSingleRadio = (props: Record<string, any>) => {\n return props.options?.map((item: any) => {\n const icon = item.icon;\n let buttonIcon: JSX.Element = null;\n if (icon) {\n if (\"imgSrc\" in icon) {\n const mergedIcon = {\n imgSrc: icon.imgSrc,\n imgStyle: {\n verticalAlign: \"-0.125em\",\n ...icon.imgStyle,\n },\n };\n buttonIcon = <GeneralIcon icon={mergedIcon} size={14} />;\n } else {\n buttonIcon = (\n <GeneralIcon\n icon={icon}\n style={{\n fontSize: \"14px\",\n ...icon.iconStyle,\n }}\n />\n );\n }\n }\n if (props.optionType === \"button\") {\n return (\n <Radio.Button\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={{ textAlign: \"center\", flex: \"1 1 0\", ...item.style }}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio.Button>\n );\n } else {\n return (\n <Radio\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={item.style}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio>\n );\n }\n });\n };\n\n const renderRadioItem = (item: UnionPropertyType): React.ReactElement => {\n const radioProps = omit(item.editorProps, \"options\");\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Radio.Group\n className={styles.radioGroup}\n style={\n item.editorProps.optionType === \"button\" ? { display: \"flex\" } : {}\n }\n {...(radioProps ?? {})}\n >\n {renderSingleRadio(item.editorProps)}\n </Radio.Group>\n </Form.Item>\n );\n };\n\n const renderBooleanItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n valuePropName=\"checked\"\n >\n <Switch\n defaultChecked={props.brickProperties[item.name]}\n {...(item.editorProps ?? {})}\n />\n </Form.Item>\n );\n };\n\n const renderInputNumberItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <InputNumber {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderStringListItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select mode=\"tags\" {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderIconItem = (item: UnionPropertyType): React.ReactElement => {\n return (\n <IconSelectFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true) as any}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMessageItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MessageEditor\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n value={item.value}\n required={item.required === Required.True}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCodeEditorItem = (item: PropertyType): React.ReactElement => {\n return renderEditorItem(item, true);\n };\n\n const renderColorItem = (item: PropertyType): React.ReactElement => {\n return (\n <ColorEditorItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true)}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMenuItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MenuEditorItem\n projectId={projectId}\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n menuSettingClick={menuSettingClick}\n />\n );\n };\n\n const renderGeneralOptipns = (\n item: UnionPropertyType\n ): React.ReactElement => {\n const renderFormItem = (item: GeneralOptionProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"label\" label=\"label\">\n <Input defaultValue={item.label} />\n </Form.Item>\n <Form.Item name=\"value\" label=\"value\">\n <Input defaultValue={item.value} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"label\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n label: value,\n value: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomColumn = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomColumn): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"dataIndex\" label=\"dataIndex\">\n <Input defaultValue={item.dataIndex} />\n </Form.Item>\n <Form.Item name=\"key\" label=\"key\">\n <Input defaultValue={item.key} />\n </Form.Item>\n <Form.Item name=\"title\" label=\"title\">\n <Input defaultValue={item.title} />\n </Form.Item>\n <Form.Item\n name=\"useChildren\"\n label=\"useChildren\"\n tooltip=\"useBrick代替用法,数据来源于子插槽名称,并且插槽名称必须使用'[]'包裹\"\n >\n <AutoComplete\n defaultValue={item.useChildren}\n dataSource={(childMountPointList ?? []).filter(\n (item) => item.startsWith(\"[\") && item.endsWith(\"]\")\n )}\n filterOption={(inputValue, option) =>\n option.props.children\n .toUpperCase()\n .indexOf(inputValue.toUpperCase()) !== -1\n }\n />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"title\"\n getDefaultItem={(value: any) => ({\n dataIndex: value,\n title: value,\n key: value,\n })}\n renderFormItem={renderFormItem}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomButtons = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomButtonProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"id\" label=\"id\">\n <Input defaultValue={item.id} />\n </Form.Item>\n <Form.Item name=\"text\" label=\"text\">\n <Input defaultValue={item.text} />\n </Form.Item>\n <Form.Item name=\"tooltip\" label=\"tooltip\">\n <Input defaultValue={item.tooltip} />\n </Form.Item>\n <Form.Item name=\"eventName\" label=\"eventName\">\n <Input defaultValue={item.eventName} />\n </Form.Item>\n <IconSelectFormItem name=\"icon\" label=\"icon\" />\n <Form.Item name=\"buttonType\" label=\"buttonType\">\n <Select defaultValue={item.buttonType}>\n {ButtonTypeEmun.map((item) => (\n <Select.Option key={item} value={item}>\n {item}\n </Select.Option>\n ))}\n </Select>\n </Form.Item>\n <Form.Item name=\"hide\" label=\"hide\">\n <Switch checked={item.hide} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n <Form.Item name=\"isDivider\" label=\"isDivider\">\n <Switch checked={item.isDivider} />\n </Form.Item>\n <Form.Item name=\"isDropdown\" label=\"isDropdown\">\n <Switch checked={item.isDropdown} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"text\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n text: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderEnumItem = (\n item: UnionPropertyType,\n enumList: string[]\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select\n options={enumList.map((item) => ({ label: item, value: item }))}\n />\n </Form.Item>\n );\n };\n\n const getFormItem = (item: PropertyType): React.ReactElement => {\n // todo(sailor): update unit text\n switch (item.editor) {\n case \"input\":\n return renderStringItem(item);\n case \"radio\":\n return renderRadioItem(item);\n case \"switch\":\n return renderBooleanItem(item);\n case \"color\":\n return renderColorItem(item);\n case \"icon\":\n return renderIconItem(item);\n case \"message\":\n return renderMessageItem(item);\n }\n if (/true|false/.test(item.type as string)) {\n return renderBooleanItem(item);\n }\n if (item.enums) {\n const emunList = (item.enums as string).replace(/\"|'/g, \"\").split(\"|\");\n return renderEnumItem(item, emunList);\n }\n switch (item.type) {\n case \"string\":\n return renderStringItem(item);\n case \"string[]\":\n return renderStringListItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"boolean\":\n return renderBooleanItem(item);\n case \"MenuIcon\":\n return renderIconItem(item);\n case \"Color\":\n return renderColorItem(item);\n case \"Menu\":\n case \"SidebarSubMenu\":\n return renderMenuItem(item);\n // todo(sailor): update unit text\n case \"GeneralOption[]\":\n return renderGeneralOptipns(item);\n case \"CustomColumn[]\":\n return renderCustomColumn(item);\n case \"CustomButton[]\":\n return renderCustomButtons(item);\n default:\n return renderCodeEditorItem(item);\n }\n };\n\n const renderOthersItem = (): React.ReactElement => {\n return (\n <CodeEditorFormItem\n name={OTHER_FORM_ITEM_FIELD}\n label={\n brickInfo?.type === \"template\" ? \"other params\" : \"other properties\"\n }\n mode=\"brick_next_yaml\"\n maxLines={Infinity}\n />\n );\n };\n\n const gorupList = React.useMemo(() => {\n return groupByType(typeList);\n }, [typeList]);\n\n return isEmpty(typeList) ? (\n <Empty\n className={styles.empty}\n description={emptyConfig?.description}\n image={theme === \"dark-v2\" ? <DarkEmpty /> : Empty.PRESENTED_IMAGE_SIMPLE}\n imageStyle={emptyConfig?.imageStyle}\n />\n ) : (\n <Form\n className={styles.visualPropertyForm}\n name=\"propertyForm\"\n layout=\"horizontal\"\n labelAlign=\"left\"\n labelCol={{\n span: 8,\n style: {\n minWidth: \"120px\",\n },\n }}\n wrapperCol={{ span: 16 }}\n size=\"small\"\n form={form}\n onValuesChange={props.onValuesChange}\n initialValues={calculateValue(\n propertyTypeList,\n brickProperties,\n typeList\n )}\n colon={false}\n >\n {!hiddenPropsCategory ? (\n <Collapse\n ghost\n defaultActiveKey={gorupList.map((_, index) => String(index))}\n className={styles.panelContainer}\n expandIconPosition=\"left\"\n >\n {gorupList?.map(([category, list], index) => {\n return (\n <Collapse.Panel\n header={upperFirst(category)}\n key={index}\n forceRender={true}\n >\n {list.map((item) => getFormItem(item))}\n </Collapse.Panel>\n );\n })}\n\n <Collapse.Panel\n className={styles.otherPanel}\n forceRender={true}\n header={upperFirst(OTHER_FORM_ITEM_FIELD)}\n key={OTHER_FORM_ITEM_FIELD}\n >\n {renderOthersItem()}\n </Collapse.Panel>\n </Collapse>\n ) : (\n <>\n {typeList?.map((item) => {\n return getFormItem(item);\n })}\n <div className={styles.otherPanel}>{renderOthersItem()}</div>\n </>\n )}\n </Form>\n );\n}\n\nexport const VisualPropertyForm = React.forwardRef(LegacyVisualPropertyForm);\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,mBAAmB,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SACEC,IAAI,EACJC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,KAAK,EACLC,MAAM,EACNC,YAAY,EACZC,KAAK,QACA,MAAM;AAEb,SAASC,eAAe,QAAQ,sBAAsB;AAEtD,SAASC,WAAW,QAAQ,6BAA6B;AACzD,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SACEC,KAAK,EACLC,IAAI,EACJC,UAAU,EACVC,OAAO,EAEPC,QAAQ,EACRC,IAAI,QACC,QAAQ;AACf,OAAOC,MAAM,MAAM,iCAAiC;A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Z,CAACL,mBAAmB,gBACnB,oBAAC,QAAQ;IACP,KAAK;IACL,gBAAgB,EAAEuH,SAAS,CAAC1G,GAAG,CAAC,CAACiH,CAAC,EAAEvG,KAAK,KAAKwG,MAAM,CAACxG,KAAK,CAAC,CAAE;IAC7D,SAAS,EAAE1D,MAAM,CAACmK,cAAe;IACjC,kBAAkB,EAAC;EAAM,GAExBT,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAE1G,GAAG,CAAC,OAAmBU,KAAK,KAAK;IAAA,IAA5B,CAAC0G,QAAQ,EAAEC,IAAI,CAAC;IAC/B,oBACE,oBAAC,QAAQ,CAAC,KAAK;MACb,MAAM,EAAEzK,UAAU,CAACwK,QAAQ,CAAE;MAC7B,GAAG,EAAE1G,KAAM;MACX,WAAW,EAAE;IAAK,GAEjB2G,IAAI,CAACrH,GAAG,CAAEC,IAAI,IAAKiG,WAAW,CAACjG,IAAI,CAAC,CAAC,CACvB;EAErB,CAAC,CAAC,eAEF,oBAAC,QAAQ,CAAC,KAAK;IACb,SAAS,EAAEjD,MAAM,CAACsK,UAAW;IAC7B,WAAW,EAAE,IAAK;IAClB,MAAM,EAAE1K,UAAU,CAACiB,qBAAqB,CAAE;IAC1C,GAAG,EAAEA;EAAsB,GAE1B2I,gBAAgB,EAAE,CACJ,CACR,gBAEX,0CACGhH,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEQ,GAAG,CAAEC,IAAI,IAAK;IACvB,OAAOiG,WAAW,CAACjG,IAAI,CAAC;EAC1B,CAAC,CAAC,eACF;IAAK,SAAS,EAAEjD,MAAM,CAACsK;EAAW,GAAEd,gBAAgB,EAAE,CAAO,CAEhE,CAEJ;AACH;AAEA,OAAO,IAAMe,kBAAkB,gBAAG9L,KAAK,CAAC+L,UAAU,CAAC/I,wBAAwB,CAAC"}
1
+ {"version":3,"file":"VisualPropertyForm.js","names":["React","useEffect","useImperativeHandle","useState","Form","Input","InputNumber","Select","Tooltip","Collapse","Empty","Switch","AutoComplete","Radio","Checkbox","useCurrentTheme","GeneralIcon","update","isNil","pick","upperFirst","isEmpty","isString","omit","styles","CodeEditorFormItem","IconSelectFormItem","ColorEditorItem","MenuEditorItem","ListEditor","ReactComponent","DarkEmpty","mergeProperties","calculateValue","groupByType","yamlStringify","yaml","OTHER_FORM_ITEM_FIELD","supportBasicType","supportMenuType","matchNoramlMenuValue","ItemModeType","Required","MessageEditor","ButtonTypeEmun","typeMatched","actualValue","selectedValue","type","LegacyVisualPropertyForm","props","ref","theme","projectId","labelIcon","propertyTypeList","brickProperties","brickInfo","emptyConfig","hiddenPropsCategory","menuSettingClick","childMountPointList","form","useForm","typeList","setTypeList","validateFields","resetPropertyFields","properties","restValue","resetFields","getCurTypeList","map","item","getFieldsValue","newTypeList","newValue","setFieldsValue","handleLabelClick","name","selected","find","index","findIndex","nextMode","mode","Advanced","Normal","value","getFieldValue","modeValueMap","includes","parsedValue","undefined","$splice","renderLabel","hideIcon","description","iconContainer","advanced","normal","renderEditorItem","required","True","jsonSchema","schemaRef","span","style","padding","editor","model","renderStringItem","message","editorProps","renderTextareaItem","renderSingleRadio","prop","handleRadioUncheck","e","target","formValue","changeValue","onValuesChange","options","icon","buttonIcon","mergedIcon","imgSrc","imgStyle","verticalAlign","fontSize","iconStyle","optionType","disabled","textAlign","flex","disableUnchek","label","paddingLeft","renderRadioItem","radioProps","radioGroup","display","renderBooleanItem","renderInputNumberItem","renderStringListItem","renderIconItem","renderMessageItem","renderCodeEditorItem","renderColorItem","renderMenuItem","renderGeneralOptipns","renderFormItem","renderCustomColumn","dataIndex","key","title","useChildren","filter","startsWith","endsWith","inputValue","option","children","toUpperCase","indexOf","renderCustomButtons","id","text","tooltip","eventName","buttonType","hide","isDivider","isDropdown","renderEnumItem","enumList","renderSelectItem","renderCheckboxItem","getFormItem","test","enums","emunList","replace","split","renderOthersItem","Infinity","gorupList","useMemo","empty","PRESENTED_IMAGE_SIMPLE","imageStyle","visualPropertyForm","minWidth","_","String","panelContainer","category","list","otherPanel","VisualPropertyForm","forwardRef"],"sources":["../../../src/visual-property-form/VisualPropertyForm.tsx"],"sourcesContent":["import React, { useEffect, useImperativeHandle, useState } from \"react\";\nimport {\n Form,\n Input,\n InputNumber,\n Select,\n Tooltip,\n Collapse,\n Empty,\n Switch,\n AutoComplete,\n Radio,\n Checkbox,\n} from \"antd\";\nimport { EmptyProps } from \"antd/lib/empty\";\nimport { useCurrentTheme } from \"@next-core/brick-kit\";\nimport { MenuIcon, SrcIcon } from \"@next-core/brick-types\";\nimport { GeneralIcon } from \"@next-libs/basic-components\";\nimport update from \"immutability-helper\";\nimport _, {\n isNil,\n pick,\n upperFirst,\n isEmpty,\n cloneDeep,\n isString,\n omit,\n} from \"lodash\";\nimport styles from \"./VisualPropertyForm.module.css\";\nimport { FormProps } from \"antd/lib/form\";\nimport { CodeEditorFormItem } from \"./components/CodeEditor/CodeEditorFormItem\";\nimport { IconSelectFormItem } from \"./components/IconSelect/IconSelectFormItem\";\nimport { ColorEditorItem } from \"./components/ColorEditor/ColorEditorItem\";\nimport { MenuEditorItem } from \"./components/MenuEditor/MenuEditorItem\";\nimport { ListEditor } from \"./components/ListEditor/ListEditor\";\nimport { ReactComponent as DarkEmpty } from \"./images/empty-dark.svg\";\nimport {\n mergeProperties,\n calculateValue,\n groupByType,\n yamlStringify,\n yaml,\n} from \"./processor\";\nimport {\n OTHER_FORM_ITEM_FIELD,\n supportBasicType,\n supportMenuType,\n} from \"./constant\";\nimport { matchNoramlMenuValue } from \"./processor\";\nimport {\n PropertyType,\n BrickProperties,\n visualFormUtils,\n ItemModeType,\n UnionPropertyType,\n Required,\n} from \"../interfaces\";\nimport { MessageEditor } from \"./components/MessageEditor/MessageEditor\";\nimport { options } from \"marked\";\nimport { GeneralOption } from \"@next-libs/forms\";\n\nconst ButtonTypeEmun = [\n \"link\",\n \"default\",\n \"primary\",\n \"ghost\",\n \"dashed\",\n \"icon\",\n \"text\",\n];\n\nexport type CustomColumn = {\n dataIndex: string;\n title: string;\n useChildren?: string;\n [k: string]: any;\n};\n\nexport type GeneralOptionProps = {\n label: string;\n value: string;\n disabled?: boolean;\n};\n\nexport type CustomButtonProps = {\n id: string;\n buttonType: string;\n eventName: string;\n text: string;\n tooltip: string;\n icon: MenuIcon;\n hide: boolean;\n disabled: boolean;\n isDivider: boolean;\n isDropdown: boolean;\n};\nexport interface VisualPropertyFormProps {\n projectId?: string;\n propertyTypeList: PropertyType[];\n labelIcon: {\n normal?: MenuIcon;\n advanced?: MenuIcon;\n };\n brickProperties: BrickProperties;\n onValuesChange?: FormProps[\"onValuesChange\"];\n brickInfo?: {\n type: \"brick\" | \"provider\" | \"template\";\n };\n emptyConfig?: EmptyProps;\n menuSettingClick?: () => void;\n hiddenPropsCategory?: boolean;\n childMountPointList?: string[];\n}\n\nexport function typeMatched(\n actualValue: any,\n selectedValue: UnionPropertyType\n): boolean {\n if (typeof actualValue === (selectedValue.type as string)) {\n return true;\n }\n // TODO: 补充更多的类型检查,例如 enum 等\n return false;\n}\nexport function LegacyVisualPropertyForm(\n props: VisualPropertyFormProps,\n ref: React.Ref<visualFormUtils>\n): React.ReactElement {\n const theme = useCurrentTheme();\n const {\n projectId,\n labelIcon,\n propertyTypeList,\n brickProperties,\n brickInfo,\n emptyConfig,\n hiddenPropsCategory,\n menuSettingClick,\n childMountPointList,\n } = props;\n const [form] = Form.useForm();\n const [typeList, setTypeList] = useState<UnionPropertyType[]>(\n mergeProperties(propertyTypeList, brickProperties)\n );\n\n useImperativeHandle(ref, () => ({\n validateFields: form.validateFields,\n resetPropertyFields: (\n typeList: PropertyType[],\n properties: BrickProperties\n ) => {\n const restValue = mergeProperties(typeList, properties);\n setTypeList(restValue);\n form.resetFields();\n },\n getCurTypeList: (): UnionPropertyType[] => {\n return typeList?.map((item) => pick(item, [\"name\", \"type\", \"mode\"]));\n },\n getFieldsValue: form.getFieldsValue,\n }));\n\n useEffect(() => {\n const newTypeList = mergeProperties(propertyTypeList, brickProperties);\n setTypeList(newTypeList);\n\n const newValue = calculateValue(\n propertyTypeList,\n brickProperties,\n newTypeList\n );\n form.resetFields();\n form.setFieldsValue(newValue);\n }, [propertyTypeList, brickProperties]);\n\n const handleLabelClick = (name: string): void => {\n const selected = typeList.find((item) => item.name === name);\n const index = typeList.findIndex((item) => item.name === name);\n const nextMode =\n selected.mode === ItemModeType.Advanced\n ? ItemModeType.Normal\n : ItemModeType.Advanced;\n selected.value = form.getFieldValue(selected.name);\n // 记录切换前的模式下的值\n selected.modeValueMap = {\n ...selected.modeValueMap,\n ...{ [selected.mode]: selected.value },\n };\n // let value = cloneDeep(selected.value);\n if (!isNil(selected.modeValueMap[nextMode])) {\n // 切换后的模式原本有值时,则用原本的值\n selected.value = selected.modeValueMap[nextMode];\n } else if (nextMode === ItemModeType.Normal) {\n // 切换到普通模式没有值时可以根据高级模式来更新值\n if (supportMenuType.includes(selected.type as string)) {\n selected.value = matchNoramlMenuValue(selected.value);\n } else if (supportBasicType.includes(selected.type as string)) {\n // yaml解析后检查下类型,不符合属性类型就不更新了\n const parsedValue = yaml(selected.value);\n if (typeMatched(parsedValue, selected)) {\n selected.value = parsedValue;\n } else {\n selected.value = undefined;\n }\n }\n } else {\n // 切换到高级模式没有值时可以根据普通模式来更新值\n if (isNil(selected.value)) {\n selected.value = \"\";\n } else if (isString(selected.value)) {\n // do nothing\n } else {\n selected.value = yamlStringify(selected.value);\n }\n }\n selected.modeValueMap[nextMode] = selected.value;\n form.setFieldsValue({\n [name]: selected.value,\n });\n const newTypeList = update(typeList, {\n $splice: [[index, 1, { ...selected, mode: nextMode }]],\n });\n setTypeList(newTypeList);\n };\n\n const renderLabel = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <span>\n <Tooltip title={item.description}>{item.name}</Tooltip>{\" \"}\n {!hideIcon && labelIcon && (\n <span\n className={styles.iconContainer}\n onClick={() => handleLabelClick(item.name)}\n >\n <GeneralIcon\n icon={\n item.mode === ItemModeType.Advanced\n ? labelIcon?.advanced\n : labelIcon.normal\n }\n />\n </span>\n )}\n </span>\n );\n };\n\n const renderEditorItem = (\n item: UnionPropertyType,\n hideIcon?: boolean\n ): React.ReactElement => {\n return (\n <CodeEditorFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, hideIcon) as any}\n required={item.required === Required.True}\n theme={theme === \"dark-v2\" ? \"monokai\" : \"tomorrow\"}\n jsonSchema={item?.jsonSchema}\n schemaRef={item?.schemaRef}\n showLineNumbers={true}\n showGutter={true}\n labelCol={{\n span: 24,\n style: {\n padding: 0,\n },\n }}\n wrapperCol={{\n span: 24,\n }}\n mode={\n (typeof item?.editor !== \"string\" && item?.editor?.model) ||\n \"brick_next_yaml\"\n }\n />\n );\n };\n\n const renderStringItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderTextareaItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Input.TextArea {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderSingleRadio = (item: UnionPropertyType) => {\n const { editorProps: prop, name } = item;\n\n const handleRadioUncheck = (e: any) => {\n const value = e?.target?.value;\n const formValue = form.getFieldsValue();\n const changeValue = {\n [name]: formValue[name] === value ? undefined : value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, formValue);\n };\n\n return prop.options?.map((item: any) => {\n const icon = item.icon;\n let buttonIcon: JSX.Element = null;\n if (icon) {\n if (\"imgSrc\" in icon) {\n const mergedIcon = {\n imgSrc: icon.imgSrc,\n imgStyle: {\n verticalAlign: \"-0.125em\",\n ...icon.imgStyle,\n },\n };\n buttonIcon = <GeneralIcon icon={mergedIcon} size={14} />;\n } else {\n buttonIcon = (\n <GeneralIcon\n icon={icon}\n style={{\n fontSize: \"14px\",\n ...icon.iconStyle,\n }}\n />\n );\n }\n }\n if (prop.optionType === \"button\") {\n return (\n <Radio.Button\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={{ textAlign: \"center\", flex: \"1 1 0\", ...item.style }}\n onClick={!prop?.disableUnchek ? handleRadioUncheck : () => null}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio.Button>\n );\n } else {\n return (\n <Radio\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n style={item.style}\n onClick={!prop?.disableUnchek ? handleRadioUncheck : () => null}\n >\n {buttonIcon}\n {item.label && (\n <span style={{ paddingLeft: \"5px\" }}>{item.label}</span>\n )}\n </Radio>\n );\n }\n });\n };\n\n const renderRadioItem = (item: UnionPropertyType): React.ReactElement => {\n const radioProps = omit(item.editorProps, \"options\");\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Radio.Group\n className={styles.radioGroup}\n style={\n item.editorProps.optionType === \"button\" ? { display: \"flex\" } : {}\n }\n {...(radioProps ?? {})}\n >\n {renderSingleRadio(item)}\n </Radio.Group>\n </Form.Item>\n );\n };\n\n const renderBooleanItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n valuePropName=\"checked\"\n >\n <Switch\n defaultChecked={props.brickProperties[item.name]}\n {...(item.editorProps ?? {})}\n />\n </Form.Item>\n );\n };\n\n const renderInputNumberItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <InputNumber {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderStringListItem = (\n item: UnionPropertyType\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select mode=\"tags\" {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderIconItem = (item: UnionPropertyType): React.ReactElement => {\n return (\n <IconSelectFormItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true) as any}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMessageItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MessageEditor\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n value={item.value}\n required={item.required === Required.True}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCodeEditorItem = (item: PropertyType): React.ReactElement => {\n return renderEditorItem(item, true);\n };\n\n const renderColorItem = (item: PropertyType): React.ReactElement => {\n return (\n <ColorEditorItem\n key={item.name}\n name={item.name}\n label={renderLabel(item, true)}\n required={item.required === Required.True}\n />\n );\n };\n\n const renderMenuItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <MenuEditorItem\n projectId={projectId}\n key={item.name}\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n menuSettingClick={menuSettingClick}\n />\n );\n };\n\n const renderGeneralOptipns = (\n item: UnionPropertyType\n ): React.ReactElement => {\n const renderFormItem = (item: GeneralOptionProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"label\" label=\"label\">\n <Input defaultValue={item.label} />\n </Form.Item>\n <Form.Item name=\"value\" label=\"value\">\n <Input defaultValue={item.value} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"label\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n label: value,\n value: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomColumn = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomColumn): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"dataIndex\" label=\"dataIndex\">\n <Input defaultValue={item.dataIndex} />\n </Form.Item>\n <Form.Item name=\"key\" label=\"key\">\n <Input defaultValue={item.key} />\n </Form.Item>\n <Form.Item name=\"title\" label=\"title\">\n <Input defaultValue={item.title} />\n </Form.Item>\n <Form.Item\n name=\"useChildren\"\n label=\"useChildren\"\n tooltip=\"useBrick代替用法,数据来源于子插槽名称,并且插槽名称必须使用'[]'包裹\"\n >\n <AutoComplete\n defaultValue={item.useChildren}\n dataSource={(childMountPointList ?? []).filter(\n (item) => item.startsWith(\"[\") && item.endsWith(\"]\")\n )}\n filterOption={(inputValue, option) =>\n option.props.children\n .toUpperCase()\n .indexOf(inputValue.toUpperCase()) !== -1\n }\n />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"title\"\n getDefaultItem={(value: any) => ({\n dataIndex: value,\n title: value,\n key: value,\n })}\n renderFormItem={renderFormItem}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderCustomButtons = (item: UnionPropertyType): React.ReactElement => {\n const renderFormItem = (item: CustomButtonProps): React.ReactElement => {\n return (\n <>\n <Form.Item name=\"id\" label=\"id\">\n <Input defaultValue={item.id} />\n </Form.Item>\n <Form.Item name=\"text\" label=\"text\">\n <Input defaultValue={item.text} />\n </Form.Item>\n <Form.Item name=\"tooltip\" label=\"tooltip\">\n <Input defaultValue={item.tooltip} />\n </Form.Item>\n <Form.Item name=\"eventName\" label=\"eventName\">\n <Input defaultValue={item.eventName} />\n </Form.Item>\n <IconSelectFormItem name=\"icon\" label=\"icon\" />\n <Form.Item name=\"buttonType\" label=\"buttonType\">\n <Select defaultValue={item.buttonType}>\n {ButtonTypeEmun.map((item) => (\n <Select.Option key={item} value={item}>\n {item}\n </Select.Option>\n ))}\n </Select>\n </Form.Item>\n <Form.Item name=\"hide\" label=\"hide\">\n <Switch checked={item.hide} />\n </Form.Item>\n <Form.Item name=\"disabled\" label=\"disabled\">\n <Switch checked={item.disabled} />\n </Form.Item>\n <Form.Item name=\"isDivider\" label=\"isDivider\">\n <Switch checked={item.isDivider} />\n </Form.Item>\n <Form.Item name=\"isDropdown\" label=\"isDropdown\">\n <Switch checked={item.isDropdown} />\n </Form.Item>\n </>\n );\n };\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <ListEditor\n name={item.name}\n label={renderLabel(item)}\n required={item.required === Required.True}\n value={brickProperties[item.name]}\n listItemKey=\"text\"\n renderFormItem={renderFormItem}\n getDefaultItem={(value: any) => ({\n text: value,\n })}\n onChange={(value) => {\n const changeValue = {\n [item.name]: value,\n };\n form.setFieldsValue(changeValue);\n props.onValuesChange(changeValue, form.getFieldsValue());\n }}\n />\n );\n };\n\n const renderEnumItem = (\n item: UnionPropertyType,\n enumList: string[]\n ): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select\n options={enumList.map((item) => ({ label: item, value: item }))}\n />\n </Form.Item>\n );\n };\n\n const renderSelectItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Select {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const renderCheckboxItem = (item: UnionPropertyType): React.ReactElement => {\n return item.mode === ItemModeType.Advanced ? (\n renderEditorItem(item)\n ) : (\n <Form.Item\n key={item.name}\n label={renderLabel(item)}\n name={item.name}\n rules={[\n {\n required: item.required === Required.True,\n message: `请输入${item.name}`,\n },\n ]}\n >\n <Checkbox.Group {...(item.editorProps ?? {})} />\n </Form.Item>\n );\n };\n\n const getFormItem = (item: PropertyType): React.ReactElement => {\n // todo(sailor): update unit text\n switch (item.editor) {\n case \"input\":\n return renderStringItem(item);\n case \"radio\":\n return renderRadioItem(item);\n case \"switch\":\n return renderBooleanItem(item);\n case \"color\":\n return renderColorItem(item);\n case \"icon\":\n return renderIconItem(item);\n case \"message\":\n return renderMessageItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"textarea\":\n return renderTextareaItem(item);\n case \"select\":\n return renderSelectItem(item);\n case \"checkbox\":\n return renderCheckboxItem(item);\n case \"code\":\n return renderCodeEditorItem(item);\n }\n if (/true|false/.test(item.type as string)) {\n return renderBooleanItem(item);\n }\n if (item.enums) {\n const emunList = (item.enums as string).replace(/\"|'/g, \"\").split(\"|\");\n return renderEnumItem(item, emunList);\n }\n switch (item.type) {\n case \"string\":\n return renderStringItem(item);\n case \"string[]\":\n return renderStringListItem(item);\n case \"number\":\n return renderInputNumberItem(item);\n case \"boolean\":\n return renderBooleanItem(item);\n case \"MenuIcon\":\n return renderIconItem(item);\n case \"Color\":\n return renderColorItem(item);\n case \"Menu\":\n case \"SidebarSubMenu\":\n return renderMenuItem(item);\n // todo(sailor): update unit text\n case \"GeneralOption[]\":\n return renderGeneralOptipns(item);\n case \"CustomColumn[]\":\n return renderCustomColumn(item);\n case \"CustomButton[]\":\n return renderCustomButtons(item);\n default:\n return renderCodeEditorItem(item);\n }\n };\n\n const renderOthersItem = (): React.ReactElement => {\n return (\n <CodeEditorFormItem\n name={OTHER_FORM_ITEM_FIELD}\n label={\n brickInfo?.type === \"template\" ? \"other params\" : \"other properties\"\n }\n mode=\"brick_next_yaml\"\n maxLines={Infinity}\n />\n );\n };\n\n const gorupList = React.useMemo(() => {\n return groupByType(typeList);\n }, [typeList]);\n\n return isEmpty(typeList) ? (\n <Empty\n className={styles.empty}\n description={emptyConfig?.description}\n image={theme === \"dark-v2\" ? <DarkEmpty /> : Empty.PRESENTED_IMAGE_SIMPLE}\n imageStyle={emptyConfig?.imageStyle}\n />\n ) : (\n <Form\n className={styles.visualPropertyForm}\n name=\"propertyForm\"\n layout=\"horizontal\"\n labelAlign=\"left\"\n labelCol={{\n span: 8,\n style: {\n minWidth: \"120px\",\n },\n }}\n wrapperCol={{ span: 16 }}\n size=\"small\"\n form={form}\n onValuesChange={props.onValuesChange}\n initialValues={calculateValue(\n propertyTypeList,\n brickProperties,\n typeList\n )}\n colon={false}\n >\n {!hiddenPropsCategory ? (\n <Collapse\n ghost\n defaultActiveKey={gorupList.map((_, index) => String(index))}\n className={styles.panelContainer}\n expandIconPosition=\"left\"\n >\n {gorupList?.map(([category, list], index) => {\n return (\n <Collapse.Panel\n header={upperFirst(category)}\n key={index}\n forceRender={true}\n >\n {list.map((item) => getFormItem(item))}\n </Collapse.Panel>\n );\n })}\n\n <Collapse.Panel\n className={styles.otherPanel}\n forceRender={true}\n header={upperFirst(OTHER_FORM_ITEM_FIELD)}\n key={OTHER_FORM_ITEM_FIELD}\n >\n {renderOthersItem()}\n </Collapse.Panel>\n </Collapse>\n ) : (\n <>\n {typeList?.map((item) => {\n return getFormItem(item);\n })}\n <div className={styles.otherPanel}>{renderOthersItem()}</div>\n </>\n )}\n </Form>\n );\n}\n\nexport const VisualPropertyForm = React.forwardRef(LegacyVisualPropertyForm);\n"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,mBAAmB,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SACEC,IAAI,EACJC,KAAK,EACLC,WAAW,EACXC,MAAM,EACNC,OAAO,EACPC,QAAQ,EACRC,KAAK,EACLC,MAAM,EACNC,YAAY,EACZC,KAAK,EACLC,QAAQ,QACH,MAAM;AAEb,SAASC,eAAe,QAAQ,sBAAsB;AAEtD,SAASC,WAAW,QAAQ,6BAA6B;AACzD,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SACEC,KAAK,EACLC,IAAI,EACJC,UAAU,EACVC,OAAO,EAEPC,QAAQ,EACRC,IAAI,QACC,QAAQ;AACf,OAAOC,MAAM,MAAM,iCAAiC;AAEpD,SAASC,kBAAkB,QAAQ,4CAA4C;AAC/E,SAASC,kBAAkB,QAAQ,4CAA4C;AAC/E,SAASC,eAAe,QAAQ,0CAA0C;AAC1E,SAASC,cAAc,QAAQ,wCAAwC;AACvE,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,cAAc,IAAIC,SAAS,QAAQ,yBAAyB;AACrE,SACEC,eAAe,EACfC,cAAc,EACdC,WAAW,EACXC,aAAa,EACbC,IAAI,QACC,aAAa;AAC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AAC,CAAC0H,CAAC,EAAEhH,KAAK,KAAKiH,MAAM,CAACjH,KAAK,CAAC,CAAE;IAC7D,SAAS,EAAE1D,MAAM,CAAC4K,cAAe;IACjC,kBAAkB,EAAC;EAAM,GAExBT,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEnH,GAAG,CAAC,OAAmBU,KAAK,KAAK;IAAA,IAA5B,CAACmH,QAAQ,EAAEC,IAAI,CAAC;IAC/B,oBACE,oBAAC,QAAQ,CAAC,KAAK;MACb,MAAM,EAAElL,UAAU,CAACiL,QAAQ,CAAE;MAC7B,GAAG,EAAEnH,KAAM;MACX,WAAW,EAAE;IAAK,GAEjBoH,IAAI,CAAC9H,GAAG,CAAEC,IAAI,IAAK0G,WAAW,CAAC1G,IAAI,CAAC,CAAC,CACvB;EAErB,CAAC,CAAC,eAEF,oBAAC,QAAQ,CAAC,KAAK;IACb,SAAS,EAAEjD,MAAM,CAAC+K,UAAW;IAC7B,WAAW,EAAE,IAAK;IAClB,MAAM,EAAEnL,UAAU,CAACiB,qBAAqB,CAAE;IAC1C,GAAG,EAAEA;EAAsB,GAE1BoJ,gBAAgB,EAAE,CACJ,CACR,gBAEX,0CACGzH,QAAQ,aAARA,QAAQ,uBAARA,QAAQ,CAAEQ,GAAG,CAAEC,IAAI,IAAK;IACvB,OAAO0G,WAAW,CAAC1G,IAAI,CAAC;EAC1B,CAAC,CAAC,eACF;IAAK,SAAS,EAAEjD,MAAM,CAAC+K;EAAW,GAAEd,gBAAgB,EAAE,CAAO,CAEhE,CAEJ;AACH;AAEA,OAAO,IAAMe,kBAAkB,gBAAGxM,KAAK,CAACyM,UAAU,CAACxJ,wBAAwB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-libs/visual-builder",
3
- "version": "1.7.1",
3
+ "version": "1.9.0",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "https://github.com/easyops-cn/next-libs/tree/master/libs/visual-builder",
6
6
  "license": "GPL-3.0",
@@ -35,5 +35,5 @@
35
35
  "@types/react-color": "^3.0.6",
36
36
  "react-color": "^2.19.3"
37
37
  },
38
- "gitHead": "fe93d47c759a2baf8532d9f24c2343d7a27d9937"
38
+ "gitHead": "776f6a8b6a17da59a519c3d333f132048166e3d3"
39
39
  }