cnhis-design-vue 3.2.13-beta.4 → 3.2.14-beta.14

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 (116) hide show
  1. package/es/components/ai-chat/index.d.ts +97 -7
  2. package/es/components/ai-chat/src/Index.vue.d.ts +98 -8
  3. package/es/components/ai-chat/src/Index.vue2.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatBI.vue.d.ts +101 -0
  5. package/es/components/ai-chat/src/components/ChatBI.vue.js +1 -0
  6. package/es/components/ai-chat/src/components/ChatBI.vue2.js +1 -0
  7. package/es/components/ai-chat/src/components/ChatCard.d.ts +21 -2
  8. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  9. package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +61 -3
  10. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  11. package/es/components/ai-chat/src/components/ChatMain.d.ts +1 -1
  12. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  13. package/es/components/ai-chat/src/components/ChatPatient.vue.d.ts +59 -0
  14. package/es/components/ai-chat/src/components/ChatPatient.vue.js +1 -0
  15. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -0
  16. package/es/components/ai-chat/src/types/index.d.ts +4 -3
  17. package/es/components/ai-chat/src/utils/index.d.ts +1 -0
  18. package/es/components/ai-chat/src/utils/index.js +1 -0
  19. package/es/components/ai-chat/style/index.css +1 -1
  20. package/es/components/button-print/index.d.ts +4 -4
  21. package/es/components/button-print/src/ButtonPrint.vue.d.ts +4 -4
  22. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  23. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +4 -4
  24. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  25. package/es/components/button-print/src/utils/print.js +1 -1
  26. package/es/components/callback/src/components/render/popupMaps.d.ts +8 -6
  27. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  29. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  30. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  31. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  35. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  36. package/es/components/fabric-chart/src/utils/index.js +1 -1
  37. package/es/components/form-config/index.d.ts +9 -110
  38. package/es/components/form-config/index.js +1 -1
  39. package/es/components/form-config/src/FormConfig.vue.d.ts +9 -110
  40. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  41. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  42. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  43. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +4 -2
  44. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  45. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +2 -1
  46. package/es/components/form-config/src/components/renderer/ComplexNode.vue2.js +1 -1
  47. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  48. package/es/components/form-config/src/constants/index.d.ts +2 -11
  49. package/es/components/form-config/src/constants/index.js +1 -1
  50. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  51. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  52. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  53. package/es/components/form-config/src/types/index.d.ts +1 -0
  54. package/es/components/form-config/src/utils/index.d.ts +1 -0
  55. package/es/components/form-config/src/utils/index.js +1 -1
  56. package/es/components/form-render/index.js +1 -1
  57. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  58. package/es/components/form-render/src/utils/index.d.ts +1 -0
  59. package/es/components/form-render/src/utils/index.js +1 -1
  60. package/es/components/iho-chat/index.d.ts +104 -1
  61. package/es/components/iho-chat/src/Index.vue.d.ts +104 -1
  62. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  63. package/es/components/iho-chat/src/api/index.d.ts +1 -0
  64. package/es/components/iho-chat/src/api/index.js +1 -1
  65. package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +13 -0
  66. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  67. package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +13 -0
  68. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +14 -0
  69. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  70. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +48 -1
  71. package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
  72. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +13 -0
  73. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  74. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +14 -1
  75. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  76. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  77. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +13 -0
  78. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  79. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  80. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +2 -0
  81. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  82. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  83. package/es/components/iho-chat/src/constants/index.d.ts +11 -2
  84. package/es/components/iho-chat/src/constants/index.js +1 -1
  85. package/es/components/iho-chat/src/hooks/useSearchUserList.js +1 -1
  86. package/es/components/iho-chat/src/hooks/useSession.d.ts +2 -0
  87. package/es/components/iho-chat/src/hooks/useSession.js +1 -1
  88. package/es/components/iho-chat/src/utils/index.d.ts +1 -0
  89. package/es/components/iho-chat/src/utils/index.js +1 -1
  90. package/es/components/iho-chat/style/index.css +1 -1
  91. package/es/components/iho-table/index.d.ts +8 -6
  92. package/es/components/iho-table/src/IhoTable.vue.d.ts +8 -6
  93. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  94. package/es/components/iho-table/src/plugins/crossHeaderPlugin.js +1 -1
  95. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +20 -0
  96. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  97. package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
  98. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  99. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  100. package/es/components/iho-table/src/types/index.d.ts +7 -2
  101. package/es/components/iho-table/style/index.css +1 -1
  102. package/es/components/index.css +1 -1
  103. package/es/components/index.js +1 -1
  104. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  105. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  106. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +4 -7
  107. package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
  108. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +4 -7
  109. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +4 -7
  110. package/es/shared/package.json.js +1 -1
  111. package/es/shared/types/index.d.ts +3 -0
  112. package/es/shared/utils/index.d.ts +1 -0
  113. package/es/shared/utils/index.js +1 -1
  114. package/package.json +2 -2
  115. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +0 -1
  116. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +0 -1
@@ -1,5 +1,6 @@
1
1
  import { SFCWithInstall } from '../../shared/types';
2
2
  export * from './src/types';
3
+ export * from './src/hooks/useLocale';
3
4
  declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4
5
  maxHeight: {
5
6
  type: StringConstructor;
@@ -16,7 +17,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
16
17
  extraMaterialList: {
17
18
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
18
19
  };
19
- showLowCodeReactions: BooleanConstructor;
20
20
  formProps: {
21
21
  type: import("vue").PropType<Partial<Partial<{
22
22
  fieldList: import("..").FieldItem[];
@@ -144,7 +144,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
144
144
  extraMaterialList: {
145
145
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
146
146
  };
147
- showLowCodeReactions: BooleanConstructor;
148
147
  formProps: {
149
148
  type: import("vue").PropType<Partial<Partial<{
150
149
  fieldList: import("..").FieldItem[];
@@ -258,9 +257,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
258
257
  }>> & {
259
258
  onAddItem?: ((...args: any[]) => any) | undefined;
260
259
  onRemoveItem?: ((...args: any[]) => any) | undefined;
261
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
262
260
  }>>;
263
- emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
261
+ emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
264
262
  uuid: string;
265
263
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
266
264
  fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
@@ -317,6 +315,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
317
315
  extraOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
318
316
  onFocus: () => Promise<void>;
319
317
  useVersion: typeof import("../../shared/hooks").useVersion;
318
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
320
319
  Draggable: import("vue").DefineComponent<{
321
320
  list: {
322
321
  type: ArrayConstructor;
@@ -404,6 +403,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
404
403
  NButton: any;
405
404
  NButtonGroup: any;
406
405
  NPopconfirm: any;
406
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
407
407
  CFormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
408
408
  formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
409
409
  key: import("vue").Ref<number>;
@@ -1967,6 +1967,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1967
1967
  layoutWidthEnum?: import("./src/types").FormConfigWidth | undefined;
1968
1968
  type?: string | undefined;
1969
1969
  name?: string | undefined;
1970
+ alias?: string | undefined;
1970
1971
  show?: boolean | undefined;
1971
1972
  defaultValue?: any;
1972
1973
  defaultExpand?: boolean | undefined;
@@ -1983,6 +1984,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1983
1984
  layoutWidthEnum: import("./src/types").FormConfigWidth;
1984
1985
  type: string;
1985
1986
  name: string;
1987
+ alias?: string | undefined;
1986
1988
  show?: boolean | undefined;
1987
1989
  defaultValue?: any;
1988
1990
  defaultExpand?: boolean | undefined;
@@ -2442,8 +2444,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2442
2444
  __extra?: boolean | undefined;
2443
2445
  }>;
2444
2446
  generateFieldListByFormConfigItem: (formConfigItem: import("./src/types").FormConfigItem, fieldItem?: import("..").FieldItem | undefined) => import("..").FieldItem[];
2445
- showModal: import("vue").Ref<boolean>;
2446
- onPositiveClick: () => Promise<void>;
2447
2447
  prevOldField: null;
2448
2448
  onFormChange: ({ fieldKey, value }: import("..").FormChangePayload) => void;
2449
2449
  createLabelRender: (originOptions?: import("../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2669,6 +2669,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2669
2669
  }[]>;
2670
2670
  onOptionModalCancel: () => void;
2671
2671
  onOptionModalConfirm: () => void;
2672
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
2672
2673
  NModal: any;
2673
2674
  NSpace: any;
2674
2675
  NInput: any;
@@ -3783,104 +3784,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3783
3784
  }>>>;
3784
3785
  };
3785
3786
  }>>, {}>;
3786
- FormConfigEventSetting: import("vue").DefineComponent<{
3787
- modelValue: {
3788
- type: ArrayConstructor;
3789
- required: true;
3790
- default: () => never[];
3791
- };
3792
- }, {
3793
- props: {
3794
- modelValue: import("../../shared/types").LowCodeTypes.reactionConfig[];
3795
- };
3796
- emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
3797
- cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
3798
- valueRef: import("vue").Ref<{
3799
- conObj: {
3800
- con: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
3801
- field_key: string;
3802
- value: unknown;
3803
- }[];
3804
- compareMap?: {
3805
- NULL?: ((v1: any, v2: any) => boolean) | undefined;
3806
- EQ?: ((v1: any, v2: any) => boolean) | undefined;
3807
- BIG?: ((v1: any, v2: any) => boolean) | undefined;
3808
- LESS?: ((v1: any, v2: any) => boolean) | undefined;
3809
- BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
3810
- LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
3811
- CL?: ((v1: any, v2: any) => boolean) | undefined;
3812
- NC?: ((v1: any, v2: any) => boolean) | undefined;
3813
- NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3814
- NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3815
- } | undefined;
3816
- isRestoreDefault?: boolean | undefined;
3817
- sqlExpression?: string | undefined;
3818
- showField?: string[] | undefined;
3819
- hideField?: string[] | undefined;
3820
- requiredField?: string[] | undefined;
3821
- notRequiredField?: string[] | undefined;
3822
- enabledField?: string[] | undefined;
3823
- disabledField?: string[] | undefined;
3824
- __oppositeBindField?: any | undefined;
3825
- __oppositeTargetField?: any | undefined;
3826
- }[]>;
3827
- expandedName: import("vue").Ref<string>;
3828
- addConnection: () => void;
3829
- removeConnection: (index: number) => void;
3830
- getOppositeBtnText: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => string | undefined;
3831
- unBindOpposite: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3832
- addOppositeCondition: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3833
- getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
3834
- createOppositeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => import("../../shared/types").LowCodeTypes.reactionConfig;
3835
- isOppositeConfig: (c1: import("../../shared/types").LowCodeTypes.reactionConfig, c2: import("../../shared/types").LowCodeTypes.reactionConfig) => boolean;
3836
- onUpdateExpandedNames: (value: string[]) => void;
3837
- getBinderFieldDesc: (index: number) => string;
3838
- addCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3839
- removeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig, index: number) => void;
3840
- onUpdateConditionType: (condition: import("../../shared/types").LowCodeTypes.reactionsConObj, type: import("../../shared/types").LowCodeTypes.VALUE_RELATION) => void;
3841
- showRef: import("vue").Ref<boolean>;
3842
- fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
3843
- fieldOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
3844
- currentTypeList: string[];
3845
- dialog: import("naive-ui").DialogApi;
3846
- onNegativeClick: () => Promise<void>;
3847
- onPositiveClick: () => Promise<void>;
3848
- configValidate: () => Promise<void>;
3849
- HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3850
- NButton: any;
3851
- NModal: any;
3852
- NSpace: any;
3853
- NScrollbar: any;
3854
- NThing: any;
3855
- NInputGroup: any;
3856
- NSelect: any;
3857
- NInput: any;
3858
- NCollapse: any;
3859
- NCollapseItem: any;
3860
- NEllipsis: any;
3861
- NEmpty: any;
3862
- NTooltip: any;
3863
- NIcon: any;
3864
- conditionTypeOptions: {
3865
- value: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
3866
- label: string;
3867
- }[];
3868
- connectionTypeOptions: {
3869
- value: string;
3870
- label: string;
3871
- }[];
3872
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3873
- modelValue: {
3874
- type: ArrayConstructor;
3875
- required: true;
3876
- default: () => never[];
3877
- };
3878
- }>> & {
3879
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3880
- onValidateFailure?: ((...args: any[]) => any) | undefined;
3881
- }, {
3882
- modelValue: unknown[];
3883
- }>;
3884
3787
  FormConfigMaterialItem: import("vue").DefineComponent<{
3885
3788
  formConfigItem: {
3886
3789
  type: import("vue").PropType<import("./src/types").FormConfigItem>;
@@ -3913,7 +3816,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3913
3816
  FORM_CONFIG_GROUP: string;
3914
3817
  NSelect: any;
3915
3818
  NSpace: any;
3916
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem" | "reactionsValidateFailure")[], "addItem" | "removeItem" | "reactionsValidateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3819
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3917
3820
  maxHeight: {
3918
3821
  type: StringConstructor;
3919
3822
  };
@@ -3929,7 +3832,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3929
3832
  extraMaterialList: {
3930
3833
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
3931
3834
  };
3932
- showLowCodeReactions: BooleanConstructor;
3933
3835
  formProps: {
3934
3836
  type: import("vue").PropType<Partial<Partial<{
3935
3837
  fieldList: import("..").FieldItem[];
@@ -4043,8 +3945,5 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4043
3945
  }>> & {
4044
3946
  onAddItem?: ((...args: any[]) => any) | undefined;
4045
3947
  onRemoveItem?: ((...args: any[]) => any) | undefined;
4046
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
4047
- }, {
4048
- showLowCodeReactions: boolean;
4049
- }>>;
3948
+ }, {}>>;
4050
3949
  export default FormConfig;
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import i from"./src/FormConfig.vue.js";const s=i;s.install=function(i){r(i,s,o+"FormConfig")};export{s as default};
1
+ import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import s from"./src/FormConfig.vue.js";export{registFormConfigLocale,useFormConfigLocale}from"./src/hooks/useLocale.js";const e=s;e.install=function(s){r(s,e,o+"FormConfig")};export{e as default};
@@ -1,5 +1,6 @@
1
1
  import { useVersion } from '../../../shared/hooks';
2
2
  import { AnyFn, LowCodeTypes } from '../../../shared/types';
3
+ import { useFormConfigLocale } from '@cnhis-design-vue/components/form-config/src/hooks/useLocale';
3
4
  import { PropType, Ref } from 'vue';
4
5
  import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../components/form-config/src/types';
5
6
  import { FormRenderExpose } from '../../../components/form-render';
@@ -19,7 +20,6 @@ declare const _default: import("vue").DefineComponent<{
19
20
  extraMaterialList: {
20
21
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
21
22
  };
22
- showLowCodeReactions: BooleanConstructor;
23
23
  formProps: {
24
24
  type: PropType<Partial<Partial<{
25
25
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -147,7 +147,6 @@ declare const _default: import("vue").DefineComponent<{
147
147
  extraMaterialList: {
148
148
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
149
149
  };
150
- showLowCodeReactions: BooleanConstructor;
151
150
  formProps: {
152
151
  type: PropType<Partial<Partial<{
153
152
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -261,9 +260,8 @@ declare const _default: import("vue").DefineComponent<{
261
260
  }>> & {
262
261
  onAddItem?: ((...args: any[]) => any) | undefined;
263
262
  onRemoveItem?: ((...args: any[]) => any) | undefined;
264
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
265
263
  }>>;
266
- emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
264
+ emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
267
265
  uuid: string;
268
266
  cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
269
267
  fieldListRef: Ref<FormConfigItem[]>;
@@ -320,6 +318,7 @@ declare const _default: import("vue").DefineComponent<{
320
318
  extraOptions: import("vue").ComputedRef<FormConfigItem[]>;
321
319
  onFocus: () => Promise<void>;
322
320
  useVersion: typeof useVersion;
321
+ useFormConfigLocale: typeof useFormConfigLocale;
323
322
  Draggable: import("vue").DefineComponent<{
324
323
  list: {
325
324
  type: ArrayConstructor;
@@ -407,6 +406,7 @@ declare const _default: import("vue").DefineComponent<{
407
406
  NButton: any;
408
407
  NButtonGroup: any;
409
408
  NPopconfirm: any;
409
+ useFormConfigLocale: typeof useFormConfigLocale;
410
410
  CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
411
411
  formRenderRef: Ref<FormRenderExpose | undefined>;
412
412
  key: Ref<number>;
@@ -1970,6 +1970,7 @@ declare const _default: import("vue").DefineComponent<{
1970
1970
  layoutWidthEnum?: import("../../../components/form-config/src/types").FormConfigWidth | undefined;
1971
1971
  type?: string | undefined;
1972
1972
  name?: string | undefined;
1973
+ alias?: string | undefined;
1973
1974
  show?: boolean | undefined;
1974
1975
  defaultValue?: any;
1975
1976
  defaultExpand?: boolean | undefined;
@@ -1986,6 +1987,7 @@ declare const _default: import("vue").DefineComponent<{
1986
1987
  layoutWidthEnum: import("../../../components/form-config/src/types").FormConfigWidth;
1987
1988
  type: string;
1988
1989
  name: string;
1990
+ alias?: string | undefined;
1989
1991
  show?: boolean | undefined;
1990
1992
  defaultValue?: any;
1991
1993
  defaultExpand?: boolean | undefined;
@@ -2445,8 +2447,6 @@ declare const _default: import("vue").DefineComponent<{
2445
2447
  __extra?: boolean | undefined;
2446
2448
  }>;
2447
2449
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: import("../../../components/form-render").FieldItem | undefined) => import("../../../components/form-render").FieldItem[];
2448
- showModal: Ref<boolean>;
2449
- onPositiveClick: () => Promise<void>;
2450
2450
  prevOldField: null;
2451
2451
  onFormChange: ({ fieldKey, value }: import("../../../components/form-render").FormChangePayload) => void;
2452
2452
  createLabelRender: (originOptions?: import("../../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2672,6 +2672,7 @@ declare const _default: import("vue").DefineComponent<{
2672
2672
  }[]>;
2673
2673
  onOptionModalCancel: () => void;
2674
2674
  onOptionModalConfirm: () => void;
2675
+ useFormConfigLocale: typeof useFormConfigLocale;
2675
2676
  NModal: any;
2676
2677
  NSpace: any;
2677
2678
  NInput: any;
@@ -3786,104 +3787,6 @@ declare const _default: import("vue").DefineComponent<{
3786
3787
  }>>>;
3787
3788
  };
3788
3789
  }>>, {}>;
3789
- FormConfigEventSetting: import("vue").DefineComponent<{
3790
- modelValue: {
3791
- type: ArrayConstructor;
3792
- required: true;
3793
- default: () => never[];
3794
- };
3795
- }, {
3796
- props: {
3797
- modelValue: LowCodeTypes.reactionConfig[];
3798
- };
3799
- emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
3800
- cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
3801
- valueRef: Ref<{
3802
- conObj: {
3803
- con: LowCodeTypes.VALUE_RELATION;
3804
- field_key: string;
3805
- value: unknown;
3806
- }[];
3807
- compareMap?: {
3808
- NULL?: ((v1: any, v2: any) => boolean) | undefined;
3809
- EQ?: ((v1: any, v2: any) => boolean) | undefined;
3810
- BIG?: ((v1: any, v2: any) => boolean) | undefined;
3811
- LESS?: ((v1: any, v2: any) => boolean) | undefined;
3812
- BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
3813
- LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
3814
- CL?: ((v1: any, v2: any) => boolean) | undefined;
3815
- NC?: ((v1: any, v2: any) => boolean) | undefined;
3816
- NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3817
- NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3818
- } | undefined;
3819
- isRestoreDefault?: boolean | undefined;
3820
- sqlExpression?: string | undefined;
3821
- showField?: string[] | undefined;
3822
- hideField?: string[] | undefined;
3823
- requiredField?: string[] | undefined;
3824
- notRequiredField?: string[] | undefined;
3825
- enabledField?: string[] | undefined;
3826
- disabledField?: string[] | undefined;
3827
- __oppositeBindField?: any | undefined;
3828
- __oppositeTargetField?: any | undefined;
3829
- }[]>;
3830
- expandedName: Ref<string>;
3831
- addConnection: () => void;
3832
- removeConnection: (index: number) => void;
3833
- getOppositeBtnText: (item: LowCodeTypes.reactionConfig) => string | undefined;
3834
- unBindOpposite: (item: LowCodeTypes.reactionConfig) => void;
3835
- addOppositeCondition: (item: LowCodeTypes.reactionConfig) => void;
3836
- getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
3837
- createOppositeCondition: (config: LowCodeTypes.reactionConfig) => LowCodeTypes.reactionConfig;
3838
- isOppositeConfig: (c1: LowCodeTypes.reactionConfig, c2: LowCodeTypes.reactionConfig) => boolean;
3839
- onUpdateExpandedNames: (value: string[]) => void;
3840
- getBinderFieldDesc: (index: number) => string;
3841
- addCondition: (config: LowCodeTypes.reactionConfig) => void;
3842
- removeCondition: (config: LowCodeTypes.reactionConfig, index: number) => void;
3843
- onUpdateConditionType: (condition: LowCodeTypes.reactionsConObj, type: LowCodeTypes.VALUE_RELATION) => void;
3844
- showRef: Ref<boolean>;
3845
- fieldListRef: Ref<FormConfigItem[]>;
3846
- fieldOptions: import("vue").ComputedRef<FormConfigItem[]>;
3847
- currentTypeList: string[];
3848
- dialog: import("naive-ui").DialogApi;
3849
- onNegativeClick: () => Promise<void>;
3850
- onPositiveClick: () => Promise<void>;
3851
- configValidate: () => Promise<void>;
3852
- HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3853
- NButton: any;
3854
- NModal: any;
3855
- NSpace: any;
3856
- NScrollbar: any;
3857
- NThing: any;
3858
- NInputGroup: any;
3859
- NSelect: any;
3860
- NInput: any;
3861
- NCollapse: any;
3862
- NCollapseItem: any;
3863
- NEllipsis: any;
3864
- NEmpty: any;
3865
- NTooltip: any;
3866
- NIcon: any;
3867
- conditionTypeOptions: {
3868
- value: LowCodeTypes.VALUE_RELATION;
3869
- label: string;
3870
- }[];
3871
- connectionTypeOptions: {
3872
- value: string;
3873
- label: string;
3874
- }[];
3875
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3876
- modelValue: {
3877
- type: ArrayConstructor;
3878
- required: true;
3879
- default: () => never[];
3880
- };
3881
- }>> & {
3882
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3883
- onValidateFailure?: ((...args: any[]) => any) | undefined;
3884
- }, {
3885
- modelValue: unknown[];
3886
- }>;
3887
3790
  FormConfigMaterialItem: import("vue").DefineComponent<{
3888
3791
  formConfigItem: {
3889
3792
  type: PropType<FormConfigItem>;
@@ -3916,7 +3819,7 @@ declare const _default: import("vue").DefineComponent<{
3916
3819
  FORM_CONFIG_GROUP: string;
3917
3820
  NSelect: any;
3918
3821
  NSpace: any;
3919
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem" | "reactionsValidateFailure")[], "addItem" | "removeItem" | "reactionsValidateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3822
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3920
3823
  maxHeight: {
3921
3824
  type: StringConstructor;
3922
3825
  };
@@ -3932,7 +3835,6 @@ declare const _default: import("vue").DefineComponent<{
3932
3835
  extraMaterialList: {
3933
3836
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
3934
3837
  };
3935
- showLowCodeReactions: BooleanConstructor;
3936
3838
  formProps: {
3937
3839
  type: PropType<Partial<Partial<{
3938
3840
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -4046,8 +3948,5 @@ declare const _default: import("vue").DefineComponent<{
4046
3948
  }>> & {
4047
3949
  onAddItem?: ((...args: any[]) => any) | undefined;
4048
3950
  onRemoveItem?: ((...args: any[]) => any) | undefined;
4049
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
4050
- }, {
4051
- showLowCodeReactions: boolean;
4052
- }>;
3951
+ }, {}>;
4053
3952
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as g}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as h,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as j}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as k,NSpace as C}from"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import V from"./components/FormConfigCreator.vue.js";import b from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import M from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as D}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as E,InjectionFormConfigEmit as H,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as U,InjectionActiveFieldItem as O,FORM_CONFIG_GROUP as P}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const A=["id"],B={class:"form-config__material"},N=m("header",{class:"form-config__materialHeader"},"物料区",-1),W={class:"form-config__displayWrapper"},q={class:"form-config__displayHeader"},G={class:"form-config__config"},J=m("header",{class:"form-config__configHeader"},"配置区",-1),K={class:"form-config__configContent"};var Q=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Q,emit:X}){const Y=e;o(E,Y),o(H,X);const Z=x(),$=g(),ee=t([]);o(S,ee);const oe=t([]);o(I,oe);const te=t([]);function re(e){ee.value.some((o=>o.key===e.key))||ee.value.push(e)}o(U,te);const ae=(e,o)=>y(Y.textFormatter)?Y.textFormatter(e,o):o,ie=t();o(O,ie);const se=t(),{transform:le,inverseTransform:ne}=D(Y),me=r({get:()=>null,set(e){if(!e)return;const o=fe.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),oe.value.push(o),X("addItem",o))}}),ue=t([]),fe=r((()=>{if(!h(ue.value))return[];const e=[];return j([...oe.value,...ee.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Y.extraMaterialList&&!ue.value.length&&(ue.value=y(Y.extraMaterialList)?await Y.extraMaterialList():Y.extraMaterialList)}return Q({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=_(a(e))).show?r.push(o):t.push(o),void T(o);var o})),ee.value=le(t),oe.value=r,te.value=o,ie.value=void 0},validate(){var e;return null==(e=se.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:ne(_(a(ee.value)),e,{show:!0}),materialList:ne(_(a(oe.value)),e,{show:!1}),lowCodeReactions:_(a(te.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n($)},id:n(Z)},n(L)()),[m("section",B,[N,u(n(F),l(z({fieldList:ee,materialList:oe,hooks:{beforeMove:Y.beforeMove}}),{class:"form-config__materialContent",modelValue:n(oe),"onUpdate:modelValue":t[0]||(t[0]=e=>f(oe)?oe.value=e:null)}),{item:d((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":ae,"material-List":n(oe)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(k),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(me),"onUpdate:value":t[1]||(t[1]=e=>f(me)?me.value=e:null),placeholder:"请选择额外物料",options:n(fe),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","options"])):p("v-if",!0)]),m("section",W,[m("header",q,[v(" 布局区 "),u(n(C),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(M,{key:0,modelValue:te.value,"onUpdate:modelValue":t[2]||(t[2]=e=>te.value=e),onValidateFailure:t[3]||(t[3]=e=>X("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(V,{onSubmit:re})])),_:1})]),u(b,{class:"form-config__displayContent",group:n(P),"text-formatter":ae,modelValue:n(ee),"onUpdate:modelValue":t[4]||(t[4]=e=>f(ee)?ee.value=e:null)},null,8,["group","modelValue"])]),m("section",G,[J,m("section",K,[u(w,{ref_key:"formConfigEditRef",ref:se,uuid:n(Z),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,A))}});export{Q as default};
1
+ import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as f,createVNode as u,isRef as c,withCtx as d,createBlock as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as b}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as F}from"./hooks/useLocale.js";import M from"../../../shared/components/VueDraggable/src/vuedraggable.js";import R from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as A,InjectionFormConfigEmit as E,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as U}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},B={class:"form-config__displayWrapper"},G={class:"form-config__displayHeader"},J={class:"form-config__config"},K={class:"form-config__configHeader"},Q={class:"form-config__configContent"};var X=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem"],setup(e,{expose:X,emit:Y}){const Z=e;o(A,Z),o(E,Y);const $=j(),ee=h(),oe=t([]);o(S,oe);const te=t([]);o(I,te);const re=t([]);function ae(e){oe.value.some((o=>o.key===e.key))||oe.value.push(e)}o(O,re);const ie=(e,o)=>x(Z.textFormatter)?Z.textFormatter(e,o):o,se=t();o(P,se);const le=t(),{transform:ne,inverseTransform:me}=H(Z),fe=r({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),te.value.push(o),Y("addItem",o))}}),ue=t([]),ce=r((()=>{if(!_(ue.value))return[];const e=[];return k([...te.value,...oe.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Z.extraMaterialList&&!ue.value.length&&(ue.value=x(Z.extraMaterialList)?await Z.extraMaterialList():Z.extraMaterialList)}return X({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=y(a(e))).show?r.push(o):t.push(o),void T(o);var o})),oe.value=ne(t),te.value=r,re.value=o,se.value=void 0},validate(){var e;return null==(e=le.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:me(y(a(oe.value)),e,{show:!0}),materialList:me(y(a(te.value)),e,{show:!1}),lowCodeReactions:y(a(re.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(ee)},id:n($)},n(b)()),[m("section",W,[m("header",q,f(n(F)("materialArea")),1),u(n(M),l(z({fieldList:oe,materialList:te,hooks:{beforeMove:Z.beforeMove}}),{class:"form-config__materialContent",modelValue:n(te),"onUpdate:modelValue":t[0]||(t[0]=e=>c(te)?te.value=e:null)}),{item:d((({element:e})=>[u(n(D),{"form-config-item":e,"text-formatter":ie,"material-List":n(te)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),p(n(L),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(fe),"onUpdate:value":t[1]||(t[1]=e=>c(fe)?fe.value=e:null),placeholder:n(F)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",B,[m("header",G,[g(f(n(F)("layoutArea"))+" ",1),u(n(C),null,{default:d((()=>[v("\t\t\t\t\t<form-config-event-setting"),v('\t\t\t\t\t\tv-if="showLowCodeReactions"'),v('\t\t\t\t\t\tv-model="lowCodeReactionsRef"'),v("\t\t\t\t\t\t@validate-failure=\"e => emit('reactionsValidateFailure', e)\""),v("\t\t\t\t\t/>"),u(R,{onSubmit:ae})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":ie,modelValue:n(oe),"onUpdate:modelValue":t[2]||(t[2]=e=>c(oe)?oe.value=e:null)},null,8,["group","modelValue"])]),m("section",J,[m("header",K,f(n(F)("configArea")),1),m("section",Q,[u(w,{ref_key:"formConfigEditRef",ref:le,uuid:n($),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{X as default};
@@ -1,3 +1,4 @@
1
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
1
2
  import { FieldItem, FormRenderExpose } from '../../../../components/form-render';
2
3
  import { AnyObject, FormConfigItem } from '../../..';
3
4
  declare const _default: import("vue").DefineComponent<{}, {
@@ -14,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{}, {
14
15
  NButton: any;
15
16
  NButtonGroup: any;
16
17
  NPopconfirm: any;
18
+ useFormConfigLocale: typeof useFormConfigLocale;
17
19
  CFormRender: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
18
20
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
19
21
  key: import("vue").Ref<number>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as i,openBlock as t,createBlock as l,unref as o,withCtx as a,createVNode as r,createTextVNode as n}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as d,NPopconfirm as m,NButton as u}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import L from"../../../form-render/index.js";var c=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:c}){const p=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]),h=i(),E=i(),w={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function y(e,i,t){if(!t)return;await t.validate();const l=t.getFormValues();c("submit",{layoutWidthEnum:"ALL_LINE",...l,type:e,key:l.name,...i,__new:!0})}return(e,i)=>(t(),l(o(d),{size:"small"},{default:a((()=>[r(o(m),{width:"200px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:i[0]||(i[0]=e=>y("NEWLINE",{},E.value))},{trigger:a((()=>[r(o(u),null,{default:a((()=>[n("新建分行符")])),_:1})])),default:a((()=>[r(o(L),{column:12,ref_key:"lineBreakFormRef",ref:E,"initial-data":o(s)(w,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(p).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1}),r(o(m),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:i[1]||(i[1]=e=>y("LINE_BAR",{children:[]},h.value))},{trigger:a((()=>[r(o(u),null,{default:a((()=>[n("新建分线栏")])),_:1})])),default:a((()=>[r(o(L),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":w,size:"small","label-width":"auto","label-placement":"left",fieldList:o(p)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{c as default};
1
+ import{defineComponent as e,ref as t,openBlock as i,createBlock as a,unref as o,withCtx as l,createVNode as n,createTextVNode as r,toDisplayString as s}from"vue";import{pick as u}from"lodash-es";import{NButtonGroup as m,NPopconfirm as f,NButton as d}from"naive-ui";import{EditAbleField as c}from"../constants/index.js";import{useConfigurationField as p}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as v}from"../hooks/useLocale.js";import"../../../index.js";import g from"../../../form-render/index.js";var L=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:L}){const _=p().generateFieldListByKeys([c.NAME,c.LAYOUT_WIDTH_ENUM,c.NOTES,c.DEFAULT_EXPAND,c.FOLD]);Object.assign(_[0],{html_type:"INPUT",is_null:"0"});const h=t(),x=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function E(e,t,i){if(!i)return;await i.validate();const a=i.getFormValues();L("submit",{layoutWidthEnum:"ALL_LINE",...a,type:e,key:a.name,...t,__new:!0})}return(e,t)=>(i(),a(o(m),{size:"small"},{default:l((()=>[n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[0]||(t[0]=e=>E("NEWLINE",{},x.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebreak")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"lineBreakFormRef",ref:x,"initial-data":o(u)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(_).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1},8,["positive-text","negative-text"]),n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[1]||(t[1]=e=>E("LINE_BAR",{children:[]},h.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebar")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(_)},null,8,["fieldList"])])),_:1},8,["positive-text","negative-text"])])),_:1}))}});export{L as default};
@@ -1,5 +1,6 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
3
4
  import { FieldItem, FieldVisitor, FormChangePayload, FormRenderExpose } from '../../../../components/form-render';
4
5
  import { FormConfigItem } from '../../../../components/index';
5
6
  declare const _default: import("vue").DefineComponent<{
@@ -457,6 +458,7 @@ declare const _default: import("vue").DefineComponent<{
457
458
  layoutWidthEnum?: import("../../../../components/index").FormConfigWidth | undefined;
458
459
  type?: string | undefined;
459
460
  name?: string | undefined;
461
+ alias?: string | undefined;
460
462
  show?: boolean | undefined;
461
463
  defaultValue?: any;
462
464
  defaultExpand?: boolean | undefined;
@@ -473,6 +475,7 @@ declare const _default: import("vue").DefineComponent<{
473
475
  layoutWidthEnum: import("../../../../components/index").FormConfigWidth;
474
476
  type: string;
475
477
  name: string;
478
+ alias?: string | undefined;
476
479
  show?: boolean | undefined;
477
480
  defaultValue?: any;
478
481
  defaultExpand?: boolean | undefined;
@@ -932,8 +935,6 @@ declare const _default: import("vue").DefineComponent<{
932
935
  __extra?: boolean | undefined;
933
936
  }>;
934
937
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
935
- showModal: import("vue").Ref<boolean>;
936
- onPositiveClick: () => Promise<void>;
937
938
  prevOldField: null;
938
939
  onFormChange: ({ fieldKey, value }: FormChangePayload) => void;
939
940
  createLabelRender: (originOptions?: AnyObject[]) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -1159,6 +1160,7 @@ declare const _default: import("vue").DefineComponent<{
1159
1160
  }[]>;
1160
1161
  onOptionModalCancel: () => void;
1161
1162
  onOptionModalConfirm: () => void;
1163
+ useFormConfigLocale: typeof useFormConfigLocale;
1162
1164
  NModal: any;
1163
1165
  NSpace: any;
1164
1166
  NInput: any;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,ref as t,inject as a,watch as i,toRaw as o,openBlock as n,createElementBlock as u,Fragment as s,createVNode as r,unref as v,mergeProps as d,withCtx as p,createElementVNode as c,renderList as f,toDisplayString as m,nextTick as g,h}from"vue";import{cloneDeep as y,isEmpty as x,isArray as b}from"lodash-es";import{InjectionActiveFieldItem as k,EditAbleField as w}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as j}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as F,NInput as C,NSpace as L,NButton as _}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as R}from"../hooks/useConfigurationField.js";import"../../../index.js";import A from"../../../form-render/index.js";const U={style:{"padding-top":"8px"}},P={style:{width:"100%","text-align":"left"}},E=c("thead",null,[c("tr",null,[c("th",null,"值"),c("th",null,"原始文本"),c("th",null,"调整后文本")])],-1);var D=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},bindFormRenderRef:{type:Object},formProps:{type:Object}},setup(e,{expose:D}){const I=e;l((()=>`#${I.uuid} .form-config__config`));const O=t(),V=a(k),q=t([]),z=t({}),{generateFieldListByFormConfigItem:B}=R(),K=t(!1);async function N(){var e;V.value=S,await g(),null==(e=O.value)||e.validate()}let S=null;function T({fieldKey:e,value:l}){V.value&&(V.value[e]=l)}i(V,(async(e,l)=>{var t,a,i;if(!e)return q.value=[];if(l&&e!==S)try{await(null==(t=O.value)?void 0:t.validate())}catch(e){return K.value=!0}S=e,z.value={editable:!0,show:!0,...y(o(e))};const n=null==(a=I.bindFormRenderRef)?void 0:a.getFieldList();q.value=B(e,j(n,e.key)),null==(i=O.value)||i.reload()}),{immediate:!0});const $={"*"({field:e}){if(e.val_key!==w.DEFAULT_VALUE)return;const l=e.option;var t,a;e.option=(t=e.option,b(t)?t.map((e=>{var l;const t=null==(l=V.value.optionAliasList)?void 0:l.find((l=>l.value===e.value));return t?{...e,text:t.text}:e})):t),e.decoratorProps={labelRender:(a=l,e=>{const l=h("span",{},e);return x(a)?l:h("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},[l,h(_,{text:!0,type:"primary",onClick(){var e;G.value=!0,H.value=y(a),x(null==(e=V.value)?void 0:e.optionAliasList)||H.value.forEach((e=>{const l=V.value.optionAliasList.find((l=>l.value===e.value));l&&(e.alias=l.text)}))}},{default:()=>"修改选项文本"})])})}}},G=t(!1),H=t([]);function J(){G.value=!1,H.value=[]}function M(){var e;G.value=!1,V.value.optionAliasList=H.value.reduce(((e,l)=>(l.alias&&e.push({value:l.value,text:l.alias}),e)),[]),H.value=[],z.value={editable:!0,show:!0,...y(o(V.value))},null==(e=O.value)||e.reload()}return D({validate(){var e;return null==(e=O.value)?void 0:e.validate()}}),(l,t)=>(n(),u(s,null,[r(v(A),d({size:"small"},e.formProps,{column:12,ref_key:"formRenderRef",ref:O,onFormChange:T,"field-visitor":$,"field-list":q.value,"initial-data":z.value}),null,16,["field-list","initial-data"]),r(v(F),{show:K.value,"onUpdate:show":t[0]||(t[0]=e=>K.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,closable:!1,title:"存在填写错误的字段","positive-text":"继续编辑",onPositiveClick:N},null,8,["show","to"]),r(v(F),{show:G.value,"onUpdate:show":t[1]||(t[1]=e=>G.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,title:"修改选项文本","positive-text":"确定","negative-text":"取消",onNegativeClick:J,onPositiveClick:M},{default:p((()=>[c("section",U,[c("table",P,[E,c("tbody",null,[(n(!0),u(s,null,f(H.value,(e=>(n(),u("tr",{key:e.value},[c("td",null,m(e.value),1),c("td",null,m(e.text),1),c("td",null,[r(v(C),{value:e.alias,"onUpdate:value":l=>e.alias=l},null,8,["value","onUpdate:value"])])])))),128))])]),r(v(L),{vertical:""})])])),_:1},8,["show","to"])],64))}});export{D as default};
1
+ import{defineComponent as e,computed as t,ref as l,inject as i,watch as o,toRaw as a,openBlock as n,createElementBlock as r,Fragment as s,createVNode as u,unref as d,mergeProps as v,createCommentVNode as p,withCtx as f,createElementVNode as c,toDisplayString as m,renderList as g,h as x}from"vue";import{cloneDeep as y,isEmpty as h,isArray as b}from"lodash-es";import{InjectionActiveFieldItem as k,EditAbleField as A}from"../constants/index.js";import"../../../../shared/components/VueDraggable/src/vuedraggable.js";import{findFieldItemByKey as j}from"../utils/index.js";import"@vicons/ionicons5";import{NModal as w,NInput as F,NSpace as L,NButton as C}from"naive-ui";import"../../../../shared/utils/index.js";import{useConfigurationField as O}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as _}from"../hooks/useLocale.js";import"../../../index.js";import R from"../../../form-render/index.js";const P={style:{"padding-top":"8px"}},T={style:{width:"100%","text-align":"left"}};var U=e({__name:"FormConfigEdit",props:{uuid:{type:String,required:!0},bindFormRenderRef:{type:Object},formProps:{type:Object}},setup(e,{expose:U}){const E=e;t((()=>`#${E.uuid} .form-config__config`));const B=l(),N=i(k),D=l([]),I=l({}),{generateFieldListByFormConfigItem:S}=O();function V({fieldKey:e,value:t}){N.value&&(N.value[e]=t)}o(N,(async(e,t)=>{var l,i;if(!e)return D.value=[];I.value={editable:!0,show:!0,...y(a(e))};const o=null==(l=E.bindFormRenderRef)?void 0:l.getFieldList();D.value=S(e,j(o,e.key)),null==(i=B.value)||i.reload()}),{immediate:!0});const q={"*"({field:e}){if(e.val_key!==A.DEFAULT_VALUE)return;const t=e.option;var l,i;e.option=(l=e.option,b(l)?l.map((e=>{var t;const l=null==(t=N.value.optionAliasList)?void 0:t.find((t=>t.value===e.value));return l?{...e,text:l.text}:e})):l),e.decoratorProps={labelRender:(i=t,e=>{const t=x("span",{},e);return h(i)?t:x("div",{style:{display:"flex",alignItems:"center",gap:"8px"}},[t,x(C,{text:!0,type:"primary",onClick(){var e;z.value=!0,K.value=y(i),h(null==(e=N.value)?void 0:e.optionAliasList)||K.value.forEach((e=>{const t=N.value.optionAliasList.find((t=>t.value===e.value));t&&(e.alias=t.text)}))}},{default:()=>_("configArea.modifyOptionTitle")})])})}}},z=l(!1),K=l([]);function M(){z.value=!1,K.value=[]}function $(){var e;z.value=!1,N.value.optionAliasList=K.value.reduce(((e,t)=>(t.alias&&e.push({value:t.value,text:t.alias}),e)),[]),K.value=[],I.value={editable:!0,show:!0,...y(a(N.value))},null==(e=B.value)||e.reload()}return U({validate(){var e;return null==(e=B.value)?void 0:e.validate()}}),(t,l)=>(n(),r(s,null,[u(d(R),v({size:"small"},e.formProps,{column:12,ref_key:"formRenderRef",ref:B,onFormChange:V,"field-visitor":q,"field-list":D.value,"initial-data":I.value}),null,16,["field-list","initial-data"]),p("\t<n-modal"),p('\t\tv-model:show="showModal"'),p('\t\tpreset="dialog"'),p('\t\tto="body"'),p('\t\t:to="wrapperSelector"'),p('\t\t:close-on-esc="false"'),p('\t\t:mask-closable="false"'),p('\t\t:closable="false"'),p('\t\ttitle="存在填写错误的字段"'),p('\t\tpositive-text="继续编辑"'),p('\t\t@positive-click="onPositiveClick"'),p("\t/>"),u(d(w),{show:z.value,"onUpdate:show":l[0]||(l[0]=e=>z.value=e),preset:"dialog",to:"body","close-on-esc":!1,"mask-closable":!1,title:d(_)("configArea.modifyOptionTitle"),"positive-text":d(_)("configArea.positiveBtn"),"negative-text":d(_)("configArea.negativeBtn"),onNegativeClick:M,onPositiveClick:$},{default:f((()=>[c("section",P,[c("table",T,[c("thead",null,[c("tr",null,[c("th",null,m(d(_)("configArea.modifyOptionName")),1),c("th",null,m(d(_)("configArea.modifyOptionOriginText")),1),c("th",null,m(d(_)("configArea.modifyOptionNewText")),1)])]),c("tbody",null,[(n(!0),r(s,null,g(K.value,(e=>(n(),r("tr",{key:e.value},[c("td",null,m(e.value),1),c("td",null,m(e.text),1),c("td",null,[u(d(F),{value:e.alias,"onUpdate:value":t=>e.alias=t},null,8,["value","onUpdate:value"])])])))),128))])]),u(d(L),{vertical:""})])])),_:1},8,["show","to","title","positive-text","negative-text"])],64))}});export{U as default};
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import { FormConfigItem, FormConfigTextFormatter } from '../../../../../components/form-config';
3
- import { bindHover } from '../../../../../components/form-config/src/utils';
3
+ import { bindHover, getFormConfigTitle } from '../../../../../components/form-config/src/utils';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  formConfigItem: {
6
6
  type: PropType<FormConfigItem>;
@@ -162,6 +162,7 @@ declare const _default: import("vue").DefineComponent<{
162
162
  };
163
163
  }>>, {}>;
164
164
  bindHover: typeof bindHover;
165
+ getFormConfigTitle: typeof getFormConfigTitle;
165
166
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
166
167
  formConfigItem: {
167
168
  type: PropType<FormConfigItem>;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as o,computed as r,openBlock as t,createElementBlock as m,normalizeClass as a,unref as i,createElementVNode as f,mergeProps as n,withModifiers as d,createTextVNode as l,toDisplayString as s,createVNode as c}from"vue";import g from"../FormConfigDragDisplay.vue.js";import p from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as C}from"../../utils/index.js";const I=["data-type","data-key","data-required","data-extra"],x=["onClick"];var y=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const y=e,_=o(u);function v(){_.value=y.formConfigItem}const k=r((()=>[{"is-active--text":_.value===y.formConfigItem},"form-config__renderer--complexHeader"])),q=r((()=>["form-config__renderer--complex form-config__renderer",{"is-active--shadow":_.value===y.formConfigItem}]));return(o,r)=>(t(),m("section",{class:a(i(q)),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra},[f("header",n(i(C)(e.formConfigItem),{class:i(k),onClick:d(v,["stop"])}),[l(s(y.formConfigItem.name)+" ",1),c(p,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,x),c(g,n(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid","data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),null,16,["modelValue","data-type","data-key","data-required","data-extra"])],10,I))}});export{y as default};
1
+ import{defineComponent as e,inject as o,computed as r,openBlock as t,createElementBlock as m,normalizeClass as a,unref as i,createElementVNode as f,mergeProps as n,withModifiers as d,createTextVNode as l,toDisplayString as s,createVNode as c}from"vue";import g from"../FormConfigDragDisplay.vue.js";import p from"./CloseButton.vue.js";import{InjectionActiveFieldItem as u}from"../../constants/index.js";import{bindHover as C,getFormConfigTitle as I}from"../../utils/index.js";const x=["data-type","data-key","data-required","data-extra"],y=["onClick"];var _=e({__name:"ComplexNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0}},setup(e){const _=e,v=o(u);function k(){v.value=_.formConfigItem}const q=r((()=>[{"is-active--text":v.value===_.formConfigItem},"form-config__renderer--complexHeader"])),j=r((()=>["form-config__renderer--complex form-config__renderer",{"is-active--shadow":v.value===_.formConfigItem}]));return(o,r)=>(t(),m("section",{class:a(i(j)),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra},[f("header",n(i(C)(e.formConfigItem),{class:i(q),onClick:d(k,["stop"])}),[l(s(i(I)(_.formConfigItem))+" ",1),c(p,{"form-config-item":e.formConfigItem},null,8,["form-config-item"])],16,y),c(g,n(o.$props,{modelValue:e.formConfigItem.children,"onUpdate:modelValue":r[0]||(r[0]=o=>e.formConfigItem.children=o),class:"form-config__renderer--complex--grid","data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),null,16,["modelValue","data-type","data-key","data-required","data-extra"])],10,x))}});export{_ as default};
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,computed as o,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as d,createTextVNode as u,toDisplayString as s,renderSlot as C,createBlock as g,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import I from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,WidgetTextMap as v}from"../../constants/index.js";import{bindHover as y}from"../../utils/index.js";const x=["onClick","data-type","data-key","data-required","data-extra"];var k=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const k=e,q=t(_);function B(){k.allowClick&&(q.value=k.formConfigItem)}const b=o((()=>["form-config__renderer--default",{"is-required":k.formConfigItem.required}])),j=o((()=>{var e;return[{"is-active":q.value===k.formConfigItem,"is-disabled":w.value,"is-extra":null==(e=k.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),w=o((()=>!1===k.formConfigItem.editable)),$=o((()=>{const e=v.get(k.formConfigItem.type);return k.textFormatter(k.formConfigItem,`${k.formConfigItem.name}${e?`(${e})`:""}`)})),h=o((()=>k.showCloseButton&&(!k.formConfigItem.required&&!k.formConfigItem.__isCombinationChild||k.formConfigItem.__extra)));return(t,o)=>(r(),i("div",f(m(y)(e.formConfigItem),{onClick:n(B,["stop"]),class:m(j),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),[a(m(p),{class:l(m(b))},{default:d((()=>[u(s(m($)),1)])),_:1},8,["class"]),C(t.$slots,"default"),m(h)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,x))}});export{k as default};
1
+ import{defineComponent as e,inject as o,computed as t,openBlock as r,createElementBlock as i,mergeProps as f,unref as m,withModifiers as n,createVNode as a,normalizeClass as l,withCtx as d,createTextVNode as u,toDisplayString as s,renderSlot as C,createBlock as g,createCommentVNode as c}from"vue";import{NEllipsis as p}from"naive-ui";import I from"./CloseButton.vue.js";import{InjectionActiveFieldItem as _,getWidgetText as v}from"../../constants/index.js";import{getFormConfigTitle as y,bindHover as x}from"../../utils/index.js";const k=["onClick","data-type","data-key","data-required","data-extra"];var q=e({__name:"DefaultNode",props:{formConfigItem:{type:Object,required:!0},textFormatter:{type:Function,required:!0},showCloseButton:{type:Boolean,default:!0},allowClick:{type:Boolean,default:!0}},setup(e){const q=e,B=o(_);function b(){q.allowClick&&(B.value=q.formConfigItem)}const j=t((()=>["form-config__renderer--default",{"is-required":q.formConfigItem.required}])),w=t((()=>{var e;return[{"is-active":B.value===q.formConfigItem,"is-disabled":$.value,"is-extra":null==(e=q.formConfigItem)?void 0:e.__extra},"form-config__renderer","form-config__renderer--defaultWrapper"]})),$=t((()=>!1===q.formConfigItem.editable)),h=t((()=>{const e=v(q.formConfigItem.type);return q.textFormatter(q.formConfigItem,`${y(q.formConfigItem)}${e?`(${e})`:""}`)})),F=t((()=>q.showCloseButton&&(!q.formConfigItem.required&&!q.formConfigItem.__isCombinationChild||q.formConfigItem.__extra)));return(o,t)=>(r(),i("div",f(m(x)(e.formConfigItem),{onClick:n(b,["stop"]),class:m(w),"data-type":e.formConfigItem.type,"data-key":e.formConfigItem.key,"data-required":!!e.formConfigItem.required,"data-extra":!!e.formConfigItem.__extra}),[a(m(p),{class:l(m(j))},{default:d((()=>[u(s(m(h)),1)])),_:1},8,["class"]),C(o.$slots,"default"),m(F)?(r(),g(I,{key:0,"form-config-item":e.formConfigItem},null,8,["form-config-item"])):c("v-if",!0)],16,k))}});export{q as default};