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
@@ -0,0 +1,339 @@
1
+ import { ref, reactive, computed, onMounted, nextTick } from 'vue';
2
+ import { defaultBorderStyle } from './useDraw.js';
3
+ import { useCumputedPoint } from './useCumputedPoint.js';
4
+ import { useTop } from './useTop.js';
5
+ import { useLeft } from './useLeft.js';
6
+ import { useRight } from './useRight.js';
7
+ import { useCenter } from './useCenter.js';
8
+ import { useBottom } from './useBottom.js';
9
+ import { useOther } from './useOther.js';
10
+ import { useEvent, useCanvasEvent } from './useEvent.js';
11
+ import '../utils/index.js';
12
+ import { useCommon } from './useCommon.js';
13
+ import 'lodash-es';
14
+
15
+ function useTemperatureChart(canvas, props, emits, canvasRef) {
16
+ const defaultHeight = 15;
17
+ const select = ref();
18
+ const redrawPoints = ref();
19
+ const clickMenu = ref();
20
+ const pointTipProps = reactive({
21
+ show: false,
22
+ point: { x: 0, y: 0 },
23
+ list: []
24
+ });
25
+ const pointMenuProps = reactive({
26
+ show: false,
27
+ point: { x: 0, y: 0 },
28
+ list: [],
29
+ target: null
30
+ });
31
+ const dateHeight = computed(() => {
32
+ const { top } = props.data;
33
+ return top.date.show && (top.date.height || defaultHeight) || 0;
34
+ });
35
+ const hospitalDaysHeight = computed(() => {
36
+ var _a;
37
+ const { top } = props.data;
38
+ return ((_a = top.hospitalDays) == null ? void 0 : _a.show) && (top.hospitalDays.height || defaultHeight) || 0;
39
+ });
40
+ const operationDaysHeight = computed(() => {
41
+ var _a;
42
+ const { top } = props.data;
43
+ return ((_a = top.operationDays) == null ? void 0 : _a.show) && (top.operationDays.height || defaultHeight) || 0;
44
+ });
45
+ const xScalevalueHeight = computed(() => {
46
+ var _a, _b, _c;
47
+ const { top } = props.data;
48
+ const height = ((_a = top.xScalevalue) == null ? void 0 : _a.show) && (top.xScalevalue.height || defaultHeight) || 0;
49
+ const dayHeight = ((_b = top.xScalevalue) == null ? void 0 : _b.show) ? (_c = top.dayHeight) != null ? _c : 0 : 0;
50
+ return height + dayHeight;
51
+ });
52
+ const breathingHeight = computed(() => {
53
+ var _a;
54
+ const { bottom } = props.data;
55
+ return ((_a = bottom == null ? void 0 : bottom.breathing) == null ? void 0 : _a.show) && (bottom.breathing.height || defaultHeight * 2) || 0;
56
+ });
57
+ const gridXNumber = computed(() => {
58
+ const { grid } = props.data;
59
+ return grid.mainXCell * grid.subXCell + grid.surplusXCell;
60
+ });
61
+ const gridYNumber = computed(() => {
62
+ const { grid } = props.data;
63
+ return grid.mainYCell * grid.subYCell + grid.surplusYCell;
64
+ });
65
+ const endX = computed(() => {
66
+ var _a;
67
+ const { width, right = null, top } = props.data;
68
+ if (!right)
69
+ return width;
70
+ const endWidth = (_a = right.width) != null ? _a : 0;
71
+ return width - endWidth;
72
+ });
73
+ const endXLimit = computed(() => {
74
+ const { grid } = props.data;
75
+ return endX.value - grid.surplusXCell * xCellWidth.value;
76
+ });
77
+ const originX = computed(() => {
78
+ const { top, left } = props.data;
79
+ const originX2 = top.titleWidth + iconsWidth.value;
80
+ return originX2;
81
+ });
82
+ const endY = computed(() => {
83
+ const { bottom = null, height } = props.data;
84
+ if (!bottom)
85
+ return height;
86
+ const endHeight = bottom.height || 30;
87
+ return height - endHeight;
88
+ });
89
+ const originY = computed(() => {
90
+ var _a;
91
+ const { top } = props.data;
92
+ const dayHeight = top.xScalevalue.show && ((_a = top.dayHeight) != null ? _a : 0) || 0;
93
+ const xScaleHeight = top.xScalevalue.show && (top.xScalevalue.height || defaultHeight) || 0;
94
+ const topHeight = dateHeight.value + dayHeight + xScaleHeight + hospitalDaysHeight.value + operationDaysHeight.value;
95
+ return topHeight;
96
+ });
97
+ const originYLimit = computed(() => {
98
+ const { grid } = props.data;
99
+ return originY.value + grid.surplusYCell * yCellHeight.value;
100
+ });
101
+ const xCellWidth = computed(() => {
102
+ return (endX.value - originX.value) / gridXNumber.value;
103
+ });
104
+ const yCellHeight = computed(() => {
105
+ return (endY.value - originY.value) / gridYNumber.value;
106
+ });
107
+ const iconsWidth = computed(() => {
108
+ var _a, _b;
109
+ const { left } = props.data;
110
+ return ((_a = left.icons) == null ? void 0 : _a.show) && (((_b = left.icons) == null ? void 0 : _b.width) || 100) || 0;
111
+ });
112
+ const xScaleList = computed(() => {
113
+ const { top } = props.data;
114
+ const dateList = top.date.list;
115
+ const times = top.xScalevalue.times;
116
+ let left = originX.value - xCellWidth.value;
117
+ function getDate(date) {
118
+ const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
119
+ return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
120
+ }
121
+ const timeList = dateList.map((item) => {
122
+ return times.map((v) => {
123
+ left += xCellWidth.value;
124
+ const start = new Date(`${getDate(item)} ${v.start}`).getTime();
125
+ const end = new Date(`${getDate(item)} ${v.end}`).getTime();
126
+ return {
127
+ start,
128
+ end,
129
+ left,
130
+ center: left + xCellWidth.value / 2,
131
+ scaleCell: (end - start) / xCellWidth.value
132
+ };
133
+ });
134
+ });
135
+ return timeList.flat();
136
+ });
137
+ const breatheYCell = computed(() => {
138
+ return computedYCell("breathe");
139
+ });
140
+ const pulseYCell = computed(() => {
141
+ return computedYCell("pulse");
142
+ });
143
+ const temperatureYCell = computed(() => {
144
+ return computedYCell("temperature");
145
+ });
146
+ const painYCell = computed(() => {
147
+ return computedYCell("pain");
148
+ });
149
+ const event = computed(() => {
150
+ var _a;
151
+ return ((_a = props.data.grid) == null ? void 0 : _a.event) || { selectable: true, evented: true, hovered: true };
152
+ });
153
+ const itemList = computed(() => {
154
+ const { left } = props.data;
155
+ return left.yScaleValue.map((item) => {
156
+ return item.dataList.map((v, dataIndex) => {
157
+ return {
158
+ ...v,
159
+ bigType: item.type,
160
+ unit: item.unit,
161
+ dataIndex
162
+ };
163
+ });
164
+ }).flat();
165
+ });
166
+ const painIndex = computed(() => {
167
+ const { left } = props.data;
168
+ return left.yScaleValue.findIndex((v) => v.type === "pain");
169
+ });
170
+ const painHeight = computed(() => {
171
+ const { grid } = props.data;
172
+ return painIndex.value === -1 ? 0 : yCellHeight.value * grid.subYCell;
173
+ });
174
+ const painOriginY = computed(() => {
175
+ const { left } = props.data;
176
+ const obj = {
177
+ originY: endY.value,
178
+ endY: endY.value
179
+ };
180
+ if (painIndex.value === 0 && left.yScaleValue.length > 1) {
181
+ obj.originY = originYLimit.value;
182
+ obj.endY = originYLimit.value + painHeight.value;
183
+ } else if (painIndex.value === left.yScaleValue.length - 1) {
184
+ obj.originY = endY.value - painHeight.value;
185
+ obj.endY = endY.value;
186
+ }
187
+ return obj;
188
+ });
189
+ const vitalSignsOriginY = computed(() => {
190
+ const { left } = props.data;
191
+ const obj = {
192
+ originY: originY.value,
193
+ endY: endY.value
194
+ };
195
+ if (painIndex.value === 0 && left.yScaleValue.length > 1) {
196
+ obj.originY = originYLimit.value + painHeight.value;
197
+ obj.endY = endY.value;
198
+ } else if (painIndex.value === left.yScaleValue.length - 1) {
199
+ obj.originY = originYLimit.value;
200
+ obj.endY = endY.value - painHeight.value;
201
+ }
202
+ return obj;
203
+ });
204
+ const topList = computed(() => {
205
+ const { top } = props.data;
206
+ const topList2 = [];
207
+ for (const i in top) {
208
+ if (top[i].show) {
209
+ topList2.push({
210
+ ...top[i],
211
+ key: i
212
+ });
213
+ }
214
+ }
215
+ return topList2.sort((a, b) => a.seq - b.seq);
216
+ });
217
+ const getRightInfo = computed(() => {
218
+ var _a;
219
+ const { left, right } = props.data;
220
+ const temperatureObj = left.yScaleValue.find((v) => v.type === "temperature");
221
+ const yScaleValue = (right == null ? void 0 : right.yScaleValue) || {};
222
+ if ((_a = temperatureObj == null ? void 0 : temperatureObj.list) == null ? void 0 : _a.length) {
223
+ Object.assign(yScaleValue, {
224
+ list: temperatureObj.list.map((v) => Math.floor((1.8 * v + 32) * 100) / 100),
225
+ spaceGridNumber: temperatureObj.spaceGridNumber
226
+ });
227
+ }
228
+ return yScaleValue;
229
+ });
230
+ const propItems = reactive({
231
+ canvasWidth: props.data.width,
232
+ canvasHeight: props.data.height,
233
+ borderStyle: props.data.borderStyle || defaultBorderStyle,
234
+ selectionStyle: props.data.selectionStyle || {},
235
+ dateHeight: dateHeight.value,
236
+ hospitalDaysHeight: hospitalDaysHeight.value,
237
+ operationDaysHeight: operationDaysHeight.value,
238
+ xScalevalueHeight: xScalevalueHeight.value,
239
+ topList: topList.value,
240
+ breathingHeight: breathingHeight.value,
241
+ hospitalizationDate: props.data.hospitalizationDate,
242
+ grid: props.data.grid,
243
+ top: props.data.top,
244
+ left: props.data.left,
245
+ right: props.data.right,
246
+ bottom: props.data.bottom,
247
+ other: props.data.other,
248
+ painIndex: painIndex.value,
249
+ painHeight: painHeight.value,
250
+ painOriginY: painOriginY.value,
251
+ vitalSignsOriginY: vitalSignsOriginY.value,
252
+ gridXNumber: gridXNumber.value,
253
+ gridYNumber: gridYNumber.value,
254
+ iconsWidth: iconsWidth.value,
255
+ originX: originX.value,
256
+ originY: originY.value,
257
+ originYLimit: originYLimit.value,
258
+ endX: endX.value,
259
+ endXLimit: endXLimit.value,
260
+ endY: endY.value,
261
+ xCellWidth: xCellWidth.value,
262
+ yCellHeight: yCellHeight.value,
263
+ xScaleList: xScaleList.value,
264
+ breatheYCell: breatheYCell.value,
265
+ pulseYCell: pulseYCell.value,
266
+ temperatureYCell: temperatureYCell.value,
267
+ painYCell: painYCell.value,
268
+ event: event.value,
269
+ itemList: itemList.value,
270
+ getRightInfo: getRightInfo.value,
271
+ config: props.data.config || {}
272
+ });
273
+ function computedYCell(type) {
274
+ const { yScaleValue } = props.data.left;
275
+ const item = yScaleValue.find((v) => v.type === type);
276
+ const list = (item == null ? void 0 : item.list) || [];
277
+ if (!list.length)
278
+ return 0;
279
+ return yCellHeight.value / ((list[1] - list[0]) / item.spaceGridNumber);
280
+ }
281
+ const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
282
+ const commonFunc = useCommon(canvas);
283
+ onMounted(() => {
284
+ nextTick(() => {
285
+ useTop(canvas, propItems);
286
+ const {
287
+ setPopup,
288
+ isAddPoint,
289
+ updateData,
290
+ redrawPoints: _redrawPoints,
291
+ clickMenu: _clickMenu
292
+ } = useCenter(
293
+ canvas,
294
+ propItems,
295
+ emits,
296
+ cumputedX,
297
+ cumputedY,
298
+ getXValue,
299
+ getYValue,
300
+ props.addRenderItem,
301
+ pointTipProps,
302
+ pointMenuProps,
303
+ commonFunc
304
+ );
305
+ redrawPoints.value = _redrawPoints;
306
+ clickMenu.value = _clickMenu;
307
+ const { drawScaleValue } = useLeft(
308
+ canvas,
309
+ propItems,
310
+ emits,
311
+ setPopup,
312
+ pointTipProps,
313
+ cumputedX,
314
+ cumputedY,
315
+ getXValue,
316
+ getYValue,
317
+ isAddPoint,
318
+ updateData,
319
+ commonFunc
320
+ );
321
+ useRight(canvas, propItems, drawScaleValue);
322
+ useBottom(canvas, propItems);
323
+ useOther(canvas, propItems, cumputedX);
324
+ useEvent(canvasRef.value);
325
+ const { select: _select } = useCanvasEvent(canvas, propItems, emits);
326
+ select.value = _select;
327
+ });
328
+ });
329
+ return {
330
+ propItems,
331
+ redrawPoints,
332
+ select,
333
+ pointTipProps,
334
+ pointMenuProps,
335
+ clickMenu
336
+ };
337
+ }
338
+
339
+ export { useTemperatureChart as default };
@@ -1,4 +1,3 @@
1
- import { onMounted, nextTick } from 'vue';
2
1
  import { fabric } from '../utils/index.js';
3
2
  import { defaultBorderStyle, defaultStyle, drawTextGroup, defaultTextStyle, defaultRectStyle } from './useDraw.js';
4
3
 
@@ -149,11 +148,7 @@ function useTop(canvas, propItems) {
149
148
  list.push(textGroup);
150
149
  });
151
150
  }
152
- onMounted(() => {
153
- nextTick(() => {
154
- drawTop();
155
- });
156
- });
151
+ drawTop();
157
152
  }
158
153
 
159
154
  export { useTop };
@@ -20,7 +20,7 @@ export { combineExtendKey, createInputSlot, createSlot, createUrlConfigParams, f
20
20
  export * from '@formily/core';
21
21
  export { businessDateParser, isIdCard, isMobile, parseAge2Birthday, parseAge2FromContext, parseBirthday, parseIdCard, transformDateFormat } from './src/utils/business.js';
22
22
  export { findNextWidget, queryDecorator, queryInput } from './src/utils/dom.js';
23
- export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator } from './src/utils/schema.js';
23
+ export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './src/utils/schema.js';
24
24
 
25
25
  const FormRender = script;
26
26
  FormRender.install = function(app) {
@@ -1,4 +1,4 @@
1
- import { AnyObject, Func } from '../../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../../../es/shared/types';
2
2
  import { PropType } from 'vue';
3
3
  declare type ValueType = string | AnyObject[];
4
4
  export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
@@ -6,9 +6,6 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
6
6
  type: PropType<AnyObject[]>;
7
7
  default: () => never[];
8
8
  };
9
- onFocus: {
10
- type: PropType<Func<any[], any>>;
11
- };
12
9
  autograph: {
13
10
  type: StringConstructor;
14
11
  required: true;
@@ -49,9 +46,6 @@ export declare const LEVEL_SEARCH_CASCADER: import("vue").DefineComponent<{
49
46
  type: PropType<AnyObject[]>;
50
47
  default: () => never[];
51
48
  };
52
- onFocus: {
53
- type: PropType<Func<any[], any>>;
54
- };
55
49
  autograph: {
56
50
  type: StringConstructor;
57
51
  required: true;
@@ -8,7 +8,7 @@ import { formRenderLog } from '../../utils/index.js';
8
8
  import { connect, mapProps } from '@formily/vue';
9
9
  import SearchCascader from '../../../../search-cascader/index.js';
10
10
  import script$1 from '../../../../../shared/components/no-data/NoData.vue.js';
11
- import { visitedDecorator, assignUpdateValue } from '../../utils/schema.js';
11
+ import { createVisitedSetter, assignUpdateValue } from '../../utils/schema.js';
12
12
  import { useFormField } from '../../hooks/useFormField.js';
13
13
  import { useFormRequest } from '../../hooks/useFormRequest.js';
14
14
 
@@ -19,9 +19,6 @@ const script = defineComponent({
19
19
  type: Array,
20
20
  default: () => []
21
21
  },
22
- onFocus: {
23
- type: Function
24
- },
25
22
  autograph: {
26
23
  type: String,
27
24
  required: true
@@ -264,7 +261,7 @@ const script = defineComponent({
264
261
  "labelKey": labelKey.value,
265
262
  "valueKey": valueKey.value,
266
263
  "search": fetchData,
267
- "onFocus": visitedDecorator(field, props.onFocus)
264
+ "onFocus": createVisitedSetter(field)
268
265
  }, {
269
266
  empty: () => createVNode(script$1, null, null)
270
267
  });
@@ -6,7 +6,7 @@ import '../../../index.js';
6
6
  import '../../utils/index.js';
7
7
  import { useFormField } from '../../hooks/useFormField.js';
8
8
  import { useAutographOptions } from '../../hooks/useFormRenderOptions.js';
9
- import { visitedDecorator, assignUpdateValue } from '../../utils/schema.js';
9
+ import { createVisitedSetter, assignUpdateValue } from '../../utils/schema.js';
10
10
  import { useCommonInjection } from '../../hooks/useCommonInjection.js';
11
11
 
12
12
  function _isSlot(s) {
@@ -78,7 +78,7 @@ const script = defineComponent({
78
78
  "key": key.value,
79
79
  "value": valueRef.value,
80
80
  "onUpdate:value": ($event) => valueRef.value = $event,
81
- "onClick": visitedDecorator(field)
81
+ "onClick": createVisitedSetter(field)
82
82
  }, {
83
83
  default: () => [createVNode(NSpace, {
84
84
  "vertical": props.vertical
@@ -1,4 +1,4 @@
1
- import { AnyObject, Func } from '../../../../../../es/shared/types';
1
+ import { AnyObject } from '../../../../../../es/shared/types';
2
2
  import { PropType } from 'vue';
3
3
  import { UrlConfig } from '../../../../../../es/components/form-render';
4
4
  export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
@@ -16,9 +16,6 @@ export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
16
16
  urlConfig: {
17
17
  type: PropType<UrlConfig>;
18
18
  };
19
- onFocus: {
20
- type: PropType<Func<any[], any>>;
21
- };
22
19
  onChange: {};
23
20
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
21
  value: {
@@ -35,9 +32,6 @@ export declare const REMOTE_SEARCH: import("vue").DefineComponent<{
35
32
  urlConfig: {
36
33
  type: PropType<UrlConfig>;
37
34
  };
38
- onFocus: {
39
- type: PropType<Func<any[], any>>;
40
- };
41
35
  onChange: {};
42
36
  }>> & {
43
37
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -8,7 +8,7 @@ import { InjectionAsyncQueue, InjectionChangeContextCollector, InjectionFormItem
8
8
  import { createUrlConfigParams, formRenderLog } from '../../utils/index.js';
9
9
  import { useCommonInjection, useSelectOptionProps } from '../../hooks/useCommonInjection.js';
10
10
  import { useFormField } from '../../hooks/useFormField.js';
11
- import { visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
11
+ import { createVisitedSetter, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
12
12
 
13
13
  const script = defineComponent({
14
14
  name: "FormRemoteSearch",
@@ -27,9 +27,6 @@ const script = defineComponent({
27
27
  urlConfig: {
28
28
  type: Object
29
29
  },
30
- onFocus: {
31
- type: Function
32
- },
33
30
  onChange: {}
34
31
  },
35
32
  emits: ["update:value"],
@@ -132,7 +129,7 @@ const script = defineComponent({
132
129
  "onSearch": fetchData,
133
130
  "onUpdate:show": (show) => show && fetchData(),
134
131
  "options": parsedOptions.value,
135
- "onFocus": visitedDecorator(field, props.onFocus)
132
+ "onFocus": createVisitedSetter(field)
136
133
  }, slots);
137
134
  };
138
135
  }
@@ -1,10 +1,9 @@
1
1
  import { defineComponent, ref, computed, inject, watch, createVNode, nextTick } from 'vue';
2
- import { isField } from '@formily/core';
3
2
  import { isEqual, isArray } from 'lodash-es';
3
+ import '../../../index.js';
4
4
  import { useCommonInjection } from '../../hooks/useCommonInjection.js';
5
5
  import { InjectionAsyncQueue, InjectionFormUUID } from '../../constants/index.js';
6
6
  import '../../../../../shared/utils/index.js';
7
- import '../../../index.js';
8
7
  import '../../utils/index.js';
9
8
  import { useFormField } from '../../hooks/useFormField.js';
10
9
  import '@vueuse/core';
@@ -19,12 +18,13 @@ import '../../../../../shared/utils/tapable/AsyncSeriesBailHook.js';
19
18
  import '../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js';
20
19
  import '../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js';
21
20
  import '../../hooks/useFormValidator.js';
21
+ import '@formily/core';
22
22
  import 'date-fns';
23
23
  import '@vue/shared';
24
24
  import { connect, mapProps } from '@formily/vue';
25
25
  import './index.js';
26
26
  import { NCascader } from 'naive-ui';
27
- import { assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
27
+ import { createVisitedSetter, assignUpdateValue, traverseDependKey } from '../../utils/schema.js';
28
28
 
29
29
  const script = defineComponent({
30
30
  name: "FormCascader",
@@ -210,14 +210,6 @@ const script = defineComponent({
210
210
  const parsedOptions = computed(() => {
211
211
  return remoteOptions.value || props.options || [];
212
212
  });
213
- function visitedDecorator(onFocus) {
214
- return (...args) => {
215
- if (isField(field.value)) {
216
- field.value.visited = true;
217
- }
218
- onFocus == null ? void 0 : onFocus(...args);
219
- };
220
- }
221
213
  const remote = computed(() => !props.filterable);
222
214
  const key = injectValueBindKey(valueRef);
223
215
  return () => {
@@ -238,7 +230,7 @@ const script = defineComponent({
238
230
  "valueField": valueKey.value,
239
231
  "options": parsedOptions.value,
240
232
  "onLoad": fetchData,
241
- "onFocus": visitedDecorator(props.onFocus)
233
+ "onFocus": createVisitedSetter(field)
242
234
  }, slots);
243
235
  };
244
236
  }
@@ -1,4 +1,4 @@
1
- import { AnyObject, ArrayAble, Func } from '../../../../../../es/shared/types';
1
+ import { AnyObject, ArrayAble } from '../../../../../../es/shared/types';
2
2
  import { RecommendItem } from '../../../../../../es/components/recommend-search/src/types';
3
3
  import { RecommendIds } from '../../hooks';
4
4
  import { UrlConfig } from '../../types';
@@ -19,9 +19,6 @@ export declare const SELECT: import("vue").DefineComponent<{
19
19
  type: PropType<AnyObject[]>;
20
20
  default: () => never[];
21
21
  };
22
- onFocus: {
23
- type: PropType<Func<any[], any>>;
24
- };
25
22
  onChange: {};
26
23
  urlConfig: {
27
24
  type: PropType<UrlConfig>;
@@ -84,9 +81,6 @@ export declare const SELECT: import("vue").DefineComponent<{
84
81
  type: PropType<AnyObject[]>;
85
82
  default: () => never[];
86
83
  };
87
- onFocus: {
88
- type: PropType<Func<any[], any>>;
89
- };
90
84
  onChange: {};
91
85
  urlConfig: {
92
86
  type: PropType<UrlConfig>;
@@ -25,7 +25,7 @@ import { connect, mapProps } from '@formily/vue';
25
25
  import './index.js';
26
26
  import { useUrlConfigOptions, useAutographOptions, useRecommendOptions } from '../../hooks/useFormRenderOptions.js';
27
27
  import { NSelect } from 'naive-ui';
28
- import { visitedDecorator, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
28
+ import { createVisitedSetter, assignUpdateValue, assignClearBindVisited } from '../../utils/schema.js';
29
29
 
30
30
  const script = defineComponent({
31
31
  name: "FormSelect",
@@ -45,9 +45,6 @@ const script = defineComponent({
45
45
  type: Array,
46
46
  default: () => []
47
47
  },
48
- onFocus: {
49
- type: Function
50
- },
51
48
  onChange: {},
52
49
  urlConfig: {
53
50
  type: Object
@@ -147,7 +144,7 @@ const script = defineComponent({
147
144
  "options": sortedOptions.value,
148
145
  "onSearch": fetchData,
149
146
  "onUpdate:show": (show) => show && fetchData(),
150
- "onFocus": visitedDecorator(field, props.onFocus)
147
+ "onFocus": createVisitedSetter(field)
151
148
  }, slots);
152
149
  }
153
150
  });
@@ -9,7 +9,7 @@ import '../../index.js';
9
9
  import { NESTED_FORM_ITEM_TYPE } from '../constants/index.js';
10
10
  import 'date-fns';
11
11
  import { traverseDependKey } from './schema.js';
12
- export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator } from './schema.js';
12
+ export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema } from './schema.js';
13
13
 
14
14
  function formRenderLog(message) {
15
15
  console.warn(`[FormRender]: ${message}`);
@@ -80,4 +80,4 @@ export declare function createObjSchema(properties: Record<string, ISchema>): {
80
80
  "x-compile-omitted"?: string[] | undefined;
81
81
  }>>;
82
82
  };
83
- export declare function visitedDecorator(field: Ref<GeneralField>, onFocus?: Func): (...args: unknown[]) => any;
83
+ export declare function createVisitedSetter(field: Ref<GeneralField>, callback?: Func): (...args: unknown[]) => any;
@@ -1,6 +1,6 @@
1
1
  import { isField } from '@formily/core';
2
2
  import { isObject } from '@vue/shared';
3
- import { isString, isArray } from 'lodash-es';
3
+ import { isString, isArray, isFunction } from 'lodash-es';
4
4
 
5
5
  function traverseSchema(schema, handler) {
6
6
  handler(schema);
@@ -93,13 +93,13 @@ function assignClearBindVisited(props, field) {
93
93
  function createObjSchema(properties) {
94
94
  return { type: "object", properties };
95
95
  }
96
- function visitedDecorator(field, onFocus) {
96
+ function createVisitedSetter(field, callback) {
97
97
  return (...args) => {
98
98
  if (isField(field.value)) {
99
99
  field.value.visited = true;
100
100
  }
101
- return onFocus == null ? void 0 : onFocus(...args);
101
+ return isFunction(callback) ? callback(...args) : void 0;
102
102
  };
103
103
  }
104
104
 
105
- export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema, visitedDecorator };
105
+ export { assignClearBindVisited, assignUpdateValue, assignValueBindKey, createLinebarId, createObjSchema, createVisitedSetter, dotEscape, fieldKeyEscape, getParentLinebar, traverseDependKey, traverseSchema };
@@ -2076,6 +2076,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2076
2076
  onActiveCellChangeStart?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeStartEventParams) => void) | undefined;
2077
2077
  onActiveCellChangeEnd?: ((params: import("vxe-table").VxeTableProDefines.ActiveCellChangeEndEventParams) => void) | undefined;
2078
2078
  uuid?: string | undefined;
2079
+ isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
2080
+ isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2081
+ isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2079
2082
  showSeq?: boolean | undefined;
2080
2083
  selectType?: "checkbox" | "radio" | null | undefined;
2081
2084
  rowGroupSetting?: {
@@ -4464,6 +4467,9 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4464
4467
  } | undefined;
4465
4468
  params?: any;
4466
4469
  uuid?: string | undefined;
4470
+ isTree?: import("../../../es/shared/types").MaybeString<0 | 2 | 1 | 3> | undefined;
4471
+ isSort?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4472
+ isBatchSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4467
4473
  showSeq?: boolean | undefined;
4468
4474
  selectType?: "checkbox" | "radio" | null | undefined;
4469
4475
  rowGroupSetting?: {
@@ -2,8 +2,8 @@ import { COMPONENT_NAMESPACE } from '../../shared/global/variable.js';
2
2
  import { safeComponentRegister } from '../../shared/utils/index.js';
3
3
  import script from './src/IhoTable.vue.js';
4
4
  import PluginPresets from './src/plugins/index.js';
5
- import 'vue';
6
5
  import 'lodash-es';
6
+ import 'vue';
7
7
  import './src/constants/index.js';
8
8
  import '../../shared/utils/tapable/SyncHook.js';
9
9
  import '../../shared/utils/tapable/SyncBailHook.js';