@ai-table/grid 0.1.18 → 0.1.20
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.
- package/components/field-setting/field-setting.component.d.ts.map +1 -1
- package/core/context.d.ts +1 -0
- package/core/context.d.ts.map +1 -1
- package/fesm2022/ai-table-grid.mjs +52 -21
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid-base.component.d.ts +2 -1
- package/grid-base.component.d.ts.map +1 -1
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/components/action-icon.component.d.ts +7 -1
- package/renderer/components/action-icon.component.d.ts.map +1 -1
- package/renderer/components/cells/progress.component.d.ts +7 -7
- package/renderer/components/cells/progress.component.d.ts.map +1 -1
- package/renderer/components/cells/rate.component.d.ts +4 -4
- package/renderer/components/cells/rate.component.d.ts.map +1 -1
- package/types/grid.d.ts +2 -1
- package/types/grid.d.ts.map +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"field-setting.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/field-setting/field-setting.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,MAAM,EACN,WAAW,EAQd,MAAM,eAAe,CAAC;AAgBvB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,
|
1
|
+
{"version":3,"file":"field-setting.component.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/components/field-setting/field-setting.component.ts"],"names":[],"mappings":"AACA,OAAO,EAGH,MAAM,EACN,WAAW,EAQd,MAAM,eAAe,CAAC;AAgBvB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAEhB,iBAAiB,EAEpB,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,OAAO,EAAkE,MAAM,YAAY,CAAC;;AAGrG,qBAqCa,mBAAoB,YAAW,MAAM;IAC9C,WAAW,oDAAkC;IAE7C,QAAQ,CAAC,OAAO,+CAA6B;IAE7C,QAAQ,CAAC,kBAAkB,+DAAwC;IAEnE,QAAQ,CAAC,YAAY,qEAA8B;IAEnD,QAAQ,CAAC,QAAQ,qEAAmE;IAEpF,QAAQ,CAAC,QAAQ,yDAA0B;IAE3C,QAAQ,CAAC,QAAQ;sBAA0B,eAAe;sBAAgB,OAAO;OAAM;IAEvF,QAAQ,CAAC,mBAAmB,qDAEzB;IAEH,cAAc,SAAM;IAEpB,QAAQ,CAAC,eAAe;;;;;;;OASrB;IAEH,QAAQ,CAAC,YAAY;cACX,kBAAkB,EAAE;kBAChB,kBAAkB,EAAE;OAO/B;IAEH,gBAAgB,0BAAoB;IAEpC,gBAAgB,UAAS;IAEzB,OAAO,CAAC,iBAAiB,CAAiB;IAE1C,OAAO,CAAC,eAAe,CAAC,CAA4B;IAEpD,SAAS,CAAC,aAAa,+BAA8C;IAErE,QAAQ,IAAI,IAAI;IAOhB,eAAe,GAAI,WAAW,MAAM,wCAOlC;IAEF,eAAe,CAAC,KAAK,EAAE,kBAAkB;IA8BzC,iBAAiB;IAejB,oBAAoB;IAUpB,cAAc,CAAC,CAAC,EAAE,KAAK;IAKvB,UAAU,CAAC,KAAK,EAAE,KAAK;IAIvB,MAAM;IAIN,SAAS;;;;;;;;;OAWN;yCApJM,mBAAmB;2CAAnB,mBAAmB;CAqJ/B"}
|
package/core/context.d.ts
CHANGED
@@ -14,6 +14,7 @@ export declare class RendererContext {
|
|
14
14
|
scrollAction: (options: ScrollActionOptions) => void;
|
15
15
|
maxFields: Signal<number | undefined>;
|
16
16
|
maxRecords: Signal<number | undefined>;
|
17
|
+
maxSelectOptions: Signal<number | undefined>;
|
17
18
|
fieldOptions: Signal<AITableFieldOption[]>;
|
18
19
|
fieldOptionMap: Signal<Map<string, AITableFieldOption>>;
|
19
20
|
readonly?: Signal<boolean>;
|
package/core/context.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
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,cAAc,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;gBAEf,OAAO,EAAE,cAAc;IAqCnC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC;IAaxD,cAAc,CAAC,WAAW,EAAE,OAAO,CAAC,kBAAkB,CAAC;CAG1D"}
|
@@ -29,7 +29,7 @@ import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, is
|
|
29
29
|
import ObjectID from 'bson-objectid';
|
30
30
|
import { customAlphabet } from 'nanoid';
|
31
31
|
import * as _ from 'lodash';
|
32
|
-
import { isNumber, includes, values, isString, isObject } from 'lodash';
|
32
|
+
import ___default, { isNumber, includes, values, isString, isObject } from 'lodash';
|
33
33
|
import * as i1 from '@angular/forms';
|
34
34
|
import { FormsModule } from '@angular/forms';
|
35
35
|
import { ThyDatePicker, ThyDatePickerFormatPipe } from 'ngx-tethys/date-picker';
|
@@ -1330,7 +1330,7 @@ const AITableQueries = {
|
|
1330
1330
|
|
1331
1331
|
class RendererContext {
|
1332
1332
|
constructor(options) {
|
1333
|
-
const { rowHeadWidth, linearRows, pointPosition, scrollState, visibleColumnsIndexMap, visibleRowsIndexMap, frozenColumnCount, references, aiFieldConfig, scrollAction, maxFields, maxRecords, fieldOptions, fieldOptionMap, readonly } = options;
|
1333
|
+
const { rowHeadWidth, linearRows, pointPosition, scrollState, visibleColumnsIndexMap, visibleRowsIndexMap, frozenColumnCount, references, aiFieldConfig, scrollAction, maxFields, maxRecords, maxSelectOptions, fieldOptions, fieldOptionMap, readonly } = options;
|
1334
1334
|
this.rowHeadWidth = rowHeadWidth;
|
1335
1335
|
this.linearRows = linearRows;
|
1336
1336
|
this.pointPosition = pointPosition;
|
@@ -1343,6 +1343,7 @@ class RendererContext {
|
|
1343
1343
|
this.aiFieldConfig = aiFieldConfig;
|
1344
1344
|
this.maxFields = maxFields;
|
1345
1345
|
this.maxRecords = maxRecords;
|
1346
|
+
this.maxSelectOptions = maxSelectOptions;
|
1346
1347
|
this.fieldOptions = fieldOptions;
|
1347
1348
|
this.fieldOptionMap = fieldOptionMap;
|
1348
1349
|
this.readonly = readonly;
|
@@ -5080,8 +5081,19 @@ class AITableActionIcon {
|
|
5080
5081
|
source
|
5081
5082
|
};
|
5082
5083
|
});
|
5084
|
+
this.iconGroupConfig = computed(() => {
|
5085
|
+
let { backgroundWidth, backgroundHeight, size = DEFAULT_ICON_SIZE, scaleX, scaleY, offsetX, offsetY } = this.config();
|
5086
|
+
return {
|
5087
|
+
x: backgroundWidth && (backgroundWidth - size * (scaleX || 1)) / 2,
|
5088
|
+
y: backgroundHeight && (backgroundHeight - size * (scaleY || 1)) / 2,
|
5089
|
+
offsetX,
|
5090
|
+
offsetY,
|
5091
|
+
scaleX: scaleX || size / DEFAULT_ICON_SIZE,
|
5092
|
+
scaleY: scaleY || size / DEFAULT_ICON_SIZE
|
5093
|
+
};
|
5094
|
+
});
|
5083
5095
|
this.iconConfig = computed(() => {
|
5084
|
-
let { type, data,
|
5096
|
+
let { type, data, size = DEFAULT_ICON_SIZE, stroke, strokeWidth = 1, scaleX, scaleY, offsetX, offsetY, rotation, fill, hoverFill: hoverFill, transformsEnabled = 'position' } = this.config();
|
5085
5097
|
fill = fill || Colors.gray600;
|
5086
5098
|
let pathData = data;
|
5087
5099
|
switch (type) {
|
@@ -5093,8 +5105,6 @@ class AITableActionIcon {
|
|
5093
5105
|
break;
|
5094
5106
|
}
|
5095
5107
|
return {
|
5096
|
-
x: backgroundWidth && (backgroundWidth - size * (scaleX || 1)) / 2,
|
5097
|
-
y: backgroundHeight && (backgroundHeight - size * (scaleY || 1)) / 2,
|
5098
5108
|
data: pathData,
|
5099
5109
|
width: size,
|
5100
5110
|
height: size,
|
@@ -5140,7 +5150,9 @@ class AITableActionIcon {
|
|
5140
5150
|
(koMouseleave)="koMouseleave($event)"
|
5141
5151
|
>
|
5142
5152
|
<ko-rect [config]="squareShapeConfig()"></ko-rect>
|
5143
|
-
<ko-
|
5153
|
+
<ko-group [config]="iconGroupConfig()">
|
5154
|
+
<ko-path [config]="iconConfig()"></ko-path>
|
5155
|
+
</ko-group>
|
5144
5156
|
</ko-group>
|
5145
5157
|
`, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: KoShape, 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"], outputs: ["koMouseover", "koMousemove", "koMouseout", "koMouseenter", "koMouseleave", "koMousedown", "koMouseup", "koWheel", "koContextmenu", "koClick", "koDblclick", "koTouchstart", "koTouchmove", "koTouchend", "koTap", "koDbltap", "koDragstart", "koDragmove", "koDragend"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
5146
5158
|
}
|
@@ -5157,7 +5169,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
5157
5169
|
(koMouseleave)="koMouseleave($event)"
|
5158
5170
|
>
|
5159
5171
|
<ko-rect [config]="squareShapeConfig()"></ko-rect>
|
5160
|
-
<ko-
|
5172
|
+
<ko-group [config]="iconGroupConfig()">
|
5173
|
+
<ko-path [config]="iconConfig()"></ko-path>
|
5174
|
+
</ko-group>
|
5161
5175
|
</ko-group>
|
5162
5176
|
`,
|
5163
5177
|
imports: [KoContainer, KoShape],
|
@@ -8359,14 +8373,17 @@ class AITableCellRate extends CoverCellComponent {
|
|
8359
8373
|
const pointPosition = aiTable.context.pointPosition();
|
8360
8374
|
const { x, y } = render;
|
8361
8375
|
const { columnIndex } = pointPosition;
|
8362
|
-
const
|
8376
|
+
const hasSelectedArea = aiTable.selection().selectedCells.size > 0 ||
|
8377
|
+
aiTable.selection().selectedRecords.size > 0 ||
|
8378
|
+
aiTable.selection().selectedFields.size > 0;
|
8379
|
+
const bgColor = hasSelectedArea ? null : Colors.white;
|
8363
8380
|
return {
|
8364
8381
|
x: x - AI_TABLE_CELL_PADDING + AI_TABLE_CELL_BORDER,
|
8365
8382
|
y: y + AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET,
|
8366
8383
|
width: coordinate.getColumnWidth(columnIndex) - (AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET) * 2,
|
8367
8384
|
height: AI_TABLE_ROW_BLANK_HEIGHT - (AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET),
|
8368
|
-
fill:
|
8369
|
-
stroke:
|
8385
|
+
fill: bgColor,
|
8386
|
+
stroke: bgColor,
|
8370
8387
|
zIndex: 0,
|
8371
8388
|
name: generateTargetName({
|
8372
8389
|
targetName: AI_TABLE_CELL,
|
@@ -8525,14 +8542,17 @@ class AITableCellProgress extends CoverCellComponent {
|
|
8525
8542
|
const pointPosition = aiTable.context.pointPosition();
|
8526
8543
|
const { x, y } = render;
|
8527
8544
|
const { columnIndex } = pointPosition;
|
8528
|
-
const
|
8545
|
+
const hasSelectedArea = aiTable.selection().selectedCells.size > 0 ||
|
8546
|
+
aiTable.selection().selectedRecords.size > 0 ||
|
8547
|
+
aiTable.selection().selectedFields.size > 0;
|
8548
|
+
const bgColor = hasSelectedArea ? null : Colors.white;
|
8529
8549
|
return {
|
8530
8550
|
x: x - AI_TABLE_CELL_PADDING + AI_TABLE_CELL_BORDER / 2,
|
8531
8551
|
y: y + AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET,
|
8532
8552
|
width: coordinate.getColumnWidth(columnIndex) - (AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET) * 2 + AI_TABLE_CELL_BORDER / 2,
|
8533
8553
|
height: AI_TABLE_ROW_BLANK_HEIGHT - (AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET),
|
8534
|
-
fill:
|
8535
|
-
stroke:
|
8554
|
+
fill: bgColor,
|
8555
|
+
stroke: bgColor,
|
8536
8556
|
name: generateTargetName({
|
8537
8557
|
targetName: AI_TABLE_CELL,
|
8538
8558
|
fieldId: field._id,
|
@@ -8928,11 +8948,20 @@ class AITableFieldSetting {
|
|
8928
8948
|
const fieldsSizeMap = this.aiTable().gridData().fieldsSizeMap;
|
8929
8949
|
this.aiEditField.update((item) => {
|
8930
8950
|
const width = fieldsSizeMap[item._id] ?? field.width;
|
8931
|
-
const name = this.isManualInputName() ? item.name : createDefaultFieldName(this.aiTable(), field);
|
8951
|
+
const name = this.isManualInputName() || this.isUpdate() ? item.name : createDefaultFieldName(this.aiTable(), field);
|
8932
8952
|
let settings = field.settings || {};
|
8933
8953
|
if (this.isUpdate() && field.type === AITableFieldType.select) {
|
8934
8954
|
const { options, optionStyle } = getOptionsByFieldAndRecords(this.aiTable(), this.aiEditField(), this.aiReferences());
|
8935
|
-
|
8955
|
+
const maxCount = this.aiTable().context?.maxSelectOptions();
|
8956
|
+
let selectOptions = options;
|
8957
|
+
if (!isUndefinedOrNull(maxCount) && options.length > maxCount) {
|
8958
|
+
selectOptions = options.slice(0, maxCount);
|
8959
|
+
}
|
8960
|
+
settings = {
|
8961
|
+
...settings,
|
8962
|
+
options: selectOptions,
|
8963
|
+
option_style: optionStyle
|
8964
|
+
};
|
8936
8965
|
}
|
8937
8966
|
return { ...item, ...field, width, name, settings };
|
8938
8967
|
});
|
@@ -9519,6 +9548,7 @@ class AITableGridBase {
|
|
9519
9548
|
this.aiPlugins = input();
|
9520
9549
|
this.aiMaxFields = input();
|
9521
9550
|
this.aiMaxRecords = input();
|
9551
|
+
this.aiMaxSelectOptions = input();
|
9522
9552
|
this.aiReferences = input.required();
|
9523
9553
|
this.aiBuildRenderDataFn = input();
|
9524
9554
|
this.aiGetI18nTextByKey = input();
|
@@ -9641,7 +9671,7 @@ class AITableGridBase {
|
|
9641
9671
|
}
|
9642
9672
|
}
|
9643
9673
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
9644
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: AITableGridBase, isStandalone: true, selector: "ai-table-grid-base", inputs: { aiRecords: { classPropertyName: "aiRecords", publicName: "aiRecords", isSignal: true, isRequired: true, transformFunction: null }, aiFields: { classPropertyName: "aiFields", publicName: "aiFields", isSignal: true, isRequired: true, transformFunction: null }, aiFieldsSizeMap: { classPropertyName: "aiFieldsSizeMap", publicName: "aiFieldsSizeMap", isSignal: true, isRequired: true, transformFunction: null }, aiContextMenuItems: { classPropertyName: "aiContextMenuItems", publicName: "aiContextMenuItems", isSignal: true, isRequired: false, transformFunction: null }, aiFieldConfig: { classPropertyName: "aiFieldConfig", publicName: "aiFieldConfig", isSignal: true, isRequired: false, transformFunction: null }, aiReadonly: { classPropertyName: "aiReadonly", publicName: "aiReadonly", isSignal: true, isRequired: false, transformFunction: null }, aiPlugins: { classPropertyName: "aiPlugins", publicName: "aiPlugins", isSignal: true, isRequired: false, transformFunction: null }, aiMaxFields: { classPropertyName: "aiMaxFields", publicName: "aiMaxFields", isSignal: true, isRequired: false, transformFunction: null }, aiMaxRecords: { classPropertyName: "aiMaxRecords", publicName: "aiMaxRecords", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: true, transformFunction: null }, aiBuildRenderDataFn: { classPropertyName: "aiBuildRenderDataFn", publicName: "aiBuildRenderDataFn", isSignal: true, isRequired: false, transformFunction: null }, aiGetI18nTextByKey: { classPropertyName: "aiGetI18nTextByKey", publicName: "aiGetI18nTextByKey", isSignal: true, isRequired: false, transformFunction: null }, aiKeywords: { classPropertyName: "aiKeywords", publicName: "aiKeywords", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiRecords: "aiRecordsChange", aiFields: "aiFieldsChange", aiFieldsSizeMap: "aiFieldsSizeMapChange", aiTableInitialized: "aiTableInitialized", aiAddRecord: "aiAddRecord", aiAddField: "aiAddField", aiMoveField: "aiMoveField", aiUpdateFieldValues: "aiUpdateFieldValues", aiSetField: "aiSetField", aiSetFieldWidth: "aiSetFieldWidth", aiMoveRecords: "aiMoveRecords", aiClick: "aiClick", aiDbClick: "aiDbClick" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
9674
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: AITableGridBase, isStandalone: true, selector: "ai-table-grid-base", inputs: { aiRecords: { classPropertyName: "aiRecords", publicName: "aiRecords", isSignal: true, isRequired: true, transformFunction: null }, aiFields: { classPropertyName: "aiFields", publicName: "aiFields", isSignal: true, isRequired: true, transformFunction: null }, aiFieldsSizeMap: { classPropertyName: "aiFieldsSizeMap", publicName: "aiFieldsSizeMap", isSignal: true, isRequired: true, transformFunction: null }, aiContextMenuItems: { classPropertyName: "aiContextMenuItems", publicName: "aiContextMenuItems", isSignal: true, isRequired: false, transformFunction: null }, aiFieldConfig: { classPropertyName: "aiFieldConfig", publicName: "aiFieldConfig", isSignal: true, isRequired: false, transformFunction: null }, aiReadonly: { classPropertyName: "aiReadonly", publicName: "aiReadonly", isSignal: true, isRequired: false, transformFunction: null }, aiPlugins: { classPropertyName: "aiPlugins", publicName: "aiPlugins", isSignal: true, isRequired: false, transformFunction: null }, aiMaxFields: { classPropertyName: "aiMaxFields", publicName: "aiMaxFields", isSignal: true, isRequired: false, transformFunction: null }, aiMaxRecords: { classPropertyName: "aiMaxRecords", publicName: "aiMaxRecords", isSignal: true, isRequired: false, transformFunction: null }, aiMaxSelectOptions: { classPropertyName: "aiMaxSelectOptions", publicName: "aiMaxSelectOptions", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: true, transformFunction: null }, aiBuildRenderDataFn: { classPropertyName: "aiBuildRenderDataFn", publicName: "aiBuildRenderDataFn", isSignal: true, isRequired: false, transformFunction: null }, aiGetI18nTextByKey: { classPropertyName: "aiGetI18nTextByKey", publicName: "aiGetI18nTextByKey", isSignal: true, isRequired: false, transformFunction: null }, aiKeywords: { classPropertyName: "aiKeywords", publicName: "aiKeywords", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiRecords: "aiRecordsChange", aiFields: "aiFieldsChange", aiFieldsSizeMap: "aiFieldsSizeMapChange", aiTableInitialized: "aiTableInitialized", aiAddRecord: "aiAddRecord", aiAddField: "aiAddField", aiMoveField: "aiMoveField", aiUpdateFieldValues: "aiUpdateFieldValues", aiSetField: "aiSetField", aiSetFieldWidth: "aiSetFieldWidth", aiMoveRecords: "aiMoveRecords", aiClick: "aiClick", aiDbClick: "aiDbClick" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
9645
9675
|
}
|
9646
9676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridBase, decorators: [{
|
9647
9677
|
type: Component,
|
@@ -10351,10 +10381,9 @@ class AITableGrid extends AITableGridBase {
|
|
10351
10381
|
allFieldOptions.push(fieldConfig.fieldOption);
|
10352
10382
|
}
|
10353
10383
|
});
|
10354
|
-
const
|
10355
|
-
|
10356
|
-
|
10357
|
-
allFieldOptions = fieldOptionKeys.map((fieldOptionKey) => fieldOptionMap.get(fieldOptionKey));
|
10384
|
+
const filterFieldOptions = this.aiTable.context?.aiFieldConfig()?.filterFieldOptions;
|
10385
|
+
if (___default.isFunction(filterFieldOptions)) {
|
10386
|
+
allFieldOptions = filterFieldOptions(allFieldOptions);
|
10358
10387
|
}
|
10359
10388
|
return allFieldOptions;
|
10360
10389
|
});
|
@@ -10394,7 +10423,8 @@ class AITableGrid extends AITableGridBase {
|
|
10394
10423
|
readonly: this.aiReadonly(),
|
10395
10424
|
actions: this.actions,
|
10396
10425
|
maxFields: this.aiMaxFields(),
|
10397
|
-
maxRecords: this.aiMaxRecords()
|
10426
|
+
maxRecords: this.aiMaxRecords(),
|
10427
|
+
maxSelectOptions: this.aiMaxSelectOptions()
|
10398
10428
|
};
|
10399
10429
|
});
|
10400
10430
|
this.coordinate = computed(() => {
|
@@ -10534,6 +10564,7 @@ class AITableGrid extends AITableGridBase {
|
|
10534
10564
|
scrollAction: this.scrollAction,
|
10535
10565
|
maxFields: this.aiMaxFields,
|
10536
10566
|
maxRecords: this.aiMaxRecords,
|
10567
|
+
maxSelectOptions: this.aiMaxSelectOptions,
|
10537
10568
|
fieldOptions: this.fieldOptions,
|
10538
10569
|
fieldOptionMap: this.fieldOptionMap,
|
10539
10570
|
readonly: this.aiReadonly
|