@ai-table/grid 0.1.33 → 0.1.35
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/cell-editors/number/number-editor.component.d.ts +2 -1
- package/components/cell-editors/number/number-editor.component.d.ts.map +1 -1
- package/components/drag/drag.component.d.ts.map +1 -1
- package/core/context.d.ts +4 -0
- package/core/context.d.ts.map +1 -1
- package/fesm2022/ai-table-grid.mjs +498 -451
- 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 +1 -1
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/components/cells/cover-cell-base.d.ts +1 -0
- package/renderer/components/cells/cover-cell-base.d.ts.map +1 -1
- package/renderer/components/cells/single-text.component.d.ts +2 -2
- package/renderer/components/cells/single-text.component.d.ts.map +1 -1
- package/renderer/components/fill-handle.component.d.ts.map +1 -1
- package/renderer/components/scrollable-group/scrollable-group.component.d.ts +0 -1
- package/renderer/components/scrollable-group/scrollable-group.component.d.ts.map +1 -1
- package/services/selection.service.d.ts +3 -1
- package/services/selection.service.d.ts.map +1 -1
- package/types/grid.d.ts +8 -0
- package/types/grid.d.ts.map +1 -1
- package/utils/cell.d.ts +4 -0
- package/utils/cell.d.ts.map +1 -1
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, input, EventEmitter, inject, ElementRef, effect, Output, ChangeDetectionStrategy, Component, signal, computed, output, Input, ChangeDetectorRef, ViewChild, Renderer2, Pipe,
|
2
|
+
import { InjectionToken, input, EventEmitter, inject, ElementRef, effect, Output, ChangeDetectionStrategy, Component, signal, computed, output, Input, ChangeDetectorRef, ViewChild, model, untracked, Renderer2, Pipe, booleanAttribute, Injectable, DestroyRef, NgZone, ViewContainerRef, viewChild, afterNextRender } from '@angular/core';
|
3
3
|
import Konva from 'konva';
|
4
4
|
import { Shape } from 'konva/lib/Shape';
|
5
5
|
import { Sprite } from 'konva/lib/shapes/Sprite';
|
@@ -25,7 +25,7 @@ import { Transformer } from 'konva/lib/shapes/Transformer';
|
|
25
25
|
import { Wedge } from 'konva/lib/shapes/Wedge';
|
26
26
|
import * as i1$1 from 'ngx-tethys/popover';
|
27
27
|
import { ThyPopoverRef, ThyPopover, ThyPopoverModule } from 'ngx-tethys/popover';
|
28
|
-
import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl,
|
28
|
+
import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, isEmpty, AITableFilterOperation, AttachmentFieldBase, AITableStatType, DateFieldBase, DEFAULT_FIELD_STAT_TYPE_ITEMS, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgressAndReturnValue, RateFieldBase, RichTextFieldBase, SelectFieldBase, AITableSelectOptionStyle, generateOptionsByTexts, TextFieldBase, CheckboxFieldBase, FieldModelBaseMap, numberFormat, DragDirection, AI_TABLE_MIN_FROZEN_COLUMN_COUNT } from '@ai-table/utils';
|
29
29
|
import ObjectID from 'bson-objectid';
|
30
30
|
import { customAlphabet } from 'nanoid';
|
31
31
|
import * as _ from 'lodash';
|
@@ -46,22 +46,22 @@ import * as i2 from 'ngx-tethys/form';
|
|
46
46
|
import { ThyFormSubmitDirective, ThyFormModule, ThyUniqueCheckValidator } from 'ngx-tethys/form';
|
47
47
|
import { ThyNotifyService } from 'ngx-tethys/notify';
|
48
48
|
import { ThyInputNumber } from 'ngx-tethys/input-number';
|
49
|
+
import { isKeyHotkey } from 'is-hotkey';
|
50
|
+
import { LRUCache } from 'lru-cache';
|
51
|
+
import { fromUnixTime, subDays, differenceInDays, differenceInMonths } from 'date-fns';
|
52
|
+
import { isArray, TinyDate, helpers } from 'ngx-tethys/util';
|
53
|
+
import { DEFAULT_COLORS } from 'ngx-tethys/color-picker';
|
54
|
+
import GraphemeSplitter from 'grapheme-splitter';
|
49
55
|
import * as i1$2 from '@angular/common';
|
50
56
|
import { CommonModule, NgClass, NgTemplateOutlet } from '@angular/common';
|
57
|
+
import { ThyDropdownAbstractMenu, ThyDropdownMenuItemDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownMenuItemMetaDirective } from 'ngx-tethys/dropdown';
|
51
58
|
import { ThyEmptyModule } from 'ngx-tethys/empty';
|
52
59
|
import { ThySelect, ThySelectModule } from 'ngx-tethys/select';
|
53
60
|
import { ThyDot } from 'ngx-tethys/dot';
|
54
61
|
import { ThyIcon } from 'ngx-tethys/icon';
|
55
62
|
import { ThyTag } from 'ngx-tethys/tag';
|
56
|
-
import { ThyDropdownAbstractMenu, ThyDropdownMenuItemDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemExtendIconDirective, ThyDropdownMenuItemMetaDirective } from 'ngx-tethys/dropdown';
|
57
63
|
import { ThySwitch } from 'ngx-tethys/switch';
|
58
64
|
import { of, Subject, fromEvent, debounceTime, mergeWith, animationFrames, filter } from 'rxjs';
|
59
|
-
import { isKeyHotkey } from 'is-hotkey';
|
60
|
-
import { LRUCache } from 'lru-cache';
|
61
|
-
import { fromUnixTime, subDays, differenceInDays, differenceInMonths } from 'date-fns';
|
62
|
-
import { isArray, TinyDate, helpers } from 'ngx-tethys/util';
|
63
|
-
import { DEFAULT_COLORS } from 'ngx-tethys/color-picker';
|
64
|
-
import GraphemeSplitter from 'grapheme-splitter';
|
65
65
|
import { ThyDivider } from 'ngx-tethys/divider';
|
66
66
|
import * as i4 from 'ngx-tethys/avatar';
|
67
67
|
import { ThyAvatarModule } from 'ngx-tethys/avatar';
|
@@ -1541,7 +1541,8 @@ const AITableQueries = {
|
|
1541
1541
|
|
1542
1542
|
class RendererContext {
|
1543
1543
|
constructor(options) {
|
1544
|
-
const { rowHeadWidth, linearRows, pointPosition, scrollState, visibleColumnsIndexMap, visibleRowsIndexMap, frozenColumnCount, references, aiFieldConfig, scrollAction, maxFields, maxRecords, maxSelectOptions, fieldOptions, fieldOptionMap, readonly } = options;
|
1544
|
+
const { containerRect, rowHeadWidth, linearRows, pointPosition, scrollState, visibleColumnsIndexMap, visibleRowsIndexMap, frozenColumnCount, references, aiFieldConfig, scrollAction, maxFields, maxRecords, maxSelectOptions, fieldOptions, fieldOptionMap, readonly } = options;
|
1545
|
+
this.containerRect = containerRect;
|
1545
1546
|
this.rowHeadWidth = rowHeadWidth;
|
1546
1547
|
this.linearRows = linearRows;
|
1547
1548
|
this.pointPosition = pointPosition;
|
@@ -1872,387 +1873,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
1872
1873
|
args: ['inputElement', { static: false }]
|
1873
1874
|
}] } });
|
1874
1875
|
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
(thyBlur)="updateValue()"
|
1887
|
-
/> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1888
|
-
}
|
1889
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberCellEditorComponent, decorators: [{
|
1890
|
-
type: Component,
|
1891
|
-
args: [{
|
1892
|
-
selector: 'number-cell-editor',
|
1893
|
-
template: `<thy-input-number
|
1894
|
-
class="h-100"
|
1895
|
-
[thyAutoFocus]="true"
|
1896
|
-
[(ngModel)]="modelValue"
|
1897
|
-
(thyEnter)="updateValue()"
|
1898
|
-
(thyBlur)="updateValue()"
|
1899
|
-
/> `,
|
1900
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
1901
|
-
imports: [FormsModule, ThyEnterDirective, ThyInputNumber],
|
1902
|
-
host: {
|
1903
|
-
class: 'number-cell-editor'
|
1904
|
-
}
|
1905
|
-
}]
|
1906
|
-
}] });
|
1907
|
-
|
1908
|
-
class SelectOptionComponent {
|
1909
|
-
constructor() {
|
1910
|
-
this.field = input.required();
|
1911
|
-
this.displayOption = input.required();
|
1912
|
-
this.optionStyle = computed(() => {
|
1913
|
-
return this.field().settings.option_style || AITableSelectOptionStyle.text;
|
1914
|
-
});
|
1915
|
-
this.AITableSelectOptionStyle = AITableSelectOptionStyle;
|
1916
|
-
}
|
1917
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
1918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: SelectOptionComponent, isStandalone: true, selector: "select-option", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, displayOption: { classPropertyName: "displayOption", publicName: "displayOption", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.select-option-tag": "optionStyle === AITableSelectOptionStyle.tag" }, classAttribute: "select-option thy-text" }, ngImport: i0, template: "@if (displayOption(); as displayOption) {\n @switch (optionStyle()) {\n @case (AITableSelectOptionStyle.dot) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @case (AITableSelectOptionStyle.tag) {\n @if (displayOption.bg_color || displayOption.color || 'default'; as color) {\n <thy-tag thyTheme=\"fill\" thyShape=\"pill\" [thyColor]=\"color\">\n @if (displayOption['icon']) {\n <thy-icon class=\"text-white\" [thyIconName]=\"displayOption['icon']\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n </thy-tag>\n }\n }\n @case (AITableSelectOptionStyle.piece) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot thyShape=\"square\" [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @default {\n @if (displayOption['icon']) {\n <thy-icon [thyIconName]=\"displayOption['icon']\" [style.color]=\"displayOption.color\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyTag, selector: "thy-tag,[thyTag]", inputs: ["thyTag", "thyShape", "thyColor", "thyTheme", "thySize", "thyHoverable"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "ngmodule", type: ThyTooltipModule }, { kind: "component", type: ThyDot, selector: "thy-dot,[thy-dot],[thyDot]", inputs: ["thyColor", "thySize", "thyTheme", "thyShape"] }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
1919
|
-
}
|
1920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionComponent, decorators: [{
|
1921
|
-
type: Component,
|
1922
|
-
args: [{ selector: 'select-option', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
1923
|
-
class: 'select-option thy-text',
|
1924
|
-
'[class.select-option-tag]': 'optionStyle === AITableSelectOptionStyle.tag'
|
1925
|
-
}, imports: [ThyTag, ThyIcon, ThyTooltipModule, ThyDot, ThyFlexibleText], template: "@if (displayOption(); as displayOption) {\n @switch (optionStyle()) {\n @case (AITableSelectOptionStyle.dot) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @case (AITableSelectOptionStyle.tag) {\n @if (displayOption.bg_color || displayOption.color || 'default'; as color) {\n <thy-tag thyTheme=\"fill\" thyShape=\"pill\" [thyColor]=\"color\">\n @if (displayOption['icon']) {\n <thy-icon class=\"text-white\" [thyIconName]=\"displayOption['icon']\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n </thy-tag>\n }\n }\n @case (AITableSelectOptionStyle.piece) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot thyShape=\"square\" [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @default {\n @if (displayOption['icon']) {\n <thy-icon [thyIconName]=\"displayOption['icon']\" [style.color]=\"displayOption.color\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n }\n}\n" }]
|
1926
|
-
}] });
|
1927
|
-
|
1928
|
-
class SelectCellEditorComponent extends AbstractEditCellEditor {
|
1929
|
-
get isMultiple() {
|
1930
|
-
return !!this.field().settings.is_multiple;
|
1931
|
-
}
|
1932
|
-
constructor() {
|
1933
|
-
super();
|
1934
|
-
this.selectOptions = computed(() => {
|
1935
|
-
return this.field().settings.options;
|
1936
|
-
});
|
1937
|
-
this.preset = computed(() => {
|
1938
|
-
return this.field().settings.is_multiple && this.field().settings.option_style === AITableSelectOptionStyle.tag ? 'tag' : '';
|
1939
|
-
});
|
1940
|
-
}
|
1941
|
-
ngOnInit() {
|
1942
|
-
this.modelValue = computed(() => {
|
1943
|
-
const value = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]);
|
1944
|
-
if (!this.isMultiple) {
|
1945
|
-
return value?.length > 0 ? value[0] : null;
|
1946
|
-
}
|
1947
|
-
return value || [];
|
1948
|
-
})();
|
1949
|
-
}
|
1950
|
-
onOpenChange(value) {
|
1951
|
-
if (!value) {
|
1952
|
-
this.closePopover();
|
1876
|
+
const buildGridLinearRows = (visibleRecords, isAddingVisible = true) => {
|
1877
|
+
const linearRows = [];
|
1878
|
+
let displayRowIndex = 0;
|
1879
|
+
[...visibleRecords, { _id: '' }].forEach((row) => {
|
1880
|
+
if (row._id) {
|
1881
|
+
displayRowIndex++;
|
1882
|
+
linearRows.push({
|
1883
|
+
type: AITableRowType.record,
|
1884
|
+
_id: row._id,
|
1885
|
+
displayIndex: displayRowIndex
|
1886
|
+
});
|
1953
1887
|
}
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
const value = (this.isMultiple ? this.modelValue : (this.modelValue && [this.modelValue]) || []);
|
1960
|
-
const originValue = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]) || [];
|
1961
|
-
if (value.length !== originValue.length || !value.every((v, i) => v === originValue[i])) {
|
1962
|
-
this.updateFieldValues.emit([
|
1963
|
-
{
|
1964
|
-
value: value,
|
1965
|
-
path: [this.record()._id, this.field()._id]
|
1966
|
-
}
|
1967
|
-
]);
|
1888
|
+
if (isAddingVisible && !row._id) {
|
1889
|
+
linearRows.push({
|
1890
|
+
type: AITableRowType.add,
|
1891
|
+
_id: ''
|
1892
|
+
});
|
1968
1893
|
}
|
1969
|
-
}
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
], template: "<thy-select\n [(ngModel)]=\"modelValue\"\n [thyAutoExpand]=\"true\"\n [thyAllowClear]=\"true\"\n [thyPlaceHolder]=\"''\"\n [thyPreset]=\"preset()\"\n [thyMode]=\"field().settings.is_multiple ? 'multiple' : ''\"\n (ngModelChange)=\"onModelChange($event)\"\n (thyOnExpandStatusChange)=\"onOpenChange($event)\"\n>\n <ng-template #selectedDisplay let-option>\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </ng-template>\n @for (option of selectOptions(); track option._id) {\n <thy-option\n [thyValue]=\"option._id\"\n [hidden]=\"!!option.is_disabled\"\n [thyRawValue]=\"option\"\n [thyShowOptionCustom]=\"true\"\n [thyLabelText]=\"option.text\"\n >\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </thy-option>\n }\n</thy-select>\n" }]
|
1988
|
-
}], ctorParameters: () => [] });
|
1894
|
+
});
|
1895
|
+
return linearRows;
|
1896
|
+
};
|
1897
|
+
const buildGridData = (aiTable, recordValue, fieldsValue) => {
|
1898
|
+
const fieldOptions = getFieldOptions(aiTable);
|
1899
|
+
const fields = fieldsValue.map((value) => {
|
1900
|
+
const fieldOption = fieldOptions.find((item) => item.type === value.type);
|
1901
|
+
return {
|
1902
|
+
...value,
|
1903
|
+
icon: value.icon || fieldOption.icon
|
1904
|
+
};
|
1905
|
+
});
|
1906
|
+
return {
|
1907
|
+
type: 'grid',
|
1908
|
+
fields,
|
1909
|
+
records: recordValue
|
1910
|
+
};
|
1911
|
+
};
|
1989
1912
|
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1996
|
-
|
1913
|
+
function getColumnIndicesSizeMap(aiTable, fields) {
|
1914
|
+
const fieldSizeMap = aiTable.gridData().fieldsSizeMap;
|
1915
|
+
const columnIndicesSizeMap = {};
|
1916
|
+
fields?.forEach((field, index) => {
|
1917
|
+
columnIndicesSizeMap[index] = fieldSizeMap[field._id] ?? getFieldOptionByField(aiTable, field).width;
|
1918
|
+
});
|
1919
|
+
return columnIndicesSizeMap;
|
1920
|
+
}
|
1921
|
+
/**
|
1922
|
+
* 获取单元格位置
|
1923
|
+
* 根据单元格是否是第一列/最后一列确定单元格所在的位置
|
1924
|
+
*/
|
1925
|
+
function getCellHorizontalPosition(options) {
|
1926
|
+
const { columnWidth } = options;
|
1927
|
+
return { width: columnWidth, offset: 0 };
|
1928
|
+
}
|
1929
|
+
function transformToCellText(cellValue, options) {
|
1930
|
+
const { aiTable, field } = options;
|
1931
|
+
const fieldRenderers = aiTable?.context?.aiFieldConfig()?.fieldRenderers;
|
1932
|
+
if (!fieldRenderers || !field) {
|
1933
|
+
return cellValue;
|
1997
1934
|
}
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
this.handleSelectAll();
|
2002
|
-
}, 0);
|
1935
|
+
const toText = fieldRenderers[field.type]?.toText;
|
1936
|
+
if (!toText) {
|
1937
|
+
return cellValue;
|
2003
1938
|
}
|
2004
|
-
|
2005
|
-
|
2006
|
-
|
2007
|
-
this.render2.setStyle(textarea, 'height', 'auto');
|
2008
|
-
const scrollHeight = textarea.scrollHeight;
|
2009
|
-
const newHeight = Math.max(this.minHeight, Math.min(scrollHeight, this.maxHeight)) + 4;
|
2010
|
-
this.render2.setStyle(textarea, 'max-height', `${this.maxHeight}px`);
|
2011
|
-
this.render2.setStyle(textarea, 'height', `${newHeight}px`);
|
2012
|
-
this.render2.setStyle(textarea, 'resize', 'none');
|
2013
|
-
}
|
1939
|
+
const cellText = toText(field, cellValue);
|
1940
|
+
if (cellText == null) {
|
1941
|
+
return cellValue;
|
2014
1942
|
}
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
1943
|
+
return cellText;
|
1944
|
+
}
|
1945
|
+
/**
|
1946
|
+
* `\u4e00`: https://www.compart.com/en/unicode/U+4E00
|
1947
|
+
* `\u9fa5`: https://www.compart.com/en/unicode/U+9FA5
|
1948
|
+
*/
|
1949
|
+
const UNIFIED_IDEOGRAPHS_REGEX = /^[\u4e00-\u9fa5]+$/;
|
1950
|
+
const SET_OF_LETTERS_REGEX = /^[a-zA-Z\/ ]+$/;
|
1951
|
+
function getAvatarShortName(name) {
|
1952
|
+
if (!name) {
|
1953
|
+
return '';
|
2020
1954
|
}
|
2021
|
-
|
2022
|
-
|
1955
|
+
name = name.trim();
|
1956
|
+
if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {
|
1957
|
+
return name.slice(name.length - 2);
|
2023
1958
|
}
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
1959
|
+
if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {
|
1960
|
+
const words = name.split(' ');
|
1961
|
+
return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();
|
2027
1962
|
}
|
2028
|
-
|
2029
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: TextCellEditorComponent, isStandalone: true, selector: "text-cell-editor", inputs: { isSelectAll: { classPropertyName: "isSelectAll", publicName: "isSelectAll", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "text-cell-editor" }, usesInheritance: true, ngImport: i0, template: `
|
2030
|
-
<textarea
|
2031
|
-
#textarea
|
2032
|
-
placeholder=""
|
2033
|
-
rows="1"
|
2034
|
-
thyInput
|
2035
|
-
[thyAutofocus]="true"
|
2036
|
-
[(ngModel)]="modelValue"
|
2037
|
-
(ngModelChange)="valueChange()"
|
2038
|
-
(thyEnter)="updateValue()"
|
2039
|
-
(blur)="updateValue()"
|
2040
|
-
></textarea>
|
2041
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
2042
|
-
}
|
2043
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextCellEditorComponent, decorators: [{
|
2044
|
-
type: Component,
|
2045
|
-
args: [{
|
2046
|
-
selector: 'text-cell-editor',
|
2047
|
-
template: `
|
2048
|
-
<textarea
|
2049
|
-
#textarea
|
2050
|
-
placeholder=""
|
2051
|
-
rows="1"
|
2052
|
-
thyInput
|
2053
|
-
[thyAutofocus]="true"
|
2054
|
-
[(ngModel)]="modelValue"
|
2055
|
-
(ngModelChange)="valueChange()"
|
2056
|
-
(thyEnter)="updateValue()"
|
2057
|
-
(blur)="updateValue()"
|
2058
|
-
></textarea>
|
2059
|
-
`,
|
2060
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
2061
|
-
imports: [FormsModule, ThyAutofocusDirective, ThyInputDirective, ThyEnterDirective],
|
2062
|
-
host: {
|
2063
|
-
class: 'text-cell-editor'
|
2064
|
-
}
|
2065
|
-
}]
|
2066
|
-
}], ctorParameters: () => [] });
|
2067
|
-
|
2068
|
-
class SelectOptionPipe {
|
2069
|
-
transform(_id, options) {
|
2070
|
-
return options?.length && options.find((item) => item._id === _id);
|
2071
|
-
}
|
2072
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2073
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, isStandalone: true, name: "selectOption" }); }
|
2074
|
-
}
|
2075
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, decorators: [{
|
2076
|
-
type: Pipe,
|
2077
|
-
args: [{
|
2078
|
-
name: 'selectOption'
|
2079
|
-
}]
|
2080
|
-
}] });
|
2081
|
-
class SelectOptionsPipe {
|
2082
|
-
transform(ids, options = []) {
|
2083
|
-
return ((ids?.length &&
|
2084
|
-
ids.map((id) => {
|
2085
|
-
return options.find((item) => item._id === id);
|
2086
|
-
})) ||
|
2087
|
-
[]);
|
2088
|
-
}
|
2089
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2090
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, isStandalone: true, name: "selectOptions" }); }
|
2091
|
-
}
|
2092
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, decorators: [{
|
2093
|
-
type: Pipe,
|
2094
|
-
args: [{
|
2095
|
-
name: 'selectOptions'
|
2096
|
-
}]
|
2097
|
-
}] });
|
2098
|
-
class IsSelectRecordPipe {
|
2099
|
-
transform(recordId, selection) {
|
2100
|
-
return selection.selectedRecords.has(recordId);
|
2101
|
-
}
|
2102
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2103
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, isStandalone: true, name: "isSelectRecord" }); }
|
2104
|
-
}
|
2105
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, decorators: [{
|
2106
|
-
type: Pipe,
|
2107
|
-
args: [{
|
2108
|
-
name: 'isSelectRecord'
|
2109
|
-
}]
|
2110
|
-
}] });
|
2111
|
-
class UserPipe {
|
2112
|
-
transform(values, references) {
|
2113
|
-
return ((values.length &&
|
2114
|
-
values.map((item) => {
|
2115
|
-
return references.members[item] || {};
|
2116
|
-
})) ||
|
2117
|
-
[]);
|
2118
|
-
}
|
2119
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2120
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, isStandalone: true, name: "user" }); }
|
2121
|
-
}
|
2122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, decorators: [{
|
2123
|
-
type: Pipe,
|
2124
|
-
args: [{
|
2125
|
-
name: 'user'
|
2126
|
-
}]
|
2127
|
-
}] });
|
2128
|
-
class SelectSettingPipe {
|
2129
|
-
transform(settings) {
|
2130
|
-
return settings;
|
2131
|
-
}
|
2132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2133
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, isStandalone: true, name: "selectSetting" }); }
|
2134
|
-
}
|
2135
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, decorators: [{
|
2136
|
-
type: Pipe,
|
2137
|
-
args: [{
|
2138
|
-
name: 'selectSetting'
|
2139
|
-
}]
|
2140
|
-
}] });
|
2141
|
-
class MemberSettingPipe {
|
2142
|
-
transform(settings) {
|
2143
|
-
return settings;
|
2144
|
-
}
|
2145
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2146
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, isStandalone: true, name: "memberSetting" }); }
|
2147
|
-
}
|
2148
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, decorators: [{
|
2149
|
-
type: Pipe,
|
2150
|
-
args: [{
|
2151
|
-
name: 'memberSetting'
|
2152
|
-
}]
|
2153
|
-
}] });
|
2154
|
-
class AITableFieldIsSameOptionPipe {
|
2155
|
-
transform(fieldOption, field) {
|
2156
|
-
return isSameFieldOption(fieldOption, field);
|
2157
|
-
}
|
2158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
2159
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, isStandalone: true, name: "fieldIsSameOption" }); }
|
2160
|
-
}
|
2161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, decorators: [{
|
2162
|
-
type: Pipe,
|
2163
|
-
args: [{
|
2164
|
-
name: 'fieldIsSameOption'
|
2165
|
-
}]
|
2166
|
-
}] });
|
2167
|
-
|
2168
|
-
const buildGridLinearRows = (visibleRecords, isAddingVisible = true) => {
|
2169
|
-
const linearRows = [];
|
2170
|
-
let displayRowIndex = 0;
|
2171
|
-
[...visibleRecords, { _id: '' }].forEach((row) => {
|
2172
|
-
if (row._id) {
|
2173
|
-
displayRowIndex++;
|
2174
|
-
linearRows.push({
|
2175
|
-
type: AITableRowType.record,
|
2176
|
-
_id: row._id,
|
2177
|
-
displayIndex: displayRowIndex
|
2178
|
-
});
|
2179
|
-
}
|
2180
|
-
if (isAddingVisible && !row._id) {
|
2181
|
-
linearRows.push({
|
2182
|
-
type: AITableRowType.add,
|
2183
|
-
_id: ''
|
2184
|
-
});
|
2185
|
-
}
|
2186
|
-
});
|
2187
|
-
return linearRows;
|
2188
|
-
};
|
2189
|
-
const buildGridData = (aiTable, recordValue, fieldsValue) => {
|
2190
|
-
const fieldOptions = getFieldOptions(aiTable);
|
2191
|
-
const fields = fieldsValue.map((value) => {
|
2192
|
-
const fieldOption = fieldOptions.find((item) => item.type === value.type);
|
2193
|
-
return {
|
2194
|
-
...value,
|
2195
|
-
icon: value.icon || fieldOption.icon
|
2196
|
-
};
|
2197
|
-
});
|
2198
|
-
return {
|
2199
|
-
type: 'grid',
|
2200
|
-
fields,
|
2201
|
-
records: recordValue
|
2202
|
-
};
|
2203
|
-
};
|
2204
|
-
|
2205
|
-
function getColumnIndicesSizeMap(aiTable, fields) {
|
2206
|
-
const fieldSizeMap = aiTable.gridData().fieldsSizeMap;
|
2207
|
-
const columnIndicesSizeMap = {};
|
2208
|
-
fields?.forEach((field, index) => {
|
2209
|
-
columnIndicesSizeMap[index] = fieldSizeMap[field._id] ?? getFieldOptionByField(aiTable, field).width;
|
2210
|
-
});
|
2211
|
-
return columnIndicesSizeMap;
|
2212
|
-
}
|
2213
|
-
/**
|
2214
|
-
* 获取单元格位置
|
2215
|
-
* 根据单元格是否是第一列/最后一列确定单元格所在的位置
|
2216
|
-
*/
|
2217
|
-
function getCellHorizontalPosition(options) {
|
2218
|
-
const { columnWidth } = options;
|
2219
|
-
return { width: columnWidth, offset: 0 };
|
2220
|
-
}
|
2221
|
-
function transformToCellText(cellValue, options) {
|
2222
|
-
const { aiTable, field } = options;
|
2223
|
-
const fieldRenderers = aiTable?.context?.aiFieldConfig()?.fieldRenderers;
|
2224
|
-
if (!fieldRenderers || !field) {
|
2225
|
-
return cellValue;
|
2226
|
-
}
|
2227
|
-
const toText = fieldRenderers[field.type]?.toText;
|
2228
|
-
if (!toText) {
|
2229
|
-
return cellValue;
|
2230
|
-
}
|
2231
|
-
const cellText = toText(field, cellValue);
|
2232
|
-
if (cellText == null) {
|
2233
|
-
return cellValue;
|
2234
|
-
}
|
2235
|
-
return cellText;
|
2236
|
-
}
|
2237
|
-
/**
|
2238
|
-
* `\u4e00`: https://www.compart.com/en/unicode/U+4E00
|
2239
|
-
* `\u9fa5`: https://www.compart.com/en/unicode/U+9FA5
|
2240
|
-
*/
|
2241
|
-
const UNIFIED_IDEOGRAPHS_REGEX = /^[\u4e00-\u9fa5]+$/;
|
2242
|
-
const SET_OF_LETTERS_REGEX = /^[a-zA-Z\/ ]+$/;
|
2243
|
-
function getAvatarShortName(name) {
|
2244
|
-
if (!name) {
|
2245
|
-
return '';
|
2246
|
-
}
|
2247
|
-
name = name.trim();
|
2248
|
-
if (UNIFIED_IDEOGRAPHS_REGEX.test(name) && name.length > 2) {
|
2249
|
-
return name.slice(name.length - 2);
|
2250
|
-
}
|
2251
|
-
if (SET_OF_LETTERS_REGEX.test(name) && name.indexOf(' ') > 0) {
|
2252
|
-
const words = name.split(' ');
|
2253
|
-
return (words[0].slice(0, 1) + words[1].slice(0, 1)).toUpperCase();
|
2254
|
-
}
|
2255
|
-
return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
|
1963
|
+
return name.length > 2 ? name.slice(0, 2).toUpperCase() : name.toUpperCase();
|
2256
1964
|
}
|
2257
1965
|
function getAvatarBgColor(name) {
|
2258
1966
|
if (!name) {
|
@@ -2272,9 +1980,17 @@ function expandCell(aiTable, path) {
|
|
2272
1980
|
const [recordId, fieldId] = path;
|
2273
1981
|
aiTable.selection.set({
|
2274
1982
|
...aiTable.selection(),
|
1983
|
+
activeCell: [recordId, fieldId],
|
1984
|
+
selectedCells: new Set([`${recordId}:${fieldId}`]),
|
2275
1985
|
expandCell: [recordId, fieldId]
|
2276
1986
|
});
|
2277
1987
|
}
|
1988
|
+
function setExpandCellInfo(aiTable, expandCellInfo) {
|
1989
|
+
aiTable.selection.set({
|
1990
|
+
...aiTable.selection(),
|
1991
|
+
expandCellInfo: expandCellInfo
|
1992
|
+
});
|
1993
|
+
}
|
2278
1994
|
|
2279
1995
|
/**
|
2280
1996
|
* 生成目标名称
|
@@ -5062,6 +4778,10 @@ class CoverCellBase {
|
|
5062
4778
|
constructor() {
|
5063
4779
|
this.config = input();
|
5064
4780
|
this.onlyDisplayBorder = input(false);
|
4781
|
+
this.isExpand = computed(() => {
|
4782
|
+
const { isExpand } = this.config();
|
4783
|
+
return isExpand;
|
4784
|
+
});
|
5065
4785
|
}
|
5066
4786
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: CoverCellBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
5067
4787
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: CoverCellBase, isStandalone: true, selector: "ai-table-cover-cell-base", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, onlyDisplayBorder: { classPropertyName: "onlyDisplayBorder", publicName: "onlyDisplayBorder", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
@@ -8631,9 +8351,6 @@ class AITableScrollableGroup {
|
|
8631
8351
|
this.rootGroup.getNode().moveTo(this.parentContainer().getNode());
|
8632
8352
|
}
|
8633
8353
|
}
|
8634
|
-
stopBubble(e) {
|
8635
|
-
e.event.cancelBubble = true;
|
8636
|
-
}
|
8637
8354
|
verticalScrollbarClick(e) {
|
8638
8355
|
e.event.cancelBubble = true;
|
8639
8356
|
const { contentHeight, height } = this.config();
|
@@ -8722,13 +8439,7 @@ class AITableScrollableGroup {
|
|
8722
8439
|
}
|
8723
8440
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableScrollableGroup, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
8724
8441
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableScrollableGroup, isStandalone: true, selector: "ai-table-scrollable-group", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, contentTemplate: { classPropertyName: "contentTemplate", publicName: "contentTemplate", isSignal: true, isRequired: true, transformFunction: null }, parentContainer: { classPropertyName: "parentContainer", publicName: "parentContainer", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { scrollPosition: "scrollPosition" }, viewQueries: [{ propertyName: "verticalTrack", first: true, predicate: ["verticalTrack"], descendants: true }, { propertyName: "verticalThumb", first: true, predicate: ["verticalThumb"], descendants: true }, { propertyName: "horizontalTrack", first: true, predicate: ["horizontalTrack"], descendants: true }, { propertyName: "contentGroup", first: true, predicate: ["contentGroup"], descendants: true }, { propertyName: "rootGroup", first: true, predicate: ["rootGroup"], descendants: true }], ngImport: i0, template: `
|
8725
|
-
<ko-group
|
8726
|
-
#rootGroup
|
8727
|
-
[config]="containerConfig()"
|
8728
|
-
(koWheel)="stageWheel($event)"
|
8729
|
-
(koMousedown)="stopBubble($event)"
|
8730
|
-
(koMouseup)="stopBubble($event)"
|
8731
|
-
>
|
8442
|
+
<ko-group #rootGroup [config]="containerConfig()" (koWheel)="stageWheel($event)">
|
8732
8443
|
<ko-group>
|
8733
8444
|
<ko-rect [config]="bgConfig()"></ko-rect>
|
8734
8445
|
</ko-group>
|
@@ -8780,13 +8491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
8780
8491
|
args: [{
|
8781
8492
|
selector: 'ai-table-scrollable-group',
|
8782
8493
|
template: `
|
8783
|
-
<ko-group
|
8784
|
-
#rootGroup
|
8785
|
-
[config]="containerConfig()"
|
8786
|
-
(koWheel)="stageWheel($event)"
|
8787
|
-
(koMousedown)="stopBubble($event)"
|
8788
|
-
(koMouseup)="stopBubble($event)"
|
8789
|
-
>
|
8494
|
+
<ko-group #rootGroup [config]="containerConfig()" (koWheel)="stageWheel($event)">
|
8790
8495
|
<ko-group>
|
8791
8496
|
<ko-rect [config]="bgConfig()"></ko-rect>
|
8792
8497
|
</ko-group>
|
@@ -8859,9 +8564,8 @@ class AITableFillHandle {
|
|
8859
8564
|
const { aiTable, readonly } = this.config();
|
8860
8565
|
const selection = aiTable.selection();
|
8861
8566
|
const hasSelectedCells = selection.selectedCells.size > 0;
|
8862
|
-
const isExpandCell = selection.expandCell;
|
8863
8567
|
const isEditingCell = selection.editingCell;
|
8864
|
-
return hasSelectedCells && !readonly && !isEditingCell
|
8568
|
+
return hasSelectedCells && !readonly && !isEditingCell;
|
8865
8569
|
});
|
8866
8570
|
this.handleConfig = computed(() => {
|
8867
8571
|
const { aiTable, coordinate } = this.config();
|
@@ -8875,9 +8579,12 @@ class AITableFillHandle {
|
|
8875
8579
|
const rowOffset = coordinate.getRowOffset(rowIndex);
|
8876
8580
|
const width = 6;
|
8877
8581
|
const height = 6;
|
8582
|
+
const cellHeight = aiTable.selection().expandCellInfo?.height
|
8583
|
+
? aiTable.selection().expandCellInfo.height + AI_TABLE_CELL_LINE_BORDER
|
8584
|
+
: AI_TABLE_ROW_HEIGHT;
|
8878
8585
|
return {
|
8879
8586
|
x: columnOffset + columnWidth - width / 2 + AI_TABLE_OFFSET,
|
8880
|
-
y: rowOffset +
|
8587
|
+
y: rowOffset + cellHeight - height + AI_TABLE_CELL_BORDER + AI_TABLE_OFFSET,
|
8881
8588
|
width,
|
8882
8589
|
height,
|
8883
8590
|
fill: Colors.primary,
|
@@ -10264,15 +9971,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
10264
9971
|
}] });
|
10265
9972
|
|
10266
9973
|
class AITableCellText extends CoverCellBase {
|
9974
|
+
static { this.fieldType = AITableFieldType.text; }
|
10267
9975
|
constructor() {
|
10268
|
-
super(
|
9976
|
+
super();
|
10269
9977
|
this.expandBorderConfig = computed(() => {
|
10270
9978
|
const { render, field, recordId, readonly, isExpand } = this.config();
|
10271
9979
|
const { columnWidth } = render;
|
10272
9980
|
if (isExpand) {
|
10273
9981
|
return {
|
10274
9982
|
width: columnWidth - AI_TABLE_CELL_BORDER / 2,
|
10275
|
-
height: this.
|
9983
|
+
height: this.height(),
|
10276
9984
|
stroke: Colors.primary,
|
10277
9985
|
strokeWidth: 2,
|
10278
9986
|
listening: false
|
@@ -10286,9 +9994,9 @@ class AITableCellText extends CoverCellBase {
|
|
10286
9994
|
const { height } = this.expandTextBounds();
|
10287
9995
|
return {
|
10288
9996
|
width: columnWidth,
|
10289
|
-
height: this.
|
9997
|
+
height: this.height(),
|
10290
9998
|
contentWidth: columnWidth, // 内容宽度大于容器宽度,会显示横向滚动条
|
10291
|
-
contentHeight: height + this.startY() * 2, // 内容高度大于容器高度,会显示竖向滚动条
|
9999
|
+
contentHeight: height + this.startY() * 2 - AI_TABLE_CELL_LINE_BORDER, // 内容高度大于容器高度,会显示竖向滚动条
|
10292
10000
|
scrollbarSize: 9,
|
10293
10001
|
scrollbarColor: Colors.gray700,
|
10294
10002
|
x: 0,
|
@@ -10329,9 +10037,9 @@ class AITableCellText extends CoverCellBase {
|
|
10329
10037
|
}
|
10330
10038
|
return textRender.replace(/\r|\n/g, ' ');
|
10331
10039
|
});
|
10332
|
-
this.
|
10040
|
+
this.height = computed(() => {
|
10333
10041
|
const { height } = this.expandTextBounds() || { height: 0 };
|
10334
|
-
return Math.min(Math.max(height, this.config()
|
10042
|
+
return Math.min(Math.max(height, this.config().render.rowHeight - AI_TABLE_CELL_LINE_BORDER || AI_TABLE_ROW_BLANK_HEIGHT), 146);
|
10335
10043
|
});
|
10336
10044
|
this.startY = computed(() => {
|
10337
10045
|
const { y, rowHeight } = this.config()?.render;
|
@@ -10366,9 +10074,7 @@ class AITableCellText extends CoverCellBase {
|
|
10366
10074
|
return;
|
10367
10075
|
});
|
10368
10076
|
this.textConfig = computed(() => {
|
10369
|
-
const { isExpand } = this.config();
|
10370
10077
|
const render = this.config()?.render;
|
10371
|
-
this.isExpand();
|
10372
10078
|
if (render) {
|
10373
10079
|
const { x, y, transformValue, field, columnWidth, rowHeight, style, zIndex } = render;
|
10374
10080
|
let textRender = this.textString();
|
@@ -10391,13 +10097,18 @@ class AITableCellText extends CoverCellBase {
|
|
10391
10097
|
}
|
10392
10098
|
return;
|
10393
10099
|
});
|
10394
|
-
|
10395
|
-
const
|
10396
|
-
|
10100
|
+
effect(() => {
|
10101
|
+
const height = this.height();
|
10102
|
+
if (this.isExpand()) {
|
10103
|
+
untracked(() => {
|
10104
|
+
const { render, aiTable } = this.config();
|
10105
|
+
const { columnWidth } = render;
|
10106
|
+
setExpandCellInfo(aiTable, { width: columnWidth, height });
|
10107
|
+
});
|
10108
|
+
}
|
10397
10109
|
});
|
10398
10110
|
}
|
10399
|
-
static { this
|
10400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableCellText, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
10111
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableCellText, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
10401
10112
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableCellText, isStandalone: true, selector: "ai-table-single-text", usesInheritance: true, ngImport: i0, template: `
|
10402
10113
|
<ko-group>
|
10403
10114
|
@if (isExpand()) {
|
@@ -10450,7 +10161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
10450
10161
|
imports: [AITableTextComponent, KoShape, KoContainer, AITableScrollableGroup],
|
10451
10162
|
changeDetection: ChangeDetectionStrategy.OnPush
|
10452
10163
|
}]
|
10453
|
-
}] });
|
10164
|
+
}], ctorParameters: () => [] });
|
10454
10165
|
|
10455
10166
|
// TODO: components下的cells组件考虑移出 components ,这些组件都属于
|
10456
10167
|
|
@@ -10732,26 +10443,323 @@ function getStartAndEndCell(selectedCells) {
|
|
10732
10443
|
return { startCell, endCell };
|
10733
10444
|
}
|
10734
10445
|
|
10735
|
-
class
|
10736
|
-
|
10737
|
-
this.
|
10738
|
-
|
10739
|
-
|
10740
|
-
|
10741
|
-
|
10742
|
-
this.
|
10743
|
-
|
10744
|
-
|
10745
|
-
|
10746
|
-
|
10747
|
-
|
10748
|
-
|
10749
|
-
|
10750
|
-
|
10751
|
-
|
10752
|
-
|
10753
|
-
|
10754
|
-
|
10446
|
+
class NumberCellEditorComponent extends AbstractEditCellEditor {
|
10447
|
+
updateValue() {
|
10448
|
+
if (this.modelValue === '') {
|
10449
|
+
const fieldModel = FieldModelMap[this.field().type];
|
10450
|
+
this.modelValue = fieldModel.transformCellValue(this.modelValue, { aiTable: this.aiTable, field: this.field() });
|
10451
|
+
}
|
10452
|
+
super.update();
|
10453
|
+
this.closePopover();
|
10454
|
+
}
|
10455
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberCellEditorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
10456
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.10", type: NumberCellEditorComponent, isStandalone: true, selector: "number-cell-editor", host: { classAttribute: "number-cell-editor" }, usesInheritance: true, ngImport: i0, template: `<thy-input-number
|
10457
|
+
class="h-100"
|
10458
|
+
[thyAutoFocus]="true"
|
10459
|
+
[(ngModel)]="modelValue"
|
10460
|
+
(thyEnter)="updateValue()"
|
10461
|
+
(thyBlur)="updateValue()"
|
10462
|
+
/> `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }, { kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
10463
|
+
}
|
10464
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: NumberCellEditorComponent, decorators: [{
|
10465
|
+
type: Component,
|
10466
|
+
args: [{
|
10467
|
+
selector: 'number-cell-editor',
|
10468
|
+
template: `<thy-input-number
|
10469
|
+
class="h-100"
|
10470
|
+
[thyAutoFocus]="true"
|
10471
|
+
[(ngModel)]="modelValue"
|
10472
|
+
(thyEnter)="updateValue()"
|
10473
|
+
(thyBlur)="updateValue()"
|
10474
|
+
/> `,
|
10475
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
10476
|
+
imports: [FormsModule, ThyEnterDirective, ThyInputNumber],
|
10477
|
+
host: {
|
10478
|
+
class: 'number-cell-editor'
|
10479
|
+
}
|
10480
|
+
}]
|
10481
|
+
}] });
|
10482
|
+
|
10483
|
+
class SelectOptionComponent {
|
10484
|
+
constructor() {
|
10485
|
+
this.field = input.required();
|
10486
|
+
this.displayOption = input.required();
|
10487
|
+
this.optionStyle = computed(() => {
|
10488
|
+
return this.field().settings.option_style || AITableSelectOptionStyle.text;
|
10489
|
+
});
|
10490
|
+
this.AITableSelectOptionStyle = AITableSelectOptionStyle;
|
10491
|
+
}
|
10492
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
10493
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: SelectOptionComponent, isStandalone: true, selector: "select-option", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, displayOption: { classPropertyName: "displayOption", publicName: "displayOption", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class.select-option-tag": "optionStyle === AITableSelectOptionStyle.tag" }, classAttribute: "select-option thy-text" }, ngImport: i0, template: "@if (displayOption(); as displayOption) {\n @switch (optionStyle()) {\n @case (AITableSelectOptionStyle.dot) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @case (AITableSelectOptionStyle.tag) {\n @if (displayOption.bg_color || displayOption.color || 'default'; as color) {\n <thy-tag thyTheme=\"fill\" thyShape=\"pill\" [thyColor]=\"color\">\n @if (displayOption['icon']) {\n <thy-icon class=\"text-white\" [thyIconName]=\"displayOption['icon']\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n </thy-tag>\n }\n }\n @case (AITableSelectOptionStyle.piece) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot thyShape=\"square\" [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @default {\n @if (displayOption['icon']) {\n <thy-icon [thyIconName]=\"displayOption['icon']\" [style.color]=\"displayOption.color\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyTag, selector: "thy-tag,[thyTag]", inputs: ["thyTag", "thyShape", "thyColor", "thyTheme", "thySize", "thyHoverable"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "ngmodule", type: ThyTooltipModule }, { kind: "component", type: ThyDot, selector: "thy-dot,[thy-dot],[thyDot]", inputs: ["thyColor", "thySize", "thyTheme", "thyShape"] }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
10494
|
+
}
|
10495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionComponent, decorators: [{
|
10496
|
+
type: Component,
|
10497
|
+
args: [{ selector: 'select-option', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
10498
|
+
class: 'select-option thy-text',
|
10499
|
+
'[class.select-option-tag]': 'optionStyle === AITableSelectOptionStyle.tag'
|
10500
|
+
}, imports: [ThyTag, ThyIcon, ThyTooltipModule, ThyDot, ThyFlexibleText], template: "@if (displayOption(); as displayOption) {\n @switch (optionStyle()) {\n @case (AITableSelectOptionStyle.dot) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @case (AITableSelectOptionStyle.tag) {\n @if (displayOption.bg_color || displayOption.color || 'default'; as color) {\n <thy-tag thyTheme=\"fill\" thyShape=\"pill\" [thyColor]=\"color\">\n @if (displayOption['icon']) {\n <thy-icon class=\"text-white\" [thyIconName]=\"displayOption['icon']\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n </thy-tag>\n }\n }\n @case (AITableSelectOptionStyle.piece) {\n @if (displayOption.bg_color || displayOption.color; as color) {\n <thy-dot thyShape=\"square\" [thyColor]=\"color\" [thySize]=\"'md'\" class=\"mr-2\"></thy-dot>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n @default {\n @if (displayOption['icon']) {\n <thy-icon [thyIconName]=\"displayOption['icon']\" [style.color]=\"displayOption.color\"></thy-icon>\n }\n <span thyFlexibleText [thyTooltipContent]=\"displayOption.text\">{{ displayOption.text }}</span>\n }\n }\n}\n" }]
|
10501
|
+
}] });
|
10502
|
+
|
10503
|
+
class SelectCellEditorComponent extends AbstractEditCellEditor {
|
10504
|
+
get isMultiple() {
|
10505
|
+
return !!this.field().settings.is_multiple;
|
10506
|
+
}
|
10507
|
+
constructor() {
|
10508
|
+
super();
|
10509
|
+
this.selectOptions = computed(() => {
|
10510
|
+
return this.field().settings.options;
|
10511
|
+
});
|
10512
|
+
this.preset = computed(() => {
|
10513
|
+
return this.field().settings.is_multiple && this.field().settings.option_style === AITableSelectOptionStyle.tag ? 'tag' : '';
|
10514
|
+
});
|
10515
|
+
}
|
10516
|
+
ngOnInit() {
|
10517
|
+
this.modelValue = computed(() => {
|
10518
|
+
const value = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]);
|
10519
|
+
if (!this.isMultiple) {
|
10520
|
+
return value?.length > 0 ? value[0] : null;
|
10521
|
+
}
|
10522
|
+
return value || [];
|
10523
|
+
})();
|
10524
|
+
}
|
10525
|
+
onOpenChange(value) {
|
10526
|
+
if (!value) {
|
10527
|
+
this.closePopover();
|
10528
|
+
}
|
10529
|
+
}
|
10530
|
+
onModelChange(event) {
|
10531
|
+
this.updateValueFn();
|
10532
|
+
}
|
10533
|
+
updateValueFn() {
|
10534
|
+
const value = (this.isMultiple ? this.modelValue : (this.modelValue && [this.modelValue]) || []);
|
10535
|
+
const originValue = AITableQueries.getFieldValue(this.aiTable, [this.record()._id, this.field()._id]) || [];
|
10536
|
+
if (value.length !== originValue.length || !value.every((v, i) => v === originValue[i])) {
|
10537
|
+
this.updateFieldValues.emit([
|
10538
|
+
{
|
10539
|
+
value: value,
|
10540
|
+
path: [this.record()._id, this.field()._id]
|
10541
|
+
}
|
10542
|
+
]);
|
10543
|
+
}
|
10544
|
+
}
|
10545
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectCellEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
10546
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: SelectCellEditorComponent, isStandalone: true, selector: "select-cell-editor", host: { classAttribute: "d-block h-100 select-cell-editor" }, usesInheritance: true, ngImport: i0, template: "<thy-select\n [(ngModel)]=\"modelValue\"\n [thyAutoExpand]=\"true\"\n [thyAllowClear]=\"true\"\n [thyPlaceHolder]=\"''\"\n [thyPreset]=\"preset()\"\n [thyMode]=\"field().settings.is_multiple ? 'multiple' : ''\"\n (ngModelChange)=\"onModelChange($event)\"\n (thyOnExpandStatusChange)=\"onOpenChange($event)\"\n>\n <ng-template #selectedDisplay let-option>\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </ng-template>\n @for (option of selectOptions(); track option._id) {\n <thy-option\n [thyValue]=\"option._id\"\n [hidden]=\"!!option.is_disabled\"\n [thyRawValue]=\"option\"\n [thyShowOptionCustom]=\"true\"\n [thyLabelText]=\"option.text\"\n >\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </thy-option>\n }\n</thy-select>\n", dependencies: [{ kind: "component", type: ThySelect, selector: "thy-select,thy-custom-select", inputs: ["thyDropdownWidthMode", "thyShowSearch", "thyPlaceHolder", "thyServerSearch", "thyLoadState", "thyAutoActiveFirstItem", "thyMode", "thySize", "thyEmptyStateText", "thyEmptySearchMessageText", "thyEnableScrollLoad", "thyAllowClear", "thyDisabled", "thySortComparator", "thyFooterTemplate", "thyPlacement", "thyOrigin", "thyFooterClass", "thyAutoExpand", "thyHasBackdrop", "thyMaxTagCount", "thyBorderless", "thyOptions", "thyPreset"], outputs: ["thyOnSearch", "thyOnScrollToBottom", "thyOnExpandStatusChange"], exportAs: ["thySelect"] }, { kind: "component", type: ThyOption, selector: "thy-option", inputs: ["thyValue", "thyRawValue", "thyLabelText", "thyShowOptionCustom", "thySearchKey", "thyDisabled"], outputs: ["selectionChange", "visibleChange"] }, { kind: "ngmodule", type: ThyTooltipModule }, { kind: "component", type: SelectOptionComponent, selector: "select-option", inputs: ["field", "displayOption"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ThyEmptyModule }, { kind: "ngmodule", type: ThyFormModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ThySelectModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
10547
|
+
}
|
10548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectCellEditorComponent, decorators: [{
|
10549
|
+
type: Component,
|
10550
|
+
args: [{ selector: 'select-cell-editor', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
10551
|
+
class: 'd-block h-100 select-cell-editor'
|
10552
|
+
}, imports: [
|
10553
|
+
ThySelect,
|
10554
|
+
ThyOption,
|
10555
|
+
ThyTooltipModule,
|
10556
|
+
SelectOptionComponent,
|
10557
|
+
CommonModule,
|
10558
|
+
ThyEmptyModule,
|
10559
|
+
ThyFormModule,
|
10560
|
+
FormsModule,
|
10561
|
+
ThySelectModule
|
10562
|
+
], template: "<thy-select\n [(ngModel)]=\"modelValue\"\n [thyAutoExpand]=\"true\"\n [thyAllowClear]=\"true\"\n [thyPlaceHolder]=\"''\"\n [thyPreset]=\"preset()\"\n [thyMode]=\"field().settings.is_multiple ? 'multiple' : ''\"\n (ngModelChange)=\"onModelChange($event)\"\n (thyOnExpandStatusChange)=\"onOpenChange($event)\"\n>\n <ng-template #selectedDisplay let-option>\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </ng-template>\n @for (option of selectOptions(); track option._id) {\n <thy-option\n [thyValue]=\"option._id\"\n [hidden]=\"!!option.is_disabled\"\n [thyRawValue]=\"option\"\n [thyShowOptionCustom]=\"true\"\n [thyLabelText]=\"option.text\"\n >\n <select-option [field]=\"field()\" [displayOption]=\"option\"></select-option>\n </thy-option>\n }\n</thy-select>\n" }]
|
10563
|
+
}], ctorParameters: () => [] });
|
10564
|
+
|
10565
|
+
class TextCellEditorComponent extends AbstractEditCellEditor {
|
10566
|
+
constructor() {
|
10567
|
+
super();
|
10568
|
+
this.render2 = inject(Renderer2);
|
10569
|
+
this.maxHeight = 148;
|
10570
|
+
this.minHeight = 24;
|
10571
|
+
this.isSelectAll = input(false);
|
10572
|
+
}
|
10573
|
+
ngAfterViewInit() {
|
10574
|
+
setTimeout(() => {
|
10575
|
+
this.updateStyle();
|
10576
|
+
this.handleSelectAll();
|
10577
|
+
}, 0);
|
10578
|
+
}
|
10579
|
+
updateStyle() {
|
10580
|
+
const textarea = this.elementRef.nativeElement.querySelector('textarea');
|
10581
|
+
if (textarea) {
|
10582
|
+
this.render2.setStyle(textarea, 'height', 'auto');
|
10583
|
+
const scrollHeight = textarea.scrollHeight;
|
10584
|
+
const newHeight = Math.max(this.minHeight, Math.min(scrollHeight, this.maxHeight)) + 4;
|
10585
|
+
this.render2.setStyle(textarea, 'max-height', `${this.maxHeight}px`);
|
10586
|
+
this.render2.setStyle(textarea, 'height', `${newHeight}px`);
|
10587
|
+
this.render2.setStyle(textarea, 'resize', 'none');
|
10588
|
+
}
|
10589
|
+
}
|
10590
|
+
handleSelectAll() {
|
10591
|
+
if (this.isSelectAll()) {
|
10592
|
+
const textarea = this.elementRef.nativeElement.querySelector('textarea');
|
10593
|
+
textarea.select();
|
10594
|
+
}
|
10595
|
+
}
|
10596
|
+
valueChange() {
|
10597
|
+
this.updateStyle();
|
10598
|
+
}
|
10599
|
+
updateValue() {
|
10600
|
+
super.update();
|
10601
|
+
this.closePopover();
|
10602
|
+
}
|
10603
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextCellEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
10604
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.10", type: TextCellEditorComponent, isStandalone: true, selector: "text-cell-editor", inputs: { isSelectAll: { classPropertyName: "isSelectAll", publicName: "isSelectAll", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "text-cell-editor" }, usesInheritance: true, ngImport: i0, template: `
|
10605
|
+
<textarea
|
10606
|
+
#textarea
|
10607
|
+
placeholder=""
|
10608
|
+
rows="1"
|
10609
|
+
thyInput
|
10610
|
+
[thyAutofocus]="true"
|
10611
|
+
[(ngModel)]="modelValue"
|
10612
|
+
(ngModelChange)="valueChange()"
|
10613
|
+
(thyEnter)="updateValue()"
|
10614
|
+
(blur)="updateValue()"
|
10615
|
+
></textarea>
|
10616
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { 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.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyEnterDirective, selector: "[thyEnter]", outputs: ["thyEnter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
10617
|
+
}
|
10618
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: TextCellEditorComponent, decorators: [{
|
10619
|
+
type: Component,
|
10620
|
+
args: [{
|
10621
|
+
selector: 'text-cell-editor',
|
10622
|
+
template: `
|
10623
|
+
<textarea
|
10624
|
+
#textarea
|
10625
|
+
placeholder=""
|
10626
|
+
rows="1"
|
10627
|
+
thyInput
|
10628
|
+
[thyAutofocus]="true"
|
10629
|
+
[(ngModel)]="modelValue"
|
10630
|
+
(ngModelChange)="valueChange()"
|
10631
|
+
(thyEnter)="updateValue()"
|
10632
|
+
(blur)="updateValue()"
|
10633
|
+
></textarea>
|
10634
|
+
`,
|
10635
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
10636
|
+
imports: [FormsModule, ThyAutofocusDirective, ThyInputDirective, ThyEnterDirective],
|
10637
|
+
host: {
|
10638
|
+
class: 'text-cell-editor'
|
10639
|
+
}
|
10640
|
+
}]
|
10641
|
+
}], ctorParameters: () => [] });
|
10642
|
+
|
10643
|
+
class SelectOptionPipe {
|
10644
|
+
transform(_id, options) {
|
10645
|
+
return options?.length && options.find((item) => item._id === _id);
|
10646
|
+
}
|
10647
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10648
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, isStandalone: true, name: "selectOption" }); }
|
10649
|
+
}
|
10650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionPipe, decorators: [{
|
10651
|
+
type: Pipe,
|
10652
|
+
args: [{
|
10653
|
+
name: 'selectOption'
|
10654
|
+
}]
|
10655
|
+
}] });
|
10656
|
+
class SelectOptionsPipe {
|
10657
|
+
transform(ids, options = []) {
|
10658
|
+
return ((ids?.length &&
|
10659
|
+
ids.map((id) => {
|
10660
|
+
return options.find((item) => item._id === id);
|
10661
|
+
})) ||
|
10662
|
+
[]);
|
10663
|
+
}
|
10664
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10665
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, isStandalone: true, name: "selectOptions" }); }
|
10666
|
+
}
|
10667
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectOptionsPipe, decorators: [{
|
10668
|
+
type: Pipe,
|
10669
|
+
args: [{
|
10670
|
+
name: 'selectOptions'
|
10671
|
+
}]
|
10672
|
+
}] });
|
10673
|
+
class IsSelectRecordPipe {
|
10674
|
+
transform(recordId, selection) {
|
10675
|
+
return selection.selectedRecords.has(recordId);
|
10676
|
+
}
|
10677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10678
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, isStandalone: true, name: "isSelectRecord" }); }
|
10679
|
+
}
|
10680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: IsSelectRecordPipe, decorators: [{
|
10681
|
+
type: Pipe,
|
10682
|
+
args: [{
|
10683
|
+
name: 'isSelectRecord'
|
10684
|
+
}]
|
10685
|
+
}] });
|
10686
|
+
class UserPipe {
|
10687
|
+
transform(values, references) {
|
10688
|
+
return ((values.length &&
|
10689
|
+
values.map((item) => {
|
10690
|
+
return references.members[item] || {};
|
10691
|
+
})) ||
|
10692
|
+
[]);
|
10693
|
+
}
|
10694
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10695
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, isStandalone: true, name: "user" }); }
|
10696
|
+
}
|
10697
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: UserPipe, decorators: [{
|
10698
|
+
type: Pipe,
|
10699
|
+
args: [{
|
10700
|
+
name: 'user'
|
10701
|
+
}]
|
10702
|
+
}] });
|
10703
|
+
class SelectSettingPipe {
|
10704
|
+
transform(settings) {
|
10705
|
+
return settings;
|
10706
|
+
}
|
10707
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10708
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, isStandalone: true, name: "selectSetting" }); }
|
10709
|
+
}
|
10710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: SelectSettingPipe, decorators: [{
|
10711
|
+
type: Pipe,
|
10712
|
+
args: [{
|
10713
|
+
name: 'selectSetting'
|
10714
|
+
}]
|
10715
|
+
}] });
|
10716
|
+
class MemberSettingPipe {
|
10717
|
+
transform(settings) {
|
10718
|
+
return settings;
|
10719
|
+
}
|
10720
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10721
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, isStandalone: true, name: "memberSetting" }); }
|
10722
|
+
}
|
10723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: MemberSettingPipe, decorators: [{
|
10724
|
+
type: Pipe,
|
10725
|
+
args: [{
|
10726
|
+
name: 'memberSetting'
|
10727
|
+
}]
|
10728
|
+
}] });
|
10729
|
+
class AITableFieldIsSameOptionPipe {
|
10730
|
+
transform(fieldOption, field) {
|
10731
|
+
return isSameFieldOption(fieldOption, field);
|
10732
|
+
}
|
10733
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
10734
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, isStandalone: true, name: "fieldIsSameOption" }); }
|
10735
|
+
}
|
10736
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldIsSameOptionPipe, decorators: [{
|
10737
|
+
type: Pipe,
|
10738
|
+
args: [{
|
10739
|
+
name: 'fieldIsSameOption'
|
10740
|
+
}]
|
10741
|
+
}] });
|
10742
|
+
|
10743
|
+
class AITableFieldSetting {
|
10744
|
+
constructor() {
|
10745
|
+
this.aiEditField = model.required();
|
10746
|
+
this.aiTable = input.required();
|
10747
|
+
this.aiExternalTemplate = input(null);
|
10748
|
+
this.aiReferences = input();
|
10749
|
+
this.isUpdate = input(false, { transform: booleanAttribute });
|
10750
|
+
this.addField = output();
|
10751
|
+
this.setField = output();
|
10752
|
+
this.selectedFieldOption = computed(() => {
|
10753
|
+
return getFieldOptionByField(this.aiTable(), this.aiEditField());
|
10754
|
+
});
|
10755
|
+
this.fieldMaxLength = 32;
|
10756
|
+
this.validatorConfig = computed(() => {
|
10757
|
+
return {
|
10758
|
+
validationMessages: {
|
10759
|
+
fieldName: {
|
10760
|
+
required: getI18nTextByKey(this.aiTable(), AITableGridI18nKey.fieldNameRequired),
|
10761
|
+
thyUniqueCheck: getI18nTextByKey(this.aiTable(), AITableGridI18nKey.fieldNameDuplicate)
|
10762
|
+
}
|
10755
10763
|
}
|
10756
10764
|
};
|
10757
10765
|
});
|
@@ -10892,7 +10900,7 @@ class AITableGridSelectionService {
|
|
10892
10900
|
initialize(aiTable) {
|
10893
10901
|
this.aiTable = aiTable;
|
10894
10902
|
}
|
10895
|
-
clearSelection() {
|
10903
|
+
clearSelection(options) {
|
10896
10904
|
this.aiTable.selection.set({
|
10897
10905
|
selectedRecords: new Set(),
|
10898
10906
|
selectedFields: new Set(),
|
@@ -10900,7 +10908,8 @@ class AITableGridSelectionService {
|
|
10900
10908
|
activeCell: null,
|
10901
10909
|
expandCell: null,
|
10902
10910
|
editingCell: null,
|
10903
|
-
selectAllState: AITableSelectAllState.none
|
10911
|
+
selectAllState: AITableSelectAllState.none,
|
10912
|
+
expandCellInfo: options?.retainExpandCellInfo ? this.aiTable.selection().expandCellInfo : null
|
10904
10913
|
});
|
10905
10914
|
}
|
10906
10915
|
setActiveCell(activeCell) {
|
@@ -10998,6 +11007,11 @@ class AITableGridSelectionService {
|
|
10998
11007
|
selectedCells.add(`${startRecordId}:${startFieldId}`);
|
10999
11008
|
}
|
11000
11009
|
else {
|
11010
|
+
// 数据的存储设计结构,决定了最后一条就是endCell
|
11011
|
+
const lastItem = Array.from(this.aiTable.selection().selectedCells).pop();
|
11012
|
+
if (endCell.join(':') === lastItem) {
|
11013
|
+
return;
|
11014
|
+
}
|
11001
11015
|
const [endRecordId, endFieldId] = endCell;
|
11002
11016
|
const startRowIndex = this.aiTable.context.visibleRowsIndexMap().get(startRecordId);
|
11003
11017
|
const endRowIndex = this.aiTable.context.visibleRowsIndexMap().get(endRecordId);
|
@@ -11014,8 +11028,11 @@ class AITableGridSelectionService {
|
|
11014
11028
|
}
|
11015
11029
|
}
|
11016
11030
|
this.clearSelection();
|
11017
|
-
this.
|
11018
|
-
|
11031
|
+
this.aiTable.selection.set({
|
11032
|
+
...this.aiTable.selection(),
|
11033
|
+
activeCell: activeCell || startCell,
|
11034
|
+
selectedCells: selectedCells
|
11035
|
+
});
|
11019
11036
|
}
|
11020
11037
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
11021
11038
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridSelectionService }); }
|
@@ -11418,6 +11435,7 @@ class AITableGridBase {
|
|
11418
11435
|
this.aiBuildRenderDataFn = input();
|
11419
11436
|
this.aiGetI18nTextByKey = input();
|
11420
11437
|
this.aiKeywords = input();
|
11438
|
+
this.aiFrozenColumnCountFn = input();
|
11421
11439
|
this.AITableFieldType = AITableFieldType;
|
11422
11440
|
this.AITableSelectOptionStyle = AITableSelectOptionStyle;
|
11423
11441
|
this.isSelectedAll = computed(() => {
|
@@ -11537,7 +11555,7 @@ class AITableGridBase {
|
|
11537
11555
|
}
|
11538
11556
|
}
|
11539
11557
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
11540
|
-
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", aiSetFieldStatType: "aiSetFieldStatType", aiMoveRecords: "aiMoveRecords", aiClick: "aiClick", aiDbClick: "aiDbClick" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
11558
|
+
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 }, aiFrozenColumnCountFn: { classPropertyName: "aiFrozenColumnCountFn", publicName: "aiFrozenColumnCountFn", 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", aiSetFieldStatType: "aiSetFieldStatType", aiMoveRecords: "aiMoveRecords", aiClick: "aiClick", aiDbClick: "aiDbClick" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
11541
11559
|
}
|
11542
11560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableGridBase, decorators: [{
|
11543
11561
|
type: Component,
|
@@ -11878,9 +11896,16 @@ class AITableDragComponent {
|
|
11878
11896
|
this.containerHeight = this.elementRef.nativeElement.offsetHeight;
|
11879
11897
|
const moveX = e.x - (this.mouseStartPosition?.x || 0);
|
11880
11898
|
const moveY = e.y - (this.mouseStartPosition?.y || 0);
|
11899
|
+
let direction = DragDirection.none;
|
11881
11900
|
switch (drag.type) {
|
11882
11901
|
case DragType.field:
|
11883
|
-
|
11902
|
+
if (e.movementX > 0) {
|
11903
|
+
direction = DragDirection.right;
|
11904
|
+
}
|
11905
|
+
else if (e.movementX < 0) {
|
11906
|
+
direction = DragDirection.left;
|
11907
|
+
}
|
11908
|
+
this.movingColumn(drag, moveX, direction);
|
11884
11909
|
break;
|
11885
11910
|
case DragType.record:
|
11886
11911
|
this.movingRecord(drag, moveY);
|
@@ -11890,19 +11915,20 @@ class AITableDragComponent {
|
|
11890
11915
|
break;
|
11891
11916
|
}
|
11892
11917
|
}
|
11893
|
-
movingColumn(drag, moveX) {
|
11918
|
+
movingColumn(drag, moveX, direction) {
|
11894
11919
|
const aiTable = this.aiTableGridSelectionService.aiTable;
|
11895
11920
|
const scroll = { x: this.horizontalBarElement?.scrollLeft || 0, y: 0 };
|
11896
11921
|
const coordinate = drag.coordinate;
|
11897
11922
|
const fields = aiTable.gridData().fields;
|
11898
11923
|
const width = this.calculateDragWidth(fields, coordinate, drag);
|
11899
11924
|
const visibleColumnIndexMap = aiTable.context.visibleColumnsIndexMap();
|
11925
|
+
const rowHeadWidth = aiTable.context.rowHeadWidth();
|
11900
11926
|
const sourceColumnIndex = visibleColumnIndexMap.get(drag.sourceIds.values().next().value) || 0;
|
11901
11927
|
const sourceColumnStartX = coordinate.getColumnOffset(sourceColumnIndex);
|
11902
11928
|
const sourceColumnWidth = coordinate.getColumnWidth(sourceColumnIndex);
|
11903
|
-
|
11904
|
-
const isSourceColumnFrozen = sourceColumnIndex ===
|
11905
|
-
const frozenColumnWidth = coordinate.getColumnWidth(0);
|
11929
|
+
const frozenColumnCount = aiTable.context.frozenColumnCount();
|
11930
|
+
const isSourceColumnFrozen = sourceColumnIndex === frozenColumnCount - 1;
|
11931
|
+
const frozenColumnWidth = Array.from({ length: frozenColumnCount }).reduce((acc, _, index) => acc + coordinate.getColumnWidth(index), 0);
|
11906
11932
|
const pointerX = moveX + sourceColumnStartX;
|
11907
11933
|
// 拖拽中心点
|
11908
11934
|
const dragCenter = sourceColumnWidth / 2;
|
@@ -11932,8 +11958,8 @@ class AITableDragComponent {
|
|
11932
11958
|
if ((targetColumnIndex >= 0 && (targetColumnIndex - sourceColumnIndex > 1 || targetColumnIndex - sourceColumnIndex < 0)) ||
|
11933
11959
|
isLastColumn) {
|
11934
11960
|
let lineLeft = targetColumnStartX - scrollPosition.x;
|
11935
|
-
const lineForFrozenX = lineLeft - frozenColumnWidth -
|
11936
|
-
const rectDistanceFrozenX = rectLeft - frozenColumnWidth -
|
11961
|
+
const lineForFrozenX = lineLeft - frozenColumnWidth - rowHeadWidth;
|
11962
|
+
const rectDistanceFrozenX = rectLeft - frozenColumnWidth - rowHeadWidth;
|
11937
11963
|
if (lineForFrozenX < 0) {
|
11938
11964
|
if (Math.abs(rectDistanceFrozenX) < dragCenter) {
|
11939
11965
|
// 滚动中保持上一个位置
|
@@ -11949,6 +11975,12 @@ class AITableDragComponent {
|
|
11949
11975
|
};
|
11950
11976
|
return;
|
11951
11977
|
}
|
11978
|
+
if (isSourceColumnFrozen) {
|
11979
|
+
// 拖拽的列是冻结列,且目标列在冻结列左侧,不显示辅助线
|
11980
|
+
this.resetAuxiliaryLine();
|
11981
|
+
this.draggedData = null;
|
11982
|
+
return;
|
11983
|
+
}
|
11952
11984
|
}
|
11953
11985
|
this.setAuxiliaryLineStyles({
|
11954
11986
|
width: '2px',
|
@@ -11973,6 +12005,12 @@ class AITableDragComponent {
|
|
11973
12005
|
}
|
11974
12006
|
};
|
11975
12007
|
updateTargetAndLine(currentRectLeft, newScrollPosition);
|
12008
|
+
if (isSourceColumnFrozen &&
|
12009
|
+
(direction === DragDirection.right || direction === DragDirection.none) &&
|
12010
|
+
currentRectLeft < frozenColumnWidth + rowHeadWidth + AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD) {
|
12011
|
+
// 拖拽的列是冻结列,方向是向右,且当前列在冻结列左侧,不滚动
|
12012
|
+
return;
|
12013
|
+
}
|
11976
12014
|
this.scrollControllerService.scroll({
|
11977
12015
|
container: {
|
11978
12016
|
width: this.containerWidth,
|
@@ -11989,7 +12027,7 @@ class AITableDragComponent {
|
|
11989
12027
|
horizontalElement: this.horizontalBarElement
|
11990
12028
|
},
|
11991
12029
|
frozenArea: {
|
11992
|
-
left: frozenColumnWidth +
|
12030
|
+
left: frozenColumnWidth + rowHeadWidth
|
11993
12031
|
},
|
11994
12032
|
edgeThreshold: {
|
11995
12033
|
left: AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD,
|
@@ -12214,7 +12252,14 @@ class AITableGrid extends AITableGridBase {
|
|
12214
12252
|
this.isPopoverOpen = false;
|
12215
12253
|
this.fieldHeadHeight = AI_TABLE_FIELD_HEAD_HEIGHT;
|
12216
12254
|
this.containerRect = signal({ width: 0, height: 0 });
|
12217
|
-
this.frozenColumnCount =
|
12255
|
+
this.frozenColumnCount = computed(() => {
|
12256
|
+
const containerWidth = this.containerRect().width;
|
12257
|
+
const aiFrozenColumnCountFn = this.aiFrozenColumnCountFn();
|
12258
|
+
if (aiFrozenColumnCountFn) {
|
12259
|
+
return aiFrozenColumnCountFn(containerWidth);
|
12260
|
+
}
|
12261
|
+
return AI_TABLE_MIN_FROZEN_COLUMN_COUNT;
|
12262
|
+
});
|
12218
12263
|
this.hasContainerRect = computed(() => {
|
12219
12264
|
return this.containerRect().width > 0 && this.containerRect().height > 0;
|
12220
12265
|
});
|
@@ -12421,6 +12466,7 @@ class AITableGrid extends AITableGridBase {
|
|
12421
12466
|
}
|
12422
12467
|
initContext() {
|
12423
12468
|
this.aiTable.context = new RendererContext({
|
12469
|
+
containerRect: this.containerRect,
|
12424
12470
|
rowHeadWidth: computed(() => {
|
12425
12471
|
const aiFieldConfig = this.aiFieldConfig();
|
12426
12472
|
let width = AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH;
|
@@ -12556,6 +12602,7 @@ class AITableGrid extends AITableGridBase {
|
|
12556
12602
|
if (expandRecordId !== recordId || expandFieldId !== fieldId) {
|
12557
12603
|
const field = this.aiTable.fieldsMap()[fieldId];
|
12558
12604
|
if (field.type === AITableFieldType.text) {
|
12605
|
+
this.aiTableGridSelectionService.clearSelection({ retainExpandCellInfo: true });
|
12559
12606
|
expandCell(this.aiTable, [recordId, fieldId]);
|
12560
12607
|
}
|
12561
12608
|
else {
|
@@ -13067,5 +13114,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
13067
13114
|
* Generated bundle index. Do not edit.
|
13068
13115
|
*/
|
13069
13116
|
|
13070
|
-
export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellCheckbox, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCellText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenFieldShadow, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, 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_LINE_BORDER, 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_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_INNER_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, 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_OPTION_MULTI_ITEM_FONT_SIZE, 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_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnCheckboxFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellBase, 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, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setMouseStyle, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
|
13117
|
+
export { AITable, AITableActionIcon, AITableAddField, AITableAreaType, AITableAvatarSize, AITableAvatarType, AITableBackground, AITableCellAttachment, AITableCellCheckbox, AITableCellLink, AITableCellProgress, AITableCellRate, AITableCellRichText, AITableCellText, AITableCells, AITableCheckType, AITableColumnHeads, AITableContextMenu, AITableDomGrid, AITableFieldHead, AITableFieldIcon, AITableFieldIsSameOptionPipe, AITableFieldSetting, AITableFrozenCells, AITableFrozenColumnHeads, AITableFrozenFieldShadow, AITableFrozenPlaceholderCells, AITableGrid, AITableGridEventService, AITableGridFieldService, AITableGridI18nKey, AITableGridI18nText, AITableGridSelectionService, AITableHoverRowHeads, AITableIcon, AITableMemberType, AITableMouseDownType, AITableOtherRows, AITablePlaceholderCells, AITableQueries, AITableRenderer, AITableRowType, AITableScrollableGroup, AITableSelectAllState, AITableTextComponent, AI_TABLE_ACTION_COMMON_RADIUS, AI_TABLE_ACTION_COMMON_RIGHT_PADDING, AI_TABLE_ACTION_COMMON_SIZE, AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD, AI_TABLE_AUTO_SCROLL_LEFT_THRESHOLD, AI_TABLE_AUTO_SCROLL_RIGHT_THRESHOLD, AI_TABLE_AUTO_SCROLL_TOP_THRESHOLD, 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_LINE_BORDER, 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_FIELD_STAT_BG, AI_TABLE_FIELD_STAT_CONTAINER_HEIGHT, AI_TABLE_FIELD_STAT_INNER_HEIGHT, AI_TABLE_FILE_ICON_ITEM_HEIGHT, AI_TABLE_FILE_ICON_SIZE, AI_TABLE_FILL_HANDLE, AI_TABLE_GRID_FIELD_SERVICE_MAP, AI_TABLE_ICON_COMMON_SIZE, AI_TABLE_INDEX_FIELD_TEXT, 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_OPTION_MULTI_ITEM_FONT_SIZE, 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_POINTER_HEIGHT, AI_TABLE_PROGRESS_BAR_POINTER_WIDTH, AI_TABLE_PROGRESS_BAR_RADIUS, AI_TABLE_PROGRESS_TEXT_WIDTH, AI_TABLE_RATE_MAX, AI_TABLE_ROW_ADD_BUTTON, AI_TABLE_ROW_BLANK_HEIGHT, AI_TABLE_ROW_DRAG, AI_TABLE_ROW_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEAD, AI_TABLE_ROW_HEAD_SIZE, AI_TABLE_ROW_HEAD_WIDTH, AI_TABLE_ROW_HEAD_WIDTH_AND_DRAG_ICON_WIDTH, AI_TABLE_ROW_HEIGHT, AI_TABLE_ROW_SELECT_CHECKBOX, AI_TABLE_SCROLL_BAR_PADDING, AI_TABLE_SCROLL_BAR_SIZE, AI_TABLE_TAG_FONT_SIZE, AI_TABLE_TAG_PADDING, AI_TABLE_TEXT_GAP, AI_TABLE_TEXT_LINE_HEIGHT, AbstractEditCellEditor, AddOutlinedPath, AngleDownPath, AttachmentField, AttachmentPath, CellDrawer, Check, Colors, ColumnCalendarFilledPath, ColumnCheckboxFilledPath, ColumnLinkOutlinedPath, ColumnMemberFilledPath, ColumnMultipleFillPath, ColumnNumberFilledPath, ColumnProgressFilledPath, ColumnRatingFilledPath, ColumnRichTextFilledPath, ColumnSelectFilledPath, ColumnTextFilledPath, Coordinate, CoverCellBase, 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, DateField, DepartmentOutlinedPath, Drawer, EditPath, FONT_SIZE_SM, FieldModelMap, IconPathMap, IsSelectRecordPipe, KO_CONTAINER_TOKEN, KoComponent, KoContainer, KoShape, KoShapeTypes, KoStage, LinkCellEditorComponent, LinkField, MIN_COLUMN_WIDTH, MemberField, MemberSettingPipe, MoreStandOutlinedPath, NumberCellEditorComponent, NumberField, ProgressField, RateField, RendererContext, RichTextField, RowDragPath, RowHeight, SelectCellEditorComponent, SelectField, SelectOptionComponent, SelectOptionPipe, SelectOptionsPipe, SelectSettingPipe, StarFill, TextCellEditorComponent, TextField, TextMeasure, Unchecked, UserPipe, WebOutlinedPath, aiTableFragmentAttribute, aiTableImageConfigToKonvaConfig, aiTableRectConfigToKonvaConfig, aiTableTextConfigToKonvaConfig, applyNodeProps, buildClipboardData, buildGridData, buildGridLinearRows, castToString, cellDrawer, clearCells, compareNumber, compareOption, compareString, createAITable, createActiveCellBorder, createCells, createDefaultField, createDefaultFieldName, createListener, dragFillHighlightArea, drawer, expandCell, extractLinkUrl, extractText, generateNewName, generateTargetName, getAvatarBgColor, getAvatarShortName, getCellEditorBorderSpace, getCellHorizontalPosition, getColumnIndicesSizeMap, getCoverCell, getDateFieldValues, getDefaultFieldOptions, getDefaultFieldValue, getDefaultI18nTextByKey, getDetailByTargetName, getEditorBoxOffset, getEditorSpace, getFieldOptionByField, getFieldOptionMap, getFieldOptions, getFieldValue, getFileThumbnailSvgString, getFillDirection, getHoverEditorBoxOffset, getHoverEditorSpace, getI18nTextByKey, getMousePosition, getName, getOptionsByFieldAndRecords, getPlaceHolderCellsConfigs, getStartAndEndCell, getSystemFieldValue, getTargetName, getTextWidth, getVisibleRangeInfo, graphemeSplitter, handleMouseStyle, hasIntersect, idCreator, idsCreator, imageCache, isActiveCell, isArrayField, isCellMatchKeywords, isClipboardReadSupported, isClipboardReadTextSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isDateFiled, isEmptyOrNot, isMac, isMeetFilter, isNumberFiled, isSameFieldOption, isSelectedField, isSystemField, isVirtualKey, isWindows, isWindowsOS, isWithinFrozenColumnBoundary, performFill, processPastedValueForSelect, readFromClipboard, scrollMax, setExpandCellInfo, setMouseStyle, shortIdCreator, shortIdsCreator, statDateRangeOfDays, statDateRangeOfMonths, statEarliestTime, statLatestTime, stringInclude, textDataCache, toAttachmentFieldValue, toDateFieldValue, toLinkFieldValue, toMemberFieldValue, toNumberFieldValue, toProgressFieldValue, toRateFieldValue, toRichTextFieldValue, toSelectFieldValue, toTextFieldValue, transformToCellText, updatePicture, writeToAITable, writeToClipboard, zhIntlCollator };
|
13071
13118
|
//# sourceMappingURL=ai-table-grid.mjs.map
|