cnhis-design-vue 3.3.1-beta.14 → 3.3.1-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +12 -17
- package/es/components/ai-chat/src/Index.vue.d.ts +12 -17
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/api/index.d.ts +1 -2
- package/es/components/ai-chat/src/api/index.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue.d.ts +0 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatCard.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +3 -11
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/components/ChatMainDefault.js +1 -0
- package/es/components/ai-chat/src/components/ChatRight.vue.d.ts +0 -2
- package/es/components/ai-chat/src/components/ChatRight.vue2.js +1 -1
- package/es/components/ai-chat/src/components/card/JsonCard.js +1 -1
- package/es/components/ai-chat/src/hooks/useWebsocket.js +1 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/audio-sdk/index.d.ts +304 -2
- package/es/components/audio-sdk/index.js +1 -1
- package/es/components/audio-sdk/src/Index.vue.d.ts +304 -0
- package/es/components/audio-sdk/src/Index.vue.js +1 -0
- package/es/components/audio-sdk/src/Index.vue2.js +1 -0
- package/es/components/audio-sdk/src/audioSDK.d.ts +5 -7
- package/es/components/audio-sdk/src/audioSDK.js +1 -1
- package/es/components/audio-sdk/src/components/form.vue.d.ts +51 -0
- package/es/components/audio-sdk/src/components/form.vue.js +1 -0
- package/es/components/audio-sdk/src/components/form.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.d.ts +91 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue.js +1 -0
- package/es/components/audio-sdk/src/components/recording-modal.vue2.js +1 -0
- package/es/components/audio-sdk/src/components/recording.vue.d.ts +43 -4
- package/es/components/audio-sdk/src/components/recording.vue2.js +1 -1
- package/es/components/audio-sdk/src/utils/index.d.ts +4 -0
- package/es/components/audio-sdk/src/utils/index.js +1 -0
- package/es/components/audio-sdk/src/utils/recordingModal.d.ts +7 -4
- package/es/components/audio-sdk/src/utils/recordingModal.js +1 -1
- package/es/components/audio-sdk/style/index.css +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +7 -1
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/field-editor/index.d.ts +7 -1
- package/es/components/field-editor/src/FieldEditor.vue.d.ts +7 -1
- package/es/components/form-config/index.d.ts +38 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +38 -3
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +7 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +17 -1
- package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +8 -1
- package/es/components/form-render/index.d.ts +7 -1
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +7 -1
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +7 -1
- package/es/components/form-render/src/components/renderer/date.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/date.js +1 -1
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +1 -1
- package/es/components/form-render/src/components/renderer/input.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/input.js +1 -1
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +14 -1
- package/es/components/form-render/src/components/renderer/select.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +12 -1
- package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +4 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/form-render/src/types/index.d.ts +2 -0
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/form-render/src/utils/index.js +1 -1
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-chat/index.d.ts +47 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +47 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +22 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +6 -0
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +4 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +8 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +3 -0
- package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/constants/index.d.ts +7 -0
- package/es/components/iho-chat/src/constants/index.js +1 -1
- package/es/components/iho-chat/src/utils/index.d.ts +2 -0
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +26 -23
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.d.ts +3 -3
- package/es/components/iho-table/src/hooks/tapHooks/useDataHooks.js +1 -1
- package/es/components/iho-table/src/hooks/useTablePlugin.js +1 -1
- package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.d.ts +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +78 -0
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.d.ts +7 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.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 +1 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/verticalTablePlugin/src/utils.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/types/pluginType.d.ts +2 -2
- package/es/components/index.css +1 -1
- package/es/components/index.d.ts +2 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +24 -2
- package/es/components/info-header/src/InfoHeader.vue.d.ts +24 -2
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +9 -1
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +7 -1
- package/es/components/scale-view/index.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue.d.ts +3 -2
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/use-component.d.ts +1 -2189
- package/es/components/shortcut-setter/index.d.ts +8 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
- package/es/shared/components/ArrowIcon/ArrowIcon.vue.js +1 -0
- package/es/shared/components/ArrowIcon/index.d.ts +2 -0
- package/es/shared/components/ArrowIcon/index.js +1 -0
- package/es/shared/components/DateIcon/DateIcon.vue.js +1 -0
- package/es/shared/components/DateIcon/index.d.ts +2 -0
- package/es/shared/components/DateIcon/index.js +1 -0
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/ai-chat/src/components/ChatMainInner.js +0 -1
- package/es/components/ai-chat/src/hooks/useProgram.d.ts +0 -6
- package/es/components/ai-chat/src/hooks/useProgram.js +0 -1
- /package/es/components/ai-chat/src/components/{ChatMainInner.d.ts → ChatMainDefault.d.ts} +0 -0
@@ -1,15 +1,18 @@
|
|
1
1
|
import { SFCWithInstall } from '../../shared/types';
|
2
|
+
import { TablePlugin } from './src/types';
|
2
3
|
import { IhoTableInstance } from '../../components/iho-table/src/types';
|
3
4
|
export * from './src/hooks/export';
|
4
5
|
export * from './src/types';
|
6
|
+
export * from './src/plugins';
|
5
7
|
export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => void;
|
8
|
+
export declare const useIhoTablePlugins: (instance: IhoTableInstance, plugins: (() => TablePlugin)[]) => void;
|
6
9
|
declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
7
10
|
tableConfig: {
|
8
|
-
type: import("vue").PropType<import("
|
11
|
+
type: import("vue").PropType<import("./src/types").IhoTableConfig>;
|
9
12
|
default: () => {};
|
10
13
|
};
|
11
14
|
fieldList: {
|
12
|
-
type: import("vue").PropType<import("
|
15
|
+
type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
|
13
16
|
default: () => never[];
|
14
17
|
};
|
15
18
|
tableData: {
|
@@ -37,11 +40,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
37
40
|
}, {
|
38
41
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
39
42
|
tableConfig: {
|
40
|
-
type: import("vue").PropType<import("
|
43
|
+
type: import("vue").PropType<import("./src/types").IhoTableConfig>;
|
41
44
|
default: () => {};
|
42
45
|
};
|
43
46
|
fieldList: {
|
44
|
-
type: import("vue").PropType<import("
|
47
|
+
type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
|
45
48
|
default: () => never[];
|
46
49
|
};
|
47
50
|
tableData: {
|
@@ -134,7 +137,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
134
137
|
onRowDrag?: ((...args: any[]) => any) | undefined;
|
135
138
|
}>>;
|
136
139
|
__emits: (event: "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "keydown" | "keydownStart" | "keydownEnd" | "paste" | "cut" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", ...args: any[]) => void;
|
137
|
-
$xeTable: import("vue").Ref<import("
|
140
|
+
$xeTable: import("vue").Ref<import("./src/types").$VxeTable | undefined>;
|
138
141
|
loading: import("vue").Ref<boolean>;
|
139
142
|
finalLoading: import("vue").ComputedRef<boolean>;
|
140
143
|
themCSSVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
@@ -151,13 +154,13 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
151
154
|
value: unknown;
|
152
155
|
}[]>;
|
153
156
|
hooks: Readonly<{
|
154
|
-
configHooks: import("
|
155
|
-
fieldHooks: import("
|
156
|
-
eventHooks: import("
|
157
|
-
dataHooks: import("
|
158
|
-
setupHooks: import("
|
159
|
-
domInsertHooks: import("
|
160
|
-
exposeHooks: import("
|
157
|
+
configHooks: import("./src/types").AbstractConfigHooks;
|
158
|
+
fieldHooks: import("./src/types").AbstractFieldHooks;
|
159
|
+
eventHooks: import("./src/types").AbstractEventHooks;
|
160
|
+
dataHooks: import("./src/types").AbstractDataHooks;
|
161
|
+
setupHooks: import("./src/types").AbstractSetupHooks;
|
162
|
+
domInsertHooks: import("./src/types").AbstractDomInsertHooks;
|
163
|
+
exposeHooks: import("./src/types").AbstractExposeHooks;
|
161
164
|
}>;
|
162
165
|
uuid: string;
|
163
166
|
$table: import("vue").Ref<import("vxe-table").VxeTableInstance | undefined>;
|
@@ -3253,7 +3256,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3253
3256
|
columnWidth?: number | undefined;
|
3254
3257
|
}[] | undefined;
|
3255
3258
|
} | undefined;
|
3256
|
-
onFormChange?: ((payload_0: import("
|
3259
|
+
onFormChange?: ((payload_0: import("./src/types").IhoTableFormChangePayload) => void) | undefined;
|
3257
3260
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
3258
3261
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
3259
3262
|
onKeydownStart?: ((params: import("vxe-table").VxeTableDefines.KeydownStartEventParams) => void) | undefined;
|
@@ -3315,8 +3318,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3315
3318
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
3316
3319
|
onPageChange?: (() => void) | undefined;
|
3317
3320
|
onSettingClick?: (() => void) | undefined;
|
3318
|
-
onFormClick?: ((payload_0: import("
|
3319
|
-
onKeyboard?: ((payload_0: import("
|
3321
|
+
onFormClick?: ((payload_0: import("./src/types").IhoTableFormChangePayload) => void) | undefined;
|
3322
|
+
onKeyboard?: ((payload_0: import("./src/types").IHoTableKeyboardPayload) => void) | undefined;
|
3320
3323
|
onRowDrag?: ((payload_0: import("sortablejs").SortableEvent) => void) | undefined;
|
3321
3324
|
}>;
|
3322
3325
|
updateConfigRefDebounced: () => void;
|
@@ -3633,7 +3636,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3633
3636
|
tableDataRef: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
3634
3637
|
updateTableDataRefDebounced: () => Promise<void>;
|
3635
3638
|
updateTableDataRef: () => Promise<void>;
|
3636
|
-
tableHandler: import("
|
3639
|
+
tableHandler: import("./src/types").IhoTableHandler;
|
3637
3640
|
eventHookHandler: {
|
3638
3641
|
onScroll: import("vxe-table").VxeTableEvents.Scroll | undefined;
|
3639
3642
|
onKeydown: import("vxe-table").VxeTableEvents.Keydown | undefined;
|
@@ -6847,10 +6850,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6847
6850
|
columnWidth?: number | undefined;
|
6848
6851
|
}[] | undefined;
|
6849
6852
|
} | undefined;
|
6850
|
-
onFormChange?: ((payload_0: import("
|
6853
|
+
onFormChange?: ((payload_0: import("./src/types").IhoTableFormChangePayload) => void) | undefined;
|
6851
6854
|
onSettingClick?: (() => void) | undefined;
|
6852
|
-
onFormClick?: ((payload_0: import("
|
6853
|
-
onKeyboard?: ((payload_0: import("
|
6855
|
+
onFormClick?: ((payload_0: import("./src/types").IhoTableFormChangePayload) => void) | undefined;
|
6856
|
+
onKeyboard?: ((payload_0: import("./src/types").IHoTableKeyboardPayload) => void) | undefined;
|
6854
6857
|
onRowDrag?: ((payload_0: import("sortablejs").SortableEvent) => void) | undefined;
|
6855
6858
|
}>;
|
6856
6859
|
configChanged: boolean;
|
@@ -6864,11 +6867,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6864
6867
|
NConfigProvider: any;
|
6865
6868
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "keydown" | "keydownStart" | "keydownEnd" | "paste" | "cut" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange")[], "toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "formChange" | "settingClick" | "formClick" | "keyboard" | "rowDrag" | "keydown" | "keydownStart" | "keydownEnd" | "paste" | "cut" | "currentChange" | "radioChange" | "checkboxChange" | "checkboxAll" | "checkboxRangeStart" | "checkboxRangeChange" | "checkboxRangeEnd" | "cellClick" | "cellDblclick" | "cellMenu" | "cellMouseenter" | "cellMouseleave" | "headerCellClick" | "headerCellDblclick" | "headerCellMenu" | "footerCellClick" | "footerCellDblclick" | "footerCellMenu" | "sortChange" | "filterChange" | "filterVisible" | "resizableChange" | "menuClick" | "editClosed" | "editActived" | "editDisabled" | "validError" | "custom" | "openFnr" | "fnrChange" | "fnrFind" | "fnrFindAll" | "fnrReplace" | "fnrReplaceAll" | "cellAreaCopy" | "cellAreaCut" | "cellAreaPaste" | "cellAreaMerge" | "clearCellAreaMerge" | "headerCellAreaSelection" | "cellAreaSelectionStart" | "cellAreaSelectionDrag" | "cellAreaSelectionEnd" | "cellAreaExtensionStart" | "cellAreaExtensionDrag" | "cellAreaExtensionEnd" | "cellAreaArrowsStart" | "cellAreaArrowsEnd" | "activeCellChangeStart" | "activeCellChangeEnd" | "pageChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
6866
6869
|
tableConfig: {
|
6867
|
-
type: import("vue").PropType<import("
|
6870
|
+
type: import("vue").PropType<import("./src/types").IhoTableConfig>;
|
6868
6871
|
default: () => {};
|
6869
6872
|
};
|
6870
6873
|
fieldList: {
|
6871
|
-
type: import("vue").PropType<import("
|
6874
|
+
type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
|
6872
6875
|
default: () => never[];
|
6873
6876
|
};
|
6874
6877
|
tableData: {
|
@@ -6960,10 +6963,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6960
6963
|
onKeyboard?: ((...args: any[]) => any) | undefined;
|
6961
6964
|
onRowDrag?: ((...args: any[]) => any) | undefined;
|
6962
6965
|
}, {
|
6963
|
-
fieldList: import("
|
6966
|
+
fieldList: import("./src/types").LowCodeTableFieldItem[];
|
6964
6967
|
parallelism: number;
|
6965
6968
|
uniqueCacheData: boolean;
|
6966
|
-
tableConfig: import("
|
6969
|
+
tableConfig: import("./src/types").IhoTableConfig;
|
6967
6970
|
tableData: import("../../shared/types").AnyObject[];
|
6968
6971
|
developMode: boolean;
|
6969
6972
|
}>>;
|
@@ -1 +1 @@
|
|
1
|
-
import{COMPONENT_NAMESPACE as
|
1
|
+
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import{once as s}from"lodash-es";import i from"./src/IhoTable.vue.js";import n,{commonPlugins as l}from"./src/plugins/index.js";export{commonPlugins}from"./src/plugins/index.js";import"vue";import"./src/constants/index.js";import"@vueuse/shared";import"date-fns";import"./src/utils/separateMap.js";import"../../shared/utils/tapable/SyncHook.js";import"../../shared/utils/tapable/SyncBailHook.js";import"../../shared/utils/tapable/SyncWaterfallHook.js";import"../../shared/utils/tapable/SyncLoopHook.js";import"../../shared/utils/tapable/AsyncParallelHook.js";import"../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../shared/utils/tapable/AsyncSeriesHook.js";import"../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./src/types/pluginType.js";import{useTablePlugin as t}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";export{dateRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js";export{inputRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js";export{levelSearchCascadePlugin}from"./src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";export{numberRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js";export{radioRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js";export{selectRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js";export{separateRendererPlugins}from"./src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js";export{switchRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js";export{timeRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js";export{checkRendererPlugin}from"./src/plugins/rendererPlugins/widgets/checkRendererPlugin.js";export{colorRendererPlugin}from"./src/plugins/rendererPlugins/widgets/colorRendererPlugin.js";export{defaultRendererPlugin}from"./src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js";export{htmlRendererPlugin}from"./src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js";export{labelRendererPlugin}from"./src/plugins/rendererPlugins/widgets/labelRendererPlugin.js";export{pictureRendererPlugin}from"./src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js";export{seqRendererPlugin}from"./src/plugins/rendererPlugins/widgets/seqRendererPlugin.js";const{use:o}=t(),u=s((e=>{o(Object.values(n).map((e=>e())),e)})),d=s(((e,r)=>{o([...Object.values(l),...r].map((e=>e())),e)})),a=i;a.install=function(s){r(s,a,e+"IhoTable")};export{a as default,d as useIhoTablePlugins,u as useIhoTablePresetPlugins};
|
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as e,ref as t,provide as o,computed as a,toRaw as l,nextTick as n,watch as i,resolveComponent as r,openBlock as s,createElementBlock as u,mergeProps as d,unref as c,createBlock as f,resolveDynamicComponent as m,createElementVNode as v,normalizeStyle as p,createVNode as h,withCtx as g,createSlots as b,renderList as x,createCommentVNode as y,renderSlot as k,normalizeProps as
|
1
|
+
import{defineComponent as e,ref as t,provide as o,computed as a,toRaw as l,nextTick as n,watch as i,resolveComponent as r,openBlock as s,createElementBlock as u,mergeProps as d,unref as c,createBlock as f,resolveDynamicComponent as m,createElementVNode as v,normalizeStyle as p,createVNode as h,withCtx as g,createSlots as b,renderList as x,createCommentVNode as y,renderSlot as k,normalizeProps as $,guardReactiveProps as C}from"vue";import{useTheme as D,createOpacityColor as T}from"../../../shared/hooks/useTheme.js";import{useDebounceFn as j}from"@vueuse/core";import"date-fns";import{isString as w,isEqualWith as I,isFunction as R,pick as S}from"lodash-es";import{useFormAsyncQueue as q,presetRequestHandler as H}from"../../../shared/hooks/useFormRequest/index.js";import{hex2rgba as L,widthAppend as P,uuidGenerator as _}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NConfigProvider as A}from"naive-ui";import{useVersion as B}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{VxeTableEventNameList as F,InjectionIhoTableXeInstance as M,InjectionIhoTableLoading as O,InjectionIhoTableEmits as E,InjectionTableAsyncQueue as W,InjectionIhoTableAnnotation as N,InjectionIhoTableUUID as V,InjectionIhoTableInstance as z,InjectionIhoTableConfig as G,InjectionIhoTableFieldList as J,InjectionIhoTableHandler as K,InjectionIhoTableGlobProps as Q}from"./constants/index.js";import{createTableHooks as U,applyTableConfigHooks as X,applyTableFieldHooks as Y,createTableEventHandlers as Z,createDomInsertComponent as ee,createDataTransfer as te}from"./hooks/tapHooks/index.js";import{provideIhoTableEventListener as oe}from"./hooks/tapHooks/useEventHooks.js";import{eventName2EventListener as ae}from"./utils/index.js";const le=["id"];var ne=e({__name:"IhoTable",props:{tableConfig:{type:Object,default:()=>({})},fieldList:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},annotation:{type:Object},requestInstance:{type:Object},uniqueCacheData:{type:Boolean,default:!1},parallelism:{type:Number,default:3},developMode:{type:Boolean,default:!1}},emits:["formChange","settingClick","formClick","keyboard","rowDrag",...F],setup(e,{expose:F,emit:ne}){var ie,re;const se=e,ue=t();o(M,ue);const de=t(!1),ce=a((()=>{var e;return(null==(e=se.tableConfig)?void 0:e.loading)||de.value}));o(O,de);const fe=D({"--c-border-color":"#d0d0d0","--c-head-bg-color":"#f2f2f2","--c-hover-color":"#e6e6e6","--c-stripe-color":"#f6f6f6"}),me=a((()=>{var e,t,o;const a={...fe.value};return a["--c-primary-color-opacity3"]=T(...L(a["--c-primary-color"]+""),.3),a["--c-scrollbar-width"]=P(null!=(o=null==(t=null==(e=ue.value)?void 0:e.reactData)?void 0:t.scrollbarWidth)?o:0),a})),ve=a((()=>{var e,t;const o=null!=(t=null==(e=se.tableConfig)?void 0:e.height)?t:"100%";return{height:"auto"===o?"100%":w(o)&&(o.includes("calc")||o.endsWith("%"))?o:P(o)}})),pe=oe(),he=function(e,...t){ne(e,...t);const o=c(ke)[ae(e)];R(o)&&o(...t),pe.trigger(e,...t)};o(E,he);const ge=q(a((()=>se.requestInstance)),a((()=>!!se.uniqueCacheData))).create(se.parallelism,{beforeRequest:(e,t)=>t,afterRequest:(e,t)=>H(t)});o(W,ge);const be=U();o(N,a((()=>se.annotation)));const xe=_();o(V,xe);const ye=t();o(z,ye);const ke=t({uuid:null!=(re=null==(ie=se.tableConfig)?void 0:ie.uuid)?re:xe});o(G,ke);const $e=j(Ce,10);function Ce(){var e,t;ke.value=X(be,{...se.tableConfig,uuid:null!=(t=null==(e=se.tableConfig)?void 0:e.uuid)?t:xe},{$table:ye,emits:he,globProps:se,loading:de,$xeTable:ue})}const De=a((()=>{if(!ke.value.tableRowHeight)return{};const e=P(ke.value.rowConfig.height);return{Input:{heightLarge:e,heightMedium:e,heightSmall:e,heightTiny:e},InternalSelection:{heightLarge:e,heightMedium:e,heightSmall:e,heightTiny:e}}})),Te=t([]);o(J,Te);const je=j(we,10);function we(){const e=Y(be,se.fieldList,ke.value,{$table:ye,emits:he,loading:de,globProps:se,$xeTable:ue});I(e,l(Te.value),((e,t)=>{if(R(e)&&R(t))return e.toString()===t.toString()}))||(Te.value=e)}const Ie=te(be,ke,{$table:ye,emits:he,loading:de,globProps:se,$xeTable:ue});let Re=null;function Se(e){Re=e}async function qe(){await n(),null==Re||Re(),Re=null}const He=t([]);async function Le(){var e,t,o,a;const l=await Ie(se.tableData),i=null==(e=ye.value)?void 0:e.getTableData().fullData;if(i){let e=0;if(!(i.some((t=>{var o;if(!(null==(o=ye.value)?void 0:o.isInsertByRow(t))){if(t!==l[e])return!0;e++}}))||e!==l.length))return void qe()}He.value=l,(null==(t=ke.value.treeConfig)?void 0:t.expandAll)?(await n(),null==(o=ye.value)||o.setAllTreeExpand(!0)):null==(a=ye.value)||a.recalculate(!0),qe()}const Pe={updateTableDataRef:j(Le,10),updateConfigRef:$e,updateFieldListRef:je};o(K,Pe),o(Q,se);const _e=Z({hooks:be,config:ke,$table:ye,context:Pe,emits:he,globProps:se,loading:de,$xeTable:ue}),Ae=a((()=>({...ke.value,..._e})));let Be=!1,Fe=!1,Me=!1;const Oe=j((()=>{Be&&Ce(),Fe&&we(),Me&&Le(),Be=!1,Fe=!1,Me=!1}),10);i((()=>se.tableConfig),(()=>{Be=!0,Fe=!0,Me=!0,Oe()}),{deep:!0}),i((()=>se.fieldList),(()=>{Fe=!0,Me=!0,Oe()}),{deep:!0}),i([()=>[...se.tableData],()=>{var e;return null==(e=se.tableData)?void 0:e.length}],(()=>{Me=!0,Oe()})),Ce(),we(),Le();const{header:Ee,footer:We}=ee(be);function Ne(e){return S(e,["row","rowIndex","$rowIndex","column","columnIndex","$columnIndex","_columnIndex","checked","disabled","indeterminate"])}return F({$table:ye,async loadData(e){var t;null==(t=ye.value)||t.loadData(await Ie(e))},setSort:(e,t)=>({field:e,value:t}),setFilter:(e,t)=>({field:e,value:t}),tableDataResolved:()=>new Promise(Se),reload(){var e,t;null==(e=ye.value)||e.loadColumn([]),null==(t=ye.value)||t.loadData([]),Ce(),we(),Le()},verticalTable:{update:()=>{}},...be.exposeHooks.expose.call({},ke,{$table:ye,emits:he,globProps:se,loading:de,$xeTable:ue,...Pe})}),be.setupHooks.setup.call(ke,Te,{$table:ye,emits:he,globProps:se,loading:de,$xeTable:ue}),(e,t)=>{const o=r("vxe-grid");return s(),u("section",d({class:"iho-table",id:c(xe),style:c(me)},c(B)()),[(s(),f(m(c(Ee)))),v("section",{style:p(c(ve))},[h(c(A),{abstract:"",namespace:"vxe-table--ignore-clear","theme-overrides":c(De)},{default:g((()=>[h(o,d({ref_key:"$table",ref:ye},c(Ae),{columns:Te.value,data:He.value,loading:c(ce)}),b({_:2},[x(e.$slots,((t,o)=>({name:o,fn:g((t=>[y(" 实际上所有的vxe-grid插槽都支持 "),k(e.$slots,o,$(C(Ne(t))))]))})))]),1040,["columns","data","loading"])])),_:3},8,["theme-overrides"])],4),(s(),f(m(c(We))))],16,le)}}});export{ne as default};
|
@@ -85,7 +85,7 @@ export declare function createTableEventHandlers({ hooks, config, $table, emits,
|
|
85
85
|
onActiveCellChangeEnd: import("vxe-table").VxeTableEvents.ActiveCellChangeEnd | undefined;
|
86
86
|
onPageChange: unknown;
|
87
87
|
};
|
88
|
-
export declare function createDataTransfer(hooks: TableHooks, config: MaybeRef<IhoTableConfig>,
|
88
|
+
export declare function createDataTransfer(hooks: TableHooks, config: MaybeRef<IhoTableConfig>, handler: MaybeRef<IhoTableHandlerContext>): (data: AnyObject[]) => Promise<AnyObject[]>;
|
89
89
|
export declare function createDomInsertComponent(hooks: TableHooks): {
|
90
90
|
header: any;
|
91
91
|
footer: any;
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e}from"../../../../../shared/utils/index.js";import{cloneDeep as o,isArray as t}from"lodash-es";import{unref as r,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i,eventName2EventListener as a}from"../../utils/index.js";import{useConfigHooks as l}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as c}from"./useDomInsertHooks.js";import{useEventHooks as d}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as m}from"./useFieldHooks.js";import{useSetupHooks as p}from"./useSetupHooks.js";const k=(()=>{let e=null;return()=>e||(e=Object.freeze({configHooks:l().create(),fieldHooks:m().create(),eventHooks:d().create(),dataHooks:f().create(),setupHooks:p().create(),domInsertHooks:c().create(),exposeHooks:u().create()}))})();function H(e,t,r){const s=e.configHooks.config.call(o(t),r);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((o=>{s[o]=e.configHooks[o].call(s[o],s,r)})),s}function g(r,s,n,i){r.fieldHooks.fieldStart.promise(n,i);let a=function o(s){return s.reduce(((s,a,l)=>{const f=[],c=[];let d=!1;return a=r.fieldHooks.field.call(a,{index:l,remove(){d=!0},insertAfter(o){c.push(...e(o))},insertBefore(o){f.push(...e(o))}},n,i),s.push(...f),d||(s.push(a),t(a.children)&&(a.children=o(a.children))),s.push(...c),s}),[])}(o(s));return a=r.fieldHooks.fieldList.call(a,n,i),r.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:e,config:o,$table:t,emits:s,context:l,globProps:f,loading:c,$xeTable:d}){return n.reduce(((n,u)=>(n[u]=n=>function(n,u){var m;const p=i(n);if(!(u=e.eventHooks.beforeEvent.call(u,r(o),{$table:r(t),emits:s,globProps:f,loading:c,$xeTable:d,...l},p)))return;Reflect.get(u,"eventName")?(s(u.eventName,u),n=a(u.eventName)):s(p,u);null==(m=e.eventHooks[n])||m.promise(u,r(o),{$table:r(t),globProps:f,emits:s,loading:c,$xeTable:d,...l})}(u,n),n)),{})}function b(o,t,s){return async n=>{o.dataHooks.dataStart.promise(r(t));let i=await n.reduce((async(n,i,a)=>{const l=[],f=[];let c=!1;await o.dataHooks.data.promise(i,r(t),{index:a,$table:s,insertBefore(o){l.push(...e(o))},insertAfter(o){f.push(...e(o))},remove(){c=!0}});const d=await n;return d.push(...l),!c&&d.push(i),d.push(...f),d}),Promise.resolve([]));return i=o.dataHooks.dataList.call(i,r(t)),o.dataHooks.dataEnd.promise(r(t)),i}}function C(e){return{header:s({name:"IhoTableHeader",render:()=>e.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>e.domInsertHooks.footer.call([])})}}export{H as applyTableConfigHooks,g as applyTableFieldHooks,b as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,k as createTableHooks};
|
1
|
+
import{arrayed as e}from"../../../../../shared/utils/index.js";import{cloneDeep as o,isArray as t}from"lodash-es";import{unref as r,defineComponent as s}from"vue";import{VxeEventListenerNameList as n}from"../../constants/index.js";import{eventListener2EventName as i,eventName2EventListener as a}from"../../utils/index.js";import{useConfigHooks as l}from"./useConfigHooks.js";import{useDataHooks as f}from"./useDataHooks.js";import{useDomInsertHooks as c}from"./useDomInsertHooks.js";import{useEventHooks as d}from"./useEventHooks.js";import{useExposeHooks as u}from"./useExposeHooks.js";import{useFieldHooks as m}from"./useFieldHooks.js";import{useSetupHooks as p}from"./useSetupHooks.js";const k=(()=>{let e=null;return()=>e||(e=Object.freeze({configHooks:l().create(),fieldHooks:m().create(),eventHooks:d().create(),dataHooks:f().create(),setupHooks:p().create(),domInsertHooks:c().create(),exposeHooks:u().create()}))})();function H(e,t,r){const s=e.configHooks.config.call(o(t),r);return["rowConfig","editConfig","columnConfig","resizableConfig","seqConfig","sortConfig","filterConfig","radioConfig","checkboxConfig","expandConfig","treeConfig","mouseConfig","menuConfig","keyboardConfig","scrollY","scrollX","editRules"].forEach((o=>{s[o]=e.configHooks[o].call(s[o],s,r)})),s}function g(r,s,n,i){r.fieldHooks.fieldStart.promise(n,i);let a=function o(s){return s.reduce(((s,a,l)=>{const f=[],c=[];let d=!1;return a=r.fieldHooks.field.call(a,{index:l,remove(){d=!0},insertAfter(o){c.push(...e(o))},insertBefore(o){f.push(...e(o))}},n,i),s.push(...f),d||(s.push(a),t(a.children)&&(a.children=o(a.children))),s.push(...c),s}),[])}(o(s));return a=r.fieldHooks.fieldList.call(a,n,i),r.fieldHooks.fieldEnd.promise(n,i),a}function h({hooks:e,config:o,$table:t,emits:s,context:l,globProps:f,loading:c,$xeTable:d}){return n.reduce(((n,u)=>(n[u]=n=>function(n,u){var m;const p=i(n);if(!(u=e.eventHooks.beforeEvent.call(u,r(o),{$table:r(t),emits:s,globProps:f,loading:c,$xeTable:d,...l},p)))return;Reflect.get(u,"eventName")?(s(u.eventName,u),n=a(u.eventName)):s(p,u);null==(m=e.eventHooks[n])||m.promise(u,r(o),{$table:r(t),globProps:f,emits:s,loading:c,$xeTable:d,...l})}(u,n),n)),{})}function b(o,t,s){return async n=>{o.dataHooks.dataStart.promise(r(s),r(t));let i=await n.reduce((async(n,i,a)=>{const l=[],f=[];let c=!1;await o.dataHooks.data.promise(i,r(t),{index:a,$table:r(s).$table,insertBefore(o){l.push(...e(o))},insertAfter(o){f.push(...e(o))},remove(){c=!0}});const d=await n;return d.push(...l),!c&&d.push(i),d.push(...f),d}),Promise.resolve([]));return i=o.dataHooks.dataList.call(i,r(t)),o.dataHooks.dataEnd.promise(r(s),r(t)),i}}function C(e){return{header:s({name:"IhoTableHeader",render:()=>e.domInsertHooks.header.call([])}),footer:s({name:"IhoTableFooter",render:()=>e.domInsertHooks.footer.call([])})}}export{H as applyTableConfigHooks,g as applyTableFieldHooks,b as createDataTransfer,C as createDomInsertComponent,h as createTableEventHandlers,k as createTableHooks};
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { AnyObject } from '../../../../../shared/types';
|
2
2
|
import { AsyncParallelHook, AsyncSeriesHook, SyncWaterfallHook } from '../../../../../shared/utils/tapable';
|
3
|
-
import { AbstractDataHooks } from '../../../../../components/iho-table/src/types';
|
3
|
+
import { AbstractDataHooks, IhoTableHandlerContext } from '../../../../../components/iho-table/src/types';
|
4
4
|
declare class TableDataHooks extends AbstractDataHooks {
|
5
|
-
readonly dataStart: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
5
|
+
readonly dataStart: AsyncParallelHook<[IhoTableHandlerContext, import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
6
6
|
readonly data: AsyncSeriesHook<[AnyObject, import("../../../../../components/iho-table/src/types").IhoTableConfig, {
|
7
7
|
remove(): void;
|
8
8
|
$table: import("@vueuse/shared").MaybeRef<import("../../../../../shared/types").Nullable<import("vxe-table").VxeTableInstance>>;
|
@@ -10,7 +10,7 @@ declare class TableDataHooks extends AbstractDataHooks {
|
|
10
10
|
insertBefore(data: import("../../../../../shared/types").ArrayAble<AnyObject>): void;
|
11
11
|
insertAfter(data: import("../../../../../shared/types").ArrayAble<AnyObject>): void;
|
12
12
|
}], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
13
|
-
readonly dataEnd: AsyncParallelHook<[import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
13
|
+
readonly dataEnd: AsyncParallelHook<[IhoTableHandlerContext, import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
14
14
|
readonly dataList: SyncWaterfallHook<[AnyObject[], import("../../../../../components/iho-table/src/types").IhoTableConfig], import("../../../../../shared/utils/tapable").UnsetAdditionalOptions>;
|
15
15
|
}
|
16
16
|
export declare function useDataHooks(): {
|
@@ -1 +1 @@
|
|
1
|
-
import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import t from"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import a from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import s from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as o}from"../../types/pluginType.js";class e extends o{constructor(){super(...arguments),this.dataStart=new a(["config"]),this.data=new s(["rowData","context","config"]),this.dataEnd=new a(["config"]),this.dataList=new t(["dataList","config"])}}function r(){return{create:function(){return new e}}}export{r as useDataHooks};
|
1
|
+
import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import t from"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import a from"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import s from"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{AbstractDataHooks as o}from"../../types/pluginType.js";class e extends o{constructor(){super(...arguments),this.dataStart=new a(["config","context"]),this.data=new s(["rowData","context","config"]),this.dataEnd=new a(["config","context"]),this.dataList=new t(["dataList","config"])}}function r(){return{create:function(){return new e}}}export{r as useDataHooks};
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as o}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import{createTableHooks as
|
1
|
+
import{arrayed as o}from"../../../../shared/utils/index.js";import{isFunction as r}from"lodash-es";import{createTableHooks as e}from"./tapHooks/index.js";function n(){const n=e(),t=new Set;return{use:function e(s,i){return o(s).forEach((({name:o,vxe:e,apply:s})=>{t.has(o)||(t.add(o),r(e)&&e(i),r(s)&&s(n))})),{use:e}}}}function t(o){return o}export{t as defineTablePlugin,n as useTablePlugin};
|
@@ -1 +1 @@
|
|
1
|
-
import{createVNode as e}from"vue";import{jsonParse as
|
1
|
+
import{createVNode as e,onBeforeUnmount as l}from"vue";import{jsonParse as t,arrayed as i}from"../../../../../shared/utils/index.js";import{isObject as r}from"@vue/shared";import{isArray as o,isString as n,first as u,findLastIndex as d}from"lodash-es";import"../../../index.js";import{useUUIDMap as a,IhoTableRenderHelper as s,isCompatibleColumn as f,createIhoTableFilterMethod as v}from"../../utils/index.js";import c from"./filter.vue.js";import{defineTablePlugin as p}from"../../hooks/useTablePlugin.js";function m(){const m="filterRenderPlugin";return p({name:m,vxe(l){l.renderer.mixin({[m]:{showFilterFooter:!1,renderFilter:(l,t)=>e(c,{payload:t,key:t.column.field},null)}})},apply(e){const{getItemFromUUID:c,setItemFromUUID:p,removeItemFromUUID:g}=a((()=>[]),!1);e.fieldHooks.field.tap(m,((e,l,i,{$table:d})=>{var a,c,p,h,g,b,k,F,x,y;const O=null==(a=e.editRender)?void 0:a.props;if(!r(O))return e;if(!s.hasOptionFilter(O))return e;e.editRender={...e.editRender,props:{...null==(c=e.editRender)?void 0:c.props,sortable:e.sortable}},e.filterRender={name:m};const R=null==(p=d.value)?void 0:p.getColumnByField(e.field),$={};let j;if(R&&o(R.filters)&&R.filters.forEach((e=>{e&&($[`${e.label}_${e.value}`]=e.checked)})),f(O))j=null!=(h=O.options)?h:[];else{const e=null==(b=null==(g=O.settingObj)?void 0:g.showSetting)?void 0:b.reduce(((e,l)=>{var t,i,r;return l&&l.change_text&&null!=(null==(i=null==(t=l.filter)?void 0:t[0])?void 0:i.value)&&e.push({label:l.change_text,value:l.filter[0].value,data:null!=(r=l.filter[0].keyword)?r:l.filter[0].value}),e}),[]);if(null==e?void 0:e.length)j=e;else{j=null!=(x=null==(F=null==(k=(r(O.fieldSetting)?O.fieldSetting:n(O.fieldSetting)?t(O.fieldSetting||""):{}).mapping)?void 0:k.mappingFiled)?void 0:F.reduce(((e,l)=>{var t;const i=u(l.value);return r(i)&&e.push({label:l.key||i.key,value:i.value,data:null!=(t=i.keyword)?t:i.value}),e}),[]))?x:[]}}if(e.filters=j.reduce(((e,l)=>(r(l)&&e.push({...l,checked:!!$[`${l.label}_${l.value}`]}),e)),[]),!e.filterMethod){const l=null==(y=i.treeConfig)?void 0:y.children;e.filterMethod=v(l)}return i.filterConfig={iconMatch:"iho-table--iconfont iho-table-icon-filter",iconNone:"iho-table--iconfont iho-table-icon-filter",...i.filterConfig},e})),e.fieldHooks.fieldList.tap(m,((e,l)=>l.uuid?(p(l.uuid,e),e):e)),e.dataHooks.dataEnd.tapPromise(m,(async({$xeTable:e,$table:l},t)=>{var i;if(!l.value||!t.uuid)return;const r=c(t.uuid);if(null==(i=t.sortConfig)?void 0:i.multiple){const e=r.reduce(((e,t)=>{var i;const r=null==(i=t.editRender)?void 0:i.props;if(!t.sortable)return e;if(r&&h(r.isOrder)){const i=l.value.getColumnByField(t.field);(null==i?void 0:i.order)!==r.isOrder&&e.push({field:t.field,order:(null==i?void 0:i.order)?i.order:r.isOrder})}return e}),[]);if(!e.length)return;await l.value.sort(e)}else d(r,(e=>{var t;const i=null==(t=e.editRender)?void 0:t.props;if(i&&h(i.isOrder))return e&&l.value.sort(e.field,i.isOrder),!0}))})),e.setupHooks.setup.tap(m,((e,t)=>{l((()=>{e.value.uuid&&g(e.value.uuid)}))})),e.exposeHooks.expose.tap(m,((e,l,{$table:t})=>(Object.assign(e,{setSort(e,l){t.value&&t.value.sort(e,l)},setFilter(e,l){if(!t.value)return;const r=t.value.getColumnByField(e);if(!r||!o(r.filters))return;const n=i(l);r.filters.forEach((e=>{e.checked=n.includes(e.value)})),t.value.updateData()}}),e)))}})}function h(e){return["asc","desc",null].includes(e)}export{m as filterRenderPlugin};
|
@@ -1 +1 @@
|
|
1
|
-
export
|
1
|
+
export declare function HeaderPlugin(): import("../../../../../components/iho-table").TablePlugin;
|
@@ -1 +1 @@
|
|
1
|
-
import{useAttrs as e,onBeforeUnmount as l,inject as t,createVNode as o,mergeProps as n}from"vue";import{arrayed as i,widthAppend as r}from"../../../../../shared/utils/index.js";import{CodeSlash as s}from"@vicons/ionicons5";import{isObject as a,isString as u,isFunction as d}from"lodash-es";import c from"../../../../annotation-edit/index.js";import"../../../index.js";import{InjectionIhoTableAnnotation as m,InjectionIhoTableConfig as v,InjectionIhoTableXeInstance as f,InjectionIhoTableGlobProps as h}from"../../constants/index.js";import{getLowCodeFieldFromField as p,IhoTableRenderHelper as b}from"../../utils/index.js";import x from"./tooltipMessage.vue.js";import{defineTablePlugin as w}from"../../hooks/useTablePlugin.js";function g(){const g="headerPlugin";return w({name:g,apply(w){let j=null;w.setupHooks.setup.tap(g,(()=>{j=e(),l((()=>{j=null}))})),w.fieldHooks.field.tap(g,((e,l,w)=>{var g;const O=null==(g=e.slots)?void 0:g.header;return e.slots={...e.slots,header:l=>function(e,l,p){var w;const g=t(m),O=t(v),D=t("$xetable"),H=t(f);H&&!(null==H?void 0:H.value)&&(H.value=D);const M=null!=e.column.showHeaderOverflow?0!=e.column.showHeaderOverflow:0!=O.value.showHeaderOverflow,W=e.column||{},y=a(null==g?void 0:g.value)&&!1!==l.annotation,k=b.isEditableColumn(O.value,W),P=b.hasFilter(l),$=b.hasTitlePrefix(e.column),C=u(p)?p:d(p)?p(e):null;let R=null==(w=l.settingObj)?void 0:w.fieldDescDev;if(u(R)&&R){const e=t(h);R=(null==e?void 0:e.developMode)?R:""}let S=!1;if(O.value){const e=O.value.editRules&&O.value.editRules[W.field];e&&(S=i(e).some((e=>e.required)))}const T=O.value.border?Math.max(2,Math.ceil(D.reactData.scrollbarWidth/D.reactData.tableColumn.length)):1,V=r(Math.max(0,W.renderWidth-20-T-(S?14:0)-(y?18:0)-(P?23:0)-(k?22:0)-($?20:0)-(W.sortable?23:0)-(R?20:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:V}},[null!=C?C:o("div",n({style:M?{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{maxWidth:"100%"}},function(){var e;const t=null==(e=l.settingObj)?void 0:e.fieldDescribe;return t?{title:`${W.title}\n${t}`}:{}}()),[function(){const e=W.title,l=/\\n|\n|\r/g;if(!l.test(e))return e;const t=e.replace(l,"<br>").split("<br>");return t.map(((e,l)=>[e,l===t.length-1?null:o("br",null,null)]))}()])]),R?o(x,{message:R},{trigger:()=>o(s,{style:"width:14px"},null)}):null,y?o(c,{modelValue:g.value[W.field],"onUpdate:modelValue":e=>g.value[W.field]=e,shortcuts:j&&(j["annotation-shortcuts"]||j.annotationShortcuts)||[]},null):null])}(l,p(e),O)},e}))}})}export{g as
|
1
|
+
import{useAttrs as e,onBeforeUnmount as l,inject as t,createVNode as o,mergeProps as n}from"vue";import{arrayed as i,widthAppend as r}from"../../../../../shared/utils/index.js";import{CodeSlash as s}from"@vicons/ionicons5";import{isObject as a,isString as u,isFunction as d}from"lodash-es";import c from"../../../../annotation-edit/index.js";import"../../../index.js";import{InjectionIhoTableAnnotation as m,InjectionIhoTableConfig as v,InjectionIhoTableXeInstance as f,InjectionIhoTableGlobProps as h}from"../../constants/index.js";import{getLowCodeFieldFromField as p,IhoTableRenderHelper as b}from"../../utils/index.js";import x from"./tooltipMessage.vue.js";import{defineTablePlugin as w}from"../../hooks/useTablePlugin.js";function g(){const g="headerPlugin";return w({name:g,apply(w){let j=null;w.setupHooks.setup.tap(g,(()=>{j=e(),l((()=>{j=null}))})),w.fieldHooks.field.tap(g,((e,l,w)=>{var g;const O=null==(g=e.slots)?void 0:g.header;return e.slots={...e.slots,header:l=>function(e,l,p){var w;const g=t(m),O=t(v),D=t("$xetable"),H=t(f);H&&!(null==H?void 0:H.value)&&(H.value=D);const M=null!=e.column.showHeaderOverflow?0!=e.column.showHeaderOverflow:0!=O.value.showHeaderOverflow,W=e.column||{},y=a(null==g?void 0:g.value)&&!1!==l.annotation,k=b.isEditableColumn(O.value,W),P=b.hasFilter(l),$=b.hasTitlePrefix(e.column),C=u(p)?p:d(p)?p(e):null;let R=null==(w=l.settingObj)?void 0:w.fieldDescDev;if(u(R)&&R){const e=t(h);R=(null==e?void 0:e.developMode)?R:""}let S=!1;if(O.value){const e=O.value.editRules&&O.value.editRules[W.field];e&&(S=i(e).some((e=>e.required)))}const T=O.value.border?Math.max(2,Math.ceil(D.reactData.scrollbarWidth/D.reactData.tableColumn.length)):1,V=r(Math.max(0,W.renderWidth-20-T-(S?14:0)-(y?18:0)-(P?23:0)-(k?22:0)-($?20:0)-(W.sortable?23:0)-(R?20:0)));return o("section",{class:"iho-table__headerWrapper"},[o("section",{style:{width:V}},[null!=C?C:o("div",n({style:M?{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{maxWidth:"100%"}},function(){var e;const t=null==(e=l.settingObj)?void 0:e.fieldDescribe;return t?{title:`${W.title}\n${t}`}:{}}()),[function(){const e=W.title,l=/\\n|\n|\r/g;if(!l.test(e))return e;const t=e.replace(l,"<br>").split("<br>");return t.map(((e,l)=>[e,l===t.length-1?null:o("br",null,null)]))}()])]),R?o(x,{message:R},{trigger:()=>o(s,{style:"width:14px"},null)}):null,y?o(c,{modelValue:g.value[W.field],"onUpdate:modelValue":e=>g.value[W.field]=e,shortcuts:j&&(j["annotation-shortcuts"]||j.annotationShortcuts)||[]},null):null])}(l,p(e),O)},e}))}})}export{g as HeaderPlugin};
|
@@ -1 +1 @@
|
|
1
|
-
import{traverse as o,hex2rgba as r}from"../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import"../../index.js";import{useUUIDMap as e,mergeVxeClass as i}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function s(){const s="highLightSetPlugin",{getItemFromUUID:u,removeItemFromUUID:l,setItemFromUUID:a}=e((()=>!1));return n({name:s,apply(e){e.dataHooks.data.tapPromise(s,(async(r,t)=>{if(!t.uuid||u(t.uuid))return;let e=!1;o(r,((o,r)=>{(o.rowColor||o.fontColor)&&(e=!0,r())}),["children","childrenList"]),e&&a(t.uuid,!0)})),e.dataHooks.dataEnd.tap(s,(o=>{if(!
|
1
|
+
import{traverse as o,hex2rgba as r}from"../../../../shared/utils/index.js";import{isFunction as t}from"lodash-es";import"../../index.js";import{useUUIDMap as e,mergeVxeClass as i}from"../utils/index.js";import{defineTablePlugin as n}from"../hooks/useTablePlugin.js";function s(){const s="highLightSetPlugin",{getItemFromUUID:u,removeItemFromUUID:l,setItemFromUUID:a}=e((()=>!1));return n({name:s,apply(e){e.dataHooks.data.tapPromise(s,(async(r,t)=>{if(!t.uuid||u(t.uuid))return;let e=!1;o(r,((o,r)=>{(o.rowColor||o.fontColor)&&(e=!0,r())}),["children","childrenList"]),e&&a(t.uuid,!0)})),e.dataHooks.dataEnd.tap(s,((o,e)=>{if(!e.uuid||!u(e.uuid))return;const n=e.rowStyle;e.rowStyle=function(o){if(o.row.rowColor||o.row.fontColor){const[e,i,s,u]=r(o.row.rowColor||"",.2),l={"--row-background-color":`rgba(${e}, ${i}, ${s}, ${u})`,color:o.row.fontColor};return t(n)?Object.assign(l,n(o)):l}return t(n)?n(o):null};const s=e.rowClassName;e.rowClassName=i((o=>o.row.rowColor?"row--custom":null),s),l(e.uuid)}))}})}export{s as highLightSetPlugin};
|
@@ -1,3 +1,81 @@
|
|
1
1
|
import { TablePlugin } from '../../../../components/iho-table';
|
2
|
+
import { anchorPlugin } from './anchorPlugin/index';
|
3
|
+
import { bindEventSettingPlugin } from './bindEventSettingPlugin';
|
4
|
+
import { colorAndIconPlugin } from './colorAndIconPlugin';
|
5
|
+
import { copyPastePlugin } from './copyPastePlugin';
|
6
|
+
import { crossHeaderPlugin } from './crossHeaderPlugin';
|
7
|
+
import { defaultConfigPlugin } from './defaultConfigPlugin';
|
8
|
+
import { defaultValuePlugin } from './defaultValuePlugin';
|
9
|
+
import { dragScrollPlugin } from './dragScrollPlugin';
|
10
|
+
import { dynamicFilterRenderPlugin } from './dynamicFilterRenderPlugin/index';
|
11
|
+
import { filterDaterangeRenderPlugin } from './filterDaterangeRenderPlugin/index';
|
12
|
+
import { filterRemoteSearchPlugin } from './filterRemoteSearchPlugin/index';
|
13
|
+
import { filterRenderPlugin } from './filterRenderPlugin/index';
|
14
|
+
import { filterTextRenderPlugin } from './filterTextPlugin/index';
|
15
|
+
import { filterVisibleEventPlugin } from './filterVisibleEventPlugin';
|
16
|
+
import { forceArrowKeyPlugin } from './forceArrowKeyPlugin';
|
17
|
+
import { HeaderPlugin } from './headerPlugin/index';
|
18
|
+
import { highLightSetPlugin } from './highLightSetPlugin';
|
19
|
+
import { keyboardEventPlugin } from './keyboardEventPlugin';
|
20
|
+
import { lowCodeFieldAdaptorPlugin } from './lowCodeFieldAdaptorPlugin';
|
21
|
+
import { maxCheckSizePlugin } from './maxCheckSizePlugin';
|
22
|
+
import { operationalFormPlugin } from './operationalFormPlugin';
|
23
|
+
import { pagerScrollPlugin } from './pagerScrollPlugin/index';
|
24
|
+
import { rowClickPlugin } from './rowClickPlugin';
|
25
|
+
import { rowDragPlugin } from './rowDragPlugin';
|
26
|
+
import { rowGroupSettingPlugin } from './rowGroupSettingPlugin/index';
|
27
|
+
import { stickyFixedPlugin } from './stickyFixedPlugin';
|
28
|
+
import { variableHeightRendererPlugin } from './varialbleHeightPlugin';
|
29
|
+
import { verticalTablePlugin } from './verticalTablePlugin/index';
|
30
|
+
import { virtualTreePlugin } from './virtualTreePlugin';
|
31
|
+
import { wordbookSettingPlugin } from './wordbookSettingPlugin';
|
32
|
+
export declare const commonPlugins: {
|
33
|
+
anchorPlugin: typeof anchorPlugin;
|
34
|
+
bindEventSettingPlugin: typeof bindEventSettingPlugin;
|
35
|
+
colorAndIconPlugin: typeof colorAndIconPlugin;
|
36
|
+
copyPastePlugin: typeof copyPastePlugin;
|
37
|
+
crossHeaderPlugin: typeof crossHeaderPlugin;
|
38
|
+
defaultConfigPlugin: typeof defaultConfigPlugin;
|
39
|
+
defaultValuePlugin: typeof defaultValuePlugin;
|
40
|
+
dragScrollPlugin: typeof dragScrollPlugin;
|
41
|
+
dynamicFilterRenderPlugin: typeof dynamicFilterRenderPlugin;
|
42
|
+
filterDaterangeRenderPlugin: typeof filterDaterangeRenderPlugin;
|
43
|
+
filterRemoteSearchPlugin: typeof filterRemoteSearchPlugin;
|
44
|
+
filterRenderPlugin: typeof filterRenderPlugin;
|
45
|
+
filterTextRenderPlugin: typeof filterTextRenderPlugin;
|
46
|
+
filterVisibleEventPlugin: typeof filterVisibleEventPlugin;
|
47
|
+
forceArrowKeyPlugin: typeof forceArrowKeyPlugin;
|
48
|
+
HeaderPlugin: typeof HeaderPlugin;
|
49
|
+
highLightSetPlugin: typeof highLightSetPlugin;
|
50
|
+
keyboardEventPlugin: typeof keyboardEventPlugin;
|
51
|
+
lowCodeFieldAdaptorPlugin: typeof lowCodeFieldAdaptorPlugin;
|
52
|
+
maxCheckSizePlugin: typeof maxCheckSizePlugin;
|
53
|
+
operationalFormPlugin: typeof operationalFormPlugin;
|
54
|
+
pagerScrollPlugin: typeof pagerScrollPlugin;
|
55
|
+
rowClickPlugin: typeof rowClickPlugin;
|
56
|
+
rowDragPlugin: typeof rowDragPlugin;
|
57
|
+
rowGroupSettingPlugin: typeof rowGroupSettingPlugin;
|
58
|
+
stickyFixedPlugin: typeof stickyFixedPlugin;
|
59
|
+
variableHeightRendererPlugin: typeof variableHeightRendererPlugin;
|
60
|
+
verticalTablePlugin: typeof verticalTablePlugin;
|
61
|
+
virtualTreePlugin: typeof virtualTreePlugin;
|
62
|
+
wordbookSettingPlugin: typeof wordbookSettingPlugin;
|
63
|
+
};
|
2
64
|
declare const _default: Record<string, () => TablePlugin>;
|
3
65
|
export default _default;
|
66
|
+
export { dateRendererPlugin } from './rendererPlugins/editableWidgets/dateRendererPlugin/index';
|
67
|
+
export { inputRendererPlugin } from './rendererPlugins/editableWidgets/inputRendererPlugin';
|
68
|
+
export { levelSearchCascadePlugin } from './rendererPlugins/editableWidgets/levelSearchCascadePlugin/index';
|
69
|
+
export { numberRendererPlugin } from './rendererPlugins/editableWidgets/numberRendererPlugin';
|
70
|
+
export { radioRendererPlugin } from './rendererPlugins/editableWidgets/radioRendererPlugin';
|
71
|
+
export { selectRendererPlugin } from './rendererPlugins/editableWidgets/selectRendererPlugin/index';
|
72
|
+
export { separateRendererPlugins } from './rendererPlugins/editableWidgets/separateRendererPlugin/index';
|
73
|
+
export { switchRendererPlugin } from './rendererPlugins/editableWidgets/switchRendererPlugin';
|
74
|
+
export { timeRendererPlugin } from './rendererPlugins/editableWidgets/timeRendererPlugin/index';
|
75
|
+
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin';
|
76
|
+
export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin';
|
77
|
+
export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin';
|
78
|
+
export { htmlRendererPlugin } from './rendererPlugins/widgets/htmlRendererPlugin';
|
79
|
+
export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin';
|
80
|
+
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin';
|
81
|
+
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin';
|
@@ -1 +1 @@
|
|
1
|
-
import*as e from"./anchorPlugin/index.js";import
|
1
|
+
import*as e from"./anchorPlugin/index.js";import{anchorPlugin as r}from"./anchorPlugin/index.js";import*as i from"./bindEventSettingPlugin.js";import{bindEventSettingPlugin as n}from"./bindEventSettingPlugin.js";import*as l from"./colorAndIconPlugin.js";import{colorAndIconPlugin as t}from"./colorAndIconPlugin.js";import*as s from"./copyPastePlugin.js";import{copyPastePlugin as g}from"./copyPastePlugin.js";import*as d from"./crossHeaderPlugin.js";import{crossHeaderPlugin as o}from"./crossHeaderPlugin.js";import*as u from"./defaultConfigPlugin.js";import{defaultConfigPlugin as P}from"./defaultConfigPlugin.js";import*as a from"./defaultValuePlugin.js";import{defaultValuePlugin as m}from"./defaultValuePlugin.js";import*as f from"./dragScrollPlugin.js";import{dragScrollPlugin as p}from"./dragScrollPlugin.js";import*as x from"./dynamicFilterRenderPlugin/index.js";import{dynamicFilterRenderPlugin as c}from"./dynamicFilterRenderPlugin/index.js";import*as j from"./filterDaterangeRenderPlugin/index.js";import{filterDaterangeRenderPlugin as R}from"./filterDaterangeRenderPlugin/index.js";import*as b from"./filterRemoteSearchPlugin/index.js";import{filterRemoteSearchPlugin as w}from"./filterRemoteSearchPlugin/index.js";import*as h from"./filterRenderPlugin/index.js";import{filterRenderPlugin as S}from"./filterRenderPlugin/index.js";import*as v from"./filterTextPlugin/index.js";import{filterTextRenderPlugin as k}from"./filterTextPlugin/index.js";import*as W from"./filterVisibleEventPlugin.js";import{filterVisibleEventPlugin as y}from"./filterVisibleEventPlugin.js";import*as C from"./forceArrowKeyPlugin.js";import{forceArrowKeyPlugin as F}from"./forceArrowKeyPlugin.js";import*as A from"./headerPlugin/index.js";import{HeaderPlugin as E}from"./headerPlugin/index.js";import*as T from"./highLightSetPlugin.js";import{highLightSetPlugin as H}from"./highLightSetPlugin.js";import*as V from"./keyboardEventPlugin.js";import{keyboardEventPlugin as D}from"./keyboardEventPlugin.js";import*as z from"./lowCodeFieldAdaptorPlugin.js";import{lowCodeFieldAdaptorPlugin as I}from"./lowCodeFieldAdaptorPlugin.js";import*as K from"./maxCheckSizePlugin.js";import{maxCheckSizePlugin as L}from"./maxCheckSizePlugin.js";import*as q from"./operationalFormPlugin.js";import{operationalFormPlugin as G}from"./operationalFormPlugin.js";import*as O from"./pagerScrollPlugin/index.js";import{pagerScrollPlugin as B}from"./pagerScrollPlugin/index.js";import*as J from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";export{dateRendererPlugin}from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as M from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";export{inputRendererPlugin}from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as N from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";export{levelSearchCascadePlugin}from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as Q from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";export{numberRendererPlugin}from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as U from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";export{radioRendererPlugin}from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as X from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";export{selectRendererPlugin}from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as Y from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";export{separateRendererPlugins}from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as Z from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";export{switchRendererPlugin}from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as $ from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";export{timeRendererPlugin}from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as _ from"./rendererPlugins/widgets/checkRendererPlugin.js";export{checkRendererPlugin}from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as ee from"./rendererPlugins/widgets/colorRendererPlugin.js";export{colorRendererPlugin}from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as re from"./rendererPlugins/widgets/defaultRendererPlugin.js";export{defaultRendererPlugin}from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as ie from"./rendererPlugins/widgets/htmlRendererPlugin.js";export{htmlRendererPlugin}from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as ne from"./rendererPlugins/widgets/labelRendererPlugin.js";export{labelRendererPlugin}from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as le from"./rendererPlugins/widgets/pictureRendererPlugin.js";export{pictureRendererPlugin}from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as te from"./rendererPlugins/widgets/seqRendererPlugin.js";export{seqRendererPlugin}from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as se from"./rowClickPlugin.js";import{rowClickPlugin as ge}from"./rowClickPlugin.js";import*as de from"./rowDragPlugin.js";import{rowDragPlugin as oe}from"./rowDragPlugin.js";import*as ue from"./rowGroupSettingPlugin/index.js";import{rowGroupSettingPlugin as Pe}from"./rowGroupSettingPlugin/index.js";import*as ae from"./stickyFixedPlugin.js";import{stickyFixedPlugin as me}from"./stickyFixedPlugin.js";import*as fe from"./varialbleHeightPlugin.js";import{variableHeightRendererPlugin as pe}from"./varialbleHeightPlugin.js";import*as xe from"./verticalTablePlugin/index.js";import{verticalTablePlugin as ce}from"./verticalTablePlugin/index.js";import*as je from"./virtualTreePlugin.js";import{virtualTreePlugin as Re}from"./virtualTreePlugin.js";import*as be from"./wordbookSettingPlugin.js";import{wordbookSettingPlugin as we}from"./wordbookSettingPlugin.js";import{separateMetaModule as he}from"../../../../shared/utils/index.js";const Se={anchorPlugin:r,bindEventSettingPlugin:n,colorAndIconPlugin:t,copyPastePlugin:g,crossHeaderPlugin:o,defaultConfigPlugin:P,defaultValuePlugin:m,dragScrollPlugin:p,dynamicFilterRenderPlugin:c,filterDaterangeRenderPlugin:R,filterRemoteSearchPlugin:w,filterRenderPlugin:S,filterTextRenderPlugin:k,filterVisibleEventPlugin:y,forceArrowKeyPlugin:F,HeaderPlugin:E,highLightSetPlugin:H,keyboardEventPlugin:D,lowCodeFieldAdaptorPlugin:I,maxCheckSizePlugin:L,operationalFormPlugin:G,pagerScrollPlugin:B,rowClickPlugin:ge,rowDragPlugin:oe,rowGroupSettingPlugin:Pe,stickyFixedPlugin:me,variableHeightRendererPlugin:pe,verticalTablePlugin:ce,virtualTreePlugin:Re,wordbookSettingPlugin:we};var ve=he(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin.ts":i,"./colorAndIconPlugin.ts":l,"./copyPastePlugin.ts":s,"./crossHeaderPlugin.ts":d,"./defaultConfigPlugin.ts":u,"./defaultValuePlugin.ts":a,"./dragScrollPlugin.ts":f,"./dynamicFilterRenderPlugin/index.tsx":x,"./filterDaterangeRenderPlugin/index.tsx":j,"./filterRemoteSearchPlugin/index.tsx":b,"./filterRenderPlugin/index.tsx":h,"./filterTextPlugin/index.tsx":v,"./filterVisibleEventPlugin.ts":W,"./forceArrowKeyPlugin.ts":C,"./headerPlugin/index.tsx":A,"./highLightSetPlugin.tsx":T,"./keyboardEventPlugin.ts":V,"./lowCodeFieldAdaptorPlugin.tsx":z,"./maxCheckSizePlugin.ts":K,"./operationalFormPlugin.ts":q,"./pagerScrollPlugin/index.ts":O,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":J,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":M,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":N,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":Q,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":U,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":X,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":Y,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":Z,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":$,"./rendererPlugins/widgets/checkRendererPlugin.tsx":_,"./rendererPlugins/widgets/colorRendererPlugin.tsx":ee,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":re,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":ie,"./rendererPlugins/widgets/labelRendererPlugin.tsx":ne,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":le,"./rendererPlugins/widgets/seqRendererPlugin.tsx":te,"./rowClickPlugin.ts":se,"./rowDragPlugin.ts":de,"./rowGroupSettingPlugin/index.ts":ue,"./stickyFixedPlugin.tsx":ae,"./varialbleHeightPlugin.tsx":fe,"./verticalTablePlugin/index.ts":xe,"./virtualTreePlugin.ts":je,"./wordbookSettingPlugin.ts":be}));export{Se as commonPlugins,ve as default};
|
@@ -1,4 +1,11 @@
|
|
1
1
|
import { AnyObject } from '../../../../../../../shared/types';
|
2
2
|
import { VxeTableConstructor } from 'vxe-table';
|
3
|
+
import { IhoTableFieldItem } from '../../../../../../../components/iho-table';
|
3
4
|
export declare const selectOptionsMap: Map<string, Record<string, AnyObject[]>>;
|
5
|
+
export declare const selectColumnMap: {
|
6
|
+
uuidMap: Map<string, Record<string, IhoTableFieldItem[]>>;
|
7
|
+
getItemFromUUID: (uuid: string) => Record<string, IhoTableFieldItem[]>;
|
8
|
+
setItemFromUUID: (uuid: string, value: Record<string, IhoTableFieldItem[]>) => void;
|
9
|
+
removeItemFromUUID: (uuid: string) => void;
|
10
|
+
};
|
4
11
|
export declare function getSelectOptions(uuid: string, field: string, row?: AnyObject, $table?: VxeTableConstructor): AnyObject[];
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useSelectOption.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e}from"vue";const
|
1
|
+
import{reactive as e}from"vue";import{useUUIDMap as t}from"../../../../utils/index.js";const r=e(new Map),i=t((()=>({})));function n(e,t,n,o){var f;if(!e||!t)return[];if(o&&n){const o=null==(f=i.getItemFromUUID(e)[t])?void 0:f[0];if(o&&n[o.field])return r.get(e)[`${t}__${o.field}-${n[o.field]}`]}return r.get(e)[t]}export{n as getSelectOptions,i as selectColumnMap,r as selectOptionsMap};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,inject as
|
1
|
+
import{reactive as e,inject as o,createVNode as l,mergeProps as n,onBeforeUnmount as t}from"vue";import{arrayed as i}from"../../../../../../../shared/utils/index.js";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as r,InjectionIhoTableUUID as d}from"../../../../constants/index.js";import{useAutoFocus as s}from"../hooks/useAutoFocus.js";import{getTitle as u,IhoTableRenderHelper as c,getLowCodeFieldFromField as a,IhoTableUtils as p}from"../../../../utils/index.js";import f from"./editSelect.js";import{getDefaultValue as m,getArray as v}from"./selectUtils.js";import{getSelectOptions as w,selectOptionsMap as h,selectColumnMap as g}from"../hooks/useSelectOption.js";import{isString as C,isFunction as y,isEqual as b}from"lodash-es";import{defineTablePlugin as F}from"../../../../hooks/useTablePlugin.js";function E(){const E="selectRendererPlugin",P=e(new Map);function x(e){return!0===e||"1"===e}return F({name:E,vxe(e){e.renderer.add(r.SELECT,{renderCell({props:e},{row:n,column:t,$table:r}){var s,c,a,p,f,v;const h=o(d),g=w(h,t.field,n,r);if(e&&e.labelToValue&&g.length){const o=x(null!=(c=null==(s=e.componentProps)?void 0:s.allowModify)?c:e.allowModify),l=x(null!=(p=null==(a=e.componentProps)?void 0:a.allowCreate)?p:e.allowCreate)||o,i=n[t.field];if(!o&&!l&&null!=i&&""!==i){const{aliasField:o="",labelField:l="label",valueField:r="value"}=e.componentProps||{};if(!g.find((e=>e[r]===i))){const e=g.find((e=>e[l]===i||e[o]===i));e?n[t.field]=e[r]:Reflect.deleteProperty(n,t.field)}}}const C=m(n,e,g),y=i(C).join(","),b=e&&(null==(f=e.componentProps)?void 0:f.multiple)&&(x(e.variableHeight)||(null==(v=e.componentProps)?void 0:v.indexedText));return[l("span",{title:u(t,y),class:"iho-table__colorAndIcon"},[b?i(C).reduce(((e,o)=>(null!=o&&e.push([o,";",l("br",null,null)]),e)),[]):y])]},renderEdit:c.createRenderEdit((({fieldItem:e,emitFormClick:t,row:i,column:r,$rowIndex:s,$table:u})=>{var c,a,p,m;const v=o(d),h=w(v,r.field,i,u),g=x(null!=(a=null==(c=e.componentProps)?void 0:c.allowModify)?a:e.allowModify),C=x(null!=(m=null==(p=e.componentProps)?void 0:p.allowCreate)?m:e.allowCreate)||g;return[l(f,n({queryOptions:e.queryOptions},e.componentProps,{options:h,column:r,row:i,"row-index":s,value:i[r.field],"onUpdate:value":e=>i[r.field]=e,allowModify:g,allowCreate:C,onClick:t}),null)]}))})},apply(e){async function o(e,o={}){var l,n,t;const i=null==(l=e.editRender)?void 0:l.props;if(!i)return[];let r=v(i.options)||v(null==(n=i.componentProps)?void 0:n.options)||[];if(i.queryOptions)try{const l={column:e,isFullData:!0,...o};r=await(null==(t=i.queryOptions)?void 0:t.call(i,l))}catch(e){console.log(`获取${i.field}_options错误`)}return r}function l(e){return e&&p.getCellType(e)===r.SELECT}s(e).bindAutoFocusConfig(E,r.SELECT,".n-base-selection-input,.n-base-selection-tags"),e.fieldHooks.fieldList.tap(E,((e,{uuid:n})=>{if(n){h.get(n)||h.set(n,{}),P.set(n,e);const t={};e.forEach((e=>{t[e.field]=e})),g.setItemFromUUID(n,{});const i=g.getItemFromUUID(n);e.forEach((e=>{const o=a(e);if(!o||!o.connectField||!C(o.connectField))return;o.connectField.split(",").forEach((o=>{i[o]=i[o]||[],i[o].push(e)}))}));const r=h.get(n);e.forEach((async e=>{var n,t;const d=null==(n=e.editRender)?void 0:n.props;if(e.field&&d&&l(d)&&!(null==(t=i[e.field])?void 0:t.length)){if(y(d.queryOptions)&&r[e.field])return;r[e.field]=[],r[e.field]=await o(e)}}))}return e})),e.dataHooks.data.tap(E,((e,{uuid:n},t)=>{if(!n)return;const i=P.get(n);if(!i||!i.length)return;const r=h.get(n);i.forEach((async n=>{var t;const d=null==(t=n.editRender)?void 0:t.props;if(n.field&&d&&l(d)&&(null==d?void 0:d.connectField)){const l=d.connectField.split(","),t=e[d.columnName];l.forEach((async l=>{const s=null==i?void 0:i.find((e=>e.field===l));if(!s)return;const u=t?`${l}__${d.columnName}-${t}`:l;r[u]||(r[u]=[],r[u]=await o(s,{row:e,connectColumn:n}))}))}}))})),e.setupHooks.setup.tap(E,(e=>{t((()=>{var o;const l=null==(o=e.value)?void 0:o.uuid;l&&(h.delete(l),g.removeItemFromUUID(l),P.delete(l))}))})),e.eventHooks.onCellDblclick.tap(E,((e,o,{emits:n})=>{var t,i,r;const{$table:d,row:s,column:u}=e,c=Reflect.get(e,"verticalState");let{column:a,row:p}=d.reactData.editStore.actived;if(!(a&&p||(c&&(a=null==(t=c.editCell)?void 0:t.column,p=null==(i=c.editCell)?void 0:i.row),a&&p)))return;c&&(a=u,p=s);const f=null==(r=a.editRender)?void 0:r.props,{cellDblclickSelectable:m=!1,multiple:v=!1,valueField:h="value"}=f.componentProps||{};if(!m||!l(f))return;const g=o.uuid&&w(o.uuid,a.field,p,d);if(1!==(null==g?void 0:g.length))return;const C=v?[g[0][h]]:g[0][h],y=p[a.field];d.clearEdit(),b(C,y)||(p[a.field]=C,n("formChange",{column:a,row:p,oldValue:y,value:C,index:d.getRowIndex(p),$table:d,option:g[0]}),c&&(c.editCell=null))}))}})}export{E as selectRendererPlugin};
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { AnyObject } from '../../../../../../../shared/types';
|
2
|
-
import { LowCodeTableFieldItem
|
2
|
+
import { LowCodeTableFieldItem } from '../../../../../../../components/iho-table/src/types';
|
3
3
|
export declare function getDefaultValue(row: AnyObject, item: LowCodeTableFieldItem | any, options?: AnyObject[]): any;
|
4
4
|
export declare function getArray(list: AnyObject[] | undefined): AnyObject[] | null | undefined;
|
5
|
-
export declare function isConnectField(columns: IhoTableFieldItem[], field: string): boolean;
|
@@ -1 +1 @@
|
|
1
|
-
function l(l,r,
|
1
|
+
function l(l,r,u=[]){const{aliasField:e="",labelField:i="label",valueField:o="value"}=(null==r?void 0:r.componentProps)||{},a=l[r.columnName];return Array.isArray(a)?a.map((l=>t(l))):t(a);function t(l){var r,a,t;const d=null==(r=n(u))?void 0:r.find((n=>n[o]==l));return null!=(t=null!=(a=null==d?void 0:d[e])?a:null==d?void 0:d[i])?t:l}}function n(l){return Array.isArray(l)&&!l.length?null:l}export{n as getArray,l as getDefaultValue};
|
@@ -1 +1 @@
|
|
1
|
-
import{createVNode as e,defineComponent as
|
1
|
+
import{createVNode as e,defineComponent as l,inject as o,computed as t}from"vue";import{isNumber as n,constant as i,isString as c}from"lodash-es";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as d}from"../../../hooks/useTablePlugin.js";function r(){const l="checkRendererPlugin";return d({name:l,apply(o){o.fieldHooks.field.tap(l,((o,{index:t,insertBefore:c},a)=>{if(0===t&&a.selectType&&["checkbox","radio"].includes(a.selectType)){const{radioConfig:o,checkboxConfig:t={}}=a,d={width:45,align:"center",fixed:"left",..."radio"===a.selectType?o:t,field:l,type:a.selectType,annotation:!1};t.disableHeader&&(d.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...d.slots}),t.useNCheckbox&&(d.slots={checkbox:e=>s(e,t),header:n(t.maxCheckSize)?i([]):e=>s(e,t),...d.slots}),c(d)}return o}))}})}function s(l,o){return[e(p,{payload:l,checkboxConfig:o},null)]}const p=l({name:"IhoTableNCheckbox",props:{payload:{type:Object,default:()=>({})},checkboxConfig:{type:Object,default:()=>({})}},setup(l){const n=o("$xetable");function i(e,o){var t,i,c,a;if(o.stopPropagation(),"header"===(null==(t=l.payload)?void 0:t.type))if(null==(i=l.checkboxConfig)?void 0:i.checkStrictly){const l=null==(a=null==(c=null==n?void 0:n.getComputeMaps())?void 0:c.computeCheckboxOpts)?void 0:a.value;if(!l)return;l.checkStrictly=!1,null==n||n.triggerCheckAllEvent(o,e),l.checkStrictly=!0}else null==n||n.triggerCheckAllEvent(o,e);else null==n||n.triggerCheckRowEvent(o,l.payload,e)}const d=t((()=>{var e,o;return c(null==(e=l.checkboxConfig)?void 0:e.indeterminateField)?null==(o=l.payload.row)?void 0:o[l.checkboxConfig.indeterminateField]:l.payload.indeterminate}));return()=>!1===l.payload.visible?null:e(a,{checked:l.payload.checked,"onUpdate:checked":e=>l.payload.checked=e,indeterminate:d.value,disabled:l.payload.disabled,onUpdateChecked:i},null)}});export{r as checkRendererPlugin};
|
@@ -1 +1 @@
|
|
1
|
-
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as d,onMounted as o}from"vue";import{traverse as u}from"../../../../shared/utils/index.js";import{promiseTimeout as n}from"@vueuse/shared";import{last as a,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as h,InjectionIhoTableXeInstance as c}from"../constants/index.js";import{useUUIDMap as v,mergeVxeStyle as g,mergeVxeClass as m}from"../utils/index.js";import{defineTablePlugin as x}from"../hooks/useTablePlugin.js";function p(){const p="stickyFixedPlugin";return x({name:p,apply(x){const{getItemFromUUID:y,removeItemFromUUID:b}=v((()=>({$xeTable:null,left:[],noFixed:[],right:[]}))),{getItemFromUUID:B,removeItemFromUUID:L}=v((()=>({tableBody:null,tableHeader:null,leftBorderLeftEle:null,leftBorderTopEle:null,leftShadowEle:null,rightBorderLeftEle:null,rightBorderTopEle:null})),!1);function E(e){const l=B(e),{leftShadowEle:t,rightBorderLeftEle:i,tableBody:r}=l;r&&(t&&(r.scrollLeft>0?t.classList.add("scrolling--middle"):null==t||t.classList.remove("scrolling--middle")),i&&(Math.ceil(r.scrollLeft)<r.scrollWidth-r.clientWidth?i.classList.add("scrolling--middle"):null==i||i.classList.remove("scrolling--middle")))}function F(e){const l=B(e),{tableBody:t,leftBorderLeftEle:i,leftShadowEle:r,leftBorderTopEle:d,rightBorderTopEle:o,rightBorderLeftEle:u,tableHeader:n}=l;if(!t||!n)return;const{$xeTable:f,left:h,right:c}=y(e);if(i&&d&&r)if(f){const e=h.map((e=>f.getColumnByField(e.field))).reduce(((e,l)=>e+((null==l?void 0:l.resizeWidth)||(null==l?void 0:l.renderWidth)||40)),0);r.style.left=e-4+"px",d.style.width=e-1+"px"}else{const e=a(null==n?void 0:n.querySelectorAll("th.iho-table--fixed-left"));e&&(r.style.left=e.offsetLeft+e.clientWidth-4+"px",d.style.width=e.offsetLeft+e.clientWidth-1+"px")}if(o&&u){const e=t.scrollHeight>t.clientHeight;if(f){const l=c.map((e=>f.getColumnByField(e.field))).reduce(((e,l)=>e+((null==l?void 0:l.resizeWidth)||(null==l?void 0:l.renderWidth)||40)),0);u.style.right=l-3+(e?10:0)+"px",o.style.width=l+(e?10:0)+"px",e&&o.style.setProperty("--c-header-height",n.clientHeight-2+"px")}else{const l=s(null==n?void 0:n.querySelectorAll("th.iho-table--fixed-right"));l&&(u.style.right=10+t.clientWidth-l.offsetLeft-(e?0:10)+"px",o.style.width=t.clientWidth-l.offsetLeft+(e?10:0)+"px",e&&o.style.setProperty("--c-header-height",n.clientHeight-2+"px"))}}}x.configHooks.config.tap(p,((e,{$table:l})=>{var t;if(!(null==(t=e.stickyFixedConfig)?void 0:t.enable)||!e.uuid)return e;const i=e=>{if(!l.value)return{left:0,right:0};return{left:l.value.getColumns().slice(0,e).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0),right:l.value.getColumns().slice(e+1).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0)}},r=y(e.uuid);function d(e){return r.left.some((l=>l.field===e.field))||r.right.some((l=>l.field===e.field))}return e.cellStyle=g((({_columnIndex:e,column:l})=>{if(d(l))return{"--iho-table-fixed-left":i(e).left,"--iho-table-fixed-right":i(e).right}}),e.cellStyle),e.headerCellStyle=g((({_columnIndex:e,column:l})=>{if(d(l))return{"--iho-table-fixed-left":i(e).left,"--iho-table-fixed-right":i(e).right}}),e.headerCellStyle),e})),x.fieldHooks.fieldList.tap({name:p,stage:f},((e,l)=>{var t;if(!(null==(t=l.stickyFixedConfig)?void 0:t.enable)||!l.uuid)return e;const i=y(l.uuid);return i.left=[],i.noFixed=[],i.right=[],u(e,(e=>{e.fixed?(i[e.fixed].push(e),e.className=m(e.className,`iho-table--fixed-${e.fixed}`),e.headerClassName=m(e.headerClassName,`iho-table--fixed-${e.fixed}`)):i.noFixed.push(e),e.fixed=void 0})),[...i.left||[],...i.noFixed||[],...i.right||[]]})),x.setupHooks.setup.tap(p,(l=>{e((()=>{var e;(null==(e=l.value)?void 0:e.uuid)&&(L(l.value.uuid),b(l.value.uuid))}))})),x.dataHooks.dataEnd.tap(p,(async
|
1
|
+
import{onBeforeUnmount as e,createVNode as l,defineComponent as t,inject as i,computed as r,watch as d,onMounted as o}from"vue";import{traverse as u}from"../../../../shared/utils/index.js";import{promiseTimeout as n}from"@vueuse/shared";import{last as a,first as s}from"lodash-es";import"../../index.js";import{LOWEST_PRIORITY as f,InjectionIhoTableConfig as h,InjectionIhoTableXeInstance as c}from"../constants/index.js";import{useUUIDMap as v,mergeVxeStyle as g,mergeVxeClass as m}from"../utils/index.js";import{defineTablePlugin as x}from"../hooks/useTablePlugin.js";function p(){const p="stickyFixedPlugin";return x({name:p,apply(x){const{getItemFromUUID:y,removeItemFromUUID:b}=v((()=>({$xeTable:null,left:[],noFixed:[],right:[]}))),{getItemFromUUID:B,removeItemFromUUID:L}=v((()=>({tableBody:null,tableHeader:null,leftBorderLeftEle:null,leftBorderTopEle:null,leftShadowEle:null,rightBorderLeftEle:null,rightBorderTopEle:null})),!1);function E(e){const l=B(e),{leftShadowEle:t,rightBorderLeftEle:i,tableBody:r}=l;r&&(t&&(r.scrollLeft>0?t.classList.add("scrolling--middle"):null==t||t.classList.remove("scrolling--middle")),i&&(Math.ceil(r.scrollLeft)<r.scrollWidth-r.clientWidth?i.classList.add("scrolling--middle"):null==i||i.classList.remove("scrolling--middle")))}function F(e){const l=B(e),{tableBody:t,leftBorderLeftEle:i,leftShadowEle:r,leftBorderTopEle:d,rightBorderTopEle:o,rightBorderLeftEle:u,tableHeader:n}=l;if(!t||!n)return;const{$xeTable:f,left:h,right:c}=y(e);if(i&&d&&r)if(f){const e=h.map((e=>f.getColumnByField(e.field))).reduce(((e,l)=>e+((null==l?void 0:l.resizeWidth)||(null==l?void 0:l.renderWidth)||40)),0);r.style.left=e-4+"px",d.style.width=e-1+"px"}else{const e=a(null==n?void 0:n.querySelectorAll("th.iho-table--fixed-left"));e&&(r.style.left=e.offsetLeft+e.clientWidth-4+"px",d.style.width=e.offsetLeft+e.clientWidth-1+"px")}if(o&&u){const e=t.scrollHeight>t.clientHeight;if(f){const l=c.map((e=>f.getColumnByField(e.field))).reduce(((e,l)=>e+((null==l?void 0:l.resizeWidth)||(null==l?void 0:l.renderWidth)||40)),0);u.style.right=l-3+(e?10:0)+"px",o.style.width=l+(e?10:0)+"px",e&&o.style.setProperty("--c-header-height",n.clientHeight-2+"px")}else{const l=s(null==n?void 0:n.querySelectorAll("th.iho-table--fixed-right"));l&&(u.style.right=10+t.clientWidth-l.offsetLeft-(e?0:10)+"px",o.style.width=t.clientWidth-l.offsetLeft+(e?10:0)+"px",e&&o.style.setProperty("--c-header-height",n.clientHeight-2+"px"))}}}x.configHooks.config.tap(p,((e,{$table:l})=>{var t;if(!(null==(t=e.stickyFixedConfig)?void 0:t.enable)||!e.uuid)return e;const i=e=>{if(!l.value)return{left:0,right:0};return{left:l.value.getColumns().slice(0,e).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0),right:l.value.getColumns().slice(e+1).reduce(((e,l)=>e+(l.resizeWidth||l.renderWidth)),0)}},r=y(e.uuid);function d(e){return r.left.some((l=>l.field===e.field))||r.right.some((l=>l.field===e.field))}return e.cellStyle=g((({_columnIndex:e,column:l})=>{if(d(l))return{"--iho-table-fixed-left":i(e).left,"--iho-table-fixed-right":i(e).right}}),e.cellStyle),e.headerCellStyle=g((({_columnIndex:e,column:l})=>{if(d(l))return{"--iho-table-fixed-left":i(e).left,"--iho-table-fixed-right":i(e).right}}),e.headerCellStyle),e})),x.fieldHooks.fieldList.tap({name:p,stage:f},((e,l)=>{var t;if(!(null==(t=l.stickyFixedConfig)?void 0:t.enable)||!l.uuid)return e;const i=y(l.uuid);return i.left=[],i.noFixed=[],i.right=[],u(e,(e=>{e.fixed?(i[e.fixed].push(e),e.className=m(e.className,`iho-table--fixed-${e.fixed}`),e.headerClassName=m(e.headerClassName,`iho-table--fixed-${e.fixed}`)):i.noFixed.push(e),e.fixed=void 0})),[...i.left||[],...i.noFixed||[],...i.right||[]]})),x.setupHooks.setup.tap(p,(l=>{e((()=>{var e;(null==(e=l.value)?void 0:e.uuid)&&(L(l.value.uuid),b(l.value.uuid))}))})),x.dataHooks.dataEnd.tap(p,(async(e,l)=>{var t;(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&(await n(100),F(l.uuid))})),x.eventHooks.onScroll.tap(p,(({isX:e},l)=>{var t;e&&(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&E(l.uuid)})),x.eventHooks.onResizableChange.tap(p,((e,l)=>{var t;(null==(t=l.stickyFixedConfig)?void 0:t.enable)&&l.uuid&&E(l.uuid)}));const k=t({setup(){const e=i(h),t=i(c),u=r((()=>{const l=y(e.value.uuid);return!(!l.left||!l.left.length)})),a=r((()=>{const l=y(e.value.uuid);return!(!l.right||!l.right.length)})),s=l=>{B(e.value.uuid).leftBorderLeftEle=l},f=l=>{B(e.value.uuid).leftBorderTopEle=l},v=l=>{B(e.value.uuid).leftShadowEle=l},g=l=>{B(e.value.uuid).rightBorderLeftEle=l},m=l=>{B(e.value.uuid).rightBorderTopEle=l};function x(){if(y(e.value.uuid).$xeTable=t.value,!t.value||!e.value.uuid)return;const{refTableBody:l,refTableHeader:i}=t.value.getRefMaps();if(!l.value)return;const r=B(e.value.uuid);r.tableBody=l.value.$el,r.tableHeader=i.value.$el,E(e.value.uuid),F(e.value.uuid)}return d([()=>y(e.value.uuid).left,()=>y(e.value.uuid).right],x),o((async()=>{await n(100),x()})),()=>[u.value?[l("div",{class:"iho-table__fixedLeftBorderLeft",ref:s},null),l("div",{class:"iho-table__fixedLeftBorderTop",ref:f},null),l("div",{class:"iho-table__fixedLeftShadow",ref:v},null)]:null,a.value?[l("div",{class:"iho-table__fixedRightBorderLeft",ref:g},null),l("div",{class:"iho-table__fixedRightBorderTop",ref:m},null)]:null]}}),C=t({setup(){const e=i(h);return()=>{var t,i;return(null==(i=null==(t=e.value)?void 0:t.stickyFixedConfig)?void 0:i.enable)?l(k,null,null):null}}});x.domInsertHooks.header.tap(p,(e=>(e.push(l(C,null,null)),e)))}})}export{p as stickyFixedPlugin};
|