cnhis-design-vue 3.1.42-beta.6 → 3.1.42-beta.61
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/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/src/index.vue.js +1 -1
- 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 +85 -44
- package/es/components/form-config/src/FormConfig.vue.d.ts +85 -44
- package/es/components/form-config/src/FormConfig.vue.js +1 -1
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +28 -14
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +45 -24
- 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 +28 -14
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +28 -14
- package/es/components/form-render/src/FormRender.vue.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +28 -14
- 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 +27 -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/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/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 +3 -2
- 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/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/keyboardEventPlugin/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/selectRendererPlugin/selectUtils.js +1 -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/{rendererPlugins/widgets/variableHeightRendererPlugin.d.ts → varialbleHeightPlugin/index.d.ts} +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +24 -5
- package/es/components/iho-table/src/types/pluginType.d.ts +10 -25
- package/es/components/iho-table/src/utils/index.d.ts +7 -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 +61 -32
- package/es/components/info-header/src/InfoHeader.vue.d.ts +61 -32
- package/es/components/info-header/src/InfoHeader.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +2 -2
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.js +1 -1
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -17
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +29 -14
- 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 +73 -3
- 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/src/LabelFormContent.vue.js +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 +43 -10
- package/es/components/select-person/src/SelectPerson.vue.d.ts +29 -8
- 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/shortcut-setter/index.d.ts +33 -17
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +33 -17
- 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/index.d.ts +0 -1
- package/es/components/table-filter/index.js +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/components/render-widget/widgetCfgMaps.js +1 -1
- package/es/components/table-filter/src/hooks/useMixins.js +1 -1
- package/es/components/table-filter/src/tool/baseOptions.d.ts +0 -10
- package/es/components/table-filter/src/tool/baseOptions.js +1 -1
- package/es/components/table-filter/src/tool/generateDefOptions.d.ts +0 -7
- package/es/components/table-filter/src/tool/generateDefOptions.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +11 -76
- 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 +1 -0
- 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/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 +2 -2
- package/es/components/form-render/src/hooks/useAsyncQueue.js +0 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/variableHeightRendererPlugin.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/components/table-filter/src/hooks/export.d.ts +0 -1
- package/es/components/table-filter/src/hooks/export.js +0 -1
- package/es/components/table-filter/src/tool/getWidgetType.d.ts +0 -1
- package/es/components/table-filter/src/tool/getWidgetType.js +0 -1
- 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/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,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};
|
|
@@ -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"./filterRenderPlugin/index.js";import*as n from"./keyboardEventPlugin/index.js";import*as d from"./lowCodeFieldAdaptorPlugin/index.js";import*as
|
|
1
|
+
import*as e from"./anchorPlugin/index.js";import*as r from"./defaultConfigPlugin/index.js";import*as i from"./filterRenderPlugin/index.js";import*as n from"./highLightSetPlugin.js";import*as s from"./keyboardEventPlugin/index.js";import*as d from"./lowCodeFieldAdaptorPlugin/index.js";import*as t from"./maxCheckSizePlugin.js";import*as l from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as g from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as u from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as o from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as P from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as a from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as m from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as x from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as p from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as f from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as j from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as R from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as b from"./rowClickPlugin/index.js";import*as w from"./rowDragPlugin/index.js";import*as c from"./rowGroupSettingPlugin/index.js";import*as h from"./varialbleHeightPlugin/index.js";import*as W from"./virtualTreePlugin/index.js";import{separateMetaModule as k}from"../../../../shared/utils/index.js";var C=k(Object.assign({"./anchorPlugin/index.tsx":e,"./defaultConfigPlugin/index.ts":r,"./filterRenderPlugin/index.tsx":i,"./highLightSetPlugin.tsx":n,"./keyboardEventPlugin/index.ts":s,"./lowCodeFieldAdaptorPlugin/index.tsx":d,"./maxCheckSizePlugin.ts":t,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":l,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":g,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":u,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":o,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":P,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":a,"./rendererPlugins/widgets/checkRendererPlugin.tsx":m,"./rendererPlugins/widgets/colorRendererPlugin.tsx":x,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":p,"./rendererPlugins/widgets/labelRendererPlugin.tsx":f,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":j,"./rendererPlugins/widgets/seqRendererPlugin.tsx":R,"./rowClickPlugin/index.ts":b,"./rowDragPlugin/index.ts":w,"./rowGroupSettingPlugin/index.ts":c,"./varialbleHeightPlugin/index.tsx":h,"./virtualTreePlugin/index.ts":W}));export{C as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{promiseTimeout as e}from"@vueuse/shared";import"../../../index.js";import{defineTablePlugin as o}from"../../hooks/useTablePlugin.js";function t(){const t="keyboardEventPlugin";return o({name:t,apply(o){o.eventHooks.onKeydown.tap(t,(async({$event:o,$table:t},n,{emits:r})=>{await e(0);const{row:i,column:a}=t.getSelectedCell()||t.getEditRecord()||{};if(!i||!a)return;r("keyboard",{key:o.key,index:t.getRowIndex(i),value:i[a.field],row:i,column:a})}))}})}export{t as keyboardEventPlugin};
|
|
@@ -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),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}from"lodash-es";var c=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:c}){const{isShow:d,setRef:m,formRef:f}=u(),{emitFormChangeWithParams:y}=a(e),h=o({options:e.options,loading:!1,remote:!1,onSearch:null}),v=i((async function(o=""){h.loading=!0;try{if(!s(e.queryOptions))return;h.options=await e.queryOptions({keyword:o,row:e.row,column:e.column,rowIndex:e.rowIndex})}catch(o){console.log(`获取${e.column.field}_options错误`)}finally{h.loading=!1}}),400);function w(o){const t=e.value;c("update:value",o),y({oldValue:t})}function b(e){var o,t;"Tab"===e.key&&f.value&&(null==(t=(o=f.value).handleKeydown)||t.call(o,{...e,key:"Enter",preventDefault:e.preventDefault.bind(e)}))}t((()=>e.options),(e=>{if(p(e)&&e.length)return h.options=e,h.remote=!1,void(h.onSearch=null);h.remote=!0,h.onSearch=v,h.onSearch()}),{immediate:!0});const g=()=>({class:"iho-table__selectOption"}),S={class:"iho-table__selectMenu"};return()=>r(l,n({ref:m,show:d.value,"onUpdate:show":e=>d.value=e,placeholder:e.placeholder},h,{value:e.value,clearable:!0,filterable:!0,nodeProps:g,menuProps:S,onUpdateValue:w,onKeydown:b}),null)}});export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
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: any, item: LowCodeTableFieldItem | any): any;
|
|
3
|
+
export declare function getDefaultValue(row: any, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(n,o){const
|
|
1
|
+
function n(n,o,r=[]){const i=n[o.columnName];return Array.isArray(i)?i.map((n=>l(n))).join(","):l(i);function l(n){var i;return l=(null==(i=o.componentProps)?void 0:i.options)||o.options||r,(null==(t=null==l?void 0:l.find((o=>o.value==n)))?void 0:t.label)||n||"";var l,t}}export{n as getDefaultValue};
|
|
@@ -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 o}from"lodash-es";import{nextTick as n,onBeforeUnmount as t}from"vue";import"../../../index.js";import r from"sortablejs";import{defineTablePlugin as a}from"../../hooks/useTablePlugin.js";function u(){const o="rowDragPlugin",u=new Map;return a({name:o,apply(a){a.fieldHooks.fieldEnd.tapPromise(o,(async(o,{$table:t,emits:a})=>{const{uuid:d}=o,s=o.sortableConfig||{};d&&s.enable&&!u.get(d)&&(await n(),async function n(v=0){if(v>2)return;const c=function(){var e,l,o,n,r,a,u,i,d,s;const v=null==(n=null==(o=null==(l=null==(e=t.value)?void 0:e.$el)?void 0:l.querySelector)?void 0:o.call(l,".vxe-table--body"))?void 0:n.scrollWidth,c=(null==(u=null==(a=null==(r=t.value)?void 0:r.$el)?void 0:a.querySelector)?void 0:u.call(a,".vxe-table.is--scroll-x"))?".fixed-left--wrapper>.vxe-table--body tbody":".body--wrapper>.vxe-table--body tbody";return v?null==(s=null==(d=null==(i=t.value)?void 0:i.$el)?void 0:d.querySelector)?void 0:s.call(d,c):null}();if(c){const e=r.create(c,{handle:".col--seq",...s,onEnd:e=>{var n,r,u,d,v;const c={},{oldIndex:f=0,newIndex:p=0,item:b}=e,{virtualY:m}=(null==(n=t.value)?void 0:n.getScroll())||{};if(m){const{item:e}=(null==(r=t.value)?void 0:r.getRowNode(b))||{},l=null!=(v=null!=(d=e.__currentIndex)?d:null==(u=t.value)?void 0:u.getVTRowIndex(e))?v:0,o=l+(p-f);e.__currentIndex=o,c.oldIndex=l,c.newIndex=o}const x={...e,...c,...i(e,o,t.value)};a("rowDrag",x),l(s.onEnd)&&s.onEnd(x)}});return u.set(d,e)}await e(100),n(++v)}())})),a.setupHooks.setup.tap(o,(e=>{t((()=>{var l;const o=null==(l=e.value)?void 0:l.uuid;o&&u.has(o)&&u.delete(o)}))}))}})}function i(e,l,n){var t;const r=null==(t=null==n?void 0:n.getTableData())?void 0:t.tableData,a=n.treeConfig&&n.treeConfig.transform?void 0:function(e,l){const{oldIndex:n=0,newIndex:t=0}=e,r=o(l),a=r.splice(n,1)[0];return r.splice(t,0,a),r}(e,r);return{oldData:r,newData:a}}export{u as rowDragPlugin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function variableHeightRendererPlugin(): import("
|
|
1
|
+
export declare function variableHeightRendererPlugin(): import("../../../../../../es/components/iho-table").TablePlugin;
|
|
@@ -0,0 +1 @@
|
|
|
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,19 @@ 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
|
+
}>;
|
|
46
54
|
type ColorAndIconItem = {
|
|
47
55
|
condition?: {
|
|
48
|
-
con: LOW_CODE_VALUE_RELATION
|
|
56
|
+
con: LOW_CODE_VALUE_RELATION;
|
|
49
57
|
value: unknown;
|
|
50
58
|
field_key?: string;
|
|
51
59
|
}[];
|
|
@@ -58,6 +66,13 @@ export declare namespace IhoTableLowCodeField {
|
|
|
58
66
|
colorAndIcon: ColorAndIconItem[];
|
|
59
67
|
[K: string]: unknown;
|
|
60
68
|
}>;
|
|
69
|
+
type QueryOptions = (payload: {
|
|
70
|
+
keyword?: string;
|
|
71
|
+
row?: AnyObject;
|
|
72
|
+
column: VxeTableDefines.ColumnInfo;
|
|
73
|
+
rowIndex?: number;
|
|
74
|
+
isFullData?: boolean;
|
|
75
|
+
}) => Promise<AnyObject[]>;
|
|
61
76
|
}
|
|
62
77
|
export declare type LowCodeTableFieldItem = {
|
|
63
78
|
columnName: string;
|
|
@@ -74,6 +89,8 @@ export declare type LowCodeTableFieldItem = {
|
|
|
74
89
|
isOrder: MaybeString<0> | VxeTablePropTypes.SortOrder;
|
|
75
90
|
formType: string;
|
|
76
91
|
fieldSetting: string;
|
|
92
|
+
filterCapacity: number;
|
|
93
|
+
notParticipatingSearch: 0 | 1;
|
|
77
94
|
componentProps: AnyObject;
|
|
78
95
|
options: {
|
|
79
96
|
label?: string;
|
|
@@ -81,6 +98,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
81
98
|
value: string;
|
|
82
99
|
disabled?: boolean;
|
|
83
100
|
}[];
|
|
101
|
+
queryOptions: IhoTableLowCodeField.QueryOptions;
|
|
84
102
|
annotation: boolean;
|
|
85
103
|
slotFn: NonNullable<IhoTableFieldItem['slots']>['default'];
|
|
86
104
|
headerSlotFn: NonNullable<IhoTableFieldItem['slots']>['header'];
|
|
@@ -92,6 +110,7 @@ export declare type LowCodeTableFieldItem = {
|
|
|
92
110
|
*/
|
|
93
111
|
checkEditStatus: (payload: VxeTableDefines.CellRenderBodyParams) => boolean | void;
|
|
94
112
|
colorAndIcon: IhoTableLowCodeField.ColorAndIconItem[];
|
|
113
|
+
variableHeight: boolean;
|
|
95
114
|
}> & Partial<VxeTableDefines.ColumnInfo>;
|
|
96
115
|
export declare type IhoTableFormChangePayload = {
|
|
97
116
|
column: IhoTableFieldItem;
|
|
@@ -109,7 +128,7 @@ export declare type IhoTableEventNameUnion = TupleToUnion<typeof IhoTableEventNa
|
|
|
109
128
|
export declare type IHoTableKeyboardPayload = IhoTableFormChangePayload & {
|
|
110
129
|
key: string;
|
|
111
130
|
};
|
|
112
|
-
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]>> : [];
|
|
131
|
+
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]>> : [];
|
|
113
132
|
export declare type IhoTableAnchorItem = {
|
|
114
133
|
field: string;
|
|
115
134
|
title: string;
|
|
@@ -19,6 +19,10 @@ export declare type TablePlugin = {
|
|
|
19
19
|
vxe?(vxeTable: IhoTableInstance): void;
|
|
20
20
|
apply?(hooks: TableHooks): void;
|
|
21
21
|
};
|
|
22
|
+
export declare type IhoTableHandlerContext<isRef extends boolean = true> = {
|
|
23
|
+
$table: isRef extends true ? Ref<Nullable<VxeTableInstance>> : Nullable<VxeTableInstance>;
|
|
24
|
+
emits: IhoTableEmits;
|
|
25
|
+
};
|
|
22
26
|
export declare type TableHooks = Readonly<{
|
|
23
27
|
configHooks: AbstractConfigHooks;
|
|
24
28
|
fieldHooks: AbstractFieldHooks;
|
|
@@ -29,9 +33,9 @@ export declare type TableHooks = Readonly<{
|
|
|
29
33
|
exposeHooks: AbstractExposeHooks;
|
|
30
34
|
}>;
|
|
31
35
|
export declare type WithTableConfig<T = []> = T extends any[] ? [...T, IhoTableConfig] : [T, IhoTableConfig];
|
|
32
|
-
declare type ConfigHookType<T> = SyncWaterfallHook<WithTableConfig<T
|
|
36
|
+
declare type ConfigHookType<T> = SyncWaterfallHook<[...WithTableConfig<[T]>, IhoTableHandlerContext]>;
|
|
33
37
|
export declare abstract class AbstractConfigHooks {
|
|
34
|
-
abstract readonly config: SyncWaterfallHook<IhoTableConfig>;
|
|
38
|
+
abstract readonly config: SyncWaterfallHook<[IhoTableConfig, IhoTableHandlerContext]>;
|
|
35
39
|
abstract readonly rowConfig: ConfigHookType<IhoTableConfig['rowConfig']>;
|
|
36
40
|
abstract readonly editConfig: ConfigHookType<IhoTableConfig['editConfig']>;
|
|
37
41
|
abstract readonly columnConfig: ConfigHookType<IhoTableConfig['columnConfig']>;
|
|
@@ -56,26 +60,14 @@ export interface FieldHookContext {
|
|
|
56
60
|
insertBefore(field: ArrayAble<IhoTableFieldItem>): void;
|
|
57
61
|
insertAfter(field: ArrayAble<IhoTableFieldItem>): void;
|
|
58
62
|
}
|
|
59
|
-
export declare type WithFieldHookContext<T = []> = [
|
|
60
|
-
...WithTableConfig<T>,
|
|
61
|
-
{
|
|
62
|
-
$table: Ref<Nullable<VxeTableInstance>>;
|
|
63
|
-
emits: IhoTableEmits;
|
|
64
|
-
}
|
|
65
|
-
];
|
|
63
|
+
export declare type WithFieldHookContext<T = []> = [...WithTableConfig<T>, IhoTableHandlerContext];
|
|
66
64
|
export declare abstract class AbstractFieldHooks {
|
|
67
65
|
abstract readonly fieldStart: AsyncParallelHook<WithFieldHookContext>;
|
|
68
66
|
abstract readonly field: SyncWaterfallHook<WithFieldHookContext<[IhoTableFieldItem, FieldHookContext]>>;
|
|
69
67
|
abstract readonly fieldList: SyncWaterfallHook<WithFieldHookContext<[IhoTableFieldItem[]]>>;
|
|
70
68
|
abstract readonly fieldEnd: AsyncParallelHook<WithFieldHookContext>;
|
|
71
69
|
}
|
|
72
|
-
export declare type WithIhoEventContext<T> = [
|
|
73
|
-
...WithTableConfig<T>,
|
|
74
|
-
IhoTableHandler & {
|
|
75
|
-
$table: Nullable<VxeTableInstance>;
|
|
76
|
-
emits: IhoTableEmits;
|
|
77
|
-
}
|
|
78
|
-
];
|
|
70
|
+
export declare type WithIhoEventContext<T> = [...WithTableConfig<T>, IhoTableHandler & IhoTableHandlerContext<false>];
|
|
79
71
|
declare type EventHookType<T extends Func> = AsyncParallelHook<WithIhoEventContext<Parameters<T>>>;
|
|
80
72
|
declare type VxeEventTypes = Required<{
|
|
81
73
|
readonly [K in keyof VxeTableEventProps]: EventHookType<NonNullable<VxeTableEventProps[K]>>;
|
|
@@ -155,20 +147,13 @@ export declare abstract class AbstractDataHooks {
|
|
|
155
147
|
abstract readonly dataEnd: AsyncParallelHook<WithTableConfig>;
|
|
156
148
|
}
|
|
157
149
|
export declare abstract class AbstractSetupHooks {
|
|
158
|
-
abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]
|
|
150
|
+
abstract readonly setup: SyncHook<[Ref<IhoTableConfig>, Ref<IhoTableFieldItem[]>, IhoTableHandlerContext]>;
|
|
159
151
|
}
|
|
160
152
|
export declare abstract class AbstractDomInsertHooks {
|
|
161
153
|
abstract readonly header: SyncWaterfallHook<[VNode[]]>;
|
|
162
154
|
abstract readonly footer: SyncWaterfallHook<[VNode[]]>;
|
|
163
155
|
}
|
|
164
|
-
export declare type WithExposeHookConfig<T = []> = [
|
|
165
|
-
...(T extends any[] ? T : [T]),
|
|
166
|
-
Ref<IhoTableConfig>,
|
|
167
|
-
{
|
|
168
|
-
$table: Ref<Nullable<VxeTableInstance>>;
|
|
169
|
-
emits: IhoTableEmits;
|
|
170
|
-
}
|
|
171
|
-
];
|
|
156
|
+
export declare type WithExposeHookConfig<T = []> = [...(T extends any[] ? T : [T]), Ref<IhoTableConfig>, IhoTableHandlerContext];
|
|
172
157
|
export declare abstract class AbstractExposeHooks {
|
|
173
158
|
abstract readonly expose: SyncWaterfallHook<WithExposeHookConfig<Record<string, Func>>>;
|
|
174
159
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnyObject, Nullable } from '../../../../../es/shared/types';
|
|
1
|
+
import { AnyObject, ArrayAble, Nullable } from '../../../../../es/shared/types';
|
|
2
2
|
import { MaybeRef } from '@vueuse/core';
|
|
3
3
|
import { VxeTableDefines, VxeTableInstance } from 'vxe-table';
|
|
4
4
|
import { VxeGlobalRendererHandles } from 'vxe-table/types/v-x-e-table/renderer';
|
|
@@ -35,7 +35,7 @@ export declare const IhoTableRenderHelper: Readonly<{
|
|
|
35
35
|
createDefaultRenderCell: typeof createDefaultRenderCell;
|
|
36
36
|
createRenderEdit: typeof createRenderEdit;
|
|
37
37
|
isEditableColumn(config: IhoTableConfig, column: IhoTableFieldItem): boolean | undefined;
|
|
38
|
-
hasFilter(
|
|
38
|
+
hasFilter(lowCodeField: LowCodeTableFieldItem): boolean;
|
|
39
39
|
}>;
|
|
40
40
|
export declare const IhoTableStatusHelper: Readonly<{
|
|
41
41
|
isPositive(value: string | number | undefined | null): boolean;
|
|
@@ -43,9 +43,13 @@ export declare const IhoTableStatusHelper: Readonly<{
|
|
|
43
43
|
notPositive(value: string | number | undefined | null): boolean;
|
|
44
44
|
notNegative(value: string | number | undefined | null): boolean;
|
|
45
45
|
}>;
|
|
46
|
-
export declare const createIhoTableClearActivedInterceptor: (type: EDITABLE_WIDGET_TYPE
|
|
46
|
+
export declare const createIhoTableClearActivedInterceptor: (type: ArrayAble<EDITABLE_WIDGET_TYPE>, solution: (ele: HTMLElement) => boolean) => ({ $event, column }: {
|
|
47
47
|
$event: Event;
|
|
48
48
|
column: VxeTableDefines.ColumnInfo;
|
|
49
49
|
}) => boolean;
|
|
50
50
|
export declare function isTransformTreeType(config: IhoTableConfig): boolean;
|
|
51
|
+
export declare function isRichContent(content: string): content is string;
|
|
52
|
+
export declare function parseRichContent(richContent: string): any;
|
|
53
|
+
export declare function parseMergeField(row: AnyObject, column: VxeTableDefines.ColumnInfo): any;
|
|
54
|
+
export declare function isCompatibleColumn(field: LowCodeTableFieldItem): number | false;
|
|
51
55
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as
|
|
1
|
+
import{reactive as e,inject as n,unref as t,toRaw as r,createVNode as i}from"vue";import{jsonParse as o,arrayed as u,findAncestor as l}from"../../../../shared/utils/index.js";import{promiseTimeout as c}from"@vueuse/shared";import{isNumber as d,cloneDeep as s,isString as a,isObject as f,isArray as m}from"lodash-es";import{InjectionIhoTableEmits as p,InjectionIhoTableConfig as v,IHO_TABLE_STRING_STATUS as E,IHO_TABLE_NUMBER_STATUS as I,IHO_TABLE_TREE_TYPE as g}from"../constants/index.js";function T(e){return console.warn(`[IhoTable]: ${e}`)}const h=Object.freeze({getCellType(e){var n;return((null==(n=e.settingObj)?void 0:n.attr)||e.formType||"DEFAULT").toUpperCase()}});function C(){var e,t,r;const i=n(v);return i||T("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(t=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:t.height)?r:32}function R(e){const n=e.slice(2);return`${n[0].toLowerCase()}${n.slice(1)}`}function S(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function w(n,t=!0){const r=t?e(new Map):new Map;return{getItemFromUUID:function(e){return r.set(e,r.get(e)||n()).get(e)},setItemFromUUID:function(e,n){r.set(e,n)},removeItemFromUUID:function(e){r.delete(e)}}}async function O(e,n){return r()||await c(0),r()||function(){const n=+e.colWidth;return d(n)?n:64}();function r(){var r,i;return null==(i=null==(r=t(n))?void 0:r.getColumnByField(e.field))?void 0:i.renderWidth}}function P(e){const t=n(p);function i(){var n;return{value:e.row[e.column.field],row:e.row,column:{...e.column,...null==(n=e.column.editRender)?void 0:n.props},index:e.rowIndex>-1?e.rowIndex:e.$rowIndex}}function o(e={}){t("formChange",{...i(),...s(r(e))})}function u(e={}){t("formClick",{...i(),...s(r(e))})}return{emitFormChange:function(){o()},emitFormClick:function(){u()},emitFormChangeWithParams:o,emitFormClickWithParams:u}}const A=Object.freeze({createDefaultRenderCell:function(){return function(e,{row:n,column:t}){return[i("span",null,[n[t.field]])]}},createRenderEdit:function(e){return function({props:n},t){return e({...t,fieldItem:n||{},...P(t)})}},isEditableColumn(e,n){var t;return!1!==(null==(t=e.editConfig)?void 0:t.showIcon)&&n.editRender&&!1!==n.editRender.enabled},hasFilter(e){if(y(e))return!0;let n=e.fieldSetting;return a(n)&&(n=o(n||"")),f(n)&&((t=n).notParticipatingSearch!==E.POSITIVE&&"manual"===(null==(r=t.mapping)?void 0:r.type));var t,r}}),F=Object.freeze({isPositive:e=>e===I.POSITIVE||e===E.POSITIVE,isNegative:e=>e===I.NEGATIVE||e===E.NEGATIVE,notPositive:e=>e!==I.POSITIVE&&e!==E.POSITIVE,notNegative:e=>e!==I.NEGATIVE&&e!==E.NEGATIVE}),N=(e,n)=>({$event:t,column:r})=>{var i;if(!u(e).includes(null==(i=r.editRender)?void 0:i.name))return!0;const o=null==t?void 0:t.target;return!f(o)||!l(o,n)};function V(e){return[g.TRANSFORM_WITH_SPAN_METHOD,g.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function $(e){return a(e)&&!!e.match(/^###\{[^{}]+}$/)}function x(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function U(e,n){if(e.$__SEPARATE||!n.editRender||!n.editRender.props)return e[n.field];const{fieldSetting:t}=n.editRender.props;if(!a(t))return e[n.field];const{mergedFeildExpression:r}=o(t);return r&&a(r)?r.replace(/#{(.+?)}/g,(function(n,t){let r=t?e[t.trim()]:null;$(r)&&(r=x(r).change_text);return r||(null==r?"--":r)})):e[n.field]}const b=["SEARCH","SELECT","RADIO","CHECKBOX"];function y(e){return e.notParticipatingSearch===I.NEGATIVE&&b.includes(h.getCellType(e))&&m(e.options)&&e.options.length}export{A as IhoTableRenderHelper,F as IhoTableStatusHelper,h as IhoTableUtils,T as IhoTableWarn,N as createIhoTableClearActivedInterceptor,R as eventListener2EventName,S as eventName2EventListener,O as getColumnRenderWidth,C as getRowHeight,y as isCompatibleColumn,$ as isRichContent,V as isTransformTreeType,U as parseMergeField,x as parseRichContent,P as useIhoTableFormEvent,w as useUUIDMap};
|
|
Binary file
|