cnhis-design-vue 3.1.41-beta.3 → 3.1.41-beta.30

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 (212) hide show
  1. package/es/components/button-print/src/utils/print.d.ts +1 -1
  2. package/es/components/button-print/src/utils/print.js +1 -1
  3. package/es/components/date-picker/index.d.ts +20 -0
  4. package/es/components/date-picker/index.js +1 -0
  5. package/es/components/date-picker/src/DatePicker.vue.d.ts +20 -0
  6. package/es/components/date-picker/src/DatePicker.vue.js +1 -0
  7. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  8. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  9. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -0
  10. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/useOther.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
  14. package/es/components/field-set/index.d.ts +8 -0
  15. package/es/components/field-set/src/FieldSet.vue.d.ts +5 -0
  16. package/es/components/field-set/src/FieldSet.vue.js +1 -1
  17. package/es/components/field-set/style/index.css +1 -1
  18. package/es/components/form-config/index.d.ts +6762 -46
  19. package/es/components/form-config/src/FormConfig.vue.d.ts +6903 -186
  20. package/es/components/form-config/src/FormConfig.vue.js +1 -1
  21. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -2
  22. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -1
  23. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.d.ts +4 -4
  24. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -1
  25. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3415 -60
  26. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
  27. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +2 -2
  28. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  29. package/es/components/form-config/src/components/renderer/CloseButton.vue.d.ts +3 -3
  30. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -1
  31. package/es/components/form-config/src/components/renderer/ComplexNode.vue.d.ts +10 -10
  32. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -1
  33. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +6 -6
  34. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
  35. package/es/components/form-config/src/hooks/useConfigurationField.d.ts +2 -3
  36. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  37. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +4 -2
  38. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
  39. package/es/components/form-config/src/hooks/usePresetRenderer.d.ts +1 -1
  40. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  41. package/es/components/form-config/src/types/index.d.ts +9 -2
  42. package/es/components/form-config/src/utils/index.d.ts +4 -1
  43. package/es/components/form-config/src/utils/index.js +1 -1
  44. package/es/components/form-config/style/index.css +1 -1
  45. package/es/components/form-render/index.d.ts +2 -2
  46. package/es/components/form-render/index.js +1 -1
  47. package/es/components/form-render/src/FormRender.vue.d.ts +1 -1
  48. package/es/components/form-render/src/FormRender.vue.js +1 -1
  49. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +22 -21
  50. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -1
  51. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  52. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
  53. package/es/components/form-render/src/constants/index.d.ts +0 -12
  54. package/es/components/form-render/src/constants/index.js +1 -1
  55. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +2 -6
  56. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  57. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  58. package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
  59. package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
  60. package/es/components/form-render/src/hooks/useFormField.d.ts +1 -0
  61. package/es/components/form-render/src/hooks/useFormField.js +1 -1
  62. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  63. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  64. package/es/components/form-render/src/types/fieldItem.d.ts +4 -0
  65. package/es/components/form-render/src/types/index.d.ts +5 -3
  66. package/es/components/form-render/src/utils/dom.d.ts +2 -1
  67. package/es/components/form-render/src/utils/dom.js +1 -1
  68. package/es/components/iho-table/index.d.ts +5 -5
  69. package/es/components/iho-table/index.js +1 -1
  70. package/es/components/iho-table/src/IhoTable.vue.d.ts +5 -5
  71. package/es/components/iho-table/src/IhoTable.vue.js +1 -1
  72. package/es/components/iho-table/src/constants/index.d.ts +2 -2
  73. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +1 -1
  74. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
  75. package/es/components/iho-table/src/plugins/{filterPlugin → filterRenderPlugin}/filter.vue.d.ts +15 -74
  76. package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -0
  77. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.d.ts +1 -0
  78. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -0
  79. package/es/components/iho-table/src/plugins/index.js +1 -1
  80. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +20 -7
  81. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -1
  82. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +102 -0
  83. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -0
  84. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/{timeRendererPlugin.d.ts → timeRendererPlugin/index.d.ts} +1 -1
  85. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -0
  86. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -1
  87. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
  88. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -1
  89. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -1
  90. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -1
  91. package/es/components/iho-table/src/types/index.d.ts +20 -11
  92. package/es/components/iho-table/src/utils/index.js +1 -1
  93. package/es/components/iho-table/style/index.css +1 -1
  94. package/es/components/index.css +1 -1
  95. package/es/components/index.d.ts +3 -1
  96. package/es/components/index.js +1 -1
  97. package/es/components/info-header/index.d.ts +289 -155
  98. package/es/components/info-header/src/InfoHeader.vue.d.ts +293 -160
  99. package/es/components/info-header/src/InfoHeader.vue.js +1 -1
  100. package/es/components/info-header/src/components/index.d.ts +3 -0
  101. package/es/components/info-header/src/components/index.js +1 -0
  102. package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -0
  103. package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.js +1 -0
  104. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +266 -0
  105. package/es/components/info-header/src/components/infoDescription/index.vue.js +1 -0
  106. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +38 -0
  107. package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -0
  108. package/es/components/info-header/src/types/index.d.ts +29 -0
  109. package/es/components/recommend-search/index.d.ts +10 -10
  110. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +10 -10
  111. package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +2 -2
  112. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +4 -4
  113. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -4
  114. package/es/components/scale-view/index.d.ts +1 -2
  115. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -5
  116. package/es/components/scale-view/src/ScaleView.vue.js +1 -1
  117. package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
  118. package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -0
  119. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
  120. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
  121. package/es/components/scale-view/src/utils/judge-types.js +1 -1
  122. package/es/components/scale-view/style/index.css +1 -1
  123. package/es/components/shortcut-setter/index.d.ts +4 -3
  124. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +4 -3
  125. package/es/components/steps-wheel/index.d.ts +1 -1
  126. package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +1 -1
  127. package/es/components/table-filter/index.d.ts +963 -8064
  128. package/es/components/table-filter/index.js +1 -1
  129. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +57 -3397
  130. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -1
  131. package/es/components/table-filter/src/classification/Classification-com.vue.d.ts +401 -2969
  132. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1
  133. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +2 -2
  134. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -42
  135. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  136. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +20 -49
  137. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -1
  138. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +2 -1
  139. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  140. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  141. package/es/components/table-filter/src/components/search-filter/index.vue.d.ts +372 -0
  142. package/es/components/table-filter/src/components/search-filter/index.vue.js +1 -0
  143. package/es/components/table-filter/src/components/set-classification/index.vue.d.ts +717 -0
  144. package/es/components/table-filter/src/components/set-classification/index.vue.js +1 -0
  145. package/es/components/table-filter/src/components/table-modal/{TableModal.vue.d.ts → index.vue.d.ts} +3 -43
  146. package/es/components/table-filter/src/components/table-modal/index.vue.js +1 -0
  147. package/es/components/table-filter/src/hooks/export.js +1 -1
  148. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -2
  149. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  150. package/es/components/table-filter/src/hooks/useMixins.d.ts +1 -1
  151. package/es/components/table-filter/src/hooks/useMixins.js +1 -1
  152. package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +50 -1291
  153. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -1
  154. package/es/components/table-filter/src/types/index.d.ts +10 -176
  155. package/es/components/table-filter/style/iconfont.ttf +0 -0
  156. package/es/components/table-filter/style/index.css +1 -1
  157. package/es/components/time-picker/index.d.ts +18 -0
  158. package/es/components/time-picker/index.js +1 -0
  159. package/es/components/time-picker/src/TimePicker.vue.d.ts +18 -0
  160. package/es/components/time-picker/src/TimePicker.vue.js +1 -0
  161. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
  162. package/es/shared/components/no-data/NoData.vue.d.ts +5 -0
  163. package/es/shared/components/no-data/NoData.vue.js +1 -1
  164. package/es/shared/utils/index.d.ts +16 -0
  165. package/es/shared/utils/index.js +1 -1
  166. package/package.json +2 -2
  167. package/es/components/callback/src/components/form.d.ts +0 -0
  168. package/es/components/callback/src/components/page.d.ts +0 -0
  169. package/es/components/callback/src/components/table.d.ts +0 -0
  170. package/es/components/callback/src/types/index.d.ts +0 -0
  171. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +0 -1
  172. package/es/components/iho-table/src/plugins/filterPlugin/index.d.ts +0 -1
  173. package/es/components/iho-table/src/plugins/filterPlugin/index.js +0 -1
  174. package/es/components/iho-table/src/plugins/filterPlugin/types.d.ts +0 -7
  175. package/es/components/iho-table/src/plugins/filterPlugin/types.js +0 -1
  176. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +0 -1
  177. package/es/components/info-header/src/HiddenContent.vue.js +0 -1
  178. package/es/components/info-header/src/InfoEllipsis.vue.js +0 -1
  179. package/es/components/table-filter/src/classification/search-class-name.vue.d.ts +0 -90
  180. package/es/components/table-filter/src/classification/search-class-name.vue.js +0 -1
  181. package/es/components/table-filter/src/classification/search-professional-model.vue.d.ts +0 -1472
  182. package/es/components/table-filter/src/classification/search-professional-model.vue.js +0 -1
  183. package/es/components/table-filter/src/components/age-com/index.vue.d.ts +0 -119
  184. package/es/components/table-filter/src/components/age-com/index.vue.js +0 -1
  185. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.d.ts +0 -199
  186. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +0 -1
  187. package/es/components/table-filter/src/components/button-icon/getBtnIcon.d.ts +0 -2
  188. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +0 -1
  189. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.d.ts +0 -90
  190. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +0 -1
  191. package/es/components/table-filter/src/components/multi-select/multi-select.vue.d.ts +0 -113
  192. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +0 -1
  193. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.d.ts +0 -266
  194. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +0 -1
  195. package/es/components/table-filter/src/components/range-age/index.vue.d.ts +0 -248
  196. package/es/components/table-filter/src/components/range-age/index.vue.js +0 -1
  197. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.d.ts +0 -789
  198. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +0 -1
  199. package/es/components/table-filter/src/components/search-condition/fieldTypeList.d.ts +0 -18
  200. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +0 -1
  201. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.d.ts +0 -1244
  202. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +0 -1
  203. package/es/components/table-filter/src/components/search-modal/set-classification.vue.d.ts +0 -1651
  204. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +0 -1
  205. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +0 -1
  206. package/es/components/table-filter/src/const/dataOptions.d.ts +0 -36
  207. package/es/components/table-filter/src/const/dataOptions.js +0 -1
  208. package/es/components/table-filter/src/directive/preventReClick.d.ts +0 -4
  209. package/es/components/table-filter/src/directive/preventReClick.js +0 -1
  210. package/es/components/info-header/src/{HiddenContent.vue.d.ts → components/infoDescription/HiddenContent.vue.d.ts} +2 -2
  211. package/es/components/info-header/src/{InfoEllipsis.vue.d.ts → components/infoDescription/InfoEllipsis.vue.d.ts} +1 -1
  212. /package/es/components/{callback → info-header}/src/types/index.js +0 -0
@@ -1 +1 @@
1
- import{defineComponent as a,computed as t,openBlock as e,createElementBlock as s,unref as o,createCommentVNode as r,createElementVNode as n,toDisplayString as i}from"vue";import p from"../../assets/img/nodata.png.js";import m from"../../assets/img/no-permission.png.js";import l from"../../assets/img/failure.png.js";import u from"../../assets/img/notfound.png.js";import f from"../../../_virtual/plugin-vue_export-helper.js";const g={class:"no-data-tip NoData-page"},c=["src"],d={key:1};var v=f(a({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(a){const f=a,v=t((()=>{let a=null;switch(f.noDataImg){case"no-permission":a=m;break;case"failure":a=l;break;case"nodata":a=p;break;default:a=u}return a})),D=t((()=>{let a="";switch(f.noDataImg){case"no-permission":a="请联系管理员";break;case"failure":a="请稍后再试"}return a}));return(t,p)=>(e(),s("div",g,[a.showImg?(e(),s("img",{key:0,src:o(v),alt:""},null,8,c)):r("v-if",!0),n("p",null,i(a.noDataTip),1),o(D)?(e(),s("span",d,i(o(D)),1)):r("v-if",!0)]))}}),[["__file","NoData.vue"]]);export{v as default};
1
+ import{defineComponent as t,computed as e,openBlock as o,createElementBlock as a,unref as r,createCommentVNode as i,createElementVNode as s,toDisplayString as n}from"vue";import p from"../../assets/img/nodata.png.js";import m from"../../assets/img/no-permission.png.js";import l from"../../assets/img/failure.png.js";import f from"../../assets/img/notfound.png.js";import g from"../../../_virtual/plugin-vue_export-helper.js";const u=["src"];var c=g(t({__name:"NoData",props:{noDataTip:{type:String,default:"暂无数据"},noDataImg:{type:String,default:"nodata"},showImg:{type:Boolean,default:!0}},setup(t){const g=t,c={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",fontSize:"22px",color:"#333"},d={width:"260px",maxWidth:"70%"},x={marginTop:"12px",marginBottom:"0",fontSize:"16px",color:"rgb(0 0 0 / 80%)"},y={marginTop:"6px",fontSize:"14px",color:"rgb(0 0 0 / 40%)"},h=e((()=>{let t=null;switch(g.noDataImg){case"no-permission":t=m;break;case"failure":t=l;break;case"nodata":t=p;break;default:t=f}return t})),v=e((()=>{let t="";switch(g.noDataImg){case"no-permission":t="请联系管理员";break;case"failure":t="请稍后再试"}return t}));return(e,p)=>(o(),a("div",{style:c},[t.showImg?(o(),a("img",{key:0,style:d,src:r(h),alt:""},null,8,u)):i("v-if",!0),s("p",{style:x},n(t.noDataTip),1),r(v)?(o(),a("span",{key:1,style:y},n(r(v)),1)):i("v-if",!0)]))}}),[["__file","NoData.vue"]]);export{c as default};
@@ -15,3 +15,19 @@ export declare function targetStringIncludes(arr: string[], target: string): boo
15
15
  export declare const jsonParse: import("@vueuse/core").UseMemoizedFn<any, [value: string]>;
16
16
  export declare function shallowOmit<T, K extends Array<keyof T>>(target: T, keys: K): Omit<T, K[number]>;
17
17
  export declare function checkInSetupEnv(message?: string): void;
18
+ export declare enum LOW_CODE_VALUE_RELATION {
19
+ EQ = "EQ",
20
+ NEQ = "NEQ",
21
+ CL = "CL",
22
+ NC = "NC",
23
+ NULL = "NULL",
24
+ NOT_NULL = "NOT_NULL",
25
+ BIG = "BIG",
26
+ BIGEQ = "BIGEQ",
27
+ LESS = "LESS",
28
+ LESSEQ = "LESSEQ"
29
+ }
30
+ export declare function isMatchLowCodeCondition(value: unknown, condition: {
31
+ con: LOW_CODE_VALUE_RELATION & string;
32
+ value: unknown;
33
+ }): boolean;
@@ -1 +1 @@
1
- import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as r,isNumber as n,isObject as o,isFunction as u}from"lodash-es";import{getCurrentInstance as c}from"vue";function i(t,r,n="children",o){function u(){throw"silence break traverse"}try{a(t).forEach((t=>{r(t,u,o),a(n).forEach((o=>{e(t[o])&&i(t[o],r,n,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function s(t,e,r=e.name,n){if(!r)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[r]||(n?n():t.component(r,e))}function f(t){if(!r(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function a(t){return Array.isArray(t)?t:[t]}function x(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const l=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),m=Object.seal(Object.create(null));function d(t,r){return function t(r,n){return o(r)?e(r)?r.map((e=>t(e,n))):Object.entries(r).reduce(((e,[r,c])=>(n.includes(r)||(o(c)&&!u(c)?e[r]=t(c,n):e[r]=c),e)),{}):r}(t,r)}function h(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function p(t,e){if(!t)return t;if(e(t))return t;let r=t.parentElement;for(;r&&!e(r);)r=r.parentElement;return r}function w(t,e="px"){if(n(t))return`${t}${e}`;if(r(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function y(t,e){return t.some((t=>e.includes(t)))}const v=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function b(t,e){if(!o(t))return t;const r={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(r,e[t]);return r}function $(t){if(!c())throw new Error(t||"can't use this hook out of setup environment")}export{m as DMZ,a as arrayed,$ as checkInSetupEnv,d as deepOmit,p as findAncestor,f as generateTimeFormat,l as getStringWidth,v as jsonParse,s as safeComponentRegister,h as separateMetaModule,b as shallowOmit,y as targetStringIncludes,i as traverse,x as uuidGenerator,w as widthAppend};
1
+ import{useMemoize as t}from"@vueuse/core";import{isArray as e,isString as n,includes as r,isEmpty as o,negate as u,gt as c,gte as i,lt as s,lte as f,isNumber as a,isObject as x,isFunction as E}from"lodash-es";import{getCurrentInstance as l}from"vue";function m(t,n,r="children",o){function u(){throw"silence break traverse"}try{h(t).forEach((t=>{n(t,u,o),h(r).forEach((o=>{e(t[o])&&m(t[o],n,r,t)}))}))}catch(t){if("silence break traverse"===t)return;throw t}}function L(t,e,n=e.name,r){if(!n)throw new Error(`[CUI]: invalid component name for ${e}`);const{components:o={}}=t._context;o[n]||(r?r():t.component(n,e))}function d(t){if(!n(t))return;const e=t.match(/[Hms:]+/);return e?e[0]:void 0}function h(t){return Array.isArray(t)?t:[t]}function p(){if(window.isSecureContext&&window.crypto)return`key${window.crypto.randomUUID()}`;return`key${"xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}`}const N=t((function(t){return t?[...t].reduce(((t,e)=>/[a-z]/.test(e)?t+8:/[A-Z]/.test(e)?t+12:/\d/.test(e)?t+9:/\./.test(e)?t+4:/[\u4e00-\u9fa5]/.test(e)?t+15:/-/.test(e)?t+4:/[()]/.test(e)?t+14:/[)(]/.test(e)?t+5:/-/.test(e)?t+10:/%/.test(e)?t+14:/‰/.test(e)?t+16:t+6),0):0})),w=Object.seal(Object.create(null));function S(t,n){return function t(n,r){return x(n)?e(n)?n.map((e=>t(e,r))):Object.entries(n).reduce(((e,[n,o])=>(r.includes(n)||(x(o)&&!E(o)?e[n]=t(o,r):e[n]=o),e)),{}):n}(t,n)}function v(t){return Object.values(t).reduce(((t,e)=>Object.assign(t,e)),{})}function y(t,e){if(!t)return t;if(e(t))return t;let n=t.parentElement;for(;n&&!e(n);)n=n.parentElement;return n}function Q(t,e="px"){if(a(t))return`${t}${e}`;if(n(t))return t.endsWith(e)?t:`${t}${e}`;throw new Error(`invalid width value ${t}, it need to be a string or number!`)}function $(t,e){return t.some((t=>e.includes(t)))}const b=t((t=>{try{return JSON.parse(t)}catch(t){return{}}}),{getKey:t=>t});function O(t,e){if(!x(t))return t;const n={...t};for(let t=0;t<e.length;t++)Reflect.deleteProperty(n,e[t]);return n}function U(t){if(!l())throw new Error(t||"can't use this hook out of setup environment")}var C=(t=>(t.EQ="EQ",t.NEQ="NEQ",t.CL="CL",t.NC="NC",t.NULL="NULL",t.NOT_NULL="NOT_NULL",t.BIG="BIG",t.BIGEQ="BIGEQ",t.LESS="LESS",t.LESSEQ="LESSEQ",t))(C||{});const I={EQ:(t,e)=>`${t}`===e,NEQ:(t,e)=>`${t}`!==e,CL:(t,o)=>!(!e(t)&&!n(t))&&r(t,o),NC:(t,o)=>!e(t)&&!n(t)||!r(t,o),NULL:o,NOT_NULL:u(o),BIG:c,BIGEQ:i,LESS:s,LESSEQ:f};function g(t,e){return(I[e.con]||(()=>!1))(t,`${e.value}`)}export{w as DMZ,C as LOW_CODE_VALUE_RELATION,h as arrayed,U as checkInSetupEnv,S as deepOmit,y as findAncestor,d as generateTimeFormat,N as getStringWidth,g as isMatchLowCodeCondition,b as jsonParse,L as safeComponentRegister,v as separateMetaModule,O as shallowOmit,$ as targetStringIncludes,m as traverse,p as uuidGenerator,Q as widthAppend};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.41-beta.3",
3
+ "version": "3.1.41-beta.30",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "a7ca27e025c81ee0ca32943e0c9c13e9fcb18a7d"
64
+ "gitHead": "af489addbc42d392ef408555c7de6deb4d543fbe"
65
65
  }
File without changes
File without changes
File without changes
File without changes
@@ -1 +0,0 @@
1
- import{defineComponent as e,inject as t,ref as l,onDeactivated as a,watch as o,computed as i,openBlock as s,createElementBlock as n,normalizeStyle as u,unref as r,createElementVNode as c,renderSlot as v,createVNode as p,withCtx as d,createTextVNode as f,toDisplayString as h,normalizeClass as m,createCommentVNode as _,Fragment as y,renderList as k,createBlock as b,isRef as g}from"vue";import{widthAppend as x}from"../../../../../shared/utils/index.js";import{FunnelSharp as C}from"@vicons/ionicons5";import{useVModel as S,useVirtualList as j}from"@vueuse/core";import{NEllipsis as w,NPopover as A,NIcon as $,NInput as B,NCheckbox as I,NCheckboxGroup as L,NButtonGroup as U,NButton as q}from"naive-ui";import{InjectionIhoTableUUID as P,InjectionIhoTableConfig as W}from"../../constants/index.js";import{IhoTableRenderHelper as Z}from"../../utils/index.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const E={class:"iho-table__filterWrapper"},F={key:0},H=["onClick"],O={class:"iho-table__filterListItem"},D={class:"iho-table__filterFooter"};var G=z(e({__name:"filter",props:{payload:{type:Object,required:!0},sortable:{type:Boolean},options:{type:Array,default:()=>[]},checked:{type:Array,required:!0},sortStatus:{type:String}},emits:["update:checked","update:sortStatus"],setup(e,{emit:z}){const G=e,J=t(P),K=t(W),M=S(G,"checked",z),N=S(G,"sortStatus",z),Q=l([]),R=l(!1),T=l("");function V(){R.value=!R.value}function X(){R.value=!1}a(X),o(R,(e=>{e&&(Q.value=[...M.value],T.value="")}));const{list:Y,containerProps:ee,wrapperProps:te}=j(i((()=>T.value?G.options.filter((e=>e.key.includes(T.value))):G.options)),{itemHeight:32,overscan:3}),le=i((()=>!!Q.value.length&&Q.value.length!==G.options.length)),ae=i({get:()=>Q.value.length===G.options.length,set:e=>{Q.value=e?G.options.map((e=>e.value)):[]}}),oe=i((()=>({...ee.style,height:x(320)})));function ie(){X(),z("update:checked",Q.value)}const se=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];const ne=i((()=>M.value.length||N.value)),ue=i((()=>{var e;return Z.isEditableColumn(K.value,null==(e=G.payload)?void 0:e.column)})),re=i((()=>({display:"inline-flex","align-items":"center",justifyContent:"start",width:`calc(100% - ${ue.value?19:0}px)`})));return(t,l)=>(s(),n("section",{style:u(r(re))},[c("section",null,[v(t.$slots,"header",{},(()=>[p(r(w),null,{default:d((()=>[f(h(e.payload.column.title),1)])),_:1})]))]),p(r(A),{to:`#${r(J)}`,show:R.value},{trigger:d((()=>[p(r($),{class:m(["iho-table__filterIcon",{"is-active":r(ne)}]),component:r(C),onClick:V},null,8,["class","component"])])),default:d((()=>[c("section",E,[_(' 判断是否显示升序降序模块的组件 v-if="sortable"'),e.sortable?(s(),n("div",F,[(s(),n(y,null,k(se,(e=>c("div",{key:e.status,class:m(["iho-table__filterButton",{"iho-table__filterButton--active":r(N)===e.status}]),onClick:t=>{return l=e.status,X(),void z("update:sortStatus",l);var l}},h(e.text),11,H))),64))])):_("v-if",!0),e.options.length>5?(s(),b(r(B),{key:1,value:T.value,"onUpdate:value":l[0]||(l[0]=e=>T.value=e)},null,8,["value"])):_("v-if",!0),c("div",O,[p(r(I),{label:"全选",checked:r(ae),"onUpdate:checked":l[1]||(l[1]=e=>g(ae)?ae.value=e:null),indeterminate:r(le)},null,8,["checked","indeterminate"])]),p(r(L),{value:Q.value,"onUpdate:value":l[3]||(l[3]=e=>Q.value=e)},{default:d((()=>[c("section",{ref:r(ee).ref,style:u(r(oe)),onScroll:l[2]||(l[2]=(...e)=>r(ee).onScroll&&r(ee).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:u(r(te).style)},[(s(!0),n(y,null,k(r(Y),(e=>(s(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[p(r(I),{value:e.data.value,label:e.data.key},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",D,[c("section",null,h(`已选择${Q.value.length}项`),1),p(r(U),{size:"tiny"},{default:d((()=>[p(r(q),{onClick:l[4]||(l[4]=e=>Q.value=[])},{default:d((()=>[f("清空")])),_:1}),p(r(q),{onClick:X},{default:d((()=>[f("取消")])),_:1}),p(r(q),{type:"primary",onClick:ie},{default:d((()=>[f("确定")])),_:1})])),_:1})])])])),_:1},8,["to","show"])],4))}}),[["__file","filter.vue"]]);export{G as default};
@@ -1 +0,0 @@
1
- export declare function filterPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
@@ -1 +0,0 @@
1
- import{computed as e,createVNode as t,onBeforeUnmount as l,reactive as o}from"vue";import{jsonParse as s}from"../../../../../shared/utils/index.js";import{isObject as i,isFunction as r,isArray as a}from"lodash-es";import"../../../index.js";import{IHO_TABLE_NUMBER_STATUS as n}from"../../constants/index.js";import{useUUIDMap as u,IhoTableRenderHelper as d,IhoTableUtils as c}from"../../utils/index.js";import f from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function m(){const m="filterPlugin",{getItemFromUUID:v,removeItemFromUUID:h}=u((()=>{const e=o(new Map),t=o(new Set);return{stateMap:e,filterSet:t,setChecked:function({value:l,field:o,$table:s,emits:i}){const r=e.get(o);if(!r)return;const a=s.getColumnByField(o);function n(e,t){var l,o;const i=s.getColumnByField(e);return{column:i,field:i.field,datas:[],property:i.field,values:[...null!=(o=null==(l=t.get(e))?void 0:l.checked)?o:[]]}}a&&(l.length?t.add(a.field):t.delete(a.field),r.checked=l,i("filterChange",{$event:new PointerEvent("click"),$table:s,...n(a.field,e),filterList:[...t.values()].map((t=>n(t,e)))}))},setSort:function({value:t,field:l,$table:o,emits:s}){const i=e.get(l);if(!i)return;const r=o.getColumnByField(l);if(!r)return;if(!i.sortStatus&&!t)return;i.sortStatus=t===i.sortStatus?null:t,e.forEach(((e,t)=>{t!==r.field&&(e.sortStatus=null)}));const a={column:r,field:r.field,order:t,property:r.field,sortTime:Date.now()};s("sortChange",{$table:o,$event:new PointerEvent("click"),...a,sortList:[a]})}}}));return p({name:m,apply(o){o.fieldHooks.fieldList.tap(m,((l,{uuid:o},{$table:u,emits:p})=>(l.forEach((l=>{var m,h,S,g,k,b,C;const $=null==(m=l.editRender)?void 0:m.props;if(!i($))return;const y=s($.fieldSetting||"");if(!d.hasFilter(y))return;const E=l.sortable;l.sortable=!1;let F=null!=(g=null==(S=null==(h=y.mapping)?void 0:h.mappingFiled)?void 0:S.map((e=>e.value[0])))?g:[];(function(e){const t=["SEARCH","SELECT","RADIO","CHECKBOX"];return(e.notParticipatingSearch||"")!==n.POSITIVE&&t.includes(c.getCellType(e))&&a(e.options)&&e.options.length})($)&&(F=null!=(b=null==(k=$.options)?void 0:k.map((e=>({...e,key:e.label}))))?b:[]);const{filterState:x,setChecked:I,setSort:j}=function(e,t,l={}){const{stateMap:o,setChecked:s,setSort:i}=v(e);return{filterState:o.set(t,o.get(t)||{options:[],checked:l.checked||[],sortStatus:l.sortStatus||null}).get(t),setChecked:s,setSort:i}}(o,l.field,$.filterDefaultValue);x.options=F;const P=null==(C=l.slots)?void 0:C.header,U=e({get:()=>x.sortStatus,set:e=>j({field:l.field,value:e,$table:u.value,emits:p})}),w=e({get:()=>x.checked,set:e=>I({field:l.field,value:e,$table:u.value,emits:p})}),D=e((()=>x.options));l.slots={...l.slots,header:e=>t(f,{payload:e,options:D.value,sortable:E,checked:w.value,"onUpdate:checked":e=>w.value=e,sortStatus:U.value,"onUpdate:sortStatus":e=>U.value=e},{header:()=>r(P)?P(e):P})}})),l))),o.setupHooks.setup.tap(m,(e=>{l((()=>e.value.uuid&&h(e.value.uuid)))})),o.exposeHooks.expose.tap(m,((e,t,{$table:l,emits:o})=>({...e,getFilterState(e){if(!t.value.uuid)return;const{stateMap:l}=v(t.value.uuid),o=l.get(e);return o&&{checked:[...o.checked],sortStatus:o.sortStatus}},setFilterState(e,s){if(!t.value.uuid)return;const{setChecked:i,setSort:r}=v(t.value.uuid);Reflect.has(s,"sortStatus")&&r({field:e,value:s.sortStatus,$table:l.value,emits:o}),a(s.checked)&&i({field:e,value:s.checked,$table:l.value,emits:o})}})))}})}export{m as filterPlugin};
@@ -1,7 +0,0 @@
1
- import { AnyObject } from '../../../../../../es/shared/types';
2
- import { VxeTablePropTypes } from 'vxe-table';
3
- export declare type FilterState = {
4
- options: AnyObject[];
5
- checked: string[];
6
- sortStatus: VxeTablePropTypes.SortOrder;
7
- };
@@ -1 +0,0 @@
1
- import{createVNode as e,mergeProps as r}from"vue";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as t}from"../../../constants/index.js";import{NTimePicker as o}from"naive-ui";import{createIhoTableClearActivedInterceptor as n,IhoTableRenderHelper as i}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function m(){return l({name:"timeRendererPlugin",vxe(l){l.interceptor.add("event.clearActived",n(t.TIME,(e=>e.classList.contains("n-time-picker-panel")))),l.renderer.add(t.TIME,{renderCell:i.createDefaultRenderCell(),renderEdit:i.createRenderEdit((({fieldItem:t,row:n,column:i,emitFormChangeWithParams:l,emitFormClick:m})=>{const{placeholder:a="请选择",valueFormat:d="HH:mm"}=t.componentProps||{},s={placeholder:a,valueFormat:d,format:d||"yyyy-MM-dd HH:mm:ss",onUpdateFormattedValue:e=>{const r=n[i.field];n[i.field]=e,l({oldValue:r})},onClick:m};return[e(o,r({formattedValue:n[i.field],"onUpdate:formattedValue":e=>n[i.field]=e},s,t.componentProps),null)]}))})}})}export{m as timeRendererPlugin};
@@ -1 +0,0 @@
1
- import{defineComponent as t,ref as n,computed as e,openBlock as i,createElementBlock as o,normalizeStyle as r,unref as l,createElementVNode as u,createVNode as a,normalizeClass as c}from"vue";import s from"./InfoEllipsis.vue.js";import d from"../../../_virtual/plugin-vue_export-helper.js";const f={class:"c-info-header__hidden--content"};var p=d(t({__name:"HiddenContent",props:{content:{type:String,default:""},tip:String,width:{type:Number},contentStyle:{type:Object,default:()=>({})}},setup(t){const d=t,p=n(!0);function h(){p.value=!p.value}const v=e((()=>{const t=d.width+"px";return{maxWidth:t,width:t}})),_=e((()=>{if(!d.width)return{};const t=d.width-40+"px";return Object.assign({},d.contentStyle,{maxWidth:t})})),g=e((()=>{let{content:t}=d;if(t+="",!p.value)return t;if(!t)return"-";const n=t.length;if(!n||1===n)return t;const e=Math.floor(n/2),i=Math.floor((n-e)/2);return`${t.substring(0,i)}${"*".repeat(e)}${null==t?void 0:t.substring(i+e)}`}));return(n,e)=>(i(),o("div",{class:"c-info-header__hidden",style:r(l(v))},[u("div",f,[a(s,{"content-style":l(_),content:l(g),tip:t.tip},null,8,["content-style","content","tip"])]),u("i",{onClick:h,class:c(["c-info-header__hidden--icon","iconfont","info-header--icon-"+(p.value?"guanbi-yanjing":"faxian-yanjing")])},null,2)],4))}}),[["__file","HiddenContent.vue"]]);export{p as default};
@@ -1 +0,0 @@
1
- import{defineComponent as t,openBlock as e,createBlock as l,unref as i,withCtx as o,createElementVNode as p,createVNode as n,normalizeStyle as r,createTextVNode as u,toDisplayString as a}from"vue";import{NTooltip as s,NEllipsis as f}from"naive-ui";import d from"../../../_virtual/plugin-vue_export-helper.js";var m=d(t({__name:"InfoEllipsis",props:{content:{type:String,default:""},tip:{type:String},contentStyle:{type:Object,default:()=>({})}},setup:t=>(d,m)=>(e(),l(i(s),{disabled:!t.tip},{trigger:o((()=>[p("section",null,[n(i(f),{style:r(t.contentStyle),tooltip:{placement:t.tip?"bottom":"top"}},{default:o((()=>{var e;return[u(a(null!=(e=t.content)?e:"-"),1)]})),_:1},8,["style","tooltip"])])])),default:o((()=>[u(" "+a(t.tip),1)])),_:1},8,["disabled"]))}),[["__file","InfoEllipsis.vue"]]);export{m as default};
@@ -1,90 +0,0 @@
1
- import { IParentNamesType } from '../../../../../es/components/table-filter/src/types';
2
- declare const _default: import("vue").DefineComponent<{
3
- showItemName: {
4
- type: BooleanConstructor;
5
- default: boolean;
6
- };
7
- tableId: {
8
- type: StringConstructor;
9
- default: string;
10
- };
11
- actionList_prop: {
12
- type: ObjectConstructor;
13
- default: () => {};
14
- };
15
- conditionList: {
16
- type: ArrayConstructor;
17
- default: () => never[];
18
- };
19
- }, {
20
- attrs: any;
21
- $message: import("naive-ui").MessageApi;
22
- props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
23
- showItemName: {
24
- type: BooleanConstructor;
25
- default: boolean;
26
- };
27
- tableId: {
28
- type: StringConstructor;
29
- default: string;
30
- };
31
- actionList_prop: {
32
- type: ObjectConstructor;
33
- default: () => {};
34
- };
35
- conditionList: {
36
- type: ArrayConstructor;
37
- default: () => never[];
38
- };
39
- }>> & {}>>;
40
- showAdd: import("vue").Ref<boolean>;
41
- className: import("vue").Ref<string>;
42
- addVal: import("vue").Ref<string>;
43
- parentNames: import("vue").Ref<{
44
- disabled: boolean;
45
- isAdd?: boolean | undefined;
46
- selected: boolean;
47
- value: string;
48
- }[]>;
49
- parentNamesHasAdd: import("vue").ComputedRef<boolean>;
50
- init: () => void;
51
- getParentNames: () => void;
52
- handleParentNamesAdd: (e: Event) => void;
53
- hanldeBlur: () => void;
54
- editParentName: (e: Event, item: IParentNamesType) => void;
55
- handleParentNameSelect: (item: IParentNamesType, index: number) => void;
56
- handleParentNamesRemove: (index: number, item: IParentNamesType) => void;
57
- handleParent: (index: number, item: IParentNamesType) => void;
58
- handleGetParams: () => {
59
- displayCategory: string;
60
- name: string;
61
- } | undefined;
62
- NIcon: any;
63
- NButton: any;
64
- NInput: any;
65
- CloseOutline: 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<{}>>, {}>;
66
- AddOutline: 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<{}>>, {}>;
67
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
68
- showItemName: {
69
- type: BooleanConstructor;
70
- default: boolean;
71
- };
72
- tableId: {
73
- type: StringConstructor;
74
- default: string;
75
- };
76
- actionList_prop: {
77
- type: ObjectConstructor;
78
- default: () => {};
79
- };
80
- conditionList: {
81
- type: ArrayConstructor;
82
- default: () => never[];
83
- };
84
- }>>, {
85
- tableId: string;
86
- actionList_prop: Record<string, any>;
87
- showItemName: boolean;
88
- conditionList: unknown[];
89
- }>;
90
- export default _default;
@@ -1 +0,0 @@
1
- import{defineComponent as e,useAttrs as l,ref as a,computed as t,onMounted as n,openBlock as i,createElementBlock as s,createVNode as o,unref as u,createCommentVNode as d,Fragment as c,renderList as v,normalizeClass as r,createElementVNode as p,toDisplayString as m,createBlock as f,withDirectives as h,withCtx as y,createTextVNode as b,vShow as g}from"vue";import{useMessage as k,NInput as w,NIcon as x,NButton as _}from"naive-ui";import{CloseOutline as C,AddOutline as L}from"@vicons/ionicons5";import I from"../../../../_virtual/plugin-vue_export-helper.js";const N={class:"search-class-name-block"},B={key:0,class:"item-name"},E=p("span",{class:"label"},"筛选分类名称:",-1),U={key:1,class:"parent-names"},A=p("span",{class:"label"},"父类名称:",-1),j=["onDblclick","onClick"],z={key:0,class:"s-content"};var D=I(e({__name:"search-class-name",props:{showItemName:{type:Boolean,default:!0},tableId:{type:String,default:""},actionList_prop:{type:Object,default:()=>({})},conditionList:{type:Array,default:()=>[]}},setup(e,{expose:I}){const D=e,S=l(),T=k(),G=a(!1),M=a(""),O=a(""),P=a([]),q=t((()=>P.value.some((e=>e.isAdd))));function F(){D.showItemName&&function(){let e=[];S.displayCategoryList.forEach((l=>{"未分类"!==l&&e.push({disabled:!0,selected:l===D.actionList_prop.displayCategory,value:l})})),P.value=e}(),M.value=D.actionList_prop.name}function H(e){var l;const a=null==(l=null==e?void 0:e.target)?void 0:l.nextElementSibling;setTimeout((()=>{a&&a.focus()})),G.value=!0}function J(){G.value=!1,O.value&&(P.value.forEach((e=>e.selected=!1)),P.value.push({disabled:!0,value:O.value,selected:!0,isAdd:!0}),O.value="")}function K(e,l){!function(e,l){let{conditionList:a}=D;if(!a||!a.length)return void P.value.splice(e,1);let t=a.filter((e=>e.displayCategory===l.value));if(!t||!t.length)return void P.value.splice(e,1);T.error("该分类下有已有数据,请删除该分类下的筛选集后重试!")}(e,l)}return n((()=>{F()})),I({init:F,handleGetParams:function(){var e;if(!M.value&&D.showItemName)return void T.warning("请输入搜索分类名称");let l=null==(e=P.value.find((e=>e.selected)))?void 0:e.value;if(l)return{displayCategory:l,name:M.value};T.warning("请至少添加一个条件")}}),(l,a)=>(i(),s("div",N,[e.showItemName?(i(),s("div",B,[E,o(u(w),{value:M.value,"onUpdate:value":a[0]||(a[0]=e=>M.value=e),placeholder:"请输入分类名称",style:{width:"250px"},maxLength:10},null,8,["value"])])):d("v-if",!0),e.showItemName?(i(),s("div",U,[A,(i(!0),s(c,null,v(P.value,((e,l)=>(i(),s("div",{class:r(["edit-tag",{"edit-tag-select":e.selected&&e.disabled}]),key:l,onDblclick:l=>function(e,l){l.disabled=!1,setTimeout((()=>{e.target.focus()}),0)}(l,e),onClick:a=>function(e,l){e.disabled&&(P.value.forEach(((e,a)=>{a!==l&&(e.selected=!1)})),e.selected=!e.selected)}(e,l)},[e.disabled?(i(),s("div",z,[p("span",null,m(e.value),1)])):(i(),f(u(w),{key:1,style:{width:"100px"},value:e.value,"onUpdate:value":l=>e.value=l,disabled:e.disabled,onBlur:()=>e.disabled=!0,maxLength:10},null,8,["value","onUpdate:value","disabled","onBlur"])),o(u(x),{component:u(C),class:"anticon-close",size:"20",onClick:a=>K(l,e)},null,8,["component","onClick"])],42,j)))),128)),u(q)?d("v-if",!0):(i(),s(c,{key:0},[h(o(u(_),{class:"ant-btn",icon:"plus",dashed:"",onClick:H},{default:y((()=>[o(u(x),{component:u(L),size:"20"},null,8,["component"]),b(" "+m("添加父类"))])),_:1},512),[[g,!G.value]]),h(o(u(w),{class:"edit-tag",value:O.value,"onUpdate:value":a[1]||(a[1]=e=>O.value=e),valueModifiers:{trim:!0},style:{width:"100px"},onBlur:J,maxLength:10},null,8,["value"]),[[g,G.value]])],64))])):d("v-if",!0)]))}}),[["__file","search-class-name.vue"]]);export{D as default};