@ai-table/grid 0.0.46 → 0.0.48

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 (46) hide show
  1. package/components/drag/drag.component.d.ts +1 -4
  2. package/components/drag/drag.component.d.ts.map +1 -1
  3. package/components/drag/drag.component.scss +1 -1
  4. package/constants/icon.d.ts +2 -0
  5. package/constants/icon.d.ts.map +1 -1
  6. package/constants/table.d.ts +1 -0
  7. package/constants/table.d.ts.map +1 -1
  8. package/core/constants/field.d.ts.map +1 -1
  9. package/core/types/core.d.ts +2 -1
  10. package/core/types/core.d.ts.map +1 -1
  11. package/core/utils/field.d.ts +1 -1
  12. package/esm2022/components/cell-editors/link/edit-link/edit-link.component.mjs +3 -3
  13. package/esm2022/components/drag/drag.component.mjs +7 -47
  14. package/esm2022/constants/icon.mjs +3 -1
  15. package/esm2022/constants/table.mjs +2 -1
  16. package/esm2022/core/constants/field.mjs +7 -1
  17. package/esm2022/core/types/core.mjs +1 -1
  18. package/esm2022/core/utils/field.mjs +2 -2
  19. package/esm2022/grid.component.mjs +12 -13
  20. package/esm2022/public-api.mjs +2 -1
  21. package/esm2022/renderer/components/cells/index.mjs +2 -1
  22. package/esm2022/renderer/components/cells/richtext.component.mjs +90 -0
  23. package/esm2022/renderer/components/field-icon.component.mjs +5 -2
  24. package/esm2022/renderer/drawers/cell-drawer.mjs +5 -3
  25. package/esm2022/utils/clipboard/extract.mjs +29 -10
  26. package/esm2022/utils/field/model/link.mjs +3 -3
  27. package/esm2022/utils/i18n.mjs +3 -1
  28. package/esm2022/utils/style.mjs +5 -2
  29. package/fesm2022/ai-table-grid.mjs +966 -886
  30. package/fesm2022/ai-table-grid.mjs.map +1 -1
  31. package/grid.component.d.ts.map +1 -1
  32. package/package.json +1 -1
  33. package/public-api.d.ts +1 -0
  34. package/public-api.d.ts.map +1 -1
  35. package/renderer/components/cells/index.d.ts +1 -0
  36. package/renderer/components/cells/index.d.ts.map +1 -1
  37. package/renderer/components/cells/richtext.component.d.ts +14 -0
  38. package/renderer/components/cells/richtext.component.d.ts.map +1 -0
  39. package/renderer/components/field-icon.component.d.ts +1 -1
  40. package/renderer/components/field-icon.component.d.ts.map +1 -1
  41. package/renderer/drawers/cell-drawer.d.ts.map +1 -1
  42. package/utils/clipboard/extract.d.ts +1 -1
  43. package/utils/clipboard/extract.d.ts.map +1 -1
  44. package/utils/i18n.d.ts +1 -0
  45. package/utils/i18n.d.ts.map +1 -1
  46. package/utils/style.d.ts.map +1 -1
@@ -1,5 +1,28 @@
1
1
  import * as i0 from '@angular/core';
2
- import { signal, computed, output, inject, ElementRef, Component, ChangeDetectionStrategy, Input, input, EventEmitter, Output, ChangeDetectorRef, ViewChild, HostListener, Renderer2, Pipe, model, booleanAttribute, Injectable, InjectionToken, effect, DestroyRef, NgZone, ViewContainerRef, viewChild, afterNextRender, untracked } from '@angular/core';
2
+ import { InjectionToken, input, EventEmitter, inject, ElementRef, effect, Component, ChangeDetectionStrategy, Output, signal, computed, output, Input, ChangeDetectorRef, ViewChild, HostListener, Renderer2, Pipe, model, booleanAttribute, Injectable, DestroyRef, NgZone, ViewContainerRef, viewChild, afterNextRender, untracked } from '@angular/core';
3
+ import Konva from 'konva';
4
+ import { Shape } from 'konva/lib/Shape';
5
+ import { Sprite } from 'konva/lib/shapes/Sprite';
6
+ import { Stage } from 'konva/lib/Stage';
7
+ import { FastLayer } from 'konva/lib/FastLayer';
8
+ import { Group } from 'konva/lib/Group';
9
+ import { Layer } from 'konva/lib/Layer';
10
+ import { Arc } from 'konva/lib/shapes/Arc';
11
+ import { Arrow } from 'konva/lib/shapes/Arrow';
12
+ import { Circle } from 'konva/lib/shapes/Circle';
13
+ import { Ellipse } from 'konva/lib/shapes/Ellipse';
14
+ import { Image as Image$1 } from 'konva/lib/shapes/Image';
15
+ import { Label, Tag } from 'konva/lib/shapes/Label';
16
+ import { Line } from 'konva/lib/shapes/Line';
17
+ import { Path } from 'konva/lib/shapes/Path';
18
+ import { Rect } from 'konva/lib/shapes/Rect';
19
+ import { RegularPolygon } from 'konva/lib/shapes/RegularPolygon';
20
+ import { Ring } from 'konva/lib/shapes/Ring';
21
+ import { Star } from 'konva/lib/shapes/Star';
22
+ import { Text } from 'konva/lib/shapes/Text';
23
+ import { TextPath } from 'konva/lib/shapes/TextPath';
24
+ import { Transformer } from 'konva/lib/shapes/Transformer';
25
+ import { Wedge } from 'konva/lib/shapes/Wedge';
3
26
  import * as i1$1 from 'ngx-tethys/popover';
4
27
  import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
5
28
  import ObjectID from 'bson-objectid';
@@ -45,186 +68,588 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
45
68
  import { LRUCache } from 'lru-cache';
46
69
  import { fromUnixTime, subDays } from 'date-fns';
47
70
  import { DEFAULT_COLORS } from 'ngx-tethys/color-picker';
48
- import Konva from 'konva';
49
- import { Shape } from 'konva/lib/Shape';
50
- import { Sprite } from 'konva/lib/shapes/Sprite';
51
71
  import GraphemeSplitter from 'grapheme-splitter';
52
- import { Stage } from 'konva/lib/Stage';
53
- import { FastLayer } from 'konva/lib/FastLayer';
54
- import { Group } from 'konva/lib/Group';
55
- import { Layer } from 'konva/lib/Layer';
56
- import { Arc } from 'konva/lib/shapes/Arc';
57
- import { Arrow } from 'konva/lib/shapes/Arrow';
58
- import { Circle } from 'konva/lib/shapes/Circle';
59
- import { Ellipse } from 'konva/lib/shapes/Ellipse';
60
- import { Image as Image$1 } from 'konva/lib/shapes/Image';
61
- import { Label, Tag } from 'konva/lib/shapes/Label';
62
- import { Line } from 'konva/lib/shapes/Line';
63
- import { Path } from 'konva/lib/shapes/Path';
64
- import { Rect } from 'konva/lib/shapes/Rect';
65
- import { RegularPolygon } from 'konva/lib/shapes/RegularPolygon';
66
- import { Ring } from 'konva/lib/shapes/Ring';
67
- import { Star } from 'konva/lib/shapes/Star';
68
- import { Text } from 'konva/lib/shapes/Text';
69
- import { TextPath } from 'konva/lib/shapes/TextPath';
70
- import { Transformer } from 'konva/lib/shapes/Transformer';
71
- import { Wedge } from 'konva/lib/shapes/Wedge';
72
72
 
73
- const Colors = {
74
- primary: '#6698FF',
75
- gray100: '#f5f5f5',
76
- gray200: '#eee',
77
- gray300: '#ddd',
78
- gray800: '#333',
79
- gray600: '#999',
80
- gray700: '#666',
81
- white: '#fff',
82
- black: '#000',
83
- transparent: 'transparent',
84
- gray80: '#fafafa',
85
- headSelectedBgColor: '#EAEFFA',
86
- itemActiveBgColor: '#6698ff1a',
87
- itemMatchBgColor: '#ff9f731a',
88
- waring: '#ffcd5d',
89
- success: '#73d897'
90
- };
73
+ const KO_CONTAINER_TOKEN = new InjectionToken('KO_CONTAINER_TOKEN');
91
74
 
92
- const AITable = {
93
- getColors() {
94
- return Colors;
95
- },
96
- getVisibleFields(aiTable) {
97
- return aiTable.gridData().fields.filter((field) => !field.hidden);
98
- },
99
- getVisibleRows(aiTable) {
100
- return aiTable.records();
101
- },
102
- getActiveCell(aiTable) {
103
- return aiTable.selection().activeCell;
104
- },
105
- getActiveRecordIds(aiTable) {
106
- const selectedRecords = aiTable.selection().selectedRecords;
107
- const selectedCells = aiTable.selection().selectedCells;
108
- let selectedRecordIds = [];
109
- if (selectedRecords.size > 0) {
110
- selectedRecordIds = [...selectedRecords.keys()];
111
- }
112
- else if (selectedCells.size > 0) {
113
- selectedRecordIds = [...selectedCells].map((item) => item.split(':')[0]);
75
+ function updatePicture(node) {
76
+ const drawingNode = node.getLayer() || node.getStage();
77
+ if (drawingNode) {
78
+ drawingNode.batchDraw();
79
+ }
80
+ }
81
+
82
+ // adapted FROM: https://github.com/lavrton/react-konva/blob/master/src/react-konva-fiber.js
83
+ function applyNodeProps(component, props = {}, oldProps = {}) {
84
+ if ('id' in props) {
85
+ const message = `You are using "id" attribute for Konva node. In some very rare cases it may produce bugs. Currently we recommend not to use it and use "name" attribute instead.`;
86
+ console.warn(message);
87
+ }
88
+ const instance = component.getNode();
89
+ const updatedProps = {};
90
+ let hasUpdates = false;
91
+ Object.keys(oldProps).forEach((key) => {
92
+ const isEvent = key.slice(0, 2) === 'ko';
93
+ const propChanged = oldProps[key] !== props[key];
94
+ if (isEvent && propChanged) {
95
+ let eventName = key.slice(2).toLowerCase();
96
+ if (eventName.slice(0, 7) === 'content') {
97
+ eventName = 'content' + eventName.slice(7, 8).toUpperCase() + eventName.slice(8);
98
+ }
99
+ instance.off(eventName, oldProps[key]);
114
100
  }
115
- else {
116
- selectedRecordIds = [];
101
+ const toRemove = !Object.hasOwn(props, key);
102
+ if (toRemove) {
103
+ instance.setAttr(key, undefined);
117
104
  }
118
- return selectedRecordIds;
119
- },
120
- isCellVisible(aiTable, cell) {
121
- const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
122
- const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
123
- const [recordId, fieldId] = cell || [];
124
- const isVisible = visibleRowIndexMap.has(recordId) && visibleColumnIndexMap.has(fieldId);
125
- return isVisible;
126
- },
127
- getCellIndex(aiTable, cell) {
128
- const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
129
- const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
130
- if (AITable.isCellVisible(aiTable, cell)) {
131
- const [recordId, fieldId] = cell;
132
- return {
133
- rowIndex: visibleRowIndexMap.get(recordId),
134
- columnIndex: visibleColumnIndexMap.get(fieldId)
135
- };
105
+ });
106
+ Object.keys(props).forEach((key) => {
107
+ const isEvent = key.slice(0, 2) === 'ko';
108
+ const toAdd = oldProps[key] !== props[key];
109
+ if (isEvent && toAdd) {
110
+ let eventName = key.slice(2).toLowerCase();
111
+ if (eventName.slice(0, 7) === 'content') {
112
+ eventName = 'content' + eventName.slice(7, 8).toUpperCase() + eventName.slice(8);
113
+ }
114
+ if (props[key]) {
115
+ instance.off(eventName);
116
+ instance.on(eventName, (event) => {
117
+ props[key]({
118
+ angularComponent: component,
119
+ event
120
+ });
121
+ });
122
+ }
136
123
  }
137
- return null;
138
- },
139
- isFrozenColumn(aiTable, columnIndex) {
140
- const frozenColumnCount = aiTable.context.frozenColumnCount();
141
- if (columnIndex <= frozenColumnCount - 1) {
142
- return true;
124
+ if (!isEvent && (props[key] !== oldProps[key] || props[key] !== instance.getAttr(key))) {
125
+ hasUpdates = true;
126
+ updatedProps[key] = props[key];
143
127
  }
144
- return false;
128
+ });
129
+ if (hasUpdates) {
130
+ instance.setAttrs(updatedProps);
131
+ updatePicture(instance);
132
+ let val;
133
+ Object.keys(updatedProps).forEach((prop) => {
134
+ val = updatedProps[prop];
135
+ if (val instanceof Image && !val.complete) {
136
+ const node = instance;
137
+ val.addEventListener('load', function () {
138
+ const layer = node.getLayer();
139
+ if (layer) {
140
+ layer.batchDraw();
141
+ }
142
+ });
143
+ }
144
+ });
145
145
  }
146
- };
147
-
148
- var AITableFieldType;
149
- (function (AITableFieldType) {
150
- AITableFieldType["text"] = "text";
151
- AITableFieldType["richText"] = "rich_text";
152
- AITableFieldType["select"] = "select";
153
- AITableFieldType["number"] = "number";
154
- AITableFieldType["date"] = "date";
155
- AITableFieldType["member"] = "member";
156
- AITableFieldType["progress"] = "progress";
157
- AITableFieldType["rate"] = "rate";
158
- AITableFieldType["link"] = "link";
159
- AITableFieldType["attachment"] = "attachment";
160
- AITableFieldType["createdAt"] = "created_at";
161
- AITableFieldType["updatedAt"] = "updated_at";
162
- AITableFieldType["createdBy"] = "created_by";
163
- AITableFieldType["updatedBy"] = "updated_by";
164
- })(AITableFieldType || (AITableFieldType = {}));
165
- var AITableStatType;
166
- (function (AITableStatType) {
167
- AITableStatType[AITableStatType["None"] = 0] = "None";
168
- AITableStatType[AITableStatType["CountAll"] = 1] = "CountAll";
169
- AITableStatType[AITableStatType["Empty"] = 2] = "Empty";
170
- AITableStatType[AITableStatType["Filled"] = 3] = "Filled";
171
- AITableStatType[AITableStatType["Unique"] = 4] = "Unique";
172
- AITableStatType[AITableStatType["PercentEmpty"] = 5] = "PercentEmpty";
173
- AITableStatType[AITableStatType["PercentFilled"] = 6] = "PercentFilled";
174
- AITableStatType[AITableStatType["PercentUnique"] = 7] = "PercentUnique";
175
- AITableStatType[AITableStatType["Sum"] = 8] = "Sum";
176
- AITableStatType[AITableStatType["Average"] = 9] = "Average";
177
- AITableStatType[AITableStatType["Max"] = 10] = "Max";
178
- AITableStatType[AITableStatType["Min"] = 11] = "Min";
179
- AITableStatType[AITableStatType["DateRangeOfDays"] = 12] = "DateRangeOfDays";
180
- AITableStatType[AITableStatType["DateRangeOfMonths"] = 13] = "DateRangeOfMonths";
181
- AITableStatType[AITableStatType["Checked"] = 14] = "Checked";
182
- AITableStatType[AITableStatType["UnChecked"] = 15] = "UnChecked";
183
- AITableStatType[AITableStatType["PercentChecked"] = 16] = "PercentChecked";
184
- AITableStatType[AITableStatType["PercentUnChecked"] = 17] = "PercentUnChecked";
185
- })(AITableStatType || (AITableStatType = {}));
186
- var AITableSelectOptionStyle;
187
- (function (AITableSelectOptionStyle) {
188
- AITableSelectOptionStyle[AITableSelectOptionStyle["text"] = 1] = "text";
189
- AITableSelectOptionStyle[AITableSelectOptionStyle["tag"] = 2] = "tag";
190
- AITableSelectOptionStyle[AITableSelectOptionStyle["dot"] = 3] = "dot";
191
- AITableSelectOptionStyle[AITableSelectOptionStyle["piece"] = 4] = "piece";
192
- })(AITableSelectOptionStyle || (AITableSelectOptionStyle = {}));
193
- var Direction;
194
- (function (Direction) {
195
- Direction["before"] = "before";
196
- Direction["after"] = "after";
197
- })(Direction || (Direction = {}));
198
- var DragType;
199
- (function (DragType) {
200
- DragType["record"] = "record";
201
- DragType["field"] = "field";
202
- DragType["columnWidth"] = "columnWidth";
203
- DragType["none"] = "none";
204
- })(DragType || (DragType = {}));
146
+ }
205
147
 
206
- var AITableGridI18nKey;
207
- (function (AITableGridI18nKey) {
208
- AITableGridI18nKey["dataPickerPlaceholder"] = "dataPickerPlaceholder";
209
- AITableGridI18nKey["linkTooltip"] = "linkTooltip";
210
- AITableGridI18nKey["invalidLinkFormat"] = "invalidLinkFormat";
211
- AITableGridI18nKey["linkRequired"] = "linkRequired";
212
- AITableGridI18nKey["linkText"] = "linkText";
213
- AITableGridI18nKey["linkUrl"] = "linkUrl";
214
- AITableGridI18nKey["inputText"] = "inputText";
215
- AITableGridI18nKey["inputUrl"] = "inputUrl";
216
- AITableGridI18nKey["fieldColumnName"] = "fieldColumnName";
217
- AITableGridI18nKey["fieldColumnNamePlaceholder"] = "fieldColumnNamePlaceholder";
218
- AITableGridI18nKey["fieldType"] = "fieldType";
219
- AITableGridI18nKey["allowMultipleMembers"] = "allowMultipleMembers";
220
- AITableGridI18nKey["cancel"] = "cancel";
221
- AITableGridI18nKey["apply"] = "apply";
148
+ function camelize(str) {
149
+ return str
150
+ .replace(/^\w|[A-Z]|\b\w/g, function (letter, index) {
151
+ return index == 0 ? letter.toLowerCase() : letter.toUpperCase();
152
+ })
153
+ .replace(/\s+/g, '');
154
+ }
155
+ function capitalizeFirstLetter(string) {
156
+ return string.charAt(0).toUpperCase() + string.slice(1);
157
+ }
158
+ function getName(componentTag) {
159
+ return capitalizeFirstLetter(camelize(componentTag.slice(3).replace('-', ' ')));
160
+ }
161
+ function createListener(instance) {
162
+ const output = {};
163
+ [
164
+ 'koMouseover',
165
+ 'koMousemove',
166
+ 'koMouseout',
167
+ 'koMouseenter',
168
+ 'koMouseleave',
169
+ 'koMousedown',
170
+ 'koMouseup',
171
+ 'koWheel',
172
+ 'koContextmenu',
173
+ 'koClick',
174
+ 'koDblclick',
175
+ 'koTouchstart',
176
+ 'koTouchmove',
177
+ 'koTouchend',
178
+ 'koTap',
179
+ 'koDbltap',
180
+ 'koDragstart',
181
+ 'koDragmove',
182
+ 'koDragend'
183
+ ].forEach((eventName) => {
184
+ const name = eventName;
185
+ const eventEmitter = instance[name];
186
+ if (eventEmitter.observed) {
187
+ output[eventName] = eventEmitter.emit.bind(eventEmitter);
188
+ }
189
+ });
190
+ return output;
191
+ }
192
+
193
+ class KoShape {
194
+ constructor() {
195
+ this.config = input();
196
+ this.koMouseover = new EventEmitter();
197
+ this.koMousemove = new EventEmitter();
198
+ this.koMouseout = new EventEmitter();
199
+ this.koMouseenter = new EventEmitter();
200
+ this.koMouseleave = new EventEmitter();
201
+ this.koMousedown = new EventEmitter();
202
+ this.koMouseup = new EventEmitter();
203
+ this.koWheel = new EventEmitter();
204
+ this.koContextmenu = new EventEmitter();
205
+ this.koClick = new EventEmitter();
206
+ this.koDblclick = new EventEmitter();
207
+ this.koTouchstart = new EventEmitter();
208
+ this.koTouchmove = new EventEmitter();
209
+ this.koTouchend = new EventEmitter();
210
+ this.koTap = new EventEmitter();
211
+ this.koDbltap = new EventEmitter();
212
+ this.koDragstart = new EventEmitter();
213
+ this.koDragmove = new EventEmitter();
214
+ this.koDragend = new EventEmitter();
215
+ this.elementRef = inject((ElementRef));
216
+ this.container = inject(KO_CONTAINER_TOKEN, { skipSelf: true });
217
+ this.cacheProps = {};
218
+ this.nameNode = getName(this.elementRef.nativeElement.localName);
219
+ effect(() => {
220
+ if (this.config()) {
221
+ this.updateNode(this.config());
222
+ }
223
+ });
224
+ }
225
+ getNode() {
226
+ return this._node;
227
+ }
228
+ ngOnInit() {
229
+ this.initKonva();
230
+ }
231
+ initKonva() {
232
+ if (!this._node) {
233
+ this._node = new Shape();
234
+ }
235
+ if (this.nameNode === 'Shape') {
236
+ this._node = new Shape();
237
+ }
238
+ else if (this.nameNode === 'Sprite') {
239
+ this._node = new Sprite(this.config());
240
+ }
241
+ else {
242
+ this._node = new Konva[this.nameNode](undefined);
243
+ }
244
+ const animationStage = this._node.to.bind(this._node);
245
+ this._node.to = (newConfig) => {
246
+ animationStage(newConfig);
247
+ setTimeout(() => {
248
+ Object.keys(this._node.attrs).forEach((key) => {
249
+ if (typeof this._node.attrs[key] !== 'function') {
250
+ this.config()[key] = this._node.attrs[key];
251
+ }
252
+ });
253
+ }, 200);
254
+ };
255
+ if (this.config()) {
256
+ this.updateNode(this.config());
257
+ }
258
+ }
259
+ updateNode(config) {
260
+ if (!this._node)
261
+ return;
262
+ const props = {
263
+ ...config,
264
+ ...createListener(this)
265
+ };
266
+ applyNodeProps(this, props, this.cacheProps);
267
+ this.cacheProps = props;
268
+ }
269
+ ngAfterViewInit() {
270
+ const container = this.container.getNode();
271
+ container.add(this.getNode());
272
+ updatePicture(this.container.getNode());
273
+ }
274
+ ngOnDestroy() {
275
+ this._node?.destroy();
276
+ }
277
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoShape, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
278
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: KoShape, isStandalone: true, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koMouseover: "koMouseover", koMousemove: "koMousemove", koMouseout: "koMouseout", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", koMousedown: "koMousedown", koMouseup: "koMouseup", koWheel: "koWheel", koContextmenu: "koContextmenu", koClick: "koClick", koDblclick: "koDblclick", koTouchstart: "koTouchstart", koTouchmove: "koTouchmove", koTouchend: "koTouchend", koTap: "koTap", koDbltap: "koDbltap", koDragstart: "koDragstart", koDragmove: "koDragmove", koDragend: "koDragend" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
279
+ }
280
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoShape, decorators: [{
281
+ type: Component,
282
+ args: [{
283
+ selector: 'ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer',
284
+ standalone: true,
285
+ template: `<ng-content></ng-content>`,
286
+ changeDetection: ChangeDetectionStrategy.OnPush
287
+ }]
288
+ }], ctorParameters: () => [], propDecorators: { koMouseover: [{
289
+ type: Output
290
+ }], koMousemove: [{
291
+ type: Output
292
+ }], koMouseout: [{
293
+ type: Output
294
+ }], koMouseenter: [{
295
+ type: Output
296
+ }], koMouseleave: [{
297
+ type: Output
298
+ }], koMousedown: [{
299
+ type: Output
300
+ }], koMouseup: [{
301
+ type: Output
302
+ }], koWheel: [{
303
+ type: Output
304
+ }], koContextmenu: [{
305
+ type: Output
306
+ }], koClick: [{
307
+ type: Output
308
+ }], koDblclick: [{
309
+ type: Output
310
+ }], koTouchstart: [{
311
+ type: Output
312
+ }], koTouchmove: [{
313
+ type: Output
314
+ }], koTouchend: [{
315
+ type: Output
316
+ }], koTap: [{
317
+ type: Output
318
+ }], koDbltap: [{
319
+ type: Output
320
+ }], koDragstart: [{
321
+ type: Output
322
+ }], koDragmove: [{
323
+ type: Output
324
+ }], koDragend: [{
325
+ type: Output
326
+ }] } });
327
+
328
+ class KoContainer extends KoShape {
329
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoContainer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
330
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: KoContainer, isStandalone: true, selector: "ko-layer, ko-fastlayer, ko-group", providers: [
331
+ {
332
+ provide: KO_CONTAINER_TOKEN,
333
+ useExisting: KoContainer
334
+ }
335
+ ], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
336
+ }
337
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoContainer, decorators: [{
338
+ type: Component,
339
+ args: [{
340
+ selector: 'ko-layer, ko-fastlayer, ko-group',
341
+ standalone: true,
342
+ template: `<ng-content></ng-content>`,
343
+ providers: [
344
+ {
345
+ provide: KO_CONTAINER_TOKEN,
346
+ useExisting: KoContainer
347
+ }
348
+ ],
349
+ changeDetection: ChangeDetectionStrategy.OnPush
350
+ }]
351
+ }] });
352
+
353
+ class KoStage {
354
+ constructor() {
355
+ this.config = input();
356
+ this.koMouseover = new EventEmitter();
357
+ this.koMousemove = new EventEmitter();
358
+ this.koMouseout = new EventEmitter();
359
+ this.koMouseenter = new EventEmitter();
360
+ this.koMouseleave = new EventEmitter();
361
+ this.koMousedown = new EventEmitter();
362
+ this.koMouseup = new EventEmitter();
363
+ this.koWheel = new EventEmitter();
364
+ this.koContextmenu = new EventEmitter();
365
+ this.koClick = new EventEmitter();
366
+ this.koDblclick = new EventEmitter();
367
+ this.koTouchstart = new EventEmitter();
368
+ this.koTouchmove = new EventEmitter();
369
+ this.koTouchend = new EventEmitter();
370
+ this.koTap = new EventEmitter();
371
+ this.koDbltap = new EventEmitter();
372
+ this.koDragstart = new EventEmitter();
373
+ this.koDragmove = new EventEmitter();
374
+ this.koDragend = new EventEmitter();
375
+ this.cacheProps = {};
376
+ this.nodeContainer = inject(ElementRef).nativeElement;
377
+ effect(() => {
378
+ if (this.config()) {
379
+ if (!this._stage) {
380
+ this.initStage();
381
+ }
382
+ this.updateNode(this.config());
383
+ }
384
+ });
385
+ }
386
+ ngOnInit() {
387
+ this.initStage();
388
+ }
389
+ getNode() {
390
+ return this._stage;
391
+ }
392
+ initStage() {
393
+ this._stage = new Stage({
394
+ ...this.config(),
395
+ container: this.nodeContainer
396
+ });
397
+ }
398
+ updateNode(config) {
399
+ const props = {
400
+ ...config,
401
+ ...createListener(this)
402
+ };
403
+ applyNodeProps(this, props, this.cacheProps);
404
+ this.cacheProps = props;
405
+ }
406
+ ngOnDestroy() {
407
+ this._stage?.destroy();
408
+ }
409
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoStage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
410
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: KoStage, isStandalone: true, selector: "ko-stage", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koMouseover: "koMouseover", koMousemove: "koMousemove", koMouseout: "koMouseout", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", koMousedown: "koMousedown", koMouseup: "koMouseup", koWheel: "koWheel", koContextmenu: "koContextmenu", koClick: "koClick", koDblclick: "koDblclick", koTouchstart: "koTouchstart", koTouchmove: "koTouchmove", koTouchend: "koTouchend", koTap: "koTap", koDbltap: "koDbltap", koDragstart: "koDragstart", koDragmove: "koDragmove", koDragend: "koDragend" }, providers: [
411
+ {
412
+ provide: KO_CONTAINER_TOKEN,
413
+ useExisting: KoStage
414
+ }
415
+ ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
416
+ }
417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoStage, decorators: [{
418
+ type: Component,
419
+ args: [{
420
+ selector: 'ko-stage',
421
+ standalone: true,
422
+ template: `<ng-content></ng-content>`,
423
+ providers: [
424
+ {
425
+ provide: KO_CONTAINER_TOKEN,
426
+ useExisting: KoStage
427
+ }
428
+ ],
429
+ changeDetection: ChangeDetectionStrategy.OnPush
430
+ }]
431
+ }], ctorParameters: () => [], propDecorators: { koMouseover: [{
432
+ type: Output
433
+ }], koMousemove: [{
434
+ type: Output
435
+ }], koMouseout: [{
436
+ type: Output
437
+ }], koMouseenter: [{
438
+ type: Output
439
+ }], koMouseleave: [{
440
+ type: Output
441
+ }], koMousedown: [{
442
+ type: Output
443
+ }], koMouseup: [{
444
+ type: Output
445
+ }], koWheel: [{
446
+ type: Output
447
+ }], koContextmenu: [{
448
+ type: Output
449
+ }], koClick: [{
450
+ type: Output
451
+ }], koDblclick: [{
452
+ type: Output
453
+ }], koTouchstart: [{
454
+ type: Output
455
+ }], koTouchmove: [{
456
+ type: Output
457
+ }], koTouchend: [{
458
+ type: Output
459
+ }], koTap: [{
460
+ type: Output
461
+ }], koDbltap: [{
462
+ type: Output
463
+ }], koDragstart: [{
464
+ type: Output
465
+ }], koDragmove: [{
466
+ type: Output
467
+ }], koDragend: [{
468
+ type: Output
469
+ }] } });
470
+
471
+ class KoComponent extends Component {
472
+ }
473
+
474
+ const KoShapeTypes = {
475
+ Arc,
476
+ Arrow,
477
+ Circle,
478
+ Ellipse,
479
+ Image: Image$1,
480
+ Label,
481
+ Tag,
482
+ Line,
483
+ Path,
484
+ Rect,
485
+ RegularPolygon,
486
+ Ring,
487
+ Star,
488
+ Text,
489
+ TextPath,
490
+ Transformer,
491
+ Wedge,
492
+ Group,
493
+ Layer,
494
+ FastLayer
495
+ };
496
+
497
+ const Colors = {
498
+ primary: '#6698FF',
499
+ gray100: '#f5f5f5',
500
+ gray200: '#eee',
501
+ gray300: '#ddd',
502
+ gray800: '#333',
503
+ gray600: '#999',
504
+ gray700: '#666',
505
+ white: '#fff',
506
+ black: '#000',
507
+ transparent: 'transparent',
508
+ gray80: '#fafafa',
509
+ headSelectedBgColor: '#EAEFFA',
510
+ itemActiveBgColor: '#6698ff1a',
511
+ itemMatchBgColor: '#ff9f731a',
512
+ waring: '#ffcd5d',
513
+ success: '#73d897'
514
+ };
515
+
516
+ const AITable = {
517
+ getColors() {
518
+ return Colors;
519
+ },
520
+ getVisibleFields(aiTable) {
521
+ return aiTable.gridData().fields.filter((field) => !field.hidden);
522
+ },
523
+ getVisibleRows(aiTable) {
524
+ return aiTable.records();
525
+ },
526
+ getActiveCell(aiTable) {
527
+ return aiTable.selection().activeCell;
528
+ },
529
+ getActiveRecordIds(aiTable) {
530
+ const selectedRecords = aiTable.selection().selectedRecords;
531
+ const selectedCells = aiTable.selection().selectedCells;
532
+ let selectedRecordIds = [];
533
+ if (selectedRecords.size > 0) {
534
+ selectedRecordIds = [...selectedRecords.keys()];
535
+ }
536
+ else if (selectedCells.size > 0) {
537
+ selectedRecordIds = [...selectedCells].map((item) => item.split(':')[0]);
538
+ }
539
+ else {
540
+ selectedRecordIds = [];
541
+ }
542
+ return selectedRecordIds;
543
+ },
544
+ isCellVisible(aiTable, cell) {
545
+ const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
546
+ const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
547
+ const [recordId, fieldId] = cell || [];
548
+ const isVisible = visibleRowIndexMap.has(recordId) && visibleColumnIndexMap.has(fieldId);
549
+ return isVisible;
550
+ },
551
+ getCellIndex(aiTable, cell) {
552
+ const visibleRowIndexMap = aiTable.context.visibleRowsIndexMap();
553
+ const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
554
+ if (AITable.isCellVisible(aiTable, cell)) {
555
+ const [recordId, fieldId] = cell;
556
+ return {
557
+ rowIndex: visibleRowIndexMap.get(recordId),
558
+ columnIndex: visibleColumnIndexMap.get(fieldId)
559
+ };
560
+ }
561
+ return null;
562
+ },
563
+ isFrozenColumn(aiTable, columnIndex) {
564
+ const frozenColumnCount = aiTable.context.frozenColumnCount();
565
+ if (columnIndex <= frozenColumnCount - 1) {
566
+ return true;
567
+ }
568
+ return false;
569
+ }
570
+ };
571
+
572
+ var AITableFieldType;
573
+ (function (AITableFieldType) {
574
+ AITableFieldType["text"] = "text";
575
+ AITableFieldType["richText"] = "rich_text";
576
+ AITableFieldType["select"] = "select";
577
+ AITableFieldType["number"] = "number";
578
+ AITableFieldType["date"] = "date";
579
+ AITableFieldType["member"] = "member";
580
+ AITableFieldType["progress"] = "progress";
581
+ AITableFieldType["rate"] = "rate";
582
+ AITableFieldType["link"] = "link";
583
+ AITableFieldType["attachment"] = "attachment";
584
+ AITableFieldType["createdAt"] = "created_at";
585
+ AITableFieldType["updatedAt"] = "updated_at";
586
+ AITableFieldType["createdBy"] = "created_by";
587
+ AITableFieldType["updatedBy"] = "updated_by";
588
+ })(AITableFieldType || (AITableFieldType = {}));
589
+ var AITableStatType;
590
+ (function (AITableStatType) {
591
+ AITableStatType[AITableStatType["None"] = 0] = "None";
592
+ AITableStatType[AITableStatType["CountAll"] = 1] = "CountAll";
593
+ AITableStatType[AITableStatType["Empty"] = 2] = "Empty";
594
+ AITableStatType[AITableStatType["Filled"] = 3] = "Filled";
595
+ AITableStatType[AITableStatType["Unique"] = 4] = "Unique";
596
+ AITableStatType[AITableStatType["PercentEmpty"] = 5] = "PercentEmpty";
597
+ AITableStatType[AITableStatType["PercentFilled"] = 6] = "PercentFilled";
598
+ AITableStatType[AITableStatType["PercentUnique"] = 7] = "PercentUnique";
599
+ AITableStatType[AITableStatType["Sum"] = 8] = "Sum";
600
+ AITableStatType[AITableStatType["Average"] = 9] = "Average";
601
+ AITableStatType[AITableStatType["Max"] = 10] = "Max";
602
+ AITableStatType[AITableStatType["Min"] = 11] = "Min";
603
+ AITableStatType[AITableStatType["DateRangeOfDays"] = 12] = "DateRangeOfDays";
604
+ AITableStatType[AITableStatType["DateRangeOfMonths"] = 13] = "DateRangeOfMonths";
605
+ AITableStatType[AITableStatType["Checked"] = 14] = "Checked";
606
+ AITableStatType[AITableStatType["UnChecked"] = 15] = "UnChecked";
607
+ AITableStatType[AITableStatType["PercentChecked"] = 16] = "PercentChecked";
608
+ AITableStatType[AITableStatType["PercentUnChecked"] = 17] = "PercentUnChecked";
609
+ })(AITableStatType || (AITableStatType = {}));
610
+ var AITableSelectOptionStyle;
611
+ (function (AITableSelectOptionStyle) {
612
+ AITableSelectOptionStyle[AITableSelectOptionStyle["text"] = 1] = "text";
613
+ AITableSelectOptionStyle[AITableSelectOptionStyle["tag"] = 2] = "tag";
614
+ AITableSelectOptionStyle[AITableSelectOptionStyle["dot"] = 3] = "dot";
615
+ AITableSelectOptionStyle[AITableSelectOptionStyle["piece"] = 4] = "piece";
616
+ })(AITableSelectOptionStyle || (AITableSelectOptionStyle = {}));
617
+ var Direction;
618
+ (function (Direction) {
619
+ Direction["before"] = "before";
620
+ Direction["after"] = "after";
621
+ })(Direction || (Direction = {}));
622
+ var DragType;
623
+ (function (DragType) {
624
+ DragType["record"] = "record";
625
+ DragType["field"] = "field";
626
+ DragType["columnWidth"] = "columnWidth";
627
+ DragType["none"] = "none";
628
+ })(DragType || (DragType = {}));
629
+
630
+ var AITableGridI18nKey;
631
+ (function (AITableGridI18nKey) {
632
+ AITableGridI18nKey["dataPickerPlaceholder"] = "dataPickerPlaceholder";
633
+ AITableGridI18nKey["linkTooltip"] = "linkTooltip";
634
+ AITableGridI18nKey["invalidLinkFormat"] = "invalidLinkFormat";
635
+ AITableGridI18nKey["linkRequired"] = "linkRequired";
636
+ AITableGridI18nKey["linkText"] = "linkText";
637
+ AITableGridI18nKey["linkUrl"] = "linkUrl";
638
+ AITableGridI18nKey["inputText"] = "inputText";
639
+ AITableGridI18nKey["inputUrl"] = "inputUrl";
640
+ AITableGridI18nKey["fieldColumnName"] = "fieldColumnName";
641
+ AITableGridI18nKey["fieldColumnNamePlaceholder"] = "fieldColumnNamePlaceholder";
642
+ AITableGridI18nKey["fieldType"] = "fieldType";
643
+ AITableGridI18nKey["allowMultipleMembers"] = "allowMultipleMembers";
644
+ AITableGridI18nKey["cancel"] = "cancel";
645
+ AITableGridI18nKey["apply"] = "apply";
222
646
  AITableGridI18nKey["fieldNameRequired"] = "fieldNameRequired";
223
647
  AITableGridI18nKey["fieldNameDuplicate"] = "fieldNameDuplicate";
224
648
  AITableGridI18nKey["confirm"] = "confirm";
225
649
  AITableGridI18nKey["copiedCells"] = "copiedCells";
226
650
  AITableGridI18nKey["invalidPasteContent"] = "invalidPasteContent";
227
651
  AITableGridI18nKey["fieldTypeText"] = "fieldTypeText";
652
+ AITableGridI18nKey["fieldTypeRichtext"] = "fieldTypeRichtext";
228
653
  AITableGridI18nKey["fieldTypeSelect"] = "fieldTypeSelect";
229
654
  AITableGridI18nKey["fieldTypeMultiSelect"] = "fieldTypeMultiSelect";
230
655
  AITableGridI18nKey["fieldTypeNumber"] = "fieldTypeNumber";
@@ -260,6 +685,7 @@ const AITableI18nText = {
260
685
  [AITableGridI18nKey.copiedCells]: '已复制 {count} 个单元格',
261
686
  [AITableGridI18nKey.invalidPasteContent]: '粘贴内容不符合当前类型', // 新增
262
687
  [AITableGridI18nKey.fieldTypeText]: '单行文本',
688
+ [AITableGridI18nKey.fieldTypeRichtext]: '多行文本',
263
689
  [AITableGridI18nKey.fieldTypeSelect]: '单选',
264
690
  [AITableGridI18nKey.fieldTypeMultiSelect]: '多选',
265
691
  [AITableGridI18nKey.fieldTypeNumber]: '数字',
@@ -300,6 +726,12 @@ function getFieldOptions(aiTable) {
300
726
  icon: 'font',
301
727
  width: AI_TABLE_FIELD_MAX_WIDTH
302
728
  },
729
+ {
730
+ type: AITableFieldType.richText,
731
+ name: getI18nTextByKey(aiTable, AITableGridI18nKey.fieldTypeRichtext),
732
+ icon: 'multiline-text',
733
+ width: AI_TABLE_FIELD_MAX_WIDTH
734
+ },
303
735
  {
304
736
  type: AITableFieldType.select,
305
737
  name: getI18nTextByKey(aiTable, AITableGridI18nKey.fieldTypeSelect),
@@ -820,7 +1252,7 @@ function getDefaultFieldValue(field) {
820
1252
  if (isArrayField(field)) {
821
1253
  return [];
822
1254
  }
823
- if (isNumberFiled(field)) {
1255
+ if (isNumberFiled(field) || field.type === AITableFieldType.richText) {
824
1256
  return null;
825
1257
  }
826
1258
  return '';
@@ -1143,7 +1575,7 @@ class LinkEditComponent {
1143
1575
  this.confirm.emit(link);
1144
1576
  }
1145
1577
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LinkEditComponent, deps: [{ token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component }); }
1146
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LinkEditComponent, isStandalone: true, selector: "link-edit", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm" }, ngImport: i0, template: "<form\n thyLayout=\"vertical\"\n thyStopPropagation\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig()\"\n name=\"linkForm\"\n class=\"p-5\"\n>\n <thy-form-group [thyLabelText]=\"i18nTexts().linkText\">\n <input thyInput [placeholder]=\"i18nTexts().textPlaceholder\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().urlLabel\">\n <input name=\"url\" thyInput [placeholder]=\"i18nTexts().urlPlaceholder\" [pattern]=\"URLRegex\" type=\"text\" [(ngModel)]=\"url\" />\n </thy-form-group>\n <thy-form-group-footer thyAlign=\"right\">\n <div class=\"btn-pair\">\n <button thyStopPropagation thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"close()\">{{i18nTexts().cancel}}</button>\n <button thyStopPropagation thyButton=\"primary\" thySize=\"sm\" (thyFormSubmit)=\"apply(linkForm)\">{{i18nTexts().apply}}</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "directive", type: ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "ngmodule", type: ThyFormModule }, { kind: "directive", type: i2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i2.ThyFormGroup, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "component", type: i2.ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }] }); }
1578
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: LinkEditComponent, isStandalone: true, selector: "link-edit", inputs: { url: { classPropertyName: "url", publicName: "url", isSignal: false, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: false, isRequired: false, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { confirm: "confirm" }, ngImport: i0, template: "<form\n thyLayout=\"vertical\"\n thyStopPropagation\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig()\"\n name=\"linkForm\"\n class=\"p-5\"\n>\n <thy-form-group [thyLabelText]=\"i18nTexts().linkText\">\n <input thyInput [placeholder]=\"i18nTexts().textPlaceholder\" name=\"text\" [(ngModel)]=\"text\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().urlLabel\">\n <input name=\"url\" thyInput [placeholder]=\"i18nTexts().urlPlaceholder\" [pattern]=\"URLRegex\" type=\"text\" [(ngModel)]=\"url\" />\n </thy-form-group>\n <thy-form-group-footer thyAlign=\"right\">\n <div class=\"btn-pair\">\n <button thyStopPropagation thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"close()\">{{ i18nTexts().cancel }}</button>\n <button thyStopPropagation thyButton=\"primary\" thySize=\"sm\" (thyFormSubmit)=\"apply(linkForm)\">{{ i18nTexts().apply }}</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "directive", type: ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "ngmodule", type: ThyFormModule }, { kind: "directive", type: i2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i2.ThyFormGroup, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "component", type: i2.ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }] }); }
1147
1579
  }
1148
1580
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LinkEditComponent, decorators: [{
1149
1581
  type: Component,
@@ -1155,7 +1587,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1155
1587
  ThyButton,
1156
1588
  ThyFormSubmitDirective,
1157
1589
  ThyFormModule
1158
- ], template: "<form\n thyLayout=\"vertical\"\n thyStopPropagation\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig()\"\n name=\"linkForm\"\n class=\"p-5\"\n>\n <thy-form-group [thyLabelText]=\"i18nTexts().linkText\">\n <input thyInput [placeholder]=\"i18nTexts().textPlaceholder\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().urlLabel\">\n <input name=\"url\" thyInput [placeholder]=\"i18nTexts().urlPlaceholder\" [pattern]=\"URLRegex\" type=\"text\" [(ngModel)]=\"url\" />\n </thy-form-group>\n <thy-form-group-footer thyAlign=\"right\">\n <div class=\"btn-pair\">\n <button thyStopPropagation thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"close()\">{{i18nTexts().cancel}}</button>\n <button thyStopPropagation thyButton=\"primary\" thySize=\"sm\" (thyFormSubmit)=\"apply(linkForm)\">{{i18nTexts().apply}}</button>\n </div>\n </thy-form-group-footer>\n</form>\n" }]
1590
+ ], template: "<form\n thyLayout=\"vertical\"\n thyStopPropagation\n thyForm\n #linkForm=\"thyForm\"\n [thyFormValidatorConfig]=\"validatorConfig()\"\n name=\"linkForm\"\n class=\"p-5\"\n>\n <thy-form-group [thyLabelText]=\"i18nTexts().linkText\">\n <input thyInput [placeholder]=\"i18nTexts().textPlaceholder\" name=\"text\" [(ngModel)]=\"text\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().urlLabel\">\n <input name=\"url\" thyInput [placeholder]=\"i18nTexts().urlPlaceholder\" [pattern]=\"URLRegex\" type=\"text\" [(ngModel)]=\"url\" />\n </thy-form-group>\n <thy-form-group-footer thyAlign=\"right\">\n <div class=\"btn-pair\">\n <button thyStopPropagation thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"close()\">{{ i18nTexts().cancel }}</button>\n <button thyStopPropagation thyButton=\"primary\" thySize=\"sm\" (thyFormSubmit)=\"apply(linkForm)\">{{ i18nTexts().apply }}</button>\n </div>\n </thy-form-group-footer>\n</form>\n" }]
1159
1591
  }], ctorParameters: () => [{ type: i1$1.ThyPopoverRef }], propDecorators: { url: [{
1160
1592
  type: Input
1161
1593
  }], text: [{
@@ -1971,6 +2403,7 @@ const AI_TABLE_ROW_HEIGHT = 44; // 默认行高基准
1971
2403
  const AI_TABLE_CELL_ACTIVE_BORDER_WIDTH = 2; // 选中单元格的边框宽度
1972
2404
  const AI_TABLE_CELL_ATTACHMENT_ADD = 'AI_TABLE_CELL_ATTACHMENT_ADD'; // 附件cell中新增图标名称
1973
2405
  const AI_TABLE_CELL_ATTACHMENT_FILE = 'AI_TABLE_CELL_ATTACHMENT_FILE'; // 附件cell中文件
2406
+ const AI_TABLE_CELL_EDIT = 'AI_TABLE_CELL_EDIT'; // 附件cell中编辑图标名称
1974
2407
  const AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH = 30; // 字段列头文本的最小宽度
1975
2408
  const AI_TABLE_ROW_SELECT_CHECKBOX = 'AI_TABLE_ROW_SELECT_CHECKBOX'; // 行 checkbox
1976
2409
  const AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX = 'AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX'; // 表头 checkbox 标识
@@ -2069,6 +2502,7 @@ const Unchecked = `
2069
2502
  M15.7,3.3v11.4c0,0.5-0.5,1-1,1H3.3c-0.5,0-1-0.5-1-1V3.3c0-0.5,0.5-1,1-1h11.4C15.2,2.3,15.7,2.8,15.7,3.3z
2070
2503
  `;
2071
2504
  const ColumnTextFilledPath = `M7.268 8.674l-2.076-4.86-2.076 4.86h4.152zm0.513 1.2H2.603l-1.294 3.03L0 12.902L4.49 2.4H5.894l4.484 10.486-1.31 0.002-1.287-3.014zm2.86 1.111c0-1.423 1.246-2.193 4.21-2.49 0-0.89-0.235-1.72-1.362-1.72-0.772 0-1.484 0.356-2.017 0.711l-0.475-0.771c0.653-0.415 1.602-0.889 2.669-0.889 1.602 0 2.313 1.127 2.313 2.787v4.151h-0.948l-0.12-0.83h-0.06c-0.651 0.534-1.422 0.949-2.252 0.949-1.127 0-1.957-0.652-1.957-1.898zm4.113-1.778c-2.253 0.296-3.024 0.83-3.024 1.72 0 0.77 0.534 1.067 1.186 1.067 0.652 0 1.186-0.297 1.838-0.89V9.207z`;
2505
+ const ColumnRichTextFilledPath = `M14.5526,11.7084 C14.8845231,11.7084 15.1536,11.9774769 15.1536,12.3094 C15.1536,12.6413231 14.8845231,12.9104 14.5526,12.9104 L14.5526,12.9104 L11.7546,12.9104 C11.4226769,12.9104 11.1536,12.6413231 11.1536,12.3094 C11.1536,11.9774769 11.4226769,11.7084 11.7546,11.7084 L11.7546,11.7084 Z M5.894,2.4 L10.378,12.886 L9.068,12.888 L7.779,9.873 L2.603,9.873 L1.309,12.904 L2.84217094e-14,12.902 L4.49,2.4 L5.894,2.4 Z M5.191,3.814 L3.116,8.673 L7.267,8.673 L5.191,3.814 Z M14.5526,7.17723172 C14.8845231,7.17723172 15.1536,7.44630859 15.1536,7.77823172 C15.1536,8.11015486 14.8845231,8.37923172 14.5526,8.37923172 L14.5526,8.37923172 L10.7546,8.37923172 C10.4226769,8.37923172 10.1536,8.11015486 10.1536,7.77823172 C10.1536,7.44630859 10.4226769,7.17723172 10.7546,7.17723172 L10.7546,7.17723172 Z M14.5526,2.3094 C14.8845231,2.3094 15.1536,2.57847687 15.1536,2.9104 C15.1536,3.24232313 14.8845231,3.5114 14.5526,3.5114 L14.5526,3.5114 L9.7546,3.5114 C9.42267687,3.5114 9.1536,3.24232313 9.1536,2.9104 C9.1536,2.57847687 9.42267687,2.3094 9.7546,2.3094 L9.7546,2.3094 Z`;
2072
2506
  const ColumnSelectFilledPath = `M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-1.2A6.8 6.8 0 1 0 8 1.2a6.8 6.8 0 0 0 0 13.6zM5.666 7.207l1.8 1.845 3.482-3.554.857.84-4.34 4.43-2.658-2.723.86-.838z`;
2073
2507
  const ColumnMultipleFillPath = `M2 2.551L3.576.976l.848.848L2 4.25.576 2.824l.848-.848L2 2.55zm0 5.425L3.576 6.4l.848.849L2 9.673.576 8.249l.848-.849.576.576zm0 5.4L3.576 11.8l.848.849L2 15.073.576 13.649l.848-.849.576.576zM5.663 2.6a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0 11.8a.6.6 0 0 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663zm0-6.2a.6.6 0 1 1 0-1.2H15.4a.6.6 0 0 1 0 1.2H5.663z`;
2074
2508
  const ColumnCalendarFilledPath = `M10.9 3.2H5.1v1.6H3.9V3.2H1.2v3.2h13.6V3.2h-2.7v1.6h-1.2V3.2zM12.1 2H15a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h2.9V.4h1.2V2h5.8V.4h1.2V2zm2.7 5.6H1.2v7.2h13.6V7.6z`;
@@ -2083,6 +2517,7 @@ const StarFill = `M9.186 2.12l1.02 2.769c.073.292.365.437.656.437l2.915.146c1.16
2083
2517
  const WebOutlinedPath = `M1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8ZM6.04798 2.85646C4.19852 3.55874 2.82616 5.22986 2.55071 7.25H5.26373C5.31861 5.76009 5.53564 4.40148 5.87147 3.352C5.92605 3.18143 5.98481 3.0157 6.04798 2.85646ZM5.87147 12.648C5.53564 11.5985 5.31861 10.2399 5.26373 8.75H2.55071C2.82616 10.7701 4.19852 12.4413 6.04798 13.1435C5.98481 12.9843 5.92605 12.8186 5.87147 12.648ZM10.1285 12.648C10.0739 12.8186 10.0152 12.9843 9.95202 13.1435C11.8015 12.4413 13.1738 10.7701 13.4493 8.75H10.7363C10.6814 10.2399 10.4644 11.5985 10.1285 12.648ZM8.6999 12.1908C8.98163 11.3104 9.18095 10.1118 9.23518 8.75H6.76482C6.81905 10.1118 7.01837 11.3104 7.3001 12.1908C7.46768 12.7145 7.65131 13.0839 7.81962 13.3063C7.90746 13.4224 7.9686 13.4711 8 13.4906C8.0314 13.4711 8.09254 13.4224 8.18038 13.3063C8.34869 13.0839 8.53232 12.7145 8.6999 12.1908ZM7.3001 3.80916C7.01837 4.68959 6.81905 5.88818 6.76482 7.25H9.23518C9.18095 5.88818 8.98163 4.68959 8.6999 3.80916C8.53232 3.28548 8.34869 2.91612 8.18038 2.69367C8.09254 2.57756 8.0314 2.52893 8 2.50944C7.9686 2.52893 7.90746 2.57756 7.81962 2.69367C7.65131 2.91612 7.46768 3.28548 7.3001 3.80916ZM10.1285 3.352C10.4644 4.40148 10.6814 5.76009 10.7363 7.25H13.4493C13.1738 5.22986 11.8015 3.55874 9.95203 2.85646C10.0152 3.0157 10.0739 3.18143 10.1285 3.352Z`;
2084
2518
  const DepartmentOutlinedPath = `M3 5.5C3 3.567 4.567 2 6.5 2C8.433 2 10 3.567 10 5.5C10 6.49548 9.5844 7.3939 8.91724 8.0312C10.7204 8.86779 12.017 10.6115 12.2217 12.6767C12.2976 13.4424 11.6682 14 11 14H2C1.33185 14 0.702358 13.4424 0.778277 12.6767C0.983033 10.6115 2.27961 8.86779 4.08276 8.0312C3.4156 7.3939 3 6.49548 3 5.5ZM8.5 5.5C8.5 4.39543 7.60457 3.5 6.5 3.5C5.39543 3.5 4.5 4.39543 4.5 5.5C4.5 6.60457 5.39543 7.5 6.5 7.5C7.60457 7.5 8.5 6.60457 8.5 5.5ZM2.31585 12.5H10.6841C10.3303 10.5108 8.59114 9 6.5 9C4.40886 9 2.66975 10.5108 2.31585 12.5Z', 'M11 3C10.5858 3 10.25 3.33579 10.25 3.75C10.25 4.16421 10.5858 4.5 11 4.5C11.6904 4.5 12.25 5.05964 12.25 5.75C12.25 6.44036 11.6904 7 11 7C10.5858 7 10.25 7.33579 10.25 7.75C10.25 8.16421 10.5858 8.5 11 8.5C12.6569 8.5 14 9.84315 14 11.5C14 11.9142 14.3358 12.25 14.75 12.25C15.1642 12.25 15.5 11.9142 15.5 11.5C15.5 9.77473 14.5291 8.27622 13.1038 7.52106C13.507 7.0426 13.75 6.42467 13.75 5.75C13.75 4.23122 12.5188 3 11 3Z`;
2085
2519
  const AttachmentPath = `M9.1 6.5V10a3.1 3.1 0 0 1-6.2.006l-.047-4.979a.6.6 0 0 1 1.2-.011L4.1 10a1.9 1.9 0 0 0 3.8 0V4.48C7.9 2.9 6.5 1.6 4.75 1.6S1.6 2.9 1.6 4.48v5.728c0 2.413 1.97 4.371 4.4 4.371 2.43 0 4.4-1.958 4.4-4.37v-5.16a.6.6 0 0 1 1.2 0v5.16c0 3.077-2.508 5.57-5.6 5.57-3.092 0-5.6-2.493-5.6-5.57V4.48C.4 2.216 2.357.4 4.75.4S9.1 2.216 9.1 4.48V6.5z`;
2520
+ const EditPath = `M2,8.33918294 L10.7095952,0 L15,4.17020474 L6.53816398,13 L2,13 L2,8.33918294 Z M3.2,8.85157902 L3.2,11.8 L6.02608482,11.8 L13.3091776,4.20020516 L10.7033283,1.66736141 L3.2,8.85157902 Z M0,16 L0,14.8 L16,14.8 L16,16 L0,16 Z`;
2086
2521
 
2087
2522
  const DEFAULT_FONT_SIZE = 14;
2088
2523
  const DEFAULT_FONT_FAMILY = '-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Helvetica Neue,Noto Sans,Noto Sans CJK SC,Microsoft Yahei,Arial,Hiragino Sans GB,sans-serif';
@@ -2614,22 +3049,41 @@ const readFromClipboard = async () => {
2614
3049
  };
2615
3050
 
2616
3051
  function extractText(text) {
2617
- let plainText = text;
3052
+ if (!text)
3053
+ return '';
3054
+ // 如果文本包含HTML链接标签,提取链接文本
2618
3055
  if (text.includes('<a')) {
2619
3056
  const aTagMatch = text.match(/<a[^>]*>(.*?)<\/a>/i);
2620
- if (aTagMatch && aTagMatch[1] && aTagMatch[1].trim()) {
2621
- plainText = aTagMatch[1];
3057
+ if (aTagMatch?.[1]?.trim()) {
3058
+ return aTagMatch[1].trim();
2622
3059
  }
2623
3060
  }
2624
- return plainText;
3061
+ return text;
2625
3062
  }
2626
- function extractLinkHref(text) {
2627
- let href = null;
3063
+ function extractLinkUrl(text) {
3064
+ if (!text)
3065
+ return null;
3066
+ // 1. 从HTML链接标签中提取URL,比如 https://mail.qq.com
2628
3067
  const hrefMatch = text.match(/href="([^"]+)"/);
2629
- if (hrefMatch && hrefMatch[1] && hrefMatch[1].trim()) {
2630
- href = hrefMatch[1];
3068
+ if (hrefMatch?.[1]) {
3069
+ return hrefMatch[1];
3070
+ }
3071
+ // 2. 匹配完整的URL(带协议),比如 https://mail.qq.com
3072
+ const protocolAndDomainMatch = text.match(/^(?:\w+:)?\/\/(\S+)$/);
3073
+ if (protocolAndDomainMatch?.[0]) {
3074
+ return protocolAndDomainMatch[0];
3075
+ }
3076
+ // 3. 匹配localhost格式,比如 localhost:6100
3077
+ const localhostDomainMatch = text.match(/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/);
3078
+ if (localhostDomainMatch?.[0]) {
3079
+ return `http://${localhostDomainMatch[0]}`;
3080
+ }
3081
+ // 4. 匹配普通域名,比如 www.baidu.com
3082
+ const ordinaryDomainMatch = text.match(/^[^\s\.]+\.\S{2,}$/);
3083
+ if (ordinaryDomainMatch?.[0]) {
3084
+ return `http://${ordinaryDomainMatch[0]}`;
2631
3085
  }
2632
- return href;
3086
+ return null;
2633
3087
  }
2634
3088
 
2635
3089
  const zhIntlCollator = typeof Intl !== 'undefined' ? new Intl.Collator('zh-CN') : undefined;
@@ -2932,7 +3386,7 @@ function toLinkFieldValue(plainText, targetField, originData) {
2932
3386
  }
2933
3387
  }
2934
3388
  else {
2935
- const url = extractLinkHref(plainText);
3389
+ const url = extractLinkUrl(plainText);
2936
3390
  const text = extractText(plainText);
2937
3391
  if (url && text) {
2938
3392
  return {
@@ -3666,526 +4120,249 @@ const writeToAITable = async (aiTable, actions) => {
3666
4120
  try {
3667
4121
  actions.updateFieldValue({
3668
4122
  value,
3669
- path: [targetRecord._id, targetField._id]
3670
- });
3671
- isPasteSuccess = true;
3672
- }
3673
- catch (error) { }
3674
- }
3675
- });
3676
- });
3677
- return isPasteSuccess;
3678
- };
3679
-
3680
- const getVisibleRangeInfo = (coordinate, scrollState) => {
3681
- const { scrollTop, scrollLeft } = scrollState;
3682
- const { rowCount, columnCount, frozenColumnCount } = coordinate;
3683
- // 获取要渲染的垂直可见区域
3684
- const getVerticalRangeInfo = () => {
3685
- const startIndex = coordinate.getRowStartIndex(scrollTop);
3686
- const stopIndex = coordinate.getRowStopIndex(startIndex, scrollTop);
3687
- return {
3688
- rowStartIndex: Math.max(0, startIndex - 1),
3689
- rowStopIndex: Math.max(0, Math.min(rowCount - 1, stopIndex + 1))
3690
- };
3691
- };
3692
- // 获取要渲染的水平可见区域
3693
- const getHorizontalRangeInfo = () => {
3694
- const startIndex = coordinate.getColumnStartIndex(scrollLeft);
3695
- const stopIndex = coordinate.getColumnStopIndex(startIndex, scrollLeft);
3696
- return {
3697
- columnStartIndex: Math.max(frozenColumnCount - 1, startIndex),
3698
- columnStopIndex: Math.max(frozenColumnCount - 1, Math.min(columnCount - 1, stopIndex))
3699
- };
3700
- };
3701
- const { rowStartIndex, rowStopIndex } = getVerticalRangeInfo();
3702
- const { columnStartIndex, columnStopIndex } = getHorizontalRangeInfo();
3703
- return {
3704
- rowStartIndex,
3705
- rowStopIndex,
3706
- columnStartIndex,
3707
- columnStopIndex
3708
- };
3709
- };
3710
- const scrollMax = (aiTable, coordinate, visibleColumns) => {
3711
- const scrollMaxWidth = visibleColumns.reduce((pre, cur) => pre + getFieldOptionByField(aiTable, cur)?.width, AI_TABLE_ROW_HEAD_WIDTH);
3712
- const scrollMaxHeight = coordinate.getRowOffset(coordinate.rowCount - 1) + 32;
3713
- return { scrollMaxWidth, scrollMaxHeight };
3714
- };
3715
-
3716
- const getMousePosition = (aiTable, x, y, coordinate, fields, context, _targetName) => {
3717
- const { scrollTop, scrollLeft } = context.scrollState();
3718
- const { scrollMaxWidth, scrollMaxHeight } = scrollMax(aiTable, coordinate, fields);
3719
- const offsetTop = scrollTop + y;
3720
- const rowIndex = coordinate.getRowStartIndex(offsetTop);
3721
- const offsetLeft = isWithinFrozenColumnBoundary(x, coordinate.frozenColumnWidth) ? x : scrollLeft + x;
3722
- const columnIndex = coordinate.getColumnStartIndex(offsetLeft);
3723
- const areaType = offsetLeft <= scrollMaxWidth && offsetTop <= scrollMaxHeight ? AITableAreaType.grid : AITableAreaType.none;
3724
- const targetName = getTargetName(_targetName);
3725
- return {
3726
- areaType,
3727
- targetName, // As a simple operational identifier, with prefix name only
3728
- realTargetName: _targetName || AI_TABLE_BLANK, // Real name
3729
- rowIndex,
3730
- columnIndex,
3731
- offsetTop,
3732
- offsetLeft,
3733
- x,
3734
- y
3735
- };
3736
- };
3737
- const isWithinFrozenColumnBoundary = (x, frozenColumnWidth) => {
3738
- const max = AI_TABLE_ROW_HEAD_WIDTH + frozenColumnWidth;
3739
- const min = AI_TABLE_ROW_HEAD_WIDTH;
3740
- return x > min && x < max;
3741
- };
3742
- const getEditorSpace = (widthOrHeight) => {
3743
- return widthOrHeight + AI_TABLE_OFFSET * 2;
3744
- };
3745
- const getEditorBoxOffset = () => {
3746
- return -AI_TABLE_OFFSET;
3747
- };
3748
- const getCellEditorBorderSpace = () => {
3749
- return AI_TABLE_CELL_ACTIVE_BORDER_WIDTH * 2 - AI_TABLE_OFFSET * 2;
3750
- };
3751
- const getHoverEditorSpace = (widthOrHeight) => {
3752
- const borderSpace = getCellEditorBorderSpace();
3753
- return widthOrHeight - borderSpace;
3754
- };
3755
- const getHoverEditorBoxOffset = () => {
3756
- const borderSpace = getCellEditorBorderSpace();
3757
- return borderSpace / 2;
3758
- };
3759
-
3760
- const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, container) => {
3761
- const { targetName, mouseStyle } = getDetailByTargetName(realTargetName);
3762
- if (mouseStyle)
3763
- return setMouseStyle(mouseStyle, container);
3764
- if (areaType === AITableAreaType.none)
3765
- return setMouseStyle('default', container);
3766
- switch (targetName) {
3767
- case AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX:
3768
- case AI_TABLE_FIELD_HEAD_MORE:
3769
- case AI_TABLE_ROW_SELECT_CHECKBOX:
3770
- case AI_TABLE_ROW_ADD_BUTTON:
3771
- case AI_TABLE_FIELD_ADD_BUTTON: {
3772
- return setMouseStyle('pointer', container);
3773
- }
3774
- default:
3775
- return setMouseStyle('default', container);
3776
- }
3777
- };
3778
- const setMouseStyle = (mouseStyle, container) => {
3779
- container.style.cursor = mouseStyle;
3780
- };
3781
-
3782
- /**
3783
- * 在 Canvas 上测量文本的宽度和高度,以便在显示文本时能够动态调整布局或限制文本的显示区域
3784
- * @param defaults
3785
- * @returns
3786
- */
3787
- const TextMeasure = (defaults = {}) => {
3788
- const { fontFamily = DEFAULT_FONT_FAMILY, fontSize = DEFAULT_FONT_SIZE, fontWeight = DEFAULT_FONT_WEIGHT, fontStyle = DEFAULT_FONT_STYLE, lineHeight = DEFAULT_TEXT_LINE_HEIGHT, scale = DEFAULT_TEXT_SCALE } = defaults;
3789
- const o = {
3790
- fontFamily,
3791
- fontSize,
3792
- fontWeight,
3793
- fontStyle,
3794
- lineHeight,
3795
- scale
3796
- };
3797
- const canvas = document.createElement('canvas');
3798
- const context = canvas ? canvas.getContext('2d') : null;
3799
- const normalizeFontFamily = (fontFamily) => {
3800
- return fontFamily
3801
- .split(',')
3802
- .map((family) => {
3803
- family = family.trim();
3804
- const hasSpace = family.indexOf(' ') >= 0;
3805
- const hasQuotes = family.indexOf('"') >= 0 || family.indexOf("'") >= 0;
3806
- if (hasSpace && !hasQuotes) {
3807
- family = `"${family}"`;
3808
- }
3809
- return family;
3810
- })
3811
- .join(', ');
3812
- };
3813
- // 可以在运行时动态调整字体样式,从而影响后续的文本测量
3814
- const setFont = (options = {}) => {
3815
- for (const key in options) {
3816
- o[key] = options[key] ?? o[key];
3817
- }
3818
- if (context) {
3819
- context.font = `${o.fontWeight} ${o.fontSize * o.scale}px ${normalizeFontFamily(o.fontFamily)}`;
3820
- }
3821
- };
3822
- // 根据指定的最大宽度和行数来计算文本的显示方式。如果文本太长,它会自动换行或截断,并返回是否发生溢出的信息
3823
- const getWidthOfLongestText = (text, maxWidth, maxLineCount) => {
3824
- let width = 0;
3825
- let height = 0;
3826
- let lineCount = 0;
3827
- if (text == null) {
3828
- return { width, height, lastLineWidth: 0 };
3829
- }
3830
- const lines = text.split('\n');
3831
- for (let i = 0; i < lines.length; i++) {
3832
- const line = lines[i];
3833
- const lineWidth = context?.measureText(line).width ?? 0;
3834
- width = Math.max(width, lineWidth);
3835
- lineCount = maxWidth != null ? Math.ceil(lineWidth / maxWidth) || 1 : 1;
3836
- height += o.lineHeight * lineCount;
3837
- }
3838
- if (maxWidth == null || maxLineCount === 1 || (maxLineCount && lineCount <= maxLineCount)) {
3839
- return {
3840
- width: Math.ceil(width),
3841
- height: Math.ceil(height),
3842
- text,
3843
- isOverflow: Boolean(maxLineCount && lineCount > maxLineCount),
3844
- lastLineWidth: Math.ceil(width)
3845
- };
3846
- }
3847
- const arrText = text.split('');
3848
- let rowCount = 0; // 总行数
3849
- let textHeight = 0; // 文本最终占用的高度
3850
- let showText = ''; // 每行展示的文本
3851
- let totalText = '';
3852
- let isLimitRow = false;
3853
- const textLength = arrText.length;
3854
- for (let n = 0; n < textLength; n++) {
3855
- const singleText = arrText[n];
3856
- const composeText = showText + singleText;
3857
- // 如果没有超过 maxLineCount,就会继续换行
3858
- isLimitRow = maxLineCount ? rowCount === maxLineCount - 1 : false;
3859
- const measureText = isLimitRow ? composeText + '…' : composeText;
3860
- totalText += singleText;
3861
- const textWidth = context?.measureText(measureText).width ?? 0;
3862
- const isLineBreak = ['\n', '\r'].includes(singleText);
3863
- if (((maxWidth && textWidth > maxWidth) || isLineBreak) && (maxLineCount == null || rowCount < maxLineCount)) {
3864
- showText = isLineBreak ? '' : singleText;
3865
- textHeight += lineHeight;
3866
- rowCount++;
3867
- if (isLimitRow) {
3868
- if (n < textLength - 1) {
3869
- totalText = totalText.substring(0, totalText.length - 1) + '…';
3870
- }
3871
- break;
4123
+ path: [targetRecord._id, targetField._id]
4124
+ });
4125
+ isPasteSuccess = true;
3872
4126
  }
4127
+ catch (error) { }
3873
4128
  }
3874
- else {
3875
- showText = composeText;
3876
- }
3877
- }
4129
+ });
4130
+ });
4131
+ return isPasteSuccess;
4132
+ };
4133
+
4134
+ const getVisibleRangeInfo = (coordinate, scrollState) => {
4135
+ const { scrollTop, scrollLeft } = scrollState;
4136
+ const { rowCount, columnCount, frozenColumnCount } = coordinate;
4137
+ // 获取要渲染的垂直可见区域
4138
+ const getVerticalRangeInfo = () => {
4139
+ const startIndex = coordinate.getRowStartIndex(scrollTop);
4140
+ const stopIndex = coordinate.getRowStopIndex(startIndex, scrollTop);
3878
4141
  return {
3879
- width: Math.ceil(width),
3880
- height: Math.ceil(maxLineCount == null || rowCount < maxLineCount ? textHeight + lineHeight : textHeight),
3881
- text: totalText,
3882
- isOverflow: isLimitRow,
3883
- lastLineWidth: context?.measureText(showText).width ?? 0
4142
+ rowStartIndex: Math.max(0, startIndex - 1),
4143
+ rowStopIndex: Math.max(0, Math.min(rowCount - 1, stopIndex + 1))
3884
4144
  };
3885
4145
  };
3886
- // 测量给定文本的宽度和高度。
3887
- // 支持指定最大宽度 (maxWidth) 和最大行数 (maxLineCount),从而能够处理多行文本的自动换行和截断(例如在文本超过行数限制时添加省略号 "…")
3888
- const measureText = (text, maxWidth, maxLineCount) => {
3889
- return getWidthOfLongestText(castToString(text), maxWidth, maxLineCount);
4146
+ // 获取要渲染的水平可见区域
4147
+ const getHorizontalRangeInfo = () => {
4148
+ const startIndex = coordinate.getColumnStartIndex(scrollLeft);
4149
+ const stopIndex = coordinate.getColumnStopIndex(startIndex, scrollLeft);
4150
+ return {
4151
+ columnStartIndex: Math.max(frozenColumnCount - 1, startIndex),
4152
+ columnStopIndex: Math.max(frozenColumnCount - 1, Math.min(columnCount - 1, stopIndex))
4153
+ };
3890
4154
  };
3891
- // 可以将字体样式重置为初始默认配置
3892
- const reset = () => setFont(defaults);
3893
- setFont(o);
4155
+ const { rowStartIndex, rowStopIndex } = getVerticalRangeInfo();
4156
+ const { columnStartIndex, columnStopIndex } = getHorizontalRangeInfo();
3894
4157
  return {
3895
- context,
3896
- measureText,
3897
- setFont,
3898
- reset
4158
+ rowStartIndex,
4159
+ rowStopIndex,
4160
+ columnStartIndex,
4161
+ columnStopIndex
3899
4162
  };
3900
4163
  };
3901
-
3902
- const isCellMatchKeywords = (aiTable, field, recordId, keywords, references) => {
3903
- const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, field._id]);
3904
- const transformValue = transformCellValue(aiTable, field, cellValue);
3905
- const fieldMethod = FieldModelMap[field.type];
3906
- let cellFullText = fieldMethod.cellFullText(transformValue, field, references);
3907
- return keywords && cellFullText.length && cellFullText.some((text) => text.toLowerCase().includes(keywords.toLowerCase()));
4164
+ const scrollMax = (aiTable, coordinate, visibleColumns) => {
4165
+ const scrollMaxWidth = visibleColumns.reduce((pre, cur) => pre + getFieldOptionByField(aiTable, cur)?.width, AI_TABLE_ROW_HEAD_WIDTH);
4166
+ const scrollMaxHeight = coordinate.getRowOffset(coordinate.rowCount - 1) + 32;
4167
+ return { scrollMaxWidth, scrollMaxHeight };
3908
4168
  };
3909
4169
 
3910
- function updatePicture(node) {
3911
- const drawingNode = node.getLayer() || node.getStage();
3912
- if (drawingNode) {
3913
- drawingNode.batchDraw();
3914
- }
3915
- }
3916
-
3917
- // adapted FROM: https://github.com/lavrton/react-konva/blob/master/src/react-konva-fiber.js
3918
- function applyNodeProps(component, props = {}, oldProps = {}) {
3919
- if ('id' in props) {
3920
- const message = `You are using "id" attribute for Konva node. In some very rare cases it may produce bugs. Currently we recommend not to use it and use "name" attribute instead.`;
3921
- console.warn(message);
3922
- }
3923
- const instance = component.getNode();
3924
- const updatedProps = {};
3925
- let hasUpdates = false;
3926
- Object.keys(oldProps).forEach((key) => {
3927
- const isEvent = key.slice(0, 2) === 'ko';
3928
- const propChanged = oldProps[key] !== props[key];
3929
- if (isEvent && propChanged) {
3930
- let eventName = key.slice(2).toLowerCase();
3931
- if (eventName.slice(0, 7) === 'content') {
3932
- eventName = 'content' + eventName.slice(7, 8).toUpperCase() + eventName.slice(8);
3933
- }
3934
- instance.off(eventName, oldProps[key]);
3935
- }
3936
- const toRemove = !Object.hasOwn(props, key);
3937
- if (toRemove) {
3938
- instance.setAttr(key, undefined);
3939
- }
3940
- });
3941
- Object.keys(props).forEach((key) => {
3942
- const isEvent = key.slice(0, 2) === 'ko';
3943
- const toAdd = oldProps[key] !== props[key];
3944
- if (isEvent && toAdd) {
3945
- let eventName = key.slice(2).toLowerCase();
3946
- if (eventName.slice(0, 7) === 'content') {
3947
- eventName = 'content' + eventName.slice(7, 8).toUpperCase() + eventName.slice(8);
3948
- }
3949
- if (props[key]) {
3950
- instance.off(eventName);
3951
- instance.on(eventName, (event) => {
3952
- props[key]({
3953
- angularComponent: component,
3954
- event
3955
- });
3956
- });
3957
- }
3958
- }
3959
- if (!isEvent && (props[key] !== oldProps[key] || props[key] !== instance.getAttr(key))) {
3960
- hasUpdates = true;
3961
- updatedProps[key] = props[key];
3962
- }
3963
- });
3964
- if (hasUpdates) {
3965
- instance.setAttrs(updatedProps);
3966
- updatePicture(instance);
3967
- let val;
3968
- Object.keys(updatedProps).forEach((prop) => {
3969
- val = updatedProps[prop];
3970
- if (val instanceof Image && !val.complete) {
3971
- const node = instance;
3972
- val.addEventListener('load', function () {
3973
- const layer = node.getLayer();
3974
- if (layer) {
3975
- layer.batchDraw();
3976
- }
3977
- });
3978
- }
3979
- });
3980
- }
3981
- }
3982
-
3983
- function camelize(str) {
3984
- return str
3985
- .replace(/^\w|[A-Z]|\b\w/g, function (letter, index) {
3986
- return index == 0 ? letter.toLowerCase() : letter.toUpperCase();
3987
- })
3988
- .replace(/\s+/g, '');
3989
- }
3990
- function capitalizeFirstLetter(string) {
3991
- return string.charAt(0).toUpperCase() + string.slice(1);
3992
- }
3993
- function getName(componentTag) {
3994
- return capitalizeFirstLetter(camelize(componentTag.slice(3).replace('-', ' ')));
3995
- }
3996
- function createListener(instance) {
3997
- const output = {};
3998
- [
3999
- 'koMouseover',
4000
- 'koMousemove',
4001
- 'koMouseout',
4002
- 'koMouseenter',
4003
- 'koMouseleave',
4004
- 'koMousedown',
4005
- 'koMouseup',
4006
- 'koWheel',
4007
- 'koContextmenu',
4008
- 'koClick',
4009
- 'koDblclick',
4010
- 'koTouchstart',
4011
- 'koTouchmove',
4012
- 'koTouchend',
4013
- 'koTap',
4014
- 'koDbltap',
4015
- 'koDragstart',
4016
- 'koDragmove',
4017
- 'koDragend'
4018
- ].forEach((eventName) => {
4019
- const name = eventName;
4020
- const eventEmitter = instance[name];
4021
- if (eventEmitter.observed) {
4022
- output[eventName] = eventEmitter.emit.bind(eventEmitter);
4023
- }
4024
- });
4025
- return output;
4026
- }
4027
-
4028
- const KO_CONTAINER_TOKEN = new InjectionToken('KO_CONTAINER_TOKEN');
4029
-
4030
- class KoShape {
4031
- constructor() {
4032
- this.config = input();
4033
- this.koMouseover = new EventEmitter();
4034
- this.koMousemove = new EventEmitter();
4035
- this.koMouseout = new EventEmitter();
4036
- this.koMouseenter = new EventEmitter();
4037
- this.koMouseleave = new EventEmitter();
4038
- this.koMousedown = new EventEmitter();
4039
- this.koMouseup = new EventEmitter();
4040
- this.koWheel = new EventEmitter();
4041
- this.koContextmenu = new EventEmitter();
4042
- this.koClick = new EventEmitter();
4043
- this.koDblclick = new EventEmitter();
4044
- this.koTouchstart = new EventEmitter();
4045
- this.koTouchmove = new EventEmitter();
4046
- this.koTouchend = new EventEmitter();
4047
- this.koTap = new EventEmitter();
4048
- this.koDbltap = new EventEmitter();
4049
- this.koDragstart = new EventEmitter();
4050
- this.koDragmove = new EventEmitter();
4051
- this.koDragend = new EventEmitter();
4052
- this.elementRef = inject((ElementRef));
4053
- this.container = inject(KO_CONTAINER_TOKEN, { skipSelf: true });
4054
- this.cacheProps = {};
4055
- this.nameNode = getName(this.elementRef.nativeElement.localName);
4056
- effect(() => {
4057
- if (this.config()) {
4058
- this.updateNode(this.config());
4059
- }
4060
- });
4061
- }
4062
- getNode() {
4063
- return this._node;
4064
- }
4065
- ngOnInit() {
4066
- this.initKonva();
4170
+ const getMousePosition = (aiTable, x, y, coordinate, fields, context, _targetName) => {
4171
+ const { scrollTop, scrollLeft } = context.scrollState();
4172
+ const { scrollMaxWidth, scrollMaxHeight } = scrollMax(aiTable, coordinate, fields);
4173
+ const offsetTop = scrollTop + y;
4174
+ const rowIndex = coordinate.getRowStartIndex(offsetTop);
4175
+ const offsetLeft = isWithinFrozenColumnBoundary(x, coordinate.frozenColumnWidth) ? x : scrollLeft + x;
4176
+ const columnIndex = coordinate.getColumnStartIndex(offsetLeft);
4177
+ const areaType = offsetLeft <= scrollMaxWidth && offsetTop <= scrollMaxHeight ? AITableAreaType.grid : AITableAreaType.none;
4178
+ const targetName = getTargetName(_targetName);
4179
+ return {
4180
+ areaType,
4181
+ targetName, // As a simple operational identifier, with prefix name only
4182
+ realTargetName: _targetName || AI_TABLE_BLANK, // Real name
4183
+ rowIndex,
4184
+ columnIndex,
4185
+ offsetTop,
4186
+ offsetLeft,
4187
+ x,
4188
+ y
4189
+ };
4190
+ };
4191
+ const isWithinFrozenColumnBoundary = (x, frozenColumnWidth) => {
4192
+ const max = AI_TABLE_ROW_HEAD_WIDTH + frozenColumnWidth;
4193
+ const min = AI_TABLE_ROW_HEAD_WIDTH;
4194
+ return x > min && x < max;
4195
+ };
4196
+ const getEditorSpace = (widthOrHeight) => {
4197
+ return widthOrHeight + AI_TABLE_OFFSET * 2;
4198
+ };
4199
+ const getEditorBoxOffset = () => {
4200
+ return -AI_TABLE_OFFSET;
4201
+ };
4202
+ const getCellEditorBorderSpace = () => {
4203
+ return AI_TABLE_CELL_ACTIVE_BORDER_WIDTH * 2 - AI_TABLE_OFFSET * 2;
4204
+ };
4205
+ const getHoverEditorSpace = (widthOrHeight) => {
4206
+ const borderSpace = getCellEditorBorderSpace();
4207
+ return widthOrHeight - borderSpace;
4208
+ };
4209
+ const getHoverEditorBoxOffset = () => {
4210
+ const borderSpace = getCellEditorBorderSpace();
4211
+ return borderSpace / 2;
4212
+ };
4213
+
4214
+ const handleMouseStyle = (realTargetName, areaType = AITableAreaType.grid, container) => {
4215
+ const { targetName, mouseStyle } = getDetailByTargetName(realTargetName);
4216
+ if (mouseStyle)
4217
+ return setMouseStyle(mouseStyle, container);
4218
+ if (areaType === AITableAreaType.none)
4219
+ return setMouseStyle('default', container);
4220
+ switch (targetName) {
4221
+ case AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX:
4222
+ case AI_TABLE_FIELD_HEAD_MORE:
4223
+ case AI_TABLE_ROW_SELECT_CHECKBOX:
4224
+ case AI_TABLE_ROW_ADD_BUTTON:
4225
+ case AI_TABLE_FIELD_ADD_BUTTON: {
4226
+ return setMouseStyle('pointer', container);
4227
+ }
4228
+ case AI_TABLE_FIELD_HEAD_OPACITY_LINE: {
4229
+ return setMouseStyle('col-resize', container);
4230
+ }
4231
+ default:
4232
+ return setMouseStyle('default', container);
4067
4233
  }
4068
- initKonva() {
4069
- if (!this._node) {
4070
- this._node = new Shape();
4234
+ };
4235
+ const setMouseStyle = (mouseStyle, container) => {
4236
+ container.style.cursor = mouseStyle;
4237
+ };
4238
+
4239
+ /**
4240
+ * 在 Canvas 上测量文本的宽度和高度,以便在显示文本时能够动态调整布局或限制文本的显示区域
4241
+ * @param defaults
4242
+ * @returns
4243
+ */
4244
+ const TextMeasure = (defaults = {}) => {
4245
+ const { fontFamily = DEFAULT_FONT_FAMILY, fontSize = DEFAULT_FONT_SIZE, fontWeight = DEFAULT_FONT_WEIGHT, fontStyle = DEFAULT_FONT_STYLE, lineHeight = DEFAULT_TEXT_LINE_HEIGHT, scale = DEFAULT_TEXT_SCALE } = defaults;
4246
+ const o = {
4247
+ fontFamily,
4248
+ fontSize,
4249
+ fontWeight,
4250
+ fontStyle,
4251
+ lineHeight,
4252
+ scale
4253
+ };
4254
+ const canvas = document.createElement('canvas');
4255
+ const context = canvas ? canvas.getContext('2d') : null;
4256
+ const normalizeFontFamily = (fontFamily) => {
4257
+ return fontFamily
4258
+ .split(',')
4259
+ .map((family) => {
4260
+ family = family.trim();
4261
+ const hasSpace = family.indexOf(' ') >= 0;
4262
+ const hasQuotes = family.indexOf('"') >= 0 || family.indexOf("'") >= 0;
4263
+ if (hasSpace && !hasQuotes) {
4264
+ family = `"${family}"`;
4265
+ }
4266
+ return family;
4267
+ })
4268
+ .join(', ');
4269
+ };
4270
+ // 可以在运行时动态调整字体样式,从而影响后续的文本测量
4271
+ const setFont = (options = {}) => {
4272
+ for (const key in options) {
4273
+ o[key] = options[key] ?? o[key];
4071
4274
  }
4072
- if (this.nameNode === 'Shape') {
4073
- this._node = new Shape();
4275
+ if (context) {
4276
+ context.font = `${o.fontWeight} ${o.fontSize * o.scale}px ${normalizeFontFamily(o.fontFamily)}`;
4074
4277
  }
4075
- else if (this.nameNode === 'Sprite') {
4076
- this._node = new Sprite(this.config());
4278
+ };
4279
+ // 根据指定的最大宽度和行数来计算文本的显示方式。如果文本太长,它会自动换行或截断,并返回是否发生溢出的信息
4280
+ const getWidthOfLongestText = (text, maxWidth, maxLineCount) => {
4281
+ let width = 0;
4282
+ let height = 0;
4283
+ let lineCount = 0;
4284
+ if (text == null) {
4285
+ return { width, height, lastLineWidth: 0 };
4077
4286
  }
4078
- else {
4079
- this._node = new Konva[this.nameNode](undefined);
4287
+ const lines = text.split('\n');
4288
+ for (let i = 0; i < lines.length; i++) {
4289
+ const line = lines[i];
4290
+ const lineWidth = context?.measureText(line).width ?? 0;
4291
+ width = Math.max(width, lineWidth);
4292
+ lineCount = maxWidth != null ? Math.ceil(lineWidth / maxWidth) || 1 : 1;
4293
+ height += o.lineHeight * lineCount;
4080
4294
  }
4081
- const animationStage = this._node.to.bind(this._node);
4082
- this._node.to = (newConfig) => {
4083
- animationStage(newConfig);
4084
- setTimeout(() => {
4085
- Object.keys(this._node.attrs).forEach((key) => {
4086
- if (typeof this._node.attrs[key] !== 'function') {
4087
- this.config()[key] = this._node.attrs[key];
4295
+ if (maxWidth == null || maxLineCount === 1 || (maxLineCount && lineCount <= maxLineCount)) {
4296
+ return {
4297
+ width: Math.ceil(width),
4298
+ height: Math.ceil(height),
4299
+ text,
4300
+ isOverflow: Boolean(maxLineCount && lineCount > maxLineCount),
4301
+ lastLineWidth: Math.ceil(width)
4302
+ };
4303
+ }
4304
+ const arrText = text.split('');
4305
+ let rowCount = 0; // 总行数
4306
+ let textHeight = 0; // 文本最终占用的高度
4307
+ let showText = ''; // 每行展示的文本
4308
+ let totalText = '';
4309
+ let isLimitRow = false;
4310
+ const textLength = arrText.length;
4311
+ for (let n = 0; n < textLength; n++) {
4312
+ const singleText = arrText[n];
4313
+ const composeText = showText + singleText;
4314
+ // 如果没有超过 maxLineCount,就会继续换行
4315
+ isLimitRow = maxLineCount ? rowCount === maxLineCount - 1 : false;
4316
+ const measureText = isLimitRow ? composeText + '…' : composeText;
4317
+ totalText += singleText;
4318
+ const textWidth = context?.measureText(measureText).width ?? 0;
4319
+ const isLineBreak = ['\n', '\r'].includes(singleText);
4320
+ if (((maxWidth && textWidth > maxWidth) || isLineBreak) && (maxLineCount == null || rowCount < maxLineCount)) {
4321
+ showText = isLineBreak ? '' : singleText;
4322
+ textHeight += lineHeight;
4323
+ rowCount++;
4324
+ if (isLimitRow) {
4325
+ if (n < textLength - 1) {
4326
+ totalText = totalText.substring(0, totalText.length - 1) + '…';
4088
4327
  }
4089
- });
4090
- }, 200);
4091
- };
4092
- if (this.config()) {
4093
- this.updateNode(this.config());
4328
+ break;
4329
+ }
4330
+ }
4331
+ else {
4332
+ showText = composeText;
4333
+ }
4094
4334
  }
4095
- }
4096
- updateNode(config) {
4097
- if (!this._node)
4098
- return;
4099
- const props = {
4100
- ...config,
4101
- ...createListener(this)
4335
+ return {
4336
+ width: Math.ceil(width),
4337
+ height: Math.ceil(maxLineCount == null || rowCount < maxLineCount ? textHeight + lineHeight : textHeight),
4338
+ text: totalText,
4339
+ isOverflow: isLimitRow,
4340
+ lastLineWidth: context?.measureText(showText).width ?? 0
4102
4341
  };
4103
- applyNodeProps(this, props, this.cacheProps);
4104
- this.cacheProps = props;
4105
- }
4106
- ngAfterViewInit() {
4107
- const container = this.container.getNode();
4108
- container.add(this.getNode());
4109
- updatePicture(this.container.getNode());
4110
- }
4111
- ngOnDestroy() {
4112
- this._node?.destroy();
4113
- }
4114
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoShape, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4115
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: KoShape, isStandalone: true, selector: "ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koMouseover: "koMouseover", koMousemove: "koMousemove", koMouseout: "koMouseout", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", koMousedown: "koMousedown", koMouseup: "koMouseup", koWheel: "koWheel", koContextmenu: "koContextmenu", koClick: "koClick", koDblclick: "koDblclick", koTouchstart: "koTouchstart", koTouchmove: "koTouchmove", koTouchend: "koTouchend", koTap: "koTap", koDbltap: "koDbltap", koDragstart: "koDragstart", koDragmove: "koDragmove", koDragend: "koDragend" }, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4116
- }
4117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoShape, decorators: [{
4118
- type: Component,
4119
- args: [{
4120
- selector: 'ko-shape, ko-circle, ko-label, ko-rect, ko-ellipse, ko-wedge, ko-line, ko-sprite, ko-image, ko-text, ko-text-path, ko-star, ko-ring, ko-arc, ko-tag, ko-path, ko-regular-polygon, ko-arrow, ko-transformer',
4121
- standalone: true,
4122
- template: `<ng-content></ng-content>`,
4123
- changeDetection: ChangeDetectionStrategy.OnPush
4124
- }]
4125
- }], ctorParameters: () => [], propDecorators: { koMouseover: [{
4126
- type: Output
4127
- }], koMousemove: [{
4128
- type: Output
4129
- }], koMouseout: [{
4130
- type: Output
4131
- }], koMouseenter: [{
4132
- type: Output
4133
- }], koMouseleave: [{
4134
- type: Output
4135
- }], koMousedown: [{
4136
- type: Output
4137
- }], koMouseup: [{
4138
- type: Output
4139
- }], koWheel: [{
4140
- type: Output
4141
- }], koContextmenu: [{
4142
- type: Output
4143
- }], koClick: [{
4144
- type: Output
4145
- }], koDblclick: [{
4146
- type: Output
4147
- }], koTouchstart: [{
4148
- type: Output
4149
- }], koTouchmove: [{
4150
- type: Output
4151
- }], koTouchend: [{
4152
- type: Output
4153
- }], koTap: [{
4154
- type: Output
4155
- }], koDbltap: [{
4156
- type: Output
4157
- }], koDragstart: [{
4158
- type: Output
4159
- }], koDragmove: [{
4160
- type: Output
4161
- }], koDragend: [{
4162
- type: Output
4163
- }] } });
4164
-
4165
- class KoContainer extends KoShape {
4166
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoContainer, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4167
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: KoContainer, isStandalone: true, selector: "ko-layer, ko-fastlayer, ko-group", providers: [
4168
- {
4169
- provide: KO_CONTAINER_TOKEN,
4170
- useExisting: KoContainer
4171
- }
4172
- ], usesInheritance: true, ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4173
- }
4174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoContainer, decorators: [{
4175
- type: Component,
4176
- args: [{
4177
- selector: 'ko-layer, ko-fastlayer, ko-group',
4178
- standalone: true,
4179
- template: `<ng-content></ng-content>`,
4180
- providers: [
4181
- {
4182
- provide: KO_CONTAINER_TOKEN,
4183
- useExisting: KoContainer
4184
- }
4185
- ],
4186
- changeDetection: ChangeDetectionStrategy.OnPush
4187
- }]
4188
- }] });
4342
+ };
4343
+ // 测量给定文本的宽度和高度。
4344
+ // 支持指定最大宽度 (maxWidth) 和最大行数 (maxLineCount),从而能够处理多行文本的自动换行和截断(例如在文本超过行数限制时添加省略号 "…")
4345
+ const measureText = (text, maxWidth, maxLineCount) => {
4346
+ return getWidthOfLongestText(castToString(text), maxWidth, maxLineCount);
4347
+ };
4348
+ // 可以将字体样式重置为初始默认配置
4349
+ const reset = () => setFont(defaults);
4350
+ setFont(o);
4351
+ return {
4352
+ context,
4353
+ measureText,
4354
+ setFont,
4355
+ reset
4356
+ };
4357
+ };
4358
+
4359
+ const isCellMatchKeywords = (aiTable, field, recordId, keywords, references) => {
4360
+ const cellValue = AITableQueries.getFieldValue(aiTable, [recordId, field._id]);
4361
+ const transformValue = transformCellValue(aiTable, field, cellValue);
4362
+ const fieldMethod = FieldModelMap[field.type];
4363
+ let cellFullText = fieldMethod.cellFullText(transformValue, field, references);
4364
+ return keywords && cellFullText.length && cellFullText.some((text) => text.toLowerCase().includes(keywords.toLowerCase()));
4365
+ };
4189
4366
 
4190
4367
  class AITableText {
4191
4368
  constructor() {
@@ -5730,150 +5907,6 @@ function getFileThumbnailSvgString(ext) {
5730
5907
  return result;
5731
5908
  }
5732
5909
 
5733
- class KoStage {
5734
- constructor() {
5735
- this.config = input();
5736
- this.koMouseover = new EventEmitter();
5737
- this.koMousemove = new EventEmitter();
5738
- this.koMouseout = new EventEmitter();
5739
- this.koMouseenter = new EventEmitter();
5740
- this.koMouseleave = new EventEmitter();
5741
- this.koMousedown = new EventEmitter();
5742
- this.koMouseup = new EventEmitter();
5743
- this.koWheel = new EventEmitter();
5744
- this.koContextmenu = new EventEmitter();
5745
- this.koClick = new EventEmitter();
5746
- this.koDblclick = new EventEmitter();
5747
- this.koTouchstart = new EventEmitter();
5748
- this.koTouchmove = new EventEmitter();
5749
- this.koTouchend = new EventEmitter();
5750
- this.koTap = new EventEmitter();
5751
- this.koDbltap = new EventEmitter();
5752
- this.koDragstart = new EventEmitter();
5753
- this.koDragmove = new EventEmitter();
5754
- this.koDragend = new EventEmitter();
5755
- this.cacheProps = {};
5756
- this.nodeContainer = inject(ElementRef).nativeElement;
5757
- effect(() => {
5758
- if (this.config()) {
5759
- if (!this._stage) {
5760
- this.initStage();
5761
- }
5762
- this.updateNode(this.config());
5763
- }
5764
- });
5765
- }
5766
- ngOnInit() {
5767
- this.initStage();
5768
- }
5769
- getNode() {
5770
- return this._stage;
5771
- }
5772
- initStage() {
5773
- this._stage = new Stage({
5774
- ...this.config(),
5775
- container: this.nodeContainer
5776
- });
5777
- }
5778
- updateNode(config) {
5779
- const props = {
5780
- ...config,
5781
- ...createListener(this)
5782
- };
5783
- applyNodeProps(this, props, this.cacheProps);
5784
- this.cacheProps = props;
5785
- }
5786
- ngOnDestroy() {
5787
- this._stage?.destroy();
5788
- }
5789
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoStage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5790
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: KoStage, isStandalone: true, selector: "ko-stage", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { koMouseover: "koMouseover", koMousemove: "koMousemove", koMouseout: "koMouseout", koMouseenter: "koMouseenter", koMouseleave: "koMouseleave", koMousedown: "koMousedown", koMouseup: "koMouseup", koWheel: "koWheel", koContextmenu: "koContextmenu", koClick: "koClick", koDblclick: "koDblclick", koTouchstart: "koTouchstart", koTouchmove: "koTouchmove", koTouchend: "koTouchend", koTap: "koTap", koDbltap: "koDbltap", koDragstart: "koDragstart", koDragmove: "koDragmove", koDragend: "koDragend" }, providers: [
5791
- {
5792
- provide: KO_CONTAINER_TOKEN,
5793
- useExisting: KoStage
5794
- }
5795
- ], ngImport: i0, template: `<ng-content></ng-content>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
5796
- }
5797
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: KoStage, decorators: [{
5798
- type: Component,
5799
- args: [{
5800
- selector: 'ko-stage',
5801
- standalone: true,
5802
- template: `<ng-content></ng-content>`,
5803
- providers: [
5804
- {
5805
- provide: KO_CONTAINER_TOKEN,
5806
- useExisting: KoStage
5807
- }
5808
- ],
5809
- changeDetection: ChangeDetectionStrategy.OnPush
5810
- }]
5811
- }], ctorParameters: () => [], propDecorators: { koMouseover: [{
5812
- type: Output
5813
- }], koMousemove: [{
5814
- type: Output
5815
- }], koMouseout: [{
5816
- type: Output
5817
- }], koMouseenter: [{
5818
- type: Output
5819
- }], koMouseleave: [{
5820
- type: Output
5821
- }], koMousedown: [{
5822
- type: Output
5823
- }], koMouseup: [{
5824
- type: Output
5825
- }], koWheel: [{
5826
- type: Output
5827
- }], koContextmenu: [{
5828
- type: Output
5829
- }], koClick: [{
5830
- type: Output
5831
- }], koDblclick: [{
5832
- type: Output
5833
- }], koTouchstart: [{
5834
- type: Output
5835
- }], koTouchmove: [{
5836
- type: Output
5837
- }], koTouchend: [{
5838
- type: Output
5839
- }], koTap: [{
5840
- type: Output
5841
- }], koDbltap: [{
5842
- type: Output
5843
- }], koDragstart: [{
5844
- type: Output
5845
- }], koDragmove: [{
5846
- type: Output
5847
- }], koDragend: [{
5848
- type: Output
5849
- }] } });
5850
-
5851
- class KoComponent extends Component {
5852
- }
5853
-
5854
- const KoShapeTypes = {
5855
- Arc,
5856
- Arrow,
5857
- Circle,
5858
- Ellipse,
5859
- Image: Image$1,
5860
- Label,
5861
- Tag,
5862
- Line,
5863
- Path,
5864
- Rect,
5865
- RegularPolygon,
5866
- Ring,
5867
- Star,
5868
- Text,
5869
- TextPath,
5870
- Transformer,
5871
- Wedge,
5872
- Group,
5873
- Layer,
5874
- FastLayer
5875
- };
5876
-
5877
5910
  class AITableActionIcon {
5878
5911
  constructor() {
5879
5912
  this.onClick = output();
@@ -6092,12 +6125,95 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
6092
6125
  }]
6093
6126
  }] });
6094
6127
 
6128
+ class AITableCellRichtext {
6129
+ constructor() {
6130
+ this.config = input();
6131
+ this.textConfig = computed(() => {
6132
+ const render = this.config()?.render;
6133
+ if (render) {
6134
+ const { x, y, transformValue, field, columnWidth, rowHeight, style, zIndex } = render;
6135
+ let textRender = transformValue;
6136
+ if (textRender == null) {
6137
+ return;
6138
+ }
6139
+ textRender = textRender.replace(/\r|\n/g, ' ');
6140
+ const fontWeight = style?.fontWeight;
6141
+ const textMaxWidth = columnWidth - AI_TABLE_CELL_PADDING - AI_TABLE_ACTION_COMMON_RIGHT_PADDING - AI_TABLE_ACTION_COMMON_SIZE;
6142
+ const { text, textWidth } = drawer.textEllipsis({
6143
+ text: textRender,
6144
+ maxWidth: textMaxWidth,
6145
+ fontWeight
6146
+ });
6147
+ return {
6148
+ x,
6149
+ y,
6150
+ text,
6151
+ wrap: 'none',
6152
+ width: textWidth,
6153
+ fillStyle: Colors.primary,
6154
+ height: rowHeight + 2,
6155
+ lineHeight: 1.84,
6156
+ listening: false,
6157
+ ellipsis: true,
6158
+ zIndex
6159
+ };
6160
+ }
6161
+ return;
6162
+ });
6163
+ this.iconConfig = computed(() => {
6164
+ const { coordinate, render, field, recordId, readonly } = this.config();
6165
+ const offsetX = render.columnWidth - AI_TABLE_ACTION_COMMON_SIZE - AI_TABLE_ACTION_COMMON_RIGHT_PADDING;
6166
+ const offsetY = (coordinate.rowInitSize - AI_TABLE_ACTION_COMMON_SIZE) / 2;
6167
+ return {
6168
+ coordinate,
6169
+ readonly,
6170
+ name: generateTargetName({
6171
+ targetName: AI_TABLE_CELL,
6172
+ fieldId: field._id,
6173
+ recordId,
6174
+ source: AI_TABLE_CELL_EDIT,
6175
+ mouseStyle: readonly ? 'default' : 'pointer'
6176
+ }),
6177
+ x: offsetX,
6178
+ y: offsetY,
6179
+ data: EditPath,
6180
+ fill: Colors.gray600,
6181
+ hoverFill: Colors.primary,
6182
+ backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
6183
+ backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
6184
+ cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
6185
+ listening: true
6186
+ };
6187
+ });
6188
+ }
6189
+ static { this.fieldType = AITableFieldType.richText; }
6190
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableCellRichtext, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6191
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: AITableCellRichtext, isStandalone: true, selector: "ai-table-richtext", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
6192
+ <ai-table-text [config]="textConfig()!"></ai-table-text>
6193
+ <ai-table-action-icon [config]="iconConfig()"></ai-table-action-icon>
6194
+ `, isInline: true, dependencies: [{ kind: "component", type: AITableText, selector: "ai-table-text", inputs: ["config"], outputs: ["koClick", "koMouseMove"] }, { kind: "component", type: AITableActionIcon, selector: "ai-table-action-icon", inputs: ["config"], outputs: ["onClick", "onMousemove", "onMouseenter", "onMouseleave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
6195
+ }
6196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableCellRichtext, decorators: [{
6197
+ type: Component,
6198
+ args: [{
6199
+ selector: 'ai-table-richtext',
6200
+ template: `
6201
+ <ai-table-text [config]="textConfig()!"></ai-table-text>
6202
+ <ai-table-action-icon [config]="iconConfig()"></ai-table-action-icon>
6203
+ `,
6204
+ standalone: true,
6205
+ imports: [AITableText, AITableActionIcon],
6206
+ changeDetection: ChangeDetectionStrategy.OnPush
6207
+ }]
6208
+ }] });
6209
+
6095
6210
  // TODO: components下的cells组件考虑移出 components ,这些组件都属于
6096
6211
 
6097
6212
  var cellComponents = /*#__PURE__*/Object.freeze({
6098
6213
  __proto__: null,
6099
6214
  AITableCellAttachment: AITableCellAttachment,
6100
- AITableCellLink: AITableCellLink
6215
+ AITableCellLink: AITableCellLink,
6216
+ AITableCellRichtext: AITableCellRichtext
6101
6217
  });
6102
6218
 
6103
6219
  const componentMap = {};
@@ -6909,6 +7025,7 @@ class CellDrawer extends Drawer {
6909
7025
  const fieldType = field.type;
6910
7026
  switch (fieldType) {
6911
7027
  case AITableFieldType.text:
7028
+ case AITableFieldType.richText:
6912
7029
  case AITableFieldType.number:
6913
7030
  case AITableFieldType.link:
6914
7031
  return this.renderCellText(render, ctx);
@@ -6939,8 +7056,9 @@ class CellDrawer extends Drawer {
6939
7056
  if (renderText == null) {
6940
7057
  return;
6941
7058
  }
6942
- const isSingleLine = !columnWidth;
6943
- const isTextField = fieldType === AITableFieldType.text;
7059
+ // const isSingleLine = !columnWidth;
7060
+ const isSingleLine = true;
7061
+ const isTextField = fieldType === AITableFieldType.text || fieldType === AITableFieldType.richText;
6944
7062
  const isNumberField = fieldType === AITableFieldType.number;
6945
7063
  if (isTextField && isSingleLine) {
6946
7064
  renderText = renderText.replace(/\r|\n/g, ' ');
@@ -7887,6 +8005,9 @@ class AITableFieldIcon {
7887
8005
  case AITableFieldType.text:
7888
8006
  data = ColumnTextFilledPath;
7889
8007
  break;
8008
+ case AITableFieldType.richText:
8009
+ data = ColumnRichTextFilledPath;
8010
+ break;
7890
8011
  case AITableFieldType.select:
7891
8012
  data = field.settings?.is_multiple ? ColumnMultipleFillPath : ColumnSelectFilledPath;
7892
8013
  break;
@@ -8884,15 +9005,12 @@ class AITableDragComponent {
8884
9005
  initElements() {
8885
9006
  this.rect = this.elementRef.nativeElement.querySelector('.rect');
8886
9007
  this.auxiliaryLine = this.elementRef.nativeElement.querySelector('.auxiliary-line');
8887
- this.colResizeLine = this.elementRef.nativeElement.querySelector('.col-resize-line');
8888
9008
  }
8889
9009
  setupEventListeners() {
8890
9010
  this.mousedownListener = this.render2.listen('window', 'mousedown', (e) => {
8891
9011
  this.mouseStartPosition = { x: e.x, y: e.y };
8892
- e.preventDefault();
8893
9012
  });
8894
9013
  this.mousemoveListener = this.render2.listen('window', 'mousemove', (e) => {
8895
- e.preventDefault();
8896
9014
  if (this.timer) {
8897
9015
  cancelAnimationFrame(this.timer);
8898
9016
  }
@@ -8917,10 +9035,6 @@ class AITableDragComponent {
8917
9035
  if (drag.type === DragType.none || !this.rect || !this.auxiliaryLine) {
8918
9036
  return;
8919
9037
  }
8920
- if (drag.type === DragType.columnWidth) {
8921
- this.setDisplayStyle('block');
8922
- this.showColResize(drag);
8923
- }
8924
9038
  this.aiTableDrag = drag;
8925
9039
  }
8926
9040
  handleDrag(e, drag) {
@@ -8998,6 +9112,7 @@ class AITableDragComponent {
8998
9112
  }
8999
9113
  }
9000
9114
  movingColumnWidth(drag, moveX) {
9115
+ this.setCursorStyle('col-resize');
9001
9116
  const aiTable = this.aiTableGridSelectionService.aiTable;
9002
9117
  const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
9003
9118
  const sourceColumnIndex = visibleColumnIndexMap.get(drag.sourceIds.values().next().value) || 0;
@@ -9019,36 +9134,6 @@ class AITableDragComponent {
9019
9134
  width: Math.max(MIN_COLUMN_WIDTH, sourceColumnWidth + moveX)
9020
9135
  };
9021
9136
  }
9022
- showColResize(drag) {
9023
- const aiTable = this.aiTableGridSelectionService.aiTable;
9024
- const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
9025
- const sourceColumnIndex = visibleColumnIndexMap.get(drag.sourceIds.values().next().value) || 0;
9026
- const coordinate = drag.coordinate;
9027
- const sourceColumnStartX = coordinate.getColumnOffset(sourceColumnIndex);
9028
- const scroll = drag.scroll || { x: 0, y: 0 };
9029
- let targetColumnIndex = coordinate.getColumnStartIndex(sourceColumnStartX + scroll.x);
9030
- let targetColumnStartX = coordinate.getColumnOffset(targetColumnIndex);
9031
- const sourceColumnWidth = drag.coordinate.getColumnWidth(sourceColumnIndex);
9032
- const opacityLineWidth = 4;
9033
- // 重置样式
9034
- this.setRectStyles({ width: 0 });
9035
- this.resetAuxiliaryLine();
9036
- this.setDisplayStyle('block');
9037
- this.render2.setStyle(this.elementRef.nativeElement, 'cursor', 'col-resize');
9038
- // 隐藏列宽调整线,用于监听鼠标离开此区域后结束宽度调整
9039
- this.setColResizeLine({
9040
- opacity: 0,
9041
- height: '100%',
9042
- width: `${opacityLineWidth}px`,
9043
- left: `${targetColumnStartX + sourceColumnWidth - opacityLineWidth / 2}px`,
9044
- zIndex: 10
9045
- });
9046
- this.lineMouseLeaveListener = this.render2.listen(this.colResizeLine, 'mouseleave', () => {
9047
- this.setDisplayStyle('none');
9048
- this.lineMouseLeaveListener?.();
9049
- this.lineMouseLeaveListener = undefined;
9050
- });
9051
- }
9052
9137
  handleDragEnd() {
9053
9138
  this.setDisplayStyle('none');
9054
9139
  if (this.draggedData) {
@@ -9068,6 +9153,9 @@ class AITableDragComponent {
9068
9153
  setDisplayStyle(display) {
9069
9154
  this.render2.setStyle(this.elementRef.nativeElement, 'display', display);
9070
9155
  }
9156
+ setCursorStyle(cursor) {
9157
+ this.render2.setStyle(this.elementRef.nativeElement, 'cursor', cursor);
9158
+ }
9071
9159
  setRectStyles(styles) {
9072
9160
  Object.entries(styles).forEach(([prop, value]) => {
9073
9161
  this.render2.setStyle(this.rect, prop, value);
@@ -9078,11 +9166,6 @@ class AITableDragComponent {
9078
9166
  this.render2.setStyle(this.auxiliaryLine, prop, value);
9079
9167
  });
9080
9168
  }
9081
- setColResizeLine(styles) {
9082
- Object.entries(styles).forEach(([prop, value]) => {
9083
- this.render2.setStyle(this.colResizeLine, prop, value);
9084
- });
9085
- }
9086
9169
  resetAuxiliaryLine() {
9087
9170
  this.setAuxiliaryLineStyles({ width: 0 });
9088
9171
  }
@@ -9093,21 +9176,19 @@ class AITableDragComponent {
9093
9176
  this.mousemoveListener();
9094
9177
  if (this.mouseupListener)
9095
9178
  this.mouseupListener();
9096
- if (this.lineMouseLeaveListener)
9097
- this.lineMouseLeaveListener();
9098
9179
  if (this.timer) {
9099
9180
  cancelAnimationFrame(this.timer);
9100
9181
  this.timer = null;
9101
9182
  }
9102
9183
  }
9103
9184
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableDragComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9104
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AITableDragComponent, isStandalone: true, selector: "ai-table-drag", outputs: { dragEnd: "dragEnd" }, host: { classAttribute: "drag-container" }, ngImport: i0, template: "<div class=\"rect\"></div>\n<div class=\"auxiliary-line\"></div>\n<div class=\"col-resize-line\"></div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9185
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AITableDragComponent, isStandalone: true, selector: "ai-table-drag", outputs: { dragEnd: "dragEnd" }, host: { classAttribute: "drag-container" }, ngImport: i0, template: "<div class=\"rect\"></div>\n<div class=\"auxiliary-line\"></div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9105
9186
  }
9106
9187
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AITableDragComponent, decorators: [{
9107
9188
  type: Component,
9108
9189
  args: [{ selector: 'ai-table-drag', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
9109
9190
  class: 'drag-container'
9110
- }, template: "<div class=\"rect\"></div>\n<div class=\"auxiliary-line\"></div>\n<div class=\"col-resize-line\"></div>" }]
9191
+ }, template: "<div class=\"rect\"></div>\n<div class=\"auxiliary-line\"></div>" }]
9111
9192
  }], ctorParameters: () => [] });
9112
9193
 
9113
9194
  class AITableGrid extends AITableGridBase {
@@ -9305,18 +9386,6 @@ class AITableGrid extends AITableGridBase {
9305
9386
  }
9306
9387
  }
9307
9388
  }
9308
- const { targetName: _targetName, fieldId } = getDetailByTargetName(targetName);
9309
- if (_targetName === AI_TABLE_FIELD_HEAD_OPACITY_LINE && fieldId) {
9310
- this.aiTableGridSelectionService.drag({
9311
- type: DragType.columnWidth,
9312
- sourceIds: new Set([fieldId]),
9313
- scroll: this.getScrollPosition(),
9314
- coordinate: this.coordinate()
9315
- });
9316
- }
9317
- else if (this.aiTableGridSelectionService.getDragStateType() === DragType.columnWidth) {
9318
- this.aiTableGridSelectionService.clearDrag();
9319
- }
9320
9389
  });
9321
9390
  }
9322
9391
  stageMousedown(e) {
@@ -9337,6 +9406,17 @@ class AITableGrid extends AITableGridBase {
9337
9406
  this.aiTableGridSelectionService.selectField(fieldId);
9338
9407
  this.handleFieldDragStart();
9339
9408
  return;
9409
+ case AI_TABLE_FIELD_HEAD_OPACITY_LINE:
9410
+ mouseEvent.preventDefault();
9411
+ if (!fieldId)
9412
+ return;
9413
+ this.aiTableGridSelectionService.drag({
9414
+ type: DragType.columnWidth,
9415
+ sourceIds: new Set([fieldId]),
9416
+ scroll: this.getScrollPosition(),
9417
+ coordinate: this.coordinate()
9418
+ });
9419
+ return;
9340
9420
  case AI_TABLE_CELL:
9341
9421
  if (!recordId || !fieldId)
9342
9422
  return;
@@ -9706,5 +9786,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9706
9786
  * Generated bundle index. Do not edit.
9707
9787
  */
9708
9788
 
9709
- export { AITable, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableCheckType, AITableContextMenu, AITableDomGrid, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFieldType, AITableFilterOperation, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridSelectionService, AITableMemberType, AITableMouseDownType, AITableQueries, AITableRenderer, AITableRowColumnType, AITableRowType, AITableSelectAllState, AITableSelectOptionStyle, AITableStatType, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_Width, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AbstractEditCellEditor, AddOutlinedPath, AttachmentPath, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DepartmentOutlinedPath, Direction, DragType, FONT_SIZE_SM, FieldModelMap, GRID_CELL_EDITOR_MAP, IsSelectRecordPipe, LinkCellEditorComponent, MIN_COLUMN_WIDTH, MOUSEOVER_EDIT_TYPE, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, ProgressEditorComponent, RatingCellEditorComponent, RendererContext, RowHeight, SelectCellEditorComponent, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, buildClipboardData, buildGridData, buildGridLinearRows, castToString, compareNumber, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, extractLinkHref, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptions, getFieldValue, getHoverCell, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getPlaceHolderCellsConfigs, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isEmpty, isMac, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, stringInclude, textDataCache, transformCellValue, writeToAITable, writeToClipboard, zhIntlCollator };
9789
+ export { AITable, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableCheckType, AITableContextMenu, AITableDomGrid, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFieldType, AITableFilterOperation, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridSelectionService, AITableMemberType, AITableMouseDownType, AITableQueries, AITableRenderer, AITableRowColumnType, AITableRowType, AITableSelectAllState, AITableSelectOptionStyle, AITableStatType, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_BLANK, AI_TABLE_CELL, AI_TABLE_CELL_ACTIVE_BORDER_WIDTH, AI_TABLE_CELL_ADD_ITEM_BUTTON_SIZE, AI_TABLE_CELL_ATTACHMENT_ADD, AI_TABLE_CELL_ATTACHMENT_FILE, AI_TABLE_CELL_BORDER, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE, AI_TABLE_CELL_DELETE_ITEM_BUTTON_SIZE_OFFSET, AI_TABLE_CELL_EDIT, AI_TABLE_CELL_EMOJI_PADDING, AI_TABLE_CELL_EMOJI_SIZE, AI_TABLE_CELL_FIELD_ITEM_HEIGHT, AI_TABLE_CELL_MAX_ROW_COUNT, AI_TABLE_CELL_MEMBER_ITEM_HEIGHT, AI_TABLE_CELL_MEMBER_ITEM_PADDING, AI_TABLE_CELL_MEMBER_MAX_HEIGHT, AI_TABLE_CELL_MULTI_DOT_RADIUS, AI_TABLE_CELL_MULTI_ITEM_MARGIN_LEFT, AI_TABLE_CELL_MULTI_ITEM_MARGIN_TOP, AI_TABLE_CELL_MULTI_ITEM_MIN_WIDTH, AI_TABLE_CELL_MULTI_PADDING_LEFT, AI_TABLE_CELL_MULTI_PADDING_TOP, AI_TABLE_CELL_PADDING, AI_TABLE_COMMON_FONT_SIZE, AI_TABLE_DEFAULT_COLUMN_WIDTH, AI_TABLE_DOT_RADIUS, AI_TABLE_FIELD_ADD_BUTTON, AI_TABLE_FIELD_ADD_BUTTON_WIDTH, AI_TABLE_FIELD_HEAD, AI_TABLE_FIELD_HEAD_HEIGHT, AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE, AI_TABLE_FIELD_HEAD_MORE, AI_TABLE_FIELD_HEAD_OPACITY_LINE, AI_TABLE_FIELD_HEAD_SELECT_CHECKBOX, AI_TABLE_FIELD_HEAD_TEXT_MIN_WIDTH, AI_TABLE_FIELD_ITEM_MARGIN_RIGHT, AI_TABLE_FIELD_MAX_WIDTH, AI_TABLE_FIELD_MIDDLE_WIDTH, AI_TABLE_FIELD_MINI_WIDTH, AI_TABLE_FIELD_MIN_WIDTH, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_MEMBER_AVATAR_SIZE, AI_TABLE_MEMBER_ITEM_AVATAR_MARGIN_RIGHT, AI_TABLE_MEMBER_ITEM_PADDING_RIGHT, AI_TABLE_MIN_TEXT_WIDTH, AI_TABLE_OFFSET, AI_TABLE_OPTION_ITEM_FONT_SIZE, AI_TABLE_OPTION_ITEM_HEIGHT, AI_TABLE_OPTION_ITEM_PADDING, AI_TABLE_OPTION_ITEM_RADIUS, AI_TABLE_PIECE_RADIUS, AI_TABLE_PIECE_WIDTH, AI_TABLE_POPOVER_LEFT_OFFSET, AI_TABLE_PREVENT_CLEAR_SELECTION_CLASS, AI_TABLE_PROGRESS_BAR_HEIGHT, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_Width, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AbstractEditCellEditor, AddOutlinedPath, AttachmentPath, Check, Colors, ColumnCalendarFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, DBL_CLICK_EDIT_TYPE, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_FONT_STYLE, DEFAULT_FONT_WEIGHT, DEFAULT_ICON_SHAPE, DEFAULT_ICON_SIZE, DEFAULT_POINT_POSITION, DEFAULT_SCROLL_STATE, DEFAULT_TEXT_ALIGN_CENTER, DEFAULT_TEXT_ALIGN_LEFT, DEFAULT_TEXT_ALIGN_RIGHT, DEFAULT_TEXT_DECORATION, DEFAULT_TEXT_ELLIPSIS, DEFAULT_TEXT_FILL, DEFAULT_TEXT_LINE_HEIGHT, DEFAULT_TEXT_LISTENING, DEFAULT_TEXT_MAX_CACHE, DEFAULT_TEXT_MAX_HEIGHT, DEFAULT_TEXT_SCALE, DEFAULT_TEXT_TRANSFORMS_ENABLED, DEFAULT_TEXT_VERTICAL_ALIGN_MIDDLE, DEFAULT_TEXT_VERTICAL_ALIGN_TOP, DEFAULT_TEXT_WRAP, DEFAULT_WRAP_TEXT_MAX_ROW, DateCellEditorComponent, DepartmentOutlinedPath, Direction, DragType, EditPath, FONT_SIZE_SM, FieldModelMap, GRID_CELL_EDITOR_MAP, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, MIN_COLUMN_WIDTH, MOUSEOVER_EDIT_TYPE, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, ProgressEditorComponent, RatingCellEditorComponent, RendererContext, RowHeight, SelectCellEditorComponent, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, compareNumber, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptions, getFieldValue, getHoverCell, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getPlaceHolderCellsConfigs, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isEmpty, isMac, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, stringInclude, textDataCache, transformCellValue, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
9710
9790
  //# sourceMappingURL=ai-table-grid.mjs.map