cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.15
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.
- package/es/_virtual/plugin-vue_export-helper.js +1 -9
- package/es/components/annotation-edit/index.js +1 -10
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -164
- package/es/components/big-table/index.js +1 -15
- package/es/components/big-table/src/BigTable.vue.js +1 -6
- package/es/components/big-table/src/BigTable.vue2.js +1 -2498
- package/es/components/big-table/src/bigTableEmits.js +1 -53
- package/es/components/big-table/src/bigTableProps.js +1 -120
- package/es/components/big-table/src/bigTableState.js +1 -62
- package/es/components/big-table/src/components/NoData.vue.js +1 -74
- package/es/components/big-table/src/components/edit-form/edit-date.js +1 -214
- package/es/components/big-table/src/components/edit-form/edit-input.js +1 -95
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -139
- package/es/components/big-table/src/components/edit-form/edit-separate.vue.js +1 -103
- package/es/components/big-table/src/components/edit-form/edit-time.js +1 -122
- package/es/components/big-table/src/components/edit-form/useCommon.js +1 -23
- package/es/components/big-table/src/components/input-button.vue.js +1 -39
- package/es/components/big-table/src/components/separate.vue.js +1 -30
- package/es/components/big-table/src/constants/index.js +1 -3
- package/es/components/big-table/src/hooks/index.js +1 -9
- package/es/components/big-table/src/hooks/useAnchor.js +1 -49
- package/es/components/big-table/src/hooks/useAnnotation.js +1 -21
- package/es/components/big-table/src/hooks/useBatchEditing.js +1 -301
- package/es/components/big-table/src/hooks/useEdit.js +1 -133
- package/es/components/big-table/src/hooks/useEvent.js +1 -95
- package/es/components/big-table/src/hooks/useFormat.js +1 -507
- package/es/components/big-table/src/hooks/useNestTable.js +1 -86
- package/es/components/big-table/src/hooks/useSeparateRow.js +1 -177
- package/es/components/big-table/src/hooks/useTableParse.js +1 -142
- package/es/components/big-table/src/utils.js +1 -618
- package/es/components/bpmn-workflow/index.js +1 -10
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -258
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/BpmnRenderer.js +1 -1452
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomPathMap.js +1 -99
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRenderer.js +1 -114
- package/es/components/bpmn-workflow/src/custom/customModeler/customBpmn/CustomRules.js +1 -40
- package/es/components/bpmn-workflow/src/custom/customOtherModule/customViewerRenderer.js +1 -14
- package/es/components/bpmn-workflow/src/custom/customOtherModule/zoomScroll.js +1 -10
- package/es/components/button-print/index.js +1 -12
- package/es/components/button-print/src/ButtonPrint.vue.js +1 -6
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -528
- package/es/components/button-print/src/components/EditFormat.vue.js +1 -173
- package/es/components/button-print/src/components/IdentityVerification.vue.js +1 -182
- package/es/components/button-print/src/components/Preview.vue.js +1 -6
- package/es/components/button-print/src/components/Preview.vue2.js +1 -67
- package/es/components/button-print/src/utils/browserPrint.d.ts +2 -1
- package/es/components/button-print/src/utils/browserPrint.js +1 -43
- package/es/components/button-print/src/utils/dialog.js +1 -121
- package/es/components/button-print/src/utils/index.js +1 -2
- package/es/components/button-print/src/utils/print.d.ts +5 -1
- package/es/components/button-print/src/utils/print.js +1 -432
- package/es/components/editor/index.js +1 -10
- package/es/components/editor/src/Editor.js +1 -77
- package/es/components/fabric-chart/index.js +1 -10
- package/es/components/fabric-chart/src/FabricChart.vue.js +1 -71
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -118
- package/es/components/fabric-chart/src/components/PopupTip.vue.js +1 -34
- package/es/components/fabric-chart/src/components/useStyle.js +1 -36
- package/es/components/fabric-chart/src/hooks/constant.js +1 -78
- package/es/components/fabric-chart/src/hooks/index.js +1 -11
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -642
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -153
- package/es/components/fabric-chart/src/hooks/useBottom.js +1 -91
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -734
- package/es/components/fabric-chart/src/hooks/useCommon.js +1 -32
- package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -79
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -182
- package/es/components/fabric-chart/src/hooks/useEvent.js +1 -146
- package/es/components/fabric-chart/src/hooks/useGrid.js +1 -54
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -331
- package/es/components/fabric-chart/src/hooks/useOther.js +1 -95
- package/es/components/fabric-chart/src/hooks/useRight.js +1 -22
- package/es/components/fabric-chart/src/hooks/useShadow.js +1 -132
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -341
- package/es/components/fabric-chart/src/hooks/useTop.js +1 -154
- package/es/components/fabric-chart/src/utils/index.js +1 -15624
- package/es/components/fabric-chart/src/utils/utils.js +1 -32
- package/es/components/field-set/index.js +1 -10
- package/es/components/field-set/src/FieldSet.vue.js +1 -470
- package/es/components/form-config/index.js +1 -10
- package/es/components/form-config/src/FormConfig.vue.js +1 -124
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -100
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -45
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -97
- package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -28
- package/es/components/form-config/src/components/index.js +1 -6
- package/es/components/form-config/src/components/renderer/CloseButton.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/ComplexNode.vue.js +1 -45
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -60
- package/es/components/form-config/src/components/renderer/index.js +1 -3
- package/es/components/form-config/src/constants/index.js +1 -61
- package/es/components/form-config/src/hooks/index.js +1 -3
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -90
- package/es/components/form-config/src/hooks/useDataNormalize.js +1 -35
- package/es/components/form-config/src/hooks/usePresetRenderer.js +1 -36
- package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -42
- package/es/components/form-config/src/utils/index.js +1 -26
- package/es/components/form-render/index.js +1 -30
- package/es/components/form-render/src/FormRender.vue.js +1 -239
- package/es/components/form-render/src/FormRenderWrapper.vue.js +1 -49
- package/es/components/form-render/src/components/renderer/combination.js +1 -114
- package/es/components/form-render/src/components/renderer/complex.js +1 -37
- package/es/components/form-render/src/components/renderer/date.js +1 -171
- package/es/components/form-render/src/components/renderer/formItem.js +1 -128
- package/es/components/form-render/src/components/renderer/index.js +1 -43
- package/es/components/form-render/src/components/renderer/input.js +1 -50
- package/es/components/form-render/src/components/renderer/inputGroup.js +1 -11
- package/es/components/form-render/src/components/renderer/inputNumber.js +1 -55
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +1 -35
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -175
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -274
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +1 -71
- package/es/components/form-render/src/components/renderer/lineBar/index.js +1 -11
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -111
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -139
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -244
- package/es/components/form-render/src/components/renderer/select.js +1 -176
- package/es/components/form-render/src/components/renderer/simpleComponent.js +1 -57
- package/es/components/form-render/src/components/renderer/slider.js +1 -38
- package/es/components/form-render/src/components/renderer/switch.js +1 -48
- package/es/components/form-render/src/components/renderer/textarea.js +1 -36
- package/es/components/form-render/src/components/tooltipMessage.vue.js +1 -37
- package/es/components/form-render/src/constants/index.js +1 -59
- package/es/components/form-render/src/hooks/index.js +1 -15
- package/es/components/form-render/src/hooks/useAnchor.js +1 -99
- package/es/components/form-render/src/hooks/useAsyncQueue.js +1 -153
- package/es/components/form-render/src/hooks/useAutoHidden.js +1 -43
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -119
- package/es/components/form-render/src/hooks/useChangeContext.js +1 -20
- package/es/components/form-render/src/hooks/useCommonInjection.js +1 -43
- package/es/components/form-render/src/hooks/useCommonLog.js +1 -12
- package/es/components/form-render/src/hooks/useComplexOptions.js +1 -225
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -290
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -65
- package/es/components/form-render/src/hooks/useFieldVisitor.js +1 -46
- package/es/components/form-render/src/hooks/useFormContext.js +1 -70
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -140
- package/es/components/form-render/src/hooks/useFormField.js +1 -13
- package/es/components/form-render/src/hooks/useFormItemDeps.js +1 -31
- package/es/components/form-render/src/hooks/useFormRenderLifeCycle.js +1 -10
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -278
- package/es/components/form-render/src/hooks/useFormRequest.js +1 -42
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -83
- package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -85
- package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -18
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -22
- package/es/components/form-render/src/types/fieldItem.js +1 -1
- package/es/components/form-render/src/types/index.js +1 -1
- package/es/components/form-render/src/utils/business.js +1 -114
- package/es/components/form-render/src/utils/dom.js +1 -38
- package/es/components/form-render/src/utils/index.js +1 -241
- package/es/components/form-render/src/utils/schema.js +1 -105
- package/es/components/grid/index.js +1 -11
- package/es/components/grid/src/Grid.js +1 -28
- package/es/components/grid/src/hooks.js +1 -168
- package/es/components/iho-table/index.js +1 -36
- package/es/components/iho-table/src/IhoTable.vue.js +1 -157
- package/es/components/iho-table/src/constants/index.js +1 -157
- package/es/components/iho-table/src/hooks/export.js +1 -2
- package/es/components/iho-table/src/hooks/index.js +1 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -159
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -67
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useDomInsertHooks.js +1 -27
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.js +1 -280
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.js +1 -26
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.js +1 -38
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -27
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -164
- package/es/components/iho-table/src/hooks/useTableContext.js +1 -17
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -20
- package/es/components/iho-table/src/plugins/anchorPlugin/index.js +1 -19
- package/es/components/iho-table/src/plugins/anchorPlugin/tableAnchor.js +1 -51
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -87
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -48
- package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +1 -230
- package/es/components/iho-table/src/plugins/filterPlugin/index.js +1 -240
- package/es/components/iho-table/src/plugins/index.js +1 -47
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -127
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +1 -203
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -21
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -41
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -79
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -64
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -46
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -16
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +1 -108
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -163
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/separateUtils.js +1 -42
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +1 -50
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -30
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/colorRendererPlugin.js +1 -48
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -62
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/labelRendererPlugin.js +1 -52
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js +1 -92
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -59
- package/es/components/iho-table/src/plugins/rowClickPlugin/index.js +1 -34
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -30
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -53
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +1 -100
- package/es/components/iho-table/src/types/index.js +1 -1
- package/es/components/iho-table/src/types/pluginType.js +1 -16
- package/es/components/iho-table/src/utils/index.js +1 -169
- package/es/components/index.js +1 -119
- package/es/components/info-header/index.js +1 -10
- package/es/components/info-header/src/HiddenContent.vue.js +1 -70
- package/es/components/info-header/src/InfoEllipsis.vue.js +1 -43
- package/es/components/info-header/src/InfoHeader.vue.js +1 -313
- package/es/components/insurance-sdk/index.js +1 -1
- package/es/components/insurance-sdk/src/constants/index.js +1 -160
- package/es/components/insurance-sdk/src/utils/index.js +1 -1
- package/es/components/insurance-sdk/src/utils/insurance.js +1 -268
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.js +1 -164
- package/es/components/keyboard/src/components/InputNumber.vue.js +1 -86
- package/es/components/keyboard/src/components/NumberPanel.vue.js +1 -299
- package/es/components/keyboard/src/utils/index.js +1 -5
- package/es/components/map/index.js +1 -10
- package/es/components/map/src/Map.vue.js +1 -336
- package/es/components/recommend-search/index.js +1 -10
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -63
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +1 -157
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -125
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -104
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -146
- package/es/components/recommend-search/src/constant/index.js +1 -7
- package/es/components/scale-view/index.js +1 -35
- package/es/components/scale-view/src/ScaleView.vue.js +1 -429
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -80
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -117
- package/es/components/scale-view/src/components/EvaluatePage.vue.js +1 -141
- package/es/components/scale-view/src/components/LoadingCom.vue.js +1 -19
- package/es/components/scale-view/src/components/NoData.vue.js +1 -74
- package/es/components/scale-view/src/components/ScaleScore.js +1 -63
- package/es/components/scale-view/src/components/composables/choose-common.js +1 -83
- package/es/components/scale-view/src/components/formitem/address.js +1 -3993
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -226
- package/es/components/scale-view/src/components/formitem/r-cascader.js +1 -133
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -281
- package/es/components/scale-view/src/components/formitem/r-collection.js +1 -111
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -212
- package/es/components/scale-view/src/components/formitem/r-input.js +1 -86
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -106
- package/es/components/scale-view/src/components/formitem/r-radio.js +1 -240
- package/es/components/scale-view/src/components/formitem/r-select.js +1 -202
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -177
- package/es/components/scale-view/src/components/formitem/r-upload.js +1 -215
- package/es/components/scale-view/src/components/formitem/sign-com.js +1 -307
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -129
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -354
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -437
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -81
- package/es/components/scale-view/src/hooks/scaleview-state.js +1 -38
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -154
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -187
- package/es/components/scale-view/src/hooks/use-component.js +1 -86
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -150
- package/es/components/scale-view/src/hooks/use-event.js +1 -129
- package/es/components/scale-view/src/hooks/use-noData.js +1 -41
- package/es/components/scale-view/src/utils/judge-types.js +1 -36
- package/es/components/search-cascader/index.js +1 -10
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -194
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -196
- package/es/components/search-cascader/src/components/index.js +1 -1
- package/es/components/search-cascader/src/constants/index.js +1 -11
- package/es/components/search-cascader/src/hooks/index.js +1 -1
- package/es/components/search-cascader/src/hooks/useCssVariable.js +1 -7
- package/es/components/search-cascader/src/utils/index.js +1 -11
- package/es/components/select-label/index.js +1 -15
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -447
- package/es/components/select-label/src/SelectLabel.vue.js +1 -6
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -451
- package/es/components/select-label/src/components/label-classify.vue.js +1 -132
- package/es/components/select-person/index.js +1 -10
- package/es/components/select-person/src/SelectPerson.vue.js +1 -6
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -303
- package/es/components/select-person/src/utils/index.js +1 -58
- package/es/components/shortcut-provider/index.js +1 -12
- package/es/components/shortcut-provider/src/ShortcutProvider.vue.js +1 -42
- package/es/components/shortcut-provider/src/constants/index.js +1 -8
- package/es/components/shortcut-provider/src/hooks/index.js +1 -2
- package/es/components/shortcut-provider/src/hooks/useShortcutSignature.js +1 -12
- package/es/components/shortcut-provider/src/hooks/useShortcuts.js +1 -188
- package/es/components/shortcut-provider/src/utils/index.js +1 -92
- package/es/components/shortcut-setter/index.js +1 -10
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.js +1 -98
- package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.js +1 -76
- package/es/components/steps-wheel/index.js +1 -10
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -376
- package/es/components/table-filter/index.js +1 -21
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.js +1 -2272
- package/es/components/table-filter/src/classification/Classification-com.vue.js +1 -1315
- package/es/components/table-filter/src/classification/search-class-name.vue.js +1 -195
- package/es/components/table-filter/src/classification/search-professional-model.vue.js +1 -594
- package/es/components/table-filter/src/components/age-com/index.vue.js +1 -185
- package/es/components/table-filter/src/components/button-group/ButtonGroup.vue.js +1 -86
- package/es/components/table-filter/src/components/button-icon/getBtnIcon.js +1 -30
- package/es/components/table-filter/src/components/c-tree-select/tree-select.vue.js +1 -253
- package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.js +1 -114
- package/es/components/table-filter/src/components/classify-filter/helpers/options.js +1 -14
- package/es/components/table-filter/src/components/classify-filter/hooks/useDisplayCategory.js +1 -87
- package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -147
- package/es/components/table-filter/src/components/classify-filter/index.vue.js +1 -304
- package/es/components/table-filter/src/components/multi-select/multi-select.vue.js +1 -153
- package/es/components/table-filter/src/components/out-quick-search/out-quick-search.vue.js +1 -310
- package/es/components/table-filter/src/components/range-age/index.vue.js +1 -137
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.js +1 -64
- package/es/components/table-filter/src/components/render-widget/components/Select.vue.js +1 -45
- package/es/components/table-filter/src/components/render-widget/components/index.js +1 -2
- package/es/components/table-filter/src/components/render-widget/enums.js +1 -27
- package/es/components/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +1 -70
- package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -107
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -152
- package/es/components/table-filter/src/components/search-condition/SearchCondition.vue.js +1 -1520
- package/es/components/table-filter/src/components/search-condition/fieldTypeList.js +1 -171
- package/es/components/table-filter/src/components/search-filter/SearchFilter.vue.js +1 -199
- package/es/components/table-filter/src/components/search-modal/set-classification.vue.js +1 -241
- package/es/components/table-filter/src/components/table-modal/TableModal.vue.js +1 -526
- package/es/components/table-filter/src/const/dataOptions.js +1 -107
- package/es/components/table-filter/src/const/index.js +1 -5
- package/es/components/table-filter/src/directive/flexibleResize.js +1 -157
- package/es/components/table-filter/src/directive/preventReClick.js +1 -14
- package/es/components/table-filter/src/directive/resize.js +1 -12
- package/es/components/table-filter/src/hooks/export.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -64
- package/es/components/table-filter/src/hooks/useMixins.js +1 -532
- package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -94
- package/es/components/table-filter/src/hooks/useTableSearchCon.js +1 -131
- package/es/components/table-filter/src/hooks/useWordBookutils.js +1 -91
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.js +1 -2038
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -65
- package/es/components/table-filter/src/tool/getWidgetType.js +1 -27
- package/es/components/table-filter/src/tool/options.js +1 -200
- package/es/components/table-filter/src/tool/resizeSensor.js +1 -123
- package/es/components/table-filter/src/tool/time-domain.js +1 -100
- package/es/components/table-filter/src/tool/transformData.js +1 -169
- package/es/components/table-filter/src/tool/utils.js +1 -29
- package/es/components/table-filter/src/types/enums.js +1 -67
- package/es/components/table-filter/style/index.css +1 -1
- package/es/components/time-line/index.js +1 -10
- package/es/components/time-line/src/TimeLine.vue.js +1 -70
- package/es/components/vod-chunk-upload/index.js +1 -14
- package/es/components/vod-chunk-upload/src/chunk-upload-new.vue.js +1 -480
- package/es/components/vod-chunk-upload/src/hooks/upload-computed.js +1 -70
- package/es/components/vod-chunk-upload/src/hooks/upload-data.js +1 -96
- package/es/components/vod-chunk-upload/src/hooks/vod-computed.js +1 -79
- package/es/components/vod-chunk-upload/src/hooks/vod-data.js +1 -28
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/index.js +1 -2
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -332
- package/es/components/vod-chunk-upload/src/vod-upload-modal.js +1 -94
- package/es/shared/assets/img/failure.png.js +1 -3
- package/es/shared/assets/img/no-permission.png.js +1 -3
- package/es/shared/assets/img/nodata.png.js +1 -3
- package/es/shared/assets/img/notfound.png.js +1 -3
- package/es/shared/assets/img/qr.png.js +1 -3
- package/es/shared/assets/img/success.png.js +1 -3
- package/es/shared/assets/img/video.png.js +1 -3
- package/es/shared/assets/img/video_default_cover.png.js +1 -3
- package/es/shared/assets/img/xb_big.png.js +1 -3
- package/es/shared/assets/img/xb_small.png.js +1 -3
- package/es/shared/components/SelectPage/SelectPage.vue.js +1 -61
- package/es/shared/components/SelectPage/index.js +1 -2
- package/es/shared/components/SlotRender/SlotRender.js +1 -35
- package/es/shared/components/SlotRender/index.js +1 -2
- package/es/shared/components/SvgIcon/SvgIcon.vue.js +1 -36
- package/es/shared/components/SvgIcon/index.js +1 -2
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -77
- package/es/shared/components/TextOverTooltip/index.js +1 -2
- package/es/shared/components/VueDraggable/index.js +1 -2
- package/es/shared/components/VueDraggable/src/core/componentBuilderHelper.js +1 -35
- package/es/shared/components/VueDraggable/src/core/componentStructure.js +1 -54
- package/es/shared/components/VueDraggable/src/core/renderHelper.js +1 -47
- package/es/shared/components/VueDraggable/src/core/sortableEvents.js +1 -14
- package/es/shared/components/VueDraggable/src/util/console.js +1 -9
- package/es/shared/components/VueDraggable/src/util/htmlHelper.js +1 -11
- package/es/shared/components/VueDraggable/src/util/string.js +1 -11
- package/es/shared/components/VueDraggable/src/util/tags.js +1 -130
- package/es/shared/components/VueDraggable/src/vuedraggable.js +1 -265
- package/es/shared/components/no-data/NoData.vue.js +1 -74
- package/es/shared/components/no-data/index.js +1 -2
- package/es/shared/components/player-vod/player.js +1 -121
- package/es/shared/components/player-vod/video-modal.js +1 -91
- package/es/shared/global/variable.js +1 -3
- package/es/shared/utils/anime.js +1 -129
- package/es/shared/utils/colorLog.js +1 -53
- package/es/shared/utils/index.js +1 -167
- package/es/shared/utils/loadViewer.js +1 -11
- package/es/shared/utils/tapable/AsyncParallelBailHook.js +1 -63
- package/es/shared/utils/tapable/AsyncParallelHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesBailHook.js +1 -18
- package/es/shared/utils/tapable/AsyncSeriesHook.js +1 -27
- package/es/shared/utils/tapable/AsyncSeriesLoopHook.js +1 -12
- package/es/shared/utils/tapable/AsyncSeriesWaterfallHook.js +1 -22
- package/es/shared/utils/tapable/Hook.js +1 -140
- package/es/shared/utils/tapable/HookCodeFactory.js +1 -456
- package/es/shared/utils/tapable/SyncBailHook.js +1 -19
- package/es/shared/utils/tapable/SyncHook.js +1 -34
- package/es/shared/utils/tapable/SyncLoopHook.js +1 -13
- package/es/shared/utils/tapable/SyncWaterfallHook.js +1 -47
- package/es/shared/utils/utilExpand.js +1 -781
- package/es/shared/utils/vexutils.js +1 -59
- package/package.json +2 -2
|
@@ -1,111 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { connect, mapProps } from '@formily/vue';
|
|
3
|
-
import { NSpace, NRadio, NRadioGroup, NCheckbox, NCheckboxGroup } from 'naive-ui';
|
|
4
|
-
import '../../../index.js';
|
|
5
|
-
import { useComplexOptions } from '../../hooks/useComplexOptions.js';
|
|
6
|
-
import '../../utils/index.js';
|
|
7
|
-
import { useAutographOptions } from '../../hooks/useFormRenderOptions.js';
|
|
8
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
9
|
-
import { assignUpdateValue, createVisitedSetter } from '../../utils/schema.js';
|
|
10
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
11
|
-
|
|
12
|
-
function _isSlot(s) {
|
|
13
|
-
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
14
|
-
}
|
|
15
|
-
function createComponent(name, Wrapper, Item) {
|
|
16
|
-
return defineComponent({
|
|
17
|
-
name,
|
|
18
|
-
props: {
|
|
19
|
-
value: {
|
|
20
|
-
type: [String, Number, Object, Array]
|
|
21
|
-
},
|
|
22
|
-
options: {
|
|
23
|
-
type: Array,
|
|
24
|
-
default: () => []
|
|
25
|
-
},
|
|
26
|
-
autograph: {
|
|
27
|
-
type: String
|
|
28
|
-
},
|
|
29
|
-
lazyRequest: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false
|
|
32
|
-
},
|
|
33
|
-
requestCache: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: true
|
|
36
|
-
},
|
|
37
|
-
wordbook: {
|
|
38
|
-
type: Object
|
|
39
|
-
},
|
|
40
|
-
vertical: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false
|
|
43
|
-
},
|
|
44
|
-
onChange: {}
|
|
45
|
-
},
|
|
46
|
-
emits: ["update:value"],
|
|
47
|
-
setup(props, {
|
|
48
|
-
emit
|
|
49
|
-
}) {
|
|
50
|
-
const {
|
|
51
|
-
field
|
|
52
|
-
} = useFormField();
|
|
53
|
-
const {
|
|
54
|
-
renderComplexOption,
|
|
55
|
-
checkValueRef,
|
|
56
|
-
valueRef
|
|
57
|
-
} = useComplexOptions(props, emit);
|
|
58
|
-
const {
|
|
59
|
-
labelKey,
|
|
60
|
-
valueKey,
|
|
61
|
-
options
|
|
62
|
-
} = useAutographOptions(props, valueRef);
|
|
63
|
-
const {
|
|
64
|
-
injectValueBindKey,
|
|
65
|
-
injectValueValidate
|
|
66
|
-
} = useCommonInjection();
|
|
67
|
-
injectValueValidate(valueRef);
|
|
68
|
-
const key = injectValueBindKey(valueRef);
|
|
69
|
-
return () => {
|
|
70
|
-
return createVNode(Wrapper, {
|
|
71
|
-
"key": key.value,
|
|
72
|
-
"value": valueRef.value,
|
|
73
|
-
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
74
|
-
"onClick": createVisitedSetter(field)
|
|
75
|
-
}, {
|
|
76
|
-
default: () => [createVNode(NSpace, {
|
|
77
|
-
"vertical": props.vertical,
|
|
78
|
-
"vertical-space": props.vertical
|
|
79
|
-
}, {
|
|
80
|
-
default: () => {
|
|
81
|
-
var _a;
|
|
82
|
-
return [(_a = options.value) == null ? void 0 : _a.map((option) => {
|
|
83
|
-
let _slot;
|
|
84
|
-
return createVNode(Item, {
|
|
85
|
-
"key": option[valueKey.value],
|
|
86
|
-
"value": option[valueKey.value],
|
|
87
|
-
"disabled": option.disabled
|
|
88
|
-
}, _isSlot(_slot = renderComplexOption({
|
|
89
|
-
value: checkValueRef.value,
|
|
90
|
-
option,
|
|
91
|
-
valueKey: valueKey.value,
|
|
92
|
-
labelKey: labelKey.value
|
|
93
|
-
})) ? _slot : {
|
|
94
|
-
default: () => [_slot]
|
|
95
|
-
});
|
|
96
|
-
})];
|
|
97
|
-
}
|
|
98
|
-
})]
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
const RADIO = connect(createComponent("FormRadio", NRadioGroup, NRadio), mapProps({
|
|
105
|
-
dataSource: "options"
|
|
106
|
-
}, assignUpdateValue));
|
|
107
|
-
const CHECKBOX = connect(createComponent("FormCheckbox", NCheckboxGroup, NCheckbox), mapProps({
|
|
108
|
-
dataSource: "options"
|
|
109
|
-
}, assignUpdateValue));
|
|
110
|
-
|
|
111
|
-
export { CHECKBOX, RADIO };
|
|
1
|
+
import{defineComponent as e,createVNode as o,isVNode as t}from"vue";import{connect as a,mapProps as l}from"@formily/vue";import{NSpace as r,NRadio as u,NRadioGroup as i,NCheckbox as n,NCheckboxGroup as p}from"naive-ui";import"../../../index.js";import{useComplexOptions as s}from"../../hooks/useComplexOptions.js";import"../../utils/index.js";import{useAutographOptions as m}from"../../hooks/useFormRenderOptions.js";import{useCommonInjection as v}from"../../hooks/useCommonInjection.js";import{assignUpdateValue as c,createVisitedSetter as d}from"../../utils/schema.js";import{useFormField as f}from"../../hooks/useFormField.js";function y(a,l,u){return e({name:a,props:{value:{type:[String,Number,Object,Array]},options:{type:Array,default:()=>[]},autograph:{type:String},lazyRequest:{type:Boolean,default:!1},requestCache:{type:Boolean,default:!0},wordbook:{type:Object},vertical:{type:Boolean,default:!1},onChange:{}},emits:["update:value"],setup(e,{emit:a}){const{field:i}=f(),{renderComplexOption:n,checkValueRef:p,valueRef:c}=s(e,a),{labelKey:y,valueKey:j,options:b}=m(e,c),{injectValueBindKey:h,injectValueValidate:k}=v();k(c);const C=h(c);return()=>o(l,{key:C.value,value:c.value,"onUpdate:value":e=>c.value=e,onClick:d(i)},{default:()=>[o(r,{vertical:e.vertical,"vertical-space":e.vertical},{default:()=>{var e;return[null==(e=b.value)?void 0:e.map((e=>{let a;return o(u,{key:e[j.value],value:e[j.value],disabled:e.disabled},"function"==typeof(l=a=n({value:p.value,option:e,valueKey:j.value,labelKey:y.value}))||"[object Object]"===Object.prototype.toString.call(l)&&!t(l)?a:{default:()=>[a]});var l}))]}})]})}})}const j=a(y("FormRadio",i,u),l({dataSource:"options"},c)),b=a(y("FormCheckbox",p,n),l({dataSource:"options"},c));export{b as CHECKBOX,j as RADIO};
|
|
@@ -1,139 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { connect, mapProps } from '@formily/vue';
|
|
3
|
-
import { useVModel, useDebounceFn } from '@vueuse/core';
|
|
4
|
-
import { isString, isArray, cloneDeep, isEqual } from 'lodash-es';
|
|
5
|
-
import { NSelect } from 'naive-ui';
|
|
6
|
-
import '../../../index.js';
|
|
7
|
-
import { InjectionAsyncQueue, InjectionChangeContextCollector, InjectionFormItemDepsCollector } from '../../constants/index.js';
|
|
8
|
-
import { createUrlConfigParams, formRenderLog } from '../../utils/index.js';
|
|
9
|
-
import { useCommonInjection, useSelectOptionProps } from '../../hooks/useCommonInjection.js';
|
|
10
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
11
|
-
import { createVisitedSetter, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
|
|
12
|
-
|
|
13
|
-
const script = defineComponent({
|
|
14
|
-
name: "FormRemoteSearch",
|
|
15
|
-
props: {
|
|
16
|
-
value: {
|
|
17
|
-
type: String
|
|
18
|
-
},
|
|
19
|
-
requestCache: {
|
|
20
|
-
type: Boolean,
|
|
21
|
-
default: true
|
|
22
|
-
},
|
|
23
|
-
options: {
|
|
24
|
-
type: Array,
|
|
25
|
-
default: () => []
|
|
26
|
-
},
|
|
27
|
-
urlConfig: {
|
|
28
|
-
type: Object
|
|
29
|
-
},
|
|
30
|
-
onChange: {}
|
|
31
|
-
},
|
|
32
|
-
emits: ["update:value"],
|
|
33
|
-
setup(props, {
|
|
34
|
-
slots,
|
|
35
|
-
emit
|
|
36
|
-
}) {
|
|
37
|
-
const valueRef = useVModel(props, "value", emit);
|
|
38
|
-
const {
|
|
39
|
-
field,
|
|
40
|
-
fieldKey
|
|
41
|
-
} = useFormField();
|
|
42
|
-
const remoteOptions = ref(null);
|
|
43
|
-
const labelKey = computed(() => {
|
|
44
|
-
var _a, _b;
|
|
45
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
46
|
-
});
|
|
47
|
-
const valueKey = computed(() => {
|
|
48
|
-
var _a, _b;
|
|
49
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
50
|
-
});
|
|
51
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
52
|
-
const fetchData = useDebounceFn(async (content = "", contentType = "label") => {
|
|
53
|
-
if (!props.urlConfig) {
|
|
54
|
-
return remoteOptions.value = null;
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
remoteOptions.value = await asyncQueue.addAsync(await createUrlConfigParams({
|
|
58
|
-
config: {
|
|
59
|
-
...props.urlConfig,
|
|
60
|
-
params: {
|
|
61
|
-
...props.urlConfig.params,
|
|
62
|
-
[contentType === "value" ? valueKey.value : "keyword"]: content
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
cache: props.requestCache,
|
|
66
|
-
field: field.value
|
|
67
|
-
}));
|
|
68
|
-
} catch (e) {
|
|
69
|
-
isString(e) && formRenderLog(e);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
const parsedOptions = computed(() => {
|
|
73
|
-
if (isArray(remoteOptions.value))
|
|
74
|
-
return remoteOptions.value;
|
|
75
|
-
if (isArray(props.options))
|
|
76
|
-
return props.options;
|
|
77
|
-
return [];
|
|
78
|
-
});
|
|
79
|
-
const {
|
|
80
|
-
injectValueValidate,
|
|
81
|
-
injectValueBindKey
|
|
82
|
-
} = useCommonInjection();
|
|
83
|
-
injectValueValidate(valueRef);
|
|
84
|
-
const key = injectValueBindKey(valueRef);
|
|
85
|
-
watch(valueRef, (value) => {
|
|
86
|
-
if (!value || parsedOptions.value.find((option) => option[valueKey.value] === value))
|
|
87
|
-
return;
|
|
88
|
-
return fetchData(value, "value");
|
|
89
|
-
});
|
|
90
|
-
const changeContextCollector = inject(InjectionChangeContextCollector);
|
|
91
|
-
changeContextCollector.setContext(fieldKey.value, (v) => {
|
|
92
|
-
return {
|
|
93
|
-
currentOption: cloneDeep(getCurrentOption(v))
|
|
94
|
-
};
|
|
95
|
-
function getCurrentOption(v2) {
|
|
96
|
-
return parsedOptions.value.find((option) => option[valueKey.value] === v2);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
100
|
-
watch(() => props.urlConfig, (config, oldConfig) => {
|
|
101
|
-
if (isEqual(config, oldConfig))
|
|
102
|
-
return;
|
|
103
|
-
remoteOptions.value = null;
|
|
104
|
-
if (!config)
|
|
105
|
-
return;
|
|
106
|
-
formItemDepsCollector.setDeps(fieldKey.value, config.dependKey || [], async () => {
|
|
107
|
-
remoteOptions.value = null;
|
|
108
|
-
valueRef.value = null;
|
|
109
|
-
});
|
|
110
|
-
valueRef.value && fetchData(valueRef.value, "value");
|
|
111
|
-
}, {
|
|
112
|
-
immediate: true
|
|
113
|
-
});
|
|
114
|
-
const {
|
|
115
|
-
menuProps,
|
|
116
|
-
nodeProps
|
|
117
|
-
} = useSelectOptionProps();
|
|
118
|
-
return () => {
|
|
119
|
-
return createVNode(NSelect, {
|
|
120
|
-
"remote": true,
|
|
121
|
-
"filterable": true,
|
|
122
|
-
"key": key.value,
|
|
123
|
-
"value": valueRef.value,
|
|
124
|
-
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
125
|
-
"labelField": labelKey.value,
|
|
126
|
-
"valueField": valueKey.value,
|
|
127
|
-
"menu-props": menuProps,
|
|
128
|
-
"node-props": nodeProps,
|
|
129
|
-
"onSearch": fetchData,
|
|
130
|
-
"onUpdate:show": (show) => show && fetchData(),
|
|
131
|
-
"options": parsedOptions.value,
|
|
132
|
-
"onFocus": createVisitedSetter(field)
|
|
133
|
-
}, slots);
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
const REMOTE_SEARCH = connect(script, mapProps(assignUpdateValue, assignClearBindVisited));
|
|
138
|
-
|
|
139
|
-
export { REMOTE_SEARCH };
|
|
1
|
+
import{defineComponent as e,ref as l,computed as o,inject as u,watch as a,createVNode as r}from"vue";import{connect as t,mapProps as n}from"@formily/vue";import{useVModel as i,useDebounceFn as s}from"@vueuse/core";import{isString as v,isArray as m,cloneDeep as p,isEqual as d}from"lodash-es";import{NSelect as f}from"naive-ui";import"../../../index.js";import{InjectionAsyncQueue as c,InjectionChangeContextCollector as y,InjectionFormItemDepsCollector as h}from"../../constants/index.js";import{createUrlConfigParams as C,formRenderLog as g}from"../../utils/index.js";import{useCommonInjection as j,useSelectOptionProps as x}from"../../hooks/useCommonInjection.js";import{useFormField as F}from"../../hooks/useFormField.js";import{createVisitedSetter as K,assignUpdateValue as b,assignClearBindVisited as k}from"../../utils/schema.js";const w=t(e({name:"FormRemoteSearch",props:{value:{type:String},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},urlConfig:{type:Object},onChange:{}},emits:["update:value"],setup(e,{slots:t,emit:n}){const b=i(e,"value",n),{field:k,fieldKey:w}=F(),S=l(null),V=o((()=>{var l,o;return null!=(o=null==(l=e.urlConfig)?void 0:l.nameKey)?o:"text"})),q=o((()=>{var l,o;return null!=(o=null==(l=e.urlConfig)?void 0:l.valueKey)?o:"value"})),A=u(c),B=s((async(l="",o="label")=>{if(!e.urlConfig)return S.value=null;try{S.value=await A.addAsync(await C({config:{...e.urlConfig,params:{...e.urlConfig.params,["value"===o?q.value:"keyword"]:l}},cache:e.requestCache,field:k.value}))}catch(e){v(e)&&g(e)}})),O=o((()=>m(S.value)?S.value:m(e.options)?e.options:[])),{injectValueValidate:P,injectValueBindKey:U}=j();P(b);const D=U(b);a(b,(e=>{if(e&&!O.value.find((l=>l[q.value]===e)))return B(e,"value")}));u(y).setContext(w.value,(e=>{return{currentOption:p((l=e,O.value.find((e=>e[q.value]===l))))};var l}));const I=u(h);a((()=>e.urlConfig),((e,l)=>{d(e,l)||(S.value=null,e&&(I.setDeps(w.value,e.dependKey||[],(async()=>{S.value=null,b.value=null})),b.value&&B(b.value,"value")))}),{immediate:!0});const{menuProps:R,nodeProps:z}=x();return()=>r(f,{remote:!0,filterable:!0,key:D.value,value:b.value,"onUpdate:value":e=>b.value=e,labelField:V.value,valueField:q.value,"menu-props":R,"node-props":z,onSearch:B,"onUpdate:show":e=>e&&B(),options:O.value,onFocus:K(k)},t)}}),n(b,k));export{w as REMOTE_SEARCH};
|
|
@@ -1,244 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { isEqual, isArray } from 'lodash-es';
|
|
3
|
-
import '../../../index.js';
|
|
4
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
5
|
-
import { InjectionAsyncQueue, InjectionFormUUID } from '../../constants/index.js';
|
|
6
|
-
import '../../../../../shared/utils/index.js';
|
|
7
|
-
import '../../utils/index.js';
|
|
8
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
9
|
-
import '@vueuse/core';
|
|
10
|
-
import '../../../../../shared/utils/tapable/SyncHook.js';
|
|
11
|
-
import '../../../../../shared/utils/tapable/SyncBailHook.js';
|
|
12
|
-
import '../../../../../shared/utils/tapable/SyncWaterfallHook.js';
|
|
13
|
-
import '../../../../../shared/utils/tapable/SyncLoopHook.js';
|
|
14
|
-
import '../../../../../shared/utils/tapable/AsyncParallelHook.js';
|
|
15
|
-
import '../../../../../shared/utils/tapable/AsyncParallelBailHook.js';
|
|
16
|
-
import '../../../../../shared/utils/tapable/AsyncSeriesHook.js';
|
|
17
|
-
import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
|
|
18
|
-
import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
|
|
19
|
-
import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
|
|
20
|
-
import '../../hooks/useFormValidator.js';
|
|
21
|
-
import '@formily/core';
|
|
22
|
-
import 'date-fns';
|
|
23
|
-
import '@formily/reactive';
|
|
24
|
-
import { connect, mapProps } from '@formily/vue';
|
|
25
|
-
import '@vue/shared';
|
|
26
|
-
import './index.js';
|
|
27
|
-
import '../../hooks/useFormRenderOptions.js';
|
|
28
|
-
import { NCascader } from 'naive-ui';
|
|
29
|
-
import { createVisitedSetter, assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
|
|
30
|
-
|
|
31
|
-
const script = defineComponent({
|
|
32
|
-
name: "FormCascader",
|
|
33
|
-
props: {
|
|
34
|
-
options: {
|
|
35
|
-
type: Array,
|
|
36
|
-
default: () => []
|
|
37
|
-
},
|
|
38
|
-
depth: {
|
|
39
|
-
type: [Number, String]
|
|
40
|
-
},
|
|
41
|
-
urlConfig: {
|
|
42
|
-
type: Object
|
|
43
|
-
},
|
|
44
|
-
requestCache: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: true
|
|
47
|
-
},
|
|
48
|
-
onFocus: {
|
|
49
|
-
type: Function
|
|
50
|
-
},
|
|
51
|
-
filterable: {
|
|
52
|
-
type: Boolean,
|
|
53
|
-
default: false
|
|
54
|
-
},
|
|
55
|
-
onChange: {},
|
|
56
|
-
value: {}
|
|
57
|
-
},
|
|
58
|
-
emits: ["update:value"],
|
|
59
|
-
setup(props, {
|
|
60
|
-
slots,
|
|
61
|
-
emit
|
|
62
|
-
}) {
|
|
63
|
-
const remoteOptions = ref();
|
|
64
|
-
const {
|
|
65
|
-
field,
|
|
66
|
-
title
|
|
67
|
-
} = useFormField();
|
|
68
|
-
const labelKey = computed(() => {
|
|
69
|
-
var _a, _b;
|
|
70
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.nameKey) != null ? _b : "text";
|
|
71
|
-
});
|
|
72
|
-
const valueKey = computed(() => {
|
|
73
|
-
var _a, _b;
|
|
74
|
-
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
75
|
-
});
|
|
76
|
-
const valueRef = computed(() => {
|
|
77
|
-
try {
|
|
78
|
-
const parsed = Array.isArray(props.value) ? props.value : JSON.parse(props.value || "");
|
|
79
|
-
if (!Array.isArray(parsed) || !parsed.length)
|
|
80
|
-
return null;
|
|
81
|
-
return parsed.map((option) => option[labelKey.value]).join(" / ");
|
|
82
|
-
} catch (e) {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
function updateValue(_, __, options) {
|
|
87
|
-
emit("update:value", options.map(optionSimplify));
|
|
88
|
-
function optionSimplify(option) {
|
|
89
|
-
return {
|
|
90
|
-
...option,
|
|
91
|
-
label: option[labelKey.value],
|
|
92
|
-
children: void 0,
|
|
93
|
-
parent: void 0
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
98
|
-
async function fetchData(option) {
|
|
99
|
-
props.filterable ? await fetchFullData() : await fetchGradeData(option);
|
|
100
|
-
await syncPosition();
|
|
101
|
-
}
|
|
102
|
-
async function fetchFullData() {
|
|
103
|
-
if (!props.urlConfig || remoteOptions.value && props.requestCache)
|
|
104
|
-
return;
|
|
105
|
-
const data = await asyncQueue.addAsync({
|
|
106
|
-
...props.urlConfig,
|
|
107
|
-
params: {
|
|
108
|
-
lvlnr: 1 + ""
|
|
109
|
-
},
|
|
110
|
-
key: title.value,
|
|
111
|
-
cache: props.requestCache
|
|
112
|
-
});
|
|
113
|
-
remoteOptions.value = data.map((item) => optionNormalize(item, 0));
|
|
114
|
-
function optionNormalize(data2, depth) {
|
|
115
|
-
const result = {
|
|
116
|
-
[labelKey.value]: data2[labelKey.value],
|
|
117
|
-
[valueKey.value]: data2[valueKey.value],
|
|
118
|
-
depth: depth + 1,
|
|
119
|
-
isLeaf: true
|
|
120
|
-
};
|
|
121
|
-
if (isArray(data2.children)) {
|
|
122
|
-
result.children = data2.children.map((child) => optionNormalize(child, depth + 1));
|
|
123
|
-
result.isLeaf = !data2.children.length;
|
|
124
|
-
}
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
async function fetchGradeData(option) {
|
|
129
|
-
if (notNeedToFetchData(props, option))
|
|
130
|
-
return;
|
|
131
|
-
const data = await asyncQueue.addAsync(createRequestParams(deepFor(option), configFor(props), title.value, option));
|
|
132
|
-
if (!data.length && option) {
|
|
133
|
-
option.isLeaf = true;
|
|
134
|
-
updateValue(null, null, getOptionChain(option));
|
|
135
|
-
show.value = false;
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
const result = data.map((item) => optionNormalize(item, deepFor(option)));
|
|
139
|
-
option ? option.children = result : remoteOptions.value = result;
|
|
140
|
-
function notNeedToFetchData(props2, option2) {
|
|
141
|
-
return !configFor(props2) || !option2 && remoteOptions.value && props2.requestCache || deepFor(option2) >= deepFor(props2) - 1;
|
|
142
|
-
}
|
|
143
|
-
function createRequestParams(deep, config, key2, option2) {
|
|
144
|
-
const params = {
|
|
145
|
-
lvlnr: deep + 1 + ""
|
|
146
|
-
};
|
|
147
|
-
if (option2 && config.dependKey) {
|
|
148
|
-
traverseDependKey(config.dependKey, (dependKey, valueKey2) => {
|
|
149
|
-
params[valueKey2] = option2[dependKey];
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
return {
|
|
153
|
-
params,
|
|
154
|
-
...config,
|
|
155
|
-
key: key2,
|
|
156
|
-
cache: props.requestCache
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function getOptionChain(option2) {
|
|
160
|
-
let currentOption = option2;
|
|
161
|
-
const result2 = [option2];
|
|
162
|
-
while (currentOption.parent) {
|
|
163
|
-
result2.unshift(currentOption.parent);
|
|
164
|
-
currentOption = currentOption.parent;
|
|
165
|
-
}
|
|
166
|
-
return result2;
|
|
167
|
-
}
|
|
168
|
-
function optionNormalize(data2, depth) {
|
|
169
|
-
return {
|
|
170
|
-
[labelKey.value]: data2[labelKey.value],
|
|
171
|
-
[valueKey.value]: data2[valueKey.value],
|
|
172
|
-
depth: depth + 1,
|
|
173
|
-
parent: option,
|
|
174
|
-
isLeaf: depth + 2 >= deepFor(props)
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function configFor(target) {
|
|
178
|
-
return target.urlConfig;
|
|
179
|
-
}
|
|
180
|
-
function deepFor(target) {
|
|
181
|
-
var _a;
|
|
182
|
-
return (_a = target == null ? void 0 : target.depth) != null ? _a : -1;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
const uuid = inject(InjectionFormUUID);
|
|
186
|
-
const uniClassname = `form-render__cascade--menu-${uuid}`;
|
|
187
|
-
async function syncPosition() {
|
|
188
|
-
await nextTick();
|
|
189
|
-
const target = document.querySelector(`.${uniClassname} .v-vl`);
|
|
190
|
-
if (!target)
|
|
191
|
-
return;
|
|
192
|
-
target.dispatchEvent(new CustomEvent("scroll"));
|
|
193
|
-
}
|
|
194
|
-
const {
|
|
195
|
-
injectValueValidate,
|
|
196
|
-
injectValueWatchFromEmpty,
|
|
197
|
-
injectValueBindKey
|
|
198
|
-
} = useCommonInjection();
|
|
199
|
-
injectValueWatchFromEmpty(() => props.value, fetchData);
|
|
200
|
-
injectValueValidate(() => props.value);
|
|
201
|
-
watch(() => props.urlConfig, async (config, oldConfig) => {
|
|
202
|
-
if (isEqual(config, oldConfig))
|
|
203
|
-
return;
|
|
204
|
-
remoteOptions.value = null;
|
|
205
|
-
await fetchData();
|
|
206
|
-
});
|
|
207
|
-
const show = ref(false);
|
|
208
|
-
function updateShow(v) {
|
|
209
|
-
show.value = !!v;
|
|
210
|
-
v && fetchData();
|
|
211
|
-
}
|
|
212
|
-
const parsedOptions = computed(() => {
|
|
213
|
-
return remoteOptions.value || props.options || [];
|
|
214
|
-
});
|
|
215
|
-
const remote = computed(() => !props.filterable);
|
|
216
|
-
const key = injectValueBindKey(valueRef);
|
|
217
|
-
return () => {
|
|
218
|
-
return createVNode(NCascader, {
|
|
219
|
-
"key": key.value,
|
|
220
|
-
"remote": remote.value,
|
|
221
|
-
"filterable": props.filterable,
|
|
222
|
-
"menu-props": {
|
|
223
|
-
class: uniClassname,
|
|
224
|
-
onClick: syncPosition
|
|
225
|
-
},
|
|
226
|
-
"checkStrategy": "child",
|
|
227
|
-
"show": !!show.value,
|
|
228
|
-
"onUpdate:show": updateShow,
|
|
229
|
-
"value": valueRef.value,
|
|
230
|
-
"onUpdate:value": updateValue,
|
|
231
|
-
"labelField": labelKey.value,
|
|
232
|
-
"valueField": valueKey.value,
|
|
233
|
-
"options": parsedOptions.value,
|
|
234
|
-
"onLoad": fetchData,
|
|
235
|
-
"onFocus": createVisitedSetter(field)
|
|
236
|
-
}, slots);
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
const SEARCH_CASCADER = connect(script, mapProps({
|
|
241
|
-
dataSource: "options"
|
|
242
|
-
}, assignUpdateValue));
|
|
243
|
-
|
|
244
|
-
export { SEARCH_CASCADER };
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,inject as o,watch as r,createVNode as l,nextTick as n}from"vue";import{isEqual as i,isArray as u}from"lodash-es";import"../../../index.js";import{useCommonInjection as s}from"../../hooks/useCommonInjection.js";import{InjectionAsyncQueue as c,InjectionFormUUID as p}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../utils/index.js";import{useFormField as m}from"../../hooks/useFormField.js";import"@vueuse/core";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import"@formily/core";import"date-fns";import"@formily/reactive";import{connect as d,mapProps as v}from"@formily/vue";import"@vue/shared";import"./index.js";import"../../hooks/useFormRenderOptions.js";import{NCascader as f}from"naive-ui";import{createVisitedSetter as h,assignUpdateValue as y,traverseDependKey as j}from"../../utils/schema.js";const b=d(e({name:"FormCascader",props:{options:{type:Array,default:()=>[]},depth:{type:[Number,String]},urlConfig:{type:Object},requestCache:{type:Boolean,default:!0},onFocus:{type:Function},filterable:{type:Boolean,default:!1},onChange:{},value:{}},emits:["update:value"],setup(e,{slots:d,emit:v}){const y=t(),{field:b,title:k}=m(),C=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.nameKey)?a:"text"})),g=a((()=>{var t,a;return null!=(a=null==(t=e.urlConfig)?void 0:t.valueKey)?a:"value"})),A=a((()=>{try{const t=Array.isArray(e.value)?e.value:JSON.parse(e.value||"");return Array.isArray(t)&&t.length?t.map((e=>e[C.value])).join(" / "):null}catch(e){return null}}));function S(e,t,a){v("update:value",a.map((function(e){return{...e,label:e[C.value],children:void 0,parent:void 0}})))}const F=o(c);async function w(t){e.filterable?await async function(){if(!e.urlConfig||y.value&&e.requestCache)return;const t=await F.addAsync({...e.urlConfig,params:{lvlnr:"1"},key:k.value,cache:e.requestCache});function a(e,t){const o={[C.value]:e[C.value],[g.value]:e[g.value],depth:t+1,isLeaf:!0};return u(e.children)&&(o.children=e.children.map((e=>a(e,t+1))),o.isLeaf=!e.children.length),o}y.value=t.map((e=>a(e,0)))}():await async function(t){if(r(e,t))return;const a=await F.addAsync(l(s(t),u(e),k.value,t));if(!a.length&&t)return t.isLeaf=!0,S(0,0,n(t)),void(K.value=!1);const o=a.map((e=>i(e,s(t))));function r(e,t){return!u(e)||!t&&y.value&&e.requestCache||s(t)>=s(e)-1}function l(t,a,o,r){const l={lvlnr:t+1+""};return r&&a.dependKey&&j(a.dependKey,((e,t)=>{l[t]=r[e]})),{params:l,...a,key:o,cache:e.requestCache}}function n(e){let t=e;const a=[e];for(;t.parent;)a.unshift(t.parent),t=t.parent;return a}function i(a,o){return{[C.value]:a[C.value],[g.value]:a[g.value],depth:o+1,parent:t,isLeaf:o+2>=s(e)}}function u(e){return e.urlConfig}function s(e){var t;return null!=(t=null==e?void 0:e.depth)?t:-1}t?t.children=o:y.value=o}(t),await x()}const H=`form-render__cascade--menu-${o(p)}`;async function x(){await n();const e=document.querySelector(`.${H} .v-vl`);e&&e.dispatchEvent(new CustomEvent("scroll"))}const{injectValueValidate:L,injectValueWatchFromEmpty:q,injectValueBindKey:B}=s();q((()=>e.value),w),L((()=>e.value)),r((()=>e.urlConfig),(async(e,t)=>{i(e,t)||(y.value=null,await w())}));const K=t(!1);function V(e){K.value=!!e,e&&w()}const E=a((()=>y.value||e.options||[])),O=a((()=>!e.filterable)),W=B(A);return()=>l(f,{key:W.value,remote:O.value,filterable:e.filterable,"menu-props":{class:H,onClick:x},checkStrategy:"child",show:!!K.value,"onUpdate:show":V,value:A.value,"onUpdate:value":S,labelField:C.value,valueField:g.value,options:E.value,onLoad:w,onFocus:h(b)},d)}}),v({dataSource:"options"},y));export{b as SEARCH_CASCADER};
|