cnhis-design-vue 3.1.22-beta.3 → 3.1.22-beta.3.1

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.
@@ -1,12 +1,14 @@
1
1
  import { SFCWithInstall } from '../../../es/shared/types';
2
+ import { IhoTableInstance } from '../../../es/components/iho-table/src/types';
2
3
  export * from './src/hooks/useTablePlugin';
3
4
  export * from './src/types';
5
+ export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => void;
4
6
  declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
5
7
  tableConfig: {
6
- type: import("vue").PropType<import("./src/types").IhoTableConfig>;
8
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
7
9
  };
8
10
  fieldList: {
9
- type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
11
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
10
12
  required: true;
11
13
  };
12
14
  tableData: {
@@ -16,10 +18,10 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
16
18
  }, {
17
19
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
18
20
  tableConfig: {
19
- type: import("vue").PropType<import("./src/types").IhoTableConfig>;
21
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
20
22
  };
21
23
  fieldList: {
22
- type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
24
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
23
25
  required: true;
24
26
  };
25
27
  tableData: {
@@ -32,9 +34,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
32
34
  }>>;
33
35
  emits: (event: "formChange" | "settingClick", ...args: any[]) => void;
34
36
  hooks: Readonly<{
35
- configHooks: import("./src/types").AbstractConfigHooks;
36
- fieldHooks: import("./src/types").AbstractFieldHooks;
37
- eventHooks: import("./src/types").AbstractEventHooks;
37
+ configHooks: import("../../../es/components/iho-table/src/types").AbstractConfigHooks;
38
+ fieldHooks: import("../../../es/components/iho-table/src/types").AbstractFieldHooks;
39
+ eventHooks: import("../../../es/components/iho-table/src/types").AbstractEventHooks;
38
40
  }>;
39
41
  configRef: import("vue").Ref<{
40
42
  [x: string]: unknown;
@@ -4673,21 +4675,21 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4673
4675
  }>;
4674
4676
  IhoTableColumn: import("vue").DefineComponent<{
4675
4677
  field: {
4676
- type: import("vue").PropType<import("./src/types").IhoTableFieldItem>;
4678
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableFieldItem>;
4677
4679
  required: true;
4678
4680
  };
4679
4681
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4680
4682
  field: {
4681
- type: import("vue").PropType<import("./src/types").IhoTableFieldItem>;
4683
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableFieldItem>;
4682
4684
  required: true;
4683
4685
  };
4684
4686
  }>>, {}>;
4685
4687
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("formChange" | "settingClick")[], "formChange" | "settingClick", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
4686
4688
  tableConfig: {
4687
- type: import("vue").PropType<import("./src/types").IhoTableConfig>;
4689
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").IhoTableConfig>;
4688
4690
  };
4689
4691
  fieldList: {
4690
- type: import("vue").PropType<import("./src/types").LowCodeTableFieldItem[]>;
4692
+ type: import("vue").PropType<import("../../../es/components/iho-table/src/types").LowCodeTableFieldItem[]>;
4691
4693
  required: true;
4692
4694
  };
4693
4695
  tableData: {
@@ -1,3 +1,3 @@
1
- export { default } from './index2.js';
1
+ export { default, useIhoTablePresetPlugins } from './index2.js';
2
2
  export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
3
3
  export { AbstractConfigHooks, AbstractEventHooks, AbstractFieldHooks } from './src/types/pluginType2.js';
@@ -1,5 +1,7 @@
1
1
  import { COMPONENT_NAMESPACE } from '../../shared/global/variable2.js';
2
2
  import { safeComponentRegister } from '../../shared/utils/index2.js';
3
+ import script from './src/IhoTable.js';
4
+ import * as index from './src/plugins/index2.js';
3
5
  import 'lodash-es';
4
6
  import './src/constants/index2.js';
5
7
  import '../../shared/utils/tapable/SyncHook.js';
@@ -14,13 +16,14 @@ import '../../shared/utils/tapable/AsyncSeriesLoopHook.js';
14
16
  import '../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
15
17
  import { useTablePlugin } from './src/hooks/useTablePlugin2.js';
16
18
  export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin2.js';
17
- import script from './src/IhoTable.js';
18
- import * as index from './src/plugins/index2.js';
19
19
 
20
- useTablePlugin().use(Object.values(index).map((plugin) => plugin()));
20
+ const { use } = useTablePlugin();
21
+ const useIhoTablePresetPlugins = (instance) => {
22
+ use(Object.values(index).map((plugin) => plugin()), instance);
23
+ };
21
24
  const IhoTable = script;
22
25
  IhoTable.install = function(app) {
23
26
  safeComponentRegister(app, IhoTable, COMPONENT_NAMESPACE + "IhoTable");
24
27
  };
25
28
 
26
- export { IhoTable as default };
29
+ export { IhoTable as default, useIhoTablePresetPlugins };
@@ -9,7 +9,7 @@ var IhoTableColumn = defineComponent({
9
9
  }
10
10
  },
11
11
  setup(props) {
12
- const VxeColumn = resolveComponent("vxe-table");
12
+ const VxeColumn = resolveComponent("vxe-column");
13
13
  return () => createVNode(VxeColumn, props.field, null);
14
14
  }
15
15
  });
@@ -1,7 +1,7 @@
1
1
  import { ArrayAble } from '../../../../../es/shared/types';
2
- import { TablePlugin } from '../../../../../es/components/iho-table/src/types';
2
+ import { IhoTableInstance, TablePlugin } from '../../../../../es/components/iho-table/src/types';
3
3
  export declare function useTablePlugin(): {
4
- use: (plugin: ArrayAble<TablePlugin>) => {
4
+ use: (plugin: ArrayAble<TablePlugin>, instance: IhoTableInstance) => {
5
5
  use: any;
6
6
  };
7
7
  };
@@ -4,8 +4,9 @@ import { createTableHooks } from './tapHooks/index2.js';
4
4
 
5
5
  function useTablePlugin() {
6
6
  const hooks = createTableHooks();
7
- function use(plugin) {
8
- arrayed(plugin).forEach(({ apply }) => {
7
+ function use(plugin, instance) {
8
+ arrayed(plugin).forEach(({ vxe, apply }) => {
9
+ isFunction(vxe) && vxe(instance);
9
10
  isFunction(apply) && apply(hooks);
10
11
  });
11
12
  return { use };
@@ -1,9 +1,20 @@
1
1
  import { ArrayAble } from '../../../../../es/shared/types';
2
2
  import { AsyncParallelHook, SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
3
+ import { VxeGlobalCommands, VxeGlobalFormats, VxeGlobalHooks, VxeGlobalMenus, VxeGlobalRenderer } from 'vxe-table';
3
4
  import { VxeTableEventProps, VxeTableEvents } from 'vxe-table/types/table';
5
+ import { VxeGlobalInterceptor } from 'vxe-table/types/v-x-e-table';
4
6
  import { IhoTableConfig, IhoTableFieldItem } from '.';
7
+ export declare type IhoTableInstance = {
8
+ interceptor: VxeGlobalInterceptor;
9
+ renderer: VxeGlobalRenderer;
10
+ commands: VxeGlobalCommands;
11
+ formats: VxeGlobalFormats;
12
+ menus: VxeGlobalMenus;
13
+ hooks: VxeGlobalHooks;
14
+ };
5
15
  export declare type TablePlugin = {
6
16
  name: string;
17
+ vxe?(xeTable: IhoTableInstance): void;
7
18
  apply?(hooks: TableHooks): void;
8
19
  };
9
20
  export declare type TableHooks = Readonly<{
@@ -16,7 +16,7 @@ export { default as CFabricChart } from './fabric-chart/index2.js';
16
16
  export { default as CShortcutProvider } from './shortcut-provider/index2.js';
17
17
  export { default as CShortcutSetter } from './shortcut-setter/index2.js';
18
18
  export { default as CFormConfig } from './form-config/index2.js';
19
- export { default as CIhoTable } from './iho-table/index2.js';
19
+ export { default as CIhoTable, useIhoTablePresetPlugins } from './iho-table/index2.js';
20
20
  export { useFieldListAdaptor } from './form-render/src/hooks/useFieldListAdaptor2.js';
21
21
  export { useFormRequest } from './form-render/src/hooks/useFormRequest2.js';
22
22
  export { useCommonLog } from './form-render/src/hooks/useCommonLog2.js';
@@ -39,7 +39,7 @@ export { default as CShortcutSetter } from './shortcut-setter/index2.js';
39
39
  import FormConfig from './form-config/index2.js';
40
40
  export { default as CFormConfig } from './form-config/index2.js';
41
41
  import IhoTable from './iho-table/index2.js';
42
- export { default as CIhoTable } from './iho-table/index2.js';
42
+ export { default as CIhoTable, useIhoTablePresetPlugins } from './iho-table/index2.js';
43
43
 
44
44
  const components = {
45
45
  CGrid: Grid,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.22-beta.3",
3
+ "version": "3.1.22-beta.3.1",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -66,5 +66,5 @@
66
66
  "iOS 7",
67
67
  "last 3 iOS versions"
68
68
  ],
69
- "gitHead": "853d8c301074b7d72a8ce2042f7a3c7faf55ebc7"
69
+ "gitHead": "f02d3812d3b50bc13419b882c46a76446a6cdea1"
70
70
  }