cnhis-design-vue 3.1.30-beta.6 → 3.1.30-beta.7

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,5 +1,4 @@
1
1
  import { SFCWithInstall } from '../../../es/shared/types';
2
- export * from './src/hooks/export';
3
2
  declare const BigTable: SFCWithInstall<import("vue").DefineComponent<{
4
3
  data: {
5
4
  type: ArrayConstructor;
@@ -3,7 +3,6 @@ import { safeComponentRegister } from '../../shared/utils/index.js';
3
3
  import { expandXEUtils } from '../../shared/utils/utilExpand.js';
4
4
  import '../index.js';
5
5
  import script from './src/BigTable.js';
6
- export { useColumnConfigAdaptor } from './src/hooks/useColumnConfigAdaptor.js';
7
6
  import Grid from '../grid/index.js';
8
7
 
9
8
  const BigTable = script;
@@ -1,6 +1,6 @@
1
1
  import { SFCWithInstall } from '../../../es/shared/types';
2
2
  import { IhoTableInstance } from '../../../es/components/iho-table/src/types';
3
- export * from './src/hooks/useTablePlugin';
3
+ export * from './src/hooks/export';
4
4
  export * from './src/types';
5
5
  export declare const useIhoTablePresetPlugins: (instance: IhoTableInstance) => void;
6
6
  declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
@@ -18,6 +18,7 @@ import '../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
18
18
  export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './src/types/pluginType.js';
19
19
  import { useTablePlugin } from './src/hooks/useTablePlugin.js';
20
20
  export { defineTablePlugin, useTablePlugin } from './src/hooks/useTablePlugin.js';
21
+ export { useColumnConfigAdaptor } from './src/hooks/useColumnConfigAdaptor.js';
21
22
 
22
23
  const { use } = useTablePlugin();
23
24
  const useIhoTablePresetPlugins = (instance) => {
@@ -36,13 +36,16 @@ const ColumnComponent = defineComponent({
36
36
  }, null) : null]);
37
37
  }
38
38
  function columnSlot({
39
- slots
39
+ slots,
40
+ annotation
40
41
  }) {
41
- return Object.assign({}, slots, {
42
- header(payload) {
43
- return renderHeader(payload, slots == null ? void 0 : slots.header);
44
- }
45
- });
42
+ const result = {
43
+ ...slots
44
+ };
45
+ if (annotation !== false) {
46
+ result.header = (payload) => renderHeader(payload, slots == null ? void 0 : slots.header);
47
+ }
48
+ return result;
46
49
  }
47
50
  function renderColumn(field) {
48
51
  return createVNode(VxeColumn, omit(field, ["slots"]), columnSlot(field));
@@ -1 +1,2 @@
1
+ export * from './useTablePlugin';
1
2
  export * from './useColumnConfigAdaptor';
@@ -0,0 +1,2 @@
1
+ export { defineTablePlugin, useTablePlugin } from './useTablePlugin.js';
2
+ export { useColumnConfigAdaptor } from './useColumnConfigAdaptor.js';
@@ -17,6 +17,7 @@ function defaultConfigPlugin() {
17
17
  columnConfig: { resizable: true },
18
18
  rowConfig: { height: 48, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
19
19
  mouseConfig: { selected: true },
20
+ showOverflow: "tooltip",
20
21
  editConfig: {
21
22
  trigger: "click",
22
23
  mode: "cell",
@@ -25,15 +25,14 @@ function lowCodeFieldAdaptorPlugin() {
25
25
  });
26
26
  }
27
27
  function settingObjAdaptor(fieldItem, lowCodeField) {
28
- if (!lowCodeField.settingObj)
29
- return;
28
+ var _a, _b;
30
29
  fieldItem.editRender = {
31
30
  autofocus: "input",
32
- name: lowCodeField.settingObj.attr || "DEFAULT",
31
+ name: (((_a = lowCodeField.settingObj) == null ? void 0 : _a.attr) || lowCodeField.formType || "DEFAULT").toUpperCase(),
33
32
  props: cloneDeep(toRaw(lowCodeField))
34
33
  };
35
34
  fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
36
- fieldItem.visible = lowCodeField.settingObj.isHide !== IHO_TABLE_STRING_STATUS.POSITIVE;
35
+ fieldItem.visible = ((_b = lowCodeField.settingObj) == null ? void 0 : _b.isHide) !== IHO_TABLE_STRING_STATUS.POSITIVE;
37
36
  }
38
37
 
39
38
  export { lowCodeFieldAdaptorPlugin };
@@ -1,6 +1,6 @@
1
- import { reactive, inject, createVNode, toRaw, onBeforeUnmount } from 'vue';
1
+ import { reactive, inject, createVNode, toRaw, h, onBeforeUnmount } from 'vue';
2
2
  import { traverse } from '../../../../../../../shared/utils/index.js';
3
- import { isFunction } from 'lodash-es';
3
+ import { isFunction, isObject } from 'lodash-es';
4
4
  import '../../../../../index.js';
5
5
  import { EDITABLE_WIDGET_TYPE, InjectionIhoTableUUID } from '../../../../constants/index.js';
6
6
  import { getRowHeight } from '../../../../utils/index.js';
@@ -29,10 +29,11 @@ function separateRendererPlugins() {
29
29
  column,
30
30
  row
31
31
  }) {
32
- var _a;
33
32
  const uuid = inject(InjectionIhoTableUUID);
34
- const separateRow = getSeparateRowData(uuid, row);
35
- return createVNode("section", null, [(_a = separateRow == null ? void 0 : separateRow.separateData) == null ? void 0 : _a[column.field]]);
33
+ const separateRow = getSeparateRowData(uuid, row) || {
34
+ separateData: {}
35
+ };
36
+ return createVNode("section", null, [separateRow.separateData[column.field]]);
36
37
  },
37
38
  renderEdit(renderOpts, {
38
39
  column,
@@ -43,8 +44,9 @@ function separateRendererPlugins() {
43
44
  const separateRow = getSeparateRowData(uuid, row);
44
45
  const height = getRowHeight();
45
46
  const slots = {};
46
- if (isFunction((_a = renderOpts.props) == null ? void 0 : _a.separateSlot)) {
47
- slots.menu = renderOpts.props.separateSlot;
47
+ if ((_a = renderOpts.props) == null ? void 0 : _a.separateSlot) {
48
+ const separate = toRaw(renderOpts.props.separateSlot);
49
+ slots.menu = isFunction(separate) ? separate : isObject(separate) ? (props) => h(separate, props) : void 0;
48
50
  }
49
51
  return [createVNode(EditSeparate, {
50
52
  "value": row[column.field],
@@ -1,5 +1,5 @@
1
1
  import { AnyObject, TupleToUnion } from '../../../../../es/shared/types';
2
- import { VxeTableProps, VxeTableDefines } from 'vxe-table';
2
+ import { VxeTableProps, VxeTableDefines, VxeTableInstance } from 'vxe-table';
3
3
  import { VxeTableEventProps } from 'vxe-table/types/table';
4
4
  import { IhoTableEventNameTuple, IhoTableRowGroupSequence, VxeEventListenerNameList } from '../../../../../es/components/iho-table/src/constants';
5
5
  export * from './pluginType';
@@ -40,6 +40,7 @@ export declare type LowCodeTableFieldItem = {
40
40
  settingObj: LowCodeTableSettingObj;
41
41
  treeNode: boolean;
42
42
  isShow: 0 | 1;
43
+ formType: string;
43
44
  componentProps: AnyObject;
44
45
  showOverflow: VxeTableDefines.ColumnInfo['showOverflow'];
45
46
  }> & Partial<Pick<VxeTableDefines.ColumnInfo, 'resizable'>>;
@@ -60,3 +61,6 @@ export declare type IhoTableAnchorItem = {
60
61
  title: string;
61
62
  left: number;
62
63
  };
64
+ export declare type IhoTableExpose = {
65
+ $table: VxeTableInstance;
66
+ };
@@ -25,10 +25,9 @@ import CSearchCascader from './search-cascader';
25
25
  export * from './form-render';
26
26
  export * from './shortcut-provider';
27
27
  export * from './shortcut-setter';
28
- export * from './big-table';
28
+ export * from './iho-table';
29
29
  export * from './button-print';
30
30
  export * from './form-config';
31
- export * from './iho-table';
32
31
  declare function install(app: App): void;
33
32
  export { CGrid, CBigTable, CFieldSet, CDragLayout, CButtonPrint, CSelectPerson, CSelectLabel, CLabelFormContent, CScaleView, CMap, CVodChunkUpload, CRadio, CCheckbox, CSelect, CDatetime, CInfoHeader, CTimeLine, CBpmnWorkflow, CStepsWheel, CEditor, CFormRender, CFabricChart, CShortcutProvider, CShortcutSetter, CFormConfig, CIhoTable, CKeyboard, CSearchCascader };
34
33
  declare const _default: {
@@ -66,10 +66,10 @@ export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, f
66
66
  export * from '@formily/core';
67
67
  export { GlobalShortcutProvider, ShortcutManager, useShortcuts } from './shortcut-provider/src/hooks/useShortcuts.js';
68
68
  export { useShortcutSignature } from './shortcut-provider/src/hooks/useShortcutSignature.js';
69
- export { useColumnConfigAdaptor } from './big-table/src/hooks/useColumnConfigAdaptor.js';
70
- export { Print } from './button-print/src/utils/print.js';
71
69
  export { defineTablePlugin, useTablePlugin } from './iho-table/src/hooks/useTablePlugin.js';
70
+ export { useColumnConfigAdaptor } from './iho-table/src/hooks/useColumnConfigAdaptor.js';
72
71
  export { AbstractConfigHooks, AbstractDataHooks, AbstractDomInsertHooks, AbstractEventHooks, AbstractFieldHooks, AbstractSetupHooks } from './iho-table/src/types/pluginType.js';
72
+ export { Print } from './button-print/src/utils/print.js';
73
73
 
74
74
  const components = {
75
75
  CGrid: Grid,
@@ -233,7 +233,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
233
233
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
234
234
  createCommentVNode(" </n-popover> "),
235
235
  createElementVNode("div", {
236
- class: normalizeClass(["c-keyboard-english", __props.dragable ? "isFixed" : ""]),
236
+ class: normalizeClass(["c-keyboard-english", { isFixed: __props.dragable }]),
237
237
  ref_key: "englishKeyboardRef",
238
238
  ref: englishKeyboardRef,
239
239
  style: normalizeStyle(unref(style))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.1.30-beta.6",
3
+ "version": "3.1.30-beta.7",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -61,5 +61,5 @@
61
61
  "iOS 7",
62
62
  "last 3 iOS versions"
63
63
  ],
64
- "gitHead": "21fe9d52c5242a1a00ed2aa48045ef5ff1d661f1"
64
+ "gitHead": "4cc6424d34e20374b9f582fb0b8203b1f2842e3d"
65
65
  }
@@ -1 +0,0 @@
1
- export { useColumnConfigAdaptor } from './useColumnConfigAdaptor.js';