cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.16

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 (406) hide show
  1. package/es/_virtual/plugin-vue_export-helper.js +1 -9
  2. package/es/components/annotation-edit/index.js +1 -10
  3. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
  4. package/es/components/big-table/index.js +1 -15
  5. package/es/components/big-table/src/BigTable.vue.js +1 -6
  6. package/es/components/big-table/src/BigTable.vue2.js +1 -2498
  7. package/es/components/big-table/src/bigTableEmits.js +1 -53
  8. package/es/components/big-table/src/bigTableProps.js +1 -120
  9. package/es/components/big-table/src/bigTableState.js +1 -62
  10. package/es/components/big-table/src/components/NoData.vue.js +1 -74
  11. package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
  12. package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
  13. package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
  14. package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
  15. package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
  16. package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
  17. package/es/components/big-table/src/components/input-button.vue.js +1 -39
  18. package/es/components/big-table/src/components/separate.vue.js +1 -30
  19. package/es/components/big-table/src/constants/index.js +1 -3
  20. package/es/components/big-table/src/hooks/index.js +1 -9
  21. package/es/components/big-table/src/hooks/useAnchor.js +1 -49
  22. package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
  23. package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
  24. package/es/components/big-table/src/hooks/useEdit.js +1 -133
  25. package/es/components/big-table/src/hooks/useEvent.js +1 -95
  26. package/es/components/big-table/src/hooks/useFormat.js +1 -507
  27. package/es/components/big-table/src/hooks/useNestTable.js +1 -86
  28. package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
  29. package/es/components/big-table/src/hooks/useTableParse.js +1 -142
  30. package/es/components/big-table/src/utils.js +1 -618
  31. package/es/components/bpmn-workflow/index.js +1 -10
  32. package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
  33. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
  34. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
  35. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
  36. package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
  37. package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
  38. package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
  39. package/es/components/button-print/index.js +1 -12
  40. package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
  41. package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
  42. package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
  43. package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
  44. package/es/components/button-print/src/components/Preview.vue.js +1 -6
  45. package/es/components/button-print/src/components/Preview.vue2.js +1 -67
  46. package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
  47. package/es/components/button-print/src/utils/browserPrint.js +1 -43
  48. package/es/components/button-print/src/utils/dialog.js +1 -121
  49. package/es/components/button-print/src/utils/index.js +1 -2
  50. package/es/components/button-print/src/utils/print.d.ts +5 -1
  51. package/es/components/button-print/src/utils/print.js +1 -432
  52. package/es/components/editor/index.js +1 -10
  53. package/es/components/editor/src/Editor.js +1 -77
  54. package/es/components/fabric-chart/index.js +1 -10
  55. package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
  56. package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
  57. package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
  58. package/es/components/fabric-chart/src/components/useStyle.js +1 -36
  59. package/es/components/fabric-chart/src/hooks/constant.js +1 -78
  60. package/es/components/fabric-chart/src/hooks/index.js +1 -11
  61. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
  62. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
  63. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
  64. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
  65. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
  66. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
  67. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
  68. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
  69. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
  70. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
  71. package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
  72. package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
  73. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
  74. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
  75. package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
  76. package/es/components/fabric-chart/src/utils/index.js +1 -15624
  77. package/es/components/fabric-chart/src/utils/utils.js +1 -32
  78. package/es/components/field-set/index.js +1 -10
  79. package/es/components/field-set/src/FieldSet.vue.js +1 -470
  80. package/es/components/form-config/index.js +1 -10
  81. package/es/components/form-config/src/FormConfig.vue.js +1 -124
  82. package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
  83. package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
  84. package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
  85. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
  86. package/es/components/form-config/src/components/index.js +1 -6
  87. package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
  88. package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
  89. package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
  90. package/es/components/form-config/src/components/renderer/index.js +1 -3
  91. package/es/components/form-config/src/constants/index.js +1 -61
  92. package/es/components/form-config/src/hooks/index.js +1 -3
  93. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
  94. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
  95. package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
  96. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
  97. package/es/components/form-config/src/utils/index.js +1 -26
  98. package/es/components/form-render/index.js +1 -30
  99. package/es/components/form-render/src/FormRender.vue.js +1 -239
  100. package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
  101. package/es/components/form-render/src/components/renderer/combination.js +1 -114
  102. package/es/components/form-render/src/components/renderer/complex.js +1 -37
  103. package/es/components/form-render/src/components/renderer/date.js +1 -171
  104. package/es/components/form-render/src/components/renderer/formItem.js +1 -128
  105. package/es/components/form-render/src/components/renderer/index.js +1 -43
  106. package/es/components/form-render/src/components/renderer/input.js +1 -50
  107. package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
  108. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
  109. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
  110. package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
  111. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
  112. package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
  113. package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
  114. package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
  115. package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
  116. package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
  117. package/es/components/form-render/src/components/renderer/select.js +1 -176
  118. package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
  119. package/es/components/form-render/src/components/renderer/slider.js +1 -38
  120. package/es/components/form-render/src/components/renderer/switch.js +1 -48
  121. package/es/components/form-render/src/components/renderer/textarea.js +1 -36
  122. package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
  123. package/es/components/form-render/src/constants/index.js +1 -59
  124. package/es/components/form-render/src/hooks/index.js +1 -15
  125. package/es/components/form-render/src/hooks/useAnchor.js +1 -99
  126. package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
  127. package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
  128. package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
  129. package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
  130. package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
  131. package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
  132. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
  133. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
  134. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
  135. package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
  136. package/es/components/form-render/src/hooks/useFormContext.js +1 -70
  137. package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
  138. package/es/components/form-render/src/hooks/useFormField.js +1 -13
  139. package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
  140. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
  141. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
  142. package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
  143. package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
  144. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
  145. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
  146. package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
  147. package/es/components/form-render/src/types/fieldItem.js +1 -1
  148. package/es/components/form-render/src/types/index.js +1 -1
  149. package/es/components/form-render/src/utils/business.js +1 -114
  150. package/es/components/form-render/src/utils/dom.js +1 -38
  151. package/es/components/form-render/src/utils/index.js +1 -241
  152. package/es/components/form-render/src/utils/schema.js +1 -105
  153. package/es/components/grid/index.js +1 -11
  154. package/es/components/grid/src/Grid.js +1 -28
  155. package/es/components/grid/src/hooks.js +1 -168
  156. package/es/components/iho-table/index.js +1 -36
  157. package/es/components/iho-table/src/IhoTable.vue.js +1 -157
  158. package/es/components/iho-table/src/constants/index.js +1 -157
  159. package/es/components/iho-table/src/hooks/export.js +1 -2
  160. package/es/components/iho-table/src/hooks/index.js +1 -2
  161. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
  162. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
  163. package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
  164. package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
  165. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
  166. package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
  167. package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
  168. package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
  169. package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
  170. package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
  171. package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
  172. package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
  173. package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
  174. package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
  175. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
  176. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
  177. package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
  178. package/es/components/iho-table/src/plugins/index.js +1 -47
  179. package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
  180. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
  181. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
  182. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
  183. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
  184. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
  185. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
  186. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
  187. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
  188. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
  189. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
  190. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
  191. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
  192. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
  193. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
  194. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
  195. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
  196. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
  197. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
  198. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
  199. package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
  200. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
  201. package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
  202. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
  203. package/es/components/iho-table/src/types/index.js +1 -1
  204. package/es/components/iho-table/src/types/pluginType.js +1 -16
  205. package/es/components/iho-table/src/utils/index.js +1 -169
  206. package/es/components/index.js +1 -119
  207. package/es/components/info-header/index.js +1 -10
  208. package/es/components/info-header/src/HiddenContent.vue.js +1 -70
  209. package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
  210. package/es/components/info-header/src/InfoHeader.vue.js +1 -313
  211. package/es/components/insurance-sdk/index.js +1 -1
  212. package/es/components/insurance-sdk/src/constants/index.js +1 -160
  213. package/es/components/insurance-sdk/src/utils/index.js +1 -1
  214. package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
  215. package/es/components/keyboard/index.d.ts +1 -1
  216. package/es/components/keyboard/index.js +1 -10
  217. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  218. package/es/components/keyboard/src/Keyboard.vue.js +1 -164
  219. package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
  220. package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -1
  221. package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
  222. package/es/components/keyboard/src/utils/index.js +1 -5
  223. package/es/components/map/index.js +1 -10
  224. package/es/components/map/src/Map.vue.js +1 -336
  225. package/es/components/recommend-search/index.js +1 -10
  226. package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
  227. package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
  228. package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
  229. package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
  230. package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
  231. package/es/components/recommend-search/src/constant/index.js +1 -7
  232. package/es/components/scale-view/index.js +1 -35
  233. package/es/components/scale-view/src/ScaleView.vue.js +1 -429
  234. package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
  235. package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
  236. package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
  237. package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
  238. package/es/components/scale-view/src/components/NoData.vue.js +1 -74
  239. package/es/components/scale-view/src/components/ScaleScore.js +1 -63
  240. package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
  241. package/es/components/scale-view/src/components/formitem/address.js +1 -3993
  242. package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
  243. package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
  244. package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
  245. package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
  246. package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
  247. package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
  248. package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
  249. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
  250. package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
  251. package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
  252. package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
  253. package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
  254. package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
  255. package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
  256. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
  257. package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
  258. package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
  259. package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
  260. package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
  261. package/es/components/scale-view/src/hooks/use-component.js +1 -86
  262. package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
  263. package/es/components/scale-view/src/hooks/use-event.js +1 -129
  264. package/es/components/scale-view/src/hooks/use-noData.js +1 -41
  265. package/es/components/scale-view/src/utils/judge-types.js +1 -36
  266. package/es/components/search-cascader/index.js +1 -10
  267. package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
  268. package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
  269. package/es/components/search-cascader/src/components/index.js +1 -1
  270. package/es/components/search-cascader/src/constants/index.js +1 -11
  271. package/es/components/search-cascader/src/hooks/index.js +1 -1
  272. package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
  273. package/es/components/search-cascader/src/utils/index.js +1 -11
  274. package/es/components/select-label/index.js +1 -15
  275. package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
  276. package/es/components/select-label/src/SelectLabel.vue.js +1 -6
  277. package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
  278. package/es/components/select-label/src/components/label-classify.vue.js +1 -132
  279. package/es/components/select-person/index.js +1 -10
  280. package/es/components/select-person/src/SelectPerson.vue.js +1 -6
  281. package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
  282. package/es/components/select-person/src/utils/index.js +1 -58
  283. package/es/components/shortcut-provider/index.js +1 -12
  284. package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
  285. package/es/components/shortcut-provider/src/constants/index.js +1 -8
  286. package/es/components/shortcut-provider/src/hooks/index.js +1 -2
  287. package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
  288. package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
  289. package/es/components/shortcut-provider/src/utils/index.js +1 -92
  290. package/es/components/shortcut-setter/index.js +1 -10
  291. package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
  292. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
  293. package/es/components/steps-wheel/index.js +1 -10
  294. package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
  295. package/es/components/table-filter/index.js +1 -21
  296. package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
  297. package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
  298. package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
  299. package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
  300. package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
  301. package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
  302. package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
  303. package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
  304. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
  305. package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
  306. package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
  307. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
  308. package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
  309. package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
  310. package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
  311. package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
  312. package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
  313. package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
  314. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
  315. package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
  316. package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
  317. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
  318. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
  319. package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
  320. package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
  321. package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
  322. package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
  323. package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
  324. package/es/components/table-filter/src/const/dataOptions.js +1 -107
  325. package/es/components/table-filter/src/const/index.js +1 -5
  326. package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
  327. package/es/components/table-filter/src/directive/preventReClick.js +1 -14
  328. package/es/components/table-filter/src/directive/resize.js +1 -12
  329. package/es/components/table-filter/src/hooks/export.js +1 -1
  330. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
  331. package/es/components/table-filter/src/hooks/useMixins.js +1 -532
  332. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
  333. package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
  334. package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
  335. package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
  336. package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
  337. package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
  338. package/es/components/table-filter/src/tool/options.js +1 -200
  339. package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
  340. package/es/components/table-filter/src/tool/time-domain.js +1 -100
  341. package/es/components/table-filter/src/tool/transformData.js +1 -169
  342. package/es/components/table-filter/src/tool/utils.js +1 -29
  343. package/es/components/table-filter/src/types/enums.js +1 -67
  344. package/es/components/time-line/index.js +1 -10
  345. package/es/components/time-line/src/TimeLine.vue.js +1 -70
  346. package/es/components/vod-chunk-upload/index.js +1 -14
  347. package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
  348. package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
  349. package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
  350. package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
  351. package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
  352. package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
  353. package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
  354. package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
  355. package/es/shared/assets/img/failure.png.js +1 -3
  356. package/es/shared/assets/img/no-permission.png.js +1 -3
  357. package/es/shared/assets/img/nodata.png.js +1 -3
  358. package/es/shared/assets/img/notfound.png.js +1 -3
  359. package/es/shared/assets/img/qr.png.js +1 -3
  360. package/es/shared/assets/img/success.png.js +1 -3
  361. package/es/shared/assets/img/video.png.js +1 -3
  362. package/es/shared/assets/img/video_default_cover.png.js +1 -3
  363. package/es/shared/assets/img/xb_big.png.js +1 -3
  364. package/es/shared/assets/img/xb_small.png.js +1 -3
  365. package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
  366. package/es/shared/components/SelectPage/index.js +1 -2
  367. package/es/shared/components/SlotRender/SlotRender.js +1 -35
  368. package/es/shared/components/SlotRender/index.js +1 -2
  369. package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
  370. package/es/shared/components/SvgIcon/index.js +1 -2
  371. package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
  372. package/es/shared/components/TextOverTooltip/index.js +1 -2
  373. package/es/shared/components/VueDraggable/index.js +1 -2
  374. package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
  375. package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
  376. package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
  377. package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
  378. package/es/shared/components/VueDraggable/src/util/console.js +1 -9
  379. package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
  380. package/es/shared/components/VueDraggable/src/util/string.js +1 -11
  381. package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
  382. package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
  383. package/es/shared/components/no-data/NoData.vue.js +1 -74
  384. package/es/shared/components/no-data/index.js +1 -2
  385. package/es/shared/components/player-vod/player.js +1 -121
  386. package/es/shared/components/player-vod/video-modal.js +1 -91
  387. package/es/shared/global/variable.js +1 -3
  388. package/es/shared/utils/anime.js +1 -129
  389. package/es/shared/utils/colorLog.js +1 -53
  390. package/es/shared/utils/index.js +1 -167
  391. package/es/shared/utils/loadViewer.js +1 -11
  392. package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
  393. package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
  394. package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
  395. package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
  396. package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
  397. package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
  398. package/es/shared/utils/tapable/Hook.js +1 -140
  399. package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
  400. package/es/shared/utils/tapable/SyncBailHook.js +1 -19
  401. package/es/shared/utils/tapable/SyncHook.js +1 -34
  402. package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
  403. package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
  404. package/es/shared/utils/utilExpand.js +1 -781
  405. package/es/shared/utils/vexutils.js +1 -59
  406. package/package.json +2 -2
@@ -1,129 +1 @@
1
- import XEUtils from 'xe-utils';
2
- import 'moment';
3
-
4
- const useEvent = (props, state) => {
5
- const formKey = (item) => {
6
- return item.databaseTitle || item.title;
7
- };
8
- const handleLogicMaxNext = (condition = []) => {
9
- const arr = condition.map((item) => item.next_subject == "end" ? 9999 : +(item.next_subject || 9999));
10
- const max = Math.max.call(null, ...arr);
11
- return max;
12
- };
13
- const handleLogicList = (formItem, formArray) => {
14
- const { seq } = formItem;
15
- let list = formArray.map((item2) => {
16
- if (item2.seq > seq && item2.isShow && item2.__isLogic__)
17
- return item2;
18
- return false;
19
- });
20
- let nextItemMax = 0;
21
- let i = 0, len = list.length, item;
22
- for (; i < len; i++) {
23
- item = list[i];
24
- let curVal = state.form[formKey(item)];
25
- if (!curVal)
26
- continue;
27
- if (Array.isArray(curVal)) {
28
- if (!curVal.length)
29
- continue;
30
- }
31
- const { nextLogic, seq: seq2, __isLogic__, __lastSeq__ } = item;
32
- if (!nextLogic.next_logic_is || !nextLogic.condition.length)
33
- continue;
34
- if (__lastSeq__) {
35
- nextItemMax = __lastSeq__;
36
- break;
37
- }
38
- }
39
- return nextItemMax;
40
- };
41
- const nextLogicEvent = (choiceValue, formItem, formArray = [], isInit) => {
42
- const { nextLogic, seq } = formItem;
43
- if (!nextLogic)
44
- return;
45
- if (nextLogic.next_logic_is && nextLogic.condition.length) {
46
- let nextMax = 9999, nextItemMax = 0;
47
- if (!isInit) {
48
- nextMax = handleLogicMaxNext(nextLogic.condition);
49
- nextItemMax = handleLogicList(formItem, formArray);
50
- }
51
- nextLogic.condition.some((con) => {
52
- const { value, next_subject } = con;
53
- const lastSeq = next_subject == "end" ? 9999 : next_subject;
54
- if (nextItemMax && nextItemMax > seq && nextItemMax < nextMax) {
55
- nextMax = nextItemMax;
56
- }
57
- if (nextLogic.next_logic == "condition") {
58
- let hasValue = false;
59
- if (Array.isArray(choiceValue)) {
60
- hasValue = choiceValue.includes(value);
61
- } else {
62
- hasValue = choiceValue === value;
63
- }
64
- formItem.__isLogic__ = hasValue;
65
- formItem.__lastSeq__ = seq + 1;
66
- if (hasValue) {
67
- formArray.forEach((item) => {
68
- if (item.seq > seq && item.seq < lastSeq) {
69
- item.isShow = false;
70
- const key = item.val_key;
71
- state.form[key] && (state.form[key] = "");
72
- } else if (item.seq >= lastSeq && item.seq < nextMax) {
73
- item.isShow = true;
74
- }
75
- });
76
- return true;
77
- } else {
78
- formArray.forEach((item) => {
79
- if (item.seq > seq && item.seq < lastSeq) {
80
- item.isShow = true;
81
- }
82
- });
83
- }
84
- } else if (nextLogic.next_logic == "uncondition") {
85
- let res = XEUtils.isEmpty(choiceValue);
86
- formItem.__isLogic__ = !res;
87
- formItem.__lastSeq__ = seq + 1;
88
- formArray.forEach((item) => {
89
- const key = item.val_key;
90
- if (item.seq > seq && item.seq < lastSeq) {
91
- item.isShow = res;
92
- if (!res) {
93
- state.form[key] && (state.form[key] = "");
94
- }
95
- }
96
- });
97
- }
98
- });
99
- }
100
- };
101
- const handleDynamicDataRelation = (list, formItem, formArray) => {
102
- let { targetSource } = formItem;
103
- if (!targetSource || !Object.keys(targetSource).length)
104
- return;
105
- if (!targetSource.target_id)
106
- return;
107
- let { relationParam = [] } = targetSource;
108
- if (!relationParam.length)
109
- return;
110
- relationParam.forEach((item) => {
111
- let matchEle = formArray.find((v) => v.seq === item.relationElement);
112
- const key = matchEle.val_key;
113
- if (matchEle) {
114
- if (!list.length) {
115
- state.form[key] = "";
116
- } else {
117
- let relationFieldList = list.map((v) => v[item.relationField] || "/") || "";
118
- state.form[key] = relationFieldList.join(",");
119
- }
120
- }
121
- });
122
- };
123
- return {
124
- nextLogicEvent,
125
- handleDynamicDataRelation
126
- };
127
- };
128
-
129
- export { useEvent };
1
+ import e from"xe-utils";import"moment";const t=(t,i)=>{const n=e=>e.databaseTitle||e.title;return{nextLogicEvent:(t,o,s=[],l)=>{const{nextLogic:r,seq:c}=o;if(r&&r.next_logic_is&&r.condition.length){let _=9999,a=0;l||(_=((e=[])=>{const t=e.map((e=>"end"==e.next_subject?9999:+(e.next_subject||9999)));return Math.max.call(null,...t)})(r.condition),a=((e,t)=>{const{seq:o}=e;let s,l=t.map((e=>!!(e.seq>o&&e.isShow&&e.__isLogic__)&&e)),r=0,c=0,_=l.length;for(;c<_;c++){s=l[c];let e=i.form[n(s)];if(!e)continue;if(Array.isArray(e)&&!e.length)continue;const{nextLogic:t,seq:o,__isLogic__:_,__lastSeq__:a}=s;if(t.next_logic_is&&t.condition.length&&a){r=a;break}}return r})(o,s)),r.condition.some((n=>{const{value:l,next_subject:f}=n,m="end"==f?9999:f;if(a&&a>c&&a<_&&(_=a),"condition"==r.next_logic){let e=!1;if(e=Array.isArray(t)?t.includes(l):t===l,o.__isLogic__=e,o.__lastSeq__=c+1,e)return s.forEach((e=>{if(e.seq>c&&e.seq<m){e.isShow=!1;const t=e.val_key;i.form[t]&&(i.form[t]="")}else e.seq>=m&&e.seq<_&&(e.isShow=!0)})),!0;s.forEach((e=>{e.seq>c&&e.seq<m&&(e.isShow=!0)}))}else if("uncondition"==r.next_logic){let n=e.isEmpty(t);o.__isLogic__=!n,o.__lastSeq__=c+1,s.forEach((e=>{const t=e.val_key;e.seq>c&&e.seq<m&&(e.isShow=n,n||i.form[t]&&(i.form[t]=""))}))}}))}},handleDynamicDataRelation:(e,t,n)=>{let{targetSource:o}=t;if(!o||!Object.keys(o).length)return;if(!o.target_id)return;let{relationParam:s=[]}=o;s.length&&s.forEach((t=>{let o=n.find((e=>e.seq===t.relationElement));const s=o.val_key;if(o)if(e.length){let n=e.map((e=>e[t.relationField]||"/"))||"";i.form[s]=n.join(",")}else i.form[s]=""}))}}};export{t as useEvent};
@@ -1,41 +1 @@
1
- import { reactive } from 'vue';
2
-
3
- function useNoData() {
4
- let state = reactive({
5
- noData: false,
6
- noDataTip: "1.1.6.11",
7
- noDataImg: "nodata"
8
- });
9
- const setNoData = (noData, noDataTip = "1.1.6.11", noDataImg = "nodata") => {
10
- state.noData = noData;
11
- state.noDataTip = noDataTip || "1.1.6.11";
12
- state.noDataImg = errResult(noDataImg) || "nodata";
13
- };
14
- const resetNodata = () => {
15
- state.noData = false;
16
- state.noDataTip = "1.1.6.11";
17
- state.noDataImg = "nodata";
18
- };
19
- const errResult = (result) => {
20
- let res = "nodata";
21
- switch (result) {
22
- case "10000":
23
- res = "no-permission";
24
- break;
25
- case "Failure":
26
- res = "failure";
27
- break;
28
- default:
29
- res = "nodata";
30
- break;
31
- }
32
- return res;
33
- };
34
- return {
35
- noDataState: state,
36
- setNoData,
37
- resetNodata
38
- };
39
- }
40
-
41
- export { useNoData as default };
1
+ import{reactive as a}from"vue";function t(){let t=a({noData:!1,noDataTip:"1.1.6.11",noDataImg:"nodata"});const o=a=>{let t="nodata";switch(a){case"10000":t="no-permission";break;case"Failure":t="failure";break;default:t="nodata"}return t};return{noDataState:t,setNoData:(a,n="1.1.6.11",e="nodata")=>{t.noData=a,t.noDataTip=n||"1.1.6.11",t.noDataImg=o(e)||"nodata"},resetNodata:()=>{t.noData=!1,t.noDataTip="1.1.6.11",t.noDataImg="nodata"}}}export{t as default};
@@ -1,36 +1 @@
1
- const isOnlyOptions = (e) => {
2
- const list = ["RADIO_BLOCK", "CHECKBOX_BLOCK"];
3
- return list.includes(e);
4
- };
5
- const isCollection = (e) => {
6
- const list = ["TITLE", "LINEBAR", "PROMPT", "IMGCARD", "RICH_TEXT"];
7
- return list.includes(e);
8
- };
9
- const isEvaluation = (e) => {
10
- let list = ["EVALUATE_RADIO_BLOCK", "EVALUATE_CHECKBOX_BLOCK", "EVALUATE_SELECT", "EVALUATE_INPUT"];
11
- return list.includes(e);
12
- };
13
- const handleQueryParams = () => {
14
- let params = {};
15
- let hash = window.location.search.split("?")[1];
16
- if (!hash)
17
- return {};
18
- hash = hash.replace(/\+/g, "%20");
19
- for (let [key, value] of new URLSearchParams(hash).entries()) {
20
- params[key] = decodeURIComponent(value);
21
- }
22
- return params;
23
- };
24
- const getQueryVariable = (variable, state, params) => {
25
- let query = {};
26
- if (state.source == "layout") {
27
- query = params;
28
- } else {
29
- query = handleQueryParams() || {};
30
- }
31
- if (!query)
32
- return false;
33
- return query[variable] || false;
34
- };
35
-
36
- export { getQueryVariable, handleQueryParams, isCollection, isEvaluation, isOnlyOptions };
1
+ const e=e=>["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(e),E=e=>["TITLE","LINEBAR","PROMPT","IMGCARD","RICH_TEXT"].includes(e),r=e=>["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e),n=()=>{let e={},E=window.location.search.split("?")[1];if(!E)return{};E=E.replace(/\+/g,"%20");for(let[r,n]of new URLSearchParams(E).entries())e[r]=decodeURIComponent(n);return e},t=(e,E,r)=>{let t={};return t="layout"==E.source?r:n()||{},t&&t[e]||!1};export{t as getQueryVariable,n as handleQueryParams,E as isCollection,r as isEvaluation,e as isOnlyOptions};
@@ -1,10 +1 @@
1
- import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
2
- import { safeComponentRegister } from '../../shared/utils/index.js';
3
- import script from './src/SearchCascader.vue.js';
4
-
5
- const SearchCascader = script;
6
- SearchCascader.install = function(app) {
7
- safeComponentRegister(app, SearchCascader, COMPONENT_NAMESPACE + "SearchCascader");
8
- };
9
-
10
- export { SearchCascader as default };
1
+ import{COMPONENT_NAMESPACE as r}from"../../shared/global/variable.js";import{safeComponentRegister as a}from"../../shared/utils/index.js";import s from"./src/SearchCascader.vue.js";const e=s;e.install=function(s){a(s,e,r+"SearchCascader")};export{e as default};
@@ -1,194 +1 @@
1
- import { defineComponent, provide, computed, ref, nextTick, openBlock, createBlock, unref, isRef, normalizeStyle, withCtx, createVNode, withKeys, createElementVNode, renderSlot } from 'vue';
2
- import { uuidGenerator } from '../../../shared/utils/index.js';
3
- import { NOOP } from '@vue/shared';
4
- import { useVModel, onClickOutside, useDebounceFn } from '@vueuse/core';
5
- import { isString, isArray, isFunction, isObject } from 'lodash-es';
6
- import { NPopover, NInput } from 'naive-ui';
7
- import { InjectionSearchCascaderCheckAbleLevel, InjectionSearchCascaderLoadingNode, InjectionSearchCascaderValue } from './constants/index.js';
8
- import { useCssVariable } from './hooks/useCssVariable.js';
9
- import { SearchMenu } from './components/SearchMenu.js';
10
- import _export_sfc from '../../../_virtual/plugin-vue_export-helper.js';
11
-
12
- const _hoisted_1 = ["id"];
13
- const _sfc_main = /* @__PURE__ */ defineComponent({
14
- __name: "SearchCascader",
15
- props: {
16
- value: { type: [String, Array] },
17
- show: { type: Boolean, default: false },
18
- clearable: { type: Boolean, default: false },
19
- childKey: { type: String, default: "children" },
20
- placeholder: { type: String, default: "\u8BF7\u9009\u62E9" },
21
- editPlaceholder: { type: String, default: "\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u8FDB\u884C\u641C\u7D22" },
22
- options: { type: Array, default: () => [] },
23
- search: { type: Function },
24
- labelKey: { type: String, default: "label" },
25
- valueKey: { type: String, default: "value" },
26
- checkAbleLevel: { type: [Number, String], default: "last" },
27
- beforeSetValue: { type: Function }
28
- },
29
- emits: ["update:value", "focus", "update:show"],
30
- setup(__props, { emit }) {
31
- const props = __props;
32
- function emitValue(value) {
33
- Promise.resolve(isFunction(props.beforeSetValue) ? props.beforeSetValue(value) : value).then(
34
- (result) => emit("update:value", result),
35
- NOOP
36
- );
37
- }
38
- function onClear() {
39
- emitValue([]);
40
- }
41
- function onClick(evt) {
42
- var _a;
43
- if (((_a = evt.target) == null ? void 0 : _a.tagName) !== "INPUT")
44
- return;
45
- openMenu();
46
- }
47
- const cssVariable = useCssVariable();
48
- const uuid = uuidGenerator();
49
- const show = useVModel(props, "show", emit);
50
- provide(
51
- InjectionSearchCascaderCheckAbleLevel,
52
- computed(() => props.checkAbleLevel)
53
- );
54
- const patternContent = ref("");
55
- const displayValue = computed({
56
- get() {
57
- if (show.value)
58
- return patternContent.value;
59
- if (isString(props.value))
60
- return props.value;
61
- if (isArray(props.value))
62
- return arrayOptionsToString(props.value);
63
- return "";
64
- function arrayOptionsToString(optionList) {
65
- return optionList.reduce((res, item, idx) => {
66
- if (idx === 0)
67
- return item[props.labelKey];
68
- return res + " / " + item[props.labelKey];
69
- }, "");
70
- }
71
- },
72
- set(value) {
73
- patternContent.value = value;
74
- search(void 0, value);
75
- }
76
- });
77
- function onFocus(focusEvt) {
78
- emit("focus", focusEvt);
79
- }
80
- function openMenu() {
81
- if (show.value)
82
- return;
83
- show.value = true;
84
- patternContent.value = "";
85
- search();
86
- }
87
- async function closeMenu() {
88
- var _a;
89
- show.value = false;
90
- (_a = inputRef.value) == null ? void 0 : _a.blur();
91
- }
92
- const inputRef = ref();
93
- onClickOutside(inputRef, (evt) => {
94
- var _a;
95
- if (!show.value)
96
- return;
97
- const _evt = evt;
98
- if (!_evt.target)
99
- return closeMenu();
100
- if (isInPopper(_evt.target)) {
101
- (_a = inputRef.value) == null ? void 0 : _a.focus();
102
- return;
103
- }
104
- closeMenu();
105
- function isInPopper(targetEle) {
106
- let result = false;
107
- let current = targetEle;
108
- while (current) {
109
- if (current.id === uuid) {
110
- result = true;
111
- break;
112
- }
113
- current = current.parentElement;
114
- }
115
- return result;
116
- }
117
- });
118
- const popoverRef = ref();
119
- const currentNode = ref();
120
- const loadingNode = ref(null);
121
- provide(InjectionSearchCascaderLoadingNode, loadingNode);
122
- provide(
123
- InjectionSearchCascaderValue,
124
- computed(() => props.value)
125
- );
126
- const search = useDebounceFn(async (payload, keyword) => {
127
- var _a;
128
- const { type, node } = payload || {};
129
- try {
130
- if (type === "update") {
131
- isFunction(props.search) && props.search({ ...node, isLeaf: true });
132
- return;
133
- }
134
- loadingNode.value = node;
135
- const result = await (isFunction(props.search) && props.search(node, keyword));
136
- currentNode.value = isObject(result) ? result : node;
137
- } finally {
138
- loadingNode.value = null;
139
- await nextTick();
140
- (_a = popoverRef.value) == null ? void 0 : _a.syncPosition();
141
- }
142
- }, 400);
143
- return (_ctx, _cache) => {
144
- return openBlock(), createBlock(unref(NPopover), {
145
- class: "search-cascader",
146
- trigger: "manual",
147
- show: unref(show),
148
- "onUpdate:show": _cache[1] || (_cache[1] = ($event) => isRef(show) ? show.value = $event : null),
149
- "show-arrow": false,
150
- placement: "bottom-start",
151
- style: normalizeStyle(unref(cssVariable)),
152
- width: __props.options.length ? void 0 : "trigger",
153
- ref_key: "popoverRef",
154
- ref: popoverRef
155
- }, {
156
- trigger: withCtx(() => [
157
- createVNode(unref(NInput), {
158
- class: "search-cascader__input",
159
- placeholder: unref(show) ? __props.editPlaceholder : __props.placeholder,
160
- clearable: __props.clearable,
161
- onClear,
162
- value: unref(displayValue),
163
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => isRef(displayValue) ? displayValue.value = $event : null),
164
- ref_key: "inputRef",
165
- ref: inputRef,
166
- onFocus,
167
- onClick,
168
- onKeydown: withKeys(onClick, ["enter"])
169
- }, null, 8, ["placeholder", "clearable", "value", "onKeydown"])
170
- ]),
171
- default: withCtx(() => [
172
- createElementVNode("section", { id: unref(uuid) }, [
173
- createVNode(unref(SearchMenu), {
174
- "label-key": __props.labelKey,
175
- "value-key": __props.valueKey,
176
- options: __props.options,
177
- onNodeClick: unref(search),
178
- "current-node": currentNode.value
179
- }, {
180
- empty: withCtx(() => [
181
- renderSlot(_ctx.$slots, "empty")
182
- ]),
183
- _: 3
184
- }, 8, ["label-key", "value-key", "options", "onNodeClick", "current-node"])
185
- ], 8, _hoisted_1)
186
- ]),
187
- _: 3
188
- }, 8, ["show", "style", "width"]);
189
- };
190
- }
191
- });
192
- var script = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "SearchCascader.vue"]]);
193
-
194
- export { script as default };
1
+ import{defineComponent as e,provide as a,computed as l,ref as t,nextTick as r,openBlock as o,createBlock as u,unref as n,isRef as s,normalizeStyle as i,withCtx as c,createVNode as p,withKeys as v,createElementVNode as d,renderSlot as f}from"vue";import{uuidGenerator as y}from"../../../shared/utils/index.js";import{NOOP as h}from"@vue/shared";import{useVModel as m,onClickOutside as b,useDebounceFn as g}from"@vueuse/core";import{isString as w,isArray as k,isFunction as S,isObject as _}from"lodash-es";import{NPopover as K,NInput as C}from"naive-ui";import{InjectionSearchCascaderCheckAbleLevel as j,InjectionSearchCascaderLoadingNode as N,InjectionSearchCascaderValue as P}from"./constants/index.js";import{useCssVariable as x}from"./hooks/useCssVariable.js";import{SearchMenu as A}from"./components/SearchMenu.js";import V from"../../../_virtual/plugin-vue_export-helper.js";const F=["id"];var L=V(e({__name:"SearchCascader",props:{value:{type:[String,Array]},show:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},childKey:{type:String,default:"children"},placeholder:{type:String,default:"请选择"},editPlaceholder:{type:String,default:"请输入关键字进行搜索"},options:{type:Array,default:()=>[]},search:{type:Function},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},checkAbleLevel:{type:[Number,String],default:"last"},beforeSetValue:{type:Function}},emits:["update:value","focus","update:show"],setup(e,{emit:V}){const L=e;function U(){var e;e=[],Promise.resolve(S(L.beforeSetValue)?L.beforeSetValue(e):e).then((e=>V("update:value",e)),h)}function B(e){var a;"INPUT"===(null==(a=e.target)?void 0:a.tagName)&&function(){if(I.value)return;I.value=!0,M.value="",J()}()}const R=x(),E=y(),I=m(L,"show",V);a(j,l((()=>L.checkAbleLevel)));const M=t(""),T=l({get:()=>I.value?M.value:w(L.value)?L.value:k(L.value)?L.value.reduce(((e,a,l)=>0===l?a[L.labelKey]:e+" / "+a[L.labelKey]),""):"",set(e){M.value=e,J(void 0,e)}});function $(e){V("focus",e)}async function q(){var e;I.value=!1,null==(e=z.value)||e.blur()}const z=t();b(z,(e=>{var a;if(!I.value)return;const l=e;if(!l.target)return q();!function(e){let a=!1,l=e;for(;l;){if(l.id===E){a=!0;break}l=l.parentElement}return a}(l.target)?q():null==(a=z.value)||a.focus()}));const D=t(),G=t(),H=t(null);a(N,H),a(P,l((()=>L.value)));const J=g((async(e,a)=>{var l;const{type:t,node:o}=e||{};try{if("update"===t)return void(S(L.search)&&L.search({...o,isLeaf:!0}));H.value=o;const e=await(S(L.search)&&L.search(o,a));G.value=_(e)?e:o}finally{H.value=null,await r(),null==(l=D.value)||l.syncPosition()}}),400);return(a,l)=>(o(),u(n(K),{class:"search-cascader",trigger:"manual",show:n(I),"onUpdate:show":l[1]||(l[1]=e=>s(I)?I.value=e:null),"show-arrow":!1,placement:"bottom-start",style:i(n(R)),width:e.options.length?void 0:"trigger",ref_key:"popoverRef",ref:D},{trigger:c((()=>[p(n(C),{class:"search-cascader__input",placeholder:n(I)?e.editPlaceholder:e.placeholder,clearable:e.clearable,onClear:U,value:n(T),"onUpdate:value":l[0]||(l[0]=e=>s(T)?T.value=e:null),ref_key:"inputRef",ref:z,onFocus:$,onClick:B,onKeydown:v(B,["enter"])},null,8,["placeholder","clearable","value","onKeydown"])])),default:c((()=>[d("section",{id:n(E)},[p(n(A),{"label-key":e.labelKey,"value-key":e.valueKey,options:e.options,onNodeClick:n(J),"current-node":G.value},{empty:c((()=>[f(a.$slots,"empty")])),_:3},8,["label-key","value-key","options","onNodeClick","current-node"])],8,F)])),_:3},8,["show","style","width"]))}}),[["__file","SearchCascader.vue"]]);export{L as default};
@@ -1,196 +1 @@
1
- import { defineComponent, computed, inject, createVNode, withModifiers, ref, createTextVNode } from 'vue';
2
- import { traverse } from '../../../../shared/utils/index.js';
3
- import { Reload, ChevronForward } from '@vicons/ionicons5';
4
- import { NOOP } from '@vue/shared';
5
- import { useVirtualList } from '@vueuse/core';
6
- import { isNumber, isArray, isEqual, isString, isFunction } from 'lodash-es';
7
- import { NCheckbox } from 'naive-ui';
8
- import { InjectionSearchCascaderLoadingNode, InjectionSearchCascaderValue, InjectionSearchCascaderCheckAbleLevel } from '../constants/index.js';
9
-
10
- const SearchMenuList = defineComponent({
11
- props: {
12
- options: {
13
- type: Array,
14
- default: () => []
15
- },
16
- activeNodes: {
17
- type: Array,
18
- default: () => []
19
- },
20
- level: {
21
- type: Number,
22
- required: true
23
- },
24
- labelKey: {
25
- type: String,
26
- default: "label"
27
- },
28
- valueKey: {
29
- type: String,
30
- default: "value"
31
- }
32
- },
33
- emits: ["nodeClick"],
34
- setup(props, {
35
- emit
36
- }) {
37
- const optionsRef = computed(() => props.options);
38
- const {
39
- list,
40
- containerProps,
41
- wrapperProps
42
- } = useVirtualList(optionsRef, {
43
- itemHeight: 32,
44
- overscan: 5
45
- });
46
- const loadingNode = inject(InjectionSearchCascaderLoadingNode);
47
- const valueRef = inject(InjectionSearchCascaderValue);
48
- const checkAbleLevel = inject(InjectionSearchCascaderCheckAbleLevel);
49
- const showCheckbox = computed(() => {
50
- return isNumber(checkAbleLevel.value) && checkAbleLevel.value <= props.level;
51
- });
52
- function isActive(node) {
53
- var _a;
54
- return (_a = props.activeNodes) == null ? void 0 : _a.includes(node);
55
- }
56
- function isChecked(node) {
57
- const nodeList = getNodeChain(node);
58
- if (isArray(valueRef.value)) {
59
- return isEqual(mapper(nodeList, props.valueKey), mapper(valueRef.value, props.valueKey));
60
- }
61
- if (isString(valueRef.value)) {
62
- const labelList = valueRef.value.split("/").map((item) => item.trim());
63
- return isEqual(labelList, mapper(nodeList, props.labelKey));
64
- }
65
- return false;
66
- function mapper(list2, prop) {
67
- return list2.map((item) => item[prop]);
68
- }
69
- function getNodeChain(node2) {
70
- const result = [node2];
71
- let currentNode = node2;
72
- while (currentNode.parent) {
73
- currentNode = currentNode.parent;
74
- result.unshift(currentNode);
75
- }
76
- return result;
77
- }
78
- }
79
- function updateValue(node) {
80
- emit("nodeClick", {
81
- type: "update",
82
- node
83
- });
84
- }
85
- return () => {
86
- return createVNode("div", {
87
- "class": "search-cascader__optionWrapper",
88
- "ref": containerProps.ref,
89
- "style": containerProps.style,
90
- "onScroll": containerProps.onScroll
91
- }, [createVNode("div", {
92
- "style": wrapperProps.value.style
93
- }, [list.value.map((item) => {
94
- return createVNode("div", {
95
- "class": ["search-cascader__option", {
96
- "search-cascader__option--active": isActive(item.data)
97
- }],
98
- "onClick": () => emit("nodeClick", {
99
- type: "search",
100
- node: item.data
101
- }),
102
- "title": item.data[props.labelKey]
103
- }, [createVNode("div", {
104
- "class": "search-cascader__optionText"
105
- }, [showCheckbox.value ? createVNode(NCheckbox, {
106
- "style": {
107
- marginRight: "8px"
108
- },
109
- "checked": isChecked(item.data),
110
- "onClick": withModifiers(NOOP, ["stop"]),
111
- "onUpdateChecked": (v) => v && updateValue(item.data)
112
- }, null) : null, item.data[props.labelKey]]), loadingNode.value === item.data ? createVNode(Reload, {
113
- "class": "rotate"
114
- }, null) : item.data.isLeaf ? null : createVNode(ChevronForward, null, null)]);
115
- })])]);
116
- };
117
- }
118
- });
119
- const SearchMenu = defineComponent({
120
- props: {
121
- childKey: {
122
- type: String,
123
- default: "children"
124
- },
125
- options: {
126
- type: Array,
127
- default: () => []
128
- },
129
- labelKey: {
130
- type: String,
131
- default: "label"
132
- },
133
- valueKey: {
134
- type: String,
135
- default: "value"
136
- },
137
- currentNode: {
138
- type: Object
139
- }
140
- },
141
- emits: ["nodeClick"],
142
- setup(props, {
143
- slots,
144
- emit
145
- }) {
146
- const activeNodes = ref([]);
147
- function renderList(options, idx) {
148
- return createVNode(SearchMenuList, {
149
- "level": idx + 1,
150
- "labelKey": props.labelKey,
151
- "valueKey": props.valueKey,
152
- "activeNodes": activeNodes.value,
153
- "onNodeClick": (payload) => emit("nodeClick", payload),
154
- "options": options
155
- }, null);
156
- }
157
- function renderEmpty() {
158
- return createVNode("section", {
159
- "class": "search-cascader__emptyWrapper"
160
- }, [isFunction(slots.empty) ? slots.empty() : createVNode("section", null, [createTextVNode("empty")])]);
161
- }
162
- function isNodeExpand(node) {
163
- let result = false;
164
- traverse(node, (n, stop) => {
165
- if (n !== props.currentNode)
166
- return;
167
- result = true;
168
- stop();
169
- }, ["children"]);
170
- return result;
171
- }
172
- function getRenderNodeList() {
173
- if (!isArray(props.options) || !props.currentNode)
174
- return [];
175
- const result = [props.options];
176
- let _options = props.options;
177
- activeNodes.value.length = 0;
178
- while (isArray(_options)) {
179
- const expandNode = _options.find(isNodeExpand);
180
- if (!expandNode)
181
- break;
182
- activeNodes.value.push(expandNode);
183
- _options = expandNode[props.childKey];
184
- result.push(_options);
185
- }
186
- return result;
187
- }
188
- return () => {
189
- return createVNode("section", {
190
- "class": "search-cascader__menuWrapper"
191
- }, [!isArray(props.options) || !props.options.length ? renderEmpty() : !props.currentNode ? renderList(props.options, 0) : getRenderNodeList().map(renderList)]);
192
- };
193
- }
194
- });
195
-
196
- export { SearchMenu };
1
+ import{defineComponent as e,computed as t,inject as a,createVNode as l,withModifiers as r,ref as n,createTextVNode as o}from"vue";import{traverse as i}from"../../../../shared/utils/index.js";import{Reload as s,ChevronForward as u}from"@vicons/ionicons5";import{NOOP as c}from"@vue/shared";import{useVirtualList as p}from"@vueuse/core";import{isNumber as d,isArray as v,isEqual as y,isString as f,isFunction as m}from"lodash-es";import{NCheckbox as h}from"naive-ui";import{InjectionSearchCascaderLoadingNode as K,InjectionSearchCascaderValue as b,InjectionSearchCascaderCheckAbleLevel as _}from"../constants/index.js";const k=e({props:{options:{type:Array,default:()=>[]},activeNodes:{type:Array,default:()=>[]},level:{type:Number,required:!0},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"}},emits:["nodeClick"],setup(e,{emit:n}){const o=t((()=>e.options)),{list:i,containerProps:m,wrapperProps:k}=p(o,{itemHeight:32,overscan:5}),g=a(K),C=a(b),N=a(_),S=t((()=>d(N.value)&&N.value<=e.level));function x(t){const a=function(e){const t=[e];let a=e;for(;a.parent;)a=a.parent,t.unshift(a);return t}(t);if(v(C.value))return y(l(a,e.valueKey),l(C.value,e.valueKey));if(f(C.value)){const t=C.value.split("/").map((e=>e.trim()));return y(t,l(a,e.labelKey))}return!1;function l(e,t){return e.map((e=>e[t]))}}return()=>l("div",{class:"search-cascader__optionWrapper",ref:m.ref,style:m.style,onScroll:m.onScroll},[l("div",{style:k.value.style},[i.value.map((t=>{return l("div",{class:["search-cascader__option",{"search-cascader__option--active":(a=t.data,null==(o=e.activeNodes)?void 0:o.includes(a))}],onClick:()=>n("nodeClick",{type:"search",node:t.data}),title:t.data[e.labelKey]},[l("div",{class:"search-cascader__optionText"},[S.value?l(h,{style:{marginRight:"8px"},checked:x(t.data),onClick:r(c,["stop"]),onUpdateChecked:e=>e&&function(e){n("nodeClick",{type:"update",node:e})}(t.data)},null):null,t.data[e.labelKey]]),g.value===t.data?l(s,{class:"rotate"},null):t.data.isLeaf?null:l(u,null,null)]);var a,o}))])])}}),g=e({props:{childKey:{type:String,default:"children"},options:{type:Array,default:()=>[]},labelKey:{type:String,default:"label"},valueKey:{type:String,default:"value"},currentNode:{type:Object}},emits:["nodeClick"],setup(e,{slots:t,emit:a}){const r=n([]);function s(t,n){return l(k,{level:n+1,labelKey:e.labelKey,valueKey:e.valueKey,activeNodes:r.value,onNodeClick:e=>a("nodeClick",e),options:t},null)}function u(t){let a=!1;return i(t,((t,l)=>{t===e.currentNode&&(a=!0,l())}),["children"]),a}function c(){if(!v(e.options)||!e.currentNode)return[];const t=[e.options];let a=e.options;for(r.value.length=0;v(a);){const l=a.find(u);if(!l)break;r.value.push(l),a=l[e.childKey],t.push(a)}return t}return()=>l("section",{class:"search-cascader__menuWrapper"},[v(e.options)&&e.options.length?e.currentNode?c().map(s):s(e.options,0):l("section",{class:"search-cascader__emptyWrapper"},[m(t.empty)?t.empty():l("section",null,[o("empty")])])])}});export{g as SearchMenu};
@@ -1 +1 @@
1
- export { SearchMenu } from './SearchMenu.js';
1
+ export{SearchMenu}from"./SearchMenu.js";
@@ -1,11 +1 @@
1
- const InjectionSearchCascaderLoadingNode = Symbol(
2
- "InjectionSearchCascaderLoadingNode "
3
- );
4
- const InjectionSearchCascaderValue = Symbol(
5
- "InjectionSearchCascaderValue "
6
- );
7
- const InjectionSearchCascaderCheckAbleLevel = Symbol(
8
- "InjectionSearchCascaderCheckAbleLevel"
9
- );
10
-
11
- export { InjectionSearchCascaderCheckAbleLevel, InjectionSearchCascaderLoadingNode, InjectionSearchCascaderValue };
1
+ const e=Symbol("InjectionSearchCascaderLoadingNode "),a=Symbol("InjectionSearchCascaderValue "),c=Symbol("InjectionSearchCascaderCheckAbleLevel");export{c as InjectionSearchCascaderCheckAbleLevel,e as InjectionSearchCascaderLoadingNode,a as InjectionSearchCascaderValue};
@@ -1 +1 @@
1
- export { useCssVariable } from './useCssVariable.js';
1
+ export{useCssVariable}from"./useCssVariable.js";
@@ -1,7 +1 @@
1
- function useCssVariable() {
2
- return {
3
- "--menu-width": 150
4
- };
5
- }
6
-
7
- export { useCssVariable };
1
+ function n(){return{"--menu-width":150}}export{n as useCssVariable};
@@ -1,11 +1 @@
1
- function getParentNodeList(node) {
2
- const result = [];
3
- let currentNode = node;
4
- while (currentNode) {
5
- result.unshift(currentNode);
6
- currentNode = currentNode.parent;
7
- }
8
- return result;
9
- }
10
-
11
- export { getParentNodeList };
1
+ function t(t){const n=[];let r=t;for(;r;)n.unshift(r),r=r.parent;return n}export{t as getParentNodeList};