cnhis-design-vue 3.1.34-beta.0 → 3.1.34-beta.10

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.
Files changed (72) hide show
  1. package/es/components/big-table/index.d.ts +1 -0
  2. package/es/components/big-table/src/BigTable.vue.d.ts +1 -0
  3. package/es/components/big-table/src/BigTable.vue2.js +17 -5
  4. package/es/components/big-table/src/components/edit-form/edit-input.js +2 -1
  5. package/es/components/big-table/src/components/edit-form/edit-select.js +26 -1
  6. package/es/components/big-table/src/hooks/useEvent.js +3 -4
  7. package/es/components/fabric-chart/index.d.ts +141 -374
  8. package/es/components/fabric-chart/src/BirthProcessChart.vue.d.ts +2 -2
  9. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +142 -374
  10. package/es/components/fabric-chart/src/FabricChart.vue.js +52 -22
  11. package/es/components/fabric-chart/src/hooks/index.d.ts +1 -0
  12. package/es/components/fabric-chart/src/hooks/index.js +1 -0
  13. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +2 -2
  14. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -6
  15. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +4 -18
  16. package/es/components/fabric-chart/src/hooks/useCenter.js +5 -21
  17. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
  18. package/es/components/fabric-chart/src/hooks/useCommon.js +2 -2
  19. package/es/components/fabric-chart/src/hooks/useGrid.js +2 -7
  20. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +2 -1
  21. package/es/components/fabric-chart/src/hooks/useLeft.js +22 -28
  22. package/es/components/fabric-chart/src/hooks/useOther.js +1 -6
  23. package/es/components/fabric-chart/src/hooks/useRight.js +13 -18
  24. package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +25 -0
  25. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +339 -0
  26. package/es/components/fabric-chart/src/hooks/useTop.js +1 -6
  27. package/es/components/form-render/index.js +1 -1
  28. package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +1 -7
  29. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +2 -5
  30. package/es/components/form-render/src/components/renderer/radio.js +2 -2
  31. package/es/components/form-render/src/components/renderer/remoteSearch.d.ts +1 -7
  32. package/es/components/form-render/src/components/renderer/remoteSearch.js +2 -5
  33. package/es/components/form-render/src/components/renderer/searchCascade.js +4 -12
  34. package/es/components/form-render/src/components/renderer/select.d.ts +1 -7
  35. package/es/components/form-render/src/components/renderer/select.js +2 -5
  36. package/es/components/form-render/src/utils/index.js +1 -1
  37. package/es/components/form-render/src/utils/schema.d.ts +1 -1
  38. package/es/components/form-render/src/utils/schema.js +4 -4
  39. package/es/components/iho-table/index.d.ts +6 -0
  40. package/es/components/iho-table/index.js +1 -1
  41. package/es/components/iho-table/src/IhoTable.vue.d.ts +6 -0
  42. package/es/components/iho-table/src/IhoTable.vue.js +12 -1
  43. package/es/components/iho-table/src/components/IhoTableColumn.js +1 -1
  44. package/es/components/iho-table/src/constants/index.d.ts +6 -0
  45. package/es/components/iho-table/src/constants/index.js +9 -7
  46. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +1 -1
  47. package/es/components/iho-table/src/hooks/tapHooks/index.js +4 -4
  48. package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +19 -7
  49. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.d.ts +12 -0
  50. package/es/components/iho-table/src/plugins/filterPlugin/filter.vue.js +58 -25
  51. package/es/components/iho-table/src/plugins/filterPlugin/index.js +56 -55
  52. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +13 -8
  53. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +1 -1
  54. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.js +2 -2
  55. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +12 -7
  56. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +3 -3
  57. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +2 -2
  58. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.d.ts +1 -1
  59. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue.js +2 -2
  60. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin.js +2 -2
  61. package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +10 -3
  62. package/es/components/iho-table/src/types/index.d.ts +8 -3
  63. package/es/components/iho-table/src/utils/index.d.ts +10 -2
  64. package/es/components/iho-table/src/utils/index.js +27 -5
  65. package/es/components/iho-table/style/index.css +1 -1
  66. package/es/components/index.css +1 -1
  67. package/es/components/index.js +1 -1
  68. package/es/shared/types/index.d.ts +1 -0
  69. package/package.json +2 -2
  70. package/es/components/fabric-chart/src/BirthProcessChart.vue.js +0 -172
  71. package/es/components/fabric-chart/src/TemperatureChart.vue.d.ts +0 -214
  72. package/es/components/fabric-chart/src/TemperatureChart.vue.js +0 -355
@@ -2075,6 +2075,9 @@ declare const _default: import("vue").DefineComponent<{
2075
2075
  onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
2076
2076
  onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
2077
2077
  uuid?: string | undefined;
2078
+ isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2079
+ isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2080
+ isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2078
2081
  showSeq?: boolean | undefined;
2079
2082
  selectType?: "checkbox" | "radio" | null | undefined;
2080
2083
  rowGroupSetting?: {
@@ -4463,6 +4466,9 @@ declare const _default: import("vue").DefineComponent<{
4463
4466
  } | undefined;
4464
4467
  params?: any;
4465
4468
  uuid?: string | undefined;
4469
+ isTree?: import("../../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4470
+ isSort?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4471
+ isBatchSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4466
4472
  showSeq?: boolean | undefined;
4467
4473
  selectType?: "checkbox" | "radio" | null | undefined;
4468
4474
  rowGroupSetting?: {
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, provide, ref, computed, watch, resolveComponent, openBlock, createElementBlock, unref, createBlock, resolveDynamicComponent, createVNode, mergeProps, createSlots, withCtx, Fragment, renderList, renderSlot } from 'vue';
2
2
  import { uuidGenerator } from '../../../shared/utils/index.js';
3
3
  import { useDebounceFn } from '@vueuse/core';
4
+ import { promiseTimeout } from '@vueuse/shared';
4
5
  import { VxeEventListenerNameList, InjectionIhoTableEmits, InjectionIhoTableUUID, InjectionIhoTableInstance, InjectionIhoTableConfig, InjectionIhoTableFieldList, InjectionIhoTableHandler } from './constants/index.js';
5
6
  import { createTableHooks, applyTableConfigHooks, applyTableFieldHooks, createTableEventHandlers, createDomInsertComponent, createDataTransfer } from './hooks/tapHooks/index.js';
6
7
  import 'lodash-es';
@@ -87,7 +88,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
87
88
  },
88
89
  { deep: true }
89
90
  );
90
- watch(() => props.tableData, updateTableDataRef);
91
+ watch([() => props.tableData, () => {
92
+ var _a2;
93
+ return (_a2 = props.tableData) == null ? void 0 : _a2.length;
94
+ }], async () => {
95
+ var _a2, _b2;
96
+ if (!((_a2 = configRef.value.treeConfig) == null ? void 0 : _a2.expandAll))
97
+ return;
98
+ await promiseTimeout(11);
99
+ (_b2 = $table.value) == null ? void 0 : _b2.setAllTreeExpand(true);
100
+ });
101
+ watch(() => [...props.tableData], updateTableDataRef);
91
102
  _updateConfigRef();
92
103
  _updateFieldListRef();
93
104
  _updateTableDataRef();
@@ -27,7 +27,7 @@ const ColumnComponent = defineComponent({
27
27
  "class": "iho-table__headerWrapper"
28
28
  }, [createVNode("section", {
29
29
  "style": {
30
- width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20))
30
+ width: widthAppend(payload.column.renderWidth - (hasAnnotation ? 36 : 20) - (props.field.sortable ? 24 : 0))
31
31
  }
32
32
  }, [[...arrayed(customHeader != null ? customHeader : createVNode(NEllipsis, {
33
33
  "style": {
@@ -57,6 +57,12 @@ export declare enum IHO_TABLE_STRING_STATUS {
57
57
  NEGATIVE = "0",
58
58
  POSITIVE = "1"
59
59
  }
60
+ export declare enum IHO_TABLE_TREE_TYPE {
61
+ NOT_TREE = 0,
62
+ UNKNOWN = 1,
63
+ UNKNOWN2 = 2,
64
+ TRANSFORM_TREE_TYPE = 3
65
+ }
60
66
  export declare const IhoTableCustomEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard"];
61
67
  export declare const IhoTableEventNameTuple: readonly ["formChange", "settingClick", "formClick", "keyboard", ...("toggleRowExpand" | "toggleTreeExpand" | "copy" | "scroll" | "cut" | "paste" | "keydown" | "keydownStart" | "keydownEnd" | "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")[]];
62
68
  export declare const InjectionIhoTableConfig: InjectionKey<Ref<IhoTableConfig>>;
@@ -128,12 +128,14 @@ var IHO_TABLE_STRING_STATUS = /* @__PURE__ */ ((IHO_TABLE_STRING_STATUS2) => {
128
128
  IHO_TABLE_STRING_STATUS2["POSITIVE"] = "1";
129
129
  return IHO_TABLE_STRING_STATUS2;
130
130
  })(IHO_TABLE_STRING_STATUS || {});
131
- const IhoTableCustomEventNameTuple = [
132
- "formChange",
133
- "settingClick",
134
- "formClick",
135
- "keyboard"
136
- ];
131
+ var IHO_TABLE_TREE_TYPE = /* @__PURE__ */ ((IHO_TABLE_TREE_TYPE2) => {
132
+ IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["NOT_TREE"] = 0] = "NOT_TREE";
133
+ IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN"] = 1] = "UNKNOWN";
134
+ IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["UNKNOWN2"] = 2] = "UNKNOWN2";
135
+ IHO_TABLE_TREE_TYPE2[IHO_TABLE_TREE_TYPE2["TRANSFORM_TREE_TYPE"] = 3] = "TRANSFORM_TREE_TYPE";
136
+ return IHO_TABLE_TREE_TYPE2;
137
+ })(IHO_TABLE_TREE_TYPE || {});
138
+ const IhoTableCustomEventNameTuple = ["formChange", "settingClick", "formClick", "keyboard"];
137
139
  const IhoTableEventNameTuple = [...IhoTableCustomEventNameTuple, ...VxeTableEventNameList];
138
140
  const InjectionIhoTableConfig = Symbol("injectionIhoTableConfig");
139
141
  const InjectionIhoTableFieldList = Symbol("injectionIhoTableFieldList");
@@ -145,4 +147,4 @@ const InjectionIhoTableEventListener = Symbol(
145
147
  "InjectionIhoTableEventListener"
146
148
  );
147
149
 
148
- export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
150
+ export { EDITABLE_WIDGET_TYPE, HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS, IHO_TABLE_TREE_TYPE, IhoTableCustomEventNameTuple, IhoTableEventNameTuple, IhoTableRowGroupSequence, InjectionIhoTableConfig, InjectionIhoTableEmits, InjectionIhoTableEventListener, InjectionIhoTableFieldList, InjectionIhoTableHandler, InjectionIhoTableInstance, InjectionIhoTableUUID, VxeEventListenerNameList, VxeTableEventNameList, WIDGET_TYPE };
@@ -2,8 +2,8 @@ import { AnyObject, Nullable } from '../../../../../../es/shared/types';
2
2
  import { MaybeRef } from '@vueuse/core';
3
3
  import { Ref } from 'vue';
4
4
  import { VxeTableInstance } from 'vxe-table';
5
- import { IhoTableEventListener } from '../../../../../../es/components/iho-table/src/hooks/tapHooks/useEventHooks';
6
5
  import { IhoTableConfig, IhoTableEmits, IhoTableFieldItem, IhoTableHandler, TableHooks } from '../../../../../../es/components/iho-table/src/types';
6
+ import { IhoTableEventListener } from './useEventHooks';
7
7
  export declare const createTableHooks: () => Readonly<{
8
8
  configHooks: import("../../../../../../es/components/iho-table/src/types").AbstractConfigHooks;
9
9
  fieldHooks: import("../../../../../../es/components/iho-table/src/types").AbstractFieldHooks;
@@ -1,15 +1,15 @@
1
1
  import { arrayed } from '../../../../../shared/utils/index.js';
2
- import { unref, defineComponent } from 'vue';
3
2
  import { cloneDeep, isArray, isFunction } from 'lodash-es';
3
+ import { unref, defineComponent } from 'vue';
4
4
  import { VxeEventListenerNameList } from '../../constants/index.js';
5
+ import { getEventName } from '../../utils/index.js';
6
+ import { useConfigHooks } from './useConfigHooks.js';
5
7
  import { useDataHooks } from './useDataHooks.js';
6
8
  import { useDomInsertHooks } from './useDomInsertHooks.js';
7
9
  import { useEventHooks } from './useEventHooks.js';
8
10
  import { useExposeHooks } from './useExposeHooks.js';
9
- import { useSetupHooks } from './useSetupHooks.js';
10
- import { getEventName } from '../../utils/index.js';
11
- import { useConfigHooks } from './useConfigHooks.js';
12
11
  import { useFieldHooks } from './useFieldHooks.js';
12
+ import { useSetupHooks } from './useSetupHooks.js';
13
13
 
14
14
  const createTableHooks = (() => {
15
15
  let tapHooks = null;
@@ -1,6 +1,7 @@
1
- import { mergeWith } from 'lodash-es';
2
- import { HIGHEST_PRIORITY } from '../../constants/index.js';
1
+ import { mergeWith, isObject } from 'lodash-es';
2
+ import { HIGHEST_PRIORITY, IHO_TABLE_TREE_TYPE } from '../../constants/index.js';
3
3
  import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
4
+ import { IhoTableStatusHelper } from '../../utils/index.js';
4
5
 
5
6
  function defaultConfigPlugin() {
6
7
  const pluginName = "defaultTablePlugin";
@@ -8,26 +9,37 @@ function defaultConfigPlugin() {
8
9
  name: pluginName,
9
10
  apply(hooks) {
10
11
  hooks.configHooks.config.tap({ name: pluginName, stage: HIGHEST_PRIORITY }, (config) => {
11
- return mergeWith(
12
+ const result = mergeWith(
12
13
  {
13
14
  height: "100%",
14
15
  border: true,
15
16
  showSeq: true,
16
- selectType: "checkbox",
17
17
  columnConfig: { resizable: true },
18
18
  rowConfig: { height: 36, isHover: true, isCurrent: true, keyField: "theUniqueKey" },
19
- mouseConfig: { selected: true },
20
19
  showOverflow: "tooltip",
21
20
  editConfig: {
22
21
  trigger: "click",
23
22
  mode: "cell",
24
23
  autoClear: false,
25
24
  showIcon: false
26
- },
27
- keyboardConfig: { isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true }
25
+ }
28
26
  },
29
27
  config
30
28
  );
29
+ if (config.isTree === IHO_TABLE_TREE_TYPE.TRANSFORM_TREE_TYPE) {
30
+ result.treeConfig = Object.assign(
31
+ {},
32
+ { transform: true, expandAll: true, lazy: true, reserve: true },
33
+ result.treeConfig
34
+ );
35
+ }
36
+ if (IhoTableStatusHelper.isPositive(config.isBatchSelect) || config.selectType) {
37
+ result.selectType = config.selectType || "checkbox";
38
+ }
39
+ if (isObject(config.keyboardConfig)) {
40
+ result.mouseConfig = Object.assign({}, { selected: !!config.keyboardConfig.isEdit }, result.mouseConfig);
41
+ }
42
+ return result;
31
43
  });
32
44
  }
33
45
  });
@@ -6,6 +6,9 @@ declare const _default: import("vue").DefineComponent<{
6
6
  type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
7
7
  required: true;
8
8
  };
9
+ sortable: {
10
+ type: BooleanConstructor;
11
+ };
9
12
  options: {
10
13
  type: PropType<AnyObject[]>;
11
14
  default: () => never[];
@@ -23,6 +26,9 @@ declare const _default: import("vue").DefineComponent<{
23
26
  type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
24
27
  required: true;
25
28
  };
29
+ sortable: {
30
+ type: BooleanConstructor;
31
+ };
26
32
  options: {
27
33
  type: PropType<AnyObject[]>;
28
34
  default: () => never[];
@@ -62,6 +68,8 @@ declare const _default: import("vue").DefineComponent<{
62
68
  marginTop: string;
63
69
  };
64
70
  }>;
71
+ indeterminate: import("vue").ComputedRef<boolean>;
72
+ checkAll: import("vue").WritableComputedRef<boolean>;
65
73
  containerStyleWithHeight: import("vue").ComputedRef<CSSProperties>;
66
74
  confirmFilter: () => void;
67
75
  sortStatusList: {
@@ -134,6 +142,9 @@ declare const _default: import("vue").DefineComponent<{
134
142
  type: PropType<VxeColumnPropTypes.HeaderSlotParams>;
135
143
  required: true;
136
144
  };
145
+ sortable: {
146
+ type: BooleanConstructor;
147
+ };
137
148
  options: {
138
149
  type: PropType<AnyObject[]>;
139
150
  default: () => never[];
@@ -150,5 +161,6 @@ declare const _default: import("vue").DefineComponent<{
150
161
  "onUpdate:sortStatus"?: ((...args: any[]) => any) | undefined;
151
162
  }, {
152
163
  options: AnyObject[];
164
+ sortable: boolean;
153
165
  }>;
154
166
  export default _default;
@@ -1,15 +1,18 @@
1
- import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass, createElementVNode, Fragment, renderList, normalizeStyle } from 'vue';
1
+ import { defineComponent, inject, ref, onDeactivated, watch, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createVNode, unref, withCtx, createTextVNode, toDisplayString, normalizeClass, createCommentVNode, Fragment, renderList, createBlock, isRef, normalizeStyle } from 'vue';
2
2
  import { widthAppend } from '../../../../../shared/utils/index.js';
3
3
  import { FunnelSharp } from '@vicons/ionicons5';
4
4
  import { useVModel, useVirtualList } from '@vueuse/core';
5
- import { NEllipsis, NPopover, NIcon, NInput, NCheckboxGroup, NCheckbox, NButtonGroup, NButton } from 'naive-ui';
5
+ import { NEllipsis, NPopover, NIcon, NInput, NCheckbox, NCheckboxGroup, NButtonGroup, NButton } from 'naive-ui';
6
6
  import { InjectionIhoTableUUID } from '../../constants/index.js';
7
7
  import _export_sfc from '../../../../../_virtual/plugin-vue_export-helper.js';
8
8
 
9
9
  const _hoisted_1 = { style: { "display": "flex", "align-items": "center" } };
10
- const _hoisted_2 = { class: "iho-table__filterWrapper" };
11
- const _hoisted_3 = ["onClick"];
12
- const _hoisted_4 = { class: "iho-table__filterFooter" };
10
+ const _hoisted_2 = { style: { "max-width": "calc(100% - 22px)" } };
11
+ const _hoisted_3 = { class: "iho-table__filterWrapper" };
12
+ const _hoisted_4 = { key: 0 };
13
+ const _hoisted_5 = ["onClick"];
14
+ const _hoisted_6 = { class: "iho-table__filterListItem" };
15
+ const _hoisted_7 = { class: "iho-table__filterFooter" };
13
16
  const _sfc_main = /* @__PURE__ */ defineComponent({
14
17
  __name: "filter",
15
18
  props: {
@@ -17,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
17
20
  type: Object,
18
21
  required: true
19
22
  },
23
+ sortable: { type: Boolean },
20
24
  options: { type: Array, default: () => [] },
21
25
  checked: { type: Array, required: true },
22
26
  sortStatus: { type: String }
@@ -54,6 +58,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
58
  overscan: 3
55
59
  }
56
60
  );
61
+ const indeterminate = computed(() => !!checkedCacheRef.value.length && checkedCacheRef.value.length !== props.options.length);
62
+ const checkAll = computed({
63
+ get() {
64
+ return checkedCacheRef.value.length === props.options.length;
65
+ },
66
+ set: (isCheck) => {
67
+ if (isCheck) {
68
+ checkedCacheRef.value = props.options.map((item) => item.value);
69
+ return;
70
+ }
71
+ checkedCacheRef.value = [];
72
+ }
73
+ });
57
74
  const containerStyleWithHeight = computed(() => {
58
75
  return {
59
76
  ...containerProps.style,
@@ -77,12 +94,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
94
  });
78
95
  return (_ctx, _cache) => {
79
96
  return openBlock(), createElementBlock("section", _hoisted_1, [
80
- createVNode(unref(NEllipsis), { style: { "max-width": "calc(100% - 22px)" } }, {
81
- default: withCtx(() => [
82
- createTextVNode(toDisplayString(__props.payload.column.title), 1)
83
- ]),
84
- _: 1
85
- }),
97
+ createElementVNode("section", _hoisted_2, [
98
+ renderSlot(_ctx.$slots, "header", {}, () => [
99
+ createVNode(unref(NEllipsis), null, {
100
+ default: withCtx(() => [
101
+ createTextVNode(toDisplayString(__props.payload.column.title), 1)
102
+ ]),
103
+ _: 1
104
+ })
105
+ ])
106
+ ]),
86
107
  createVNode(unref(NPopover), {
87
108
  to: `#${unref(uuid)}`,
88
109
  show: filterVisible.value
@@ -95,27 +116,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
95
116
  }, null, 8, ["class", "component"])
96
117
  ]),
97
118
  default: withCtx(() => [
98
- createElementVNode("section", _hoisted_2, [
99
- (openBlock(), createElementBlock(Fragment, null, renderList(sortStatusList, (item) => {
100
- return createElementVNode("div", {
101
- key: item.status,
102
- class: normalizeClass(["iho-table__filterButton", { "iho-table__filterButton--active": unref(sortStatusRef) === item.status }]),
103
- onClick: ($event) => setSort(item.status)
104
- }, toDisplayString(item.text), 11, _hoisted_3);
105
- }), 64)),
106
- createVNode(unref(NInput), {
119
+ createElementVNode("section", _hoisted_3, [
120
+ createCommentVNode(' \u5224\u65AD\u662F\u5426\u663E\u793A\u5347\u5E8F\u964D\u5E8F\u6A21\u5757\u7684\u7EC4\u4EF6 v-if="sortable"'),
121
+ __props.sortable ? (openBlock(), createElementBlock("div", _hoisted_4, [
122
+ (openBlock(), createElementBlock(Fragment, null, renderList(sortStatusList, (item) => {
123
+ return createElementVNode("div", {
124
+ key: item.status,
125
+ class: normalizeClass(["iho-table__filterButton", { "iho-table__filterButton--active": unref(sortStatusRef) === item.status }]),
126
+ onClick: ($event) => setSort(item.status)
127
+ }, toDisplayString(item.text), 11, _hoisted_5);
128
+ }), 64))
129
+ ])) : createCommentVNode("v-if", true),
130
+ __props.options.length > 5 ? (openBlock(), createBlock(unref(NInput), {
131
+ key: 1,
107
132
  value: searchFilterText.value,
108
133
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => searchFilterText.value = $event)
109
- }, null, 8, ["value"]),
134
+ }, null, 8, ["value"])) : createCommentVNode("v-if", true),
135
+ createElementVNode("div", _hoisted_6, [
136
+ createVNode(unref(NCheckbox), {
137
+ label: "\u5168\u9009",
138
+ checked: unref(checkAll),
139
+ "onUpdate:checked": _cache[1] || (_cache[1] = ($event) => isRef(checkAll) ? checkAll.value = $event : null),
140
+ indeterminate: unref(indeterminate)
141
+ }, null, 8, ["checked", "indeterminate"])
142
+ ]),
110
143
  createVNode(unref(NCheckboxGroup), {
111
144
  value: checkedCacheRef.value,
112
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => checkedCacheRef.value = $event)
145
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => checkedCacheRef.value = $event)
113
146
  }, {
114
147
  default: withCtx(() => [
115
148
  createElementVNode("section", {
116
149
  ref: unref(containerProps).ref,
117
150
  style: normalizeStyle(unref(containerStyleWithHeight)),
118
- onScroll: _cache[1] || (_cache[1] = (...args) => unref(containerProps).onScroll && unref(containerProps).onScroll(...args)),
151
+ onScroll: _cache[2] || (_cache[2] = (...args) => unref(containerProps).onScroll && unref(containerProps).onScroll(...args)),
119
152
  class: "iho-table__filterListWrapper"
120
153
  }, [
121
154
  createElementVNode("section", {
@@ -137,12 +170,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
170
  ]),
138
171
  _: 1
139
172
  }, 8, ["value"]),
140
- createElementVNode("footer", _hoisted_4, [
173
+ createElementVNode("footer", _hoisted_7, [
141
174
  createElementVNode("section", null, toDisplayString(`\u5DF2\u9009\u62E9${checkedCacheRef.value.length}\u9879`), 1),
142
175
  createVNode(unref(NButtonGroup), { size: "tiny" }, {
143
176
  default: withCtx(() => [
144
177
  createVNode(unref(NButton), {
145
- onClick: _cache[3] || (_cache[3] = ($event) => checkedCacheRef.value = [])
178
+ onClick: _cache[4] || (_cache[4] = ($event) => checkedCacheRef.value = [])
146
179
  }, {
147
180
  default: withCtx(() => [
148
181
  createTextVNode("\u6E05\u7A7A")
@@ -1,4 +1,5 @@
1
1
  import { computed, createVNode, onBeforeUnmount, reactive } from 'vue';
2
+ import { jsonParse } from '../../../../../shared/utils/index.js';
2
3
  import { isObject, isArray } from 'lodash-es';
3
4
  import '../../../index.js';
4
5
  import { IHO_TABLE_NUMBER_STATUS, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
@@ -121,62 +122,62 @@ function filterPlugin() {
121
122
  const lowCodeField = (_a = fieldItem.editRender) == null ? void 0 : _a.props;
122
123
  if (!isObject(lowCodeField))
123
124
  return;
124
- try {
125
- const fieldSetting = JSON.parse(lowCodeField.fieldSetting || "");
126
- if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
127
- return;
128
- let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
129
- if (isCompatibleColumn(lowCodeField)) {
130
- options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({
131
- ...option,
132
- key: option.label
133
- }))) != null ? _f : [];
134
- }
135
- const {
136
- filterState,
137
- setChecked,
138
- setSort
139
- } = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
140
- filterState.options = options;
141
- const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
142
- const sortStatusRef = computed({
143
- get: () => {
144
- return filterState.sortStatus;
145
- },
146
- set: (value) => setSort({
147
- field: fieldItem.field,
148
- value,
149
- $table: $table.value,
150
- emits
151
- })
152
- });
153
- const checkedRef = computed({
154
- get: () => filterState.checked,
155
- set: (value) => setChecked({
156
- field: fieldItem.field,
157
- value,
158
- $table: $table.value,
159
- emits
160
- })
161
- });
162
- const optionsRef = computed(() => filterState.options);
163
- fieldItem.slots = {
164
- ...fieldItem.slots,
165
- header(payload) {
166
- return createVNode(FilterComponent, {
167
- "payload": payload,
168
- "options": optionsRef.value,
169
- "checked": checkedRef.value,
170
- "onUpdate:checked": ($event) => checkedRef.value = $event,
171
- "sortStatus": sortStatusRef.value,
172
- "onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
173
- }, {
174
- header: oldHeader
175
- });
176
- }
177
- };
178
- } catch (e) {
125
+ const fieldSetting = jsonParse(lowCodeField.fieldSetting || "");
126
+ if (!isFieldSetting(fieldSetting) || !showFilter(fieldSetting))
127
+ return;
128
+ const sortable = fieldItem.sortable;
129
+ fieldItem.sortable = false;
130
+ let options = (_d = (_c = (_b = fieldSetting.mapping) == null ? void 0 : _b.mappingFiled) == null ? void 0 : _c.map((item) => item.value[0])) != null ? _d : [];
131
+ if (isCompatibleColumn(lowCodeField)) {
132
+ options = (_f = (_e = lowCodeField.options) == null ? void 0 : _e.map((option) => ({
133
+ ...option,
134
+ key: option.label
135
+ }))) != null ? _f : [];
179
136
  }
137
+ const {
138
+ filterState,
139
+ setChecked,
140
+ setSort
141
+ } = initFilterState(uuid, fieldItem.field, lowCodeField.filterDefaultValue);
142
+ filterState.options = options;
143
+ const oldHeader = (_g = fieldItem.slots) == null ? void 0 : _g.header;
144
+ const sortStatusRef = computed({
145
+ get: () => {
146
+ return filterState.sortStatus;
147
+ },
148
+ set: (value) => setSort({
149
+ field: fieldItem.field,
150
+ value,
151
+ $table: $table.value,
152
+ emits
153
+ })
154
+ });
155
+ const checkedRef = computed({
156
+ get: () => filterState.checked,
157
+ set: (value) => setChecked({
158
+ field: fieldItem.field,
159
+ value,
160
+ $table: $table.value,
161
+ emits
162
+ })
163
+ });
164
+ const optionsRef = computed(() => filterState.options);
165
+ fieldItem.slots = {
166
+ ...fieldItem.slots,
167
+ header(payload) {
168
+ return createVNode(FilterComponent, {
169
+ "payload": payload,
170
+ "options": optionsRef.value,
171
+ "sortable": sortable,
172
+ "checked": checkedRef.value,
173
+ "onUpdate:checked": ($event) => checkedRef.value = $event,
174
+ "sortStatus": sortStatusRef.value,
175
+ "onUpdate:sortStatus": ($event) => sortStatusRef.value = $event
176
+ }, {
177
+ header: oldHeader
178
+ });
179
+ }
180
+ };
180
181
  });
181
182
  return fieldList;
182
183
  });
@@ -1,8 +1,8 @@
1
- import { pick, cloneDeep } from 'lodash-es';
1
+ import { pick, cloneDeep, isObject } from 'lodash-es';
2
2
  import { toRaw } from 'vue';
3
- import { HIGHEST_PRIORITY, IHO_TABLE_NUMBER_STATUS, WIDGET_TYPE, IHO_TABLE_STRING_STATUS } from '../../constants/index.js';
3
+ import { HIGHEST_PRIORITY, WIDGET_TYPE } from '../../constants/index.js';
4
4
  import { defineTablePlugin } from '../../hooks/useTablePlugin.js';
5
- import { IhoTableUtils } from '../../utils/index.js';
5
+ import { IhoTableStatusHelper, IhoTableUtils } from '../../utils/index.js';
6
6
 
7
7
  function lowCodeFieldAdaptorPlugin() {
8
8
  const pluginName = "lowCodeFieldAdaptorPlugin";
@@ -15,10 +15,12 @@ function lowCodeFieldAdaptorPlugin() {
15
15
  className: _field.bold ? "iho-table__boldCell" : "",
16
16
  field: _field.columnName,
17
17
  showOverflow: Reflect.has(_field, "showOverflow") ? _field.showOverflow : "tooltip",
18
- visible: _field.isShow !== IHO_TABLE_NUMBER_STATUS.NEGATIVE,
19
- width: _field.colWidth,
18
+ visible: IhoTableStatusHelper.notNegative(_field.isShow),
19
+ minWidth: _field.colWidth,
20
+ sortable: IhoTableStatusHelper.isPositive(_field.isSort),
20
21
  slots: { ..._field.slots, default: _field.slotFn, header: _field.headerSlotFn },
21
- ...pick(_field, ["title", "treeNode", "resizable"])
22
+ title: _field.alias || _field.title,
23
+ ...pick(_field, ["treeNode", "resizable"])
22
24
  };
23
25
  settingObjAdaptor(result, _field, config);
24
26
  return result;
@@ -27,7 +29,6 @@ function lowCodeFieldAdaptorPlugin() {
27
29
  });
28
30
  }
29
31
  function settingObjAdaptor(fieldItem, lowCodeField, config) {
30
- var _a;
31
32
  const props = cloneDeep(toRaw(lowCodeField));
32
33
  props.componentProps = { size: config.size === "mini" ? "small" : config.size, ...props.componentProps };
33
34
  fieldItem.editRender = {
@@ -36,7 +37,11 @@ function settingObjAdaptor(fieldItem, lowCodeField, config) {
36
37
  props
37
38
  };
38
39
  fieldItem.editRender.enabled = !Reflect.get(WIDGET_TYPE, fieldItem.editRender.name);
39
- fieldItem.visible = ((_a = lowCodeField.settingObj) == null ? void 0 : _a.isHide) !== IHO_TABLE_STRING_STATUS.POSITIVE;
40
+ if (!isObject(lowCodeField.settingObj))
41
+ return;
42
+ if (Reflect.has(lowCodeField.settingObj, "isHide")) {
43
+ fieldItem.visible = fieldItem.visible && IhoTableStatusHelper.notPositive(lowCodeField.settingObj.isHide);
44
+ }
40
45
  }
41
46
 
42
47
  export { lowCodeFieldAdaptorPlugin };
@@ -41,7 +41,7 @@ declare const _default: import("vue").DefineComponent<{
41
41
  }>> & {
42
42
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
43
43
  }>>;
44
- emitFormChange: (params?: AnyObject) => void;
44
+ emitFormChangeWithParams: (params?: AnyObject) => void;
45
45
  emit: (event: "update:value", ...args: any[]) => void;
46
46
  formRef: import("vue").Ref<HTMLElement | null>;
47
47
  isShow: import("vue").Ref<boolean>;
@@ -18,13 +18,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  setup(__props, { emit }) {
19
19
  const props = __props;
20
20
  const attr = useAttrs();
21
- const { emitFormChange } = useIhoTableFormEvent(props);
21
+ const { emitFormChangeWithParams } = useIhoTableFormEvent(props);
22
22
  const { formRef, isShow } = useAutoFocus();
23
23
  const formattedValue = ref();
24
24
  const onConfirm = (value) => {
25
25
  const oldValue = props.value;
26
26
  emit("update:value", value);
27
- emitFormChange({ oldValue });
27
+ emitFormChangeWithParams({ oldValue });
28
28
  };
29
29
  const { isStartDate = false, isEndDate = false } = attr;
30
30
  const connectField = attr.connectField || "";
@@ -10,23 +10,28 @@ function inputRendererPlugin() {
10
10
  return defineTablePlugin({
11
11
  name: pluginName,
12
12
  vxe(instance) {
13
+ let oldValue = "";
13
14
  instance.renderer.add(EDITABLE_WIDGET_TYPE.INPUT, {
14
15
  renderCell: IhoTableRenderHelper.createDefaultRenderCell(),
15
16
  renderEdit: IhoTableRenderHelper.createRenderEdit(({
16
17
  fieldItem,
17
18
  row,
18
19
  column,
19
- emitFormChange,
20
+ emitFormChangeWithParams,
20
21
  emitFormClick
21
22
  }) => {
22
23
  return [createVNode(NInput, mergeProps({
23
24
  "value": row[column.field],
24
- "onUpdate:value": ($event) => row[column.field] = $event,
25
- "onBlur": () => emitFormChange({
26
- oldValue: row[column.field]
27
- }),
28
- "onClick": () => emitFormClick()
29
- }, fieldItem.componentProps), null)];
25
+ "onUpdate:value": ($event) => row[column.field] = $event
26
+ }, fieldItem.componentProps, {
27
+ "onChange": () => {
28
+ emitFormChangeWithParams({
29
+ oldValue
30
+ });
31
+ },
32
+ "onClick": emitFormClick,
33
+ "onFocus": () => oldValue = row[column.field]
34
+ }), null)];
30
35
  })
31
36
  });
32
37
  }
@@ -17,7 +17,7 @@ function numberRendererPlugin() {
17
17
  column,
18
18
  fieldItem,
19
19
  emitFormClick,
20
- emitFormChange
20
+ emitFormChangeWithParams
21
21
  }) => {
22
22
  const {
23
23
  placeholder = "\u8BF7\u8F93\u5165"
@@ -26,14 +26,14 @@ function numberRendererPlugin() {
26
26
  ...fieldItem.componentProps || {},
27
27
  clearable: true,
28
28
  placeholder,
29
- onBlur: () => emitFormChange({
29
+ onBlur: () => emitFormChangeWithParams({
30
30
  type: "blur",
31
31
  oldValue: row[column.field]
32
32
  }),
33
33
  onUpdateValue: (value) => {
34
34
  const oldValue = row[column.field];
35
35
  row[column.field] = value;
36
- emitFormChange({
36
+ emitFormChangeWithParams({
37
37
  oldValue
38
38
  });
39
39
  },