@ai-table/grid 0.4.5 → 0.4.7
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 +126 -77
- package/fesm2022/ai-table-grid.mjs.map +1 -1
- package/index.d.ts +5 -3
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3388,9 +3388,6 @@ function cellValueToSortValue$1(cellValue) {
|
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
3390
|
class CheckboxField extends CheckboxFieldBase {
|
|
3391
|
-
transformCellValue(cellValue, options) {
|
|
3392
|
-
return transformToCellText(cellValue, options);
|
|
3393
|
-
}
|
|
3394
3391
|
isMeetFilter(condition, cellValue) {
|
|
3395
3392
|
if (cellValue === null) {
|
|
3396
3393
|
if (condition.operation === AITableFilterOperation.empty) {
|
|
@@ -3792,7 +3789,7 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3792
3789
|
continue;
|
|
3793
3790
|
}
|
|
3794
3791
|
// 当前行的 Y 轴偏移量,并根据列宽和列索引获取单元格的水平位置(宽度和偏移量)
|
|
3795
|
-
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET
|
|
3792
|
+
const y = coordinate.getRowOffset(rowIndex) + AI_TABLE_OFFSET;
|
|
3796
3793
|
let { width, offset, isGroupAndFirstColumn } = getCellHorizontalPosition({
|
|
3797
3794
|
columnWidth,
|
|
3798
3795
|
columnIndex,
|
|
@@ -3802,7 +3799,7 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3802
3799
|
if (isGroupAndFirstColumn) {
|
|
3803
3800
|
offset += AI_TABLE_FIELD_HEAD_ICON_GAP_SIZE;
|
|
3804
3801
|
}
|
|
3805
|
-
const height = rowHeight;
|
|
3802
|
+
const height = rowHeight - AI_TABLE_OFFSET;
|
|
3806
3803
|
configs.unshift({
|
|
3807
3804
|
key: `placeholder-cell-${fieldId}-${recordId}`,
|
|
3808
3805
|
name: generateTargetName({
|
|
@@ -3810,9 +3807,9 @@ function getPlaceHolderCellsConfigs(options) {
|
|
|
3810
3807
|
fieldId,
|
|
3811
3808
|
recordId
|
|
3812
3809
|
}),
|
|
3813
|
-
x: x
|
|
3814
|
-
y,
|
|
3815
|
-
width,
|
|
3810
|
+
x: x,
|
|
3811
|
+
y: y,
|
|
3812
|
+
width: columnWidth - AI_TABLE_CELL_LINE_BORDER,
|
|
3816
3813
|
height,
|
|
3817
3814
|
fill: Colors.transparent,
|
|
3818
3815
|
strokeEnabled: false,
|
|
@@ -6851,6 +6848,13 @@ class RecordLayout extends Layout {
|
|
|
6851
6848
|
stroke: this.colors.gray200
|
|
6852
6849
|
});
|
|
6853
6850
|
if (!this.hiddenIndexColumn) {
|
|
6851
|
+
this.rect({
|
|
6852
|
+
x: x,
|
|
6853
|
+
y: y + AI_TABLE_OFFSET,
|
|
6854
|
+
width: indexWidth,
|
|
6855
|
+
height: rowHeight - AI_TABLE_OFFSET * 2,
|
|
6856
|
+
fill: indexFill
|
|
6857
|
+
});
|
|
6854
6858
|
// 垂直边框
|
|
6855
6859
|
this.line({
|
|
6856
6860
|
x: x,
|
|
@@ -8293,72 +8297,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
8293
8297
|
}]
|
|
8294
8298
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
8295
8299
|
|
|
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
8300
|
class AITableBackground {
|
|
8363
8301
|
constructor() {
|
|
8364
8302
|
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -8529,6 +8467,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
|
|
|
8529
8467
|
}]
|
|
8530
8468
|
}], 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
8469
|
|
|
8470
|
+
class AITableExpandRecord {
|
|
8471
|
+
constructor() {
|
|
8472
|
+
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
8473
|
+
this.backgroundConfig = computed(() => {
|
|
8474
|
+
const { coordinate, aiTable } = this.config();
|
|
8475
|
+
const context = aiTable.context;
|
|
8476
|
+
const { rowIndex: pointRowIndex, columnIndex } = context.pointPosition();
|
|
8477
|
+
const firstColumnOffset = coordinate.getColumnOffset(0);
|
|
8478
|
+
const y = coordinate.getRowOffset(pointRowIndex) + AI_TABLE_OFFSET;
|
|
8479
|
+
const rowHeight = coordinate.getRowHeight(pointRowIndex);
|
|
8480
|
+
const firstField = aiTable.gridData().fields[0];
|
|
8481
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8482
|
+
const recordId = row?._id;
|
|
8483
|
+
const isRateOrProgress = firstField?.type === AITableFieldType.rate || firstField?.type === AITableFieldType.progress;
|
|
8484
|
+
const isFirstColumn = columnIndex === 0;
|
|
8485
|
+
const activeCell = aiTable.selection()?.activeCell;
|
|
8486
|
+
const fieldId = aiTable.gridData().fields[0]._id;
|
|
8487
|
+
const isWhiteBg = isRateOrProgress && isFirstColumn && (!activeCell || (activeCell?.[0] === recordId && activeCell?.[1] === fieldId));
|
|
8488
|
+
return {
|
|
8489
|
+
coordinate,
|
|
8490
|
+
x: firstColumnOffset - AI_TABLE_ROW_HEAD_EXPAND_WIDTH,
|
|
8491
|
+
y: y,
|
|
8492
|
+
width: AI_TABLE_ROW_HEAD_EXPAND_WIDTH + AI_TABLE_CELL_LINE_BORDER * 2 + AI_TABLE_OFFSET,
|
|
8493
|
+
height: rowHeight,
|
|
8494
|
+
fill: isWhiteBg ? Colors.white : Colors.transparent,
|
|
8495
|
+
hoverFill: Colors.transparent,
|
|
8496
|
+
listening: true
|
|
8497
|
+
};
|
|
8498
|
+
}, ...(ngDevMode ? [{ debugName: "backgroundConfig" }] : []));
|
|
8499
|
+
this.shouldShowIcon = computed(() => {
|
|
8500
|
+
const { aiTable, rowStartIndex, rowStopIndex } = this.config();
|
|
8501
|
+
const context = aiTable.context;
|
|
8502
|
+
if (!context)
|
|
8503
|
+
return false;
|
|
8504
|
+
if (!context.recordDetailConfig?.()?.showExpandIcon)
|
|
8505
|
+
return false;
|
|
8506
|
+
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8507
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8508
|
+
return pointRowIndex >= rowStartIndex && pointRowIndex <= rowStopIndex && row && row.type === AITableRowType.record;
|
|
8509
|
+
}, ...(ngDevMode ? [{ debugName: "shouldShowIcon" }] : []));
|
|
8510
|
+
this.expandIconConfig = computed(() => {
|
|
8511
|
+
const { coordinate, aiTable } = this.config();
|
|
8512
|
+
const context = aiTable.context;
|
|
8513
|
+
const { rowIndex: pointRowIndex } = context.pointPosition();
|
|
8514
|
+
const row = context.linearRows()[pointRowIndex];
|
|
8515
|
+
const recordId = row?._id;
|
|
8516
|
+
const firstColumnOffset = coordinate.getColumnOffset(0);
|
|
8517
|
+
const y = coordinate.getRowOffset(pointRowIndex) + AI_TABLE_OFFSET;
|
|
8518
|
+
return {
|
|
8519
|
+
coordinate,
|
|
8520
|
+
name: generateTargetName({
|
|
8521
|
+
targetName: AI_TABLE_EXPAND_RECORD_ICON,
|
|
8522
|
+
recordId,
|
|
8523
|
+
mouseStyle: 'pointer'
|
|
8524
|
+
}),
|
|
8525
|
+
x: firstColumnOffset - AI_TABLE_ROW_HEAD_EXPAND_WIDTH + (AI_TABLE_ROW_HEAD_EXPAND_WIDTH - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8526
|
+
y: y + (AI_TABLE_FIELD_HEAD_HEIGHT - AI_TABLE_ACTION_COMMON_SIZE) / 2,
|
|
8527
|
+
data: ExpandRecordPath,
|
|
8528
|
+
fill: Colors.gray600,
|
|
8529
|
+
hoverFill: Colors.primary,
|
|
8530
|
+
backgroundWidth: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8531
|
+
backgroundHeight: AI_TABLE_ACTION_COMMON_SIZE,
|
|
8532
|
+
cornerRadius: AI_TABLE_ACTION_COMMON_RADIUS,
|
|
8533
|
+
listening: true
|
|
8534
|
+
};
|
|
8535
|
+
}, ...(ngDevMode ? [{ debugName: "expandIconConfig" }] : []));
|
|
8536
|
+
}
|
|
8537
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8538
|
+
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: `
|
|
8539
|
+
<ko-group>
|
|
8540
|
+
@if (shouldShowIcon()) {
|
|
8541
|
+
<ai-table-background [config]="backgroundConfig()"></ai-table-background>
|
|
8542
|
+
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8543
|
+
}
|
|
8544
|
+
</ko-group>
|
|
8545
|
+
`, 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 }); }
|
|
8546
|
+
}
|
|
8547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: AITableExpandRecord, decorators: [{
|
|
8548
|
+
type: Component,
|
|
8549
|
+
args: [{
|
|
8550
|
+
selector: 'ai-table-expand-record',
|
|
8551
|
+
template: `
|
|
8552
|
+
<ko-group>
|
|
8553
|
+
@if (shouldShowIcon()) {
|
|
8554
|
+
<ai-table-background [config]="backgroundConfig()"></ai-table-background>
|
|
8555
|
+
<ai-table-action-icon [config]="expandIconConfig()"></ai-table-action-icon>
|
|
8556
|
+
}
|
|
8557
|
+
</ko-group>
|
|
8558
|
+
`,
|
|
8559
|
+
imports: [KoContainer, AITableActionIcon, AITableBackground],
|
|
8560
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
8561
|
+
}]
|
|
8562
|
+
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }] } });
|
|
8563
|
+
|
|
8532
8564
|
class AITableShadow {
|
|
8533
8565
|
constructor() {
|
|
8534
8566
|
this.config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
@@ -9225,6 +9257,10 @@ class AITableFieldStat {
|
|
|
9225
9257
|
config.x = -AI_TABLE_OFFSET;
|
|
9226
9258
|
config.width = config.width + AI_TABLE_OFFSET;
|
|
9227
9259
|
config.borders = [false, true, false, true];
|
|
9260
|
+
if (aiTable.context?.recordDetailConfig?.()?.showExpandIcon) {
|
|
9261
|
+
config.width = config.width + AI_TABLE_ROW_HEAD_EXPAND_WIDTH;
|
|
9262
|
+
config.x = config.x - AI_TABLE_ROW_HEAD_EXPAND_WIDTH;
|
|
9263
|
+
}
|
|
9228
9264
|
}
|
|
9229
9265
|
config.stroke = Colors.gray200;
|
|
9230
9266
|
config.strokeWidth = AI_TABLE_CELL_LINE_BORDER;
|
|
@@ -10697,7 +10733,11 @@ class AITableCellProgress extends CoverCellBase {
|
|
|
10697
10733
|
const { scrollLeft } = aiTable.context.scrollState();
|
|
10698
10734
|
const pointPosition = aiTable.context.pointPosition();
|
|
10699
10735
|
const { columnIndex } = pointPosition;
|
|
10700
|
-
|
|
10736
|
+
let columnLeftX = coordinate.getColumnOffset(columnIndex) + AI_TABLE_OFFSET;
|
|
10737
|
+
const isInFrozenColumn = columnIndex < aiTable.context.frozenColumnCount();
|
|
10738
|
+
if (!isInFrozenColumn) {
|
|
10739
|
+
columnLeftX = coordinate.getColumnOffset(columnIndex) + AI_TABLE_OFFSET - scrollLeft;
|
|
10740
|
+
}
|
|
10701
10741
|
const stage = e.event.target.getStage();
|
|
10702
10742
|
if (!stage)
|
|
10703
10743
|
return;
|
|
@@ -12559,7 +12599,7 @@ class RecordDetailComponent {
|
|
|
12559
12599
|
const field = this.firstField();
|
|
12560
12600
|
if (field) {
|
|
12561
12601
|
const cellValue = AITableQueries.getFieldValue(this.aiTable(), [this.currentRecordId(), field._id]);
|
|
12562
|
-
if (!
|
|
12602
|
+
if (!this.isUndefinedTitle(cellValue, field)) {
|
|
12563
12603
|
const options = {
|
|
12564
12604
|
aiTable: this.aiTable(),
|
|
12565
12605
|
field,
|
|
@@ -12668,7 +12708,8 @@ class RecordDetailComponent {
|
|
|
12668
12708
|
addNewField(e) {
|
|
12669
12709
|
const origin = e.target;
|
|
12670
12710
|
const newField = createDefaultField(this.aiTable(), AITableFieldType.text);
|
|
12671
|
-
const
|
|
12711
|
+
const component = this.aiTable().context?.aiFieldConfig()?.fieldSettingComponent ?? AITableFieldSetting;
|
|
12712
|
+
const popoverRef = this.thyPopover.open(component, {
|
|
12672
12713
|
origin,
|
|
12673
12714
|
placement: 'topLeft',
|
|
12674
12715
|
manualClosure: true,
|
|
@@ -12706,6 +12747,14 @@ class RecordDetailComponent {
|
|
|
12706
12747
|
clearSelection(this.aiTable());
|
|
12707
12748
|
setActiveCell(this.aiTable(), [this.recordId(), fieldId]);
|
|
12708
12749
|
}
|
|
12750
|
+
isUndefinedTitle(value, field) {
|
|
12751
|
+
switch (field.type) {
|
|
12752
|
+
case AITableFieldType.text:
|
|
12753
|
+
return value === '';
|
|
12754
|
+
default:
|
|
12755
|
+
return (Array.isArray(value) && value.length === 0) || isUndefinedOrNull(value);
|
|
12756
|
+
}
|
|
12757
|
+
}
|
|
12709
12758
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: RecordDetailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12710
12759
|
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
12760
|
}
|