@nanahoshi/mona-ui 0.20.0 → 0.21.0
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/nanahoshi-mona-ui-auto-complete.mjs +46 -36
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +109 -99
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +37 -27
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +5 -4
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +3 -3
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-BuybF7tX.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-ZdcR20RJ.mjs} +7 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Dj-SaNzk.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-Bu093U9J.mjs} +12 -6
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dtze5qye.mjs +162 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-B_Gm--X6.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-DFMbXpKb.mjs} +43 -32
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-xc8ybFkY.mjs +239 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-CyzJFQIy.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BGfDw6_5.mjs} +543 -294
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +2 -2
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +26 -13
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +46 -38
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +10 -5
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +3 -3
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +19 -18
- package/types/nanahoshi-mona-ui-combo-box.d.ts +23 -22
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +18 -17
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +6 -4
- package/types/nanahoshi-mona-ui-grid.d.ts +80 -40
- package/types/nanahoshi-mona-ui-i18n.d.ts +1 -0
- package/types/nanahoshi-mona-ui-locales.d.ts +13 -0
- package/types/nanahoshi-mona-ui-multi-select.d.ts +20 -19
- package/types/nanahoshi-mona-ui-pager.d.ts +1 -0
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-CYAm4l84.mjs +0 -145
- package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-X0X487Rm.mjs +0 -233
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { computed, input, Directive,
|
|
3
|
-
import {
|
|
2
|
+
import { inject, computed, input, Directive, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, Injector, LOCALE_ID, model } from '@angular/core';
|
|
3
|
+
import { c as GridService, n as gridListTableCellThemeVariants, o as gridDetailContentCellThemeVariants, p as gridDetailIndentCellThemeVariants, q as gridDetailRowThemeVariants, r as gridListTableRowThemeVariants, s as gridCellEditorBaseThemeVariants, t as gridCellEditorInputThemeVariants, j as GridLockedCellDirective, i as GridLogicalCellDirective, G as GridNavigationService, u as gridCellBaseThemeVariants, v as gridCellContainerThemeVariants, w as gridCellDirtyIndicatorThemeVariants, x as gridCellTextThemeVariants, y as gridRowReorderHandleThemeVariants, z as gridSelectionCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BGfDw6_5.mjs';
|
|
4
4
|
import { ImmutableList } from '@mirei/ts-collections';
|
|
5
5
|
import * as i1 from '@angular/cdk/a11y';
|
|
6
6
|
import { A11yModule, LiveAnnouncer } from '@angular/cdk/a11y';
|
|
@@ -19,6 +19,7 @@ import { CdkDragHandle } from '@angular/cdk/drag-drop';
|
|
|
19
19
|
|
|
20
20
|
class GridCellDirective {
|
|
21
21
|
constructor() {
|
|
22
|
+
this.#gridService = inject(GridService, { optional: true });
|
|
22
23
|
this.baseClass = computed(() => {
|
|
23
24
|
const dataCell = this.dataCell();
|
|
24
25
|
const groupHeader = this.groupHeader();
|
|
@@ -29,6 +30,7 @@ class GridCellDirective {
|
|
|
29
30
|
const masterDetailToggle = this.masterDetailToggle();
|
|
30
31
|
const lastInRow = this.lastInRow() || groupHeader || masterDetailContent;
|
|
31
32
|
return gridListTableCellThemeVariants({
|
|
33
|
+
virtual: this.#gridService?.virtualScrollOptions().enabled ?? false,
|
|
32
34
|
dataCell,
|
|
33
35
|
groupHeader,
|
|
34
36
|
groupToggle,
|
|
@@ -61,15 +63,17 @@ class GridCellDirective {
|
|
|
61
63
|
this.prevRowType = input(null, /* @ts-ignore */
|
|
62
64
|
...(ngDevMode ? [{ debugName: "prevRowType" }] : /* istanbul ignore next */ []));
|
|
63
65
|
}
|
|
66
|
+
#gridService;
|
|
64
67
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
65
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridCellDirective, isStandalone: true, selector: "td[monaGridCell]", inputs: { dataCell: { classPropertyName: "dataCell", publicName: "dataCell", isSignal: true, isRequired: false, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupToggle: { classPropertyName: "groupToggle", publicName: "groupToggle", isSignal: true, isRequired: false, transformFunction: null }, grouped: { classPropertyName: "grouped", publicName: "grouped", isSignal: true, isRequired: false, transformFunction: null }, indentCell: { classPropertyName: "indentCell", publicName: "indentCell", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: false, transformFunction: null }, masterDetailContent: { classPropertyName: "masterDetailContent", publicName: "masterDetailContent", isSignal: true, isRequired: false, transformFunction: null }, masterDetailToggle: { classPropertyName: "masterDetailToggle", publicName: "masterDetailToggle", isSignal: true, isRequired: false, transformFunction: null }, nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null }, prevRowType: { classPropertyName: "prevRowType", publicName: "prevRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
68
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridCellDirective, isStandalone: true, selector: "td[monaGridCell]", inputs: { dataCell: { classPropertyName: "dataCell", publicName: "dataCell", isSignal: true, isRequired: false, transformFunction: null }, groupHeader: { classPropertyName: "groupHeader", publicName: "groupHeader", isSignal: true, isRequired: false, transformFunction: null }, groupToggle: { classPropertyName: "groupToggle", publicName: "groupToggle", isSignal: true, isRequired: false, transformFunction: null }, grouped: { classPropertyName: "grouped", publicName: "grouped", isSignal: true, isRequired: false, transformFunction: null }, indentCell: { classPropertyName: "indentCell", publicName: "indentCell", isSignal: true, isRequired: false, transformFunction: null }, lastInRow: { classPropertyName: "lastInRow", publicName: "lastInRow", isSignal: true, isRequired: false, transformFunction: null }, masterDetailContent: { classPropertyName: "masterDetailContent", publicName: "masterDetailContent", isSignal: true, isRequired: false, transformFunction: null }, masterDetailToggle: { classPropertyName: "masterDetailToggle", publicName: "masterDetailToggle", isSignal: true, isRequired: false, transformFunction: null }, nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null }, prevRowType: { classPropertyName: "prevRowType", publicName: "prevRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
66
69
|
}
|
|
67
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellDirective, decorators: [{
|
|
68
71
|
type: Directive,
|
|
69
72
|
args: [{
|
|
70
73
|
selector: "td[monaGridCell]",
|
|
71
74
|
host: {
|
|
72
|
-
"[class]": "baseClass()"
|
|
75
|
+
"[class]": "baseClass()",
|
|
76
|
+
role: "gridcell"
|
|
73
77
|
}
|
|
74
78
|
}]
|
|
75
79
|
}], propDecorators: { dataCell: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataCell", required: false }] }], groupHeader: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupHeader", required: false }] }], groupToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupToggle", required: false }] }], grouped: [{ type: i0.Input, args: [{ isSignal: true, alias: "grouped", required: false }] }], indentCell: [{ type: i0.Input, args: [{ isSignal: true, alias: "indentCell", required: false }] }], lastInRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastInRow", required: false }] }], masterDetailContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "masterDetailContent", required: false }] }], masterDetailToggle: [{ type: i0.Input, args: [{ isSignal: true, alias: "masterDetailToggle", required: false }] }], nextRowType: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextRowType", required: false }] }], prevRowType: [{ type: i0.Input, args: [{ isSignal: true, alias: "prevRowType", required: false }] }] } });
|
|
@@ -86,14 +90,15 @@ class GridDetailContentCellDirective {
|
|
|
86
90
|
...(ngDevMode ? [{ debugName: "nextRowType" }] : /* istanbul ignore next */ []));
|
|
87
91
|
}
|
|
88
92
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailContentCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
89
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridDetailContentCellDirective, isStandalone: true, selector: "td[monaGridDetailContentCell]", inputs: { nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
93
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridDetailContentCellDirective, isStandalone: true, selector: "td[monaGridDetailContentCell]", inputs: { nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
90
94
|
}
|
|
91
95
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailContentCellDirective, decorators: [{
|
|
92
96
|
type: Directive,
|
|
93
97
|
args: [{
|
|
94
98
|
selector: "td[monaGridDetailContentCell]",
|
|
95
99
|
host: {
|
|
96
|
-
"[class]": "baseClass()"
|
|
100
|
+
"[class]": "baseClass()",
|
|
101
|
+
role: "gridcell"
|
|
97
102
|
}
|
|
98
103
|
}]
|
|
99
104
|
}], propDecorators: { nextRowType: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextRowType", required: false }] }] } });
|
|
@@ -110,14 +115,15 @@ class GridDetailIndentCellDirective {
|
|
|
110
115
|
...(ngDevMode ? [{ debugName: "nextRowType" }] : /* istanbul ignore next */ []));
|
|
111
116
|
}
|
|
112
117
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailIndentCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
113
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridDetailIndentCellDirective, isStandalone: true, selector: "td[monaGridDetailIndentCell]", inputs: { nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
118
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridDetailIndentCellDirective, isStandalone: true, selector: "td[monaGridDetailIndentCell]", inputs: { nextRowType: { classPropertyName: "nextRowType", publicName: "nextRowType", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
114
119
|
}
|
|
115
120
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailIndentCellDirective, decorators: [{
|
|
116
121
|
type: Directive,
|
|
117
122
|
args: [{
|
|
118
123
|
selector: "td[monaGridDetailIndentCell]",
|
|
119
124
|
host: {
|
|
120
|
-
"[class]": "baseClass()"
|
|
125
|
+
"[class]": "baseClass()",
|
|
126
|
+
role: "gridcell"
|
|
121
127
|
}
|
|
122
128
|
}]
|
|
123
129
|
}], propDecorators: { nextRowType: [{ type: i0.Input, args: [{ isSignal: true, alias: "nextRowType", required: false }] }] } });
|
|
@@ -130,14 +136,15 @@ class GridDetailRowDirective {
|
|
|
130
136
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
131
137
|
}
|
|
132
138
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailRowDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
133
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: GridDetailRowDirective, isStandalone: true, selector: "tr[monaGridDetailRow]", host: { properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
139
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: GridDetailRowDirective, isStandalone: true, selector: "tr[monaGridDetailRow]", host: { attributes: { "role": "row" }, properties: { "class": "baseClass()" } }, ngImport: i0 }); }
|
|
134
140
|
}
|
|
135
141
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridDetailRowDirective, decorators: [{
|
|
136
142
|
type: Directive,
|
|
137
143
|
args: [{
|
|
138
144
|
selector: "tr[monaGridDetailRow]",
|
|
139
145
|
host: {
|
|
140
|
-
"[class]": "baseClass()"
|
|
146
|
+
"[class]": "baseClass()",
|
|
147
|
+
role: "row"
|
|
141
148
|
}
|
|
142
149
|
}]
|
|
143
150
|
}] });
|
|
@@ -149,7 +156,7 @@ class GridRowDirective {
|
|
|
149
156
|
...(ngDevMode ? [{ debugName: "ariaRowIndex" }] : /* istanbul ignore next */ []));
|
|
150
157
|
this.baseClass = computed(() => {
|
|
151
158
|
const selected = this.selected();
|
|
152
|
-
return gridListTableRowThemeVariants({ selected });
|
|
159
|
+
return gridListTableRowThemeVariants({ selected, virtual: this.#gridService.virtualScrollOptions().enabled });
|
|
153
160
|
}, /* @ts-ignore */
|
|
154
161
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
155
162
|
this.selectable = computed(() => this.#gridService.selectableOptions().enabled, /* @ts-ignore */
|
|
@@ -295,7 +302,7 @@ class GridCommandCellComponent {
|
|
|
295
302
|
this.gridService.commitRowEdit(event);
|
|
296
303
|
}
|
|
297
304
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCommandCellComponent, isStandalone: true, selector: "mona-grid-command-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, newRow: { classPropertyName: "newRow", publicName: "newRow", isSignal: true, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "w-full" }, ngImport: i0, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-
|
|
305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCommandCellComponent, isStandalone: true, selector: "mona-grid-command-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, newRow: { classPropertyName: "newRow", publicName: "newRow", isSignal: true, isRequired: false, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "flex items-center w-full min-h-9" }, ngImport: i0, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex min-h-9 items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().saveRow\"\n [attr.title]=\"messages().save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().cancelRowEdit\"\n [attr.title]=\"messages().cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().editRow\"\n [attr.title]=\"messages().edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().removeRow\"\n [attr.title]=\"messages().remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "type", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideCheck, selector: "svg[lucideCheck]" }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }, { kind: "component", type: LucidePencil, selector: "svg[lucidePencil]" }, { kind: "component", type: LucideTrash2, selector: "svg[lucideTrash2]" }, { kind: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
|
|
299
306
|
}
|
|
300
307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCommandCellComponent, decorators: [{
|
|
301
308
|
type: Component,
|
|
@@ -309,8 +316,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
309
316
|
LucideTrash2,
|
|
310
317
|
TooltipComponent
|
|
311
318
|
], host: {
|
|
312
|
-
class: "w-full"
|
|
313
|
-
}, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex h-
|
|
319
|
+
class: "flex items-center w-full min-h-9"
|
|
320
|
+
}, template: "@if (column().commandTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().commandTemplate\"\n [ngTemplateOutletContext]=\"commandContext()\"></ng-container>\n} @else {\n <div class=\"flex min-h-9 items-center gap-1 px-1\">\n @if (isEditing()) {\n @if (hasRowError()) {\n <span class=\"shrink-0 px-1 text-error\" #rowErrorIcon>\n <svg lucideOctagonAlert [size]=\"14\"></svg>\n </span>\n <mona-tooltip [target]=\"rowErrorIcon\">\n <span class=\"p-1 whitespace-pre-line\">{{ rowErrorTooltip() }}</span>\n </mona-tooltip>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().saveRow\"\n [attr.title]=\"messages().save\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"save($event)\">\n <svg lucideCheck [size]=\"14\"></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().cancelRowEdit\"\n [attr.title]=\"messages().cancel\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"cancel($event)\">\n <svg lucideX [size]=\"14\"></svg>\n </button>\n } @else {\n @if (canEditRows()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().editRow\"\n [attr.title]=\"messages().edit\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"edit($event)\">\n <svg lucidePencil [size]=\"14\"></svg>\n </button>\n }\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n [iconOnly]=\"true\"\n [attr.aria-label]=\"messages().removeRow\"\n [attr.title]=\"messages().remove\"\n class=\"w-6 h-6\"\n [tabindex]=\"-1\"\n (click)=\"remove($event)\">\n <svg lucideTrash2 [size]=\"14\"></svg>\n </button>\n }\n </div>\n}\n" }]
|
|
314
321
|
}], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], newRow: [{ type: i0.Input, args: [{ isSignal: true, alias: "newRow", required: false }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: false }] }] } });
|
|
315
322
|
|
|
316
323
|
const FOCUSABLE_TARGET_SELECTOR$1 = "button, input, select, textarea, a[href], [tabindex]";
|
|
@@ -330,11 +337,11 @@ class GridEditorComponent {
|
|
|
330
337
|
this.textBoxRef = viewChild(TextBoxComponent, /* @ts-ignore */
|
|
331
338
|
...(ngDevMode ? [{ debugName: "textBoxRef" }] : /* istanbul ignore next */ []));
|
|
332
339
|
this.baseClass = computed(() => {
|
|
333
|
-
return gridCellEditorBaseThemeVariants();
|
|
340
|
+
return gridCellEditorBaseThemeVariants({ virtual: this.#gridService?.virtualScrollOptions().enabled ?? false });
|
|
334
341
|
}, /* @ts-ignore */
|
|
335
342
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
336
343
|
this.editTemplateContext = computed(() => ({
|
|
337
|
-
cancel: () => this.
|
|
344
|
+
cancel: () => this.cancelEdit.emit(),
|
|
338
345
|
column: this.column().field,
|
|
339
346
|
commit: () => this.commit.emit(),
|
|
340
347
|
dataField: this.column().field,
|
|
@@ -351,7 +358,9 @@ class GridEditorComponent {
|
|
|
351
358
|
}), /* @ts-ignore */
|
|
352
359
|
...(ngDevMode ? [{ debugName: "editTemplateContext" }] : /* istanbul ignore next */ []));
|
|
353
360
|
this.editorInputClass = computed(() => {
|
|
354
|
-
return gridCellEditorInputThemeVariants(
|
|
361
|
+
return gridCellEditorInputThemeVariants({
|
|
362
|
+
virtual: this.#gridService?.virtualScrollOptions().enabled ?? false
|
|
363
|
+
});
|
|
355
364
|
}, /* @ts-ignore */
|
|
356
365
|
...(ngDevMode ? [{ debugName: "editorInputClass" }] : /* istanbul ignore next */ []));
|
|
357
366
|
this.fieldErrorMessage = computed(() => {
|
|
@@ -377,7 +386,7 @@ class GridEditorComponent {
|
|
|
377
386
|
*/
|
|
378
387
|
this.autoFocus = input(true, /* @ts-ignore */
|
|
379
388
|
...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
|
|
380
|
-
this.
|
|
389
|
+
this.cancelEdit = output();
|
|
381
390
|
this.column = input.required(/* @ts-ignore */
|
|
382
391
|
...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
|
|
383
392
|
this.commit = output();
|
|
@@ -453,7 +462,7 @@ class GridEditorComponent {
|
|
|
453
462
|
}
|
|
454
463
|
onEditCancel() {
|
|
455
464
|
if (!this.#datePopupOpen()) {
|
|
456
|
-
this.
|
|
465
|
+
this.cancelEdit.emit();
|
|
457
466
|
}
|
|
458
467
|
}
|
|
459
468
|
onHostKeydown(event) {
|
|
@@ -510,7 +519,7 @@ class GridEditorComponent {
|
|
|
510
519
|
this.formField()().value.set(value);
|
|
511
520
|
}
|
|
512
521
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridEditorComponent, isStandalone: true, selector: "mona-grid-editor", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, isNew: { classPropertyName: "isNew", publicName: "isNew", isSignal: true, isRequired: false, transformFunction: null }, session: { classPropertyName: "session", publicName: "session", isSignal: true, isRequired: true, transformFunction: null }, tabNavigationEnabled: { classPropertyName: "tabNavigationEnabled", publicName: "tabNavigationEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: {
|
|
522
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridEditorComponent, isStandalone: true, selector: "mona-grid-editor", inputs: { autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, isNew: { classPropertyName: "isNew", publicName: "isNew", isSignal: true, isRequired: false, transformFunction: null }, session: { classPropertyName: "session", publicName: "session", isSignal: true, isRequired: true, transformFunction: null }, tabNavigationEnabled: { classPropertyName: "tabNavigationEnabled", publicName: "tabNavigationEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cancelEdit: "cancelEdit", commit: "commit", tabNavigate: "tabNavigate" }, host: { listeners: { "keydown": "onHostKeydown($event)" }, properties: { "class": "baseClass()" } }, viewQueries: [{ propertyName: "numericTextBoxRef", first: true, predicate: NumericTextBoxComponent, descendants: true, isSignal: true }, { propertyName: "textBoxRef", first: true, predicate: TextBoxComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full min-h-8\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ms-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n", dependencies: [{ kind: "component", type: CheckBoxComponent, selector: "mona-check-box", inputs: ["checked", "disabled", "indeterminate", "invalid", "label", "labelPosition", "labelSize", "required", "rounded", "tabIndex", "touched", "class"], outputs: ["checkedChange", "inputBlur", "inputChange", "inputFocus", "touch"] }, { kind: "component", type: DatePickerComponent, selector: "mona-date-picker", inputs: ["disabled", "disabledDates", "firstDay", "format", "invalid", "max", "min", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "readonlyInput", "required", "rounded", "showClearButton", "size", "touched", "class", "value", "weekNumber"], outputs: ["close", "closed", "open", "opened", "touch", "valueChange"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "component", type: LucideOctagonAlert, selector: "svg[lucideOctagonAlert], svg[lucideAlertOctagon]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NumericTextBoxComponent, selector: "mona-numeric-text-box", inputs: ["aria-label", "decimals", "disabled", "formatter", "invalid", "maxValue", "minValue", "nullable", "readonly", "required", "rounded", "size", "spinners", "step", "tabindex", "touched", "class", "value"], outputs: ["inputBlur", "inputFocus", "inputFocusOut", "touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["clearButton", "disabled", "inputAttributes", "inputClass", "inputStyle", "invalid", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "component", type: TooltipComponent, selector: "mona-tooltip", inputs: ["disabled", "hideDelay", "position", "rounded", "showDelay", "target"], outputs: ["hidden", "shown"] }] }); }
|
|
514
523
|
}
|
|
515
524
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridEditorComponent, decorators: [{
|
|
516
525
|
type: Component,
|
|
@@ -526,8 +535,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
526
535
|
], host: {
|
|
527
536
|
"[class]": "baseClass()",
|
|
528
537
|
"(keydown)": "onHostKeydown($event)"
|
|
529
|
-
}, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full h-
|
|
530
|
-
}], ctorParameters: () => [], propDecorators: { numericTextBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NumericTextBoxComponent), { isSignal: true }] }], textBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextBoxComponent), { isSignal: true }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }],
|
|
538
|
+
}, template: "@if (column().editTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().editTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: editTemplateContext() }\"></ng-container>\n} @else {\n <div class=\"relative flex items-center w-full min-h-8\">\n @switch (column().dataType) {\n @case (\"string\") {\n <mona-text-box\n [class]=\"editorInputClass()\"\n [inputAttributes]=\"{ autocomplete: 'off' }\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-text-box>\n }\n @case (\"number\") {\n <mona-numeric-text-box\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"commit.emit()\"\n (keydown.escape)=\"onEditCancel()\"\n (inputBlur)=\"commit.emit()\"\n [size]=\"'small'\"></mona-numeric-text-box>\n }\n @case (\"boolean\") {\n <mona-check-box\n class=\"{{ editorInputClass() }} ms-2\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (click)=\"onBooleanEditorClick()\"\n (focusout)=\"onBooleanEditorFocusOut($event)\"\n (pointerdown)=\"onBooleanEditorPointerDown()\"\n (keydown.escape)=\"onEditCancel()\"\n (keydown.enter)=\"commit.emit()\"></mona-check-box>\n }\n @case (\"date\") {\n <mona-date-picker\n [class]=\"editorInputClass()\"\n [rounded]=\"'none'\"\n [formField]=\"$any(formField())\"\n (keydown.enter)=\"onDatePickerEnter($event)\"\n (keydown.escape)=\"onEditCancel()\"\n (focusout)=\"onDatePickerFocusOut($event)\"\n (opened)=\"onDatePickerOpen()\"\n (closed)=\"onDatePickerClose()\"\n size=\"small\"></mona-date-picker>\n }\n }\n @if (hasFieldError()) {\n <span class=\"shrink-0 px-1 text-error\" #fieldErrorIcon>\n <svg lucideOctagonAlert [size]=\"12\"></svg>\n </span>\n <mona-tooltip [target]=\"fieldErrorIcon\">\n <span class=\"p-1\">{{ fieldErrorMessage() }}</span>\n </mona-tooltip>\n }\n </div>\n}\n" }]
|
|
539
|
+
}], ctorParameters: () => [], propDecorators: { numericTextBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => NumericTextBoxComponent), { isSignal: true }] }], textBoxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TextBoxComponent), { isSignal: true }] }], autoFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoFocus", required: false }] }], cancelEdit: [{ type: i0.Output, args: ["cancelEdit"] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], commit: [{ type: i0.Output, args: ["commit"] }], isNew: [{ type: i0.Input, args: [{ isSignal: true, alias: "isNew", required: false }] }], session: [{ type: i0.Input, args: [{ isSignal: true, alias: "session", required: true }] }], tabNavigate: [{ type: i0.Output, args: ["tabNavigate"] }], tabNavigationEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabNavigationEnabled", required: false }] }] } });
|
|
531
540
|
|
|
532
541
|
class GridAddRowComponent {
|
|
533
542
|
constructor() {
|
|
@@ -552,7 +561,7 @@ class GridAddRowComponent {
|
|
|
552
561
|
this.gridService.patchAddCell(column.field, value);
|
|
553
562
|
}
|
|
554
563
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridAddRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
555
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridAddRowComponent, isStandalone: true, selector: "tr[monaGridAddRow]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "row", "data-grid-add-row": "true" }, properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'reorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('reorder') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('reorder') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'reorder'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'detail'\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('detail') ?? 0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('detail') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'detail'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('selection') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('selection') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'selection'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"colIndex === gridService.leadingLogicalColumnCount() + columns().length - 1\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (
|
|
564
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridAddRowComponent, isStandalone: true, selector: "tr[monaGridAddRow]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "row", "data-grid-add-row": "true" }, properties: { "class": "baseClass()" } }, ngImport: i0, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'reorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('reorder') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('reorder') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'reorder'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'detail'\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('detail') ?? 0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('detail') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'detail'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('selection') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('selection') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'selection'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"colIndex === gridService.leadingLogicalColumnCount() + columns().length - 1\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (cancelEdit)=\"onCancel()\"></mona-grid-editor>\n } @else {\n <span class=\"block truncate px-2\">{{ rowData[column.field] }}</span>\n }\n </td>\n }\n}\n", dependencies: [{ kind: "directive", type: GridCellDirective, selector: "td[monaGridCell]", inputs: ["dataCell", "groupHeader", "groupToggle", "grouped", "indentCell", "lastInRow", "masterDetailContent", "masterDetailToggle", "nextRowType", "prevRowType"] }, { kind: "component", type: GridCommandCellComponent, selector: "mona-grid-command-cell", inputs: ["column", "newRow", "row"] }, { kind: "component", type: GridEditorComponent, selector: "mona-grid-editor", inputs: ["autoFocus", "column", "isNew", "session", "tabNavigationEnabled"], outputs: ["cancelEdit", "commit", "tabNavigate"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "groupPrefixWidth", "lockedCellHeader", "lockedStructuralOffset", "structuralColumn"] }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggleExpand"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
556
565
|
}
|
|
557
566
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridAddRowComponent, decorators: [{
|
|
558
567
|
type: Component,
|
|
@@ -566,7 +575,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
566
575
|
"[class]": "baseClass()",
|
|
567
576
|
role: "row",
|
|
568
577
|
"data-grid-add-row": "true"
|
|
569
|
-
}, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'reorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('reorder') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('reorder') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'reorder'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'detail'\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('detail') ?? 0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('detail') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'detail'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('selection') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('selection') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'selection'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"colIndex === gridService.leadingLogicalColumnCount() + columns().length - 1\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (
|
|
578
|
+
}, template: "@if (gridService.addRowData(); as rowData) {\n @let session = gridService.editSession();\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [grouped]=\"true\"\n [indentCell]=\"true\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'reorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('reorder') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('reorder') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'reorder'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'detail'\"\n [masterDetailToggle]=\"true\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('detail') ?? 0\"\n [cellKind]=\"'detail'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('detail') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'detail'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridCell\n monaGridLogicalCell\n monaGridLockedCell\n [structuralColumn]=\"'selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"gridService.structuralColIndexMap().get('selection') ?? 0\"\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [firstInRow]=\"gridService.structuralColIndexMap().get('selection') === 0\"\n [lastInRow]=\"columns().length === 0 && gridService.structuralLastKind() === 'selection'\"\n [section]=\"'add'\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of columns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <td\n monaGridCell\n monaGridLockedCell\n [column]=\"column\"\n [dataCell]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"column.kind\"\n [colIndex]=\"colIndex\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [section]=\"'add'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"colIndex === gridService.leadingLogicalColumnCount() + columns().length - 1\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\"\n [style.min-width.px]=\"column.minWidth\">\n @if (column.kind === \"command\") {\n <mona-grid-command-cell [column]=\"column\" [newRow]=\"true\"></mona-grid-command-cell>\n } @else if (column.editable && session) {\n <mona-grid-editor\n [column]=\"column\"\n [autoFocus]=\"isFirstEditableColumn(column)\"\n [isNew]=\"true\"\n [session]=\"session\"\n (commit)=\"onCommit()\"\n (cancelEdit)=\"onCancel()\"></mona-grid-editor>\n } @else {\n <span class=\"block truncate px-2\">{{ rowData[column.field] }}</span>\n }\n </td>\n }\n}\n" }]
|
|
570
579
|
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }] } });
|
|
571
580
|
|
|
572
581
|
const FOCUSABLE_TARGET_SELECTOR = "button, input, select, textarea, a[href], [tabindex]";
|
|
@@ -578,12 +587,12 @@ class GridCellComponent {
|
|
|
578
587
|
this.#locale = inject(LOCALE_ID);
|
|
579
588
|
this.#logicalCell = inject(GridLogicalCellDirective, { optional: true });
|
|
580
589
|
this.baseClass = computed(() => {
|
|
581
|
-
return gridCellBaseThemeVariants();
|
|
590
|
+
return gridCellBaseThemeVariants({ virtual: this.gridService.virtualScrollOptions().enabled });
|
|
582
591
|
}, /* @ts-ignore */
|
|
583
592
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
584
593
|
this.cellContainerClass = computed(() => {
|
|
585
594
|
const editing = this.isEditing();
|
|
586
|
-
return gridCellContainerThemeVariants({ editing });
|
|
595
|
+
return gridCellContainerThemeVariants({ editing, virtual: this.gridService.virtualScrollOptions().enabled });
|
|
587
596
|
}, /* @ts-ignore */
|
|
588
597
|
...(ngDevMode ? [{ debugName: "cellContainerClass" }] : /* istanbul ignore next */ []));
|
|
589
598
|
this.cellDirtyIndicatorClass = computed(() => {
|
|
@@ -758,13 +767,13 @@ class GridCellComponent {
|
|
|
758
767
|
this.gridService.startCellEdit(this.cellUid(), this.row(), this.column(), originalEvent);
|
|
759
768
|
}
|
|
760
769
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
761
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCellComponent, isStandalone: true, selector: "mona-grid-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataItem = row().data;\n@let dataKey = column().field;\n\n@if (column().kind === \"command\") {\n <mona-grid-command-cell [column]=\"column()\" [row]=\"row()\"></mona-grid-command-cell>\n} @else {\n <div\n
|
|
770
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridCellComponent, isStandalone: true, selector: "mona-grid-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null }, row: { classPropertyName: "row", publicName: "row", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataItem = row().data;\n@let dataKey = column().field;\n\n@if (column().kind === \"command\") {\n <mona-grid-command-cell [column]=\"column()\" [row]=\"row()\"></mona-grid-command-cell>\n} @else {\n <div\n [class]=\"cellContainerClass()\"\n cdkMonitorSubtreeFocus\n [attr.data-uid]=\"cellUid()\"\n [attr.data-ruid]=\"row().uid\"\n [attr.data-field]=\"dataKey\"\n [attr.data-col-index]=\"column().index\"\n (dblclick)=\"onCellDoubleClick($event)\">\n @if (isEditing() && gridService.editSession(); as session) {\n <mona-grid-editor\n [column]=\"column()\"\n [autoFocus]=\"shouldAutoFocusEditor()\"\n [session]=\"session\"\n [tabNavigationEnabled]=\"editContextIsCellMode()\"\n (commit)=\"onEditCommit()\"\n (cancelEdit)=\"onEditCancel()\"\n (tabNavigate)=\"onEditTabNavigate($event)\"></mona-grid-editor>\n } @else if (column().cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem, column: column().field }\"></ng-container>\n } @else {\n <span [class]=\"cellTextClass()\">{{ formattedDisplayValue() }}</span>\n }\n @if (!isCellPristine()) {\n <span aria-hidden=\"true\" [class]=\"cellDirtyIndicatorClass()\" [title]=\"gridService.messages().modified\"></span>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkMonitorFocus, selector: "[cdkMonitorElementFocus], [cdkMonitorSubtreeFocus]", outputs: ["cdkFocusChange"], exportAs: ["cdkMonitorFocus"] }, { kind: "component", type: GridCommandCellComponent, selector: "mona-grid-command-cell", inputs: ["column", "newRow", "row"] }, { kind: "component", type: GridEditorComponent, selector: "mona-grid-editor", inputs: ["autoFocus", "column", "isNew", "session", "tabNavigationEnabled"], outputs: ["cancelEdit", "commit", "tabNavigate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
762
771
|
}
|
|
763
772
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridCellComponent, decorators: [{
|
|
764
773
|
type: Component,
|
|
765
774
|
args: [{ selector: "mona-grid-cell", imports: [A11yModule, GridCommandCellComponent, GridEditorComponent, NgTemplateOutlet], host: {
|
|
766
775
|
"[class]": "baseClass()"
|
|
767
|
-
}, template: "@let dataItem = row().data;\n@let dataKey = column().field;\n\n@if (column().kind === \"command\") {\n <mona-grid-command-cell [column]=\"column()\" [row]=\"row()\"></mona-grid-command-cell>\n} @else {\n <div\n
|
|
776
|
+
}, template: "@let dataItem = row().data;\n@let dataKey = column().field;\n\n@if (column().kind === \"command\") {\n <mona-grid-command-cell [column]=\"column()\" [row]=\"row()\"></mona-grid-command-cell>\n} @else {\n <div\n [class]=\"cellContainerClass()\"\n cdkMonitorSubtreeFocus\n [attr.data-uid]=\"cellUid()\"\n [attr.data-ruid]=\"row().uid\"\n [attr.data-field]=\"dataKey\"\n [attr.data-col-index]=\"column().index\"\n (dblclick)=\"onCellDoubleClick($event)\">\n @if (isEditing() && gridService.editSession(); as session) {\n <mona-grid-editor\n [column]=\"column()\"\n [autoFocus]=\"shouldAutoFocusEditor()\"\n [session]=\"session\"\n [tabNavigationEnabled]=\"editContextIsCellMode()\"\n (commit)=\"onEditCommit()\"\n (cancelEdit)=\"onEditCancel()\"\n (tabNavigate)=\"onEditTabNavigate($event)\"></mona-grid-editor>\n } @else if (column().cellTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column().cellTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem, column: column().field }\"></ng-container>\n } @else {\n <span [class]=\"cellTextClass()\">{{ formattedDisplayValue() }}</span>\n }\n @if (!isCellPristine()) {\n <span aria-hidden=\"true\" [class]=\"cellDirtyIndicatorClass()\" [title]=\"gridService.messages().modified\"></span>\n }\n </div>\n}\n" }]
|
|
768
777
|
}], propDecorators: { column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: true }] }] } });
|
|
769
778
|
|
|
770
779
|
class GridRowReorderHandleComponent {
|
|
@@ -797,6 +806,8 @@ class GridRowReorderHandleComponent {
|
|
|
797
806
|
return messages.rowReorderDisabledGrouped;
|
|
798
807
|
case "single-row":
|
|
799
808
|
return messages.rowReorderDisabledSingleRow;
|
|
809
|
+
case "server-binding":
|
|
810
|
+
return messages.rowReorderDisabledServerBinding;
|
|
800
811
|
case "sorted":
|
|
801
812
|
return messages.rowReorderDisabledSorted;
|
|
802
813
|
case "virtual-scroll":
|
|
@@ -863,7 +874,7 @@ class GridSelectionCheckboxComponent {
|
|
|
863
874
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
864
875
|
this.checked = computed(() => this.#gridService.isRowSelected(this.row()), /* @ts-ignore */
|
|
865
876
|
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
866
|
-
this.hostClass = computed(() => gridSelectionCellThemeVariants(), /* @ts-ignore */
|
|
877
|
+
this.hostClass = computed(() => gridSelectionCellThemeVariants({ virtual: this.#gridService.virtualScrollOptions().enabled }), /* @ts-ignore */
|
|
867
878
|
...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
868
879
|
/**
|
|
869
880
|
* @description The grid row whose selected state this checkbox controls.
|
|
@@ -915,12 +926,12 @@ class GridToggleComponent {
|
|
|
915
926
|
this.expanded.update(v => !v);
|
|
916
927
|
}
|
|
917
928
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
918
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridToggleComponent, isStandalone: true, selector: "mona-grid-toggle", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<span\n [style.width.px]=\"width()\"\n class=\"inline-flex items-center justify-center h-
|
|
929
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridToggleComponent, isStandalone: true, selector: "mona-grid-toggle", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { expanded: "expandedChange" }, ngImport: i0, template: "<span\n [style.width.px]=\"width()\"\n class=\"inline-flex items-center justify-center min-h-9 aspect-square\"\n (click)=\"onToggleDetailClick($event)\">\n @if (expanded()) {\n <svg [lucideIcon]=\"collapseIcon()\" [size]=\"16\"></svg>\n } @else {\n <svg [lucideIcon]=\"expandIcon()\" [size]=\"16\"></svg>\n }\n</span>\n", dependencies: [{ kind: "component", type: LucideDynamicIcon, selector: "svg[lucideIcon]", inputs: ["lucideIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
919
930
|
}
|
|
920
931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridToggleComponent, decorators: [{
|
|
921
932
|
type: Component,
|
|
922
|
-
args: [{ selector: "mona-grid-toggle", imports: [LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [style.width.px]=\"width()\"\n class=\"inline-flex items-center justify-center h-
|
|
933
|
+
args: [{ selector: "mona-grid-toggle", imports: [LucideDynamicIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<span\n [style.width.px]=\"width()\"\n class=\"inline-flex items-center justify-center min-h-9 aspect-square\"\n (click)=\"onToggleDetailClick($event)\">\n @if (expanded()) {\n <svg [lucideIcon]=\"collapseIcon()\" [size]=\"16\"></svg>\n } @else {\n <svg [lucideIcon]=\"expandIcon()\" [size]=\"16\"></svg>\n }\n</span>\n" }]
|
|
923
934
|
}], propDecorators: { expanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "expanded", required: true }] }, { type: i0.Output, args: ["expandedChange"] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: true }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: true }] }] } });
|
|
924
935
|
|
|
925
936
|
export { GridAddRowComponent as G, GridCellComponent as a, GridRowDirective as b, GridCellDirective as c, GridDetailRowDirective as d, GridDetailIndentCellDirective as e, GridDetailContentCellDirective as f, GridToggleComponent as g, GridSelectionCheckboxComponent as h, GridRowReorderHandleComponent as i };
|
|
926
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-
|
|
937
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-toggle.component-DFMbXpKb.mjs.map
|