cnhis-design-vue 3.3.1-beta.15 → 3.3.1-beta.17
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 +5 -0
- package/es/components/ai-chat/src/Index.vue.d.ts +5 -0
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatAudio.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +6 -0
- 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 -1
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/iho-chat/index.d.ts +9 -0
- package/es/components/iho-chat/src/Index.vue.d.ts +9 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +5 -0
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +3 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +1 -0
- package/es/components/iho-chat/src/components/ChatSet.vue2.js +1 -1
- package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +1 -0
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/iho-table/index.d.ts +24 -24
- package/es/components/iho-table/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.d.ts +18 -20
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/varialbleHeightPlugin.js +1 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
import { SFCWithInstall } from '../../shared/types';
|
2
|
-
import { TablePlugin } from './src/types';
|
3
2
|
import { IhoTableInstance } from '../../components/iho-table/src/types';
|
3
|
+
import { TablePlugin } from './src/types';
|
4
4
|
export * from './src/hooks/export';
|
5
5
|
export * from './src/types';
|
6
6
|
export * from './src/plugins';
|
@@ -8,11 +8,11 @@ export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => v
|
|
8
8
|
export declare const useIhoTablePlugins: (instance: IhoTableInstance, plugins: (() => TablePlugin)[]) => void;
|
9
9
|
declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
10
10
|
tableConfig: {
|
11
|
-
type: import("vue").PropType<import("
|
11
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").IhoTableConfig>;
|
12
12
|
default: () => {};
|
13
13
|
};
|
14
14
|
fieldList: {
|
15
|
-
type: import("vue").PropType<import("
|
15
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
16
16
|
default: () => never[];
|
17
17
|
};
|
18
18
|
tableData: {
|
@@ -40,11 +40,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
40
40
|
}, {
|
41
41
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
42
42
|
tableConfig: {
|
43
|
-
type: import("vue").PropType<import("
|
43
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").IhoTableConfig>;
|
44
44
|
default: () => {};
|
45
45
|
};
|
46
46
|
fieldList: {
|
47
|
-
type: import("vue").PropType<import("
|
47
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
48
48
|
default: () => never[];
|
49
49
|
};
|
50
50
|
tableData: {
|
@@ -137,7 +137,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
137
137
|
onRowDrag?: ((...args: any[]) => any) | undefined;
|
138
138
|
}>>;
|
139
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;
|
140
|
-
$xeTable: import("vue").Ref<import("
|
140
|
+
$xeTable: import("vue").Ref<import("../../components/iho-table/src/types").$VxeTable | undefined>;
|
141
141
|
loading: import("vue").Ref<boolean>;
|
142
142
|
finalLoading: import("vue").ComputedRef<boolean>;
|
143
143
|
themCSSVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
|
@@ -154,13 +154,13 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
154
154
|
value: unknown;
|
155
155
|
}[]>;
|
156
156
|
hooks: Readonly<{
|
157
|
-
configHooks: import("
|
158
|
-
fieldHooks: import("
|
159
|
-
eventHooks: import("
|
160
|
-
dataHooks: import("
|
161
|
-
setupHooks: import("
|
162
|
-
domInsertHooks: import("
|
163
|
-
exposeHooks: import("
|
157
|
+
configHooks: import("../../components/iho-table/src/types").AbstractConfigHooks;
|
158
|
+
fieldHooks: import("../../components/iho-table/src/types").AbstractFieldHooks;
|
159
|
+
eventHooks: import("../../components/iho-table/src/types").AbstractEventHooks;
|
160
|
+
dataHooks: import("../../components/iho-table/src/types").AbstractDataHooks;
|
161
|
+
setupHooks: import("../../components/iho-table/src/types").AbstractSetupHooks;
|
162
|
+
domInsertHooks: import("../../components/iho-table/src/types").AbstractDomInsertHooks;
|
163
|
+
exposeHooks: import("../../components/iho-table/src/types").AbstractExposeHooks;
|
164
164
|
}>;
|
165
165
|
uuid: string;
|
166
166
|
$table: import("vue").Ref<import("vxe-table").VxeTableInstance | undefined>;
|
@@ -3256,7 +3256,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3256
3256
|
columnWidth?: number | undefined;
|
3257
3257
|
}[] | undefined;
|
3258
3258
|
} | undefined;
|
3259
|
-
onFormChange?: ((payload_0: import("
|
3259
|
+
onFormChange?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
3260
3260
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
3261
3261
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
3262
3262
|
onKeydownStart?: ((params: import("vxe-table").VxeTableDefines.KeydownStartEventParams) => void) | undefined;
|
@@ -3318,8 +3318,8 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3318
3318
|
onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
|
3319
3319
|
onPageChange?: (() => void) | undefined;
|
3320
3320
|
onSettingClick?: (() => void) | undefined;
|
3321
|
-
onFormClick?: ((payload_0: import("
|
3322
|
-
onKeyboard?: ((payload_0: import("
|
3321
|
+
onFormClick?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
3322
|
+
onKeyboard?: ((payload_0: import("../../components/iho-table/src/types").IHoTableKeyboardPayload) => void) | undefined;
|
3323
3323
|
onRowDrag?: ((payload_0: import("sortablejs").SortableEvent) => void) | undefined;
|
3324
3324
|
}>;
|
3325
3325
|
updateConfigRefDebounced: () => void;
|
@@ -3636,7 +3636,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
3636
3636
|
tableDataRef: import("vue").Ref<import("../../shared/types").AnyObject[]>;
|
3637
3637
|
updateTableDataRefDebounced: () => Promise<void>;
|
3638
3638
|
updateTableDataRef: () => Promise<void>;
|
3639
|
-
tableHandler: import("
|
3639
|
+
tableHandler: import("../../components/iho-table/src/types").IhoTableHandler;
|
3640
3640
|
eventHookHandler: {
|
3641
3641
|
onScroll: import("vxe-table").VxeTableEvents.Scroll | undefined;
|
3642
3642
|
onKeydown: import("vxe-table").VxeTableEvents.Keydown | undefined;
|
@@ -6850,10 +6850,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6850
6850
|
columnWidth?: number | undefined;
|
6851
6851
|
}[] | undefined;
|
6852
6852
|
} | undefined;
|
6853
|
-
onFormChange?: ((payload_0: import("
|
6853
|
+
onFormChange?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
6854
6854
|
onSettingClick?: (() => void) | undefined;
|
6855
|
-
onFormClick?: ((payload_0: import("
|
6856
|
-
onKeyboard?: ((payload_0: import("
|
6855
|
+
onFormClick?: ((payload_0: import("../../components/iho-table/src/types").IhoTableFormChangePayload) => void) | undefined;
|
6856
|
+
onKeyboard?: ((payload_0: import("../../components/iho-table/src/types").IHoTableKeyboardPayload) => void) | undefined;
|
6857
6857
|
onRowDrag?: ((payload_0: import("sortablejs").SortableEvent) => void) | undefined;
|
6858
6858
|
}>;
|
6859
6859
|
configChanged: boolean;
|
@@ -6867,11 +6867,11 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6867
6867
|
NConfigProvider: any;
|
6868
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<{
|
6869
6869
|
tableConfig: {
|
6870
|
-
type: import("vue").PropType<import("
|
6870
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").IhoTableConfig>;
|
6871
6871
|
default: () => {};
|
6872
6872
|
};
|
6873
6873
|
fieldList: {
|
6874
|
-
type: import("vue").PropType<import("
|
6874
|
+
type: import("vue").PropType<import("../../components/iho-table/src/types").LowCodeTableFieldItem[]>;
|
6875
6875
|
default: () => never[];
|
6876
6876
|
};
|
6877
6877
|
tableData: {
|
@@ -6963,10 +6963,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
|
|
6963
6963
|
onKeyboard?: ((...args: any[]) => any) | undefined;
|
6964
6964
|
onRowDrag?: ((...args: any[]) => any) | undefined;
|
6965
6965
|
}, {
|
6966
|
-
fieldList: import("
|
6966
|
+
fieldList: import("../../components/iho-table/src/types").LowCodeTableFieldItem[];
|
6967
6967
|
parallelism: number;
|
6968
6968
|
uniqueCacheData: boolean;
|
6969
|
-
tableConfig: import("
|
6969
|
+
tableConfig: import("../../components/iho-table/src/types").IhoTableConfig;
|
6970
6970
|
tableData: import("../../shared/types").AnyObject[];
|
6971
6971
|
developMode: boolean;
|
6972
6972
|
}>>;
|
@@ -1 +1 @@
|
|
1
|
-
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import{
|
1
|
+
import{COMPONENT_NAMESPACE as e}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import{inputRendererPlugin as s}from"./src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js";export{inputRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js";import{levelSearchCascadePlugin as i}from"./src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";export{levelSearchCascadePlugin}from"./src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import{numberRendererPlugin as n}from"./src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js";export{numberRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js";import{radioRendererPlugin as l}from"./src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js";export{radioRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js";import{selectRendererPlugin as t}from"./src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js";export{selectRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import{separateRendererPlugins as d}from"./src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js";export{separateRendererPlugins}from"./src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import{switchRendererPlugin as o}from"./src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js";export{switchRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js";import{timeRendererPlugin as u}from"./src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js";export{timeRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import{checkRendererPlugin as g}from"./src/plugins/rendererPlugins/widgets/checkRendererPlugin.js";export{checkRendererPlugin}from"./src/plugins/rendererPlugins/widgets/checkRendererPlugin.js";import{colorRendererPlugin as p}from"./src/plugins/rendererPlugins/widgets/colorRendererPlugin.js";export{colorRendererPlugin}from"./src/plugins/rendererPlugins/widgets/colorRendererPlugin.js";import{defaultRendererPlugin as a}from"./src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js";export{defaultRendererPlugin}from"./src/plugins/rendererPlugins/widgets/defaultRendererPlugin.js";import{htmlRendererPlugin as m}from"./src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js";export{htmlRendererPlugin}from"./src/plugins/rendererPlugins/widgets/htmlRendererPlugin.js";import{labelRendererPlugin as c}from"./src/plugins/rendererPlugins/widgets/labelRendererPlugin.js";export{labelRendererPlugin}from"./src/plugins/rendererPlugins/widgets/labelRendererPlugin.js";import{pictureRendererPlugin as P}from"./src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js";export{pictureRendererPlugin}from"./src/plugins/rendererPlugins/widgets/pictureRendererPlugin.js";import{seqRendererPlugin as j}from"./src/plugins/rendererPlugins/widgets/seqRendererPlugin.js";export{seqRendererPlugin}from"./src/plugins/rendererPlugins/widgets/seqRendererPlugin.js";import{dateRendererPlugin as f}from"./src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js";export{dateRendererPlugin}from"./src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import"lodash-es";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 b}from"./src/hooks/useTablePlugin.js";export{defineTablePlugin,useTablePlugin}from"./src/hooks/useTablePlugin.js";import R from"./src/IhoTable.vue.js";import{commonModules as x}from"./src/plugins/index.js";export{commonModules}from"./src/plugins/index.js";export{useColumnConfigAdaptor}from"./src/hooks/useColumnConfigAdaptor.js";const{use:h}=b(),k=e=>{h([...Object.values(x),f,s,i,n,l,t,d,o,u,g,p,a,m,c,P,j].map((e=>e())),e)},W=(e,r)=>{h([...Object.values(x),...r].map((e=>e())),e)},w=R;w.install=function(s){r(s,w,e+"IhoTable")};export{w as default,W as useIhoTablePlugins,k as useIhoTablePresetPlugins};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { TablePlugin } from '../../../../components/iho-table';
|
2
1
|
import { anchorPlugin } from './anchorPlugin/index';
|
3
2
|
import { bindEventSettingPlugin } from './bindEventSettingPlugin';
|
4
3
|
import { colorAndIconPlugin } from './colorAndIconPlugin';
|
@@ -29,7 +28,23 @@ import { variableHeightRendererPlugin } from './varialbleHeightPlugin';
|
|
29
28
|
import { verticalTablePlugin } from './verticalTablePlugin/index';
|
30
29
|
import { virtualTreePlugin } from './virtualTreePlugin';
|
31
30
|
import { wordbookSettingPlugin } from './wordbookSettingPlugin';
|
32
|
-
export
|
31
|
+
export { dateRendererPlugin } from './rendererPlugins/editableWidgets/dateRendererPlugin/index';
|
32
|
+
export { inputRendererPlugin } from './rendererPlugins/editableWidgets/inputRendererPlugin';
|
33
|
+
export { levelSearchCascadePlugin } from './rendererPlugins/editableWidgets/levelSearchCascadePlugin/index';
|
34
|
+
export { numberRendererPlugin } from './rendererPlugins/editableWidgets/numberRendererPlugin';
|
35
|
+
export { radioRendererPlugin } from './rendererPlugins/editableWidgets/radioRendererPlugin';
|
36
|
+
export { selectRendererPlugin } from './rendererPlugins/editableWidgets/selectRendererPlugin/index';
|
37
|
+
export { separateRendererPlugins } from './rendererPlugins/editableWidgets/separateRendererPlugin/index';
|
38
|
+
export { switchRendererPlugin } from './rendererPlugins/editableWidgets/switchRendererPlugin';
|
39
|
+
export { timeRendererPlugin } from './rendererPlugins/editableWidgets/timeRendererPlugin/index';
|
40
|
+
export { checkRendererPlugin } from './rendererPlugins/widgets/checkRendererPlugin';
|
41
|
+
export { colorRendererPlugin } from './rendererPlugins/widgets/colorRendererPlugin';
|
42
|
+
export { defaultRendererPlugin } from './rendererPlugins/widgets/defaultRendererPlugin';
|
43
|
+
export { htmlRendererPlugin } from './rendererPlugins/widgets/htmlRendererPlugin';
|
44
|
+
export { labelRendererPlugin } from './rendererPlugins/widgets/labelRendererPlugin';
|
45
|
+
export { pictureRendererPlugin } from './rendererPlugins/widgets/pictureRendererPlugin';
|
46
|
+
export { seqRendererPlugin } from './rendererPlugins/widgets/seqRendererPlugin';
|
47
|
+
export declare const commonModules: {
|
33
48
|
anchorPlugin: typeof anchorPlugin;
|
34
49
|
bindEventSettingPlugin: typeof bindEventSettingPlugin;
|
35
50
|
colorAndIconPlugin: typeof colorAndIconPlugin;
|
@@ -61,21 +76,4 @@ export declare const commonPlugins: {
|
|
61
76
|
virtualTreePlugin: typeof virtualTreePlugin;
|
62
77
|
wordbookSettingPlugin: typeof wordbookSettingPlugin;
|
63
78
|
};
|
64
|
-
|
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';
|
79
|
+
export default commonModules;
|
@@ -1 +1 @@
|
|
1
|
-
import
|
1
|
+
import{anchorPlugin as e}from"./anchorPlugin/index.js";import{bindEventSettingPlugin as r}from"./bindEventSettingPlugin.js";import{colorAndIconPlugin as i}from"./colorAndIconPlugin.js";import{copyPastePlugin as n}from"./copyPastePlugin.js";import{crossHeaderPlugin as l}from"./crossHeaderPlugin.js";import{defaultConfigPlugin as o}from"./defaultConfigPlugin.js";import{defaultValuePlugin as t}from"./defaultValuePlugin.js";import{dragScrollPlugin as g}from"./dragScrollPlugin.js";import{dynamicFilterRenderPlugin as d}from"./dynamicFilterRenderPlugin/index.js";import{filterDaterangeRenderPlugin as u}from"./filterDaterangeRenderPlugin/index.js";import{filterRemoteSearchPlugin as P}from"./filterRemoteSearchPlugin/index.js";import{filterRenderPlugin as s}from"./filterRenderPlugin/index.js";import{filterTextRenderPlugin as m}from"./filterTextPlugin/index.js";import{filterVisibleEventPlugin as a}from"./filterVisibleEventPlugin.js";import{forceArrowKeyPlugin as f}from"./forceArrowKeyPlugin.js";import{HeaderPlugin as p}from"./headerPlugin/index.js";import{highLightSetPlugin as j}from"./highLightSetPlugin.js";import{keyboardEventPlugin as c}from"./keyboardEventPlugin.js";import{lowCodeFieldAdaptorPlugin as R}from"./lowCodeFieldAdaptorPlugin.js";import{maxCheckSizePlugin as x}from"./maxCheckSizePlugin.js";import{operationalFormPlugin as b}from"./operationalFormPlugin.js";import{pagerScrollPlugin as h}from"./pagerScrollPlugin/index.js";import{rowClickPlugin as w}from"./rowClickPlugin.js";import{rowDragPlugin as S}from"./rowDragPlugin.js";import{rowGroupSettingPlugin as v}from"./rowGroupSettingPlugin/index.js";import{stickyFixedPlugin as k}from"./stickyFixedPlugin.js";import{variableHeightRendererPlugin as y}from"./varialbleHeightPlugin.js";import{verticalTablePlugin as C}from"./verticalTablePlugin/index.js";import{virtualTreePlugin as W}from"./virtualTreePlugin.js";import{wordbookSettingPlugin as F}from"./wordbookSettingPlugin.js";export{dateRendererPlugin}from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";export{inputRendererPlugin}from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";export{levelSearchCascadePlugin}from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";export{numberRendererPlugin}from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";export{radioRendererPlugin}from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";export{selectRendererPlugin}from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";export{separateRendererPlugins}from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";export{switchRendererPlugin}from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";export{timeRendererPlugin}from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";export{checkRendererPlugin}from"./rendererPlugins/widgets/checkRendererPlugin.js";export{colorRendererPlugin}from"./rendererPlugins/widgets/colorRendererPlugin.js";export{defaultRendererPlugin}from"./rendererPlugins/widgets/defaultRendererPlugin.js";export{htmlRendererPlugin}from"./rendererPlugins/widgets/htmlRendererPlugin.js";export{labelRendererPlugin}from"./rendererPlugins/widgets/labelRendererPlugin.js";export{pictureRendererPlugin}from"./rendererPlugins/widgets/pictureRendererPlugin.js";export{seqRendererPlugin}from"./rendererPlugins/widgets/seqRendererPlugin.js";const A={anchorPlugin:e,bindEventSettingPlugin:r,colorAndIconPlugin:i,copyPastePlugin:n,crossHeaderPlugin:l,defaultConfigPlugin:o,defaultValuePlugin:t,dragScrollPlugin:g,dynamicFilterRenderPlugin:d,filterDaterangeRenderPlugin:u,filterRemoteSearchPlugin:P,filterRenderPlugin:s,filterTextRenderPlugin:m,filterVisibleEventPlugin:a,forceArrowKeyPlugin:f,HeaderPlugin:p,highLightSetPlugin:j,keyboardEventPlugin:c,lowCodeFieldAdaptorPlugin:R,maxCheckSizePlugin:x,operationalFormPlugin:b,pagerScrollPlugin:h,rowClickPlugin:w,rowDragPlugin:S,rowGroupSettingPlugin:v,stickyFixedPlugin:k,variableHeightRendererPlugin:y,verticalTablePlugin:C,virtualTreePlugin:W,wordbookSettingPlugin:F};export{A as commonModules,A as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,inject as t,createVNode as a,toRaw as r,h as o,onBeforeUnmount as n}from"vue";import{widthAppend as i,getCharWidth as u,traverse as l,arrayed as s}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as p,isArray as f,compact as c,range as _,uniq as m,flatten as E}from"lodash-es";import{NInput as h}from"naive-ui";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as A,InjectionIhoTableUUID as v,InjectionIhoTableHandler as R}from"../../../../constants/index.js";import{useAutoFocus as g}from"../hooks/useAutoFocus.js";import{getLowCodeFieldFromField as D,IhoTableRenderHelper as T,getRowHeight as w,getColumnRenderWidth as b,parseMergeField as $}from"../../../../utils/index.js";import x from"./editSeparate.vue.js";import{
|
1
|
+
import{reactive as e,inject as t,createVNode as a,toRaw as r,h as o,onBeforeUnmount as n}from"vue";import{widthAppend as i,getCharWidth as u,traverse as l,arrayed as s}from"../../../../../../../shared/utils/index.js";import{isFunction as d,isObject as p,isArray as f,compact as c,range as _,uniq as m,flatten as E}from"lodash-es";import{NInput as h}from"naive-ui";import"../../../../../index.js";import{EDITABLE_WIDGET_TYPE as A,InjectionIhoTableUUID as v,InjectionIhoTableHandler as R}from"../../../../constants/index.js";import{useAutoFocus as g}from"../hooks/useAutoFocus.js";import{getLowCodeFieldFromField as D,IhoTableRenderHelper as T,getRowHeight as w,getColumnRenderWidth as b,parseMergeField as $}from"../../../../utils/index.js";import x from"./editSeparate.vue.js";import{isSeparateColumn as C,contentSeparate as P,getLengthDiffArray as S,getColumnInfoMaxLength as k,generateSeparateRowData as H}from"./separateUtils.js";import{getSeparateInfo as I,setSeparateInfo as j,deleteSeparateInfo as M}from"../../../../utils/separateMap.js";import{defineTablePlugin as O}from"../../../../hooks/useTablePlugin.js";function F(){const F="separateRendererPlugins",y=e(new Map);return O({name:F,vxe(e){e.renderer.add(A.SEPARATE,{renderCell(e,{column:r,row:o}){const n=t(v),{separateData:l={},isOriginRow:s}=I(n,o)||{},d=D(r),p=(null==d?void 0:d.separateFormatter)?d.separateFormatter(l[r.field]):l[r.field];return a("section",{class:[{"iho-table__ellipsis":!1!==(null==d?void 0:d.showOverflow)},"iho-table__colorAndIcon"],title:p,style:{textIndent:s&&(null==d?void 0:d.separateIndent)?i(u("一")*d.separateIndent):0}},[p])},renderEdit:T.createRenderEdit((({fieldItem:e,column:n,row:i,emitFormClick:u})=>{var l,s;const f=t(v),c=I(f,i),_=w(),m={};let E=null!=(s=null==(l=e.componentProps)?void 0:l.separateSlot)?s:e.separateSlot;return E&&(E=r(E),m.menu=d(E)?E:p(E)?e=>o(E,e):void 0),e.separateRowEdit?function(){var e;if(!c)return[];if(c.ihoTableHandler=t(R),c.separateData["__"+n.field]=null!=(e=c.separateData["__"+n.field])?e:c.separateData[n.field],m.menu){const e=m.menu;return a(e,{column:n,col:n,row:i,value:c.separateData["__"+n.field],"onUpdate:value":e=>c.separateData["__"+n.field]=e},null)}return a(h,{value:c.separateData["__"+n.field],"onUpdate:value":e=>c.separateData["__"+n.field]=e},null)}():function(){var t;const r=null==(t=null==c?void 0:c.separateData)?void 0:t[n.field],o=d(e.separateFormatter)?e.separateFormatter(r):r;return[a(x,{value:i[n.field],"onUpdate:value":e=>i[n.field]=e,rowIndex:c.index,height:_,column:n,row:i,displayContent:o,onClick:u},m)]}()}))})},apply(e){function t(e){return(...t)=>{var a;return!(null==(a=t[0].row)?void 0:a.$__SEPARATE)&&(!d(e)||e(...t))}}g(e).bindAutoFocusConfig(F,A.SEPARATE,".iho-table__separateText"),e.eventHooks.onEditClosed.tap(F,(({row:e,column:t,$table:a},r,{emits:o})=>{if(!e.$__uuid)return;const n=D(t);if(!n||!n.separateRowEdit)return;const i=I(e.$__uuid,e);if(!i)return;const{separateData:u,originalData:l,ihoTableHandler:s,index:d}=i,{field:p}=t;if(null!==u["__"+p]&&u["__"+p]!==u[p]&&f(l.$__SEPARATE_DATA)){const e=l.$__SEPARATE_DATA.map((e=>{var t;return null!=(t=e["__"+p])?t:e[p]})),r=l[p];l[p]=f(l[p])?e:e.join(""),o("formChange",{value:l[p],oldValue:r,row:l,column:t,index:d,$table:a}),null==s||s.updateTableDataRef()}})),e.fieldHooks.fieldList.tap(F,((e,{uuid:t})=>(t&&y.set(t,e.reduce(((e,t)=>(l(t,(t=>{C(t)&&e.push(r(t))})),e)),[])),e))),e.dataHooks.data.tapPromise(F,(async(e,t,{insertAfter:a,index:r,$table:o})=>{var n;if(!t.uuid)return;const i=y.get(t.uuid);if(!i||!i.length)return;const u=[];for(const t of i){if(!t.field)continue;const a=await b(t,e,r,o),i={field:t.field,column:t,data:P($(e,t),t,a,null==(n=D(t))?void 0:n.separateDeep)};u.push(i)}function l(e){return u.find((t=>t.field===e))}u.forEach((e=>{const{column:t}=e,a=D(t);if(!a)return;if(!a.separateDeep||!a.separateBinder)return;const r=c(s(a.separateBinder).map(l));if(!r.length)return;const o=r.concat(e),n=Math.max(...o.map((e=>e.data.length)));_(n).forEach((e=>{const t=o.map((t=>({item:t.data[e],data:t.data}))),a=t.map((({item:e})=>n(e)));if(1===m(a).length)return;const r=Math.max(...a);function n(e){return f(e)?e.length:1}t.forEach((({item:t,data:a})=>{const o=n(t);o!==r&&(f(t)?t.push(...S(r,o)):a[e]=_(r).map(((e,a)=>0===a?t:"")))}))}))})),u.forEach((e=>{e.data=E(e.data)})),_(k(u)).forEach(((o,n,i)=>{var l;const s=H(u,n),d={index:r,originalData:e,separateData:s,separateIndex:n,separateLength:i.length,isOriginRow:0===n,isLastRow:n===i.length-1};if(0===n)return e.$__SEPARATE_DATA=[s],e.$__SEPARATE_ROW_CACHE=e.$__SEPARATE_ROW_CACHE||[],e.$__uuid=t.uuid,void j(t.uuid,e,d);const p=null!=(l=e.$__SEPARATE_ROW_CACHE[n-1])?l:e.$__SEPARATE_ROW_CACHE[n-1]={$__SEPARATE:!0,$__uuid:t.uuid,$__SEPARATE_INDEX:n};p.$__ORIGIN_INDEX=r,j(t.uuid,p,d),e.$__SEPARATE_DATA.push(s),a(p)}))})),e.eventHooks.onResizableChange.tap(F,(async(e,t,a)=>{a.updateTableDataRef()})),e.configHooks.editConfig.tap(F,((e={},t)=>{const a=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var r;if(!t.uuid)return f();const o=y.get(t.uuid);if(!o||!o.length)return f();const{row:n,column:i}=e[0],u=I(t.uuid,n);if(!u)return f();const l=null==(r=i.editRender)?void 0:r.props;if(!l||l.separateRowEdit)return f();const{isOriginRow:s,isLastRow:p}=u;return("bottom"===l.separatePlacement?p:s)&&f();function f(){return!d(a)||a(...e)}},e})),e.configHooks.checkboxConfig.tap(F,((e={},a)=>(e.checkMethod=t(e.checkMethod),e.visibleMethod=t(e.visibleMethod),e))),e.setupHooks.setup.tap(F,(e=>{n((()=>{e.value.uuid&&(y.delete(e.value.uuid),M(e.value.uuid))}))}))}})}export{F as separateRendererPlugins};
|
@@ -1 +1 @@
|
|
1
|
-
import{unref as e,
|
1
|
+
import{unref as e,shallowReactive as t,onBeforeUnmount as o,createVNode as l,defineComponent as n,inject as r,ref as a,computed as s,provide as i,watch as u,onMounted as c,h as d}from"vue";import{traverse as p,widthAppend 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{last as v,isFunction as x,isNumber as y}from"lodash-es";import"../../index.js";import{InjectionIhoTableUUID as b}from"../constants/index.js";import{useUUIDMap as I,isVariableHeightColumn as w}from"../utils/index.js";import{defineTablePlugin as T}from"../hooks/useTablePlugin.js";class D{constructor(){this.records={},this.maxRecords=t(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:R,removeItemFromUUID:M}=I((()=>new D),!0),{getItemFromUUID:S,removeItemFromUUID:H,setItemFromUUID:U}=I((()=>null)),{getItemFromUUID:C,removeItemFromUUID:$,setItemFromUUID:k}=I((()=>{}));let F={};function j(t,o,{scrollTop:l=0}){var n,r;const{uuid:a,rowConfig:s={}}=o;if(!a)return;const i=R(a),{oSize:u=0,gt:c=100}=null!=(n=C(a))?n:{},{internalData:d,reactData:p}=t,{scrollYStore:f,elemStore:m,afterFullData:h,fullDataRowIdData:g}=d;if(c>h.length)return;const y=null!=(r=s.height)?r:36,b=m["main-body-wrapper"],I=b?e(b):null;let w=I?Math.max(8,Math.ceil(I.clientHeight/y)+2+u):8;const T=[0];let D=0;if(l&&h.find(((e,o)=>{const n=t.getRowSeq(e),r=(v(T)||0)+Math.max(y,i.getMax(n));if(T.push(r),r>l)return D=Math.max(0,o-u),w+=Math.min(D,u),!0})),D>0&&x(o.spanMethod)){const{spanMethod:e}=o,l={rowspan:1,colspan:1};for(;D>0;){if(!t.getColumns().some(((t,o)=>{const{rowspan:n,colspan:r}=e({column:t,columnIndex:o,$columnIndex:o,row:h[D],rowIndex:D,$rowIndex:D,_rowIndex:D,isHidden:!t.visible,fixed:t.fixed,type:t.type,visibleData:h})||l;if(0===n&&0===r)return D--,!0})))break}}const M=`${T[D]}px`,S=`${h.reduce(((e,o)=>{const l=t.getRowSeq(o);return e+Math.max(y,i.getMax(l))}),0)}px`;["main","left","right"].forEach((t=>{const o=m[`${t}-body-table`],n=o?e(o):null;n&&(n.style.marginTop=M,n.scrollTop=l),["header","body","footer"].forEach((o=>{const l=m[`${t}-${o}-ySpace`],n=l?e(l):null;n&&(n.style.height=S)}))}));const H=Math.min(h.length,D+w);if(f.startIndex===D&&f.endIndex===H)return;f.startIndex=D,f.endIndex=H;const U=h.slice(f.startIndex,f.endIndex);U.forEach(((e,o)=>{const l=t.getRowid(e),n=g[l];n&&(n.$index=o)})),p.tableData.length=0,p.tableData.push(...U)}const Y=h(j,300);function E(){const t="variableHeightRendererPlugin";return T({name:t,vxe(e){F=n({props:{payload:{type:Object,required:!0}},setup(t){const o=r(b),n=r("$xetable"),p=a(),m=R(o),h=s((()=>t.payload.row[t.payload.column.field]));function v(){const{row:e,column:o}=t.payload,l=n.getRowSeq(e);if(!m||null==l||!p.value)return;const r=p.value.clientHeight;m.set(l,o.field,r)}i("updateCellHeight",v),u([()=>t.payload.rowIndex,()=>t.payload.column.field,h,()=>t.payload.column.renderWidth],(async()=>{await g(0),v()})),c((()=>{n&&!S(o)&&U(o,n),v()}));const I=s((()=>{var o,l,n,r,a;const s=null!=(l=null==(o=t.payload.column.editRender)?void 0:o.props)?l:{},i=null!=(r=null==(n=s.slots)?void 0:n.default)?r:s.slotFn;if(x(i))return i;const u=null==(a=t.payload.column.editRender)?void 0:a.name;if(u){const o=e.renderer.get(u);if(null==o?void 0:o.renderCell)return()=>o.renderCell(t.payload.column.editRender,t.payload)}return()=>h.value})),w=s((()=>{if(t.payload.column.treeNode)return"";const e=t.payload.column.renderWidth;return y(e)&&e>0?f(e-20-2):""}));return()=>l("div",{ref:p,style:{padding:"7px 0",width:w.value,overflow:"hidden"}},[d(I.value,t.payload)])}})},apply(n){function r(t){const o=S(t.uuid);if(!o)return;t.scrollY={enabled:!1},o.reactData.scrollYLoad=!1;const l=function(t){const o=t.internalData.elemStore["main-body-wrapper"];return o?e(o):null}(o);l&&j(o,t,{scrollTop:l.scrollTop})}function a(e){if(!e.uuid)return;const t=C(e.uuid);t&&(e.scrollY=t),setTimeout((()=>r(e)),300)}function s(e){return l(F,{payload:e},null)}n.dataHooks.dataStart.tap(t,((e,t)=>a(t))),n.eventHooks.onFilterChange.tap(t,((e,t)=>a(t))),n.eventHooks.onSortChange.tap(t,((e,t)=>a(t))),n.eventHooks.onToggleTreeExpand.tap(t,((e,t)=>a(t))),n.eventHooks.onResizableChange.tap(t,(async({column:e},t)=>{e.editRender&&e.editRender.props&&w(e.editRender.props)&&a(t)})),n.eventHooks.onScroll.tap(t,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)),n.fieldHooks.field.tap(t,(e=>{if(w(e)){e.slots={...e.slots,default:s};const t=e.className,o="variable-height";e.className=t?function(e){return x(t)?[t(e),o]:[t,o]}:o}return e})),n.fieldHooks.fieldList.tap(t,((t,o,{$table:l})=>(o.uuid&&p(t,((t,n)=>{var a,s;if(w(t)){const t=null!=(s=null==(a=o.rowConfig)?void 0:a.height)?s:36,i=R(o.uuid),u=o.cellStyle;if(o.cellStyle=function(e){const o={};if(l.value){const n=Math.max(t,i.getMax(l.value.getRowSeq(e.row)));o.height=`${n}px`}return Object.assign(o,u?x(u)?u(e):u:null)},o.sortableConfig&&o.sortableConfig.enable){const t=o.sortableConfig.onEnd;o.sortableConfig.onEnd=function(l){const n=S(o.uuid);if(n){const{internalData:{elemStore:t}}=n,l=t["main-table-body"];l&&e(l)&&j(n,o,{scrollTop:e(l).scrollTop})}x(t)&&t(l)}}o.scrollY={...o.scrollY,mode:"default"},o.onWheel=function(t){let o=null,l=0,n=!0;return function(r){if(!t.uuid)return;const a=S(t.uuid);if(!a)return;const{internalData:s}=a,{isHover:i}=t.rowConfig||{},{deltaX:u,deltaY:c}=r,{refTableLeftBody:d,refTableRightBody:p,refTableBody:f}=a.getRefMaps(),h=c,g=u,v=h<0,x=e(f),y=x?x.$el:null;if(!y)return;if(v?y.scrollTop<=0:y.scrollTop>=y.scrollHeight-y.clientHeight)return;const b=y.scrollTop+h,I=y.scrollLeft+g;if(b===s.lastScrollTop)return;r.preventDefault(),s.lastScrollTop=b,s.lastScrollLeft=I,s.lastScrollTime=Date.now(),i&&a.clearHoverRow();const w=d.value,T=p.value,D=w?w.$el:null,R=T?T.$el:null,M=Math.min(100,Math.abs(Math.floor(h/2)));n&&(l=y.scrollTop,n=!1),l+=M*(v?-1:1),o&&o(),o=m(y.scrollTop,l,400,(e=>{y.scrollTop=e,D&&(D.scrollTop=e),R&&(R.scrollTop=e)}),"easeOutCubic",(()=>{l=y.scrollTop,n=!0})),Y(a,t,y)}}(o),setTimeout((()=>{k(o.uuid,o.scrollY),r(o)}),300),n()}})),t))),n.setupHooks.setup.tap(t,(e=>{o((()=>{e.value.uuid&&(M(e.value.uuid),H(e.value.uuid),$(e.value.uuid))}))}))}})}export{E as variableHeightRendererPlugin};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,inject as t,
|
1
|
+
import{reactive as e,inject as t,toRaw as n,unref as r,normalizeStyle as i,createVNode as o}from"vue";import{jsonParse as l}from"../../../../shared/utils/index.js";import{promiseTimeout as u}from"@vueuse/shared";import{parse as a,isValid as c,compareDesc as s}from"date-fns";import{isString as d,isFunction as f,isNumber as p,isObject as m,isArray as v}from"lodash-es";import{InjectionIhoTableEmits as h,IHO_TABLE_NUMBER_STATUS as g,IHO_TABLE_STRING_STATUS as I,IHO_TABLE_TREE_TYPE as E,InjectionIhoTableConfig as T,EDITABLE_WIDGET_TYPE as w,InjectionIhoTableUUID as F}from"../constants/index.js";import{getSeparateInfo as S}from"./separateMap.js";export{deleteSeparateInfo,getSeparateInfo,setSeparateInfo}from"./separateMap.js";function R(e){return console.warn(`[IhoTable]: ${e}`)}const C=Object.freeze({getCellType(e){var t;return((null==(t=e.settingObj)?void 0:t.attr)||e.formType||"DEFAULT").toUpperCase()}});function b(){var e,n,r;const i=t(T);return i||R("this function(getRowHeight) only can be used in setup environment"),null!=(r=null==(n=null==(e=null==i?void 0:i.value)?void 0:e.rowConfig)?void 0:n.height)?r:32}function D(e){const t=e.slice(2);return`${t[0].toLowerCase()}${t.slice(1)}`}function O(e){return`on${e[0].toUpperCase()}${e.slice(1)}`}function P(t,n=!0){const r=n?e(new Map):new Map;return{uuidMap:r,getItemFromUUID:function(e){return r.get(e)||r.set(e,t()),r.get(e)},setItemFromUUID:function(e,t){r.set(e,t)},removeItemFromUUID:function(e){r.delete(e)}}}async function x(e,t,n,i,o=2){const l=function(){var o;const l=null==(o=r(i))?void 0:o.getColumnByField(e.field);if(!l)return;const u=y(l);return u?f(u.separateWidth)?u.separateWidth({column:l,row:t,rowIndex:n,$table:r(i)}):p(u.separateWidth)?u.separateWidth:l.renderWidth:l.renderWidth}();return p(l)&&l>0?l:o<=0?function(){const t=+e.colWidth;return p(t)?t:64}():(await u(0),x(e,t,n,i,o-1))}function A(e){const i=t(h);function o(){var t;const n=r(e);return{$table:n.$table,value:n.row[n.column.field],row:n.row,column:{...n.column,...null==(t=n.column.editRender)?void 0:t.props},index:n.rowIndex>-1?n.rowIndex:n.$rowIndex}}function l(e={}){i("formChange",{...o(),...n(e)})}function u(e={}){i("formClick",{...o(),...n(e)})}return{emitFormChange:function(){l()},emitFormClick:function(){u()},emitFormChangeWithParams:l,emitFormClickWithParams:u}}function y(e){var t;return null==(t=e.editRender)?void 0:t.props}const $=Object.freeze({createDefaultRenderCell:function(){return function({props:e},{row:n,column:r}){if("bottom"!==(null==e?void 0:e.separatePlacement))return c(n[r.field]);const i=t(F),l=S(i,n);if(!l)return c(n[r.field]);const{originalData:u=n,isLastRow:a}=l;return c(a?u[r.field]:null);function c(e){return[o("span",{title:U(r,e),class:"iho-table__colorAndIcon"},[e])]}}},createRenderEdit:function(e){return function({props:t},n){return e({...n,fieldItem:t||{},...A(n)})}},isEditableColumn(e,t){var n;return!1!==(null==(n=e.editConfig)?void 0:n.showIcon)&&t.editRender&&!1!==t.editRender.enabled},hasFilter(e){return this.hasDateFilter(e)||this.hasOptionFilter(e)||this.hasTextFilter(e)},hasDynamicFilter:e=>e.optionInfo&&(e.optionInfo.dynamicOptionInfo||e.optionInfo.list),hasRemoteSearchFilter(e){var t;return"remote"===(null==(t=e.filterSetting)?void 0:t.type)},hasOptionFilter(e){var t;if(M(e))return!0;const n=null==(t=e.settingObj)?void 0:t.showSetting;if(n&&n.length)return n.some((e=>{var t;return e.change_text&&(null==(t=e.filter)?void 0:t.length)}));let r=e.fieldSetting;return d(r)&&(r=l(r||"")),m(r)&&((i=r).notParticipatingSearch!==I.POSITIVE&&"manual"===(null==(o=i.mapping)?void 0:o.type));var i,o},hasDateFilter(e){var t;return"daterange"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTextFilter(e){var t;return"text"===(null==(t=null==e?void 0:e.filterSetting)?void 0:t.type)},hasTitlePrefix(e){var t,n;return e&&((null==(t=e.titlePrefix)?void 0:t.content)||(null==(n=e.titlePrefix)?void 0:n.useHTML))}}),_=Object.freeze({isPositive:e=>e===g.POSITIVE||e===I.POSITIVE,isNegative:e=>e===g.NEGATIVE||e===I.NEGATIVE,notPositive:e=>e!==g.POSITIVE&&e!==I.POSITIVE,notNegative:e=>e!==g.NEGATIVE&&e!==I.NEGATIVE});function N(e){return[E.TRANSFORM_WITH_SPAN_METHOD,E.TRANSFORM_TREE_TYPE].includes(`${e.isTree}`)}function H(e){return d(e)&&!!e.match(/^###\{[^{}]+}$/)}function V(e){try{return JSON.parse(e.replace(/^###/,""))}catch(e){return{}}}function W(e,t){if(e.$__SEPARATE||!t.editRender||!t.editRender.props)return e[t.field];const{fieldSetting:n}=t.editRender.props;if(!d(n))return e[t.field];const{mergedFeildExpression:r}=l(n);return r&&d(r)?r.replace(/#{(.+?)}/g,(function(t,n){let r=n?e[n.trim()]:null;H(r)&&(r=V(r).change_text);return r||(null==r?"--":r)})):e[t.field]}const j=["SEARCH","SELECT","RADIO","CHECKBOX"];function M(e){return e.notParticipatingSearch===g.NEGATIVE&&j.includes(C.getCellType(e))&&v(e.options)&&e.options.length}function U(e,t=""){return"tooltip"!==e.showOverflow&&d(t)?t:""}function G(e,t){var n,i,o;t=r(t)||"";const l=null!=(i=null==(n=e.editRender)?void 0:n.props)?i:{},u=a(t,(null==(o=null==l?void 0:l.componentProps)?void 0:o.valueFormat)||"HH:mm",new Date);return!c(u)}function L(e,t,n){var i,o;const l=null!=(o=null==(i=e.editRender)?void 0:i.props)?o:{};return n=r(n)||"",!c(new Date(n))||d(l.connectField)&&t[l.connectField]&&(l.isStartDate&&s(new Date(n),new Date(t[l.connectField]))<0||l.isEndDate&&s(new Date(n),new Date(t[l.connectField]))>0)}function k(e){var t,n;return(!0===e.variableHeight||"1"===e.variableHeight)&&(null!=(n=null==(t=e.editRender)?void 0:t.name)?n:C.getCellType(e))!==w.SEPARATE}function z(e){const t=e.internalData.tableFullColumn;return!!v(t)&&t.some((e=>{var t,n;return k(null!=(n=null==(t=e.editRender)?void 0:t.props)?n:{})}))}function B(e,t){return t?e?n=>[f(e)?e(n):e,f(t)?t(n):t]:t:e}function J(e,t){return t?e?n=>i([f(e)?e(n):e,f(t)?t(n):t]):t:e}function K(e){return function({option:t,column:n,row:r}){if(e&&v(r[e])&&r[e].length)return!1;const i=r[n.field];if(v(i))return i.some((e=>[t.label,t.value].includes(e)));if(d(i)){if(i===t.value||i===t.label)return!0;const{value:e,change_text:n}=V(i);return n===t.label||e===t.value}return null!=i&&t.value===i}}export{$ as IhoTableRenderHelper,_ as IhoTableStatusHelper,C as IhoTableUtils,R as IhoTableWarn,K as createIhoTableFilterMethod,D as eventListener2EventName,O as eventName2EventListener,x as getColumnRenderWidth,y as getLowCodeFieldFromField,b as getRowHeight,U as getTitle,M as isCompatibleColumn,L as isInvalidDate,G as isInvalidTime,H as isRichContent,N as isTransformTreeType,k as isVariableHeightColumn,z as isVariableHeightTable,B as mergeVxeClass,J as mergeVxeStyle,W as parseMergeField,V as parseRichContent,A as useIhoTableFormEvent,P as useUUIDMap};
|