@ai-table/grid 0.4.5 → 0.4.6
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/fesm2022/ai-table-grid.mjs +121 -73
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3792,7 +3792,7 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3792
3792
|
continue;
|
|
3793
3793
|
}
|
|
3794
3794
|
// 当前行的 Y 轴偏移量,并根据列宽和列索引获取单元格的水平位置(宽度和偏移量)
|
|
3795
|
-
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET
|
|
3795
|
+
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET;
|
|
3796
3796
|
let { width, offset, isGroupAndFirstColumn } = getCellHorizontalPosition({
|
|
3797
3797
|
columnWidth,
|
|
3798
3798
|
columnIndex,
|
|
@@ -3802,7 +3802,7 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3802
3802
|
if (isGroupAndFirstColumn) {
|
|
3803
3803
|
offset += AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE;
|
|
3804
3804
|
}
|
|
3805
|
-
const height = rowHeight;
|
|
3805
|
+
const height = rowHeight - AI_TABLE_OFFSET;
|
|
3806
3806
|
configs.unshift({
|
|
3807
3807
|
key: `placeholder-cell-${fieldId}-${recordId}`,
|
|
3808
3808
|
name: generateTargetName({
|
|
@@ -3810,9 +3810,9 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3810
3810
|
fieldId,
|
|
3811
3811
|
recordId
|
|
3812
3812
|
}),
|
|
3813
|
-
x: x
|
|
3814
|
-
y,
|
|
3815
|
-
width,
|
|
3813
|
+
x: x,
|
|
3814
|
+
y: y,
|
|
3815
|
+
width: columnWidth - AI_TABLE_CELL_LINE_BORDER,
|
|
3816
3816
|
height,
|
|
3817
3817
|
fill: Colors.transparent,
|
|
3818
3818
|
strokeEnabled: false,
|
|
@@ -6851,6 +6851,13 @@ class RecordLayout extends Layout {
|
|
|
6851
6851
|
stroke: this.colors.gray200
|
|
6852
6852
|
});
|
|
6853
6853
|
if (!this.hiddenIndexColumn) {
|
|
6854
|
+
this.rect({
|
|
6855
|
+
x: x,
|
|
6856
|
+
y: y + AI_TABLE_OFFSET,
|
|
6857
|
+
width: indexWidth,
|
|
6858
|
+
height: rowHeight - AI_TABLE_OFFSET * 2,
|
|
6859
|
+
fill: indexFill
|
|
6860
|
+
});
|
|
6854
6861
|
// 垂直边框
|
|
6855
6862
|
this.line({
|
|
6856
6863
|
x: x,
|
|
@@ -8293,72 +8300,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
8293
8300
|
}]
|
|
8294
8301
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
8295
8302
|
|
|
8296
|
-
class AITableExpandRecord {
|
|
8297
|
-
constructor() {
|
|
8298
|
-
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
8299
|
-
this.shouldShowIcon = computed(() => {
|
|
8300
|
-
const { aiTable, rowStartIndex, rowStopIndex } = this.config();
|
|
8301
|
-
const context = aiTable.context;
|
|
8302
|
-
if (!context)
|
|
8303
|
-
return false;
|
|
8304
|
-
if (!context.recordDetailConfig?.()?.showExpandIcon)
|
|
8305
|
-
return false;
|
|
8306
|
-
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8307
|
-
const row = context.linearRows()[pointRowIndex];
|
|
8308
|
-
return pointRowIndex >= rowStartIndex && pointRowIndex <= rowStopIndex && row && row.type === AITableRowType.record;
|
|
8309
|
-
}, ...(ngDevMode ? [{ debugName: "shouldShowIcon" }] : []));
|
|
8310
|
-
this.expandIconConfig = computed(() => {
|
|
8311
|
-
const { coordinate, aiTable } = this.config();
|
|
8312
|
-
const context = aiTable.context;
|
|
8313
|
-
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8314
|
-
const row = context.linearRows()[pointRowIndex];
|
|
8315
|
-
const recordId = row?._id;
|
|
8316
|
-
const firstColumnOffset = coordinate.getColumnOffset(0);
|
|
8317
|
-
const y = coordinate.getRowOffset(pointRowIndex) + AI_TABLE_OFFSET;
|
|
8318
|
-
return {
|
|
8319
|
-
coordinate,
|
|
8320
|
-
name: generateTargetName({
|
|
8321
|
-
targetName: AI_TABLE_EXPAND_RECORD_ICON,
|
|
8322
|
-
recordId,
|
|
8323
|
-
mouseStyle: 'pointer'
|
|
8324
|
-
}),
|
|
8325
|
-
x: firstColumnOffset - AI_TABLE_ROW_HEAD_EXPAND_WIDTH + (AI_TABLE_ROW_HEAD_EXPAND_WIDTH - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8326
|
-
y: y + (AI_TABLE_FIELD_HEAD_HEIGHT - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8327
|
-
data: ExpandRecordPath,
|
|
8328
|
-
fill: Colors.gray600,
|
|
8329
|
-
hoverFill: Colors.primary,
|
|
8330
|
-
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8331
|
-
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8332
|
-
cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
|
|
8333
|
-
listening: true
|
|
8334
|
-
};
|
|
8335
|
-
}, ...(ngDevMode ? [{ debugName: "expandIconConfig" }] : []));
|
|
8336
|
-
}
|
|
8337
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8338
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AITableExpandRecord, isStandalone: true, selector: "ai-table-expand-record", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
8339
|
-
<ko-group>
|
|
8340
|
-
@if (shouldShowIcon()) {
|
|
8341
|
-
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8342
|
-
}
|
|
8343
|
-
</ko-group>
|
|
8344
|
-
`, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: AITableActionIcon, selector: "ai-table-action-icon", inputs: ["config"], outputs: ["onClick", "onMousemove", "onMouseenter", "onMouseleave"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8345
|
-
}
|
|
8346
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, decorators: [{
|
|
8347
|
-
type: Component,
|
|
8348
|
-
args: [{
|
|
8349
|
-
selector: 'ai-table-expand-record',
|
|
8350
|
-
template: `
|
|
8351
|
-
<ko-group>
|
|
8352
|
-
@if (shouldShowIcon()) {
|
|
8353
|
-
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8354
|
-
}
|
|
8355
|
-
</ko-group>
|
|
8356
|
-
`,
|
|
8357
|
-
imports: [KoContainer, AITableActionIcon],
|
|
8358
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8359
|
-
}]
|
|
8360
|
-
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
8361
|
-
|
|
8362
8303
|
class AITableBackground {
|
|
8363
8304
|
constructor() {
|
|
8364
8305
|
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -8529,6 +8470,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
8529
8470
|
}]
|
|
8530
8471
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }], koClick: [{ type: i0.Output, args: ["koClick"] }], hover: [{ type: i0.Output, args: ["hover"] }], koMouseenter: [{ type: i0.Output, args: ["koMouseenter"] }], koMouseleave: [{ type: i0.Output, args: ["koMouseleave"] }], isHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "isHover", required: false }] }, { type: i0.Output, args: ["isHoverChange"] }] } });
|
|
8531
8472
|
|
|
8473
|
+
class AITableExpandRecord {
|
|
8474
|
+
constructor() {
|
|
8475
|
+
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
8476
|
+
this.backgroundConfig = computed(() => {
|
|
8477
|
+
const { coordinate, aiTable } = this.config();
|
|
8478
|
+
const context = aiTable.context;
|
|
8479
|
+
const { rowIndex: pointRowIndex, columnIndex } = context.pointPosition();
|
|
8480
|
+
const firstColumnOffset = coordinate.getColumnOffset(0);
|
|
8481
|
+
const y = coordinate.getRowOffset(pointRowIndex) + AI_TABLE_OFFSET;
|
|
8482
|
+
const rowHeight = coordinate.getRowHeight(pointRowIndex);
|
|
8483
|
+
const firstField = aiTable.gridData().fields[0];
|
|
8484
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8485
|
+
const recordId = row?._id;
|
|
8486
|
+
const isRateOrProgress = firstField?.type === AITableFieldType.rate || firstField?.type === AITableFieldType.progress;
|
|
8487
|
+
const isFirstColumn = columnIndex === 0;
|
|
8488
|
+
const activeCell = aiTable.selection()?.activeCell;
|
|
8489
|
+
const fieldId = aiTable.gridData().fields[0]._id;
|
|
8490
|
+
const isWhiteBg = isRateOrProgress && isFirstColumn && (!activeCell || (activeCell?.[0] === recordId && activeCell?.[1] === fieldId));
|
|
8491
|
+
return {
|
|
8492
|
+
coordinate,
|
|
8493
|
+
x: firstColumnOffset - AI_TABLE_ROW_HEAD_EXPAND_WIDTH,
|
|
8494
|
+
y: y,
|
|
8495
|
+
width: AI_TABLE_ROW_HEAD_EXPAND_WIDTH + AI_TABLE_CELL_LINE_BORDER * 2 + AI_TABLE_OFFSET,
|
|
8496
|
+
height: rowHeight,
|
|
8497
|
+
fill: isWhiteBg ? Colors.white : Colors.transparent,
|
|
8498
|
+
hoverFill: Colors.transparent,
|
|
8499
|
+
listening: true
|
|
8500
|
+
};
|
|
8501
|
+
}, ...(ngDevMode ? [{ debugName: "backgroundConfig" }] : []));
|
|
8502
|
+
this.shouldShowIcon = computed(() => {
|
|
8503
|
+
const { aiTable, rowStartIndex, rowStopIndex } = this.config();
|
|
8504
|
+
const context = aiTable.context;
|
|
8505
|
+
if (!context)
|
|
8506
|
+
return false;
|
|
8507
|
+
if (!context.recordDetailConfig?.()?.showExpandIcon)
|
|
8508
|
+
return false;
|
|
8509
|
+
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8510
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8511
|
+
return pointRowIndex >= rowStartIndex && pointRowIndex <= rowStopIndex && row && row.type === AITableRowType.record;
|
|
8512
|
+
}, ...(ngDevMode ? [{ debugName: "shouldShowIcon" }] : []));
|
|
8513
|
+
this.expandIconConfig = computed(() => {
|
|
8514
|
+
const { coordinate, aiTable } = this.config();
|
|
8515
|
+
const context = aiTable.context;
|
|
8516
|
+
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8517
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8518
|
+
const recordId = row?._id;
|
|
8519
|
+
const firstColumnOffset = coordinate.getColumnOffset(0);
|
|
8520
|
+
const y = coordinate.getRowOffset(pointRowIndex) + AI_TABLE_OFFSET;
|
|
8521
|
+
return {
|
|
8522
|
+
coordinate,
|
|
8523
|
+
name: generateTargetName({
|
|
8524
|
+
targetName: AI_TABLE_EXPAND_RECORD_ICON,
|
|
8525
|
+
recordId,
|
|
8526
|
+
mouseStyle: 'pointer'
|
|
8527
|
+
}),
|
|
8528
|
+
x: firstColumnOffset - AI_TABLE_ROW_HEAD_EXPAND_WIDTH + (AI_TABLE_ROW_HEAD_EXPAND_WIDTH - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8529
|
+
y: y + (AI_TABLE_FIELD_HEAD_HEIGHT - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8530
|
+
data: ExpandRecordPath,
|
|
8531
|
+
fill: Colors.gray600,
|
|
8532
|
+
hoverFill: Colors.primary,
|
|
8533
|
+
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8534
|
+
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8535
|
+
cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
|
|
8536
|
+
listening: true
|
|
8537
|
+
};
|
|
8538
|
+
}, ...(ngDevMode ? [{ debugName: "expandIconConfig" }] : []));
|
|
8539
|
+
}
|
|
8540
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8541
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: AITableExpandRecord, isStandalone: true, selector: "ai-table-expand-record", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
|
|
8542
|
+
<ko-group>
|
|
8543
|
+
@if (shouldShowIcon()) {
|
|
8544
|
+
<ai-table-background [config]="backgroundConfig()"></ai-table-background>
|
|
8545
|
+
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8546
|
+
}
|
|
8547
|
+
</ko-group>
|
|
8548
|
+
`, isInline: true, dependencies: [{ kind: "component", type: KoContainer, selector: "ko-layer, ko-fastlayer, ko-group" }, { kind: "component", type: AITableActionIcon, selector: "ai-table-action-icon", inputs: ["config"], outputs: ["onClick", "onMousemove", "onMouseenter", "onMouseleave"] }, { kind: "component", type: AITableBackground, selector: "ai-table-background", inputs: ["config", "isActive", "isHover"], outputs: ["koClick", "hover", "koMouseenter", "koMouseleave", "isHoverChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8549
|
+
}
|
|
8550
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, decorators: [{
|
|
8551
|
+
type: Component,
|
|
8552
|
+
args: [{
|
|
8553
|
+
selector: 'ai-table-expand-record',
|
|
8554
|
+
template: `
|
|
8555
|
+
<ko-group>
|
|
8556
|
+
@if (shouldShowIcon()) {
|
|
8557
|
+
<ai-table-background [config]="backgroundConfig()"></ai-table-background>
|
|
8558
|
+
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8559
|
+
}
|
|
8560
|
+
</ko-group>
|
|
8561
|
+
`,
|
|
8562
|
+
imports: [KoContainer, AITableActionIcon, AITableBackground],
|
|
8563
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8564
|
+
}]
|
|
8565
|
+
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
8566
|
+
|
|
8532
8567
|
class AITableShadow {
|
|
8533
8568
|
constructor() {
|
|
8534
8569
|
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -9225,6 +9260,10 @@ class AITableFieldStat {
|
|
|
9225
9260
|
config.x = -AI_TABLE_OFFSET;
|
|
9226
9261
|
config.width = config.width + AI_TABLE_OFFSET;
|
|
9227
9262
|
config.borders = [false, true, false, true];
|
|
9263
|
+
if (aiTable.context?.recordDetailConfig?.()?.showExpandIcon) {
|
|
9264
|
+
config.width = config.width + AI_TABLE_ROW_HEAD_EXPAND_WIDTH;
|
|
9265
|
+
config.x = config.x - AI_TABLE_ROW_HEAD_EXPAND_WIDTH;
|
|
9266
|
+
}
|
|
9228
9267
|
}
|
|
9229
9268
|
config.stroke = Colors.gray200;
|
|
9230
9269
|
config.strokeWidth = AI_TABLE_CELL_LINE_BORDER;
|
|
@@ -12559,7 +12598,7 @@ class RecordDetailComponent {
|
|
|
12559
12598
|
const field = this.firstField();
|
|
12560
12599
|
if (field) {
|
|
12561
12600
|
const cellValue = AITableQueries.getFieldValue(this.aiTable(), [this.currentRecordId(), field._id]);
|
|
12562
|
-
if (!
|
|
12601
|
+
if (!this.isUndefinedTitle(cellValue, field)) {
|
|
12563
12602
|
const options = {
|
|
12564
12603
|
aiTable: this.aiTable(),
|
|
12565
12604
|
field,
|
|
@@ -12668,7 +12707,8 @@ class RecordDetailComponent {
|
|
|
12668
12707
|
addNewField(e) {
|
|
12669
12708
|
const origin = e.target;
|
|
12670
12709
|
const newField = createDefaultField(this.aiTable(), AITableFieldType.text);
|
|
12671
|
-
const
|
|
12710
|
+
const component = this.aiTable().context?.aiFieldConfig()?.fieldSettingComponent ?? AITableFieldSetting;
|
|
12711
|
+
const popoverRef = this.thyPopover.open(component, {
|
|
12672
12712
|
origin,
|
|
12673
12713
|
placement: 'topLeft',
|
|
12674
12714
|
manualClosure: true,
|
|
@@ -12706,6 +12746,14 @@ class RecordDetailComponent {
|
|
|
12706
12746
|
clearSelection(this.aiTable());
|
|
12707
12747
|
setActiveCell(this.aiTable(), [this.recordId(), fieldId]);
|
|
12708
12748
|
}
|
|
12749
|
+
isUndefinedTitle(value, field) {
|
|
12750
|
+
switch (field.type) {
|
|
12751
|
+
case AITableFieldType.text:
|
|
12752
|
+
return value === '';
|
|
12753
|
+
default:
|
|
12754
|
+
return (Array.isArray(value) && value.length === 0) || isUndefinedOrNull(value);
|
|
12755
|
+
}
|
|
12756
|
+
}
|
|
12709
12757
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RecordDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12710
12758
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", type: RecordDetailComponent, isStandalone: true, selector: "ai-record-detail", inputs: { aiTable: { classPropertyName: "aiTable", publicName: "aiTable", isSignal: true, isRequired: true, transformFunction: null }, recordId: { classPropertyName: "recordId", publicName: "recordId", isSignal: true, isRequired: true, transformFunction: null }, references: { classPropertyName: "references", publicName: "references", isSignal: true, isRequired: true, transformFunction: null }, actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { recordIdChange: "recordIdChange" }, viewQueries: [{ propertyName: "fieldOperationsMenuTemplate", first: true, predicate: ["fieldOperationsMenuTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"d-flex flex-column ai-record-detail\">\n <div class=\"d-flex align-items-center justify-content-between px-5 record-detail-header\">\n <span class=\"record-title\" thyFlexibleText [thyTooltipContent]=\"recordTitle()\">\n {{ recordTitle() }}\n </span>\n\n <div class=\"record-navigation\">\n <button thyButton=\"link-secondary\" thySize=\"md\" [disabled]=\"!recordNavigation()?.hasPrevious\" (click)=\"previousRecord()\">\n <thy-icon thyIconName=\"angle-up\"></thy-icon>\n </button>\n <button thyButton=\"link-secondary\" thySize=\"md\" [disabled]=\"!recordNavigation()?.hasNext\" (click)=\"nextRecord()\">\n <thy-icon thyIconName=\"angle-down\"></thy-icon>\n </button>\n </div>\n <thy-divider [thyVertical]=\"true\"></thy-divider>\n <div class=\"header-operations\">\n <button thyButton=\"link-secondary\" thySize=\"md\" [thyPopover]=\"headerMoreMenu\" thyTrigger=\"click\" thyPlacement=\"bottomRight\">\n <thy-icon thyIconName=\"list\"></thy-icon>\n </button>\n\n <ng-template #headerMoreMenu>\n <div class=\"thy-dropdown-menu\">\n <a thyDropdownMenuItem href=\"javascript:;\" (click)=\"deleteRecord()\">\n <thy-icon thyIconName=\"trash\"></thy-icon>\n <span>{{ i18nTexts().deleteRecord }}</span>\n </a>\n </div>\n </ng-template>\n\n <button thyButton=\"link-secondary\" thySize=\"md\" (click)=\"close()\">\n <thy-icon thyIconName=\"close\"></thy-icon>\n </button>\n </div>\n </div>\n\n <div class=\"record-detail-body\">\n <div class=\"px-8 cell-list-viewport\">\n @for (field of fields(); track field._id) {\n <div\n class=\"pt-4 cell-item\"\n [class.active]=\"activeFieldId === field._id\"\n (mouseenter)=\"showFieldMenu(field._id)\"\n (mouseleave)=\"hideFieldMenu(field._id)\"\n >\n <div class=\"d-flex align-items-center justify-content-between mb-2 cell-header\">\n <div class=\"d-flex align-items-center cell-label\">\n <span class=\"d-flex align-items-center mr-2 text-muted font-size-md\">\n @if (fieldIconPath(field)) {\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16px\" height=\"16px\" viewBox=\"0 0 16 16\">\n <path [attr.d]=\"fieldIconPath(field)\" fill=\"currentColor\"></path>\n </svg>\n }\n </span>\n <span class=\"d-flex align-items-center font-size-base\">\n {{ field.name }}\n </span>\n </div>\n @if (!readonly()) {\n <div class=\"cell-operations\" [class.visible]=\"fieldMenuVisible()[field._id]\">\n <a\n thyAction\n [thyActionActive]=\"fieldMenuActive()[field._id]\"\n href=\"javascript:;\"\n (click)=\"fieldMenuMoreClick($event, field._id)\"\n ><thy-icon thyIconName=\"more-vertical\"></thy-icon\n ></a>\n </div>\n }\n </div>\n\n <div class=\"dynamic-cell-editor\" (click)=\"cellClick(field._id)\">\n <ai-dynamic-cell-editor\n [aiTable]=\"aiTable()\"\n [fieldId]=\"field._id\"\n [recordId]=\"currentRecordId()\"\n [references]=\"references()\"\n (updateFieldValues)=\"fieldValueChange($event)\"\n >\n </ai-dynamic-cell-editor>\n </div>\n </div>\n }\n </div>\n <div class=\"py-4 px-5\">\n @if (!readonly()) {\n <button class=\"p-0\" thyButton=\"link-secondary\" thySize=\"md\" (click)=\"addNewField($event)\">\n <thy-icon thyIconName=\"plus\"></thy-icon>\n <span>{{ i18nTexts().addField }}</span>\n </button>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: DynamicCellEditorComponent, selector: "ai-dynamic-cell-editor", inputs: ["aiTable", "fieldId", "recordId", "references"], outputs: ["updateFieldValues"] }, { kind: "component", type: ThyFlexibleText, selector: "thy-flexible-text,[thyFlexibleText]", inputs: ["thyTooltipTrigger", "thyContainerClass", "thyTooltipContent", "thyTooltipPlacement", "thyTooltipOffset"], exportAs: ["thyFlexibleText"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12711
12759
|
}
|