cnhis-design-vue 3.1.16-beta.8 → 3.1.16-beta.9

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.
Files changed (27) hide show
  1. package/es/packages/big-table/index.d.ts +1 -1
  2. package/es/packages/big-table/src/BigTable.vue.d.ts +2 -23
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +4 -2
  4. package/es/packages/big-table/src/hooks/useAnchor.d.ts +1 -1
  5. package/es/packages/big-table/src/hooks/useAnchor.js +20 -12
  6. package/es/packages/form-config/index.d.ts +77 -3330
  7. package/es/packages/form-config/src/FormConfig.js +42 -34
  8. package/es/packages/form-config/src/FormConfig.vue.d.ts +121 -3374
  9. package/es/packages/form-config/src/components/FormConfigCreator.js +13 -11
  10. package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +10 -7
  11. package/es/packages/form-config/src/components/FormConfigEdit.js +1 -1
  12. package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +56 -28
  13. package/es/packages/form-config/src/constants/index.d.ts +20 -20
  14. package/es/packages/form-config/src/constants/index.js +27 -36
  15. package/es/packages/form-config/src/hooks/useConfigurationField.d.ts +2 -1
  16. package/es/packages/form-config/src/hooks/useConfigurationField.js +28 -42
  17. package/es/packages/form-config/src/hooks/usePresetRenderer.d.ts +2 -3
  18. package/es/packages/form-config/src/hooks/usePresetRenderer.js +16 -19
  19. package/es/packages/form-config/src/hooks/useSortable.js +1 -1
  20. package/es/packages/form-config/src/types/index.d.ts +21 -4
  21. package/es/packages/form-config/src/utils/index.d.ts +2 -0
  22. package/es/packages/form-config/src/utils/index.js +15 -0
  23. package/es/packages/form-config/style/index.css +26 -2
  24. package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +5 -2
  25. package/es/packages/index.css +26 -2
  26. package/global.d.ts +8 -8
  27. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createVNode, createTextVNode } from 'vue';
2
+ import { pick } from 'lodash-es';
2
3
  import { NButtonGroup, NPopconfirm, NButton } from 'naive-ui';
3
4
  import { EditAbleField } from '../../../../packages/form-config/src/constants';
4
5
  import { useConfigurationField } from '../../../../packages/form-config/src/hooks/useConfigurationField';
@@ -15,20 +16,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
15
16
  },
16
17
  setup(__props, { emit }) {
17
18
  const linebarField = useConfigurationField().generateFieldListByKeys([
18
- EditAbleField.ALIAS,
19
- EditAbleField.ELEM_WIDTH,
20
- EditAbleField.IS_SHOW,
21
- EditAbleField.IS_NOT_FOLD
19
+ EditAbleField.NAME,
20
+ EditAbleField.LAYOUT_WIDTH_ENUM,
21
+ EditAbleField.DEFAULT_EXPAND,
22
+ EditAbleField.FOLD
22
23
  ]);
23
24
  const linebarFormRef = ref();
24
25
  const lineBreakFormRef = ref();
25
- const initialData = { is_show: "1", is_not_fold: "0" };
26
- async function submit(html_type, formRef) {
26
+ const initialData = { defaultExpand: true, fold: true, layoutWidthEnum: "ALL_LINE" };
27
+ async function submit(type, formRef) {
27
28
  if (!formRef)
28
29
  return;
29
30
  await formRef.validate();
30
31
  const formData = formRef.getFormValues();
31
- emit("submit", { ...formData, html_type, val_key: formData.alias, elem_width: 12 });
32
+ emit("submit", { layoutWidthEnum: "ALL_LINE", ...formData, type, key: formData.name });
32
33
  }
33
34
  return (_ctx, _cache) => {
34
35
  return openBlock(), createBlock(unref(NButtonGroup), { size: "small" }, {
@@ -37,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
38
  width: "200px",
38
39
  "show-icon": false,
39
40
  "show-arrow": false,
40
- onPositiveClick: _cache[0] || (_cache[0] = ($event) => submit("LINE_BREAKS", lineBreakFormRef.value))
41
+ onPositiveClick: _cache[0] || (_cache[0] = ($event) => submit("NEWLINE", lineBreakFormRef.value))
41
42
  }, {
42
43
  trigger: withCtx(() => [
43
44
  createVNode(unref(NButton), null, {
@@ -51,11 +52,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
52
  createVNode(unref(FormRender), {
52
53
  ref_key: "lineBreakFormRef",
53
54
  ref: lineBreakFormRef,
55
+ "initial-data": unref(pick)(initialData, ["layoutWidthEnum"]),
54
56
  size: "small",
55
57
  "label-width": "auto",
56
58
  "label-placement": "left",
57
- fieldList: unref(linebarField).slice(0, 1)
58
- }, null, 8, ["fieldList"])
59
+ fieldList: unref(linebarField).slice(0, 2)
60
+ }, null, 8, ["initial-data", "fieldList"])
59
61
  ]),
60
62
  _: 1
61
63
  }),
@@ -63,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
63
65
  width: "300px",
64
66
  "show-icon": false,
65
67
  "show-arrow": false,
66
- onPositiveClick: _cache[1] || (_cache[1] = ($event) => submit("LINEBAR", linebarFormRef.value))
68
+ onPositiveClick: _cache[1] || (_cache[1] = ($event) => submit("LINE_BAR", linebarFormRef.value))
67
69
  }, {
68
70
  trigger: withCtx(() => [
69
71
  createVNode(unref(NButton), null, {
@@ -1,15 +1,18 @@
1
1
  /// <reference types="lodash" />
2
+ /// <reference types="lodash" />
2
3
  import { FieldItem, FormRenderExpose } from '../../../../../es/packages/form-render';
4
+ import { FormConfigItem } from '../../..';
3
5
  declare const _default: import("vue").DefineComponent<{}, {
4
6
  linebarField: FieldItem[];
5
7
  linebarFormRef: import("vue").Ref<FormRenderExpose | undefined>;
6
8
  lineBreakFormRef: import("vue").Ref<FormRenderExpose | undefined>;
7
- initialData: {
8
- is_show: string;
9
- is_not_fold: string;
9
+ initialData: Partial<FormConfigItem>;
10
+ emit: (event: "submit", payload: FormConfigItem) => void;
11
+ submit: (type: string, formRef?: FormRenderExpose) => Promise<void>;
12
+ pick: {
13
+ <T extends object, U extends keyof T>(object: T, ...props: import("lodash").Many<U>[]): Pick<T, U>;
14
+ <T_1>(object: T_1 | null | undefined, ...props: import("lodash").PropertyPath[]): Partial<T_1>;
10
15
  };
11
- emit: (event: "submit", payload: FieldItem) => void;
12
- submit: (html_type: string, formRef?: FormRenderExpose) => Promise<void>;
13
16
  NButton: import("vue").DefineComponent<{
14
17
  readonly color: StringConstructor;
15
18
  readonly textColor: StringConstructor;
@@ -5085,8 +5088,8 @@ declare const _default: import("vue").DefineComponent<{}, {
5085
5088
  consumer: boolean;
5086
5089
  }>>;
5087
5090
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5088
- submit: (payload: FieldItem) => FieldItem;
5091
+ submit: (payload: FormConfigItem) => FormConfigItem;
5089
5092
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
5090
- onSubmit?: ((payload: FieldItem) => any) | undefined;
5093
+ onSubmit?: ((payload: FormConfigItem) => any) | undefined;
5091
5094
  }, {}>;
5092
5095
  export default _default;
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
35
35
  }
36
36
  }
37
37
  prevOldField = field;
38
- initialData.value = { is_edit: "1", ...cloneDeep(toRaw(field)) };
38
+ initialData.value = { editable: true, ...cloneDeep(toRaw(field)) };
39
39
  fieldList.value = generateFieldListByFieldItem(field);
40
40
  key.value++;
41
41
  }, { immediate: true });
@@ -1,11 +1,11 @@
1
1
  /// <reference types="lodash" />
2
- import { AnyObject } from '../../../../../es/src/types';
3
2
  import { nextTick } from 'vue';
4
3
  import { FieldItem, FormChangePayload, FormRenderExpose } from '../../../../../es/packages/form-render';
4
+ import { FormConfigItem } from '../../../../../es/packages/index';
5
5
  declare const _default: import("vue").DefineComponent<{}, {
6
6
  key: import("vue").Ref<number>;
7
7
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
8
- currentActiveField: import("vue").Ref<import("../../../../../es/src/types").WithUndefined<FieldItem>>;
8
+ currentActiveField: import("vue").Ref<import("../../../../../es/src/types").WithUndefined<FormConfigItem>>;
9
9
  fieldList: import("vue").Ref<{
10
10
  [x: string]: any;
11
11
  val_key: string;
@@ -80,7 +80,7 @@ declare const _default: import("vue").DefineComponent<{}, {
80
80
  method?: import("../../../../../es/packages/form-render").FormRequestType | undefined;
81
81
  nameKey?: string | undefined;
82
82
  valueKey?: string | undefined;
83
- params?: AnyObject | undefined;
83
+ params?: import("../../../../../es/src/types").AnyObject | undefined;
84
84
  dependKey?: string | Record<string, string> | (string | {
85
85
  paramName: string;
86
86
  paramValue?: string | undefined;
@@ -94,8 +94,8 @@ declare const _default: import("vue").DefineComponent<{}, {
94
94
  maxGroupNum?: number | undefined;
95
95
  children?: any[] | undefined;
96
96
  properties?: any[] | undefined;
97
- componentProps?: AnyObject | undefined;
98
- decoratorProps?: AnyObject | undefined;
97
+ componentProps?: import("../../../../../es/src/types").AnyObject | undefined;
98
+ decoratorProps?: import("../../../../../es/src/types").AnyObject | undefined;
99
99
  noDecorator?: {
100
100
  valueOf: () => boolean;
101
101
  } | undefined;
@@ -1637,11 +1637,11 @@ declare const _default: import("vue").DefineComponent<{}, {
1637
1637
  target?: string | undefined;
1638
1638
  when?: string | boolean | undefined;
1639
1639
  fulfill?: {
1640
- state?: AnyObject | undefined;
1640
+ state?: import("../../../../../es/src/types").AnyObject | undefined;
1641
1641
  run?: string | undefined;
1642
1642
  } | undefined;
1643
1643
  otherwise?: {
1644
- state?: AnyObject | undefined;
1644
+ state?: import("../../../../../es/src/types").AnyObject | undefined;
1645
1645
  run?: string | undefined;
1646
1646
  } | undefined;
1647
1647
  } | {
@@ -1650,17 +1650,45 @@ declare const _default: import("vue").DefineComponent<{}, {
1650
1650
  target?: string | undefined;
1651
1651
  when?: string | boolean | undefined;
1652
1652
  fulfill?: {
1653
- state?: AnyObject | undefined;
1653
+ state?: import("../../../../../es/src/types").AnyObject | undefined;
1654
1654
  run?: string | undefined;
1655
1655
  } | undefined;
1656
1656
  otherwise?: {
1657
- state?: AnyObject | undefined;
1657
+ state?: import("../../../../../es/src/types").AnyObject | undefined;
1658
1658
  run?: string | undefined;
1659
1659
  } | undefined;
1660
1660
  }[] | undefined;
1661
1661
  }[]>;
1662
- initialData: import("vue").Ref<AnyObject>;
1663
- generateFieldListByFieldItem: (fieldItem: FieldItem) => FieldItem[];
1662
+ initialData: import("vue").Ref<{
1663
+ key?: string | undefined;
1664
+ layoutWidthEnum?: import("../../../../../es/packages/index").FormConfigWidth | undefined;
1665
+ type?: string | undefined;
1666
+ name?: string | undefined;
1667
+ show?: boolean | undefined;
1668
+ defaultValue?: any;
1669
+ defaultExpand?: boolean | undefined;
1670
+ fold?: boolean | undefined;
1671
+ required?: boolean | undefined;
1672
+ editable?: boolean | undefined;
1673
+ notes?: string | undefined;
1674
+ desc?: string | undefined;
1675
+ children?: {
1676
+ key: string;
1677
+ layoutWidthEnum: import("../../../../../es/packages/index").FormConfigWidth;
1678
+ type: string;
1679
+ name: string;
1680
+ show?: boolean | undefined;
1681
+ defaultValue?: any;
1682
+ defaultExpand?: boolean | undefined;
1683
+ fold?: boolean | undefined;
1684
+ required?: boolean | undefined;
1685
+ editable?: boolean | undefined;
1686
+ notes?: string | undefined;
1687
+ desc?: string | undefined;
1688
+ children?: any[] | undefined;
1689
+ }[] | undefined;
1690
+ }>;
1691
+ generateFieldListByFieldItem: (fieldItem: FormConfigItem) => FieldItem[];
1664
1692
  showModal: import("vue").Ref<boolean>;
1665
1693
  onPositiveClick: () => Promise<void>;
1666
1694
  prevOldField: null;
@@ -3594,7 +3622,7 @@ declare const _default: import("vue").DefineComponent<{}, {
3594
3622
  type: import("vue").PropType<FieldItem[]>;
3595
3623
  };
3596
3624
  initialData: {
3597
- type: import("vue").PropType<AnyObject>;
3625
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3598
3626
  default: () => {};
3599
3627
  };
3600
3628
  fieldVisitor: {
@@ -3683,11 +3711,11 @@ declare const _default: import("vue").DefineComponent<{}, {
3683
3711
  default: () => {};
3684
3712
  };
3685
3713
  scope: {
3686
- type: import("vue").PropType<AnyObject>;
3714
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3687
3715
  default: () => {};
3688
3716
  };
3689
3717
  annotation: {
3690
- type: import("vue").PropType<AnyObject>;
3718
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3691
3719
  };
3692
3720
  consumer: {
3693
3721
  type: BooleanConstructor;
@@ -3699,8 +3727,8 @@ declare const _default: import("vue").DefineComponent<{}, {
3699
3727
  lifeCycle: {
3700
3728
  type: import("vue").PropType<Partial<{
3701
3729
  onSetup(): void;
3702
- beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<AnyObject>;
3703
- afterRequest(fieldKey: string, payload?: any): AnyObject[];
3730
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<import("../../../../../es/src/types").AnyObject>;
3731
+ afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
3704
3732
  }>>;
3705
3733
  };
3706
3734
  }, {
@@ -3709,7 +3737,7 @@ declare const _default: import("vue").DefineComponent<{}, {
3709
3737
  type: import("vue").PropType<FieldItem[]>;
3710
3738
  };
3711
3739
  initialData: {
3712
- type: import("vue").PropType<AnyObject>;
3740
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3713
3741
  default: () => {};
3714
3742
  };
3715
3743
  fieldVisitor: {
@@ -3798,11 +3826,11 @@ declare const _default: import("vue").DefineComponent<{}, {
3798
3826
  default: () => {};
3799
3827
  };
3800
3828
  scope: {
3801
- type: import("vue").PropType<AnyObject>;
3829
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3802
3830
  default: () => {};
3803
3831
  };
3804
3832
  annotation: {
3805
- type: import("vue").PropType<AnyObject>;
3833
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
3806
3834
  };
3807
3835
  consumer: {
3808
3836
  type: BooleanConstructor;
@@ -3814,8 +3842,8 @@ declare const _default: import("vue").DefineComponent<{}, {
3814
3842
  lifeCycle: {
3815
3843
  type: import("vue").PropType<Partial<{
3816
3844
  onSetup(): void;
3817
- beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<AnyObject>;
3818
- afterRequest(fieldKey: string, payload?: any): AnyObject[];
3845
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<import("../../../../../es/src/types").AnyObject>;
3846
+ afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
3819
3847
  }>>;
3820
3848
  };
3821
3849
  }>> & {
@@ -5209,7 +5237,7 @@ declare const _default: import("vue").DefineComponent<{}, {
5209
5237
  type: import("vue").PropType<FieldItem[]>;
5210
5238
  };
5211
5239
  initialData: {
5212
- type: import("vue").PropType<AnyObject>;
5240
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
5213
5241
  default: () => {};
5214
5242
  };
5215
5243
  fieldVisitor: {
@@ -5298,11 +5326,11 @@ declare const _default: import("vue").DefineComponent<{}, {
5298
5326
  default: () => {};
5299
5327
  };
5300
5328
  scope: {
5301
- type: import("vue").PropType<AnyObject>;
5329
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
5302
5330
  default: () => {};
5303
5331
  };
5304
5332
  annotation: {
5305
- type: import("vue").PropType<AnyObject>;
5333
+ type: import("vue").PropType<import("../../../../../es/src/types").AnyObject>;
5306
5334
  };
5307
5335
  consumer: {
5308
5336
  type: BooleanConstructor;
@@ -5314,8 +5342,8 @@ declare const _default: import("vue").DefineComponent<{}, {
5314
5342
  lifeCycle: {
5315
5343
  type: import("vue").PropType<Partial<{
5316
5344
  onSetup(): void;
5317
- beforeRequest(fieldKey: string, params?: AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<AnyObject>;
5318
- afterRequest(fieldKey: string, payload?: any): AnyObject[];
5345
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/src/types").AnyObject | undefined): void | import("../../../../../es/src/types").WithUndefined<import("../../../../../es/src/types").AnyObject>;
5346
+ afterRequest(fieldKey: string, payload?: any): import("../../../../../es/src/types").AnyObject[];
5319
5347
  }>>;
5320
5348
  };
5321
5349
  }>> & {
@@ -5325,9 +5353,9 @@ declare const _default: import("vue").DefineComponent<{}, {
5325
5353
  maxHeight: string | number;
5326
5354
  column: number;
5327
5355
  components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
5328
- initialData: AnyObject;
5356
+ initialData: import("../../../../../es/src/types").AnyObject;
5329
5357
  parallelism: number;
5330
- scope: AnyObject;
5358
+ scope: import("../../../../../es/src/types").AnyObject;
5331
5359
  consumer: boolean;
5332
5360
  }>>;
5333
5361
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
@@ -1,62 +1,62 @@
1
1
  import { WithUndefined } from '../../../../../es/src/types';
2
2
  import { InjectionKey, Ref } from 'vue';
3
- import { FieldItem } from '../../../../../es/packages/form-render';
3
+ import { FormConfigItem } from '../../../../../es/packages/form-config';
4
4
  export declare const WidgetTextMap: Map<string, string>;
5
5
  export declare enum EditAbleField {
6
- ALIAS = "alias",
7
- TIP = "tip",
8
- DEFAULT_VAL = "default_val",
9
- ELEM_WIDTH = "elem_width",
10
- PLACEHOLDER = "placeholder",
11
- IS_SHOW = "is_show",
12
- IS_NOT_FOLD = "is_not_fold",
13
- IS_NULL = "is_null",
14
- IS_EDIT = "is_edit"
6
+ NAME = "name",
7
+ NOTES = "notes",
8
+ DEFAULT_VALUE = "defaultValue",
9
+ LAYOUT_WIDTH_ENUM = "layoutWidthEnum",
10
+ DESC = "desc",
11
+ DEFAULT_EXPAND = "defaultExpand",
12
+ FOLD = "fold",
13
+ REQUIRED = "required",
14
+ EDITABLE = "editable"
15
15
  }
16
16
  export declare function widgetWidthOptionConfig(): {
17
17
  option: {
18
18
  text: string;
19
- value: number;
19
+ value: string;
20
20
  }[];
21
21
  };
22
22
  export declare function isShowOptionConfig(): {
23
23
  open: {
24
24
  describe: string;
25
- value: string;
25
+ value: boolean;
26
26
  };
27
27
  close: {
28
28
  describe: string;
29
- value: string;
29
+ value: boolean;
30
30
  };
31
31
  };
32
32
  export declare function isNotFoldOptionConfig(): {
33
33
  open: {
34
34
  describe: string;
35
- value: string;
35
+ value: boolean;
36
36
  };
37
37
  close: {
38
38
  describe: string;
39
- value: string;
39
+ value: boolean;
40
40
  };
41
41
  };
42
42
  export declare function isEditOptionConfig(): {
43
43
  open: {
44
44
  describe: string;
45
- value: string;
45
+ value: boolean;
46
46
  };
47
47
  close: {
48
48
  describe: string;
49
- value: string;
49
+ value: boolean;
50
50
  };
51
51
  };
52
52
  export declare function isNullOptionConfig(): {
53
53
  open: {
54
54
  describe: string;
55
- value: string;
55
+ value: boolean;
56
56
  };
57
57
  close: {
58
58
  describe: string;
59
- value: string;
59
+ value: boolean;
60
60
  };
61
61
  };
62
- export declare const InjectionActiveFieldItem: InjectionKey<Ref<WithUndefined<FieldItem>>>;
62
+ export declare const InjectionActiveFieldItem: InjectionKey<Ref<WithUndefined<FormConfigItem>>>;
@@ -1,64 +1,55 @@
1
1
  const WidgetTextMap = /* @__PURE__ */ new Map([
2
- ["INPUT", "\u8F93\u5165\u6846"],
3
- ["SELECT", "\u4E0B\u62C9\u6846"],
4
- ["TEXTAREA", "\u6587\u672C\u57DF"],
5
- ["CASCADER", "\u7EA7\u8054\u4E0B\u62C9\u6846"],
6
- ["SWITCH", "\u5F00\u5173"],
7
- ["RADIO", "\u5355\u9009"],
8
- ["TEXT", "\u6587\u672C"],
9
- ["BUTTON", "\u6309\u94AE"],
10
- ["CHECKBOX", "\u591A\u9009"],
11
- ["LINEBAR", "\u5206\u884C\u7B26"],
12
- ["LINE_BREAKS", "\u5206\u7EBF\u680F"]
2
+ ["LINE_BAR", "\u5206\u7EBF\u680F"],
3
+ ["NEWLINE", "\u5206\u884C\u7B26"]
13
4
  ]);
14
5
  var EditAbleField = /* @__PURE__ */ ((EditAbleField2) => {
15
- EditAbleField2["ALIAS"] = "alias";
16
- EditAbleField2["TIP"] = "tip";
17
- EditAbleField2["DEFAULT_VAL"] = "default_val";
18
- EditAbleField2["ELEM_WIDTH"] = "elem_width";
19
- EditAbleField2["PLACEHOLDER"] = "placeholder";
20
- EditAbleField2["IS_SHOW"] = "is_show";
21
- EditAbleField2["IS_NOT_FOLD"] = "is_not_fold";
22
- EditAbleField2["IS_NULL"] = "is_null";
23
- EditAbleField2["IS_EDIT"] = "is_edit";
6
+ EditAbleField2["NAME"] = "name";
7
+ EditAbleField2["NOTES"] = "notes";
8
+ EditAbleField2["DEFAULT_VALUE"] = "defaultValue";
9
+ EditAbleField2["LAYOUT_WIDTH_ENUM"] = "layoutWidthEnum";
10
+ EditAbleField2["DESC"] = "desc";
11
+ EditAbleField2["DEFAULT_EXPAND"] = "defaultExpand";
12
+ EditAbleField2["FOLD"] = "fold";
13
+ EditAbleField2["REQUIRED"] = "required";
14
+ EditAbleField2["EDITABLE"] = "editable";
24
15
  return EditAbleField2;
25
16
  })(EditAbleField || {});
26
17
  function widgetWidthOptionConfig() {
27
18
  return {
28
19
  option: [
29
- { text: "\u6574\u884C", value: 12 },
30
- { text: "\u534A\u884C", value: 6 },
31
- { text: "5/6", value: 10 },
32
- { text: "2/3", value: 8 },
33
- { text: "1/3", value: 4 },
34
- { text: "3/4", value: 9 },
35
- { text: "1/4", value: 3 },
36
- { text: "1/6", value: 2 }
20
+ { text: "\u6574\u884C", value: "ALL_LINE" },
21
+ { text: "\u534A\u884C", value: "HALF_LINE" },
22
+ { text: "5/6", value: "FIVE_SIX" },
23
+ { text: "2/3", value: "TWO_THREE" },
24
+ { text: "1/3", value: "ONE_THREE" },
25
+ { text: "3/4", value: "THREE_FOUR" },
26
+ { text: "1/4", value: "ONE_FOUR" },
27
+ { text: "1/6", value: "ONE_SIX" }
37
28
  ]
38
29
  };
39
30
  }
40
31
  function isShowOptionConfig() {
41
32
  return {
42
- open: { describe: "\u9ED8\u8BA4\u5C55\u5F00", value: "1" },
43
- close: { describe: "\u9ED8\u8BA4\u6536\u8D77", value: "0" }
33
+ open: { describe: "\u9ED8\u8BA4\u5C55\u5F00", value: true },
34
+ close: { describe: "\u9ED8\u8BA4\u6536\u8D77", value: false }
44
35
  };
45
36
  }
46
37
  function isNotFoldOptionConfig() {
47
38
  return {
48
- open: { describe: "\u53EF\u6298\u53E0", value: "0" },
49
- close: { describe: "\u4E0D\u53EF\u6298\u53E0", value: "1" }
39
+ open: { describe: "\u53EF\u6298\u53E0", value: true },
40
+ close: { describe: "\u4E0D\u53EF\u6298\u53E0", value: false }
50
41
  };
51
42
  }
52
43
  function isEditOptionConfig() {
53
44
  return {
54
- open: { describe: "\u53EF\u7F16\u8F91", value: "1" },
55
- close: { describe: "\u4E0D\u53EF\u7F16\u8F91", value: "0" }
45
+ open: { describe: "\u53EF\u7F16\u8F91", value: true },
46
+ close: { describe: "\u4E0D\u53EF\u7F16\u8F91", value: false }
56
47
  };
57
48
  }
58
49
  function isNullOptionConfig() {
59
50
  return {
60
- open: { describe: "\u5FC5\u586B", value: "0" },
61
- close: { describe: "\u4E0D\u5FC5\u586B", value: "1" }
51
+ open: { describe: "\u5FC5\u586B", value: true },
52
+ close: { describe: "\u4E0D\u5FC5\u586B", value: false }
62
53
  };
63
54
  }
64
55
  const InjectionActiveFieldItem = Symbol("InjectionActiveFieldItem");
@@ -1,6 +1,7 @@
1
+ import { FormConfigItem } from '../../../../../es/packages/form-config';
1
2
  import { EditAbleField } from '../../../../../es/packages/form-config/src/constants';
2
3
  import { FieldItem } from '../../../../../es/packages/form-render';
3
4
  export declare function useConfigurationField(): {
4
5
  generateFieldListByKeys: (keyList: EditAbleField[]) => FieldItem[];
5
- generateFieldListByFieldItem: (fieldItem: FieldItem) => FieldItem[];
6
+ generateFieldListByFieldItem: (fieldItem: FormConfigItem) => FieldItem[];
6
7
  };
@@ -2,62 +2,48 @@ import { EditAbleField, widgetWidthOptionConfig, isShowOptionConfig, isNotFoldOp
2
2
 
3
3
  function useConfigurationField() {
4
4
  const fieldMap = /* @__PURE__ */ new Map([
5
- [EditAbleField.ALIAS, { alias: "\u540D\u79F0", elem_width: 12, is_null: "0", val_key: "alias", html_type: "INPUT" }],
6
- [EditAbleField.TIP, { alias: "\u95EE\u53F7\u63D0\u793A", elem_width: 12, val_key: "tip", html_type: "INPUT" }],
5
+ [EditAbleField.NAME, { alias: "\u540D\u79F0", elem_width: 12, is_null: "0", html_type: "INPUT" }],
6
+ [EditAbleField.NOTES, { alias: "\u95EE\u53F7\u63D0\u793A", elem_width: 12, html_type: "INPUT" }],
7
7
  [
8
- EditAbleField.DEFAULT_VAL,
9
- { alias: "\u9ED8\u8BA4\u503C", val_key: "default_val", elem_width: 12, html_type: "INPUT", validate: { max_length: 20 } }
8
+ EditAbleField.DEFAULT_VALUE,
9
+ { alias: "\u9ED8\u8BA4\u503C", elem_width: 12, html_type: "INPUT", validate: { max_length: 20 } }
10
10
  ],
11
11
  [
12
- EditAbleField.ELEM_WIDTH,
13
- {
14
- alias: "\u5BBD\u5EA6",
15
- fieldType: "number",
16
- val_key: "elem_width",
17
- html_type: "SELECT",
18
- elem_width: 12,
19
- ...widgetWidthOptionConfig()
20
- }
12
+ EditAbleField.LAYOUT_WIDTH_ENUM,
13
+ { alias: "\u5BBD\u5EA6", fieldType: "number", html_type: "SELECT", elem_width: 12, ...widgetWidthOptionConfig() }
21
14
  ],
15
+ [EditAbleField.DESC, { alias: "\u8BF4\u660E\u6587\u672C", elem_width: 12, html_type: "INPUT", validate: { max_length: 30 } }],
22
16
  [
23
- EditAbleField.PLACEHOLDER,
24
- { alias: "\u8BF4\u660E\u6587\u672C", elem_width: 12, val_key: "placeholder", html_type: "INPUT", validate: { max_length: 30 } }
17
+ EditAbleField.DEFAULT_EXPAND,
18
+ { alias: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00", html_type: "SWITCH", elem_width: 12, ...isShowOptionConfig() }
25
19
  ],
26
- [
27
- EditAbleField.IS_SHOW,
28
- { val_key: "is_show", alias: "\u662F\u5426\u9ED8\u8BA4\u5C55\u5F00", html_type: "SWITCH", elem_width: 12, ...isShowOptionConfig() }
29
- ],
30
- [
31
- EditAbleField.IS_NOT_FOLD,
32
- { val_key: "is_not_fold", alias: "\u662F\u5426\u53EF\u6298\u53E0", html_type: "SWITCH", elem_width: 12, ...isNotFoldOptionConfig() }
33
- ],
34
- [
35
- EditAbleField.IS_EDIT,
36
- { val_key: "is_edit", alias: "\u662F\u5426\u53EF\u7F16\u8F91", html_type: "SWITCH", elem_width: 12, ...isEditOptionConfig() }
37
- ],
38
- [
39
- EditAbleField.IS_NULL,
40
- { val_key: "is_null", alias: "\u662F\u5426\u5FC5\u586B", html_type: "SWITCH", elem_width: 12, ...isNullOptionConfig() }
41
- ]
20
+ [EditAbleField.FOLD, { alias: "\u662F\u5426\u53EF\u6298\u53E0", html_type: "SWITCH", elem_width: 12, ...isNotFoldOptionConfig() }],
21
+ [EditAbleField.EDITABLE, { alias: "\u662F\u5426\u53EF\u7F16\u8F91", html_type: "SWITCH", elem_width: 12, ...isEditOptionConfig() }],
22
+ [EditAbleField.REQUIRED, { alias: "\u662F\u5426\u5FC5\u586B", html_type: "SWITCH", elem_width: 12, ...isNullOptionConfig() }]
42
23
  ]);
43
24
  function generateFieldListByKeys(keyList) {
44
- return keyList.map((key) => fieldMap.get(key));
25
+ return keyList.map((key) => {
26
+ return { ...fieldMap.get(key), val_key: key };
27
+ });
45
28
  }
46
29
  function generateFieldListByFieldItem(fieldItem) {
47
30
  const htmlMap = new Map([
48
- ["LINEBAR", [EditAbleField.ALIAS, EditAbleField.ELEM_WIDTH, EditAbleField.IS_SHOW, EditAbleField.IS_NOT_FOLD]],
49
- ...["LINE_BREAKS", "COMPLEX", "COMBINATION"].map((key) => [key, [EditAbleField.ALIAS, EditAbleField.ELEM_WIDTH]])
31
+ [
32
+ "LINE_BAR",
33
+ [EditAbleField.NAME, EditAbleField.LAYOUT_WIDTH_ENUM, EditAbleField.DEFAULT_EXPAND, EditAbleField.FOLD]
34
+ ],
35
+ ...["NEWLINE", "COMPLEX", "COMBINATION"].map((key) => [key, [EditAbleField.NAME, EditAbleField.LAYOUT_WIDTH_ENUM]])
50
36
  ]);
51
37
  const defaultItems = [
52
- EditAbleField.ALIAS,
53
- EditAbleField.DEFAULT_VAL,
54
- EditAbleField.ELEM_WIDTH,
55
- EditAbleField.PLACEHOLDER,
56
- EditAbleField.TIP,
57
- EditAbleField.IS_EDIT,
58
- EditAbleField.IS_NULL
38
+ EditAbleField.NAME,
39
+ EditAbleField.DEFAULT_VALUE,
40
+ EditAbleField.LAYOUT_WIDTH_ENUM,
41
+ EditAbleField.DESC,
42
+ EditAbleField.NOTES,
43
+ EditAbleField.EDITABLE,
44
+ EditAbleField.REQUIRED
59
45
  ];
60
- const keys = htmlMap.get(fieldItem.html_type) || defaultItems;
46
+ const keys = htmlMap.get(fieldItem.type) || defaultItems;
61
47
  return generateFieldListByKeys(keys);
62
48
  }
63
49
  return { generateFieldListByKeys, generateFieldListByFieldItem };
@@ -1,5 +1,4 @@
1
- import { FieldItem } from '../../../../../es/packages/form-render';
2
- import { FormConfigTextFormatter } from '../types';
1
+ import { FormConfigItem, FormConfigTextFormatter } from '../types';
3
2
  export declare function usePresetRenderer(textFormatter: FormConfigTextFormatter): {
4
- getRenderer: (fieldItem: FieldItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
3
+ getRenderer: (fieldItem: FormConfigItem) => import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>;
5
4
  };