@ai-table/grid 0.1.15 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/field-setting/field-setting.component.scss +6 -1
- package/constants/colors.d.ts +1 -0
- package/constants/colors.d.ts.map +1 -1
- package/core/types/ai-table.d.ts +1 -0
- package/core/types/ai-table.d.ts.map +1 -1
- package/fesm2022/ai-table-grid.mjs +30 -64
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/grid.component.d.ts +1 -0
- package/grid.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/renderer/components/action-icon.component.d.ts +1 -0
- package/renderer/components/action-icon.component.d.ts.map +1 -1
- package/renderer/drawers/drawer.d.ts +1 -0
- package/renderer/drawers/drawer.d.ts.map +1 -1
- package/services/scroll-controller.service.d.ts +1 -0
- package/services/scroll-controller.service.d.ts.map +1 -1
- package/types/component-config.d.ts +2 -1
- package/types/component-config.d.ts.map +1 -1
- package/utils/field/model/date.d.ts.map +1 -1
- package/utils/field/model/progress.d.ts.map +1 -1
package/constants/colors.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../packages/grid/src/constants/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAkBlB,CAAC"}
|
package/core/types/ai-table.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ai-table.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/types/ai-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACxC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC5C,oBAAoB,EAAE,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,UAAU,EAAE,MAAM,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;KAAE,CAAC,CAAC;IACnD,iBAAiB,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,KAAK,MAAM,CAAC;CACnE;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;AAErD,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"ai-table.d.ts","sourceRoot":"","sources":["../../../../packages/grid/src/core/types/ai-table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC1I,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAE1C,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IACxC,MAAM,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC5C,oBAAoB,EAAE,cAAc,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAClD,UAAU,EAAE,MAAM,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC,CAAC;IACrD,SAAS,EAAE,MAAM,CAAC;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;KAAE,CAAC,CAAC;IACnD,iBAAiB,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,eAAe,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,SAAS,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,GAAG,MAAM,KAAK,MAAM,CAAC;CACnE;AAED,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC;AAErD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;8BAIU,OAAO,GAAG,aAAa;4BAGzB,OAAO,GAAG,cAAc;2BAGzB,OAAO,GAAG,mBAAmB,GAAG,IAAI;gCAG/B,OAAO,GAAG,MAAM,EAAE;2BAavB,OAAO,QAAQ,mBAAmB,GAAG,OAAO;0BAO7C,OAAO,QAAQ,mBAAmB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;4BAYnF,OAAO,eAAe,MAAM;0BAO9B,OAAO,GAAG,QAAQ;CAG3C,CAAC"}
|
@@ -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, AITableSelectOptionStyle, isEmpty, AITableFilterOperation, AttachmentFieldBase, DateFieldBase, isDateValid, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, RateFieldBase, RichTextFieldBase, SelectFieldBase, generateOptionsByTexts, TextFieldBase, FieldModelBaseMap } from '@ai-table/utils';
|
28
|
+
import { AITableFieldGroup, AITableFieldType, AITableRowColumnType, DragType, isUndefinedOrNull, idCreator as idCreator$1, isUrl, AITableSelectOptionStyle, isEmpty, AITableFilterOperation, AttachmentFieldBase, DateFieldBase, isDateValid, isDateAndReturnDate, LinkFieldBase, MemberFieldBase, NumberFieldBase, ProgressFieldBase, isProgress, RateFieldBase, RichTextFieldBase, SelectFieldBase, generateOptionsByTexts, TextFieldBase, FieldModelBaseMap } from '@ai-table/utils';
|
29
29
|
import ObjectID from 'bson-objectid';
|
30
30
|
import { customAlphabet } from 'nanoid';
|
31
31
|
import * as _ from 'lodash';
|
@@ -953,7 +953,8 @@ const Colors = {
|
|
953
953
|
itemActiveBgColor: '#6698ff1a',
|
954
954
|
itemMatchBgColor: '#ff9f731a',
|
955
955
|
waring: '#ffcd5d',
|
956
|
-
success: '#73d897'
|
956
|
+
success: '#73d897',
|
957
|
+
danger: '#ff5b57'
|
957
958
|
};
|
958
959
|
|
959
960
|
const AITable = {
|
@@ -2826,11 +2827,7 @@ function toDateFieldValue(plainText, targetField, originData) {
|
|
2826
2827
|
.map((text) => text.trim())
|
2827
2828
|
.filter((text) => !!text);
|
2828
2829
|
const value = texts && texts.length ? texts[0].trim() : plainText.trim();
|
2829
|
-
|
2830
|
-
if (dateValue) {
|
2831
|
-
return dateValue;
|
2832
|
-
}
|
2833
|
-
return null;
|
2830
|
+
return transformDateValue(value);
|
2834
2831
|
}
|
2835
2832
|
function cellValueToSortValue$3(cellValue) {
|
2836
2833
|
if (isUndefinedOrNull(cellValue) || !isDateValid(cellValue)) {
|
@@ -2839,44 +2836,13 @@ function cellValueToSortValue$3(cellValue) {
|
|
2839
2836
|
return cellValue?.timestamp ?? 0;
|
2840
2837
|
}
|
2841
2838
|
function transformDateValue(text) {
|
2842
|
-
const
|
2843
|
-
if (
|
2844
|
-
return null;
|
2845
|
-
// 基础日期格式:支持识别 - / . 年月日 作为分隔符
|
2846
|
-
const datePattern = String.raw `(?:(\d{2}|\d{4})[-/.年](\d{1,2})[-/.月](\d{1,2})日?)`;
|
2847
|
-
const timePattern = String.raw `(?:\s+(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?`;
|
2848
|
-
const pattern = new RegExp(`^${datePattern}${timePattern}$`);
|
2849
|
-
const match = value.match(pattern);
|
2850
|
-
if (!match)
|
2851
|
-
return null;
|
2852
|
-
try {
|
2853
|
-
let [_, year, month, day] = match;
|
2854
|
-
if (year.length === 2) {
|
2855
|
-
const currentYear = new Date().getFullYear();
|
2856
|
-
const century = Math.floor(currentYear / 100) * 100;
|
2857
|
-
const twoDigitYear = parseInt(year);
|
2858
|
-
year = String(twoDigitYear > currentYear % 100 ? century - 100 + twoDigitYear : century + twoDigitYear);
|
2859
|
-
}
|
2860
|
-
const monthNum = parseInt(month);
|
2861
|
-
const dayNum = parseInt(day);
|
2862
|
-
if (monthNum < 1 || monthNum > 12) {
|
2863
|
-
console.warn('Invalid month:', monthNum);
|
2864
|
-
return null;
|
2865
|
-
}
|
2866
|
-
const maxDays = new Date(parseInt(year), monthNum, 0).getDate();
|
2867
|
-
if (dayNum < 1 || dayNum > maxDays) {
|
2868
|
-
console.warn('Invalid day:', dayNum);
|
2869
|
-
return null;
|
2870
|
-
}
|
2871
|
-
const standardDate = `${year}-${String(monthNum).padStart(2, '0')}-${String(dayNum).padStart(2, '0')}`;
|
2839
|
+
const date = isDateAndReturnDate(text);
|
2840
|
+
if (date) {
|
2872
2841
|
return {
|
2873
|
-
timestamp: new TinyDate(
|
2842
|
+
timestamp: new TinyDate(date).getUnixTime()
|
2874
2843
|
};
|
2875
2844
|
}
|
2876
|
-
|
2877
|
-
console.warn('Invalid date:', value);
|
2878
|
-
return null;
|
2879
|
-
}
|
2845
|
+
return null;
|
2880
2846
|
}
|
2881
2847
|
|
2882
2848
|
class LinkField extends LinkFieldBase {
|
@@ -3116,18 +3082,8 @@ function toProgressFieldValue(plainText, targetField, originData) {
|
|
3116
3082
|
break;
|
3117
3083
|
}
|
3118
3084
|
}
|
3119
|
-
|
3120
|
-
|
3121
|
-
value = parseFloat(value);
|
3122
|
-
}
|
3123
|
-
if (!isEmpty(value)) {
|
3124
|
-
let progressValue = Number(value);
|
3125
|
-
if (!Number.isNaN(progressValue)) {
|
3126
|
-
progressValue = Math.round(progressValue);
|
3127
|
-
if (progressValue >= 0 && progressValue <= 100) {
|
3128
|
-
return progressValue;
|
3129
|
-
}
|
3130
|
-
}
|
3085
|
+
if (isProgress(value)) {
|
3086
|
+
return parseFloat(value);
|
3131
3087
|
}
|
3132
3088
|
return null;
|
3133
3089
|
}
|
@@ -5115,7 +5071,7 @@ class AITableActionIcon {
|
|
5115
5071
|
return { x, y, listening };
|
5116
5072
|
});
|
5117
5073
|
this.squareShapeConfig = computed(() => {
|
5118
|
-
const { name, backgroundWidth, backgroundHeight, coverFill, size = DEFAULT_ICON_SIZE, strokeWidth = 1, cornerRadius } = this.config();
|
5074
|
+
const { name, backgroundWidth, backgroundHeight, hoverFill: coverFill, size = DEFAULT_ICON_SIZE, strokeWidth = 1, cornerRadius, source } = this.config();
|
5119
5075
|
return {
|
5120
5076
|
name,
|
5121
5077
|
width: backgroundWidth || size,
|
@@ -5123,11 +5079,12 @@ class AITableActionIcon {
|
|
5123
5079
|
strokeWidth: strokeWidth,
|
5124
5080
|
fill: coverFill && this.isHover() ? coverFill : Colors.transparent,
|
5125
5081
|
opacity: coverFill && this.isHover() ? 0.1 : 1,
|
5126
|
-
cornerRadius
|
5082
|
+
cornerRadius,
|
5083
|
+
source
|
5127
5084
|
};
|
5128
5085
|
});
|
5129
5086
|
this.iconConfig = computed(() => {
|
5130
|
-
let { type, data, backgroundWidth, backgroundHeight, size = DEFAULT_ICON_SIZE, stroke, strokeWidth = 1, scaleX, scaleY, offsetX, offsetY, rotation, fill,
|
5087
|
+
let { type, data, backgroundWidth, backgroundHeight, size = DEFAULT_ICON_SIZE, stroke, strokeWidth = 1, scaleX, scaleY, offsetX, offsetY, rotation, fill, hoverFill: hoverFill, transformsEnabled = 'position' } = this.config();
|
5131
5088
|
fill = fill || Colors.gray600;
|
5132
5089
|
let pathData = data;
|
5133
5090
|
switch (type) {
|
@@ -5278,7 +5235,7 @@ class AITableCellAttachment extends CoverCellComponent {
|
|
5278
5235
|
y: offsetY,
|
5279
5236
|
data: AddOutlinedPath,
|
5280
5237
|
fill: Colors.gray600,
|
5281
|
-
|
5238
|
+
hoverFill: Colors.primary,
|
5282
5239
|
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
5283
5240
|
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
5284
5241
|
cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
|
@@ -5363,7 +5320,7 @@ class AITableCellRichText extends CoverCellComponent {
|
|
5363
5320
|
y: offsetY,
|
5364
5321
|
data: EditPath,
|
5365
5322
|
fill: Colors.gray600,
|
5366
|
-
|
5323
|
+
hoverFill: Colors.primary,
|
5367
5324
|
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
5368
5325
|
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
5369
5326
|
cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
|
@@ -9021,7 +8978,7 @@ class AITableFieldSetting {
|
|
9021
8978
|
this.thyPopoverRef.close();
|
9022
8979
|
}
|
9023
8980
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldSetting, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
9024
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldSetting, isStandalone: true, selector: "ai-table-field-setting", inputs: { aiEditField: { classPropertyName: "aiEditField", publicName: "aiEditField", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, aiExternalTemplate: { classPropertyName: "aiExternalTemplate", publicName: "aiExternalTemplate", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: false, transformFunction: null }, isUpdate: { classPropertyName: "isUpdate", publicName: "isUpdate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiEditField: "aiEditFieldChange", addField: "addField", setField: "setField" }, host: { classAttribute: "field-setting d-block pl-5 pr-5 pb-5 pt-4" }, ngImport: i0, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig()\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired [thyLabelText]=\"i18nTexts().columnName\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n (ngModelChange)=\"nameChange($event)\"\n required\n [placeholder]=\"i18nTexts().columnNamePlaceholder\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().fieldType\">\n <div class=\"thy-dropdown-menu py-0\">\n <div class=\"ml-n5 mr-n5\">\n <span thyDropdownMenuItem [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" (click)=\"fieldTypeClick($event)\">\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"selectedFieldOption().icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ selectedFieldOption().name }}</span>\n <thy-icon thyDropdownMenuItemExtendIcon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </span>\n </div>\n </div>\n\n @if (selectedFieldOption().type === aITableFieldType.member) {\n <div class=\"d-flex justify-content-between mt-3\">\n {{ i18nTexts().allowMultipleMembers }}\n <thy-switch\n name=\"isMultipleMember\"\n [(ngModel)]=\"isMultipleMember\"\n (ngModelChange)=\"multipleMemberChange()\"\n thySize=\"sm\"\n ></thy-switch>\n </div>\n }\n </thy-form-group>\n @if (aiExternalTemplate()) {\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate()\"></ng-container>\n }\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">{{ i18nTexts().cancel }}</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">{{ i18nTexts().confirm }}</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().base\">\n
|
8981
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableFieldSetting, isStandalone: true, selector: "ai-table-field-setting", inputs: { aiEditField: { classPropertyName: "aiEditField", publicName: "aiEditField", isSignal: true, isRequired: true, transformFunction: null }, aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, aiExternalTemplate: { classPropertyName: "aiExternalTemplate", publicName: "aiExternalTemplate", isSignal: true, isRequired: false, transformFunction: null }, aiReferences: { classPropertyName: "aiReferences", publicName: "aiReferences", isSignal: true, isRequired: false, transformFunction: null }, isUpdate: { classPropertyName: "isUpdate", publicName: "isUpdate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aiEditField: "aiEditFieldChange", addField: "addField", setField: "setField" }, host: { classAttribute: "field-setting d-block pl-5 pr-5 pb-5 pt-4" }, ngImport: i0, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig()\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired [thyLabelText]=\"i18nTexts().columnName\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n (ngModelChange)=\"nameChange($event)\"\n required\n [placeholder]=\"i18nTexts().columnNamePlaceholder\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().fieldType\">\n <div class=\"thy-dropdown-menu py-0\">\n <div class=\"ml-n5 mr-n5\">\n <span thyDropdownMenuItem [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" (click)=\"fieldTypeClick($event)\">\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"selectedFieldOption().icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ selectedFieldOption().name }}</span>\n <thy-icon thyDropdownMenuItemExtendIcon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </span>\n </div>\n </div>\n\n @if (selectedFieldOption().type === aITableFieldType.member) {\n <div class=\"d-flex justify-content-between mt-3\">\n {{ i18nTexts().allowMultipleMembers }}\n <thy-switch\n name=\"isMultipleMember\"\n [(ngModel)]=\"isMultipleMember\"\n (ngModelChange)=\"multipleMemberChange()\"\n thySize=\"sm\"\n ></thy-switch>\n </div>\n }\n </thy-form-group>\n @if (aiExternalTemplate()) {\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate()\"></ng-container>\n }\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">{{ i18nTexts().cancel }}</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">{{ i18nTexts().confirm }}</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n <div class=\"ai-table-field-type-menu\">\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().base\">\n @for (item of fieldOptions().base; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().advanced\">\n @for (item of fieldOptions().advanced; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n </div>\n</thy-dropdown-menu>\n", styles: [":host{width:350px}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyInputGroup, selector: "thy-input-group", inputs: ["thyAppendText", "thyAppendTextTranslateKey", "thyPrependText", "thyPrependTextTranslateKey", "thySize"] }, { kind: "component", type: ThyInputCount, selector: "thy-input-count", inputs: ["thyInput"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "directive", type: ThyUniqueCheckValidator, selector: "[thyUniqueCheck]", inputs: ["thyUniqueCheck"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "component", type: ThyDropdownMenuGroup, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemExtendIconDirective, selector: "[thyDropdownMenuItemExtendIcon]" }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "component", type: ThySwitch, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled", "thyLoading"], outputs: ["thyChange"] }, { kind: "ngmodule", type: ThyFormModule }, { kind: "directive", type: i2.ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "component", type: i2.ThyFormGroup, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: i2.ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: i2.ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "pipe", type: AITableFieldIsSameOptionPipe, name: "fieldIsSameOption" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
9025
8982
|
}
|
9026
8983
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableFieldSetting, decorators: [{
|
9027
8984
|
type: Component,
|
@@ -9048,7 +9005,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
9048
9005
|
AITableFieldIsSameOptionPipe
|
9049
9006
|
], host: {
|
9050
9007
|
class: 'field-setting d-block pl-5 pr-5 pb-5 pt-4'
|
9051
|
-
}, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig()\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired [thyLabelText]=\"i18nTexts().columnName\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n (ngModelChange)=\"nameChange($event)\"\n required\n [placeholder]=\"i18nTexts().columnNamePlaceholder\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().fieldType\">\n <div class=\"thy-dropdown-menu py-0\">\n <div class=\"ml-n5 mr-n5\">\n <span thyDropdownMenuItem [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" (click)=\"fieldTypeClick($event)\">\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"selectedFieldOption().icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ selectedFieldOption().name }}</span>\n <thy-icon thyDropdownMenuItemExtendIcon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </span>\n </div>\n </div>\n\n @if (selectedFieldOption().type === aITableFieldType.member) {\n <div class=\"d-flex justify-content-between mt-3\">\n {{ i18nTexts().allowMultipleMembers }}\n <thy-switch\n name=\"isMultipleMember\"\n [(ngModel)]=\"isMultipleMember\"\n (ngModelChange)=\"multipleMemberChange()\"\n thySize=\"sm\"\n ></thy-switch>\n </div>\n }\n </thy-form-group>\n @if (aiExternalTemplate()) {\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate()\"></ng-container>\n }\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">{{ i18nTexts().cancel }}</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">{{ i18nTexts().confirm }}</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().base\">\n
|
9008
|
+
}, template: "<form thyForm name=\"createPropertyForm\" [thyFormValidatorConfig]=\"validatorConfig()\" thyLayout=\"vertical\">\n <thy-form-group thyLabelRequired [thyLabelText]=\"i18nTexts().columnName\">\n <thy-input-group>\n <input\n thyInput\n [thyAutofocus]=\"true\"\n name=\"fieldName\"\n [maxlength]=\"fieldMaxLength\"\n [(ngModel)]=\"aiEditField().name\"\n (ngModelChange)=\"nameChange($event)\"\n required\n [placeholder]=\"i18nTexts().columnNamePlaceholder\"\n [thyUniqueCheck]=\"checkUniqueName\"\n />\n <ng-template #suffix>\n <thy-input-count></thy-input-count>\n </ng-template>\n </thy-input-group>\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"i18nTexts().fieldType\">\n <div class=\"thy-dropdown-menu py-0\">\n <div class=\"ml-n5 mr-n5\">\n <span thyDropdownMenuItem [thyDropdown]=\"menu\" thyTrigger=\"hover\" thyPlacement=\"right\" (click)=\"fieldTypeClick($event)\">\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"selectedFieldOption().icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ selectedFieldOption().name }}</span>\n <thy-icon thyDropdownMenuItemExtendIcon thyIconName=\"angle-right\" class=\"text-desc\"></thy-icon>\n </span>\n </div>\n </div>\n\n @if (selectedFieldOption().type === aITableFieldType.member) {\n <div class=\"d-flex justify-content-between mt-3\">\n {{ i18nTexts().allowMultipleMembers }}\n <thy-switch\n name=\"isMultipleMember\"\n [(ngModel)]=\"isMultipleMember\"\n (ngModelChange)=\"multipleMemberChange()\"\n thySize=\"sm\"\n ></thy-switch>\n </div>\n }\n </thy-form-group>\n @if (aiExternalTemplate()) {\n <ng-container *ngTemplateOutlet=\"aiExternalTemplate()\"></ng-container>\n }\n <thy-form-group-footer thyAlign=\"right\">\n <button thyButton=\"link-secondary\" (click)=\"cancel()\" thySize=\"sm\">{{ i18nTexts().cancel }}</button>\n <button thyButton=\"primary\" (thyFormSubmit)=\"editFieldProperty()\" thySize=\"sm\">{{ i18nTexts().confirm }}</button>\n </thy-form-group-footer>\n</form>\n\n<thy-dropdown-menu #menu>\n <div class=\"ai-table-field-type-menu\">\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().base\">\n @for (item of fieldOptions().base; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n <thy-dropdown-menu-group [thyTitle]=\"i18nTexts().advanced\">\n @for (item of fieldOptions().advanced; track $index) {\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n active: (item | fieldIsSameOption: aiEditField())\n }\"\n (click)=\"selectFieldType(item)\"\n >\n <thy-icon [thyIconName]=\"item.icon!\"></thy-icon>\n <span thyDropdownMenuItemName>{{ item.name }}</span>\n </a>\n }\n </thy-dropdown-menu-group>\n </div>\n</thy-dropdown-menu>\n", styles: [":host{width:350px}\n"] }]
|
9052
9009
|
}] });
|
9053
9010
|
|
9054
9011
|
class AITableGridSelectionService {
|
@@ -9215,7 +9172,7 @@ class AITableContextMenu extends ThyDropdownAbstractMenu {
|
|
9215
9172
|
this.thyPopoverRef.close();
|
9216
9173
|
}
|
9217
9174
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
9218
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { 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: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemMetaDirective, selector: "[thyDropdownMenuItemMeta]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
9175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.10", type: AITableContextMenu, isStandalone: true, selector: "ai-table-context-menu", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, menuItems: { classPropertyName: "menuItems", publicName: "menuItems", isSignal: true, isRequired: true, transformFunction: null }, targetName: { classPropertyName: "targetName", publicName: "targetName", isSignal: true, isRequired: true, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "context-menu" }, usesInheritance: true, ngImport: i0, template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n draggable=\"false\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n", dependencies: [{ kind: "component", type: ThyInputNumber, selector: "thy-input-number", inputs: ["thyAutoFocus", "thyPlaceholder", "thyDisabled", "thyMax", "thyMin", "thyStep", "thyStepDelay", "thySize", "thyPrecision", "thySuffix"], outputs: ["thyBlur", "thyFocus", "thyStepChange"] }, { 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: "directive", type: ThyStopPropagationDirective, selector: "[thyStopPropagation]", inputs: ["thyStopPropagation"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemMetaDirective, selector: "[thyDropdownMenuItemMeta]" }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
9219
9176
|
}
|
9220
9177
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImport: i0, type: AITableContextMenu, decorators: [{
|
9221
9178
|
type: Component,
|
@@ -9233,7 +9190,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.10", ngImpo
|
|
9233
9190
|
ThyIcon,
|
9234
9191
|
NgClass,
|
9235
9192
|
ThyDivider
|
9236
|
-
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
|
9193
|
+
], template: "@for (menu of menuItems(); track $index) {\n @if ((menu.hidden && !menu.hidden(aiTable(), targetName(), position())) || !menu.hidden) {\n @if (menu.type === 'divider') {\n <thy-divider thyStyle=\"solid\"></thy-divider>\n } @else {\n @let disabled = !!(menu.disabled && menu.disabled(aiTable(), targetName(), position()));\n @let isRemoveRecords = menu.type === 'removeRecords';\n @let isPreventClearSelection =\n menu.type === 'copyCells' ||\n menu.type === 'pasteCells' ||\n menu.type === 'removeRecords' ||\n menu.type === 'insertUpwardRecords' ||\n menu.type === 'insertDownwardRecords';\n\n <a\n thyDropdownMenuItem\n href=\"javascript:;\"\n [ngClass]=\"{\n 'remove-record': isRemoveRecords && !disabled,\n 'ai-table-prevent-clear-selection': isPreventClearSelection && !disabled\n }\"\n draggable=\"false\"\n (click)=\"execute(menu)\"\n [thyDisabled]=\"disabled\"\n >\n <thy-icon thyDropdownMenuItemIcon [thyIconName]=\"menu.icon!\"></thy-icon>\n @if (menu?.isInputNumber) {\n <span thyDropdownMenuItemName class=\"d-flex align-items-center\">\n {{ menu.name }}\n <thy-input-number\n #inputNumber\n class=\"mx-2\"\n thySize=\"sm\"\n [(ngModel)]=\"menu.count\"\n [thyStep]=\"1\"\n [thyMin]=\"1\"\n [thyMax]=\"maxCount()\"\n (click)=\"inputNumberFocus($event)\"\n (thyEnter)=\"itemEnterHandle($event, menu)\"\n thyStopPropagation\n ></thy-input-number>\n {{ menu.nameSuffix }}\n </span>\n } @else {\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n }\n <span thyDropdownMenuItemMeta class=\"text-desc\">{{ menu.shortcutKey }}</span>\n </a>\n }\n }\n}\n" }]
|
9237
9194
|
}] });
|
9238
9195
|
|
9239
9196
|
class AITableGridEventService {
|
@@ -9778,6 +9735,7 @@ class AITableScrollControllerService {
|
|
9778
9735
|
this.autoScrollSub = null;
|
9779
9736
|
}
|
9780
9737
|
this.isAutoScrolling = false;
|
9738
|
+
this.lastAutoScrollOptions?.onAutoScrollEnd?.();
|
9781
9739
|
}
|
9782
9740
|
startAutoScroll(options) {
|
9783
9741
|
if (this.autoScrollSub) {
|
@@ -10348,6 +10306,7 @@ class AITableGrid extends AITableGridBase {
|
|
10348
10306
|
super();
|
10349
10307
|
this.viewContainerRef = inject(ViewContainerRef);
|
10350
10308
|
this.isDragSelecting = false;
|
10309
|
+
this.isDragSelectionAutoScrolling = false;
|
10351
10310
|
this.dragSelectionStart = null;
|
10352
10311
|
this.notifyService = inject(ThyNotifyService);
|
10353
10312
|
this.scrollControllerService = inject(AITableScrollControllerService);
|
@@ -10711,7 +10670,9 @@ class AITableGrid extends AITableGridBase {
|
|
10711
10670
|
this.updateDragSelectionState(false, null);
|
10712
10671
|
}
|
10713
10672
|
stageMouseleave(e) {
|
10714
|
-
this.
|
10673
|
+
if (!this.isDragSelectionAutoScrolling) {
|
10674
|
+
this.updateDragSelectionState(false, null);
|
10675
|
+
}
|
10715
10676
|
if (this.timer) {
|
10716
10677
|
cancelAnimationFrame(this.timer);
|
10717
10678
|
}
|
@@ -11105,6 +11066,7 @@ class AITableGrid extends AITableGridBase {
|
|
11105
11066
|
bottom: AI_TABLE_AUTO_SCROLL_BOTTOM_THRESHOLD
|
11106
11067
|
},
|
11107
11068
|
onScrollChange: (position, isAutoScrolling) => {
|
11069
|
+
this.isDragSelectionAutoScrolling = isAutoScrolling;
|
11108
11070
|
if (isAutoScrolling) {
|
11109
11071
|
const scrollLeft = position.x - scrollState.scrollLeft;
|
11110
11072
|
const scrollTop = position.y - scrollState.scrollTop;
|
@@ -11118,6 +11080,10 @@ class AITableGrid extends AITableGridBase {
|
|
11118
11080
|
this.aiTableGridSelectionService.selectCells([startCell[0], startCell[1]], [nextRecord._id, nextField._id]);
|
11119
11081
|
}
|
11120
11082
|
}
|
11083
|
+
},
|
11084
|
+
onAutoScrollEnd: () => {
|
11085
|
+
this.isDragSelectionAutoScrolling = false;
|
11086
|
+
this.updateDragSelectionState(false, null);
|
11121
11087
|
}
|
11122
11088
|
});
|
11123
11089
|
}
|