cnhis-design-vue 3.1.40-beta.12 → 3.1.40-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.d.ts +1 -1
- package/es/components/keyboard/index.js +1 -10
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- 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.d.ts +1 -1
- 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/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,230 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { widthAppend } from '../../../../../shared/utils/index.js';
|
|
3
|
-
import { FunnelSharp } from '@vicons/ionicons5';
|
|
4
|
-
import { useVModel, useVirtualList } from '@vueuse/core';
|
|
5
|
-
import { NEllipsis, NPopover, NIcon, NInput, NCheckbox, NCheckboxGroup, NButtonGroup, NButton } from 'naive-ui';
|
|
6
|
-
import { InjectionIhoTableUUID, InjectionIhoTableConfig } from '../../constants/index.js';
|
|
7
|
-
import { IhoTableRenderHelper } from '../../utils/index.js';
|
|
8
|
-
import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
|
|
9
|
-
|
|
10
|
-
const _hoisted_1 = { class: "iho-table__filterWrapper" };
|
|
11
|
-
const _hoisted_2 = { key: 0 };
|
|
12
|
-
const _hoisted_3 = ["onClick"];
|
|
13
|
-
const _hoisted_4 = { class: "iho-table__filterListItem" };
|
|
14
|
-
const _hoisted_5 = { class: "iho-table__filterFooter" };
|
|
15
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
-
__name: "filter",
|
|
17
|
-
props: {
|
|
18
|
-
payload: {
|
|
19
|
-
type: Object,
|
|
20
|
-
required: true
|
|
21
|
-
},
|
|
22
|
-
sortable: { type: Boolean },
|
|
23
|
-
options: { type: Array, default: () => [] },
|
|
24
|
-
checked: { type: Array, required: true },
|
|
25
|
-
sortStatus: { type: String }
|
|
26
|
-
},
|
|
27
|
-
emits: ["update:checked", "update:sortStatus"],
|
|
28
|
-
setup(__props, { emit: emits }) {
|
|
29
|
-
const props = __props;
|
|
30
|
-
const uuid = inject(InjectionIhoTableUUID);
|
|
31
|
-
const configRef = inject(InjectionIhoTableConfig);
|
|
32
|
-
const checkedRef = useVModel(props, "checked", emits);
|
|
33
|
-
const sortStatusRef = useVModel(props, "sortStatus", emits);
|
|
34
|
-
const checkedCacheRef = ref([]);
|
|
35
|
-
const filterVisible = ref(false);
|
|
36
|
-
const searchFilterText = ref("");
|
|
37
|
-
function toggleFilterVisible() {
|
|
38
|
-
filterVisible.value = !filterVisible.value;
|
|
39
|
-
}
|
|
40
|
-
function close() {
|
|
41
|
-
filterVisible.value = false;
|
|
42
|
-
}
|
|
43
|
-
onDeactivated(close);
|
|
44
|
-
watch(filterVisible, (visible) => {
|
|
45
|
-
if (visible) {
|
|
46
|
-
checkedCacheRef.value = [...checkedRef.value];
|
|
47
|
-
searchFilterText.value = "";
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
const OPTION_ITEM_HEIGHT = 32;
|
|
51
|
-
const VIEW_CAPACITY = 10;
|
|
52
|
-
const { list, containerProps, wrapperProps } = useVirtualList(
|
|
53
|
-
computed(() => {
|
|
54
|
-
return searchFilterText.value ? props.options.filter((option) => option.key.includes(searchFilterText.value)) : props.options;
|
|
55
|
-
}),
|
|
56
|
-
{
|
|
57
|
-
itemHeight: OPTION_ITEM_HEIGHT,
|
|
58
|
-
overscan: 3
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
const indeterminate = computed(
|
|
62
|
-
() => !!checkedCacheRef.value.length && checkedCacheRef.value.length !== props.options.length
|
|
63
|
-
);
|
|
64
|
-
const checkAll = computed({
|
|
65
|
-
get() {
|
|
66
|
-
return checkedCacheRef.value.length === props.options.length;
|
|
67
|
-
},
|
|
68
|
-
set: (isCheck) => {
|
|
69
|
-
if (isCheck) {
|
|
70
|
-
checkedCacheRef.value = props.options.map((item) => item.value);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
checkedCacheRef.value = [];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
const containerStyleWithHeight = computed(() => {
|
|
77
|
-
return {
|
|
78
|
-
...containerProps.style,
|
|
79
|
-
height: widthAppend(OPTION_ITEM_HEIGHT * VIEW_CAPACITY)
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
function confirmFilter() {
|
|
83
|
-
close();
|
|
84
|
-
emits("update:checked", checkedCacheRef.value);
|
|
85
|
-
}
|
|
86
|
-
const sortStatusList = [
|
|
87
|
-
{ status: "asc", text: "\u5347\u5E8F A to Z" },
|
|
88
|
-
{ status: "desc", text: "\u964D\u5E8F Z to A" }
|
|
89
|
-
];
|
|
90
|
-
function setSort(value) {
|
|
91
|
-
close();
|
|
92
|
-
emits("update:sortStatus", value);
|
|
93
|
-
}
|
|
94
|
-
const iconActive = computed(() => {
|
|
95
|
-
return checkedRef.value.length || sortStatusRef.value;
|
|
96
|
-
});
|
|
97
|
-
const editable = computed(() => {
|
|
98
|
-
var _a;
|
|
99
|
-
return IhoTableRenderHelper.isEditableColumn(configRef.value, (_a = props.payload) == null ? void 0 : _a.column);
|
|
100
|
-
});
|
|
101
|
-
const wrapperStyle = computed(() => {
|
|
102
|
-
return {
|
|
103
|
-
display: "inline-flex",
|
|
104
|
-
"align-items": "center",
|
|
105
|
-
justifyContent: "start",
|
|
106
|
-
width: `calc(100% - ${editable.value ? 19 : 0}px)`
|
|
107
|
-
};
|
|
108
|
-
});
|
|
109
|
-
return (_ctx, _cache) => {
|
|
110
|
-
return openBlock(), createElementBlock("section", {
|
|
111
|
-
style: normalizeStyle(unref(wrapperStyle))
|
|
112
|
-
}, [
|
|
113
|
-
createElementVNode("section", null, [
|
|
114
|
-
renderSlot(_ctx.$slots, "header", {}, () => [
|
|
115
|
-
createVNode(unref(NEllipsis), null, {
|
|
116
|
-
default: withCtx(() => [
|
|
117
|
-
createTextVNode(toDisplayString(__props.payload.column.title), 1)
|
|
118
|
-
]),
|
|
119
|
-
_: 1
|
|
120
|
-
})
|
|
121
|
-
])
|
|
122
|
-
]),
|
|
123
|
-
createVNode(unref(NPopover), {
|
|
124
|
-
to: `#${unref(uuid)}`,
|
|
125
|
-
show: filterVisible.value
|
|
126
|
-
}, {
|
|
127
|
-
trigger: withCtx(() => [
|
|
128
|
-
createVNode(unref(NIcon), {
|
|
129
|
-
class: normalizeClass(["iho-table__filterIcon", { "is-active": unref(iconActive) }]),
|
|
130
|
-
component: unref(FunnelSharp),
|
|
131
|
-
onClick: toggleFilterVisible
|
|
132
|
-
}, null, 8, ["class", "component"])
|
|
133
|
-
]),
|
|
134
|
-
default: withCtx(() => [
|
|
135
|
-
createElementVNode("section", _hoisted_1, [
|
|
136
|
-
createCommentVNode(' \u5224\u65AD\u662F\u5426\u663E\u793A\u5347\u5E8F\u964D\u5E8F\u6A21\u5757\u7684\u7EC4\u4EF6 v-if="sortable"'),
|
|
137
|
-
__props.sortable ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
138
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(sortStatusList, (item) => {
|
|
139
|
-
return createElementVNode("div", {
|
|
140
|
-
key: item.status,
|
|
141
|
-
class: normalizeClass(["iho-table__filterButton", { "iho-table__filterButton--active": unref(sortStatusRef) === item.status }]),
|
|
142
|
-
onClick: ($event) => setSort(item.status)
|
|
143
|
-
}, toDisplayString(item.text), 11, _hoisted_3);
|
|
144
|
-
}), 64))
|
|
145
|
-
])) : createCommentVNode("v-if", true),
|
|
146
|
-
__props.options.length > 5 ? (openBlock(), createBlock(unref(NInput), {
|
|
147
|
-
key: 1,
|
|
148
|
-
value: searchFilterText.value,
|
|
149
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchFilterText.value = $event)
|
|
150
|
-
}, null, 8, ["value"])) : createCommentVNode("v-if", true),
|
|
151
|
-
createElementVNode("div", _hoisted_4, [
|
|
152
|
-
createVNode(unref(NCheckbox), {
|
|
153
|
-
label: "\u5168\u9009",
|
|
154
|
-
checked: unref(checkAll),
|
|
155
|
-
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => isRef(checkAll) ? checkAll.value = $event : null),
|
|
156
|
-
indeterminate: unref(indeterminate)
|
|
157
|
-
}, null, 8, ["checked", "indeterminate"])
|
|
158
|
-
]),
|
|
159
|
-
createVNode(unref(NCheckboxGroup), {
|
|
160
|
-
value: checkedCacheRef.value,
|
|
161
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => checkedCacheRef.value = $event)
|
|
162
|
-
}, {
|
|
163
|
-
default: withCtx(() => [
|
|
164
|
-
createElementVNode("section", {
|
|
165
|
-
ref: unref(containerProps).ref,
|
|
166
|
-
style: normalizeStyle(unref(containerStyleWithHeight)),
|
|
167
|
-
onScroll: _cache[2] || (_cache[2] = (...args) => unref(containerProps).onScroll && unref(containerProps).onScroll(...args)),
|
|
168
|
-
class: "iho-table__filterListWrapper"
|
|
169
|
-
}, [
|
|
170
|
-
createElementVNode("section", {
|
|
171
|
-
style: normalizeStyle(unref(wrapperProps).style)
|
|
172
|
-
}, [
|
|
173
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), (option) => {
|
|
174
|
-
return openBlock(), createElementBlock("div", {
|
|
175
|
-
class: "iho-table__filterListItem",
|
|
176
|
-
key: option.data.value
|
|
177
|
-
}, [
|
|
178
|
-
createVNode(unref(NCheckbox), {
|
|
179
|
-
value: option.data.value,
|
|
180
|
-
label: option.data.key
|
|
181
|
-
}, null, 8, ["value", "label"])
|
|
182
|
-
]);
|
|
183
|
-
}), 128))
|
|
184
|
-
], 4)
|
|
185
|
-
], 36)
|
|
186
|
-
]),
|
|
187
|
-
_: 1
|
|
188
|
-
}, 8, ["value"]),
|
|
189
|
-
createElementVNode("footer", _hoisted_5, [
|
|
190
|
-
createElementVNode("section", null, toDisplayString(`\u5DF2\u9009\u62E9${checkedCacheRef.value.length}\u9879`), 1),
|
|
191
|
-
createVNode(unref(NButtonGroup), { size: "tiny" }, {
|
|
192
|
-
default: withCtx(() => [
|
|
193
|
-
createVNode(unref(NButton), {
|
|
194
|
-
onClick: _cache[4] || (_cache[4] = ($event) => checkedCacheRef.value = [])
|
|
195
|
-
}, {
|
|
196
|
-
default: withCtx(() => [
|
|
197
|
-
createTextVNode("\u6E05\u7A7A")
|
|
198
|
-
]),
|
|
199
|
-
_: 1
|
|
200
|
-
}),
|
|
201
|
-
createVNode(unref(NButton), { onClick: close }, {
|
|
202
|
-
default: withCtx(() => [
|
|
203
|
-
createTextVNode("\u53D6\u6D88")
|
|
204
|
-
]),
|
|
205
|
-
_: 1
|
|
206
|
-
}),
|
|
207
|
-
createVNode(unref(NButton), {
|
|
208
|
-
type: "primary",
|
|
209
|
-
onClick: confirmFilter
|
|
210
|
-
}, {
|
|
211
|
-
default: withCtx(() => [
|
|
212
|
-
createTextVNode("\u786E\u5B9A")
|
|
213
|
-
]),
|
|
214
|
-
_: 1
|
|
215
|
-
})
|
|
216
|
-
]),
|
|
217
|
-
_: 1
|
|
218
|
-
})
|
|
219
|
-
])
|
|
220
|
-
])
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
}, 8, ["to", "show"])
|
|
224
|
-
], 4);
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
});
|
|
228
|
-
var FilterComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "filter.vue"]]);
|
|
229
|
-
|
|
230
|
-
export { FilterComponent as default };
|
|
1
|
+
import{defineComponent as e,inject as t,ref as l,onDeactivated as a,watch as o,computed as i,openBlock as s,createElementBlock as n,normalizeStyle as u,unref as r,createElementVNode as c,renderSlot as v,createVNode as p,withCtx as d,createTextVNode as f,toDisplayString as h,normalizeClass as m,createCommentVNode as _,Fragment as y,renderList as k,createBlock as b,isRef as g}from"vue";import{widthAppend as x}from"../../../../../shared/utils/index.js";import{FunnelSharp as C}from"@vicons/ionicons5";import{useVModel as S,useVirtualList as j}from"@vueuse/core";import{NEllipsis as w,NPopover as A,NIcon as $,NInput as B,NCheckbox as I,NCheckboxGroup as L,NButtonGroup as U,NButton as q}from"naive-ui";import{InjectionIhoTableUUID as P,InjectionIhoTableConfig as W}from"../../constants/index.js";import{IhoTableRenderHelper as Z}from"../../utils/index.js";import z from"../../../../../_virtual/plugin-vue_export-helper.js";const E={class:"iho-table__filterWrapper"},F={key:0},H=["onClick"],O={class:"iho-table__filterListItem"},D={class:"iho-table__filterFooter"};var G=z(e({__name:"filter",props:{payload:{type:Object,required:!0},sortable:{type:Boolean},options:{type:Array,default:()=>[]},checked:{type:Array,required:!0},sortStatus:{type:String}},emits:["update:checked","update:sortStatus"],setup(e,{emit:z}){const G=e,J=t(P),K=t(W),M=S(G,"checked",z),N=S(G,"sortStatus",z),Q=l([]),R=l(!1),T=l("");function V(){R.value=!R.value}function X(){R.value=!1}a(X),o(R,(e=>{e&&(Q.value=[...M.value],T.value="")}));const{list:Y,containerProps:ee,wrapperProps:te}=j(i((()=>T.value?G.options.filter((e=>e.key.includes(T.value))):G.options)),{itemHeight:32,overscan:3}),le=i((()=>!!Q.value.length&&Q.value.length!==G.options.length)),ae=i({get:()=>Q.value.length===G.options.length,set:e=>{Q.value=e?G.options.map((e=>e.value)):[]}}),oe=i((()=>({...ee.style,height:x(320)})));function ie(){X(),z("update:checked",Q.value)}const se=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];const ne=i((()=>M.value.length||N.value)),ue=i((()=>{var e;return Z.isEditableColumn(K.value,null==(e=G.payload)?void 0:e.column)})),re=i((()=>({display:"inline-flex","align-items":"center",justifyContent:"start",width:`calc(100% - ${ue.value?19:0}px)`})));return(t,l)=>(s(),n("section",{style:u(r(re))},[c("section",null,[v(t.$slots,"header",{},(()=>[p(r(w),null,{default:d((()=>[f(h(e.payload.column.title),1)])),_:1})]))]),p(r(A),{to:`#${r(J)}`,show:R.value},{trigger:d((()=>[p(r($),{class:m(["iho-table__filterIcon",{"is-active":r(ne)}]),component:r(C),onClick:V},null,8,["class","component"])])),default:d((()=>[c("section",E,[_(' 判断是否显示升序降序模块的组件 v-if="sortable"'),e.sortable?(s(),n("div",F,[(s(),n(y,null,k(se,(e=>c("div",{key:e.status,class:m(["iho-table__filterButton",{"iho-table__filterButton--active":r(N)===e.status}]),onClick:t=>{return l=e.status,X(),void z("update:sortStatus",l);var l}},h(e.text),11,H))),64))])):_("v-if",!0),e.options.length>5?(s(),b(r(B),{key:1,value:T.value,"onUpdate:value":l[0]||(l[0]=e=>T.value=e)},null,8,["value"])):_("v-if",!0),c("div",O,[p(r(I),{label:"全选",checked:r(ae),"onUpdate:checked":l[1]||(l[1]=e=>g(ae)?ae.value=e:null),indeterminate:r(le)},null,8,["checked","indeterminate"])]),p(r(L),{value:Q.value,"onUpdate:value":l[3]||(l[3]=e=>Q.value=e)},{default:d((()=>[c("section",{ref:r(ee).ref,style:u(r(oe)),onScroll:l[2]||(l[2]=(...e)=>r(ee).onScroll&&r(ee).onScroll(...e)),class:"iho-table__filterListWrapper"},[c("section",{style:u(r(te).style)},[(s(!0),n(y,null,k(r(Y),(e=>(s(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[p(r(I),{value:e.data.value,label:e.data.key},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),c("footer",D,[c("section",null,h(`已选择${Q.value.length}项`),1),p(r(U),{size:"tiny"},{default:d((()=>[p(r(q),{onClick:l[4]||(l[4]=e=>Q.value=[])},{default:d((()=>[f("清空")])),_:1}),p(r(q),{onClick:X},{default:d((()=>[f("取消")])),_:1}),p(r(q),{type:"primary",onClick:ie},{default:d((()=>[f("确定")])),_:1})])),_:1})])])])),_:1},8,["to","show"])],4))}}),[["__file","filter.vue"]]);export{G as default};
|
|
@@ -1,240 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsonParse } from '../../../../../shared/utils/index.js';
|
|
3
|
-
import { isObject, isFunction, isArray } from 'lodash-es';
|
|
4
|
-
import '../../../index.js';
|
|
5
|
-
import { IHO_TABLE_NUMBER_STATUS } from '../../constants/index.js';
|
|
6
|
-
import { useUUIDMap, IhoTableRenderHelper, IhoTableUtils } from '../../utils/index.js';
|
|
7
|
-
import FilterComponent from './filter.vue.js';
|
|
8
|
-
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
9
|
-
|
|
10
|
-
function filterPlugin() {
|
|
11
|
-
const pluginName = "filterPlugin";
|
|
12
|
-
const {
|
|
13
|
-
getItemFromUUID,
|
|
14
|
-
removeItemFromUUID
|
|
15
|
-
} = useUUIDMap(() => {
|
|
16
|
-
const stateMap = reactive(/* @__PURE__ */ new Map());
|
|
17
|
-
const filterSet = reactive(/* @__PURE__ */ new Set());
|
|
18
|
-
function setSort({
|
|
19
|
-
value,
|
|
20
|
-
field,
|
|
21
|
-
$table,
|
|
22
|
-
emits
|
|
23
|
-
}) {
|
|
24
|
-
const state = stateMap.get(field);
|
|
25
|
-
if (!state)
|
|
26
|
-
return;
|
|
27
|
-
const column = $table.getColumnByField(field);
|
|
28
|
-
if (!column)
|
|
29
|
-
return;
|
|
30
|
-
if (!state.sortStatus && !value)
|
|
31
|
-
return;
|
|
32
|
-
state.sortStatus = value === state.sortStatus ? null : value;
|
|
33
|
-
stateMap.forEach((state2, field2) => {
|
|
34
|
-
if (field2 === column.field)
|
|
35
|
-
return;
|
|
36
|
-
state2.sortStatus = null;
|
|
37
|
-
});
|
|
38
|
-
const payload = {
|
|
39
|
-
column,
|
|
40
|
-
field: column.field,
|
|
41
|
-
order: value,
|
|
42
|
-
property: column.field,
|
|
43
|
-
sortTime: Date.now()
|
|
44
|
-
};
|
|
45
|
-
emits("sortChange", {
|
|
46
|
-
$table,
|
|
47
|
-
$event: new PointerEvent("click"),
|
|
48
|
-
...payload,
|
|
49
|
-
sortList: [payload]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
function setChecked({
|
|
53
|
-
value,
|
|
54
|
-
field,
|
|
55
|
-
$table,
|
|
56
|
-
emits
|
|
57
|
-
}) {
|
|
58
|
-
const state = stateMap.get(field);
|
|
59
|
-
if (!state)
|
|
60
|
-
return;
|
|
61
|
-
const column = $table.getColumnByField(field);
|
|
62
|
-
if (!column)
|
|
63
|
-
return;
|
|
64
|
-
if (value.length) {
|
|
65
|
-
filterSet.add(column.field);
|
|
66
|
-
} else {
|
|
67
|
-
filterSet.delete(column.field);
|
|
68
|
-
}
|
|
69
|
-
state.checked = value;
|
|
70
|
-
emits("filterChange", {
|
|
71
|
-
$event: new PointerEvent("click"),
|
|
72
|
-
$table,
|
|
73
|
-
...createFilterPayload(column.field, stateMap),
|
|
74
|
-
filterList: [...filterSet.values()].map((field2) => createFilterPayload(field2, stateMap))
|
|
75
|
-
});
|
|
76
|
-
function createFilterPayload(field2, stateMap2) {
|
|
77
|
-
var _a, _b;
|
|
78
|
-
const column2 = $table.getColumnByField(field2);
|
|
79
|
-
return {
|
|
80
|
-
column: column2,
|
|
81
|
-
field: column2.field,
|
|
82
|
-
datas: [],
|
|
83
|
-
property: column2.field,
|
|
84
|
-
values: [...(_b = (_a = stateMap2.get(field2)) == null ? void 0 : _a.checked) != null ? _b : []]
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return {
|
|
89
|
-
stateMap,
|
|
90
|
-
filterSet,
|
|
91
|
-
setChecked,
|
|
92
|
-
setSort
|
|
93
|
-
};
|
|
94
|
-
});
|
|
95
|
-
function initFilterState(uuid, field, initValue = {}) {
|
|
96
|
-
const {
|
|
97
|
-
stateMap,
|
|
98
|
-
setChecked,
|
|
99
|
-
setSort
|
|
100
|
-
} = getItemFromUUID(uuid);
|
|
101
|
-
return {
|
|
102
|
-
filterState: stateMap.set(field, stateMap.get(field) || {
|
|
103
|
-
options: [],
|
|
104
|
-
checked: initValue.checked || [],
|
|
105
|
-
sortStatus: initValue.sortStatus || null
|
|
106
|
-
}).get(field),
|
|
107
|
-
setChecked,
|
|
108
|
-
setSort
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
return defineTablePlugin({
|
|
112
|
-
name: pluginName,
|
|
113
|
-
apply(hooks) {
|
|
114
|
-
hooks.fieldHooks.fieldList.tap(pluginName, (fieldList, {
|
|
115
|
-
uuid
|
|
116
|
-
}, {
|
|
117
|
-
$table,
|
|
118
|
-
emits
|
|
119
|
-
}) => {
|
|
120
|
-
fieldList.forEach((fieldItem) => {
|
|
121
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
122
|
-
const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
|
|
123
|
-
if (!isObject(lowCodeField))
|
|
124
|
-
return;
|
|
125
|
-
const fieldSetting = jsonParse(lowCodeField.fieldSetting || "");
|
|
126
|
-
if (!IhoTableRenderHelper.hasFilter(fieldSetting))
|
|
127
|
-
return;
|
|
128
|
-
const sortable = fieldItem.sortable;
|
|
129
|
-
fieldItem.sortable = false;
|
|
130
|
-
let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
|
|
131
|
-
if (isCompatibleColumn(lowCodeField)) {
|
|
132
|
-
options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({
|
|
133
|
-
...option,
|
|
134
|
-
key: option.label
|
|
135
|
-
}))) != null ? _f : [];
|
|
136
|
-
}
|
|
137
|
-
const {
|
|
138
|
-
filterState,
|
|
139
|
-
setChecked,
|
|
140
|
-
setSort
|
|
141
|
-
} = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
|
|
142
|
-
filterState.options = options;
|
|
143
|
-
const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
|
|
144
|
-
const sortStatusRef = computed({
|
|
145
|
-
get: () => {
|
|
146
|
-
return filterState.sortStatus;
|
|
147
|
-
},
|
|
148
|
-
set: (value) => setSort({
|
|
149
|
-
field: fieldItem.field,
|
|
150
|
-
value,
|
|
151
|
-
$table: $table.value,
|
|
152
|
-
emits
|
|
153
|
-
})
|
|
154
|
-
});
|
|
155
|
-
const checkedRef = computed({
|
|
156
|
-
get: () => filterState.checked,
|
|
157
|
-
set: (value) => setChecked({
|
|
158
|
-
field: fieldItem.field,
|
|
159
|
-
value,
|
|
160
|
-
$table: $table.value,
|
|
161
|
-
emits
|
|
162
|
-
})
|
|
163
|
-
});
|
|
164
|
-
const optionsRef = computed(() => filterState.options);
|
|
165
|
-
fieldItem.slots = {
|
|
166
|
-
...fieldItem.slots,
|
|
167
|
-
header(payload) {
|
|
168
|
-
return createVNode(FilterComponent, {
|
|
169
|
-
"payload": payload,
|
|
170
|
-
"options": optionsRef.value,
|
|
171
|
-
"sortable": sortable,
|
|
172
|
-
"checked": checkedRef.value,
|
|
173
|
-
"onUpdate:checked": ($event) => checkedRef.value = $event,
|
|
174
|
-
"sortStatus": sortStatusRef.value,
|
|
175
|
-
"onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
|
|
176
|
-
}, {
|
|
177
|
-
header: () => isFunction(oldHeader) ? oldHeader(payload) : oldHeader
|
|
178
|
-
});
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
});
|
|
182
|
-
return fieldList;
|
|
183
|
-
});
|
|
184
|
-
hooks.setupHooks.setup.tap(pluginName, (config) => {
|
|
185
|
-
onBeforeUnmount(() => config.value.uuid && removeItemFromUUID(config.value.uuid));
|
|
186
|
-
});
|
|
187
|
-
hooks.exposeHooks.expose.tap(pluginName, (expose, configRef, {
|
|
188
|
-
$table,
|
|
189
|
-
emits
|
|
190
|
-
}) => {
|
|
191
|
-
return {
|
|
192
|
-
...expose,
|
|
193
|
-
getFilterState(field) {
|
|
194
|
-
if (!configRef.value.uuid)
|
|
195
|
-
return;
|
|
196
|
-
const {
|
|
197
|
-
stateMap
|
|
198
|
-
} = getItemFromUUID(configRef.value.uuid);
|
|
199
|
-
const state = stateMap.get(field);
|
|
200
|
-
return state && {
|
|
201
|
-
checked: [...state.checked],
|
|
202
|
-
sortStatus: state.sortStatus
|
|
203
|
-
};
|
|
204
|
-
},
|
|
205
|
-
setFilterState(field, value) {
|
|
206
|
-
if (!configRef.value.uuid)
|
|
207
|
-
return;
|
|
208
|
-
const {
|
|
209
|
-
setChecked,
|
|
210
|
-
setSort
|
|
211
|
-
} = getItemFromUUID(configRef.value.uuid);
|
|
212
|
-
if (Reflect.has(value, "sortStatus")) {
|
|
213
|
-
setSort({
|
|
214
|
-
field,
|
|
215
|
-
value: value.sortStatus,
|
|
216
|
-
$table: $table.value,
|
|
217
|
-
emits
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
if (isArray(value.checked)) {
|
|
221
|
-
setChecked({
|
|
222
|
-
field,
|
|
223
|
-
value: value.checked,
|
|
224
|
-
$table: $table.value,
|
|
225
|
-
emits
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
});
|
|
231
|
-
function isCompatibleColumn(field) {
|
|
232
|
-
const filterTypes = ["SEARCH", "SELECT", "RADIO", "CHECKBOX"];
|
|
233
|
-
const notParticipatingSearch = field.notParticipatingSearch || "";
|
|
234
|
-
return notParticipatingSearch !== IHO_TABLE_NUMBER_STATUS.POSITIVE && filterTypes.includes(IhoTableUtils.getCellType(field)) && isArray(field.options) && field.options.length;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export { filterPlugin };
|
|
1
|
+
import{computed as e,createVNode as t,onBeforeUnmount as l,reactive as o}from"vue";import{jsonParse as s}from"../../../../../shared/utils/index.js";import{isObject as i,isFunction as r,isArray as a}from"lodash-es";import"../../../index.js";import{IHO_TABLE_NUMBER_STATUS as n}from"../../constants/index.js";import{useUUIDMap as u,IhoTableRenderHelper as d,IhoTableUtils as c}from"../../utils/index.js";import f from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function m(){const m="filterPlugin",{getItemFromUUID:v,removeItemFromUUID:h}=u((()=>{const e=o(new Map),t=o(new Set);return{stateMap:e,filterSet:t,setChecked:function({value:l,field:o,$table:s,emits:i}){const r=e.get(o);if(!r)return;const a=s.getColumnByField(o);function n(e,t){var l,o;const i=s.getColumnByField(e);return{column:i,field:i.field,datas:[],property:i.field,values:[...null!=(o=null==(l=t.get(e))?void 0:l.checked)?o:[]]}}a&&(l.length?t.add(a.field):t.delete(a.field),r.checked=l,i("filterChange",{$event:new PointerEvent("click"),$table:s,...n(a.field,e),filterList:[...t.values()].map((t=>n(t,e)))}))},setSort:function({value:t,field:l,$table:o,emits:s}){const i=e.get(l);if(!i)return;const r=o.getColumnByField(l);if(!r)return;if(!i.sortStatus&&!t)return;i.sortStatus=t===i.sortStatus?null:t,e.forEach(((e,t)=>{t!==r.field&&(e.sortStatus=null)}));const a={column:r,field:r.field,order:t,property:r.field,sortTime:Date.now()};s("sortChange",{$table:o,$event:new PointerEvent("click"),...a,sortList:[a]})}}}));return p({name:m,apply(o){o.fieldHooks.fieldList.tap(m,((l,{uuid:o},{$table:u,emits:p})=>(l.forEach((l=>{var m,h,S,g,k,b,C;const $=null==(m=l.editRender)?void 0:m.props;if(!i($))return;const y=s($.fieldSetting||"");if(!d.hasFilter(y))return;const E=l.sortable;l.sortable=!1;let F=null!=(g=null==(S=null==(h=y.mapping)?void 0:h.mappingFiled)?void 0:S.map((e=>e.value[0])))?g:[];(function(e){const t=["SEARCH","SELECT","RADIO","CHECKBOX"];return(e.notParticipatingSearch||"")!==n.POSITIVE&&t.includes(c.getCellType(e))&&a(e.options)&&e.options.length})($)&&(F=null!=(b=null==(k=$.options)?void 0:k.map((e=>({...e,key:e.label}))))?b:[]);const{filterState:x,setChecked:I,setSort:j}=function(e,t,l={}){const{stateMap:o,setChecked:s,setSort:i}=v(e);return{filterState:o.set(t,o.get(t)||{options:[],checked:l.checked||[],sortStatus:l.sortStatus||null}).get(t),setChecked:s,setSort:i}}(o,l.field,$.filterDefaultValue);x.options=F;const P=null==(C=l.slots)?void 0:C.header,U=e({get:()=>x.sortStatus,set:e=>j({field:l.field,value:e,$table:u.value,emits:p})}),w=e({get:()=>x.checked,set:e=>I({field:l.field,value:e,$table:u.value,emits:p})}),D=e((()=>x.options));l.slots={...l.slots,header:e=>t(f,{payload:e,options:D.value,sortable:E,checked:w.value,"onUpdate:checked":e=>w.value=e,sortStatus:U.value,"onUpdate:sortStatus":e=>U.value=e},{header:()=>r(P)?P(e):P})}})),l))),o.setupHooks.setup.tap(m,(e=>{l((()=>e.value.uuid&&h(e.value.uuid)))})),o.exposeHooks.expose.tap(m,((e,t,{$table:l,emits:o})=>({...e,getFilterState(e){if(!t.value.uuid)return;const{stateMap:l}=v(t.value.uuid),o=l.get(e);return o&&{checked:[...o.checked],sortStatus:o.sortStatus}},setFilterState(e,s){if(!t.value.uuid)return;const{setChecked:i,setSort:r}=v(t.value.uuid);Reflect.has(s,"sortStatus")&&r({field:e,value:s.sortStatus,$table:l.value,emits:o}),a(s.checked)&&i({field:e,value:s.checked,$table:l.value,emits:o})}})))}})}export{m as filterPlugin};
|
|
@@ -1,47 +1 @@
|
|
|
1
|
-
import * as index from
|
|
2
|
-
import * as index$1 from './defaultConfigPlugin/index.js';
|
|
3
|
-
import * as index$2 from './filterPlugin/index.js';
|
|
4
|
-
import * as index$3 from './keyboardEventPlugin/index.js';
|
|
5
|
-
import * as index$4 from './lowCodeFieldAdaptorPlugin/index.js';
|
|
6
|
-
import * as index$5 from './rendererPlugins/editableWidgets/dateRendererPlugin/index.js';
|
|
7
|
-
import * as inputRendererPlugin from './rendererPlugins/editableWidgets/inputRendererPlugin.js';
|
|
8
|
-
import * as numberRendererPlugin from './rendererPlugins/editableWidgets/numberRendererPlugin.js';
|
|
9
|
-
import * as index$6 from './rendererPlugins/editableWidgets/selectRendererPlugin/index.js';
|
|
10
|
-
import * as index$7 from './rendererPlugins/editableWidgets/separateRendererPlugin/index.js';
|
|
11
|
-
import * as timeRendererPlugin from './rendererPlugins/editableWidgets/timeRendererPlugin.js';
|
|
12
|
-
import * as checkRendererPlugin from './rendererPlugins/widgets/checkRendererPlugin.js';
|
|
13
|
-
import * as colorRendererPlugin from './rendererPlugins/widgets/colorRendererPlugin.js';
|
|
14
|
-
import * as defaultRendererPlugin from './rendererPlugins/widgets/defaultRendererPlugin.js';
|
|
15
|
-
import * as labelRendererPlugin from './rendererPlugins/widgets/labelRendererPlugin.js';
|
|
16
|
-
import * as pictureRendererPlugin from './rendererPlugins/widgets/pictureRendererPlugin.js';
|
|
17
|
-
import * as seqRendererPlugin from './rendererPlugins/widgets/seqRendererPlugin.js';
|
|
18
|
-
import * as index$8 from './rowClickPlugin/index.js';
|
|
19
|
-
import * as index$9 from './rowGroupSettingPlugin/index.js';
|
|
20
|
-
import * as index$a from './virtualTreePlugin/index.js';
|
|
21
|
-
import { separateMetaModule } from '../../../../shared/utils/index.js';
|
|
22
|
-
|
|
23
|
-
const modules = Object.assign({
|
|
24
|
-
"./anchorPlugin/index.tsx": index,
|
|
25
|
-
"./defaultConfigPlugin/index.ts": index$1,
|
|
26
|
-
"./filterPlugin/index.tsx": index$2,
|
|
27
|
-
"./keyboardEventPlugin/index.ts": index$3,
|
|
28
|
-
"./lowCodeFieldAdaptorPlugin/index.tsx": index$4,
|
|
29
|
-
"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx": index$5,
|
|
30
|
-
"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx": inputRendererPlugin,
|
|
31
|
-
"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx": numberRendererPlugin,
|
|
32
|
-
"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx": index$6,
|
|
33
|
-
"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx": index$7,
|
|
34
|
-
"./rendererPlugins/editableWidgets/timeRendererPlugin.tsx": timeRendererPlugin,
|
|
35
|
-
"./rendererPlugins/widgets/checkRendererPlugin.tsx": checkRendererPlugin,
|
|
36
|
-
"./rendererPlugins/widgets/colorRendererPlugin.tsx": colorRendererPlugin,
|
|
37
|
-
"./rendererPlugins/widgets/defaultRendererPlugin.tsx": defaultRendererPlugin,
|
|
38
|
-
"./rendererPlugins/widgets/labelRendererPlugin.tsx": labelRendererPlugin,
|
|
39
|
-
"./rendererPlugins/widgets/pictureRendererPlugin.tsx": pictureRendererPlugin,
|
|
40
|
-
"./rendererPlugins/widgets/seqRendererPlugin.tsx": seqRendererPlugin,
|
|
41
|
-
"./rowClickPlugin/index.ts": index$8,
|
|
42
|
-
"./rowGroupSettingPlugin/index.ts": index$9,
|
|
43
|
-
"./virtualTreePlugin/index.ts": index$a
|
|
44
|
-
});
|
|
45
|
-
var PluginPresets = separateMetaModule(modules);
|
|
46
|
-
|
|
47
|
-
export { PluginPresets as default };
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./filterPlugin/index.js";import*as n from"./keyboardEventPlugin/index.js";import*as d from"./lowCodeFieldAdaptorPlugin/index.js";import*as s from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as t from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as l from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as g from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as u from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as o from"./rendererPlugins/editableWidgets/timeRendererPlugin.js";import*as P from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as a from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as m from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as x from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as p from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as f from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as R from"./rowClickPlugin/index.js";import*as j from"./rowGroupSettingPlugin/index.js";import*as b from"./virtualTreePlugin/index.js";import{separateMetaModule as w}from"../../../../shared/utils/index.js";var c=w(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./filterPlugin/index.tsx":i,"./keyboardEventPlugin/index.ts":n,"./lowCodeFieldAdaptorPlugin/index.tsx":d,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":s,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":t,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":l,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":g,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":u,"./rendererPlugins/editableWidgets/timeRendererPlugin.tsx":o,"./rendererPlugins/widgets/checkRendererPlugin.tsx":P,"./rendererPlugins/widgets/colorRendererPlugin.tsx":a,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":m,"./rendererPlugins/widgets/labelRendererPlugin.tsx":x,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":p,"./rendererPlugins/widgets/seqRendererPlugin.tsx":f,"./rowClickPlugin/index.ts":R,"./rowGroupSettingPlugin/index.ts":j,"./virtualTreePlugin/index.ts":b}));export{c as default};
|
|
@@ -1,30 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { promiseTimeout } from '@vueuse/shared';
|
|
3
|
-
import '../../../index.js';
|
|
4
|
-
import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
|
|
5
|
-
|
|
6
|
-
function keyboardEventPlugin() {
|
|
7
|
-
const pluginName = "keyboardEventPlugin";
|
|
8
|
-
return defineTablePlugin({
|
|
9
|
-
name: pluginName,
|
|
10
|
-
apply(hooks) {
|
|
11
|
-
hooks.eventHooks.onKeydown.tap(pluginName, async ({ $event, $table }, _, { emits }) => {
|
|
12
|
-
await promiseTimeout(0);
|
|
13
|
-
const { row, column } = $table.getSelectedCell() || $table.getEditRecord() || {};
|
|
14
|
-
if (!row || !column)
|
|
15
|
-
return;
|
|
16
|
-
const key = $event.key;
|
|
17
|
-
!targetStringIncludes(["Arrow", "Escape", "Control", "Shift", "Alt", "Meta"], key) && await $table.setEditCell(row, column);
|
|
18
|
-
emits("keyboard", {
|
|
19
|
-
key,
|
|
20
|
-
index: $table.getRowIndex(row),
|
|
21
|
-
value: row[column.field],
|
|
22
|
-
row,
|
|
23
|
-
column
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { keyboardEventPlugin };
|
|
1
|
+
import{targetStringIncludes as e}from"../../../../../shared/utils/index.js";import{promiseTimeout as t}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function n(){const n="keyboardEventPlugin";return o({name:n,apply(o){o.eventHooks.onKeydown.tap(n,(async({$event:o,$table:n},r,{emits:i})=>{await t(0);const{row:a,column:l}=n.getSelectedCell()||n.getEditRecord()||{};if(!a||!l)return;const s=o.key;!e(["Arrow","Escape","Control","Shift","Alt","Meta"],s)&&await n.setEditCell(a,l),i("keyboard",{key:s,index:n.getRowIndex(a),value:a[l.field],row:a,column:l})}))}})}export{n as keyboardEventPlugin};
|