cnhis-design-vue 3.1.42-beta.7 → 3.1.42-beta.72
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/README.md +87 -87
- package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
- package/es/components/base-search/index.d.ts +2 -2
- package/es/components/base-search/src/index.vue.d.ts +2 -2
- package/es/components/base-search/style/index.css +1 -1
- package/es/components/big-table/index.d.ts +3 -4
- package/es/components/big-table/src/BigTable.vue.d.ts +3 -4
- package/es/components/big-table/src/BigTable.vue2.js +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select-table.d.ts +1 -1
- package/es/components/big-table/src/components/edit-form/edit-select.js +1 -1
- package/es/components/big-table/src/hooks/useEvent.js +1 -1
- package/es/components/big-table/src/hooks/useFormat.js +1 -1
- package/es/components/big-table/src/hooks/useNestTable.js +1 -1
- package/es/components/big-table/src/hooks/useTableParse.js +1 -1
- package/es/components/big-table/src/utils.d.ts +11 -1
- package/es/components/big-table/src/utils.js +1 -1
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/bpmn-workflow/index.d.ts +12 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.d.ts +12 -0
- package/es/components/bpmn-workflow/src/BpmnWorkflow.vue.js +1 -1
- package/es/components/button-print/index.d.ts +32 -7
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +32 -8
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/EditFormat.vue.d.ts +4 -4
- package/es/components/button-print/src/components/IdentityVerification.vue.d.ts +4 -4
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/classification/index.d.ts +1 -1
- package/es/components/classification/src/index.vue.d.ts +2 -2
- package/es/components/classification/style/index.css +1 -1
- package/es/components/config-provider/src/ConfigProvider.js +1 -1
- package/es/components/config-provider/src/interface.d.ts +4 -4
- package/es/components/date-picker/index.d.ts +4 -0
- package/es/components/date-picker/src/DatePicker.vue.d.ts +4 -0
- package/es/components/date-picker/src/DatePicker.vue.js +1 -1
- package/es/components/fabric-chart/index.d.ts +2 -2
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +2 -2
- package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +16 -0
- package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -0
- package/es/components/field-set/index.d.ts +26 -81
- package/es/components/field-set/src/FieldSet.vue.d.ts +28 -32
- package/es/components/field-set/src/FieldSet.vue.js +1 -1
- package/es/components/field-set/style/index.css +1 -1
- package/es/components/form-config/index.d.ts +83 -42
- package/es/components/form-config/src/FormConfig.vue.d.ts +83 -42
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +27 -13
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +44 -23
- package/es/components/form-config/src/components/FormConfigEdit.vue.js +1 -1
- package/es/components/form-config/src/components/renderer/DefaultNode.vue.js +1 -1
- package/es/components/form-config/src/constants/index.d.ts +19 -1
- package/es/components/form-config/src/constants/index.js +1 -1
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +27 -13
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +27 -13
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +27 -13
- package/es/components/form-render/src/components/renderer/combination.js +1 -1
- package/es/components/form-render/src/components/renderer/complex.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +4 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +1 -1
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +38 -2
- package/es/components/form-render/src/components/renderer/radio_checkbox.js +1 -1
- package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +18 -0
- package/es/components/form-render/src/components/renderer/remoteSearch.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.d.ts +36 -0
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +32 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/index.d.ts +1 -1
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -0
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
- package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +16 -0
- package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -0
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +13 -8
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +11 -5
- package/es/components/form-render/src/types/index.d.ts +4 -3
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +24 -5
- package/es/components/iho-table/src/IhoTable.vue.d.ts +24 -5
- package/es/components/iho-table/src/IhoTable.vue.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +3 -2
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -4
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +22 -21
- package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +60 -237
- package/es/components/iho-table/src/hooks/tapHooks/useExposeHooks.d.ts +1 -4
- package/es/components/iho-table/src/hooks/tapHooks/useFieldHooks.d.ts +4 -16
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.d.ts +2 -2
- package/es/components/iho-table/src/hooks/tapHooks/useSetupHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/iho-table/src/plugins/anchorPlugin/useAnchor.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +48 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.js +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.d.ts +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/filter.vue.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/maxCheckSizePlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/maxCheckSizePlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +4 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +25 -3
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.d.ts +2 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/seqRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowDragPlugin/index.js +1 -0
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +28 -5
- package/es/components/iho-table/src/types/pluginType.d.ts +12 -22
- package/es/components/iho-table/src/utils/index.d.ts +8 -3
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/iconfont.ttf +0 -0
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +56 -27
- package/es/components/info-header/src/InfoHeader.vue.d.ts +56 -27
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +27 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +28 -13
- package/es/components/info-header/src/components/patientInfo/index.vue.js +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
- package/es/components/keyboard/src/Keyboard.vue.js +1 -1
- package/es/components/keyboard/src/constants/index.js +1 -1
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/map/index.d.ts +2 -14
- package/es/components/map/src/Map.vue.d.ts +1 -14
- package/es/components/map/src/types/index.d.ts +19 -0
- package/es/components/map/src/types/index.js +1 -0
- package/es/components/recommend-search/index.d.ts +13 -128
- package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +15 -130
- package/es/components/recommend-search/src/RecommendSearch.vue.js +1 -1
- package/es/components/recommend-search/src/components/BaseSearch.d.ts +84 -0
- package/es/components/recommend-search/src/components/BaseSearch.js +1 -0
- package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +3 -63
- package/es/components/recommend-search/src/components/RecommendInput.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendMenu.vue.d.ts +1 -3
- package/es/components/recommend-search/src/components/RecommendMenu.vue.js +1 -1
- package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +4 -62
- package/es/components/recommend-search/src/components/RecommendSelect.vue.js +1 -1
- package/es/components/recommend-search/src/constant/index.d.ts +3 -0
- package/es/components/recommend-search/src/constant/index.js +1 -1
- package/es/components/scale-view/index.d.ts +38 -224
- package/es/components/scale-view/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +37 -224
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/scale-view/src/components/AnswerParse.vue.d.ts +1 -43
- package/es/components/scale-view/src/components/AnswerParse.vue.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +0 -42
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-checkbox.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-map.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-sign.js +1 -1
- package/es/components/scale-view/src/components/formitem/standard-modal.d.ts +8 -8
- package/es/components/scale-view/src/components/formitem/standard-modal.js +1 -1
- package/es/components/scale-view/src/components/formitem/text-over-tooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.d.ts +5 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-validate.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +74 -4
- package/es/components/scale-view/src/hooks/use-evaluate.js +1 -1
- package/es/components/scale-view/src/hooks/use-event.js +1 -1
- package/es/components/scale-view/src/types/index.d.ts +7 -0
- package/es/components/scale-view/src/types/index.js +1 -0
- package/es/components/scale-view/style/index.css +1 -1
- package/es/components/scale-view/style/scale-view-iconfont.ttf +0 -0
- package/es/components/search-cascader/index.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.d.ts +12 -1
- package/es/components/search-cascader/src/SearchCascader.vue.js +1 -1
- package/es/components/search-cascader/src/components/SearchMenu.d.ts +8 -1
- package/es/components/search-cascader/src/components/SearchMenu.js +1 -1
- package/es/components/search-cascader/src/constants/index.d.ts +1 -0
- package/es/components/search-cascader/src/constants/index.js +1 -1
- package/es/components/select-label/index.d.ts +1 -1
- package/es/components/select-label/src/LabelFormContent.vue.js +1 -1
- package/es/components/select-label/src/SelectLabel.vue.d.ts +1 -1
- package/es/components/select-label/src/SelectLabel.vue2.js +1 -1
- package/es/components/select-label/style/index.css +1 -1
- package/es/components/select-person/index.d.ts +199 -10
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +131 -0
- package/es/components/select-person/src/SearchMultiple.vue.js +1 -0
- package/es/components/select-person/src/SearchMultiple.vue2.js +1 -0
- package/es/components/select-person/src/SelectPerson.vue.d.ts +186 -9
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/src/utils/index.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +32 -16
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +32 -16
- package/es/components/steps-wheel/src/StepsWheel.vue.js +1 -1
- package/es/components/steps-wheel/src/constants/index.js +1 -1
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/components/table-filter/src/components/render-widget/components/CheckboxGroup.vue.d.ts +1 -1
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +1 -1
- package/es/components/table-filter/src/types/index.d.ts +11 -2
- package/es/components/time-picker/src/TimePicker.vue.js +1 -1
- package/es/components/vod-chunk-upload/index.d.ts +73 -3
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.d.ts +73 -3
- package/es/components/vod-chunk-upload/src/vod-chunk-upload/vod-chunk-upload.vue.js +1 -1
- package/es/env.d.ts +25 -24
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.d.ts +1 -1
- package/es/shared/components/TextOverTooltip/TextOverTooltip.vue.js +1 -1
- package/es/shared/{mixins → hooks}/index.d.ts +1 -0
- package/es/shared/{mixins → hooks}/index.js +1 -1
- package/es/{components/form-render/src → shared}/hooks/useAsyncQueue.d.ts +0 -14
- package/es/shared/hooks/useAsyncQueue.js +1 -0
- package/es/shared/{mixins → hooks}/useDateTime.d.ts +2 -2
- package/es/shared/hooks/useDateTime.js +1 -0
- package/es/shared/package.json.js +1 -0
- package/es/shared/utils/anime.d.ts +1 -1
- package/es/shared/utils/anime.js +1 -1
- package/es/shared/utils/index.d.ts +3 -14
- package/es/shared/utils/index.js +1 -1
- package/es/shared/utils/vexutils.d.ts +2 -2
- package/es/shared/utils/vexutils.js +1 -1
- package/es/shared/utils/vexutilsExpand.d.ts +254 -0
- package/es/shared/utils/vexutilsExpand.js +1 -0
- package/package.json +65 -65
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
- package/es/components/recommend-search/src/components/BaseSearch.vue.d.ts +0 -143
- package/es/components/recommend-search/src/components/BaseSearch.vue.js +0 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +0 -115
- package/es/components/scale-view/src/hooks/scaleview-props.js +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/mixins/useDateTime.js +0 -1
- package/es/shared/utils/colorLog.d.ts +0 -31
- package/es/shared/utils/colorLog.js +0 -1
- package/es/shared/utils/tapable/index.d.ts +0 -139
- /package/es/components/base-search/style/{iconfont.ttf → base-search-iconfont.ttf} +0 -0
- /package/es/components/classification/style/{iconfont.ttf → classification-iconfont.ttf} +0 -0
- /package/es/components/info-header/style/{iconfont.ttf → info-header-font.ttf} +0 -0
- /package/es/components/select-label/style/{iconfont.ttf → select-label-iconfont.ttf} +0 -0
- /package/es/shared/{mixins → hooks}/useTheme.d.ts +0 -0
- /package/es/shared/{mixins → hooks}/useTheme.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({
|
|
1
|
+
import{mergeWith as e,isObject as o}from"lodash-es";import{HIGHEST_PRIORITY as i}from"../../constants/index.js";import{defineTablePlugin as t}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as s}from"../../utils/index.js";function n(){const n="defaultTablePlugin";return t({name:n,vxe(e){e.setup({zIndex:3e3})},apply(t){t.configHooks.config.tap({name:n,stage:i},(o=>{const i=e({border:!0,showSeq:!0,columnConfig:{resizable:!0},rowConfig:{height:36,useKey:!0,isHover:!0,isCurrent:!0,keyField:"theUniqueKey"},showOverflow:"tooltip",editConfig:{trigger:"click",mode:"cell"}},o,{height:o.height?"auto":void 0});return(s.isPositive(o.isBatchSelect)||o.selectType)&&(i.selectType=o.selectType||"checkbox"),i})),t.configHooks.mouseConfig.tap({name:n,stage:i},((e,i)=>o(i.keyboardConfig)?Object.assign({selected:!!i.keyboardConfig.isEdit},e):e))}})}export{n as defaultConfigPlugin};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { VxeColumnPropTypes } from 'vxe-table';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
payload: {
|
|
5
|
+
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}, {
|
|
9
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
10
|
+
payload: {
|
|
11
|
+
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & {}>>;
|
|
15
|
+
optionRef: {
|
|
16
|
+
label: string | number;
|
|
17
|
+
value: any;
|
|
18
|
+
data: any;
|
|
19
|
+
resetValue: any;
|
|
20
|
+
checked: boolean;
|
|
21
|
+
_checked: boolean;
|
|
22
|
+
};
|
|
23
|
+
shortcuts: {
|
|
24
|
+
近一周: () => number[];
|
|
25
|
+
近一个月: () => number[];
|
|
26
|
+
};
|
|
27
|
+
onConfirm: (value: [number, number], formattedValue: [string, string] | null) => void;
|
|
28
|
+
CDatePicker: import("../../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
|
|
29
|
+
attrs: {
|
|
30
|
+
[x: string]: unknown;
|
|
31
|
+
};
|
|
32
|
+
datePickerRef: import("vue").Ref<import("../../../../../shared/types").AnyObject | null>;
|
|
33
|
+
panelInstRef: import("vue").Ref<null>;
|
|
34
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
35
|
+
formatRef: import("vue").ComputedRef<string>;
|
|
36
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
37
|
+
focus: () => any;
|
|
38
|
+
blur: () => any;
|
|
39
|
+
onUpdateShow: (show: boolean) => void;
|
|
40
|
+
NDatePicker: any;
|
|
41
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
42
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
|
+
payload: {
|
|
44
|
+
type: PropType<VxeColumnPropTypes.FilterSlotParams>;
|
|
45
|
+
required: true;
|
|
46
|
+
};
|
|
47
|
+
}>>, {}>;
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as e,reactive as t,openBlock as a,createBlock as l,unref as o}from"vue";import r from"../../../../date-picker/index.js";import{subDays as n,subMonths as i}from"date-fns";import p from"../../../../../_virtual/plugin-vue_export-helper.js";var u=p(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){var p,u,d;const m=e,v=t((null==(d=null==(u=null==(p=m.payload)?void 0:p.column)?void 0:u.filters)?void 0:d[0])||{data:void 0}),f=t({"近一周":()=>[n(new Date,7).getTime(),(new Date).getTime()],"近一个月":()=>[i(new Date,1).getTime(),(new Date).getTime()]});function s(e,t){var a;v.value=t,(null==(a=m.payload)?void 0:a.$panel)&&(m.payload.$panel.changeOption(null,!!t,v),m.payload.$panel.confirmFilter(new CustomEvent("click")))}return(e,t)=>(a(),l(o(r),{type:"datetimerange",panel:"",clearable:"","formatted-value":v.data,"onUpdate:formatted-value":t[0]||(t[0]=e=>v.data=e),shortcuts:f,onConfirm:s},null,8,["formatted-value","shortcuts"]))}}),[["__file","filter.vue"]]);export{u as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function filterDaterangeRenderPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createVNode as e}from"vue";import"../../../index.js";import t from"./filter.vue.js";import{isValid as i,compareDesc as r}from"date-fns";import{isObject as n,isArray as o}from"@vue/shared";import{defineTablePlugin as l}from"../../hooks/useTablePlugin.js";function a(){const a="filterDaterangeRenderPlugin";return l({name:a,vxe(i){i.renderer.mixin({filterDaterangeRenderPlugin:{showFilterFooter:!1,renderFilter:(i,r)=>e(t,{payload:r,key:r.column.field},null)}})},apply(e){e.fieldHooks.field.tap(a,((e,t,l,{$table:a})=>{var f,d,s,u;const c=null==(f=e.editRender)?void 0:f.props;if(!n(c))return e;if(!(null==(d=null==c?void 0:c.filterSetting)?void 0:d.daterange))return e;e.filterRender={name:"filterDaterangeRenderPlugin"};const m=null==(s=a.value)?void 0:s.getColumnByField(e.field),h={};return m&&o(m.filters)&&Object.assign(h,{...(null==(u=m.filters)?void 0:u[0])||{}}),e.filters=[{data:void 0,...h}],e.filterMethod||(e.filterMethod=function({option:e,row:t,column:n}){const{data:o}=e,l=t[n.field];return!!i(new Date(l))&&(r(new Date(l),new Date(o[0]))<=0&&r(new Date(l),new Date(o[1]))>=0)}),e.sortable?e.headerClassName=({$table:e,column:t})=>{const i=["iho-table__hideSortIcon"];return e.isSort(t)&&i.push("is--filter-active"),i}:e.headerClassName="iho-table__hideSortIcon",l.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...l.filterConfig},e}))}})}export{a as filterDaterangeRenderPlugin};
|
|
@@ -21,7 +21,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
21
|
searchFilterText: import("vue").Ref<string>;
|
|
22
22
|
close: () => void;
|
|
23
23
|
OPTION_ITEM_HEIGHT: number;
|
|
24
|
-
|
|
24
|
+
viewCapacity: import("vue").ComputedRef<number>;
|
|
25
25
|
list: import("vue").Ref<import("@vueuse/core").UseVirtualListItem<VxeTableDefines.FilterOption>[]>;
|
|
26
26
|
containerProps: {
|
|
27
27
|
ref: import("vue").Ref<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as t,ref as a,onDeactivated as o,openBlock as u,createElementBlock as n,unref as r,Fragment as i,renderList as s,createElementVNode as v,normalizeClass as c,createBlock as d,createCommentVNode as p,createTextVNode as f,toDisplayString as m,createVNode as h,isRef as _,withCtx as y,normalizeStyle as g}from"vue";import{widthAppend as b}from"../../../../../shared/utils/index.js";import{CheckmarkOutline as k}from"@vicons/ionicons5";import{useVirtualList as C}from"@vueuse/core";import{isNumber as x}from"lodash-es";import{NInput as S,NCheckbox as $,NCheckboxGroup as E,NButtonGroup as j,NButton as w}from"naive-ui";import A from"../../../../../_virtual/plugin-vue_export-helper.js";const I={class:"iho-table__filterWrapper"},L={key:0},U=["onClick"],B={class:"iho-table__filterListItem"},F={class:"iho-table__filterFooter"};var O=A(e({__name:"filter",props:{payload:{type:Object,required:!0}},setup(e){const A=e,O=l((()=>{var e,l,t;return null==(t=null==(l=null==(e=A.payload)?void 0:e.column.editRender)?void 0:l.props)?void 0:t.sortable})),P=l((()=>{var e,l,t;return null!=(t=null==(l=null==(e=A.payload)?void 0:e.column)?void 0:l.filters)?t:[]})),R=l({get:()=>P.value.reduce(((e,l)=>(l.checked&&e.push(l.value),e)),[]),set(e){if(A.payload)return P.value.forEach((l=>{A.payload.$panel.changeOption(null,e.includes(l.value),l)})),A.payload.$panel.confirmFilter(new CustomEvent("click"))}}),W=t("$xetable"),Z=l({get(){if(!W)return null;const e=W.getSortColumns().find((e=>{var l;return e.column===(null==(l=A.payload)?void 0:l.column)}));return e?e.order:null},set(e){W&&A.payload&&A.payload.$panel&&W.triggerSortEvent(new CustomEvent("click"),A.payload.column,e)}}),q=a([...R.value]),z=a("");function D(){W&&(W.reactData.filterStore.visible=!1)}o(D);const H=l((()=>{var e,l;if(!A.payload||!A.payload.column)return 10;const{filterCapacity:t}=null!=(l=null==(e=A.payload.column.editRender)?void 0:e.props)?l:{};return x(t)&&t>0?t:10})),{list:G,containerProps:J,wrapperProps:K}=C(l((()=>z.value?P.value.filter((e=>`${e.label}`.includes(z.value))):P.value)),{itemHeight:32,overscan:3}),M=l((()=>!!q.value.length&&q.value.length!==P.value.length)),N=l({get:()=>q.value.length===P.value.length&&0!==P.value.length,set:e=>{q.value=e?P.value.map((e=>e.value)):[]}}),Q=l((()=>({...J.style,height:b(32*H.value)})));function T(){R.value=q.value,D()}function V(){q.value=[]}const X=[{status:"asc",text:"升序 A to Z"},{status:"desc",text:"降序 Z to A"}];return(e,l)=>(u(),n("section",I,[r(O)?(u(),n("div",L,[(u(),n(i,null,s(X,(e=>v("div",{key:e.status,class:c(["iho-table__filterButton",{"iho-table__filterButton--active":r(Z)===e.status}]),onClick:l=>{return t=e.status,Z.value=t,void D();var t}},[r(Z)===e.status?(u(),d(r(k),{key:0,class:"iho-table__sortActiveIcon"})):p("v-if",!0),f(" "+m(e.text),1)],10,U))),64))])):p("v-if",!0),r(P).length>5?(u(),d(r(S),{key:1,value:z.value,"onUpdate:value":l[0]||(l[0]=e=>z.value=e)},null,8,["value"])):p("v-if",!0),v("div",B,[h(r($),{label:"全选",checked:r(N),"onUpdate:checked":l[1]||(l[1]=e=>_(N)?N.value=e:null),indeterminate:r(M)},null,8,["checked","indeterminate"])]),h(r(E),{value:q.value,"onUpdate:value":l[3]||(l[3]=e=>q.value=e)},{default:y((()=>[v("section",{ref:r(J).ref,style:g(r(Q)),onScroll:l[2]||(l[2]=(...e)=>r(J).onScroll&&r(J).onScroll(...e)),class:"iho-table__filterListWrapper"},[v("section",{style:g(r(K).style)},[(u(!0),n(i,null,s(r(G),(e=>(u(),n("div",{class:"iho-table__filterListItem",key:e.data.value},[h(r($),{value:e.data.value,label:e.data.label},null,8,["value","label"])])))),128))],4)],36)])),_:1},8,["value"]),v("footer",F,[v("section",null,m(`已选择${q.value.length}项`),1),h(r(j),{size:"small"},{default:y((()=>[h(r(w),{onClick:V},{default:y((()=>[f("清空")])),_:1}),h(r(w),{onClick:D},{default:y((()=>[f("取消")])),_:1}),h(r(w),{type:"primary",onClick:T},{default:y((()=>[f("确定")])),_:1})])),_:1})])]))}}),[["__file","filter.vue"]]);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as e,nextTick as
|
|
1
|
+
import{createVNode as e,nextTick as l}from"vue";import{jsonParse as r,traverse as t,arrayed as i}from"../../../../../shared/utils/index.js";import{isObject as o}from"@vue/shared";import{isArray as n,first as s,isString as u}from"lodash-es";import"../../../index.js";import{IhoTableRenderHelper as a,isCompatibleColumn as d,parseRichContent as f}from"../../utils/index.js";import c from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function v(){const v="filterRenderPlugin";return p({name:v,vxe(l){l.renderer.mixin({filterRenderPlugin:{showFilterFooter:!1,renderFilter:(l,r)=>e(c,{payload:r,key:r.column.field},null)}})},apply(e){let c=[];e.fieldHooks.field.tap(v,((e,l,t,{$table:i})=>{var c,p,v,h,m,b,g,k;const C=null==(c=e.editRender)?void 0:c.props;if(!o(C))return e;const R=r(C.fieldSetting||"");if(!a.hasFilter(C))return e;e.editRender={...e.editRender,props:{...null==(p=e.editRender)?void 0:p.props,sortable:e.sortable}},e.filterRender={name:"filterRenderPlugin"};const x=null==(v=i.value)?void 0:v.getColumnByField(e.field),y={};x&&n(x.filters)&&x.filters.forEach((e=>{e&&(y[`${e.label}_${e.value}`]=e.checked)}));let F=null!=(b=null==(m=null==(h=R.mapping)?void 0:h.mappingFiled)?void 0:m.reduce(((e,l)=>{const r=s(l.value);return o(r)&&e.push({label:r.key,value:r.value,data:r.value}),e}),[]))?b:[];if(d(C)&&(F=null!=(g=C.options)?g:[]),e.filters=F.reduce(((e,l)=>(o(l)&&e.push({...l,checked:!!y[`${l.label}_${l.value}`]}),e)),[]),!e.filterMethod){const l=null==(k=t.treeConfig)?void 0:k.children;e.filterMethod=function({option:e,column:r,row:t}){if(l&&n(t[l])&&t[l].length)return!1;const i=t[r.field];if(!u(i))return!1;if(i===e.value||i===e.label)return!0;const{value:o,change_text:s}=f(i);return s===e.label||o===e.value}}return e.sortable?e.headerClassName=({$table:e,column:l})=>{const r=["iho-table__hideSortIcon"];return e.isSort(l)&&r.push("is--filter-active"),r}:e.headerClassName="iho-table__hideSortIcon",t.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...t.filterConfig},e})),e.fieldHooks.fieldList.tap(v,(e=>c=e)),e.fieldHooks.fieldEnd.tapPromise(v,(async(e,{$table:r})=>{var i;try{if(await l(),!r.value)return;const n=null!=(i=r.value.getColumns())?i:[],s=[];if(t(c,(e=>{n.find((l=>l.field===e.field))||s.push(e)})),!s.length)return;setTimeout((()=>{var l,t;if(null==(l=e.sortConfig)?void 0:l.multiple){const e=null!=(t=r.value.getColumns())?t:[],l=s.concat(e).reduce(((e,l)=>{var r;const t=null==(r=l.editRender)?void 0:r.props;return o(t)&&h(t.isOrder)&&e.push({field:l.field,order:t.isOrder}),e}),[]);r.value.sort(l)}else s.reverse().some((e=>{var l;const t=null==(l=e.editRender)?void 0:l.props;if(o(t)&&h(t.isOrder))return e&&r.value.sort(e.field,t.isOrder),!0}))}),100)}finally{c=[]}})),e.exposeHooks.expose.tap(v,((e,l,{$table:r})=>(Object.assign(e,{setSort(e,l){r.value&&r.value.sort(e,l)},setFilter(e,l){if(!r.value)return;const t=r.value.getColumnByField(e);if(!t||!n(t.filters))return;const o=i(l);t.filters.forEach((e=>{e.checked=o.includes(e.value)})),r.value.updateData()}}),e)))}})}function h(e){return["asc","desc",null].includes(e)}export{v as filterRenderPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function highLightSetPlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hex2rgba as o}from"../../../../shared/utils/index.js";import{isFunction as r,isString as t,isObject as n}from"lodash-es";import"../../index.js";import{useUUIDMap as e}from"../utils/index.js";import{defineTablePlugin as s}from"../hooks/useTablePlugin.js";function u(){const u="highLightSetPlugin",{getItemFromUUID:i,removeItemFromUUID:l,setItemFromUUID:a}=e((()=>!1));return s({name:u,apply(e){e.dataHooks.data.tapPromise(u,(async(o,r)=>{r.uuid&&(o.rowColor||o.fontColor)&&a(r.uuid,!0)})),e.dataHooks.dataEnd.tap(u,(e=>{if(!e.uuid||!i(e.uuid))return;const s=e.rowStyle;e.rowStyle=function(t){if(t.row.rowColor||t.row.fontColor){const[n,e,u,i]=o(t.row.rowColor||"",.2),l={"--row-background-color":`rgba(${n}, ${e}, ${u}, ${i})`,color:t.row.fontColor};return r(s)?Object.assign(l,s(t)):l}return r(s)?s(t):null};const u=e.rowClassName;e.rowClassName=function(o){if(o.row.rowColor){const e="row--custom";if(t(u))return`${e} ${u}`;if(r(u)){const r=u(o);return n(r)?Object.assign({"row--custom":!0},r):t(r)?`${e} ${r}`:null}return e}return r(u)?u(o):t(u)?u:null},l(e.uuid)}))}})}export{u as highLightSetPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./filterDaterangeRenderPlugin/index.js";import*as n from"./filterRenderPlugin/index.js";import*as d from"./highLightSetPlugin.js";import*as s from"./keyboardEventPlugin/index.js";import*as t from"./lowCodeFieldAdaptorPlugin/index.js";import*as l from"./maxCheckSizePlugin.js";import*as g from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as u from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as o from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as a from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as m from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as x from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as f from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as p from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as R from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as j from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as b from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as w from"./rowClickPlugin/index.js";import*as c from"./rowDragPlugin/index.js";import*as h from"./rowGroupSettingPlugin/index.js";import*as W from"./varialbleHeightPlugin/index.js";import*as k from"./virtualTreePlugin/index.js";import{separateMetaModule as C}from"../../../../shared/utils/index.js";var v=C(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./filterDaterangeRenderPlugin/index.tsx":i,"./filterRenderPlugin/index.tsx":n,"./highLightSetPlugin.tsx":d,"./keyboardEventPlugin/index.ts":s,"./lowCodeFieldAdaptorPlugin/index.tsx":t,"./maxCheckSizePlugin.ts":l,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":g,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":u,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":o,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":a,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":P,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":m,"./rendererPlugins/widgets/checkRendererPlugin.tsx":x,"./rendererPlugins/widgets/colorRendererPlugin.tsx":f,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":p,"./rendererPlugins/widgets/labelRendererPlugin.tsx":R,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":j,"./rendererPlugins/widgets/seqRendererPlugin.tsx":b,"./rowClickPlugin/index.ts":w,"./rowDragPlugin/index.ts":c,"./rowGroupSettingPlugin/index.ts":h,"./varialbleHeightPlugin/index.tsx":W,"./virtualTreePlugin/index.ts":k}));export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e,h as t,inject as
|
|
1
|
+
import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as d,cloneDeep as a,isString as r}from"lodash-es";import{NEllipsis as u}from"naive-ui";import f from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as m,IHO_TABLE_FIXED_STATUS as c,LOWEST_PRIORITY as p,WIDGET_TYPE as h,InjectionIhoTableAnnotation as v,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as g}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as R,IhoTableUtils as j,IhoTableRenderHelper as x}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function F(){const F="lowCodeFieldAdaptorPlugin";return g({name:F,apply(g){g.fieldHooks.field.tap({name:F,stage:m},((m,p,g)=>{const F=m,S={className:F.bold?"iho-table__boldCell":"",field:F.columnName,showOverflow:"tooltip",visible:R.notNegative(F.isShow),minWidth:F.colWidth,sortable:R.isPositive(F.isSort),fixed:c[F.isFixed],...F,title:F.alias||F.title};return function(e,a){const m={default:a.slotFn,header:a.headerSlotFn,edit:a.editSlotFn,footer:a.footerSlotFn,...a.slots};if(d(a.checkEditStatus)){const{default:e}=m;d(e)&&(m.default=l=>a.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const c=m.header;m.header=e=>function(e,t,a){const m=l(v),c=l(b),p=e.column||{},h=n(null==m?void 0:m.value)&&!1!==t.annotation,g=x.isEditableColumn(c.value,p),R=p.sortable||x.hasFilter(t)||x.hasDateFiler(t),j=r(a)?a:d(a)?a(e):null;let P=!1;if(c.value){const e=c.value.editRules&&c.value.editRules[p.field];e&&(P=o(e).some((e=>e.required)))}return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:s(Math.max(0,p.renderWidth-20-(P?14:0)-(h?18:0)-(R?23:0)-(g?22:0)))}},[null!=j?j:i(u,{style:{maxWidth:"100%"}},{default:()=>p.title})]),h?i(f,{modelValue:m.value[p.field],"onUpdate:modelValue":e=>m.value[p.field]=e},null):null])}(e,a,c),e.slots=m}(S,F),function(t,l,i){var o,s;const r=a(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={autofocus:"input",name:j.getCellType(l),props:r},t.editRender.enabled=!Reflect.get(h,t.editRender.name),d(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&d(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&R.notPositive(l.settingObj.isHide))}(S,F,g),S})),g.fieldHooks.field.tap({name:F+"After",stage:p},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{F as lowCodeFieldAdaptorPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function maxCheckSizePlugin(): import("../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNumber as e,isFunction as o}from"lodash-es";import"../../index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function t(){const t="maxCheckSizePlugin";return n({name:t,apply(n){n.configHooks.checkboxConfig.tap(t,((n,t,{$table:r})=>{if(n&&e(n.maxCheckSize)){const e=n.checkMethod,t=({row:e})=>{if(!r.value)return!0;const o=r.value.getCheckboxRecords()||[];return o.length<n.maxCheckSize||o.includes(e)};n.checkMethod=o(e)?function(o){return t(o)&&e(o)}:t,n.showHeader=!1}return n}))}})}export{t as maxCheckSizePlugin};
|
|
@@ -71,9 +71,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
71
|
[x: string]: unknown;
|
|
72
72
|
};
|
|
73
73
|
datePickerRef: import("vue").Ref<AnyObject | null>;
|
|
74
|
+
panelInstRef: import("vue").Ref<null>;
|
|
75
|
+
isDateTime: import("vue").ComputedRef<boolean>;
|
|
74
76
|
formatRef: import("vue").ComputedRef<string>;
|
|
77
|
+
panelFormatRef: import("vue").ComputedRef<string | [string, string]>;
|
|
75
78
|
focus: () => any;
|
|
76
79
|
blur: () => any;
|
|
80
|
+
onUpdateShow: (show: boolean) => void;
|
|
77
81
|
NDatePicker: any;
|
|
78
82
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>>;
|
|
79
83
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { VxeTableDefines } from 'vxe-table';
|
|
3
3
|
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
4
|
+
import { IhoTableLowCodeField } from '../../../../../../../../es/components/iho-table';
|
|
4
5
|
declare const _default: import("vue").DefineComponent<{
|
|
5
6
|
value: {
|
|
6
7
|
type: PropType<string | number | (string | number)[]>;
|
|
7
|
-
default: undefined;
|
|
8
8
|
};
|
|
9
9
|
column: {
|
|
10
10
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -18,10 +18,20 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
18
18
|
type: NumberConstructor;
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
|
+
options: {
|
|
22
|
+
type: PropType<AnyObject[]>;
|
|
23
|
+
default: () => never[];
|
|
24
|
+
};
|
|
25
|
+
queryOptions: {
|
|
26
|
+
type: PropType<IhoTableLowCodeField.QueryOptions>;
|
|
27
|
+
};
|
|
28
|
+
placeholder: {
|
|
29
|
+
type: StringConstructor;
|
|
30
|
+
default: string;
|
|
31
|
+
};
|
|
21
32
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
22
33
|
value: {
|
|
23
34
|
type: PropType<string | number | (string | number)[]>;
|
|
24
|
-
default: undefined;
|
|
25
35
|
};
|
|
26
36
|
column: {
|
|
27
37
|
type: PropType<VxeTableDefines.ColumnInfo>;
|
|
@@ -35,9 +45,21 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
45
|
type: NumberConstructor;
|
|
36
46
|
required: true;
|
|
37
47
|
};
|
|
48
|
+
options: {
|
|
49
|
+
type: PropType<AnyObject[]>;
|
|
50
|
+
default: () => never[];
|
|
51
|
+
};
|
|
52
|
+
queryOptions: {
|
|
53
|
+
type: PropType<IhoTableLowCodeField.QueryOptions>;
|
|
54
|
+
};
|
|
55
|
+
placeholder: {
|
|
56
|
+
type: StringConstructor;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
38
59
|
}>> & {
|
|
39
60
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
40
61
|
}, {
|
|
41
|
-
|
|
62
|
+
options: AnyObject[];
|
|
63
|
+
placeholder: string;
|
|
42
64
|
}>;
|
|
43
65
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,
|
|
1
|
+
import{defineComponent as e,reactive as o,watch as t,createVNode as r,mergeProps as n}from"vue";import{NSelect as l}from"naive-ui";import{useIhoTableFormEvent as a}from"../../../../utils/index.js";import{useAutoFocus as u}from"../hooks/useAutoFocus.js";import{useDebounceFn as i}from"@vueuse/core";import{isFunction as s,isArray as p,trim as c}from"lodash-es";var d=e({name:"EditSelect",props:{value:{type:[Array,String,Number]},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},options:{type:Array,default:()=>[]},queryOptions:{type:Function},placeholder:{type:String,default:"请选择"}},emits:["update:value"],setup(e,{emit:d}){const{isShow:m,setRef:f,formRef:y}=u(),{emitFormChangeWithParams:h}=a(e),v=o({options:e.options,loading:!1,remote:!1,onSearch:null}),w=i((async function(o=""){v.loading=!0;try{if(!s(e.queryOptions))return;v.options=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}options错误`)}finally{v.loading=!1}}),400);function b(o){const t=e.value;d("update:value",o),h({oldValue:t})}function g(e){var o,t;"Tab"===e.key&&y.value&&(null==(t=(o=y.value).handleKeydown)||t.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}function S(e,o){if(!e||!o)return!1;const t=c(e);if(!t)return!0;const{label:r="",keyword:n=""}=o;return r.includes(t)||n.split(",").some((e=>e.includes(t)))}t((()=>e.options),(e=>{if(p(e)&&e.length)return v.options=e,v.remote=!1,void(v.onSearch=null);v.remote=!0,v.onSearch=w,v.onSearch()}),{immediate:!0});const q=()=>({class:"iho-table__selectOption"}),O={class:"iho-table__selectMenu"};return()=>r(l,n({ref:f,show:m.value,"onUpdate:show":e=>m.value=e,placeholder:e.placeholder},v,{value:e.value,clearable:!0,filterable:!0,filter:S,nodeProps:q,menuProps:O,onUpdateValue:b,onKeydown:g}),null)}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,mergeProps as i,onBeforeUnmount as n}from"vue";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as l,InjectionIhoTableUUID as r}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as s,IhoTableRenderHelper as d,IhoTableUtils as u}from"../../../../utils/index.js";import p from"./editSelect.js";import{getDefaultValue as a}from"./selectUtils.js";import{defineTablePlugin as c}from"../../../../hooks/useTablePlugin.js";function f(){const f="selectRendererPlugin",m=e(new Map),v=e(new Map);return c({name:f,vxe(e){e.interceptor.add("event.clearActived",s(l.SELECT,(e=>e.classList.contains("iho-table__selectMenu")))),e.renderer.add(l.SELECT,{renderCell({props:e},{row:i,column:n}){const l=t(r),s=m.get(l)[n.field]||[];return[o("span",null,[a(i,e,s)])]},renderEdit:d.createRenderEdit((({fieldItem:e,emitFormClick:n,row:l,column:s,$rowIndex:d})=>{const u=t(r),a=m.get(u)[s.field]||[];return[o(p,i({queryOptions:e.queryOptions,options:a},e.componentProps,{column:s,row:l,"row-index":d,value:l[s.field],"onUpdate:value":e=>l[s.field]=e,onClick:n}),null)]}))})},apply(e){e.fieldHooks.fieldList.tap(f,((e,{uuid:t})=>(t&&(v.set(t,e),m.set(t,{})),e))),e.fieldHooks.fieldEnd.tapPromise(f,(async({uuid:e})=>{if(!e)return;const t=v.get(e),o=m.get(e);t.forEach((async e=>{var t,i;const n=null==(t=e.editRender)?void 0:t.props;if(e.field&&n&&"SELECT"===u.getCellType(n)){if(o[e.field])return;let t=n.options||[];if(n.queryOptions)try{const o={column:e,isFullData:!0};t=await(null==(i=n.queryOptions)?void 0:i.call(n,o))}catch(e){console.log(`获取${n.field}_options错误`)}o[e.field]=t}}))})),e.setupHooks.setup.tap(f,(e=>{n((()=>{e.value.uuid&&(v.delete(e.value.uuid),m.delete(e.value.uuid))}))}))}})}export{f as selectRendererPlugin};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { AnyObject } from '../../../../../../../../es/shared/types';
|
|
1
2
|
import { LowCodeTableFieldItem } from '../../../../../../../../es/components/iho-table/src/types';
|
|
2
|
-
export declare function getDefaultValue(row:
|
|
3
|
+
export declare function getDefaultValue(row: AnyObject, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v}from"../../../../utils/index.js";import{isSeparateColumn as
|
|
1
|
+
import{reactive as e,inject as t,createVNode as o,toRaw as n,h as i,onBeforeUnmount as r}from"vue";import{traverse as a}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as s,range as l}from"lodash-es";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as u,InjectionIhoTableUUID as c}from"../../../../constants/index.js";import{createIhoTableClearActivedInterceptor as p,IhoTableRenderHelper as f,getRowHeight as m,getColumnRenderWidth as v,parseMergeField as h}from"../../../../utils/index.js";import{isSeparateColumn as A,contentSeparate as E,getColumnInfoMaxLength as g,generateSeparateRowData as k}from"./separateUtils.js";import x from"./editSeparate.vue.js";import{defineTablePlugin as b}from"../../../../hooks/useTablePlugin.js";function w(){const w="separateRendererPlugins",P=e(new Map);function R(e,t){var o;return null==(o=P.get(e))?void 0:o.get(t)}function T(e,t,o){const n=P.get(e)||new WeakMap;P.set(e,n),n.set(t,o)}const _=e(new Map);return b({name:w,vxe(e){e.interceptor.add("event.clearActived",p(u.SEPARATE,(e=>e.classList.contains("v-binder-follower-content")))),e.renderer.add(u.SEPARATE,{renderCell(e,{column:n,row:i}){const r=R(t(c),i)||{separateData:{}};return o("section",null,[r.separateData[n.field]])},renderEdit:f.createRenderEdit((({fieldItem:e,column:r,row:a,emitFormClick:l})=>{var u,p,f;const v=R(t(c),a),h=m(),A={};let E=null!=(p=null==(u=e.componentProps)?void 0:u.separateSlot)?p:e.separateSlot;return E&&(E=n(E),A.menu=d(E)?E:s(E)?e=>i(E,e):void 0),[o(x,{value:a[r.field],"onUpdate:value":e=>a[r.field]=e,"row-index":null==v?void 0:v.index,height:h,column:r,row:a,"display-content":null==(f=null==v?void 0:v.separateData)?void 0:f[r.field],onClick:l},A)]}))})},apply(e){function t(e){return(...t)=>{var o;return!(null==(o=t[0].row)?void 0:o.$__SEPARATE)&&(!d(e)||e(...t))}}e.fieldHooks.fieldList.tap(w,((e,{uuid:t})=>(t&&_.set(t,e.reduce(((e,t)=>(a(t,(t=>{A(t)&&e.push(n(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(w,(async(e,t,{insertAfter:o,index:n,$table:i})=>{if(!t.uuid)return;const r=_.get(t.uuid);if(!r||!r.length)return;const a=[];for(const t of r){if(!t.field)continue;const o=await v(t,i);a.push({field:t.field,data:E(h(e,t),t,o)})}l(g(a)).forEach(((i,r)=>{const d=k(a,r);if(0===r)return T(t.uuid,e,{index:n,separateData:d}),void(e.$__SEPARATE_DATA=[d]);const s={$__SEPARATE:!0};T(t.uuid,s,{index:n,separateData:d}),e.$__SEPARATE_DATA.push(d),o(s)}))})),e.eventHooks.onResizableChange.tap(w,(async({column:e},t,o)=>{A(e)&&o.updateTableDataRef()})),e.configHooks.editConfig.tap(w,((e={},o)=>(e.beforeEditMethod=t(e.beforeEditMethod),e))),e.configHooks.checkboxConfig.tap(w,((e={},o)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(w,(e=>{r((()=>{e.value.uuid&&(P.delete(e.value.uuid),_.delete(e.value.uuid))}))}))}})}export{w as separateRendererPlugins};
|
|
@@ -45,6 +45,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
45
45
|
emit: (event: "click" | "update:formattedValue", ...args: any[]) => void;
|
|
46
46
|
formRef: import("vue").Ref<HTMLElement | null>;
|
|
47
47
|
isShow: import("vue").Ref<boolean>;
|
|
48
|
+
timePickerRef: import("vue").Ref<any>;
|
|
48
49
|
__formattedValue: import("vue").Ref<string | undefined>;
|
|
49
50
|
oldValue: string | undefined;
|
|
50
51
|
placeholder: any;
|
|
@@ -54,7 +55,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
55
|
clickShortcutOption: (item: string) => void;
|
|
55
56
|
onUpdateFormattedValue: (value: string) => void;
|
|
56
57
|
onBlur: () => void;
|
|
57
|
-
onKeyUp: (event:
|
|
58
|
+
onKeyUp: (event: KeyboardEvent) => void;
|
|
58
59
|
NInput: any;
|
|
59
60
|
NPopover: any;
|
|
60
61
|
NSpace: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as l,watch as a,nextTick as o,openBlock as r,createBlock as u,unref as i,mergeProps as n,withCtx as m,createVNode as f,isRef as d,createElementBlock as c,Fragment as v,renderList as s,createTextVNode as p,toDisplayString as _,createCommentVNode as k}from"vue";import{NPopover as h,NInput as y,NSpace as w,NScrollbar as V,NButton as b}from"naive-ui";import{useIhoTableFormEvent as g}from"../../../../utils/index.js";import{useAutoFocus as j}from"../hooks/useAutoFocus.js";import C from"../../../../../../time-picker/index.js";import{parse as F,isValid as q,format as x}from"date-fns";import R from"../../../../../../../_virtual/plugin-vue_export-helper.js";var S=R(e({__name:"editTime",props:{formattedValue:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:formattedValue","click"],setup(e,{emit:R}){const S=e,A=t(),{emitFormChangeWithParams:I}=g(S),{formRef:O,isShow:P}=j(),$=l(),E=l(S.formattedValue);let H=S.formattedValue;const{placeholder:T="请选择",valueFormat:U="HH:mm",shortcutOptions:z=[]}=A,B={placeholder:T,valueFormat:U,format:U};function D(e){E.value=e,H!==e&&(R("update:formattedValue",e),I({oldValue:H}),H=e)}function K(){const e=F(S.formattedValue||"",B.valueFormat.replace(/:/,""),new Date);if(q(e)){D(x(e,B.valueFormat))}}function N(e){var t;const{key:l}=e;"Enter"===l&&(null==(t=O.value)||t.blur(),P.value=!1)}return a((()=>P.value),(async e=>{var t,l,a,r,u;e&&(await o(),null==(u=null==(r=null==(a=null==(l=null==(t=$.value)?void 0:t.$timePicker)?void 0:l.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var t,l;return null==(l=null==(t=null==e?void 0:e.querySelector)?void 0:t.call(e,".n-time-picker-col__item--active"))?void 0:l.scrollIntoView()})))})),(t,l)=>(r(),u(i(h),n({show:i(P),trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"}},t.$attrs,{onClickoutside:l[3]||(l[3]=()=>P.value=!1)}),{trigger:m((()=>[f(i(y),{ref_key:"formRef",ref:O,clearable:"",value:e.formattedValue,"onUpdate:value":l[0]||(l[0]=e=>d(formattedValue)?formattedValue.value=e:null),onClick:l[1]||(l[1]=()=>P.value=!0),onBlur:K,onKeyup:N},null,8,["value"])])),default:m((()=>[f(i(w),null,{default:m((()=>[f(i(C),n({ref_key:"timePickerRef",ref:$,show:"","formatted-value":E.value},i(B),{class:"iho-table__time-picker",to:!1,"onUpdate:formattedValue":D,onConfirm:l[2]||(l[2]=()=>P.value=!1)}),null,16,["formatted-value"]),f(i(V),{class:"iho-table__scrollbar"},{default:m((()=>[i(z).length?(r(),u(i(w),{key:0,vertical:"",wrap:!1},{default:m((()=>[(r(!0),c(v,null,s(i(z),(e=>(r(),u(i(b),{size:"tiny",key:e,onClick:t=>function(e){D(e),P.value=!1}(e)},{default:m((()=>[p(_(e),1)])),_:2},1032,["onClick"])))),128))])),_:1})):k("v-if",!0)])),_:1})])),_:1})])),_:1},16,["show"]))}}),[["__file","editTime.vue"]]);export{S as default};
|
package/es/components/iho-table/src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createVNode as n}from"vue";import{isMatchLowCodeCondition as
|
|
1
|
+
import{createVNode as n}from"vue";import{isMatchLowCodeCondition as o}from"../../../../../../shared/utils/index.js";import{isObject as r,isArray as e}from"lodash-es";import"../../../../index.js";import{WIDGET_TYPE as t}from"../../../constants/index.js";import{parseMergeField as i,isRichContent as l,parseRichContent as c}from"../../../utils/index.js";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function s(){return d({name:"defaultRendererPlugin",vxe(d){d.renderer.add(t.DEFAULT,{renderCell(t,{row:d,column:s}){const u=i(d,s),a=l(u)?function(o){const r=c(o);return[n("div",{style:{color:r.background||r.icon}},[e(r.icon),r.change_text])];function e(o){return o?o.match(/#[\da-f]{6}|[\da-f]{3}/i)?n("i",{class:"icon-dot",style:{"--table-icon-color":o,"--table-icon-shadow":o}},null):n("i",{class:r.icon},null):null}}(u):[u];return function(r,t,i,l){if(!e(r)||!r.length)return l;const c=r.find((n=>n.condition&&n.condition.find((n=>{const r=t[n.field_key||i.field];return o(r,n)}))));return c?n("div",{style:{color:c.color},class:c.icon},[l]):l}(function(n){var o,e,t;const i=null==(o=n.editRender)?void 0:o.props;if(!r(i))return;return null!=(t=i.colorAndIcon)?t:null==(e=i.settingObj)?void 0:e.colorAndIcon}(s),d,s,a)}}),d.renderer.add(t.STATUS,d.renderer.get(t.DEFAULT))}})}export{s as defaultRendererPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{IhoTableStatusHelper as s}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:
|
|
1
|
+
import{inject as o,createVNode as e}from"vue";import{SettingsSharp as n}from"@vicons/ionicons5";import{isFunction as i}from"lodash-es";import{NIcon as t}from"naive-ui";import"../../../../index.js";import{InjectionIhoTableEmits as r}from"../../../constants/index.js";import{IhoTableStatusHelper as s}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function f(){const f="seqRendererPlugin";return l({name:f,apply(l){l.fieldHooks.field.tap({name:f,before:"checkRendererPlugin"},((l,{index:m,insertBefore:c},u)=>{var a,d;if(0===m&&u.showSeq){const l={align:"center",fixed:"left",width:50,type:"seq",field:f,annotation:!1,slots:{header(){if(s.isPositive(u.hideSettingBtn))return[];const i=o(r);return[e(t,{style:{cursor:"pointer"},size:"14",color:"#777",component:n,onClick:function(){i&&i("settingClick")}},null)]}}};i(null==(a=u.columnConfig)?void 0:a.seqSlotFn)&&(l.slots||(l.slots={}),l.slots.default=u.columnConfig.seqSlotFn),(null==(d=u.sortableConfig)?void 0:d.enable)&&(l.className="col--drag"),c(l)}return l}))}})}export{f as seqRendererPlugin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function rowDragPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import{isFunction as l,cloneDeep as n}from"lodash-es";import{nextTick as o,onBeforeUnmount as t}from"vue";import"../../../index.js";import i from"sortablejs";import d from"xe-utils";import{defineTablePlugin as r}from"../../hooks/useTablePlugin.js";function a(){const n="rowDragPlugin",d=new Map;return r({name:n,apply(r){r.fieldHooks.fieldEnd.tapPromise(n,(async(n,{$table:t,emits:r})=>{const{uuid:a}=n,s=n.sortableConfig||{};a&&s.enable&&!d.get(a)&&(await o(),async function n(o=0){if(o>2)return;const c=function(){var e,l,n,o,i,d,r,a,u,s;const c=null==(o=null==(n=null==(l=null==(e=t.value)?void 0:e.$el)?void 0:l.querySelector)?void 0:n.call(l,".vxe-table--body"))?void 0:o.scrollWidth,v=(null==(r=null==(d=null==(i=t.value)?void 0:i.$el)?void 0:d.querySelector)?void 0:r.call(d,".vxe-table.is--scroll-x"))?".fixed-left--wrapper>.vxe-table--body tbody":".body--wrapper>.vxe-table--body tbody";return c?null==(s=null==(u=null==(a=t.value)?void 0:a.$el)?void 0:u.querySelector)?void 0:s.call(u,v):null}();if(c){const e=i.create(c,{handle:".col--seq",...s,onEnd:e=>{var n,o,i,d,a,c,v;const{oldIndex:f=0,newIndex:x=0}=e,p={oldIndex:f,newIndex:x},{virtualY:b}=(null==(n=t.value)?void 0:n.getScroll())||{};if(b){const e=(null==(d=null==(i=null==(o=t.value)?void 0:o.getTableData())?void 0:i.tableData)?void 0:d[f])||{},l=null!=(v=null!=(c=e.__currentIndex)?c:null==(a=t.value)?void 0:a.getVTRowIndex(e))?v:0,n=l+(x-f);e.__currentIndex=n,p.oldIndex=l,p.newIndex=n}const m={...e,...p,...u(e,p,t.value)};r("rowDrag",m),l(s.onEnd)&&s.onEnd(m)}});return d.set(a,e)}await e(100),n(++o)}())})),r.setupHooks.setup.tap(n,(e=>{t((()=>{var l;const n=null==(l=e.value)?void 0:l.uuid;n&&d.has(n)&&d.delete(n)}))}))}})}function u(e,l,o){var t;const i=null==(t=null==o?void 0:o.getTableData())?void 0:t.fullData,r=o.treeConfig&&o.treeConfig.transform?function(e,l){var o,t,i,r,a;const{oldIndex:u=0,newIndex:s=0}=e,c={children:"childrenList"},{fullData:v,tableData:f}=l.getTableData(),x=null==f?void 0:f[u],p=null==f?void 0:f[s-1],b=n(v),m=d.findTree(b,(e=>e.__id===x.__id),c);if(p){const e=null==(t=null==(o=l.$el)?void 0:o.querySelector)?void 0:t.call(o,".body--wrapper>.vxe-table--body tbody"),n=null==(r=null==(i=l.$el)?void 0:i.querySelector)?void 0:r.call(i,".fixed-left--wrapper>.vxe-table--body tbody"),v=d.findTree(b,(e=>e.__id===p.__id),c);if(d.findTree(x[c.children],(e=>e.__id===p.__id),c)){const l=e.children[u],o=e.children[s];return e.insertBefore(o,l),null==(a=null==n?void 0:n.insertBefore)||a.call(n,n.children[s],n.children[u]),console.log("不允许自己给自己拖动"),b}const f=m.items.splice(m.index,1)[0];l.isTreeExpandByRow(p)?p[c.children].splice(0,0,f):v.items.splice(v.index+(m.index<v.index?0:1),0,f)}else{const e=m.items.splice(m.index,1)[0];b.unshift(e)}return b}(e,o):function(e,l){var o;const{oldIndex:t=0,newIndex:i=0}=e,d=n((null==(o=null==l?void 0:l.getTableData())?void 0:o.fullData)||[]),r=d.splice(t,1)[0];return d.splice(i,0,r),d}(l,o);return{oldData:i,newData:r}}export{a as rowDragPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as t,ref as o,computed as l,provide as
|
|
1
|
+
import{defineComponent as e,inject as t,ref as o,computed as l,provide as n,watch as r,onMounted as a,createVNode as s,h as i,unref as u,onBeforeUnmount as d,shallowReactive as c}from"vue";import{widthAppend as p,traverse as f}from"../../../../../shared/utils/index.js";import{doAnimation as m}from"../../../../../shared/utils/anime.js";import{useThrottleFn as h}from"@vueuse/core";import{promiseTimeout as g}from"@vueuse/shared";import{isFunction as v,isNumber as x,last as I,omit as b}from"lodash-es";import"../../../index.js";import{InjectionIhoTableUUID as w,WIDGET_TYPE as y}from"../../constants/index.js";import{useUUIDMap as T}from"../../utils/index.js";import{defineTablePlugin as R}from"../../hooks/useTablePlugin.js";class H{constructor(){this.records={},this.maxRecords=c(new Map)}set(e,t,o){if(this.records[e]||(this.records[e]={}),this.records[e][t]===o)return;this.records[e][t]=o;const l=Math.max(...Object.values(this.records[e]),0);this.maxRecords.get(e)!==l&&this.maxRecords.set(e,l)}getMax(e){return this.maxRecords.get(e)||0}}const{getItemFromUUID:D,removeItemFromUUID:M}=T((()=>new H),!0),{getItemFromUUID:S,removeItemFromUUID:U,setItemFromUUID:C}=T((()=>null)),{getItemFromUUID:$,removeItemFromUUID:E,setItemFromUUID:k}=T((()=>{})),F=e({props:{payload:{type:Object,required:!0}},setup(e){const u=t(w),d=t("$xetable"),c=o(),f=D(u),m=l((()=>e.payload.row[e.payload.column.field]));function h(){const{row:t,column:o}=e.payload,l=d.getRowSeq(t);if(!f||null==l||!c.value)return;const n=c.value.clientHeight;f.set(l,o.field,n)}n("updateCellHeight",h),r([()=>e.payload.rowIndex,()=>e.payload.column.field,m,()=>e.payload.column.renderWidth],(async()=>{await g(0),h()})),a((()=>{d&&!S(u)&&C(u,d),h()}));const I=l((()=>{var t,o,l,n;const r=null!=(o=null==(t=e.payload.column.editRender)?void 0:t.props)?o:{},a=null!=(n=null==(l=r.slots)?void 0:l.default)?n:r.slotFn;return v(a)?a:()=>m.value})),b=l((()=>{if(e.payload.column.treeNode)return"";const t=e.payload.column.renderWidth;return x(t)&&t>0?p(t-20-2):""}));return()=>s("div",{ref:c,style:{padding:"7px 0",width:b.value,overflow:"hidden"}},[i(I.value,e.payload)])}});function j(e,t,{scrollTop:o=0}){var l,n;const{uuid:r,rowConfig:a={}}=t;if(!r)return;const s=D(r),{oSize:i=0,gt:d=100}=null!=(l=$(r))?l:{},{internalData:c,reactData:p}=e,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=c;if(d>h.length)return;const x=null!=(n=a.height)?n:36,b=m["main-body-wrapper"],w=b?u(b):null;let y=w?Math.max(8,Math.ceil(w.clientHeight/x)+2+i):8;const T=[0];let R=0;if(o&&h.find(((t,l)=>{const n=e.getRowSeq(t),r=(I(T)||0)+Math.max(x,s.getMax(n));if(T.push(r),r>o)return R=Math.max(0,l-i),y+=Math.min(R,i),!0})),R>0&&v(t.spanMethod)){const{spanMethod:o}=t,l={rowspan:1,colspan:1};for(;R>0;){if(!e.getColumns().some(((e,t)=>{const{rowspan:n,colspan:r}=o({column:e,columnIndex:t,$columnIndex:t,row:h[R],rowIndex:R,$rowIndex:R,_rowIndex:R,isHidden:!e.visible,fixed:e.fixed,type:e.type,visibleData:h})||l;if(0===n&&0===r)return R--,!0})))break}}const H=`${T[R]}px`,M=`${h.reduce(((t,o)=>{const l=e.getRowSeq(o);return t+Math.max(x,s.getMax(l))}),0)}px`;["main","left","right"].forEach((e=>{const t=m[`${e}-body-table`],l=t?u(t):null;l&&(l.style.marginTop=H,l.scrollTop=o),["header","body","footer"].forEach((t=>{const o=m[`${e}-${t}-ySpace`],l=o?u(o):null;l&&(l.style.height=M)}))}));const S=Math.min(h.length,R+y);if(f.startIndex===R&&f.endIndex===S)return;f.startIndex=R,f.endIndex=S;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((t,o)=>{const l=e.getRowid(t),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const L=h(j,300);function Y(){const e="variableHeightRendererPlugin";return R({name:e,vxe(e){e.renderer.add(y.VARIABLE_HEIGHT,{renderCell:(e,t)=>s(F,{payload:t},null)})},apply(t){function o(e){const t=S(e.uuid);if(!t)return;e.scrollY={enabled:!1},t.reactData.scrollYLoad=!1;const o=function(e){const t=e.internalData.elemStore["main-body-wrapper"];return t?u(t):null}(t);o&&j(t,e,{scrollTop:o.scrollTop})}function l(e){if(!e.uuid)return;const t=$(e.uuid);t&&(e.scrollY=t),setTimeout((()=>o(e)),300)}t.dataHooks.dataStart.tap(e,l),t.eventHooks.onFilterChange.tap(e,((e,t)=>l(t))),t.eventHooks.onSortChange.tap(e,((e,t)=>l(t))),t.eventHooks.onToggleTreeExpand.tap(e,((e,t)=>l(t))),t.eventHooks.onResizableChange.tap(e,(async({column:e},t)=>{if(!e.editRender||!e.editRender.props)return;e.editRender.props.variableHeight&&l(t)})),t.eventHooks.onScroll.tap(e,h(((e,t)=>{if(e.isX)return;const{uuid:o}=t;if(!o)return;const l=S(o);l&&j(l,t,e)}),100,!0,!0)),t.fieldHooks.field.tap(e,(e=>{if(Reflect.get(e,"variableHeight")){const t=e.slots;e.slots=b(t,["default"]),e.editRender={...e.editRender,name:y.VARIABLE_HEIGHT};const o=e.className,l="variable-height";e.className=o?function(e){return v(o)?[o(e),l]:[o,l]}:l}return e})),t.fieldHooks.fieldList.tap(e,((e,t,{$table:l})=>(t.uuid&&f(e,((n,r)=>{var a,s,i;if((null==(a=n.editRender)?void 0:a.name)===y.VARIABLE_HEIGHT){const n=null!=(i=null==(s=t.rowConfig)?void 0:s.height)?i:36,a=D(t.uuid),d=t.cellStyle;if(t.cellStyle=function(e){const t={};if(e.column.fixed&&Reflect.get(e,"fixed")&&l.value){const o=Math.max(n,a.getMax(l.value.getRowSeq(e.row)));t.height=`${o}px`}return Object.assign(t,d?v(d)?d(e):d:null)},t.sortableConfig&&t.sortableConfig.enable){const e=t.sortableConfig.onEnd;t.sortableConfig.onEnd=function(o){const l=S(t.uuid);if(l){const{internalData:{elemStore:e}}=l,o=e["main-table-body"];o&&u(o)&&j(l,t,{scrollTop:u(o).scrollTop})}v(e)&&e(o)}}t.showOverflow="tooltip",f(e,(e=>{e.showOverflow="tooltip"})),t.scrollY={...t.scrollY,mode:"default"},t.onWheel=function(e){let t=null,o=0,l=!0;return function(n){if(!e.uuid)return;const r=S(e.uuid);if(!r)return;const{internalData:a}=r,{isHover:s}=e.rowConfig||{},{deltaX:i,deltaY:d}=n,{refTableLeftBody:c,refTableRightBody:p,refTableBody:f}=r.getRefMaps(),h=d,g=i,v=h<0,x=u(f),I=x?x.$el:null;if(!I)return;if(v?I.scrollTop<=0:I.scrollTop>=I.scrollHeight-I.clientHeight)return;const b=I.scrollTop+h,w=I.scrollLeft+g;if(b===a.lastScrollTop)return;n.preventDefault(),a.lastScrollTop=b,a.lastScrollLeft=w,a.lastScrollTime=Date.now(),s&&r.clearHoverRow();const y=c.value,T=p.value,R=y?y.$el:null,H=T?T.$el:null,D=Math.min(100,Math.abs(Math.floor(h/2)));l&&(o=I.scrollTop,l=!1),o+=D*(v?-1:1),t&&t(),t=m(I.scrollTop,o,400,(e=>{I.scrollTop=e,R&&(R.scrollTop=e),H&&(H.scrollTop=e)}),"easeOutCubic",(()=>{o=I.scrollTop,l=!0})),L(r,e,I)}}(t),setTimeout((()=>{k(t.uuid,t.scrollY),o(t)}),300),r()}})),e))),t.setupHooks.setup.tap(e,(e=>{d((()=>{e.value.uuid&&(M(e.value.uuid),U(e.value.uuid),E(e.value.uuid))}))}))}})}export{Y as variableHeightRendererPlugin};
|
|
@@ -3,6 +3,7 @@ import { LOW_CODE_VALUE_RELATION } from '../../../../../es/shared/utils';
|
|
|
3
3
|
import { VxeTableProps, VxeTableDefines, VxeTableInstance, VxeColumnPropTypes, VxeTablePropTypes } from 'vxe-table';
|
|
4
4
|
import { VxeTableListeners } from 'vxe-table/types/table';
|
|
5
5
|
import { IHO_TABLE_STRING_STATUS, IhoTableEventNameTuple, IhoTableRowGroupSequence } from '../../../../../es/components/iho-table/src/constants';
|
|
6
|
+
import Sortable from 'sortablejs';
|
|
6
7
|
export * from './pluginType';
|
|
7
8
|
export interface IhoTableRowGroupItem {
|
|
8
9
|
groupName?: string;
|
|
@@ -25,6 +26,12 @@ export declare type IhoTableConfig = VxeTableProps & Partial<{
|
|
|
25
26
|
};
|
|
26
27
|
checkboxConfig: Partial<VxeTableProps['checkboxConfig'] & {
|
|
27
28
|
slots: VxeColumnPropTypes.Slots;
|
|
29
|
+
maxCheckSize: number;
|
|
30
|
+
}>;
|
|
31
|
+
sortableConfig: Partial<{
|
|
32
|
+
enable: boolean;
|
|
33
|
+
usePreset: boolean;
|
|
34
|
+
[K: string]: any;
|
|
28
35
|
}>;
|
|
29
36
|
[K: string]: unknown;
|
|
30
37
|
}>;
|
|
@@ -34,18 +41,22 @@ export declare type IhoTableFieldItem = {
|
|
|
34
41
|
annotation: boolean;
|
|
35
42
|
}>;
|
|
36
43
|
export declare namespace IhoTableLowCodeField {
|
|
37
|
-
type FieldSetting = {
|
|
44
|
+
type FieldSetting = Partial<{
|
|
45
|
+
mergedFeildExpression: string;
|
|
38
46
|
notParticipatingSearch: IHO_TABLE_STRING_STATUS;
|
|
39
|
-
mapping
|
|
47
|
+
mapping: {
|
|
40
48
|
type: string;
|
|
41
49
|
mappingFiled: Array<{
|
|
42
50
|
value: Array<Record<'key' | 'value', string>>;
|
|
43
51
|
}>;
|
|
44
52
|
};
|
|
45
|
-
}
|
|
53
|
+
}>;
|
|
54
|
+
type FilterSetting = Partial<{
|
|
55
|
+
daterange: boolean;
|
|
56
|
+
}>;
|
|
46
57
|
type ColorAndIconItem = {
|
|
47
58
|
condition?: {
|
|
48
|
-
con: LOW_CODE_VALUE_RELATION
|
|
59
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
49
60
|
value: unknown;
|
|
50
61
|
field_key?: string;
|
|
51
62
|
}[];
|
|
@@ -58,6 +69,13 @@ export declare namespace IhoTableLowCodeField {
|
|
|
58
69
|
colorAndIcon: ColorAndIconItem[];
|
|
59
70
|
[K: string]: unknown;
|
|
60
71
|
}>;
|
|
72
|
+
type QueryOptions = (payload: {
|
|
73
|
+
keyword?: string;
|
|
74
|
+
row?: AnyObject;
|
|
75
|
+
column: VxeTableDefines.ColumnInfo;
|
|
76
|
+
rowIndex?: number;
|
|
77
|
+
isFullData?: boolean;
|
|
78
|
+
}) => Promise<AnyObject[]>;
|
|
61
79
|
}
|
|
62
80
|
export declare type LowCodeTableFieldItem = {
|
|
63
81
|
columnName: string;
|
|
@@ -74,13 +92,17 @@ export declare type LowCodeTableFieldItem = {
|
|
|
74
92
|
isOrder: MaybeString<0> | VxeTablePropTypes.SortOrder;
|
|
75
93
|
formType: string;
|
|
76
94
|
fieldSetting: string;
|
|
95
|
+
filterCapacity: number;
|
|
96
|
+
notParticipatingSearch: 0 | 1;
|
|
77
97
|
componentProps: AnyObject;
|
|
78
98
|
options: {
|
|
79
99
|
label?: string;
|
|
80
100
|
key?: string;
|
|
81
101
|
value: string;
|
|
82
102
|
disabled?: boolean;
|
|
103
|
+
keyword?: string;
|
|
83
104
|
}[];
|
|
105
|
+
queryOptions: IhoTableLowCodeField.QueryOptions;
|
|
84
106
|
annotation: boolean;
|
|
85
107
|
slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
|
|
86
108
|
headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
|
|
@@ -93,6 +115,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
93
115
|
checkEditStatus: (payload: VxeTableDefines.CellRenderBodyParams) => boolean | void;
|
|
94
116
|
colorAndIcon: IhoTableLowCodeField.ColorAndIconItem[];
|
|
95
117
|
variableHeight: boolean;
|
|
118
|
+
filterSetting: IhoTableLowCodeField.FilterSetting;
|
|
96
119
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
97
120
|
export declare type IhoTableFormChangePayload = {
|
|
98
121
|
column: IhoTableFieldItem;
|
|
@@ -110,7 +133,7 @@ export declare type IhoTableEventNameUnion = TupleToUnion<typeof IhoTableEventNa
|
|
|
110
133
|
export declare type IHoTableKeyboardPayload = IhoTableFormChangePayload & {
|
|
111
134
|
key: string;
|
|
112
135
|
};
|
|
113
|
-
export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IHoTableKeyboardPayload] : T extends 'settingClick' ? [] : T extends keyof VxeTableListeners ? Parameters<NonNullable<VxeTableListeners[T]>> : [];
|
|
136
|
+
export declare type IhoTableEmitPayload<T extends typeof IhoTableEventNameTuple[number]> = T extends 'formChange' | 'formClick' ? [IhoTableFormChangePayload] : T extends 'keyboard' ? [IHoTableKeyboardPayload] : T extends 'settingClick' ? [] : T extends 'rowDrag' ? [Sortable.SortableEvent] : T extends keyof VxeTableListeners ? Parameters<NonNullable<VxeTableListeners[T]>> : [];
|
|
114
137
|
export declare type IhoTableAnchorItem = {
|
|
115
138
|
field: string;
|
|
116
139
|
title: string;
|