cnhis-design-vue 3.2.14-beta.19 → 3.2.14-beta.21

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 (182) hide show
  1. package/README.md +87 -87
  2. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  3. package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
  4. package/es/components/ai-chat/src/components/ChatMain.js +1 -1
  5. package/es/components/ai-chat/src/components/ChatPatient.vue2.js +1 -1
  6. package/es/components/ai-chat/src/components/ChatPrompt.vue2.js +1 -1
  7. package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
  8. package/es/components/big-table/src/BigTable.vue2.js +1 -1
  9. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -1
  10. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
  11. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -1
  12. package/es/components/big-table/src/components/input-button.vue2.js +1 -1
  13. package/es/components/big-table/src/hooks/useTableParse.js +1 -1
  14. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  15. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  16. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  17. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  18. package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
  19. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  20. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  21. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  22. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  23. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  24. package/es/components/classification/src/index.vue2.js +1 -1
  25. package/es/components/expand-field/src/components/FormBatchOptionsModal.vue2.js +1 -1
  26. package/es/components/expand-field/src/components/PersonModal.vue2.js +1 -1
  27. package/es/components/expand-field/src/components/form.vue2.js +1 -1
  28. package/es/components/expand-field/src/index.vue2.js +1 -1
  29. package/es/components/expand-field/src/utils/constant.js +1 -1
  30. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  31. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
  32. package/es/components/fabric-chart/src/constants/index.js +1 -1
  33. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  35. package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  37. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  39. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  41. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  43. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  45. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  47. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  49. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  50. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  51. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  52. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  53. package/es/components/field-set/src/FieldColor.vue2.js +1 -1
  54. package/es/components/field-set/src/FieldFilter.vue2.js +1 -1
  55. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  56. package/es/components/field-set/src/Index.vue2.js +1 -1
  57. package/es/components/field-set/src/TableStyle.vue2.js +1 -1
  58. package/es/components/field-set/src/components/condition.vue2.js +1 -1
  59. package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
  60. package/es/components/field-set/src/components/edit-dialog.vue2.js +1 -1
  61. package/es/components/field-set/src/components/edit-filter.vue2.js +1 -1
  62. package/es/components/field-set/src/components/table-row.vue2.js +1 -1
  63. package/es/components/field-set/src/constants/filter.js +1 -1
  64. package/es/components/field-set/src/constants/index.js +1 -1
  65. package/es/components/form-config/index.d.ts +108 -3
  66. package/es/components/form-config/src/FormConfig.vue.d.ts +108 -3
  67. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  68. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  69. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  70. package/es/components/form-config/src/constants/index.js +1 -1
  71. package/es/components/form-config/src/hooks/useLocale.js +1 -1
  72. package/es/components/form-render/src/components/renderer/combination/hooks/useCombination.js +1 -1
  73. package/es/components/form-render/src/components/renderer/combination/jsonCombination.js +1 -1
  74. package/es/components/form-render/src/components/renderer/combination/tableCombination.js +1 -1
  75. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  76. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  77. package/es/components/iho-chat/index.d.ts +55 -2
  78. package/es/components/iho-chat/src/Index.vue.d.ts +55 -2
  79. package/es/components/iho-chat/src/Index.vue2.js +1 -1
  80. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  81. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  82. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  83. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +11 -2
  84. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  85. package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
  86. package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
  87. package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
  88. package/es/components/iho-chat/src/components/ContextMenu.d.ts +11 -2
  89. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  90. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  91. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  92. package/es/components/iho-chat/src/components/SiderList.vue.d.ts +45 -0
  93. package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
  94. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  95. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  96. package/es/components/iho-chat/src/utils/index.js +1 -1
  97. package/es/components/iho-chat/style/index.css +1 -1
  98. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
  99. package/es/components/iho-table/src/plugins/dynamicFilterRenderPlugin/dynamicFilter.vue2.js +1 -1
  100. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue2.js +1 -1
  101. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  102. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  103. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  104. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  105. package/es/components/iho-table/src/utils/index.js +1 -1
  106. package/es/components/index.css +1 -1
  107. package/es/components/info-header/src/components/patientInfo/index.vue2.js +1 -1
  108. package/es/components/keyboard/src/Keyboard.vue2.js +1 -1
  109. package/es/components/keyboard/src/components/NumberPanel.vue2.js +1 -1
  110. package/es/components/map/src/Map.vue2.js +1 -1
  111. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -1
  112. package/es/components/quick-search/src/index.vue2.js +1 -1
  113. package/es/components/recommend-search/src/components/RecommendSelect.vue2.js +1 -1
  114. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  115. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -1
  116. package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
  117. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  118. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
  119. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
  120. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  121. package/es/components/scale-view/src/hooks/scaleview-methods.js +1 -1
  122. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  123. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
  124. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  125. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  126. package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
  127. package/es/components/select-label/src/components/label-classify.vue2.js +1 -1
  128. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  129. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  130. package/es/components/select-person/src/SelectPersonType.vue2.js +1 -1
  131. package/es/components/select-person/src/index.vue2.js +1 -1
  132. package/es/components/table-export-field/src/components/ExportModal.vue2.js +1 -1
  133. package/es/components/table-export-field/src/components/SaveProjectModal.vue2.js +1 -1
  134. package/es/components/table-filter/src/components/bi-filter/helpers/options.js +1 -1
  135. package/es/components/table-filter/src/components/bi-filter/index.vue2.js +1 -1
  136. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -1
  137. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -1
  138. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -1
  139. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  140. package/es/components/table-filter/src/components/render-widget/helpers/dateExtraMap.js +1 -1
  141. package/es/components/table-filter/src/components/render-widget/helpers/selectExtraMap.js +1 -1
  142. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  143. package/es/components/template-render/src/components/index.d.ts +23 -23
  144. package/es/components/tooth-bitmap/src/ToothBitmap.vue2.js +1 -1
  145. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -1
  146. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue2.js +1 -1
  147. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -1
  148. package/es/env.d.ts +25 -25
  149. package/es/shared/assets/img/ai__avatar.png.js +1 -1
  150. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  151. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  152. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  153. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  154. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  155. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  156. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  157. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  158. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  159. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  160. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  161. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  162. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  163. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  164. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  165. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  166. package/es/shared/assets/img/failure.png.js +1 -1
  167. package/es/shared/assets/img/logo.png.js +1 -1
  168. package/es/shared/assets/img/no-permission.png.js +1 -1
  169. package/es/shared/assets/img/nodata.png.js +1 -1
  170. package/es/shared/assets/img/notfound.png.js +1 -1
  171. package/es/shared/assets/img/qr.png.js +1 -1
  172. package/es/shared/assets/img/success.png.js +1 -1
  173. package/es/shared/assets/img/table_style_2.png.js +1 -1
  174. package/es/shared/assets/img/video.png.js +1 -1
  175. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  176. package/es/shared/assets/img/xb_big.png.js +1 -1
  177. package/es/shared/assets/img/xb_small.png.js +1 -1
  178. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  179. package/es/shared/package.json.js +1 -1
  180. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  181. package/es/shared/utils/tapable/index.d.ts +139 -0
  182. package/package.json +2 -2
@@ -130,6 +130,7 @@ declare const _default: import("vue").DefineComponent<{
130
130
  beforeMove: {
131
131
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
132
132
  };
133
+ showLowCodeReactions: BooleanConstructor;
133
134
  }, {
134
135
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
135
136
  maxHeight: {
@@ -257,11 +258,13 @@ declare const _default: import("vue").DefineComponent<{
257
258
  beforeMove: {
258
259
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
259
260
  };
261
+ showLowCodeReactions: BooleanConstructor;
260
262
  }>> & {
261
263
  onAddItem?: ((...args: any[]) => any) | undefined;
262
264
  onRemoveItem?: ((...args: any[]) => any) | undefined;
265
+ onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
263
266
  }>>;
264
- emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
267
+ emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
265
268
  uuid: string;
266
269
  cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
267
270
  fieldListRef: Ref<FormConfigItem[]>;
@@ -3787,6 +3790,104 @@ declare const _default: import("vue").DefineComponent<{
3787
3790
  }>>>;
3788
3791
  };
3789
3792
  }>>, {}>;
3793
+ FormConfigEventSetting: import("vue").DefineComponent<{
3794
+ modelValue: {
3795
+ type: ArrayConstructor;
3796
+ required: true;
3797
+ default: () => never[];
3798
+ };
3799
+ }, {
3800
+ props: {
3801
+ modelValue: LowCodeTypes.reactionConfig[];
3802
+ };
3803
+ emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
3804
+ cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
3805
+ valueRef: Ref<{
3806
+ conObj: {
3807
+ con: LowCodeTypes.VALUE_RELATION;
3808
+ field_key: string;
3809
+ value: unknown;
3810
+ }[];
3811
+ compareMap?: {
3812
+ NULL?: ((v1: any, v2: any) => boolean) | undefined;
3813
+ EQ?: ((v1: any, v2: any) => boolean) | undefined;
3814
+ BIG?: ((v1: any, v2: any) => boolean) | undefined;
3815
+ LESS?: ((v1: any, v2: any) => boolean) | undefined;
3816
+ BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
3817
+ LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
3818
+ CL?: ((v1: any, v2: any) => boolean) | undefined;
3819
+ NC?: ((v1: any, v2: any) => boolean) | undefined;
3820
+ NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3821
+ NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3822
+ } | undefined;
3823
+ isRestoreDefault?: boolean | undefined;
3824
+ sqlExpression?: string | undefined;
3825
+ showField?: string[] | undefined;
3826
+ hideField?: string[] | undefined;
3827
+ requiredField?: string[] | undefined;
3828
+ notRequiredField?: string[] | undefined;
3829
+ enabledField?: string[] | undefined;
3830
+ disabledField?: string[] | undefined;
3831
+ __oppositeBindField?: any | undefined;
3832
+ __oppositeTargetField?: any | undefined;
3833
+ }[]>;
3834
+ expandedName: Ref<string>;
3835
+ addConnection: () => void;
3836
+ removeConnection: (index: number) => void;
3837
+ getOppositeBtnText: (item: LowCodeTypes.reactionConfig) => string | undefined;
3838
+ unBindOpposite: (item: LowCodeTypes.reactionConfig) => void;
3839
+ addOppositeCondition: (item: LowCodeTypes.reactionConfig) => void;
3840
+ getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
3841
+ createOppositeCondition: (config: LowCodeTypes.reactionConfig) => LowCodeTypes.reactionConfig;
3842
+ isOppositeConfig: (c1: LowCodeTypes.reactionConfig, c2: LowCodeTypes.reactionConfig) => boolean;
3843
+ onUpdateExpandedNames: (value: string[]) => void;
3844
+ getBinderFieldDesc: (index: number) => string;
3845
+ addCondition: (config: LowCodeTypes.reactionConfig) => void;
3846
+ removeCondition: (config: LowCodeTypes.reactionConfig, index: number) => void;
3847
+ onUpdateConditionType: (condition: LowCodeTypes.reactionsConObj, type: LowCodeTypes.VALUE_RELATION) => void;
3848
+ showRef: Ref<boolean>;
3849
+ fieldListRef: Ref<FormConfigItem[]>;
3850
+ fieldOptions: import("vue").ComputedRef<FormConfigItem[]>;
3851
+ currentTypeList: string[];
3852
+ dialog: import("naive-ui").DialogApi;
3853
+ onNegativeClick: () => Promise<void>;
3854
+ onPositiveClick: () => Promise<void>;
3855
+ configValidate: () => Promise<void>;
3856
+ 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<{}>>, {}>;
3857
+ NButton: any;
3858
+ NModal: any;
3859
+ NSpace: any;
3860
+ NScrollbar: any;
3861
+ NThing: any;
3862
+ NInputGroup: any;
3863
+ NSelect: any;
3864
+ NInput: any;
3865
+ NCollapse: any;
3866
+ NCollapseItem: any;
3867
+ NEllipsis: any;
3868
+ NEmpty: any;
3869
+ NTooltip: any;
3870
+ NIcon: any;
3871
+ conditionTypeOptions: {
3872
+ value: LowCodeTypes.VALUE_RELATION;
3873
+ label: string;
3874
+ }[];
3875
+ connectionTypeOptions: {
3876
+ value: string;
3877
+ label: string;
3878
+ }[];
3879
+ }, 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<{
3880
+ modelValue: {
3881
+ type: ArrayConstructor;
3882
+ required: true;
3883
+ default: () => never[];
3884
+ };
3885
+ }>> & {
3886
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3887
+ onValidateFailure?: ((...args: any[]) => any) | undefined;
3888
+ }, {
3889
+ modelValue: unknown[];
3890
+ }>;
3790
3891
  FormConfigMaterialItem: import("vue").DefineComponent<{
3791
3892
  formConfigItem: {
3792
3893
  type: PropType<FormConfigItem>;
@@ -3819,7 +3920,7 @@ declare const _default: import("vue").DefineComponent<{
3819
3920
  FORM_CONFIG_GROUP: string;
3820
3921
  NSelect: any;
3821
3922
  NSpace: any;
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<{
3923
+ }, 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<{
3823
3924
  maxHeight: {
3824
3925
  type: StringConstructor;
3825
3926
  };
@@ -3945,8 +4046,12 @@ declare const _default: import("vue").DefineComponent<{
3945
4046
  beforeMove: {
3946
4047
  type: PropType<((payload: import("../../../components/form-config/src/types").FormConfigBeforeMovePayload) => boolean | void) | undefined>;
3947
4048
  };
4049
+ showLowCodeReactions: BooleanConstructor;
3948
4050
  }>> & {
3949
4051
  onAddItem?: ((...args: any[]) => any) | undefined;
3950
4052
  onRemoveItem?: ((...args: any[]) => any) | undefined;
3951
- }, {}>;
4053
+ onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
4054
+ }, {
4055
+ showLowCodeReactions: boolean;
4056
+ }>;
3952
4057
  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,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
+ 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 u,createVNode as f,isRef as d,withCtx as c,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 F}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as V}from"./hooks/useLocale.js";import b from"../../../shared/components/VueDraggable/src/vuedraggable.js";import M from"./components/FormConfigCreator.vue.js";import w from"./components/FormConfigDragDisplay.vue.js";import R from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigEventSetting.vue.js";import E from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as S,InjectionFormConfigEmit as A,InjectionFieldList as I,InjectionMaterialList as U,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as T}from"./constants/index.js";import{fieldItemNormalize as z}from"./utils/index.js";import{useSortableConfig as B}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},G={class:"form-config__displayWrapper"},J={class:"form-config__displayHeader"},K={class:"form-config__config"},Q={class:"form-config__configHeader"},X={class:"form-config__configContent"};var Y=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},showLowCodeReactions:Boolean},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Y,emit:Z}){const $=e;o(S,$),o(A,Z);const ee=j(),oe=h(),te=t([]);o(I,te);const re=t([]);o(U,re);const ae=t([]);function ie(e){te.value.some((o=>o.key===e.key))||te.value.push(e)}o(O,ae);const se=(e,o)=>x($.textFormatter)?$.textFormatter(e,o):o,le=t();o(P,le);const ne=t(),{transform:me,inverseTransform:ue}=H($),fe=r({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,z(o),re.value.push(o),Z("addItem",o))}}),de=t([]),ce=r((()=>{if(!_(de.value))return[];const e=[];return k([...re.value,...te.value],(o=>e.push(o.key))),de.value.filter((o=>!e.find((e=>e===o.key))))}));async function pe(){$.extraMaterialList&&!de.value.length&&(de.value=x($.extraMaterialList)?await $.extraMaterialList():$.extraMaterialList)}return Y({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 z(o);var o})),te.value=me(t),re.value=r,ae.value=o,le.value=void 0},validate(){var e;return null==(e=ne.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:ue(y(a(te.value)),e,{show:!0}),materialList:ue(y(a(re.value)),e,{show:!1}),lowCodeReactions:y(a(ae.value))}),clearExtraList(){de.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(oe)},id:n(ee)},n(F)()),[m("section",W,[m("header",q,u(n(V)("materialArea")),1),f(n(b),l(B({fieldList:te,materialList:re,hooks:{beforeMove:$.beforeMove}}),{class:"form-config__materialContent",modelValue:n(re),"onUpdate:modelValue":t[0]||(t[0]=e=>d(re)?re.value=e:null)}),{item:c((({element:e})=>[f(n(E),{"form-config-item":e,"text-formatter":se,"material-List":n(re)},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=>d(fe)?fe.value=e:null),placeholder:n(V)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:pe},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",G,[m("header",J,[g(u(n(V)("layoutArea"))+" ",1),f(n(C),null,{default:c((()=>[e.showLowCodeReactions?(i(),p(D,{key:0,modelValue:ae.value,"onUpdate:modelValue":t[2]||(t[2]=e=>ae.value=e),onValidateFailure:t[3]||(t[3]=e=>Z("reactionsValidateFailure",e))},null,8,["modelValue"])):v("v-if",!0),f(M,{onSubmit:ie})])),_:1})]),f(w,{class:"form-config__displayContent",group:n(T),"text-formatter":se,modelValue:n(te),"onUpdate:modelValue":t[4]||(t[4]=e=>d(te)?te.value=e:null)},null,8,["group","modelValue"])]),m("section",K,[m("header",Q,u(n(V)("configArea")),1),m("section",X,[f(R,{ref_key:"formConfigEditRef",ref:ne,uuid:n(ee),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{Y as default};
@@ -0,0 +1 @@
1
+ import e from"./FormConfigEventSetting.vue2.js";import t from"../../../../_virtual/_plugin-vue_export-helper.js";var r=t(e,[["__file","FormConfigEventSetting.vue"]]);export{r as default};
@@ -0,0 +1 @@
1
+ import{defineComponent as e,ref as l,watchEffect as o,watch as n,inject as i,computed as a,reactive as t,openBlock as s,createElementBlock as d,createVNode as u,unref as r,withCtx as p,createTextVNode as c,normalizeStyle as v,createElementVNode as _,Fragment as f,renderList as m,createBlock as g,toDisplayString as h,withModifiers as y,createCommentVNode as b,normalizeClass as k}from"vue";import{useTheme as F}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{cloneDeep as x,isEmpty as O,isArray as w,union as C,omit as j}from"lodash-es";import"@vue/shared";import{traverse as B}from"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import{HelpCircleSharp as T}from"@vicons/ionicons5";import{useDialog as L,NButton as E,NModal as N,NScrollbar as U,NCollapse as z,NCollapseItem as q,NEllipsis as P,NThing as R,NSpace as $,NInputGroup as I,NSelect as A,NInput as D,NTooltip as V,NIcon as H,NEmpty as M}from"naive-ui";import"../../../../shared/hooks/useScrollLoading.js";import{conditionOppositeMap as S,connectionTypeOptions as W,connectionTypeOppositeMap as X,InjectionFieldList as G,conditionTypeOptions as J}from"../constants/index.js";const K={class:"form-config__connectionOperation"},Q={class:"form-config__connectionConditionHeaderDesc"},Y={class:"form-config__connectionCondition"},Z={class:"form-config__connectionConditionItem"},ee={style:{"margin-right":"8px"}},le={class:"form-config__connectionFieldType"},oe=["onClick"],ne={style:{display:"inline-flex","align-items":"center",gap:"4px","margin-bottom":"4px"}};var ie=e({__name:"FormConfigEventSetting",props:{modelValue:{default:()=>[]}},emits:["update:modelValue","validateFailure"],setup(e,{emit:ie}){const ae=e,te=F(),se=l([]),de=l("");function ue(){se.value.push({conObj:[]}),de.value=se.value.length-1+""}function re(e){return e.__oppositeBindField?`已绑定互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeBindField))+1}`:e.__oppositeTargetField?`已关联互斥联动: 联动${se.value.findIndex((l=>l===e.__oppositeTargetField))+1}`:void 0}function pe(e){return null==e?void 0:e.replace(/(AND|OR)/g,(e=>"AND"===e?"OR":"AND"))}function ce(e){var l;const o=e.__oppositeTargetField||{conObj:[]};return o.conObj=x(e.conObj),null==(l=o.conObj)||l.forEach((e=>{e.con=S[e.con]})),o.sqlExpression=pe(e.sqlExpression),W.forEach((({value:l})=>{O(e[l])?Reflect.deleteProperty(o,X[l]):o[X[l]]=x(e[l])})),o.__oppositeBindField=e,o}function ve(e,l){var o,n,i,a;return(null==(o=e.conObj)?void 0:o.length)===(null==(n=l.conObj)?void 0:n.length)&&(!(e.conObj&&l.conObj&&e.conObj.some((e=>!l.conObj.find((l=>{return n=l,(o=e).field_key===n.field_key&&o.con&&S[o.con]===n.con&&o.value===n.value;var o,n})))))&&(i=e.sqlExpression,a=l.sqlExpression,(!i&&!a||pe(i)===a)&&!W.some((({value:o})=>{return n=e[o],i=l[X[o]],!(n&&i?n.length===i.length&&n.every((e=>i.some((l=>e===l)))):!n&&!i);var n,i}))))}function _e(e){de.value=e[0]}function fe(e){const l=se.value[e];if(!l)return"";const o=l.conObj||[],n=W.reduce(((e,{value:o})=>(w(l[o])&&l[o].length&&e.push(...l[o].map(a)),e)),[]),i=C([...o.map((({field_key:e})=>a(e))),...n]).filter((e=>!!e));return i.length?`( 相关字段: ${i} )`:"";function a(e){var l,o;return null!=(o=null==(l=he.value.find((l=>e===l.key)))?void 0:l.name)?o:e}}o((()=>{se.value.forEach((e=>{e.__oppositeTargetField&&(e.__oppositeTargetField=ce(e))}))}));const me=l(!1);n(me,(e=>{e&&(se.value=x(ae.modelValue),se.value.forEach(((e,l)=>{if(e.__oppositeBindField||e.__oppositeTargetField)return;const o=se.value.find(((o,n)=>n!==l&&!o.__oppositeBindField&&!o.__oppositeTargetField&&ve(o,e)));o&&(o.__oppositeBindField=e,e.__oppositeTargetField=o)})))}));const ge=i(G,l([])),he=a((()=>{const e=[];return B(ge.value,(l=>{!["NEWLINE","LINE_BAR","COMPLEX","COMBINATION"].includes(l.type)&&e.push(l)})),e})),ye=t([]),be=L();async function ke(){var e,l;be.warning({title:"提示",content:"直接关闭弹窗会丢失已编辑的配置, 确定要关闭吗?",positiveText:(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定",negativeText:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.28"))||"取消",onPositiveClick:()=>{me.value=!1,se.value=[]}})}async function Fe(){try{await function(){var e;const l=[];return null==(e=se.value)||e.forEach(((e,o)=>{const n=[];e.conObj&&e.conObj.length?e.conObj.forEach(((e,l)=>{e.field_key||n.push(`条件${l+1}字段为空`),e.con||n.push(`条件${l+1}判断类型为空`),["NULL","NOT_NULL"].includes(e.con)||!e.con||e.value||n.push(`条件${l+1}值为空`)})):n.push("联动条件为空"),W.every((({value:l})=>!e[l]||!e[l].length))&&n.push("联动字段为空"),n.length&&l.push(`联动${o+1}: ${n}`)})),l.length?Promise.reject(l):Promise.resolve()}(),me.value=!1,ie("update:modelValue",se.value.map((e=>j(e,["__oppositeBindField","__oppositeTargetField"]))))}catch(e){ie("validateFailure",e)}}return(e,l)=>(s(),d("section",null,[u(r(E),{size:"small",onClick:l[0]||(l[0]=e=>me.value=!0)},{default:p((()=>[c("调整联动绑定")])),_:1}),u(r(N),{show:me.value,"onUpdate:show":l[1]||(l[1]=e=>me.value=e),closable:!1,bordered:!1,"show-icon":!1,title:"联动绑定设置",preset:"dialog","mask-closable":!1,"close-on-esc":!1,style:v({width:"1000px",...r(te)}),class:"form-config__connectionModal"},{action:p((()=>[u(r(E),{size:"small",onClick:ke},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.28"))||"取消")]})),_:1}),u(r(E),{size:"small",onClick:Fe,type:"primary"},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.27"))||"确定")]})),_:1})])),default:p((()=>[_("header",K,[u(r(E),{onClick:ue,size:"small"},{default:p((()=>[c("新增联动")])),_:1})]),u(r(U),{style:{"max-height":"500px","min-height":"500px"}},{default:p((()=>[u(r(z),{accordion:"","expanded-names":de.value,"onUpdate:expandedNames":_e},{default:p((()=>[(s(!0),d(f,null,m(se.value,((e,l)=>(s(),g(r(q),{name:l+""},{header:p((()=>[c(" 联动"+h(l+1)+" ",1),u(r(P),{class:"form-config__connectionConditionHeaderDesc",style:{"max-width":"500px"}},{default:p((()=>[c(h(fe(l)),1)])),_:2},1024)])),"header-extra":p((()=>[e.__oppositeBindField||e.__oppositeTargetField?(s(),d(f,{key:1},[_("span",Q,"( "+h(re(e))+" )",1),u(r(E),{quaternary:"",type:"primary",size:"small",onClick:y((l=>function(e){const l=e.__oppositeTargetField||e.__oppositeBindField;l&&[l,e].forEach((e=>{Reflect.deleteProperty(e,"__oppositeBindField"),Reflect.deleteProperty(e,"__oppositeTargetField")}))}(e)),["stop"])},{default:p((()=>[c("解除互斥")])),_:2},1032,["onClick"])],64)):(s(),g(r(E),{key:0,onClick:y((l=>function(e){se.value.push(e.__oppositeTargetField=ce(e))}(e)),["stop"]),quaternary:"",type:"primary",size:"small"},{default:p((()=>[c(" 创建互斥条件 ")])),_:2},1032,["onClick"])),u(r(E),{onClick:y((e=>function(e){var l;const o=null==(l=se.value)?void 0:l.splice(e,1);null==o||o.forEach((e=>{const l=e.__oppositeTargetField||e.__oppositeBindField;l&&(Reflect.deleteProperty(l,"__oppositeTargetField"),Reflect.deleteProperty(l,"__oppositeBindField"))})),ye.splice(e,1),!de.value||+de.value<e||(de.value=de.value===e+""?"":+de.value-1+"")}(l)),["stop"]),quaternary:"",type:"error",size:"small"},{default:p((()=>{var e;return[c((null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.88"))||"移除")]})),_:2},1032,["onClick"])])),default:p((()=>[u(r(R),{class:"form-config__connectionWrapper"},{default:p((()=>[u(r($),{justify:"space-between",wrap:!1},{default:p((()=>[_("section",Y,[_("header",null,[c(" 条件 "),e.__oppositeBindField?b("v-if",!0):(s(),g(r(E),{key:0,size:"small",quaternary:"",type:"primary",onClick:l=>{var o;w((o=e).conObj)?o.conObj.push({}):o.conObj=[{}]}},{default:p((()=>[c(" 添加条件 ")])),_:2},1032,["onClick"]))]),u(r(U),{style:{"max-height":"145px","min-height":"145px"},class:"form-config__connectionWrapper"},{default:p((()=>[(s(!0),d(f,null,m(e.conObj||[],((l,o)=>(s(),d("div",Z,[_("span",ee,h(o+1),1),u(r(I),{size:"small"},{default:p((()=>[u(r(A),{value:l.field_key,"onUpdate:value":e=>l.field_key=e,disabled:!!e.__oppositeBindField,placeholder:"请选择字段",options:r(he),"label-field":"name","value-field":"key",filterable:""},null,8,["value","onUpdate:value","disabled","options"]),u(r(A),{value:l.con,disabled:!!e.__oppositeBindField,"onUpdate:value":e=>function(e,l){e.con=l,["NOT_NULL","NULL"].includes(l)&&Reflect.deleteProperty(e,"value")}(l,e),placeholder:"请选择判断类型",options:r(J)},null,8,["value","disabled","onUpdate:value","options"]),l.con&&!["NULL","NOT_NULL"].includes(l.con)?(s(),g(r(D),{key:0,disabled:!!e.__oppositeBindField,value:l.value,"onUpdate:value":e=>l.value=e,placeholder:"请输入值",clearable:""},null,8,["disabled","value","onUpdate:value"])):b("v-if",!0)])),_:2},1024),u(r(E),{disabled:!!e.__oppositeBindField,quaternary:"",onClick:l=>function(e,l){w(e.conObj)&&e.conObj.splice(l,1)}(e,o),type:"error",size:"small"},{default:p((()=>[c(" 移除 ")])),_:2},1032,["disabled","onClick"])])))),256))])),_:2},1024)]),_("section",le,[_("div",null,[(s(!0),d(f,null,m(r(W),(o=>{var n,i;return s(),d("div",{key:o.value,class:k({"is-active":ye[l]===o.value}),onClick:e=>ye[l]=o.value},h(o.label)+" ( "+h(null!=(i=null==(n=e[o.value])?void 0:n.length)?i:0)+" ) ",11,oe)})),128))]),_("div",null,[ye[l]?(s(),g(r(A),{key:0,value:e[ye[l]],"onUpdate:value":o=>e[ye[l]]=o,disabled:!!e.__oppositeBindField,multiple:"",placeholder:"请选择字段",options:r(he),"label-field":"name","value-field":"key",filterable:"","max-tag-count":10},null,8,["value","onUpdate:value","disabled","options"])):b("v-if",!0)])])])),_:2},1024),_("section",null,[_("label",null,[_("span",ne,[c(" 条件逻辑 "),u(r(V),null,{trigger:p((()=>[u(r(H),{size:"16",component:r(T)},null,8,["component"])])),default:p((()=>[c(" 非必填, 默认为需要全部满足. 示例: (1 AND 2) OR 3, 表示 条件1和2需要满足其一, 条件3必须满足 ")])),_:1})]),u(r(D),{value:e.sqlExpression,"onUpdate:value":l=>e.sqlExpression=l,disabled:!!e.__oppositeBindField,placeholder:"请输入条件逻辑"},null,8,["value","onUpdate:value","disabled"])])])])),_:2},1024)])),_:2},1032,["name"])))),256))])),_:1},8,["expanded-names"]),se.value.length?b("v-if",!0):(s(),g(r(M),{key:0,size:"huge",style:{"margin-top":"20px"},description:"无联动配置"}))])),_:1})])),_:1},8,["show","style"])]))}});export{ie as default};
@@ -1 +1 @@
1
- import{range as e}from"lodash-es";import{useFormConfigLocale as l}from"../hooks/useLocale.js";function a(e){return new Map([["LINE_BAR",l("layoutArea.linebar")],["NEWLINE",l("layoutArea.linebreak")]]).get(e)||""}var i=(e=>(e.KEY="key",e.NAME="name",e.ALIAS="alias",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(i||{});function t(){return{option:[{text:l("configArea.fullLine"),value:"ALL_LINE"},{text:l("configArea.halfLine"),value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function u(){return{option:e(1,11).map((e=>({text:`${e}`,value:e})))}}function o(){return{open:{value:!0},close:{value:!1}}}function n(){return{open:{value:!0},close:{value:!1}}}function E(){return{open:{value:!0},close:{value:!1}}}function d(){return{open:{value:!0},close:{value:!1}}}function r(){return{open:{value:!0},close:{value:!1}}}const L={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},v=[{value:"EQ",label:"等于"},{value:"NEQ",label:"不等于"},{value:"CL",label:"包含"},{value:"NC",label:"不包含"},{value:"NULL",label:"为空"},{value:"NOT_NULL",label:"不为空"},{value:"BIG",label:"大于"},{value:"BIGEQ",label:"大于等于"},{value:"LESS",label:"小于"},{value:"LESSEQ",label:"小于等于"}],b={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},F=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],N="__display",c=Symbol("InjectionFieldList"),s=Symbol("InjectionMaterialList"),I=Symbol("InjectionLowCodeReactions"),S=Symbol("InjectionActiveFieldItem"),f=Symbol("InjectionFormConfigEmit"),_=Symbol("InjectionFormConfigProps");export{i as EditAbleField,N as FORM_CONFIG_GROUP,S as InjectionActiveFieldItem,c as InjectionFieldList,f as InjectionFormConfigEmit,_ as InjectionFormConfigProps,I as InjectionLowCodeReactions,s as InjectionMaterialList,L as conditionOppositeMap,v as conditionTypeOptions,b as connectionTypeOppositeMap,F as connectionTypeOptions,a as getWidgetText,E as isEditOptionConfig,n as isNotFoldOptionConfig,d as isNullOptionConfig,o as isShowOptionConfig,r as isVisibleOptionConfig,u as rowsOptionConfig,t as widgetWidthOptionConfig};
1
+ import{range as e}from"lodash-es";import{useFormConfigLocale as l}from"../hooks/useLocale.js";var a,o,n,i,d,u,t,E,L,v;function w(e){return new Map([["LINE_BAR",l("layoutArea.linebar")],["NEWLINE",l("layoutArea.linebreak")]]).get(e)||""}var r=(e=>(e.KEY="key",e.NAME="name",e.ALIAS="alias",e.NOTES="notes",e.DEFAULT_VALUE="defaultValue",e.LAYOUT_WIDTH_ENUM="layoutWidthEnum",e.DESC="desc",e.DEFAULT_EXPAND="defaultExpand",e.FOLD="fold",e.REQUIRED="required",e.EDITABLE="editable",e.SHOW="show",e.ROWS="initialHigh",e))(r||{});function c(){return{option:[{text:l("configArea.fullLine"),value:"ALL_LINE"},{text:l("configArea.halfLine"),value:"HALF_LINE"},{text:"5/6",value:"FIVE_SIX"},{text:"2/3",value:"TWO_THREE"},{text:"1/3",value:"ONE_THREE"},{text:"3/4",value:"THREE_FOUR"},{text:"1/4",value:"ONE_FOUR"},{text:"1/6",value:"ONE_SIX"},{text:"1/8",value:"ONE_EIGHT"}]}}function g(){return{option:e(1,11).map((e=>({text:`${e}`,value:e})))}}function b(){return{open:{value:!0},close:{value:!1}}}function F(){return{open:{value:!0},close:{value:!1}}}function N(){return{open:{value:!0},close:{value:!1}}}function s(){return{open:{value:!0},close:{value:!1}}}function I(){return{open:{value:!0},close:{value:!1}}}const S={EQ:"NEQ",NEQ:"EQ",CL:"NC",NC:"CL",NULL:"NOT_NULL",NOT_NULL:"NULL",BIG:"LESSEQ",BIGEQ:"LESS",LESS:"BIGEQ",LESSEQ:"BIG"},y=[{value:"EQ",label:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.317"))||"等于"},{value:"NEQ",label:(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.318"))||"不等于"},{value:"CL",label:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.340"))||"包含"},{value:"NC",label:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.341"))||"不包含"},{value:"NULL",label:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.338"))||"为空"},{value:"NOT_NULL",label:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.339"))||"不为空"},{value:"BIG",label:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.319"))||"大于"},{value:"BIGEQ",label:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.321"))||"大于等于"},{value:"LESS",label:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.320"))||"小于"},{value:"LESSEQ",label:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.322"))||"小于等于"}],C={showField:"hideField",hideField:"showField",requiredField:"notRequiredField",notRequiredField:"requiredField",enabledField:"disabledField",disabledField:"enabledField"},f=[{value:"showField",label:"显示字段"},{value:"hideField",label:"隐藏字段"},{value:"requiredField",label:"必填字段"},{value:"notRequiredField",label:"非必填字段"},{value:"enabledField",label:"启用字段"},{value:"disabledField",label:"禁用字段"}],_="__display",B=Symbol("InjectionFieldList"),m=Symbol("InjectionMaterialList"),A=Symbol("InjectionLowCodeReactions"),p=Symbol("InjectionActiveFieldItem"),O=Symbol("InjectionFormConfigEmit"),T=Symbol("InjectionFormConfigProps");export{r as EditAbleField,_ as FORM_CONFIG_GROUP,p as InjectionActiveFieldItem,B as InjectionFieldList,O as InjectionFormConfigEmit,T as InjectionFormConfigProps,A as InjectionLowCodeReactions,m as InjectionMaterialList,S as conditionOppositeMap,y as conditionTypeOptions,C as connectionTypeOppositeMap,f as connectionTypeOptions,w as getWidgetText,N as isEditOptionConfig,F as isNotFoldOptionConfig,s as isNullOptionConfig,b as isShowOptionConfig,I as isVisibleOptionConfig,g as rowsOptionConfig,c as widgetWidthOptionConfig};
@@ -1 +1 @@
1
- import{deepMerge as e}from"../../../../shared/utils/index.js";import{property as i}from"lodash-es";import{reactive as a}from"vue";const t=a({materialArea:{areaName:"物料区",createMaterialPlaceholder:"请选择额外物料",toString(){return this.areaName}},layoutArea:{areaName:"布局区",linebreak:"分行符",linebar:"分线栏",createLinebreak:"新建分行符",createLinebar:"新建分线栏",toString(){return this.areaName}},configArea:{areaName:"配置区",field:"字段",name:"名称",alias:"别名",defaultValue:"默认值",width:"宽度",describeText:"说明文本",tips:"问号提示",isRequired:"是否必填",isEditable:"是否可编辑",isExpand:"是否默认展开",isFoldAble:"是否可折叠",isShow:"是否显示",modifyOptionTitle:"修改选项文本",modifyOptionName:"值",modifyOptionOriginText:"原文本",modifyOptionNewText:"调整后文本",rowsHeight:"高度",rowsTips:"默认为3行高度,可调整为1-10行高度",positiveBtn:"确定",negativeBtn:"取消",fullLine:"整行",halfLine:"半行",toString(){return this.areaName}}});function r(i){e(t,i),console.log(t)}function o(e){const a=i(e)(t);return a?a+"":""}export{r as registFormConfigLocale,o as useFormConfigLocale};
1
+ import{deepMerge as o}from"../../../../shared/utils/index.js";import{property as e}from"lodash-es";import{reactive as n}from"vue";var l,i,a,d,w,g,t,u,r,c,y,v,L,B,C,s,m,f,p,h,N,b,x,O,T,A,S,k,E,j;const q=n({materialArea:{areaName:(null==(l=window.getLanguageByCode)?void 0:l.call(window,"10010.1.1"))||"物料区",createMaterialPlaceholder:(null==(i=window.getLanguageByCode)?void 0:i.call(window,"10010.1.2"))||"请选择额外物料",toString(){return this.areaName}},layoutArea:{areaName:(null==(a=window.getLanguageByCode)?void 0:a.call(window,"10010.1.3"))||"布局区",linebreak:(null==(d=window.getLanguageByCode)?void 0:d.call(window,"10010.1.4"))||"分行符",linebar:(null==(w=window.getLanguageByCode)?void 0:w.call(window,"10010.1.5"))||"分线栏",createLinebreak:(null==(g=window.getLanguageByCode)?void 0:g.call(window,"10010.1.6"))||"新建分行符",createLinebar:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.7"))||"新建分线栏",toString(){return this.areaName}},configArea:{areaName:(null==(u=window.getLanguageByCode)?void 0:u.call(window,"10010.1.8"))||"配置区",field:(null==(r=window.getLanguageByCode)?void 0:r.call(window,"10010.1.9"))||"字段",name:(null==(c=window.getLanguageByCode)?void 0:c.call(window,"10010.1.10"))||"名称",alias:(null==(y=window.getLanguageByCode)?void 0:y.call(window,"10010.1.11"))||"别名",defaultValue:(null==(v=window.getLanguageByCode)?void 0:v.call(window,"10010.1.12"))||"默认值",width:(null==(L=window.getLanguageByCode)?void 0:L.call(window,"10010.1.13"))||"宽度",describeText:(null==(B=window.getLanguageByCode)?void 0:B.call(window,"10010.1.14"))||"说明文本",tips:(null==(C=window.getLanguageByCode)?void 0:C.call(window,"10010.1.15"))||"问号提示",isRequired:(null==(s=window.getLanguageByCode)?void 0:s.call(window,"10010.1.16"))||"是否必填",isEditable:(null==(m=window.getLanguageByCode)?void 0:m.call(window,"10010.1.17"))||"是否可编辑",isExpand:(null==(f=window.getLanguageByCode)?void 0:f.call(window,"10010.1.18"))||"是否默认展开",isFoldAble:(null==(p=window.getLanguageByCode)?void 0:p.call(window,"10010.1.19"))||"是否可折叠",isShow:(null==(h=window.getLanguageByCode)?void 0:h.call(window,"10010.1.20"))||"是否显示",modifyOptionTitle:(null==(N=window.getLanguageByCode)?void 0:N.call(window,"10010.1.21"))||"修改选项文本",modifyOptionName:(null==(b=window.getLanguageByCode)?void 0:b.call(window,"10010.1.22"))||"值",modifyOptionOriginText:(null==(x=window.getLanguageByCode)?void 0:x.call(window,"10010.1.23"))||"原文本",modifyOptionNewText:(null==(O=window.getLanguageByCode)?void 0:O.call(window,"10010.1.24"))||"调整后文本",rowsHeight:(null==(T=window.getLanguageByCode)?void 0:T.call(window,"10010.1.25"))||"高度",rowsTips:(null==(A=window.getLanguageByCode)?void 0:A.call(window,"10010.1.26"))||"默认为3行高度,可调整为1-10行高度",positiveBtn:(null==(S=window.getLanguageByCode)?void 0:S.call(window,"10010.1.27"))||"确定",negativeBtn:(null==(k=window.getLanguageByCode)?void 0:k.call(window,"10010.1.28"))||"取消",fullLine:(null==(E=window.getLanguageByCode)?void 0:E.call(window,"10010.1.29"))||"整行",halfLine:(null==(j=window.getLanguageByCode)?void 0:j.call(window,"10010.1.30"))||"半行",toString(){return this.areaName}}});function F(e){o(q,e),console.log(q)}function H(o){const n=e(o)(q);return n?n+"":""}export{F as registFormConfigLocale,H as useFormConfigLocale};
@@ -1 +1 @@
1
- import{ref as e,computed as o,watch as r,onBeforeUnmount as t,createVNode as m,mergeProps as a}from"vue";import{autorun as n}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as l}from"@vicons/ionicons5";import{isNumber as u,isArray as c,isFunction as d}from"lodash-es";import{NButton as s,NIcon as p}from"naive-ui";import"../../../../../index.js";import{useFormField as v}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=v(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{c(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return t(n((()=>{c(x.value.value)&&(N.value=x.value.value.map(((e,o)=>d(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return m("header",{class:"form-render__combinationHeader"},[f.showLabel?m("div",{class:"form-render__combinationHeaderText"},[f.title]):null,m(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>m(p,{component:i},null),default:()=>"新增"})])},renderRemoveBtn:function(e,o){return m(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>m(p,{component:l},null)})}}}export{f as useCombination};
1
+ import{ref as e,computed as o,watch as r,onBeforeUnmount as n,createVNode as t,mergeProps as a}from"vue";import{autorun as l}from"@formily/reactive";import{AddCircleOutline as i,RemoveCircle as m}from"@vicons/ionicons5";import{isNumber as u,isArray as d,isFunction as c}from"lodash-es";import{NButton as s,NIcon as v}from"naive-ui";import"../../../../../index.js";import{useFormField as p}from"../../../../hooks/useFormField.js";function f(f){var b;const{field:x}=p(),h=e(null!=(b=f.minGroupNum)?b:1),G=o((()=>u(f.maxGroupNum)?f.maxGroupNum<1?0:~~f.maxGroupNum:1/0));r((()=>f.value),(e=>{d(e)&&(h.value=Math.min(Math.max(e.length,f.minGroupNum),G.value))}),{immediate:!0});const N=e([]);return n(l((()=>{d(x.value.value)&&(N.value=x.value.value.map(((e,o)=>c(f.combinationItemDeletable)?f.combinationItemDeletable(e||{},o):f.combinationItemDeletable)))}))),{deletableList:N,currentGroupNum:h,maxGroupNum:G,renderHeader:function(e){return t("header",{class:"form-render__combinationHeader"},[f.showLabel?t("div",{class:"form-render__combinationHeaderText"},[f.title]):null,t(s,a(e,{text:!0,style:{"--n-text-color":"var(--c-primary-color)"},disabled:h.value>=G.value||f.disabled}),{icon:()=>t(v,{component:i},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.279"))||"新增"}})])},renderRemoveBtn:function(e,o){return t(s,a(e,{text:!0,disabled:!N.value[o],type:"error",size:"small"}),{icon:()=>t(v,{component:m},null)})}}}export{f as useCombination};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as u}from"@formily/path";import{AddCircleOutline as a,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as b,NIcon as g}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as _,mergeDeepProperties as j}from"../../../utils/index.js";import{assignUpdateValue as C}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){_("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(C.value))}),300),C=o([]),G=r((()=>C.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,C.value)&&(n.splice(J.value),n.forEach((function(o,n){if(!N(o))return;C.value[n]=o,r&&j(o,e.properties)})),C.value.splice(n.length),C.value.forEach(A))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function A(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=u.getIn(e,o.path))}))}function F(){C.value.push(j({},e.properties)),y()}v().bindDeepValidate(S);const J=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(J,(e=>{G.value<=e||(C.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const O=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(b,{onClick:F,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=J.value},{icon:()=>i(g,{component:a},null),default:()=>"新增"})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(O,{ref:e=>function(e,o){S.value[e]=o,A(C.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!C.value[e]&&(C.value[e]={}),u.setIn(C.value[e],o,r),y()}(r,e)},null),i(b,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){C.value.length>e.minGroupNum?(C.value.splice(o,1),S.value.splice(o,1)):C.value.splice(o,1,{}),y()}(r)},{icon:()=>i(g,{component:m},null)})])))])}}),y(C));export{G as JSON_COMBINATION};
1
+ import{defineComponent as e,ref as o,computed as r,watch as n,onMounted as t,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as m}from"@vicons/ionicons5";import{range as s,isNumber as p,isArray as c,isEqual as f}from"lodash-es";import"../../../../index.js";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{connect as d,mapProps as y}from"@formily/vue";import{useDebounceFn as h,isObject as N}from"@vueuse/core";import{NButton as g,NIcon as b}from"naive-ui";import x from"../../../FormRender.vue.js";import{formRenderLog as C,mergeDeepProperties as _}from"../../../utils/index.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const G=d(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},properties:{type:Array,default:()=>[]},showLabel:Boolean,onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:d}){C("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const y=h((function(){d("update:value",JSON.stringify(j.value))}),300),j=o([]),G=r((()=>j.value.length));function I(o,r=!1){c(o)&&(o.length||o.push(...s(e.minGroupNum).map((()=>({})))),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var t;(t=n)&&!f(t,j.value)&&(n.splice(F.value),n.forEach((function(o,n){if(!N(o))return;j.value[n]=o,r&&_(o,e.properties)})),j.value.splice(n.length),j.value.forEach(w))}n((()=>e.value),(e=>I(e))),t((()=>{const o=`[${s(e.minGroupNum).map((()=>"{}")).join(",")}]`;I(e.value||o,!0),y()}));const S=o([]);function w(e,o){var r;null==(r=S.value[o])||r.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function A(){j.value.push(_({},e.properties)),y()}v().bindDeepValidate(S);const F=r((()=>p(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(F,(e=>{G.value<=e||(j.value.splice(e),y(),S.value.splice(e))}),{immediate:!0});const J=x;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(g,{onClick:A,style:{"--n-text-color":"var(--c-primary-color)"},text:!0,disabled:G.value>=F.value},{icon:()=>i(b,{component:u},null),default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.279"))||"新增"}})]),s(G.value).map(((o,r)=>i("section",{class:"form-render__combinationContentJson"},[i(J,{ref:e=>function(e,o){S.value[e]=o,w(j.value[e]||{},e)}(r,e),fieldList:e.properties,onFormChange:e=>function(e,{fieldKey:o,value:r}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,r),y()}(r,e)},null),i(g,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(o){j.value.length>e.minGroupNum?(j.value.splice(o,1),S.value.splice(o,1)):j.value.splice(o,1,{}),y()}(r)},{icon:()=>i(b,{component:m},null)})])))])}}),y(j));export{G as JSON_COMBINATION};
@@ -1 +1 @@
1
- import{defineComponent as e,ref as a,watch as o,onMounted as t,createVNode as l}from"vue";import{arrayed as u}from"../../../../../../shared/utils/index.js";import{isField as r}from"@formily/core";import{connect as i,mapProps as n}from"@formily/vue";import{isArray as m,property as s}from"lodash-es";import"../../../../index.js";import"../../../../../iho-table/index.js";import p from"../../../../../iho-table/src/IhoTable.vue.js";import{useCombination as f}from"./hooks/useCombination.js";import{assignUpdateValue as v}from"../../../utils/schema.js";import{useColumnConfigAdaptor as d}from"../../../../../iho-table/src/hooks/useColumnConfigAdaptor.js";import{useFormField as c}from"../../../hooks/useFormField.js";const b=i(e({name:"FormTableCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:i}){const{formConfigLikeAdaptor:n}=d(),{fieldList:v,editRules:b}=n({fieldList:e.properties}),{currentGroupNum:h,renderRemoveBtn:y,renderHeader:j}=f(e),g=a({editRules:b}),C=a(e.value);async function N(){h.value++,m(C.value)?C.value.push({}):(C.value=[{}],i("update:value",C.value))}o((()=>e.value),(e=>{C.value=e}));const x=v.concat({alias:"操作",columnName:"operation",width:60,isFixed:2,align:"center",slots:{default:({rowIndex:e})=>y({onClick:()=>async function(e){if(m(C.value))if(h.value>1)h.value--,C.value.splice(e,1);else if(1===C.value.length){const e=C.value[0];v.forEach((a=>{a.columnName&&(a.defaultValue?e[a.columnName]=a.defaultValue:Reflect.deleteProperty(e,a.columnName))}))}}(e)},e)}});t((()=>{if(!m(C.value))return C.value=[{}],void i("update:value",C.value);C.value.length||C.value.push({})}));const{field:k}=c(),F=a();async function A(){if(!F.value)return;const e=await F.value.$table.validate(!0);return e?Object.values(e).map((e=>e.map(s("rule.message")))).join(","):""}return t((()=>{if(!r(k.value))return;const e=k.value.validator;k.value.validator=[{validator:A},...e?u(e):[]]})),()=>l("section",{class:"form-render__combination"},[j({onClick:N}),l(p,{ref:F,fieldList:x,tableConfig:g.value,tableData:C.value},null)])}}),n(v));export{b as TABLE_COMBINATION};
1
+ import{defineComponent as e,ref as a,watch as o,onMounted as t,createVNode as l}from"vue";import{arrayed as u}from"../../../../../../shared/utils/index.js";import{isField as i}from"@formily/core";import{connect as r,mapProps as n}from"@formily/vue";import{isArray as m,property as s}from"lodash-es";import"../../../../index.js";import"../../../../../iho-table/index.js";import d from"../../../../../iho-table/src/IhoTable.vue.js";import{useCombination as p}from"./hooks/useCombination.js";import{assignUpdateValue as v}from"../../../utils/schema.js";import{useColumnConfigAdaptor as f}from"../../../../../iho-table/src/hooks/useColumnConfigAdaptor.js";import{useFormField as c}from"../../../hooks/useFormField.js";const b=r(e({name:"FormTableCombination",props:{title:{type:String,default:""},value:{type:Array},maxGroupNum:{type:Number},minGroupNum:{type:Number,default:1},disabled:{type:Boolean},properties:{type:Array,default:()=>[]},combinationItemDeletable:{type:[Boolean,Function],default:!0},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:r}){var n;const{formConfigLikeAdaptor:v}=f(),{fieldList:b,editRules:h}=v({fieldList:e.properties}),{currentGroupNum:y,renderRemoveBtn:g,renderHeader:j}=p(e),C=a({editRules:h}),N=a(e.value);async function w(){y.value++,m(N.value)?N.value.push({}):(N.value=[{}],r("update:value",N.value))}o((()=>e.value),(e=>{N.value=e}));const x=b.concat({alias:(null==(n=window.getLanguageByCode)?void 0:n.call(window,"10010.1.241"))||"操作",columnName:"operation",width:60,isFixed:2,align:"center",slots:{default:({rowIndex:e})=>g({onClick:()=>async function(e){if(m(N.value))if(y.value>1)y.value--,N.value.splice(e,1);else if(1===N.value.length){const e=N.value[0];b.forEach((a=>{a.columnName&&(a.defaultValue?e[a.columnName]=a.defaultValue:Reflect.deleteProperty(e,a.columnName))}))}}(e)},e)}});t((()=>{if(!m(N.value))return N.value=[{}],void r("update:value",N.value);N.value.length||N.value.push({})}));const{field:k}=c(),B=a();async function F(){if(!B.value)return;const e=await B.value.$table.validate(!0);return e?Object.values(e).map((e=>e.map(s("rule.message")))).join(","):""}return t((()=>{if(!i(k.value))return;const e=k.value.validator;k.value.validator=[{validator:F},...e?u(e):[]]})),()=>l("section",{class:"form-render__combination"},[j({onClick:w}),l(d,{ref:B,fieldList:x,tableConfig:C.value,tableData:N.value},null)])}}),n(v));export{b as TABLE_COMBINATION};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,inject as l,createVNode as a,mergeProps as o,isVNode as n}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as u}from"@formily/vue";import{cloneDeep as s,isArray as c,xor as d,isNumber as p,isEmpty as v}from"lodash-es";import{NCheckboxGroup as m,NCheckbox as f,NRadioGroup as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as y}from"../../constants/index.js";import{useComplexOptions as g}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"../../utils/business.js";import{assignUpdateValue as j,createVisitedSetter as b}from"../../utils/schema.js";import{useUrlConfigOptions as x,useAutographOptions as F}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as C}from"../../hooks/useCommonInjection.js";import{useFormField as k}from"../../hooks/useFormField.js";function S(i,r,u){return e({name:i,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},clearable:Boolean,selectAll:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:i,attrs:h}){const{field:j,fieldKey:S}=k();const O=t({get(){return t=e.value,p(t)?t+"":t;var t},set(e){i("update:value",e)}}),{renderComplexOption:w}=g(e,O),{labelKey:_,valueKey:B,fullOptions:K}=e.urlConfig?x(e,O):F(e,O);l(y).setContext(S.value,(e=>{return{currentOption:s((t=e,c(t)?function(e){const t=K.value.reduce(((e,t)=>(e[t[B.value]]=t,e)),{});return e.map((e=>t[e]))}(t):(l=t,K.value.find((e=>e[B.value]===l))))),labelField:_.value,valueField:B.value};var t,l}));const{injectValueBindKey:W,injectValueValidate:R}=C();R(O);const A=W(O);function I(){O.value=null}const M=t({get:()=>c(O.value)&&O.value.length===K.value.length,set(e){const t=e?K.value.map((e=>e[B.value])):[];d(t,O.value).length&&(O.value=t)}}),V=t((()=>c(e.value)&&e.value.length&&e.value.length<K.value.length));function P(t){let l;const o={display:"flex",alignItems:"center"};if(t.__spanPercent&&"inner"===e.childWidthMode){const e=`${t.__spanPercent}%`;o.maxWidth=e,function(e,t){return!v(t.childrenFields)&&(c(e)?e.includes(t[B.value]):e===t[B.value])}(O.value,t)&&(o.width=e)}return a(u,{key:t[B.value],value:t[B.value],disabled:t.disabled,currentValue:O.value,cancelable:e.clearable,onCancel:I,style:o},"function"==typeof(i=l=w({value:O.value,option:t,valueKey:B.value,labelKey:_.value,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode}))||"[object Object]"===Object.prototype.toString.call(i)&&!n(i)?l:{default:()=>[l]});var i}return()=>{const t=K.value.map((e=>{var t;const l=null==(t=e.childrenFields)?void 0:t.reduce(((e,t)=>e+ +(t.elem_width||3)),0);return{...e,__spanPercent:(l||0)/12*100}})),l={display:"flex",flexDirection:e.vertical?"column":"row",flexWrap:"wrap",justifyItems:"flex-start",alignItems:e.vertical?"flex-start":"center",width:"100%"},n=a(r,o({key:A.value,value:O.value,"onUpdate:value":e=>O.value=e,onClick:b(j),style:{width:"100%"}},h),{default:()=>[a("section",{style:l},[t.map(P)])]});return e.selectAll?a("section",null,[[r!==m?null:a(f,{checked:M.value,"onUpdate:checked":e=>M.value=e,indeterminate:V.value},{default:()=>"全选"}),n]]):n}}})}const O=r(S("FormRadio",h,i),u({dataSource:"options"},j)),w=r(S("FormCheckbox",m,f),u({dataSource:"options"},j));export{w as CHECKBOX,O as RADIO};
1
+ import{defineComponent as e,computed as t,inject as l,createVNode as a,mergeProps as o,isVNode as n}from"vue";import i from"../../../../../shared/components/CancelRadio/CancelRadio.js";import{connect as r,mapProps as u}from"@formily/vue";import{cloneDeep as s,isArray as d,xor as c,isNumber as p,isEmpty as v}from"lodash-es";import{NCheckboxGroup as m,NCheckbox as f,NRadioGroup as h}from"naive-ui";import"../../../index.js";import{InjectionChangeContextCollector as y}from"../../constants/index.js";import{useComplexOptions as g}from"../../hooks/useComplexOptions.js";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"../../utils/business.js";import{assignUpdateValue as j,createVisitedSetter as b}from"../../utils/schema.js";import{useUrlConfigOptions as x,useAutographOptions as C}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as F}from"../../hooks/useCommonInjection.js";import{useFormField as k}from"../../hooks/useFormField.js";function S(i,r,u){return e({name:i,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},urlConfig:{type:Object},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},wordbook:{type:Object},vertical:{type:Boolean,default:!1},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},clearable:Boolean,selectAll:Boolean,onChange:{}},emits:["update:value"],setup(e,{emit:i,attrs:h}){const{field:j,fieldKey:S}=k();const w=t({get(){return t=e.value,p(t)?t+"":t;var t},set(e){i("update:value",e)}}),{renderComplexOption:O}=g(e,w),{labelKey:B,valueKey:_,fullOptions:K}=e.urlConfig?x(e,w):C(e,w);l(y).setContext(S.value,(e=>{return{currentOption:s((t=e,d(t)?function(e){const t=K.value.reduce(((e,t)=>(e[t[_.value]]=t,e)),{});return e.map((e=>t[e]))}(t):(l=t,K.value.find((e=>e[_.value]===l))))),labelField:B.value,valueField:_.value};var t,l}));const{injectValueBindKey:W,injectValueValidate:R}=F();R(w);const A=W(w);function I(){w.value=null}const M=t({get:()=>d(w.value)&&w.value.length===K.value.length,set(e){const t=e?K.value.map((e=>e[_.value])):[];c(t,w.value).length&&(w.value=t)}}),V=t((()=>d(e.value)&&e.value.length&&e.value.length<K.value.length));function P(t){let l;const o={display:"flex",alignItems:"center"};if(t.__spanPercent&&"inner"===e.childWidthMode){const e=`${t.__spanPercent}%`;o.maxWidth=e,function(e,t){return!v(t.childrenFields)&&(d(e)?e.includes(t[_.value]):e===t[_.value])}(w.value,t)&&(o.width=e)}return a(u,{key:t[_.value],value:t[_.value],disabled:t.disabled,currentValue:w.value,cancelable:e.clearable,onCancel:I,style:o},"function"==typeof(i=l=O({value:w.value,option:t,valueKey:_.value,labelKey:B.value,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode}))||"[object Object]"===Object.prototype.toString.call(i)&&!n(i)?l:{default:()=>[l]});var i}return()=>{const t=K.value.map((e=>{var t;const l=null==(t=e.childrenFields)?void 0:t.reduce(((e,t)=>e+ +(t.elem_width||3)),0);return{...e,__spanPercent:(l||0)/12*100}})),l={display:"flex",flexDirection:e.vertical?"column":"row",flexWrap:"wrap",justifyItems:"flex-start",alignItems:e.vertical?"flex-start":"center",width:"100%"},n=a(r,o({key:A.value,value:w.value,"onUpdate:value":e=>w.value=e,onClick:b(j),style:{width:"100%"}},h),{default:()=>[a("section",{style:l},[t.map(P)])]});return e.selectAll?a("section",null,[[r!==m?null:a(f,{checked:M.value,"onUpdate:checked":e=>M.value=e,indeterminate:V.value},{default:()=>{var e;return(null==(e=window.getLanguageByCode)?void 0:e.call(window,"10010.1.37"))||"全选"}}),n]]):n}}})}const w=r(S("FormRadio",h,i),u({dataSource:"options"},j)),O=r(S("FormCheckbox",m,f),u({dataSource:"options"},j));export{O as CHECKBOX,w as RADIO};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"../../utils/business.js";import{assignUpdateValue as v,assignValueBindKey as p}from"../../utils/schema.js";import{connect as d,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=d(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:v}){const p=o(),d=t(!1),{field:c,fieldKey:h}=m(),f=i((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),y=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),j=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),w=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},k=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},C=i({get:()=>e.value===y.value,set(o){if(!f.value||"SWITCH"!==e.showMode||o)return v("update:value",o?y.value:j.value);d.value=!0}});function D(){v("update:value",j.value)}return()=>"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},p),{checked:w,unchecked:k}),f.value?l(a,{show:d.value,"onUpdate:show":e=>d.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:f.value,onPositiveClick:D},null):null]:l(s,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:w})}}),c(v,p));export{h as SWITCH};
1
+ import{defineComponent as e,useAttrs as o,ref as i,computed as t,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"../../utils/business.js";import{assignUpdateValue as v,assignValueBindKey as d}from"../../utils/schema.js";import{connect as p,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=p(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:v}){const d=o(),p=i(!1),{field:c,fieldKey:h}=m(),f=t((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),w=t((()=>{var o,i;return null==(i=null==(o=e.openDescription)?void 0:o.value)||i})),y=t((()=>{var o,i;return null!=(i=null==(o=e.closeDescription)?void 0:o.value)&&i})),g=()=>{var o,i;return u(null!=(i=null==(o=e.openDescription)?void 0:o.describe)?i:"")},j=()=>{var o,i;return u(null!=(i=null==(o=e.closeDescription)?void 0:o.describe)?i:"")},C=t({get:()=>e.value===w.value,set(o){if(!f.value||"SWITCH"!==e.showMode||o)return v("update:value",o?w.value:y.value);p.value=!0}});function k(){v("update:value",y.value)}return()=>{return"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},d),{checked:g,unchecked:j}),f.value?l(a,{show:p.value,"onUpdate:show":e=>p.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":(null==(o=window.getLanguageByCode)?void 0:o.call(window,"10010.1.28"))||"取消",content:f.value,onPositiveClick:k},null):null]:l(s,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:g});var o}}}),c(v,d));export{h as SWITCH};
@@ -151,6 +151,10 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
151
151
  label: string;
152
152
  key: string;
153
153
  }[]>;
154
+ contextmenuRef: import("vue").Ref<any>;
155
+ showMenu: import("vue").Ref<boolean>;
156
+ menuPosition: any;
157
+ sessionId: import("vue").Ref<any>;
154
158
  currentFilterKey: import("vue").Ref<string>;
155
159
  state: {
156
160
  orgId: string | number;
@@ -173,16 +177,56 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
173
177
  };
174
178
  unreadTotal: import("vue").ComputedRef<number>;
175
179
  openSession: (item: import("../../shared/types").AnyObject) => Promise<void>;
180
+ setUpdateSessionItem: (item: import("../../shared/types").AnyObject) => void;
176
181
  currentWidth: import("vue").ComputedRef<number>;
177
182
  sessionList: import("vue").ComputedRef<import("../../shared/types").AnyObject[]>;
178
183
  getLabelNum: (session: import("../../shared/types").AnyObject) => number;
179
184
  changeWidth: ({ distance }: import("../../shared/types").AnyObject) => void;
180
185
  handleFilter: (key: string) => void;
181
186
  showSession: (item: import("../../shared/types").AnyObject, currentKey?: string) => boolean | undefined;
187
+ handleContextmenu: (event: MouseEvent, id: string) => Promise<void>;
188
+ handleSelect: (key: string, session: import("../../shared/types").AnyObject) => Promise<void>;
182
189
  NSpin: any;
183
190
  NBadge: any;
184
191
  NAvatar: any;
185
192
  NTag: any;
193
+ ContextMenu: import("vue").DefineComponent<{
194
+ type: {
195
+ type: StringConstructor;
196
+ default: string;
197
+ };
198
+ show: {
199
+ type: BooleanConstructor;
200
+ default: boolean;
201
+ };
202
+ position: {
203
+ type: import("vue").PropType<import("vue").CSSProperties>;
204
+ };
205
+ id: {
206
+ type: StringConstructor;
207
+ };
208
+ }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
209
+ type: {
210
+ type: StringConstructor;
211
+ default: string;
212
+ };
213
+ show: {
214
+ type: BooleanConstructor;
215
+ default: boolean;
216
+ };
217
+ position: {
218
+ type: import("vue").PropType<import("vue").CSSProperties>;
219
+ };
220
+ id: {
221
+ type: StringConstructor;
222
+ };
223
+ }>> & {
224
+ onSelect?: ((...args: any[]) => any) | undefined;
225
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
226
+ }, {
227
+ type: string;
228
+ show: boolean;
229
+ }>;
186
230
  vFlexibleResize: {
187
231
  mounted(el: any, { value }: any): void;
188
232
  beforeUnmount(el: any): void;
@@ -1411,6 +1455,10 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1411
1455
  findEmoji(name: string): any;
1412
1456
  };
1413
1457
  ContextMenu: import("vue").DefineComponent<{
1458
+ type: {
1459
+ type: StringConstructor;
1460
+ default: string;
1461
+ };
1414
1462
  show: {
1415
1463
  type: BooleanConstructor;
1416
1464
  default: boolean;
@@ -1418,10 +1466,14 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1418
1466
  position: {
1419
1467
  type: import("vue").PropType<import("vue").CSSProperties>;
1420
1468
  };
1421
- msgId: {
1469
+ id: {
1422
1470
  type: StringConstructor;
1423
1471
  };
1424
1472
  }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1473
+ type: {
1474
+ type: StringConstructor;
1475
+ default: string;
1476
+ };
1425
1477
  show: {
1426
1478
  type: BooleanConstructor;
1427
1479
  default: boolean;
@@ -1429,13 +1481,14 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1429
1481
  position: {
1430
1482
  type: import("vue").PropType<import("vue").CSSProperties>;
1431
1483
  };
1432
- msgId: {
1484
+ id: {
1433
1485
  type: StringConstructor;
1434
1486
  };
1435
1487
  }>> & {
1436
1488
  onSelect?: ((...args: any[]) => any) | undefined;
1437
1489
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
1438
1490
  }, {
1491
+ type: string;
1439
1492
  show: boolean;
1440
1493
  }>;
1441
1494
  ChatAdd: import("vue").DefineComponent<{
@@ -152,6 +152,10 @@ declare const _default: import("vue").DefineComponent<{
152
152
  label: string;
153
153
  key: string;
154
154
  }[]>;
155
+ contextmenuRef: import("vue").Ref<any>;
156
+ showMenu: import("vue").Ref<boolean>;
157
+ menuPosition: any;
158
+ sessionId: import("vue").Ref<any>;
155
159
  currentFilterKey: import("vue").Ref<string>;
156
160
  state: {
157
161
  orgId: string | number;
@@ -174,16 +178,56 @@ declare const _default: import("vue").DefineComponent<{
174
178
  };
175
179
  unreadTotal: import("vue").ComputedRef<number>;
176
180
  openSession: (item: AnyObject) => Promise<void>;
181
+ setUpdateSessionItem: (item: AnyObject) => void;
177
182
  currentWidth: import("vue").ComputedRef<number>;
178
183
  sessionList: import("vue").ComputedRef<AnyObject[]>;
179
184
  getLabelNum: (session: AnyObject) => number;
180
185
  changeWidth: ({ distance }: AnyObject) => void;
181
186
  handleFilter: (key: string) => void;
182
187
  showSession: (item: AnyObject, currentKey?: string) => boolean | undefined;
188
+ handleContextmenu: (event: MouseEvent, id: string) => Promise<void>;
189
+ handleSelect: (key: string, session: AnyObject) => Promise<void>;
183
190
  NSpin: any;
184
191
  NBadge: any;
185
192
  NAvatar: any;
186
193
  NTag: any;
194
+ ContextMenu: import("vue").DefineComponent<{
195
+ type: {
196
+ type: StringConstructor;
197
+ default: string;
198
+ };
199
+ show: {
200
+ type: BooleanConstructor;
201
+ default: boolean;
202
+ };
203
+ position: {
204
+ type: PropType<import("vue").CSSProperties>;
205
+ };
206
+ id: {
207
+ type: StringConstructor;
208
+ };
209
+ }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
210
+ type: {
211
+ type: StringConstructor;
212
+ default: string;
213
+ };
214
+ show: {
215
+ type: BooleanConstructor;
216
+ default: boolean;
217
+ };
218
+ position: {
219
+ type: PropType<import("vue").CSSProperties>;
220
+ };
221
+ id: {
222
+ type: StringConstructor;
223
+ };
224
+ }>> & {
225
+ onSelect?: ((...args: any[]) => any) | undefined;
226
+ "onUpdate:show"?: ((...args: any[]) => any) | undefined;
227
+ }, {
228
+ type: string;
229
+ show: boolean;
230
+ }>;
187
231
  vFlexibleResize: {
188
232
  mounted(el: any, { value }: any): void;
189
233
  beforeUnmount(el: any): void;
@@ -1412,6 +1456,10 @@ declare const _default: import("vue").DefineComponent<{
1412
1456
  findEmoji(name: string): any;
1413
1457
  };
1414
1458
  ContextMenu: import("vue").DefineComponent<{
1459
+ type: {
1460
+ type: StringConstructor;
1461
+ default: string;
1462
+ };
1415
1463
  show: {
1416
1464
  type: BooleanConstructor;
1417
1465
  default: boolean;
@@ -1419,10 +1467,14 @@ declare const _default: import("vue").DefineComponent<{
1419
1467
  position: {
1420
1468
  type: PropType<import("vue").CSSProperties>;
1421
1469
  };
1422
- msgId: {
1470
+ id: {
1423
1471
  type: StringConstructor;
1424
1472
  };
1425
1473
  }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1474
+ type: {
1475
+ type: StringConstructor;
1476
+ default: string;
1477
+ };
1426
1478
  show: {
1427
1479
  type: BooleanConstructor;
1428
1480
  default: boolean;
@@ -1430,13 +1482,14 @@ declare const _default: import("vue").DefineComponent<{
1430
1482
  position: {
1431
1483
  type: PropType<import("vue").CSSProperties>;
1432
1484
  };
1433
- msgId: {
1485
+ id: {
1434
1486
  type: StringConstructor;
1435
1487
  };
1436
1488
  }>> & {
1437
1489
  onSelect?: ((...args: any[]) => any) | undefined;
1438
1490
  "onUpdate:show"?: ((...args: any[]) => any) | undefined;
1439
1491
  }, {
1492
+ type: string;
1440
1493
  show: boolean;
1441
1494
  }>;
1442
1495
  ChatAdd: import("vue").DefineComponent<{
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,provide as o,openBlock as s,createElementBlock as r,normalizeStyle as n,unref as a,createVNode as i,withCtx as u,createBlock as l,Fragment as d,createElementVNode as m,renderSlot as p,createCommentVNode as c}from"vue";import{NConfigProvider as f,NSpin as h,NLayout as v,NLayoutContent as y}from"naive-ui";import S from"./components/SiderList.vue.js";import k from"./components/ChatHeader.vue.js";import _ from"./components/ChatMain.vue.js";import j from"./components/ChatFooter.vue.js";import g from"./components/ChatSearch.vue.js";import b from"./components/ChatAdd.vue.js";import w from"./components/Video.vue.js";import C from"./components/MultipleVideo.vue.js";import{instanceAxios as x}from"./api/index.js";import{isNumber as I}from"lodash-es";import{initData as L,InjectionIChatData as V}from"./hooks/useData.js";import{useWebSocket as H}from"./hooks/useWebSocket.js";import"trtc-sdk-v5";import"./utils/index.js";const U={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},showHeader:{type:Boolean,default:!0},defaultSessionKey:{type:String},show:{type:Boolean,default:!0}},emits:["template-click","unread-message-update","session-change"],setup(e,{expose:q,emit:M}){const N=e;x.defaults.baseURL=N.baseURL,x.defaults.headers.Authorization="bearer "+N.token;const R=t(!1),A=L(N,M);o(V,A),H(N,A);const{cssVars:B,state:D,openSession:F,closeSession:z,getCurrentSession:E,isEnded:K}=A;return q({getUnreadData:function(){return D.sessionList.filter((e=>I(e.unreadNum)&&e.unreadNum>0))},openSession:F,closeSession:z,getCurrentSession:E}),(t,o)=>e.show?(s(),r("div",{key:0,class:"iho-chat",style:n(a(B))},[i(a(f),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>[R.value?(s(),l(a(h),{key:0,stroke:"#5585f5"})):(s(),r(d,{key:1},[e.showHeader?(s(),r("div",U,[i(g),i(b,{title:"发起群聊",mode:"create","default-value":[a(D).userInfo]},null,8,["default-value"]),m("div",$,[p(t.$slots,"toolbar")])])):c("v-if",!0),i(a(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[i(S),i(a(y),{class:"chat-content",style:n({"--c-pointer-events":a(K)?"none":"unset","--c-cursor":a(K)?"not-allowed":"unset"})},{default:u((()=>[i(k,null,{header:u((()=>[p(t.$slots,"chatHeader",{session:a(D).currentSessionItem})])),_:3}),i(_),i(j,null,{footer:u((()=>[p(t.$slots,"chatFooter",{session:a(D).currentSessionItem})])),_:3})])),_:3},8,["style"]),p(t.$slots,"external")])),_:3}),a(D).showVideo?(s(),l(w,{key:1})):c("v-if",!0),a(D).showMultipleVideo?(s(),l(C,{key:2})):c("v-if",!0)],64))])),_:3})],4)):c("v-if",!0)}});export{q as default};
1
+ import{defineComponent as e,ref as o,provide as t,openBlock as s,createElementBlock as r,normalizeStyle as n,unref as a,createVNode as i,withCtx as u,createBlock as l,Fragment as d,createElementVNode as m,renderSlot as p,createCommentVNode as c}from"vue";import{NConfigProvider as f,NSpin as h,NLayout as v,NLayoutContent as y}from"naive-ui";import S from"./components/SiderList.vue.js";import g from"./components/ChatHeader.vue.js";import k from"./components/ChatMain.vue.js";import _ from"./components/ChatFooter.vue.js";import j from"./components/ChatSearch.vue.js";import w from"./components/ChatAdd.vue.js";import b from"./components/Video.vue.js";import C from"./components/MultipleVideo.vue.js";import{instanceAxios as x}from"./api/index.js";import{isNumber as I}from"lodash-es";import{initData as L,InjectionIChatData as V}from"./hooks/useData.js";import{useWebSocket as H}from"./hooks/useWebSocket.js";import"trtc-sdk-v5";import"./utils/index.js";const U={key:0,class:"iho-chat__header"},$={class:"toolbar"};var q=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"},showHeader:{type:Boolean,default:!0},defaultSessionKey:{type:String},show:{type:Boolean,default:!0}},emits:["template-click","unread-message-update","session-change"],setup(e,{expose:q,emit:B}){const M=e;x.defaults.baseURL=M.baseURL,x.defaults.headers.Authorization="bearer "+M.token;const N=o(!1),R=L(M,B);t(V,R),H(M,R);const{cssVars:A,state:D,openSession:F,closeSession:z,getCurrentSession:E,isEnded:K}=R;return q({getUnreadData:function(){return D.sessionList.filter((e=>I(e.unreadNum)&&e.unreadNum>0))},openSession:F,closeSession:z,getCurrentSession:E}),(o,t)=>e.show?(s(),r("div",{key:0,class:"iho-chat",style:n(a(A))},[i(a(f),{abstract:"",namespace:"iho-chat__popover"},{default:u((()=>{var t;return[N.value?(s(),l(a(h),{key:0,stroke:"#5585f5"})):(s(),r(d,{key:1},[e.showHeader?(s(),r("div",U,[i(j),i(w,{title:(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.31"))||"发起群聊",mode:"create","default-value":[a(D).userInfo]},null,8,["default-value"]),m("div",$,[p(o.$slots,"toolbar")])])):c("v-if",!0),i(a(v),{class:"iho-chat__body","has-sider":""},{default:u((()=>[i(S),i(a(y),{class:"chat-content",style:n({"--c-pointer-events":a(K)?"none":"unset","--c-cursor":a(K)?"not-allowed":"unset"})},{default:u((()=>[i(g,null,{header:u((()=>[p(o.$slots,"chatHeader",{session:a(D).currentSessionItem})])),_:3}),i(k),i(_,null,{footer:u((()=>[p(o.$slots,"chatFooter",{session:a(D).currentSessionItem})])),_:3})])),_:3},8,["style"]),p(o.$slots,"external")])),_:3}),a(D).showVideo?(s(),l(b,{key:1})):c("v-if",!0),a(D).showMultipleVideo?(s(),l(C,{key:2})):c("v-if",!0)],64))]})),_:3})],4)):c("v-if",!0)}});export{q as default};