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
package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js
CHANGED
|
@@ -1,35 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { flatten } from 'lodash-es';
|
|
3
|
-
import { onMounted } from 'vue';
|
|
4
|
-
import '../../../../../index.js';
|
|
5
|
-
import { arrayed } from '../../../../../../../shared/utils/index.js';
|
|
6
|
-
import { useFormField } from '../../../../hooks/useFormField.js';
|
|
7
|
-
|
|
8
|
-
function useDeepValidate() {
|
|
9
|
-
function bindDeepValidate(formRenderRefs) {
|
|
10
|
-
const { field } = useFormField();
|
|
11
|
-
onMounted(() => {
|
|
12
|
-
if (!isField(field.value))
|
|
13
|
-
return;
|
|
14
|
-
const tempValidator = field.value.validator;
|
|
15
|
-
field.value.validator = [
|
|
16
|
-
{
|
|
17
|
-
async validator() {
|
|
18
|
-
return Promise.allSettled(
|
|
19
|
-
formRenderRefs.value.filter((formRenderRef) => formRenderRef).map((formRenderRef) => formRenderRef.validate())
|
|
20
|
-
).then((resultList) => {
|
|
21
|
-
const rejected = resultList.filter((res) => res.status === "rejected");
|
|
22
|
-
if (!rejected.length)
|
|
23
|
-
return "";
|
|
24
|
-
return flatten(rejected.map((res) => res.reason));
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
...tempValidator ? arrayed(tempValidator) : []
|
|
29
|
-
];
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
return { bindDeepValidate };
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export { useDeepValidate };
|
|
1
|
+
import{isField as e}from"@formily/core";import{flatten as r}from"lodash-es";import{onMounted as t}from"vue";import"../../../../../index.js";import{arrayed as o}from"../../../../../../../shared/utils/index.js";import{useFormField as i}from"../../../../hooks/useFormField.js";function a(){return{bindDeepValidate:function(a){const{field:l}=i();t((()=>{if(!e(l.value))return;const t=l.value.validator;l.value.validator=[{validator:async()=>Promise.allSettled(a.value.filter((e=>e)).map((e=>e.validate()))).then((e=>{const t=e.filter((e=>"rejected"===e.status));return t.length?r(t.map((e=>e.reason))):""}))},...t?o(t):[]]}))}}}export{a as useDeepValidate};
|
|
@@ -1,175 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { isField } from '@formily/core';
|
|
3
|
-
import { Path } from '@formily/path';
|
|
4
|
-
import { AddCircleOutline, RemoveCircle } from '@vicons/ionicons5';
|
|
5
|
-
import { isNumber, range, isArray, isEqual } from 'lodash-es';
|
|
6
|
-
import { useDeepValidate } from './hooks/useDeepValidate.js';
|
|
7
|
-
import { formRenderLog, mergeDeepProperties } from '../../../utils/index.js';
|
|
8
|
-
import { connect, mapProps } from '@formily/vue';
|
|
9
|
-
import { useDebounceFn, isObject } from '@vueuse/core';
|
|
10
|
-
import { NButton, NIcon } from 'naive-ui';
|
|
11
|
-
import FormRender from '../../../FormRender.vue.js';
|
|
12
|
-
import { assignUpdateValue } from '../../../utils/schema.js';
|
|
13
|
-
|
|
14
|
-
const script = defineComponent({
|
|
15
|
-
name: "FormJsonCombination",
|
|
16
|
-
props: {
|
|
17
|
-
title: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: ""
|
|
20
|
-
},
|
|
21
|
-
value: {
|
|
22
|
-
type: [String, Array]
|
|
23
|
-
},
|
|
24
|
-
maxGroupNum: {
|
|
25
|
-
type: Number
|
|
26
|
-
},
|
|
27
|
-
getProperties: {
|
|
28
|
-
type: Function,
|
|
29
|
-
default: () => []
|
|
30
|
-
},
|
|
31
|
-
onInput: {},
|
|
32
|
-
onBlur: {},
|
|
33
|
-
onChange: {}
|
|
34
|
-
},
|
|
35
|
-
emits: ["update:value"],
|
|
36
|
-
setup(props, {
|
|
37
|
-
emit
|
|
38
|
-
}) {
|
|
39
|
-
formRenderLog("\u5F53\u524DCOMBINATION\u63A7\u4EF6\u4E3Ajson\u6A21\u5F0F,\u63A8\u8350\u4F7F\u7528\u975Ejson\u6A21\u5F0F,FieldItem.jsonCombination=false");
|
|
40
|
-
const emitChange = useDebounceFn(function emitChange2() {
|
|
41
|
-
emit("update:value", JSON.stringify(combinationData.value));
|
|
42
|
-
}, 300);
|
|
43
|
-
const combinationData = ref([]);
|
|
44
|
-
const currentGroupNum = computed(() => combinationData.value.length);
|
|
45
|
-
function setCombinationData(data, withInitialData = false) {
|
|
46
|
-
if (isArray(data)) {
|
|
47
|
-
if (!data.length)
|
|
48
|
-
data.push({});
|
|
49
|
-
data = JSON.stringify(data);
|
|
50
|
-
}
|
|
51
|
-
const parsedData = getParsedData(data);
|
|
52
|
-
if (!needLoad(parsedData))
|
|
53
|
-
return;
|
|
54
|
-
parsedData.splice(maxGroupNum.value);
|
|
55
|
-
parsedData.forEach(setCombinationItemData);
|
|
56
|
-
combinationData.value.splice(parsedData.length);
|
|
57
|
-
combinationData.value.forEach(setFormRenderData);
|
|
58
|
-
function needLoad(_data) {
|
|
59
|
-
return !!_data && !isEqual(_data, combinationData.value);
|
|
60
|
-
}
|
|
61
|
-
function setCombinationItemData(v, idx) {
|
|
62
|
-
if (!isObject(v))
|
|
63
|
-
return;
|
|
64
|
-
combinationData.value[idx] = v;
|
|
65
|
-
withInitialData && mergeDeepProperties(v, props.getProperties());
|
|
66
|
-
}
|
|
67
|
-
function getParsedData(data2) {
|
|
68
|
-
try {
|
|
69
|
-
if (!data2)
|
|
70
|
-
return null;
|
|
71
|
-
const result = JSON.parse(data2);
|
|
72
|
-
if (!Array.isArray(result))
|
|
73
|
-
return null;
|
|
74
|
-
return result;
|
|
75
|
-
} catch (e) {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
watch(() => props.value, (value) => setCombinationData(value));
|
|
81
|
-
onMounted(() => {
|
|
82
|
-
setCombinationData(props.value || "[{}]", true);
|
|
83
|
-
emitChange();
|
|
84
|
-
});
|
|
85
|
-
const formRenderRefs = ref([]);
|
|
86
|
-
useDeepValidate().bindDeepValidate(formRenderRefs);
|
|
87
|
-
function setFormRenderData(item, idx) {
|
|
88
|
-
var _a;
|
|
89
|
-
(_a = formRenderRefs.value[idx]) == null ? void 0 : _a.setFieldState("*", (state) => {
|
|
90
|
-
if (!isField(state))
|
|
91
|
-
return;
|
|
92
|
-
state.value = Path.getIn(item, state.path);
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
function setFormRenderRef(idx, _ref) {
|
|
96
|
-
formRenderRefs.value[idx] = _ref;
|
|
97
|
-
setFormRenderData(combinationData.value[idx] || {}, idx);
|
|
98
|
-
}
|
|
99
|
-
function addGroup() {
|
|
100
|
-
combinationData.value.push(mergeDeepProperties({}, props.getProperties()));
|
|
101
|
-
emitChange();
|
|
102
|
-
}
|
|
103
|
-
function removeGroup(idx) {
|
|
104
|
-
if (combinationData.value.length > 1) {
|
|
105
|
-
combinationData.value.splice(idx, 1);
|
|
106
|
-
formRenderRefs.value.splice(idx, 1);
|
|
107
|
-
} else {
|
|
108
|
-
combinationData.value.splice(idx, 1, {});
|
|
109
|
-
}
|
|
110
|
-
emitChange();
|
|
111
|
-
}
|
|
112
|
-
const maxGroupNum = computed(() => {
|
|
113
|
-
if (!isNumber(props.maxGroupNum))
|
|
114
|
-
return Infinity;
|
|
115
|
-
if (props.maxGroupNum < 1)
|
|
116
|
-
return 0;
|
|
117
|
-
return ~~props.maxGroupNum;
|
|
118
|
-
});
|
|
119
|
-
watch(maxGroupNum, (value) => {
|
|
120
|
-
if (currentGroupNum.value <= value)
|
|
121
|
-
return;
|
|
122
|
-
combinationData.value.splice(value);
|
|
123
|
-
emitChange();
|
|
124
|
-
formRenderRefs.value.splice(value);
|
|
125
|
-
}, {
|
|
126
|
-
immediate: true
|
|
127
|
-
});
|
|
128
|
-
function onChange(idx, {
|
|
129
|
-
fieldKey,
|
|
130
|
-
value
|
|
131
|
-
}) {
|
|
132
|
-
!combinationData.value[idx] && (combinationData.value[idx] = {});
|
|
133
|
-
Path.setIn(combinationData.value[idx], fieldKey, value);
|
|
134
|
-
emitChange();
|
|
135
|
-
}
|
|
136
|
-
const FormRenderComponent = FormRender;
|
|
137
|
-
return () => {
|
|
138
|
-
return createVNode("section", {
|
|
139
|
-
"class": "form-render__combination"
|
|
140
|
-
}, [createVNode("header", {
|
|
141
|
-
"class": "form-render__combinationHeader"
|
|
142
|
-
}, [createVNode("div", {
|
|
143
|
-
"class": "form-render__combinationHeaderText"
|
|
144
|
-
}, [props.title]), createVNode(NButton, {
|
|
145
|
-
"onClick": addGroup,
|
|
146
|
-
"type": "info",
|
|
147
|
-
"text": true,
|
|
148
|
-
"disabled": currentGroupNum.value >= maxGroupNum.value
|
|
149
|
-
}, {
|
|
150
|
-
icon: () => createVNode(NIcon, {
|
|
151
|
-
"component": AddCircleOutline
|
|
152
|
-
}, null),
|
|
153
|
-
default: () => "\u65B0\u589E"
|
|
154
|
-
})]), range(currentGroupNum.value).map((_, idx) => createVNode("section", {
|
|
155
|
-
"class": "form-render__combinationContentJson"
|
|
156
|
-
}, [createVNode(FormRenderComponent, {
|
|
157
|
-
"ref": (_ref) => setFormRenderRef(idx, _ref),
|
|
158
|
-
"fieldList": props.getProperties(),
|
|
159
|
-
"onFormChange": (payload) => onChange(idx, payload)
|
|
160
|
-
}, null), createVNode(NButton, {
|
|
161
|
-
"text": true,
|
|
162
|
-
"class": "form-render__combinationClose",
|
|
163
|
-
"type": "error",
|
|
164
|
-
"onClick": () => removeGroup(idx)
|
|
165
|
-
}, {
|
|
166
|
-
icon: () => createVNode(NIcon, {
|
|
167
|
-
"component": RemoveCircle
|
|
168
|
-
}, null)
|
|
169
|
-
})]))]);
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
const JSON_COMBINATION = connect(script, mapProps(assignUpdateValue));
|
|
174
|
-
|
|
175
|
-
export { JSON_COMBINATION };
|
|
1
|
+
import{defineComponent as e,ref as o,computed as t,watch as n,onMounted as r,createVNode as i}from"vue";import{isField as l}from"@formily/core";import{Path as a}from"@formily/path";import{AddCircleOutline as u,RemoveCircle as s}from"@vicons/ionicons5";import{isNumber as m,range as c,isArray as p,isEqual as f}from"lodash-es";import{useDeepValidate as v}from"./hooks/useDeepValidate.js";import{formRenderLog as d,mergeDeepProperties as h}from"../../../utils/index.js";import{connect as y,mapProps as g}from"@formily/vue";import{useDebounceFn as b,isObject as N}from"@vueuse/core";import{NButton as _,NIcon as x}from"naive-ui";import C from"../../../FormRender.vue.js";import{assignUpdateValue as j}from"../../../utils/schema.js";const F=y(e({name:"FormJsonCombination",props:{title:{type:String,default:""},value:{type:[String,Array]},maxGroupNum:{type:Number},getProperties:{type:Function,default:()=>[]},onInput:{},onBlur:{},onChange:{}},emits:["update:value"],setup(e,{emit:y}){d("当前COMBINATION控件为json模式,推荐使用非json模式,FieldItem.jsonCombination=false");const g=b((function(){y("update:value",JSON.stringify(j.value))}),300),j=o([]),F=t((()=>j.value.length));function I(o,t=!1){p(o)&&(o.length||o.push({}),o=JSON.stringify(o));const n=function(e){try{if(!e)return null;const o=JSON.parse(e);return Array.isArray(o)?o:null}catch(e){return null}}(o);var r;(r=n)&&!f(r,j.value)&&(n.splice(A.value),n.forEach((function(o,n){if(!N(o))return;j.value[n]=o,t&&h(o,e.getProperties())})),j.value.splice(n.length),j.value.forEach(J))}n((()=>e.value),(e=>I(e))),r((()=>{I(e.value||"[{}]",!0),g()}));const S=o([]);function J(e,o){var t;null==(t=S.value[o])||t.setFieldState("*",(o=>{l(o)&&(o.value=a.getIn(e,o.path))}))}function O(){j.value.push(h({},e.getProperties())),g()}v().bindDeepValidate(S);const A=t((()=>m(e.maxGroupNum)?e.maxGroupNum<1?0:~~e.maxGroupNum:1/0));n(A,(e=>{F.value<=e||(j.value.splice(e),g(),S.value.splice(e))}),{immediate:!0});const G=C;return()=>i("section",{class:"form-render__combination"},[i("header",{class:"form-render__combinationHeader"},[i("div",{class:"form-render__combinationHeaderText"},[e.title]),i(_,{onClick:O,type:"info",text:!0,disabled:F.value>=A.value},{icon:()=>i(x,{component:u},null),default:()=>"新增"})]),c(F.value).map(((o,t)=>i("section",{class:"form-render__combinationContentJson"},[i(G,{ref:e=>function(e,o){S.value[e]=o,J(j.value[e]||{},e)}(t,e),fieldList:e.getProperties(),onFormChange:e=>function(e,{fieldKey:o,value:t}){!j.value[e]&&(j.value[e]={}),a.setIn(j.value[e],o,t),g()}(t,e)},null),i(_,{text:!0,class:"form-render__combinationClose",type:"error",onClick:()=>function(e){j.value.length>1?(j.value.splice(e,1),S.value.splice(e,1)):j.value.splice(e,1,{}),g()}(t)},{icon:()=>i(x,{component:s},null)})])))])}}),g(j));export{F as JSON_COMBINATION};
|
|
@@ -1,274 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useVModel } from '@vueuse/core';
|
|
3
|
-
import { isEqual, isString, isEmpty, isFunction, omit } from 'lodash-es';
|
|
4
|
-
import '../../../index.js';
|
|
5
|
-
import { InjectionAsyncQueue } from '../../constants/index.js';
|
|
6
|
-
import { useCommonInjection } from '../../hooks/useCommonInjection.js';
|
|
7
|
-
import { formRenderLog } from '../../utils/index.js';
|
|
8
|
-
import { connect, mapProps } from '@formily/vue';
|
|
9
|
-
import SearchCascader from '../../../../search-cascader/index.js';
|
|
10
|
-
import script$1 from '../../../../../shared/components/no-data/NoData.vue.js';
|
|
11
|
-
import { createVisitedSetter, assignUpdateValue } from '../../utils/schema.js';
|
|
12
|
-
import { useFormField } from '../../hooks/useFormField.js';
|
|
13
|
-
import { useFormRequest } from '../../hooks/useFormRequest.js';
|
|
14
|
-
|
|
15
|
-
const script = defineComponent({
|
|
16
|
-
name: "FormSearchCascade",
|
|
17
|
-
props: {
|
|
18
|
-
options: {
|
|
19
|
-
type: Array,
|
|
20
|
-
default: () => []
|
|
21
|
-
},
|
|
22
|
-
autograph: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: true
|
|
25
|
-
},
|
|
26
|
-
lazyRequest: {
|
|
27
|
-
type: Boolean,
|
|
28
|
-
default: true
|
|
29
|
-
},
|
|
30
|
-
requestCache: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: true
|
|
33
|
-
},
|
|
34
|
-
wordbook: {
|
|
35
|
-
type: Object,
|
|
36
|
-
required: true
|
|
37
|
-
},
|
|
38
|
-
onChange: {},
|
|
39
|
-
value: {
|
|
40
|
-
type: [String, Array]
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
emits: ["update:value"],
|
|
44
|
-
setup(props, {
|
|
45
|
-
emit
|
|
46
|
-
}) {
|
|
47
|
-
const valueRef = useVModel(props, "value", emit);
|
|
48
|
-
const showRef = ref(false);
|
|
49
|
-
const optionsRef = ref([]);
|
|
50
|
-
const {
|
|
51
|
-
field,
|
|
52
|
-
fieldKey
|
|
53
|
-
} = useFormField();
|
|
54
|
-
const labelKey = computed(() => {
|
|
55
|
-
var _a, _b, _c;
|
|
56
|
-
return (_c = (_b = (_a = props.wordbook) == null ? void 0 : _a.render_key) == null ? void 0 : _b[0]) != null ? _c : "text";
|
|
57
|
-
});
|
|
58
|
-
const valueKey = computed(() => {
|
|
59
|
-
var _a, _b;
|
|
60
|
-
return (_b = (_a = props.wordbook) == null ? void 0 : _a.value_key) != null ? _b : "value";
|
|
61
|
-
});
|
|
62
|
-
const depth = computed(() => {
|
|
63
|
-
var _a;
|
|
64
|
-
return ((_a = props.wordbook) == null ? void 0 : _a.level_num) || Infinity;
|
|
65
|
-
});
|
|
66
|
-
const asyncQueue = inject(InjectionAsyncQueue);
|
|
67
|
-
const {
|
|
68
|
-
getSearchRequestInfo
|
|
69
|
-
} = useFormRequest();
|
|
70
|
-
async function fetchData(node, keyword) {
|
|
71
|
-
try {
|
|
72
|
-
if (node && !node.__keyword && node.isLeaf) {
|
|
73
|
-
return updateValue(node);
|
|
74
|
-
}
|
|
75
|
-
if (!(node == null ? void 0 : node.__keyword)) {
|
|
76
|
-
const result = await asyncQueue.addAsync(createParams(props.wordbook, props.autograph, field.value, node, fieldKey.value));
|
|
77
|
-
if (!node) {
|
|
78
|
-
optionsRef.value = result.map((option) => enrichKeywordOption(option, keyword));
|
|
79
|
-
} else {
|
|
80
|
-
if (!result.length)
|
|
81
|
-
return updateValue(node);
|
|
82
|
-
node.children = result.map((option) => enrichChildOption(option, node, depth.value));
|
|
83
|
-
}
|
|
84
|
-
} else {
|
|
85
|
-
if (!isString(node.id_link))
|
|
86
|
-
return Promise.reject();
|
|
87
|
-
const linkList = parseLinkFromString2List(node.id_link);
|
|
88
|
-
const primaryKeyOptions = await fetchPrimaryKeyValue(linkList);
|
|
89
|
-
if (!primaryKeyOptions)
|
|
90
|
-
return Promise.reject();
|
|
91
|
-
const {
|
|
92
|
-
lastOption,
|
|
93
|
-
options
|
|
94
|
-
} = generateOptionWithIdList(primaryKeyOptions, linkList);
|
|
95
|
-
await fetchData(lastOption);
|
|
96
|
-
if (isEmpty(lastOption.children)) {
|
|
97
|
-
valueRef.value = sortOptionWithIdList(primaryKeyOptions, linkList);
|
|
98
|
-
showRef.value = false;
|
|
99
|
-
return Promise.reject();
|
|
100
|
-
} else {
|
|
101
|
-
optionsRef.value = options;
|
|
102
|
-
return lastOption;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
} catch (e) {
|
|
106
|
-
isString(e) && formRenderLog(e);
|
|
107
|
-
}
|
|
108
|
-
function enrichChildOption(option, parent, depth2) {
|
|
109
|
-
return {
|
|
110
|
-
...option,
|
|
111
|
-
parent,
|
|
112
|
-
isLeaf: getNodeDepth(parent) + 1 >= depth2
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function enrichKeywordOption(option, keyword2) {
|
|
116
|
-
option.__keyword = !!keyword2;
|
|
117
|
-
option.isLeaf = !!keyword2;
|
|
118
|
-
return option;
|
|
119
|
-
}
|
|
120
|
-
function updateValue(node2) {
|
|
121
|
-
valueRef.value = createOptionValue(node2);
|
|
122
|
-
showRef.value = false;
|
|
123
|
-
return Promise.reject();
|
|
124
|
-
}
|
|
125
|
-
function sortOptionWithIdList(options, idList) {
|
|
126
|
-
return idList.map((id) => {
|
|
127
|
-
return options.find((option) => option[valueKey.value] === id);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function generateOptionWithIdList(options, idList) {
|
|
131
|
-
let lastOption = options[0];
|
|
132
|
-
const resultOption = idList.reduce((res, id, index) => {
|
|
133
|
-
const option = getTargetOption(options, id);
|
|
134
|
-
if (index === 0) {
|
|
135
|
-
lastOption = option;
|
|
136
|
-
return [option];
|
|
137
|
-
}
|
|
138
|
-
Object.assign(option, {
|
|
139
|
-
parent: lastOption,
|
|
140
|
-
isLeaf: index + 1 >= depth.value
|
|
141
|
-
});
|
|
142
|
-
lastOption.children = [option];
|
|
143
|
-
lastOption = option;
|
|
144
|
-
return res;
|
|
145
|
-
}, []);
|
|
146
|
-
return {
|
|
147
|
-
options: resultOption,
|
|
148
|
-
lastOption
|
|
149
|
-
};
|
|
150
|
-
function getTargetOption(options2, value) {
|
|
151
|
-
return options2.find((o) => o[valueKey.value] === value);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
function getNodeDepth(node2) {
|
|
155
|
-
let result = 1;
|
|
156
|
-
let parent = node2.parent;
|
|
157
|
-
while (parent) {
|
|
158
|
-
result++;
|
|
159
|
-
parent = parent.parent;
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
}
|
|
163
|
-
function parseLinkFromString2List(linkString) {
|
|
164
|
-
return linkString.split("_").filter((s) => s);
|
|
165
|
-
}
|
|
166
|
-
function createParams(wordbook, autograph, field2, node2, key2) {
|
|
167
|
-
const paramsAdaptorMap = {
|
|
168
|
-
autograph: () => autograph,
|
|
169
|
-
wordbookId: "id",
|
|
170
|
-
wordbookType: "type",
|
|
171
|
-
fieldKeys: () => wordbook.search_key ? JSON.stringify(wordbook.search_key) : void 0,
|
|
172
|
-
conObj: () => JSON.stringify(createConfigObject(wordbook, keyword, node2)),
|
|
173
|
-
primaryKey: "primary_key",
|
|
174
|
-
levelKey: "level_key",
|
|
175
|
-
keyword: () => keyword,
|
|
176
|
-
page: () => 1
|
|
177
|
-
};
|
|
178
|
-
const params = Object.entries(paramsAdaptorMap).reduce((res, [k, v]) => {
|
|
179
|
-
res[k] = isString(v) ? wordbook[v] : isFunction(v) ? v() : void 0;
|
|
180
|
-
return res;
|
|
181
|
-
}, {});
|
|
182
|
-
return {
|
|
183
|
-
...getSearchRequestInfo(),
|
|
184
|
-
params,
|
|
185
|
-
key: key2,
|
|
186
|
-
cache: props.requestCache
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
function createConfigObject(wordbook, keyword2, node2) {
|
|
190
|
-
if (keyword2)
|
|
191
|
-
return wordbook.conObj || [];
|
|
192
|
-
if (!node2)
|
|
193
|
-
return wordbook.conObjFirstLevel || [];
|
|
194
|
-
return [{
|
|
195
|
-
con: "EQ",
|
|
196
|
-
is_compare_field: false,
|
|
197
|
-
field_key: wordbook.level_key,
|
|
198
|
-
value: node2[valueKey.value]
|
|
199
|
-
}];
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
async function fetchPrimaryKeyValue(primaryKeys) {
|
|
203
|
-
if (!getSearchRequestInfo().primaryKeyUrl)
|
|
204
|
-
return [];
|
|
205
|
-
try {
|
|
206
|
-
return await asyncQueue.addAsync(createParams(props.wordbook, props.autograph, primaryKeys, fieldKey.value));
|
|
207
|
-
} catch (e) {
|
|
208
|
-
isString(e) && formRenderLog(e);
|
|
209
|
-
}
|
|
210
|
-
function createParams(wordbook, autograph, primaryKeys2, key2) {
|
|
211
|
-
const requestInfo = getSearchRequestInfo();
|
|
212
|
-
const params = {
|
|
213
|
-
autograph,
|
|
214
|
-
tableId: wordbook.id,
|
|
215
|
-
primaryKeyValue: primaryKeys2.join(","),
|
|
216
|
-
page: 1
|
|
217
|
-
};
|
|
218
|
-
return {
|
|
219
|
-
key: key2,
|
|
220
|
-
params,
|
|
221
|
-
...requestInfo,
|
|
222
|
-
url: requestInfo.primaryKeyUrl,
|
|
223
|
-
cache: props.requestCache
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
function createOptionValue(node) {
|
|
228
|
-
const result = [];
|
|
229
|
-
let current = node;
|
|
230
|
-
while (current) {
|
|
231
|
-
result.unshift(omit(current, ["parent", "isLeaf", "__keyword", "children"]));
|
|
232
|
-
current = current.parent;
|
|
233
|
-
}
|
|
234
|
-
return result;
|
|
235
|
-
}
|
|
236
|
-
watch(() => props.wordbook, (wordbook, oldWordbook) => {
|
|
237
|
-
if (isEqual(wordbook, oldWordbook))
|
|
238
|
-
return;
|
|
239
|
-
optionsRef.value = [];
|
|
240
|
-
if (!wordbook)
|
|
241
|
-
return;
|
|
242
|
-
(valueRef.value || !props.lazyRequest) && fetchData();
|
|
243
|
-
}, {
|
|
244
|
-
immediate: true
|
|
245
|
-
});
|
|
246
|
-
const {
|
|
247
|
-
injectValueValidate,
|
|
248
|
-
injectValueWatchFromEmpty,
|
|
249
|
-
injectValueBindKey
|
|
250
|
-
} = useCommonInjection();
|
|
251
|
-
injectValueWatchFromEmpty(valueRef, fetchData);
|
|
252
|
-
injectValueValidate(valueRef);
|
|
253
|
-
const key = injectValueBindKey(valueRef);
|
|
254
|
-
return () => createVNode(SearchCascader, {
|
|
255
|
-
"value": valueRef.value,
|
|
256
|
-
"onUpdate:value": ($event) => valueRef.value = $event,
|
|
257
|
-
"show": showRef.value,
|
|
258
|
-
"onUpdate:show": ($event) => showRef.value = $event,
|
|
259
|
-
"options": optionsRef.value,
|
|
260
|
-
"key": key.value,
|
|
261
|
-
"labelKey": labelKey.value,
|
|
262
|
-
"valueKey": valueKey.value,
|
|
263
|
-
"search": fetchData,
|
|
264
|
-
"onFocus": createVisitedSetter(field)
|
|
265
|
-
}, {
|
|
266
|
-
empty: () => createVNode(script$1, null, null)
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
const LEVEL_SEARCH_CASCADER = connect(script, mapProps({
|
|
271
|
-
dataSource: "options"
|
|
272
|
-
}, assignUpdateValue));
|
|
273
|
-
|
|
274
|
-
export { LEVEL_SEARCH_CASCADER };
|
|
1
|
+
import{defineComponent as e,ref as r,computed as o,inject as t,watch as a,createVNode as n}from"vue";import{useVModel as u}from"@vueuse/core";import{isEqual as i,isString as l,isEmpty as s,isFunction as c,omit as d}from"lodash-es";import"../../../index.js";import{InjectionAsyncQueue as p}from"../../constants/index.js";import{useCommonInjection as m}from"../../hooks/useCommonInjection.js";import{formRenderLog as f}from"../../utils/index.js";import{connect as y,mapProps as v}from"@formily/vue";import h from"../../../../search-cascader/index.js";import k from"../../../../../shared/components/no-data/NoData.vue.js";import{createVisitedSetter as j,assignUpdateValue as _}from"../../utils/schema.js";import{useFormField as w}from"../../hooks/useFormField.js";import{useFormRequest as b}from"../../hooks/useFormRequest.js";const g=y(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:y}){const v=u(e,"value",y),_=r(!1),g=r([]),{field:K,fieldKey:O}=w(),q=o((()=>{var r,o,t;return null!=(t=null==(o=null==(r=e.wordbook)?void 0:r.render_key)?void 0:o[0])?t:"text"})),F=o((()=>{var r,o;return null!=(o=null==(r=e.wordbook)?void 0:r.value_key)?o:"value"})),S=o((()=>{var r;return(null==(r=e.wordbook)?void 0:r.level_num)||1/0})),x=t(p),{getSearchRequestInfo:C}=b();async function L(r,o){try{if(r&&!r.__keyword&&r.isLeaf)return t(r);if(null==r?void 0:r.__keyword){if(!l(r.id_link))return Promise.reject();const o=r.id_link.split("_").filter((e=>e)),t=await async function(r){if(!C().primaryKeyUrl)return[];try{return await x.addAsync(o(e.wordbook,e.autograph,r,O.value))}catch(e){l(e)&&f(e)}function o(r,o,t,a){const n=C();return{key:a,params:{autograph:o,tableId:r.id,primaryKeyValue:t.join(","),page:1},...n,url:n.primaryKeyUrl,cache:e.requestCache}}}(o);if(!t)return Promise.reject();const{lastOption:a,options:n}=function(e,r){let o=e[0];return{options:r.reduce(((r,a,n)=>{const u=t(e,a);return 0===n?(o=u,[u]):(Object.assign(u,{parent:o,isLeaf:n+1>=S.value}),o.children=[u],o=u,r)}),[]),lastOption:o};function t(e,r){return e.find((e=>e[F.value]===r))}}(t,o);return await L(a),s(a.children)?(v.value=function(e,r){return r.map((r=>e.find((e=>e[F.value]===r))))}(t,o),_.value=!1,Promise.reject()):(g.value=n,a)}{const n=await x.addAsync(function(r,t,a,n,u){const i={autograph:()=>t,wordbookId:"id",wordbookType:"type",fieldKeys:()=>r.search_key?JSON.stringify(r.search_key):void 0,conObj:()=>JSON.stringify(function(e,r,o){return r?e.conObj||[]:o?[{con:"EQ",is_compare_field:!1,field_key:e.level_key,value:o[F.value]}]:e.conObjFirstLevel||[]}(r,o,n)),primaryKey:"primary_key",levelKey:"level_key",keyword:()=>o,page:()=>1},s=Object.entries(i).reduce(((e,[o,t])=>(e[o]=l(t)?r[t]:c(t)?t():void 0,e)),{});return{...C(),params:s,key:u,cache:e.requestCache}}(e.wordbook,e.autograph,K.value,r,O.value));if(r){if(!n.length)return t(r);r.children=n.map((e=>function(e,r,o){return{...e,parent:r,isLeaf:a(r)+1>=o}}(e,r,S.value)))}else g.value=n.map((e=>function(e,r){return e.__keyword=!!r,e.isLeaf=!!r,e}(e,o)))}}catch(e){l(e)&&f(e)}function t(e){return v.value=function(e){const r=[];let o=e;for(;o;)r.unshift(d(o,["parent","isLeaf","__keyword","children"])),o=o.parent;return r}(e),_.value=!1,Promise.reject()}function a(e){let r=1,o=e.parent;for(;o;)r++,o=o.parent;return r}}a((()=>e.wordbook),((r,o)=>{i(r,o)||(g.value=[],r&&(v.value||!e.lazyRequest)&&L())}),{immediate:!0});const{injectValueValidate:V,injectValueWatchFromEmpty:A,injectValueBindKey:I}=m();A(v,L),V(v);const P=I(v);return()=>n(h,{value:v.value,"onUpdate:value":e=>v.value=e,show:_.value,"onUpdate:show":e=>_.value=e,options:g.value,key:P.value,labelKey:q.value,valueKey:F.value,search:L,onFocus:j(K)},{empty:()=>n(k,null,null)})}}),v({dataSource:"options"},_));export{g as LEVEL_SEARCH_CASCADER};
|
|
@@ -1,71 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import '../../../../index.js';
|
|
3
|
-
import TooltipMessage from '../../tooltipMessage.vue.js';
|
|
4
|
-
import { InjectionFormItemDepsCollector, FormItemLineBarDepKeyPrepend } from '../../../constants/index.js';
|
|
5
|
-
import { ChevronDown, ChevronUp } from '@vicons/ionicons5';
|
|
6
|
-
import { NCollapseTransition } from 'naive-ui';
|
|
7
|
-
import _export_sfc from '../../../../../../_virtual/plugin-vue_export-helper.js';
|
|
8
|
-
import { useFormField } from '../../../hooks/useFormField.js';
|
|
9
|
-
|
|
10
|
-
const _hoisted_1 = {
|
|
11
|
-
class: "form-render__linebar",
|
|
12
|
-
"anchor-target": ""
|
|
13
|
-
};
|
|
14
|
-
const _hoisted_2 = { class: "form-render__linebarHeaderTitle" };
|
|
15
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
-
__name: "FormCollapse",
|
|
17
|
-
props: {
|
|
18
|
-
show: { type: Boolean, default: true },
|
|
19
|
-
title: { type: String, default: "" },
|
|
20
|
-
remark: String,
|
|
21
|
-
disabled: { type: Boolean, default: false }
|
|
22
|
-
},
|
|
23
|
-
setup(__props) {
|
|
24
|
-
const props = __props;
|
|
25
|
-
const _show = ref(props.show);
|
|
26
|
-
function toggleShow() {
|
|
27
|
-
if (props.disabled)
|
|
28
|
-
return;
|
|
29
|
-
_show.value = !_show.value;
|
|
30
|
-
}
|
|
31
|
-
const headerClass = computed(() => {
|
|
32
|
-
return ["form-render__linebarHeader", { "form-render__linebarHeader--disabled": !!props.disabled }];
|
|
33
|
-
});
|
|
34
|
-
const { fieldKey } = useFormField();
|
|
35
|
-
const formItemDepsCollector = inject(InjectionFormItemDepsCollector);
|
|
36
|
-
formItemDepsCollector.setDeps(fieldKey.value, FormItemLineBarDepKeyPrepend + fieldKey.value, (v = true) => {
|
|
37
|
-
_show.value = v;
|
|
38
|
-
});
|
|
39
|
-
return (_ctx, _cache) => {
|
|
40
|
-
return openBlock(), createElementBlock("section", _hoisted_1, [
|
|
41
|
-
createElementVNode("header", {
|
|
42
|
-
class: normalizeClass(unref(headerClass)),
|
|
43
|
-
onClick: toggleShow
|
|
44
|
-
}, [
|
|
45
|
-
createElementVNode("div", _hoisted_2, [
|
|
46
|
-
createTextVNode(toDisplayString(__props.title) + " ", 1),
|
|
47
|
-
__props.remark ? (openBlock(), createBlock(TooltipMessage, {
|
|
48
|
-
key: 0,
|
|
49
|
-
message: __props.remark
|
|
50
|
-
}, null, 8, ["message"])) : createCommentVNode("v-if", true)
|
|
51
|
-
]),
|
|
52
|
-
!__props.disabled ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
53
|
-
_show.value ? (openBlock(), createBlock(unref(ChevronDown), { key: 0 })) : (openBlock(), createBlock(unref(ChevronUp), { key: 1 }))
|
|
54
|
-
], 64)) : createCommentVNode("v-if", true)
|
|
55
|
-
], 2),
|
|
56
|
-
createVNode(unref(NCollapseTransition), {
|
|
57
|
-
class: "form-render__linebarItem",
|
|
58
|
-
show: _show.value
|
|
59
|
-
}, {
|
|
60
|
-
default: withCtx(() => [
|
|
61
|
-
renderSlot(_ctx.$slots, "default")
|
|
62
|
-
]),
|
|
63
|
-
_: 3
|
|
64
|
-
}, 8, ["show"])
|
|
65
|
-
]);
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
var FormCollapse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "FormCollapse.vue"]]);
|
|
70
|
-
|
|
71
|
-
export { FormCollapse as default };
|
|
1
|
+
import{defineComponent as e,ref as r,computed as o,inject as a,openBlock as l,createElementBlock as s,createElementVNode as t,normalizeClass as i,unref as n,createTextVNode as d,toDisplayString as m,createBlock as u,createCommentVNode as f,Fragment as p,createVNode as v,withCtx as _,renderSlot as c}from"vue";import"../../../../index.js";import b from"../../tooltipMessage.vue.js";import{InjectionFormItemDepsCollector as k,FormItemLineBarDepKeyPrepend as h}from"../../../constants/index.js";import{ChevronDown as y,ChevronUp as g}from"@vicons/ionicons5";import{NCollapseTransition as j}from"naive-ui";import w from"../../../../../../_virtual/plugin-vue_export-helper.js";import{useFormField as x}from"../../../hooks/useFormField.js";const F={class:"form-render__linebar","anchor-target":""},C={class:"form-render__linebarHeaderTitle"};var H=w(e({__name:"FormCollapse",props:{show:{type:Boolean,default:!0},title:{type:String,default:""},remark:String,disabled:{type:Boolean,default:!1}},setup(e){const w=e,H=r(w.show);function B(){w.disabled||(H.value=!H.value)}const S=o((()=>["form-render__linebarHeader",{"form-render__linebarHeader--disabled":!!w.disabled}])),{fieldKey:D}=x();return a(k).setDeps(D.value,h+D.value,((e=!0)=>{H.value=e})),(r,o)=>(l(),s("section",F,[t("header",{class:i(n(S)),onClick:B},[t("div",C,[d(m(e.title)+" ",1),e.remark?(l(),u(b,{key:0,message:e.remark},null,8,["message"])):f("v-if",!0)]),e.disabled?f("v-if",!0):(l(),s(p,{key:0},[H.value?(l(),u(n(y),{key:0})):(l(),u(n(g),{key:1}))],64))],2),v(n(j),{class:"form-render__linebarItem",show:H.value},{default:_((()=>[c(r.$slots,"default")])),_:3},8,["show"])]))}}),[["__file","FormCollapse.vue"]]);export{H as default};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import FormCollapse from './FormCollapse.vue.js';
|
|
3
|
-
|
|
4
|
-
const LINEBAR = connect(
|
|
5
|
-
FormCollapse,
|
|
6
|
-
mapProps((props, field) => {
|
|
7
|
-
return { ...props, title: field.title };
|
|
8
|
-
})
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
export { LINEBAR };
|
|
1
|
+
import{connect as o,mapProps as t}from"@formily/vue";import r from"./FormCollapse.vue.js";const e=o(r,t(((o,t)=>({...o,title:t.title}))));export{e as LINEBAR};
|