@nanahoshi/mona-ui 0.18.5 → 0.19.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/README.md +71 -13
- package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +11 -3
- package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +17 -9
- package/fesm2022/nanahoshi-mona-ui-button-group.mjs +16 -7
- package/fesm2022/nanahoshi-mona-ui-calendar.mjs +122 -48
- package/fesm2022/nanahoshi-mona-ui-card.mjs +22 -14
- package/fesm2022/nanahoshi-mona-ui-chart.mjs +78 -18
- package/fesm2022/nanahoshi-mona-ui-check-box.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +199 -77
- package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +1 -2
- package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +23 -5
- package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +49 -28
- package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +42 -26
- package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +11 -3
- package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +28 -16
- package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +74 -51
- package/fesm2022/nanahoshi-mona-ui-dialog.mjs +57 -25
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +13 -5
- package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +17 -6
- package/fesm2022/nanahoshi-mona-ui-editor.mjs +178 -59
- package/fesm2022/nanahoshi-mona-ui-filter.mjs +137 -54
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-WEDbZ5vy.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-ibH5osCg.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs} +2 -2
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs +145 -0
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-hc-LeIb0.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Byb9iTes.mjs} +21 -17
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DYajpOb9.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs} +5 -5
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-Pm8Fbp6M.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs} +90 -42
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-i18n.mjs +1168 -0
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +12 -4
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -21
- package/fesm2022/nanahoshi-mona-ui-list-box.mjs +33 -18
- package/fesm2022/nanahoshi-mona-ui-list-view.mjs +10 -10
- package/fesm2022/nanahoshi-mona-ui-list.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-menubar.mjs +29 -16
- package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +12 -3
- package/fesm2022/nanahoshi-mona-ui-notification.mjs +23 -18
- package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +211 -106
- package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +14 -6
- package/fesm2022/nanahoshi-mona-ui-pager.mjs +46 -19
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +57 -46
- package/fesm2022/nanahoshi-mona-ui-popup.mjs +35 -15
- package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +38 -17
- package/fesm2022/nanahoshi-mona-ui-rating.mjs +25 -7
- package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +431 -101
- package/fesm2022/nanahoshi-mona-ui-segmented.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-sheet.mjs +26 -8
- package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +222 -28
- package/fesm2022/nanahoshi-mona-ui-slider.mjs +91 -36
- package/fesm2022/nanahoshi-mona-ui-spinner.mjs +34 -15
- package/fesm2022/nanahoshi-mona-ui-split-button.mjs +39 -23
- package/fesm2022/nanahoshi-mona-ui-splitter.mjs +50 -25
- package/fesm2022/nanahoshi-mona-ui-stepper.mjs +32 -14
- package/fesm2022/nanahoshi-mona-ui-switch.mjs +9 -9
- package/fesm2022/nanahoshi-mona-ui-tabs.mjs +74 -56
- package/fesm2022/nanahoshi-mona-ui-text-box.mjs +16 -8
- package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +33 -19
- package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +66 -27
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +23 -15
- package/fesm2022/nanahoshi-mona-ui-window.mjs +71 -40
- package/i18n/package.json +4 -0
- package/package.json +5 -1
- package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -1
- package/types/nanahoshi-mona-ui-breadcrumb.d.ts +9 -3
- package/types/nanahoshi-mona-ui-button-group.d.ts +9 -3
- package/types/nanahoshi-mona-ui-calendar.d.ts +13 -3
- package/types/nanahoshi-mona-ui-card.d.ts +8 -2
- package/types/nanahoshi-mona-ui-chart.d.ts +10 -1
- package/types/nanahoshi-mona-ui-chip.d.ts +14 -5
- package/types/nanahoshi-mona-ui-color-gradient.d.ts +6 -1
- package/types/nanahoshi-mona-ui-color-palette.d.ts +21 -10
- package/types/nanahoshi-mona-ui-color-picker.d.ts +30 -20
- package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -1
- package/types/nanahoshi-mona-ui-date-picker.d.ts +7 -2
- package/types/nanahoshi-mona-ui-datetime-picker.d.ts +33 -8
- package/types/nanahoshi-mona-ui-dialog.d.ts +16 -7
- package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -1
- package/types/nanahoshi-mona-ui-dropdowns.d.ts +4 -1
- package/types/nanahoshi-mona-ui-editor.d.ts +6 -1
- package/types/nanahoshi-mona-ui-filter.d.ts +16 -10
- package/types/nanahoshi-mona-ui-grid.d.ts +38 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +633 -0
- package/types/nanahoshi-mona-ui-internal-list.d.ts +7 -2
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +7 -3
- package/types/nanahoshi-mona-ui-list-box.d.ts +9 -4
- package/types/nanahoshi-mona-ui-list-view.d.ts +6 -6
- package/types/nanahoshi-mona-ui-list.d.ts +1 -1
- package/types/nanahoshi-mona-ui-menubar.d.ts +59 -58
- package/types/nanahoshi-mona-ui-multi-select.d.ts +6 -1
- package/types/nanahoshi-mona-ui-notification.d.ts +11 -5
- package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +24 -15
- package/types/nanahoshi-mona-ui-otp-input.d.ts +9 -3
- package/types/nanahoshi-mona-ui-pager.d.ts +19 -6
- package/types/nanahoshi-mona-ui-popup.d.ts +2 -1
- package/types/nanahoshi-mona-ui-progress-bar.d.ts +9 -7
- package/types/nanahoshi-mona-ui-rating.d.ts +19 -12
- package/types/nanahoshi-mona-ui-scroll-view.d.ts +34 -28
- package/types/nanahoshi-mona-ui-sheet.d.ts +8 -2
- package/types/nanahoshi-mona-ui-sidebar.d.ts +3 -0
- package/types/nanahoshi-mona-ui-slider.d.ts +44 -26
- package/types/nanahoshi-mona-ui-spinner.d.ts +13 -4
- package/types/nanahoshi-mona-ui-split-button.d.ts +62 -56
- package/types/nanahoshi-mona-ui-splitter.d.ts +9 -6
- package/types/nanahoshi-mona-ui-stepper.d.ts +9 -3
- package/types/nanahoshi-mona-ui-switch.d.ts +1 -1
- package/types/nanahoshi-mona-ui-tabs.d.ts +96 -35
- package/types/nanahoshi-mona-ui-text-box.d.ts +11 -5
- package/types/nanahoshi-mona-ui-time-picker.d.ts +7 -2
- package/types/nanahoshi-mona-ui-time-selector.d.ts +16 -5
- package/types/nanahoshi-mona-ui-tree-view.d.ts +15 -10
- package/types/nanahoshi-mona-ui-window.d.ts +26 -20
- package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ZM3CneJ0.mjs +0 -145
|
@@ -5,6 +5,7 @@ import { isPlatformBrowser, DOCUMENT as DOCUMENT$1, NgTemplateOutlet } from '@an
|
|
|
5
5
|
import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { form } from '@angular/forms/signals';
|
|
7
7
|
import { ImmutableList, ImmutableDictionary, ImmutableSet, KeyValuePair, Dictionary, select, sequenceEqual, orderBy, any } from '@mirei/ts-collections';
|
|
8
|
+
import { MonaI18nService, injectComponentDirection } from '@nanahoshi/mona-ui/i18n';
|
|
8
9
|
import { Query } from '@nanahoshi/mona-ui/query';
|
|
9
10
|
import { Subject, BehaviorSubject, filter, startWith, pairwise, map, skip, fromEvent, take, debounceTime } from 'rxjs';
|
|
10
11
|
import { v4 } from 'uuid';
|
|
@@ -191,6 +192,40 @@ class RowReorderEvent extends PreventableEvent {
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
|
|
195
|
+
const GRID_DEFAULT_MESSAGES = {
|
|
196
|
+
all: "(All)",
|
|
197
|
+
apply: "Apply",
|
|
198
|
+
cancel: "Cancel",
|
|
199
|
+
cancelRowEdit: "Cancel row edit",
|
|
200
|
+
columns: "Columns",
|
|
201
|
+
columnsSelected: (count) => `${count} selected columns`,
|
|
202
|
+
delete: "Delete",
|
|
203
|
+
deleteRowConfirmation: "Are you sure you want to delete this item?",
|
|
204
|
+
deleteRowTitle: "Delete row?",
|
|
205
|
+
dragColumnHeaderToGroup: "Drag a column header here to group",
|
|
206
|
+
edit: "Edit",
|
|
207
|
+
editRow: "Edit row",
|
|
208
|
+
fieldValidationError: "Invalid value.",
|
|
209
|
+
filterByColumn: (column) => `Filter by ${column}`,
|
|
210
|
+
filterPlaceholder: "Filter...",
|
|
211
|
+
modified: "Modified",
|
|
212
|
+
moveAsNext: "Move as next",
|
|
213
|
+
moveAsPrevious: "Move as previous",
|
|
214
|
+
moveRow: "Move row",
|
|
215
|
+
noData: "No data",
|
|
216
|
+
remove: "Remove",
|
|
217
|
+
removeRow: "Remove row",
|
|
218
|
+
reorderRow: (rowNumber) => `Reorder row ${rowNumber}`,
|
|
219
|
+
resizeColumn: "Resize column",
|
|
220
|
+
rowReorder: "Row reorder",
|
|
221
|
+
rowReorderKeyboardHint: "Use Alt plus Up Arrow or Alt plus Down Arrow to move.",
|
|
222
|
+
rowValidationError: "This row has validation errors.",
|
|
223
|
+
save: "Save",
|
|
224
|
+
saveRow: "Save row",
|
|
225
|
+
selectAllRows: "Select all rows",
|
|
226
|
+
selectRow: (rowNumber) => `Select row ${rowNumber}`
|
|
227
|
+
};
|
|
228
|
+
|
|
194
229
|
const GRID_STATE_VERSION = 1;
|
|
195
230
|
class GridService {
|
|
196
231
|
#anchorRowKey;
|
|
@@ -201,6 +236,7 @@ class GridService {
|
|
|
201
236
|
#filterableOptions;
|
|
202
237
|
#groupColumnIds;
|
|
203
238
|
#horizontalScrollLeft;
|
|
239
|
+
#i18n;
|
|
204
240
|
#injector;
|
|
205
241
|
#platformId;
|
|
206
242
|
#reorderableOptions;
|
|
@@ -233,6 +269,7 @@ class GridService {
|
|
|
233
269
|
...(ngDevMode ? [{ debugName: "#groupColumnIds" }] : /* istanbul ignore next */ []));
|
|
234
270
|
this.#horizontalScrollLeft = signal(0, /* @ts-ignore */
|
|
235
271
|
...(ngDevMode ? [{ debugName: "#horizontalScrollLeft" }] : /* istanbul ignore next */ []));
|
|
272
|
+
this.#i18n = inject(MonaI18nService);
|
|
236
273
|
this.#injector = inject(Injector);
|
|
237
274
|
this.#platformId = inject(PLATFORM_ID);
|
|
238
275
|
this.#reorderableOptions = signal({ enabled: false }, /* @ts-ignore */
|
|
@@ -470,6 +507,7 @@ class GridService {
|
|
|
470
507
|
...(ngDevMode ? [{ debugName: "masterDetailRowWidth" }] : /* istanbul ignore next */ []));
|
|
471
508
|
this.masterDetailTemplate = signal(null, /* @ts-ignore */
|
|
472
509
|
...(ngDevMode ? [{ debugName: "masterDetailTemplate" }] : /* istanbul ignore next */ []));
|
|
510
|
+
this.messages = this.#i18n.componentMessages("grid", GRID_DEFAULT_MESSAGES);
|
|
473
511
|
this.newRowFactory = signal(() => ({}), /* @ts-ignore */
|
|
474
512
|
...(ngDevMode ? [{ debugName: "newRowFactory" }] : /* istanbul ignore next */ []));
|
|
475
513
|
this.paginationState = signal({ page: 1, skip: 0, take: 10 }, /* @ts-ignore */
|
|
@@ -899,7 +937,7 @@ class GridService {
|
|
|
899
937
|
getRowReorderAriaLabel(row, absoluteIndex) {
|
|
900
938
|
const options = this.rowReorderableOptions();
|
|
901
939
|
const label = options.rowAriaLabel?.(row.data, absoluteIndex);
|
|
902
|
-
return label ??
|
|
940
|
+
return label ?? this.messages().reorderRow(absoluteIndex + 1);
|
|
903
941
|
}
|
|
904
942
|
handleMultipleSelection(event, row) {
|
|
905
943
|
if (event.shiftKey) {
|
|
@@ -3102,14 +3140,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
3102
3140
|
|
|
3103
3141
|
class GridColumnResizeHandlerDirective {
|
|
3104
3142
|
#destroyRef;
|
|
3143
|
+
#direction;
|
|
3105
3144
|
#document;
|
|
3106
3145
|
#gridService;
|
|
3107
3146
|
#hostElementRef;
|
|
3108
3147
|
constructor() {
|
|
3109
3148
|
this.#destroyRef = inject(DestroyRef);
|
|
3149
|
+
this.#direction = injectComponentDirection();
|
|
3110
3150
|
this.#document = inject(DOCUMENT);
|
|
3111
3151
|
this.#gridService = inject(GridService);
|
|
3112
3152
|
this.#hostElementRef = inject((ElementRef));
|
|
3153
|
+
this.messages = this.#gridService.messages;
|
|
3113
3154
|
this.column = input.required(/* @ts-ignore */
|
|
3114
3155
|
...(ngDevMode ? [{ debugName: "column" }] : /* istanbul ignore next */ []));
|
|
3115
3156
|
this.resizeEnd = output();
|
|
@@ -3148,8 +3189,9 @@ class GridColumnResizeHandlerDirective {
|
|
|
3148
3189
|
this.resizeStart.emit();
|
|
3149
3190
|
let newWidth = -1;
|
|
3150
3191
|
const onPointerMove = (event) => {
|
|
3151
|
-
const
|
|
3152
|
-
const
|
|
3192
|
+
const physicalDelta = event.clientX - initialX;
|
|
3193
|
+
const logicalDelta = this.#direction() === "rtl" ? -physicalDelta : physicalDelta;
|
|
3194
|
+
const appliedWidth = this.#applyDelta(initialWidth, logicalDelta);
|
|
3153
3195
|
if (appliedWidth != null) {
|
|
3154
3196
|
newWidth = appliedWidth;
|
|
3155
3197
|
}
|
|
@@ -3182,14 +3224,14 @@ class GridColumnResizeHandlerDirective {
|
|
|
3182
3224
|
});
|
|
3183
3225
|
}
|
|
3184
3226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnResizeHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3185
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridColumnResizeHandlerDirective, isStandalone: true, selector: "[monaGridColumnResizeHandler]", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", resizeStart: "resizeStart" }, host: { properties: { "attr.aria-label": "
|
|
3227
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: GridColumnResizeHandlerDirective, isStandalone: true, selector: "[monaGridColumnResizeHandler]", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { resizeEnd: "resizeEnd", resizeStart: "resizeStart" }, host: { properties: { "attr.aria-label": "messages().resizeColumn", "attr.aria-orientation": "'vertical'", "attr.role": "'separator'" } }, ngImport: i0 }); }
|
|
3186
3228
|
}
|
|
3187
3229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnResizeHandlerDirective, decorators: [{
|
|
3188
3230
|
type: Directive,
|
|
3189
3231
|
args: [{
|
|
3190
3232
|
selector: "[monaGridColumnResizeHandler]",
|
|
3191
3233
|
host: {
|
|
3192
|
-
"[attr.aria-label]": "
|
|
3234
|
+
"[attr.aria-label]": "messages().resizeColumn",
|
|
3193
3235
|
"[attr.aria-orientation]": "'vertical'",
|
|
3194
3236
|
"[attr.role]": "'separator'"
|
|
3195
3237
|
}
|
|
@@ -3684,9 +3726,9 @@ const gridCellContainerThemeVariants = cva(`
|
|
|
3684
3726
|
}
|
|
3685
3727
|
});
|
|
3686
3728
|
const gridCellDirtyIndicatorThemeVariants = cva(`
|
|
3687
|
-
absolute top-0
|
|
3688
|
-
border-t-[8px] border-
|
|
3689
|
-
border-t-destructive border-
|
|
3729
|
+
absolute top-0 end-0 w-0 h-0
|
|
3730
|
+
border-t-[8px] border-s-[8px]
|
|
3731
|
+
border-t-destructive border-s-transparent
|
|
3690
3732
|
pointer-events-none
|
|
3691
3733
|
`);
|
|
3692
3734
|
const gridCellEditorBaseThemeVariants = cva(`
|
|
@@ -3721,7 +3763,7 @@ const gridColumnDropHintThemeVariants = cva(`
|
|
|
3721
3763
|
absolute flex w-1 h-full bg-primary z-10! top-0 bottom-0
|
|
3722
3764
|
`);
|
|
3723
3765
|
const gridColumnResizerThemeVariants = cva(`
|
|
3724
|
-
absolute top-0 bottom-0 w-3 bg-transparent cursor-col-resize z-10 -
|
|
3766
|
+
absolute top-0 bottom-0 w-3 bg-transparent cursor-col-resize z-10 -end-1.5
|
|
3725
3767
|
`);
|
|
3726
3768
|
const gridDetailContentCellThemeVariants = cva(`border-b border-b-border-subtle`, {
|
|
3727
3769
|
variants: {
|
|
@@ -3732,7 +3774,7 @@ const gridDetailContentCellThemeVariants = cva(`border-b border-b-border-subtle`
|
|
|
3732
3774
|
}
|
|
3733
3775
|
});
|
|
3734
3776
|
const gridDetailIndentCellThemeVariants = cva(`
|
|
3735
|
-
border-
|
|
3777
|
+
border-e border-e-border-subtle border-b border-b-border-subtle
|
|
3736
3778
|
`, {
|
|
3737
3779
|
variants: {
|
|
3738
3780
|
nextIsGroup: {
|
|
@@ -3771,17 +3813,17 @@ const gridFilterRowCellThemeVariants = cva(`
|
|
|
3771
3813
|
const gridFooterThemeVariants = cva(`
|
|
3772
3814
|
flex flex-row grow-0 shrink-0 basis-auto
|
|
3773
3815
|
overflow-hidden
|
|
3774
|
-
bg-surface-muted border-
|
|
3816
|
+
bg-surface-muted border-e border-e-border-subtle border-t border-t-border-subtle
|
|
3775
3817
|
`);
|
|
3776
3818
|
const gridFooterTableThemeVariants = cva(`
|
|
3777
3819
|
border-separate border-spacing-0 table-fixed
|
|
3778
3820
|
`);
|
|
3779
|
-
const gridFooterTableRowThemeVariants = cva(`relative inline-flex [&>td:last-child]:border-
|
|
3821
|
+
const gridFooterTableRowThemeVariants = cva(`relative inline-flex [&>td:last-child]:border-e-0`);
|
|
3780
3822
|
const gridFooterTableCellThemeVariants = cva(`
|
|
3781
3823
|
relative overflow-hidden
|
|
3782
|
-
text-
|
|
3824
|
+
text-start align-middle px-2 py-2
|
|
3783
3825
|
bg-surface-muted
|
|
3784
|
-
border-
|
|
3826
|
+
border-e border-e-border-subtle border-b border-b-border-subtle
|
|
3785
3827
|
font-medium
|
|
3786
3828
|
`);
|
|
3787
3829
|
const gridGroupPanelPlaceholderThemeVariants = cva(`
|
|
@@ -3795,21 +3837,21 @@ const gridGroupPanelThemeVariants = cva(`
|
|
|
3795
3837
|
const gridGroupRowThemeVariants = cva(`
|
|
3796
3838
|
relative z-10
|
|
3797
3839
|
w-full
|
|
3798
|
-
bg-surface-muted border-
|
|
3840
|
+
bg-surface-muted border-e border-e-border-subtle
|
|
3799
3841
|
`);
|
|
3800
3842
|
const gridHeaderThemeVariants = cva(`
|
|
3801
3843
|
flex flex-row grow-0 shrink-0 basis-auto
|
|
3802
3844
|
overflow-hidden
|
|
3803
|
-
bg-surface-muted border-
|
|
3845
|
+
bg-surface-muted border-e border-e-border-subtle
|
|
3804
3846
|
`);
|
|
3805
3847
|
const gridHeaderTableThemeVariants = cva(`
|
|
3806
3848
|
border-separate border-spacing-0 table-fixed
|
|
3807
3849
|
`);
|
|
3808
|
-
const gridHeaderTableRowThemeVariants = cva(`relative inline-flex not-first:border-t not-first:border-t-border-subtle [&>th:last-child]:border-
|
|
3850
|
+
const gridHeaderTableRowThemeVariants = cva(`relative inline-flex not-first:border-t not-first:border-t-border-subtle [&>th:last-child]:border-e-0`);
|
|
3809
3851
|
const gridHeaderTableCellThemeVariants = cva(`
|
|
3810
3852
|
relative select-none
|
|
3811
|
-
text-
|
|
3812
|
-
outline-none border-
|
|
3853
|
+
text-start overflow-visible
|
|
3854
|
+
outline-none border-e border-e-border-subtle
|
|
3813
3855
|
after:absolute after:inset-0 after:pointer-events-none
|
|
3814
3856
|
focus:after:ring-1 focus:after:ring-inset focus:after:ring-focus-indicator/35
|
|
3815
3857
|
`);
|
|
@@ -3880,7 +3922,7 @@ const gridListTableCellThemeVariants = cva(`
|
|
|
3880
3922
|
},
|
|
3881
3923
|
lastInRow: {
|
|
3882
3924
|
true: "",
|
|
3883
|
-
false: "border-
|
|
3925
|
+
false: "border-e border-e-border-subtle"
|
|
3884
3926
|
},
|
|
3885
3927
|
masterDetailContent: {
|
|
3886
3928
|
true: "",
|
|
@@ -4479,16 +4521,19 @@ class GridColumnChooserComponent {
|
|
|
4479
4521
|
...(ngDevMode ? [{ debugName: "columnListSource" }] : /* istanbul ignore next */ []));
|
|
4480
4522
|
this.filterText = signal("", /* @ts-ignore */
|
|
4481
4523
|
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
4524
|
+
this.messages = computed(() => this.#gridService.messages(), /* @ts-ignore */
|
|
4525
|
+
...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
|
|
4526
|
+
this.selectedColumnFields = linkedSignal(() => this.selectedColumns()
|
|
4527
|
+
.select(c => c.field)
|
|
4528
|
+
.toImmutableSet(), /* @ts-ignore */
|
|
4529
|
+
...(ngDevMode ? [{ debugName: "selectedColumnFields" }] : /* istanbul ignore next */ []));
|
|
4482
4530
|
this.selectedColumns = computed(() => this.#gridService
|
|
4483
4531
|
.columns()
|
|
4484
4532
|
.where(c => !c.hidden)
|
|
4485
4533
|
.toImmutableSet(), /* @ts-ignore */
|
|
4486
4534
|
...(ngDevMode ? [{ debugName: "selectedColumns" }] : /* istanbul ignore next */ []));
|
|
4487
|
-
this.selectedColumnFields = linkedSignal(() => this.selectedColumns()
|
|
4488
|
-
.select(c => c.field)
|
|
4489
|
-
.toImmutableSet(), /* @ts-ignore */
|
|
4490
|
-
...(ngDevMode ? [{ debugName: "selectedColumnFields" }] : /* istanbul ignore next */ []));
|
|
4491
4535
|
this.apply = output();
|
|
4536
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
4492
4537
|
this.cancel = output();
|
|
4493
4538
|
inject(DestroyRef).onDestroy(() => {
|
|
4494
4539
|
this.filterText.set("");
|
|
@@ -4513,7 +4558,7 @@ class GridColumnChooserComponent {
|
|
|
4513
4558
|
this.filterText.set("");
|
|
4514
4559
|
}
|
|
4515
4560
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4516
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: GridColumnChooserComponent, isStandalone: true, selector: "mona-grid-column-chooser", outputs: { apply: "apply", cancel: "cancel" }, ngImport: i0, template: "<mona-list-view\n [items]=\"columnListSource()\"\n [textField]=\"'title'\"\n [height]=\"'auto'\"\n [maxHeight]=\"300\"\n [monaListViewSelectable]=\"{ enabled: true, mode: 'multiple', checkboxes: true }\"\n [selectBy]=\"'field'\"\n [selectedKeys]=\"selectedColumnFields()\"\n (selectedKeysChange)=\"onSelectedKeysChange($event)\"\n [rounded]=\"'none'\"\n [size]=\"'small'\"\n class=\"shadow-lg\">\n <ng-template monaListViewHeaderTemplate>\n <div class=\"flex p-1 bg-header-background border-b border-b-border\">\n <mona-filter-input\n [filter]=\"filterText()\"\n (filterChange)=\"filterText.set($event.filter)\"></mona-filter-input>\n </div>\n </ng-template>\n <ng-template monaListViewFooterTemplate>\n <div class=\"flex px-3 py-1 font-medium bg-header-background border-t border-t-border\">\n {{ selectedColumnFields().length }}
|
|
4561
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: GridColumnChooserComponent, isStandalone: true, selector: "mona-grid-column-chooser", outputs: { apply: "apply", cancel: "cancel" }, ngImport: i0, template: "<mona-list-view\n [items]=\"columnListSource()\"\n [textField]=\"'title'\"\n [height]=\"'auto'\"\n [maxHeight]=\"300\"\n [monaListViewSelectable]=\"{ enabled: true, mode: 'multiple', checkboxes: true }\"\n [selectBy]=\"'field'\"\n [selectedKeys]=\"selectedColumnFields()\"\n (selectedKeysChange)=\"onSelectedKeysChange($event)\"\n [rounded]=\"'none'\"\n [size]=\"'small'\"\n class=\"shadow-lg\">\n <ng-template monaListViewHeaderTemplate>\n <div class=\"flex p-1 bg-header-background border-b border-b-border\">\n <mona-filter-input\n [filter]=\"filterText()\"\n (filterChange)=\"filterText.set($event.filter)\"></mona-filter-input>\n </div>\n </ng-template>\n <ng-template monaListViewFooterTemplate>\n <div class=\"flex px-3 py-1 font-medium bg-header-background border-t border-t-border\">\n {{ messages().columnsSelected(selectedColumnFields().length) }}\n </div>\n <div class=\"flex gap-2 px-2 py-2 bg-header-background border-t border-t-border\">\n <button class=\"flex-1\" monaButton [size]=\"'small'\" look=\"primary\" (click)=\"onApplyClick()\">{{ messages().apply }}</button>\n <button class=\"flex-1\" monaButton [size]=\"'small'\" (click)=\"onCancelClick()\">{{ messages().cancel }}</button>\n </div>\n </ng-template>\n</mona-list-view>\n", dependencies: [{ kind: "component", type: ListViewComponent, selector: "mona-list-view", inputs: ["aria-label", "height", "items", "listClass", "listItemClass", "listItemStyle", "listStyle", "maxHeight", "maxWidth", "rounded", "size", "textField", "class", "width"], outputs: ["scrollBottom"] }, { kind: "directive", type: ListViewHeaderTemplateDirective, selector: "ng-template[monaListViewHeaderTemplate]" }, { kind: "component", type: FilterInputComponent, selector: "mona-filter-input", inputs: ["debounce", "filter", "placeholder", "size"], outputs: ["filterChange", "inputBlur", "inputFocus"] }, { 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: ListViewSelectableDirective, selector: "mona-list-view[monaListViewSelectable]", inputs: ["monaListViewSelectable", "selectBy", "selectedKeys"], outputs: ["selectedKeysChange"] }, { kind: "directive", type: ListViewFooterTemplateDirective, selector: "ng-template[monaListViewFooterTemplate]" }] }); }
|
|
4517
4562
|
}
|
|
4518
4563
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnChooserComponent, decorators: [{
|
|
4519
4564
|
type: Component,
|
|
@@ -4524,7 +4569,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4524
4569
|
ButtonDirective,
|
|
4525
4570
|
ListViewSelectableDirective,
|
|
4526
4571
|
ListViewFooterTemplateDirective
|
|
4527
|
-
], template: "<mona-list-view\n [items]=\"columnListSource()\"\n [textField]=\"'title'\"\n [height]=\"'auto'\"\n [maxHeight]=\"300\"\n [monaListViewSelectable]=\"{ enabled: true, mode: 'multiple', checkboxes: true }\"\n [selectBy]=\"'field'\"\n [selectedKeys]=\"selectedColumnFields()\"\n (selectedKeysChange)=\"onSelectedKeysChange($event)\"\n [rounded]=\"'none'\"\n [size]=\"'small'\"\n class=\"shadow-lg\">\n <ng-template monaListViewHeaderTemplate>\n <div class=\"flex p-1 bg-header-background border-b border-b-border\">\n <mona-filter-input\n [filter]=\"filterText()\"\n (filterChange)=\"filterText.set($event.filter)\"></mona-filter-input>\n </div>\n </ng-template>\n <ng-template monaListViewFooterTemplate>\n <div class=\"flex px-3 py-1 font-medium bg-header-background border-t border-t-border\">\n {{ selectedColumnFields().length }}
|
|
4572
|
+
], template: "<mona-list-view\n [items]=\"columnListSource()\"\n [textField]=\"'title'\"\n [height]=\"'auto'\"\n [maxHeight]=\"300\"\n [monaListViewSelectable]=\"{ enabled: true, mode: 'multiple', checkboxes: true }\"\n [selectBy]=\"'field'\"\n [selectedKeys]=\"selectedColumnFields()\"\n (selectedKeysChange)=\"onSelectedKeysChange($event)\"\n [rounded]=\"'none'\"\n [size]=\"'small'\"\n class=\"shadow-lg\">\n <ng-template monaListViewHeaderTemplate>\n <div class=\"flex p-1 bg-header-background border-b border-b-border\">\n <mona-filter-input\n [filter]=\"filterText()\"\n (filterChange)=\"filterText.set($event.filter)\"></mona-filter-input>\n </div>\n </ng-template>\n <ng-template monaListViewFooterTemplate>\n <div class=\"flex px-3 py-1 font-medium bg-header-background border-t border-t-border\">\n {{ messages().columnsSelected(selectedColumnFields().length) }}\n </div>\n <div class=\"flex gap-2 px-2 py-2 bg-header-background border-t border-t-border\">\n <button class=\"flex-1\" monaButton [size]=\"'small'\" look=\"primary\" (click)=\"onApplyClick()\">{{ messages().apply }}</button>\n <button class=\"flex-1\" monaButton [size]=\"'small'\" (click)=\"onCancelClick()\">{{ messages().cancel }}</button>\n </div>\n </ng-template>\n</mona-list-view>\n" }]
|
|
4528
4573
|
}], ctorParameters: () => [], propDecorators: { apply: [{ type: i0.Output, args: ["apply"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
|
|
4529
4574
|
|
|
4530
4575
|
class GridFilterMenuComponent {
|
|
@@ -4634,6 +4679,7 @@ class GridFilterRowCellComponent {
|
|
|
4634
4679
|
return gridFilterRowCellThemeVariants();
|
|
4635
4680
|
}, /* @ts-ignore */
|
|
4636
4681
|
...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
|
|
4682
|
+
this.messages = this.#gridService.messages;
|
|
4637
4683
|
this.isFilterActive = computed(() => {
|
|
4638
4684
|
const op = this.selectedOperator();
|
|
4639
4685
|
if (op === "isnull" || op === "isnotnull") {
|
|
@@ -4849,7 +4895,7 @@ class GridFilterRowCellComponent {
|
|
|
4849
4895
|
});
|
|
4850
4896
|
}
|
|
4851
4897
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFilterRowCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4852
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFilterRowCellComponent, isStandalone: true, selector: "mona-grid-filter-row-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { apply: "apply" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n placeholder=\"
|
|
4898
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridFilterRowCellComponent, isStandalone: true, selector: "mona-grid-filter-row-cell", inputs: { column: { classPropertyName: "column", publicName: "column", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { apply: "apply" }, host: { properties: { "class": "baseClass()" } }, ngImport: i0, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" (click)=\"onClear()\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "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: 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: 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: "component", type: DropdownListComponent, selector: "mona-dropdown-list", inputs: ["aria-label", "aria-labelledby", "data", "disabled", "itemDisabled", "invalid", "loading", "placeholder", "popupClass", "popupHeight", "popupWidth", "readonly", "required", "rounded", "showClearButton", "size", "textField", "touched", "class", "valueField", "valuePrimitive", "value"], outputs: ["close", "closed", "disabledChange", "open", "opened", "touch", "valueChange"] }, { 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: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuCheckboxItemComponent, selector: "mona-popup-menu-checkbox-item", inputs: ["checked", "disabled", "label"], outputs: ["checkedChange", "menuClick"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideFunnelX, selector: "svg[lucideFunnelX], svg[lucideFilterX]" }, { kind: "component", type: LucideFunnel, selector: "svg[lucideFunnel], svg[lucideFilter]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4853
4899
|
}
|
|
4854
4900
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridFilterRowCellComponent, decorators: [{
|
|
4855
4901
|
type: Component,
|
|
@@ -4867,12 +4913,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
4867
4913
|
LucideFunnel
|
|
4868
4914
|
], host: {
|
|
4869
4915
|
"[class]": "baseClass()"
|
|
4870
|
-
}, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n placeholder=\"
|
|
4916
|
+
}, template: "@let dataType = column().dataType;\n\n@switch (dataType) {\n @case (\"string\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-text-box\n size=\"small\"\n [ngModel]=\"stringValue()\"\n (ngModelChange)=\"onStringChange($event)\"\n [placeholder]=\"messages().filterPlaceholder\" />\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of stringFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"number\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-numeric-text-box\n size=\"small\"\n [ngModel]=\"numberValue()\"\n (ngModelChange)=\"onNumberChange($event)\"\n [style.width.%]=\"100\" />\n\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of numericFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n @case (\"date\") {\n <div class=\"flex gap-0.5 w-full\">\n @if (dataType === \"date\") {\n <mona-date-picker\n size=\"small\"\n [ngModel]=\"dateValue()\"\n (ngModelChange)=\"onDateChange($event)\"\n [style.width.%]=\"100\" />\n }\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" #filterButton>\n <svg lucideFunnel [size]=\"14\" [class.text-info]=\"isFilterActive()\"></svg>\n </button>\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n <mona-popup-menu [target]=\"filterButton\" [size]=\"'small'\">\n @for (item of dateFilterMenuItems; track item) {\n <mona-popup-menu-checkbox-item\n size=\"small\"\n [label]=\"item.text\"\n (menuClick)=\"onOperatorChange(item.value)\"\n [checked]=\"selectedOperator() === item.value\"></mona-popup-menu-checkbox-item>\n }\n </mona-popup-menu>\n }\n @case (\"boolean\") {\n <div class=\"flex gap-0.5 w-full\">\n <mona-dropdown-list\n size=\"small\"\n [data]=\"booleanFilterMenuItems\"\n textField=\"text\"\n valueField=\"value\"\n [placeholder]=\"messages().all\"\n [ngModel]=\"booleanValue()\"\n (ngModelChange)=\"onBooleanChange($event)\"\n [style.width.%]=\"100\" />\n <ng-container\n *ngTemplateOutlet=\"clearFilterButtonTemplate; context: { $implicit: isFilterActive() }\"></ng-container>\n </div>\n }\n}\n\n<ng-template #clearFilterButtonTemplate let-hasValue>\n @if (selectedOperator() != null && hasValue) {\n <button monaButton look=\"ghost\" [iconOnly]=\"true\" [size]=\"'small'\" (click)=\"onClear()\">\n <svg lucideFunnelX [size]=\"14\" class=\"text-error\"></svg>\n </button>\n }\n</ng-template>\n" }]
|
|
4871
4917
|
}], ctorParameters: () => [], propDecorators: { apply: [{ type: i0.Output, args: ["apply"] }], column: [{ type: i0.Input, args: [{ isSignal: true, alias: "column", required: true }] }] } });
|
|
4872
4918
|
|
|
4873
4919
|
class GridSelectAllCheckboxComponent {
|
|
4874
4920
|
constructor() {
|
|
4875
4921
|
this.#gridService = inject(GridService);
|
|
4922
|
+
this.messages = this.#gridService.messages;
|
|
4876
4923
|
this.checked = computed(() => this.#gridService.allBulkSelectionRowsSelected(), /* @ts-ignore */
|
|
4877
4924
|
...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
|
|
4878
4925
|
this.hostClass = computed(() => gridSelectAllCellThemeVariants(), /* @ts-ignore */
|
|
@@ -4885,14 +4932,14 @@ class GridSelectAllCheckboxComponent {
|
|
|
4885
4932
|
this.#gridService.setBulkSelection(checked);
|
|
4886
4933
|
}
|
|
4887
4934
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridSelectAllCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4888
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: GridSelectAllCheckboxComponent, isStandalone: true, selector: "mona-grid-select-all-checkbox", host: { listeners: { "click": "$event.stopPropagation()" }, properties: { "class": "hostClass()" } }, ngImport: i0, template: "<mona-check-box\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (checkedChange)=\"onCheckedChange($event)\">\n <span class=\"sr-only\">
|
|
4935
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: GridSelectAllCheckboxComponent, isStandalone: true, selector: "mona-grid-select-all-checkbox", host: { listeners: { "click": "$event.stopPropagation()" }, properties: { "class": "hostClass()" } }, ngImport: i0, template: "<mona-check-box\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (checkedChange)=\"onCheckedChange($event)\">\n <span class=\"sr-only\">{{ messages().selectAllRows }}</span>\n</mona-check-box>\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"] }] }); }
|
|
4889
4936
|
}
|
|
4890
4937
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridSelectAllCheckboxComponent, decorators: [{
|
|
4891
4938
|
type: Component,
|
|
4892
4939
|
args: [{ selector: "mona-grid-select-all-checkbox", imports: [CheckBoxComponent], host: {
|
|
4893
4940
|
"[class]": "hostClass()",
|
|
4894
4941
|
"(click)": "$event.stopPropagation()"
|
|
4895
|
-
}, template: "<mona-check-box\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (checkedChange)=\"onCheckedChange($event)\">\n <span class=\"sr-only\">
|
|
4942
|
+
}, template: "<mona-check-box\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate()\"\n (checkedChange)=\"onCheckedChange($event)\">\n <span class=\"sr-only\">{{ messages().selectAllRows }}</span>\n</mona-check-box>\n" }]
|
|
4896
4943
|
}] });
|
|
4897
4944
|
|
|
4898
4945
|
const FOCUSABLE_TARGET_SELECTOR = "button, input, select, textarea, a[href], [tabindex]";
|
|
@@ -4988,6 +5035,7 @@ class GridComponent {
|
|
|
4988
5035
|
this.gridHeaderTableElement = viewChild.required("headerTable", /* @ts-ignore */
|
|
4989
5036
|
...(ngDevMode ? [{ debugName: "gridHeaderTableElement" }] : /* istanbul ignore next */ []));
|
|
4990
5037
|
this.gridService = inject(GridService);
|
|
5038
|
+
this.messages = this.gridService.messages;
|
|
4991
5039
|
this.gridWidthSet = signal(false, /* @ts-ignore */
|
|
4992
5040
|
...(ngDevMode ? [{ debugName: "gridWidthSet" }] : /* istanbul ignore next */ []));
|
|
4993
5041
|
this.groupColumnList = viewChild("groupColumnList", /* @ts-ignore */
|
|
@@ -5543,17 +5591,17 @@ class GridComponent {
|
|
|
5543
5591
|
}
|
|
5544
5592
|
}
|
|
5545
5593
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5546
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "grid" }, properties: { "class": "baseClass()", "attr.data-uid": "uid" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "columnDefinitions", predicate: GRID_COLUMN_DEFINITION, isSignal: true }, { propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>Columns</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ml-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill\"></i> Move as previous\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill\"></i> Move as next\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">Drag a column header here to group</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n aria-label=\"Row reorder\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-r border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"'Filter by ' + column.title\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-tl-none rounded-tr-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder text=\"No data\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "groupPrefixWidth", "lockedCellHeader", "lockedStructuralOffset", "structuralColumn"] }, { 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: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "component", type: GridSelectAllCheckboxComponent, selector: "mona-grid-select-all-checkbox" }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
|
|
5547
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-
|
|
5548
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5549
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5550
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-
|
|
5594
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: GridComponent, isStandalone: true, selector: "mona-grid", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, pageSizeValues: { classPropertyName: "pageSizeValues", publicName: "pageSizeValues", isSignal: true, isRequired: false, transformFunction: null }, resizeMethod: { classPropertyName: "resizeMethod", publicName: "resizeMethod", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "grid" }, properties: { "class": "baseClass()", "attr.data-uid": "uid" } }, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], queries: [{ propertyName: "columnDefinitions", predicate: GRID_COLUMN_DEFINITION, isSignal: true }, { propertyName: "gridDetailTemplate", first: true, predicate: GridDetailTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: GridNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "toolbarTemplate", first: true, predicate: GridToolbarTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "footerScrollElement", first: true, predicate: ["footerScrollElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderElement", first: true, predicate: ["gridHeaderElement"], descendants: true, isSignal: true }, { propertyName: "gridHeaderTableElement", first: true, predicate: ["headerTable"], descendants: true, isSignal: true }, { propertyName: "groupColumnList", first: true, predicate: ["groupColumnList"], descendants: true, isSignal: true }, { propertyName: "toolbarElement", first: true, predicate: ["toolbarElement"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "component", type: ChipComponent, selector: "mona-chip", inputs: ["aria-label", "disabled", "label", "look", "removable", "removeLabel", "removeTabIndex", "rounded", "selected", "size", "tabindex", "toggleable", "class", "value"], outputs: ["contentClick", "remove", "selectedChange"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: GridFilterMenuComponent, selector: "mona-grid-filter-menu", inputs: ["column", "type"], outputs: ["apply"] }, { kind: "component", type: GridFilterRowCellComponent, selector: "mona-grid-filter-row-cell", inputs: ["column"], outputs: ["apply"] }, { kind: "directive", type: GridColumnResizeHandlerDirective, selector: "[monaGridColumnResizeHandler]", inputs: ["column"], outputs: ["resizeEnd", "resizeStart"] }, { kind: "directive", type: CdkDragPreview, selector: "ng-template[cdkDragPreview]", inputs: ["data", "matchSize"] }, { kind: "directive", type: CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: PlaceholderComponent, selector: "mona-placeholder", inputs: ["text", "class"] }, { kind: "component", type: PopupMenuComponent, selector: "mona-popup-menu", inputs: ["anchor", "anchorConnectionPoint", "items", "id", "minWidth", "offset", "popupConnectionPoint", "precise", "rounded", "size", "target", "trigger", "width", "class"], outputs: ["close", "menuClick", "navigate", "open"] }, { kind: "component", type: PopupMenuItemComponent, selector: "mona-popup-menu-item", inputs: ["disabled", "label"], outputs: ["menuClick"] }, { kind: "directive", type: PopupMenuTextTemplateDirective, selector: "ng-template[monaPopupMenuTextTemplate]" }, { kind: "directive", type: GridLogicalCellDirective, selector: "td[monaGridLogicalCell], th[monaGridLogicalCell]", inputs: ["cellKind", "colIndex", "columnId", "editable", "firstInRow", "groupHeader", "groupKey", "lastInRow", "rowIndex", "rowUid", "section"], outputs: ["edit", "toggle"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["column", "groupPrefixWidth", "lockedCellHeader", "lockedStructuralOffset", "structuralColumn"] }, { 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: "component", type: PopupComponent, selector: "mona-popup", inputs: ["anchor", "anchorConnectionPoint", "animation", "backdropClass", "closeOnBackdropClick", "closeOnEscape", "closeOnMouseLeave", "closeOnOutsideClick", "data", "hasBackdrop", "height", "maxHeight", "maxWidth", "minHeight", "minWidth", "offset", "popupClass", "popupConnectionPoint", "popupWrapperClass", "positionStrategy", "positions", "preventClose", "providers", "trigger", "width", "withPush", "closeOnScroll", "restoreFocus", "withScrollTracking"], outputs: ["close", "open"] }, { kind: "component", type: GridColumnChooserComponent, selector: "mona-grid-column-chooser", outputs: ["apply", "cancel"] }, { kind: "component", type: GridSelectAllCheckboxComponent, selector: "mona-grid-select-all-checkbox" }, { kind: "pipe", type: ColumnAriaSortPipe, name: "columnAriaSort" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [NgTemplateOutlet, /* @ts-ignore */
|
|
5595
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
|
|
5596
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs').then(m => m.GridListComponent), PagerComponent, /* @ts-ignore */
|
|
5597
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5598
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs').then(m => m.GridFooterTableCellDirective), GridLockedCellDirective]] }); }
|
|
5551
5599
|
}
|
|
5552
5600
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
5553
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-
|
|
5554
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5555
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5556
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-
|
|
5601
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-cell.component-Bg7rckst.mjs').then(m => m.GridFooterCellComponent), /* @ts-ignore */
|
|
5602
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-D9AwQFDV.mjs').then(m => m.GridListComponent), /* @ts-ignore */
|
|
5603
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-CBmdtrXm.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5604
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-BSSpaCLL.mjs').then(m => m.GridFooterTableCellDirective)], resolveMetadata: (GridFooterCellComponent, GridListComponent, GridVirtualListComponent, GridFooterTableCellDirective) => ({ decorators: [{
|
|
5557
5605
|
type: Component,
|
|
5558
5606
|
args: [{ selector: "mona-grid", changeDetection: ChangeDetectionStrategy.OnPush, providers: [GridService, GridNavigationService, GridRowFlattenerService, FilterService], imports: [
|
|
5559
5607
|
CdkDropList,
|
|
@@ -5585,7 +5633,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
|
|
|
5585
5633
|
"[class]": "baseClass()",
|
|
5586
5634
|
"[attr.data-uid]": "uid",
|
|
5587
5635
|
role: "grid"
|
|
5588
|
-
}, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>Columns</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ml-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill\"></i> Move as previous\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill\"></i> Move as next\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">Drag a column header here to group</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n aria-label=\"Row reorder\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-r border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-r border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-r border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"'Filter by ' + column.title\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-tl-none rounded-tr-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder text=\"No data\"></mona-placeholder>\n }\n </div>\n</ng-template>\n" }]
|
|
5636
|
+
}, template: "@if (toolbarTemplate()) {\n <div\n class=\"flex min-h-10 items-center gap-2 border-b border-border p-2\"\n #toolbarElement\n (keydown)=\"onToolbarKeydown($event)\">\n <ng-container\n [ngTemplateOutlet]=\"toolbarTemplate() ?? null\"\n [ngTemplateOutletContext]=\"toolbarContext()\"></ng-container>\n <button monaButton size=\"small\" #columnsButton>{{ messages().columns }}</button>\n <mona-popup\n [anchor]=\"columnsButton\"\n [animation]=\"{ leave: [] }\"\n [width]=\"'max-content'\"\n [anchorConnectionPoint]=\"'bottomleft'\"\n [popupConnectionPoint]=\"'topleft'\"\n #popup>\n <mona-grid-column-chooser\n (apply)=\"popup.closePopup()\"\n (cancel)=\"popup.closePopup()\"></mona-grid-column-chooser>\n </mona-popup>\n </div>\n}\n\n@if (groupable()) {\n <div\n [class]=\"groupPanelClass()\"\n cdkDropList\n #groupColumnList=\"cdkDropList\"\n cdkDropListOrientation=\"horizontal\"\n (cdkDropListEntered)=\"onColumnDragEnterForGrouping()\"\n (cdkDropListExited)=\"onColumnDragExitForGrouping()\"\n (cdkDropListDropped)=\"onColumnDropForGrouping($event)\">\n @if (gridService.groupColumns().length !== 0) {\n @for (groupColumn of gridService.groupColumns(); track $index) {\n <mona-chip\n [removable]=\"true\"\n size=\"small\"\n [rounded]=\"rounded()\"\n (click)=\"onGroupingColumnSort(groupColumn)\"\n (remove)=\"onGroupingColumnRemove($event, groupColumn)\">\n @if (groupColumn.groupSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <i class=\"ri-more-2-fill\"></i>\n </span>\n <mona-popup-menu size=\"small\" [target]=\"groupReorder\">\n <mona-popup-menu-item\n [disabled]=\"$first\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'prev')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-left-fill rtl:rotate-180\"></i> {{ messages().moveAsPrevious }}\n </ng-template>\n </mona-popup-menu-item>\n <mona-popup-menu-item\n [disabled]=\"$last\"\n (menuClick)=\"onGroupColumnReorder(groupColumn, 'next')\">\n <ng-template monaPopupMenuTextTemplate>\n <i class=\"ri-arrow-right-fill rtl:rotate-180\"></i> {{ messages().moveAsNext }}\n </ng-template>\n </mona-popup-menu-item>\n </mona-popup-menu>\n </mona-chip>\n }\n } @else if (groupPanelPlaceholderVisible()) {\n <span [class]=\"groupPanelPlaceholderClass()\">{{ messages().dragColumnHeaderToGroup }}</span>\n }\n </div>\n}\n<div [class]=\"headerClass()\" [style.margin-right.px]=\"headerMarginRight()\" #gridHeaderElement>\n <div>\n <table #headerTable [class]=\"headerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"0\"\n [section]=\"'header'\"\n [firstInRow]=\"gridService.groupColumns().length === 0\"\n [lastInRow]=\"\n !gridService.masterDetailTemplate() &&\n !gridService.selectionColumnVisible() &&\n gridService.visibleColumns().length === 0\n \"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"\n (gridService.rowReorderColumnVisible() ? 1 : 0) +\n (gridService.masterDetailTemplate() ? 1 : 0)\n \"\n [section]=\"'header'\"\n [firstInRow]=\"\n !gridService.rowReorderColumnVisible() &&\n !gridService.masterDetailTemplate() &&\n gridService.groupColumns().length === 0\n \"\n [lastInRow]=\"gridService.visibleColumns().length === 0\"\n scope=\"col\"\n class=\"border-e border-border\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"gridService.selectionColumnWidth\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n @let colIndex = $index + gridService.leadingLogicalColumnCount();\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"colIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"colIndex === gridService.leadingLogicalColumnCount()\"\n [lastInRow]=\"\n colIndex ===\n gridService.leadingLogicalColumnCount() +\n gridService.visibleColumns().length -\n 1\n \"\n (toggle)=\"onColumnSort(column)\"\n [cdkDragData]=\"column\"\n [cdkDragDisabled]=\"isColumnDragDisabled(column)\"\n [class]=\"headerTableCellClass()\"\n (mouseenter)=\"onColumnMouseEnter(column)\"\n (cdkDragEntered)=\"onColumnDragEnter($event)\"\n (cdkDragStarted)=\"onColumnDragStart($event)\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.colspan]=\"1\"\n [attr.aria-sort]=\"\n gridService.sortableOptions().enabled\n ? (column.columnSortDirection | columnAriaSort)\n : null\n \">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n\n <div [class]=\"columnActionsClass()\" [attr.data-column-actions]=\"true\">\n @if (gridService.sortableOptions().showIndices && column.sortIndex !== null) {\n <span>{{ column.sortIndex }}</span>\n }\n @if (column.columnSortDirection === \"asc\") {\n <i class=\"ri-arrow-down-line\"></i>\n } @else if (column.columnSortDirection === \"desc\") {\n <i class=\"ri-arrow-up-line\"></i>\n }\n @if (filterMenuEnabled()) {\n @if (column.kind === \"data\" && column.filterable) {\n <mona-grid-filter-menu\n [column]=\"column\"\n [type]=\"column.dataType\"\n (apply)=\"onColumnFilter(column, $event)\"></mona-grid-filter-menu>\n }\n }\n </div>\n </div>\n @if (\n dropColumn() === column &&\n dragColumn() &&\n gridService.reorderableOptions().enabled &&\n !groupingInProgress()\n ) {\n <span [class]=\"columnDropHintClass()\"> </span>\n }\n @if (gridService.resizableOptions().enabled && !columnDragging()) {\n <div\n monaGridColumnResizeHandler\n [column]=\"column\"\n [class]=\"columnResizerClass()\"\n (resizeStart)=\"onColumnResizeStart()\"\n (resizeEnd)=\"onColumnResizeEnd($event)\"></div>\n }\n <ng-template cdkDragPreview>\n <div [class]=\"columnDragPreviewClass()\">\n <span>{{ column.title }}</span>\n </div>\n </ng-template>\n <ng-template cdkDragPlaceholder>\n @if (groupingInProgress()) {\n <mona-chip\n style=\"z-index: 10; pointer-events: none\"\n [removable]=\"true\"\n [rounded]=\"rounded()\"\n >{{ column.title }}</mona-chip\n >\n }\n </ng-template>\n </th>\n @if (columnDragging() && dragColumn() === column) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [attr.colspan]=\"1\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: column, column }\"></ng-container>\n } @else if (column.titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"column.titleTemplate\"></ng-container>\n } @else {\n <span\n [class]=\"headerTableColumnTitleClass()\"\n (click)=\"onColumnSort(column)\"\n [title]=\"column.title\"\n >{{ column.title }}</span\n >\n }\n </div>\n </th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.groupColumnWidth\"></th>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.rowReorderColumnWidth\"></th>\n }\n @if (gridService.masterDetailTemplate()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.detailColumnWidth\"></th>\n }\n @if (gridService.selectionColumnVisible()) {\n <th\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"gridService.selectionColumnWidth\"></th>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <th\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"column.calculatedWidth\"\n [attr.aria-label]=\"messages().filterByColumn(column.title)\">\n @if (column.kind === \"data\" && column.field && column.filterable) {\n <mona-grid-filter-row-cell\n [column]=\"column\"\n (apply)=\"onColumnFilter(column, $event)\" />\n }\n </th>\n }\n </tr>\n }\n </thead>\n </table>\n </div>\n</div>\n\n@defer (when gridWidthSet()) {\n @if (gridService.virtualScrollOptions().enabled) {\n @if (gridService.viewRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-virtual-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewRows()\"></mona-grid-virtual-list>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n } @else {\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list\n [columns]=\"gridService.visibleColumns()\"\n [data]=\"gridService.viewPageRows()\"></mona-grid-list>\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-right.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table [class]=\"footerTableClass()\" [style.width.px]=\"gridService.tableWidth()\">\n <colgroup>\n @for (_ of gridService.groupColumns(); track $index) {\n <col [style.width.px]=\"gridService.groupColumnWidth\" />\n }\n @if (gridService.rowReorderColumnVisible()) {\n <col [style.width.px]=\"gridService.rowReorderColumnWidth\" />\n }\n @if (gridService.masterDetailTemplate()) {\n <col [style.width.px]=\"gridService.detailColumnWidth\" />\n }\n @if (gridService.selectionColumnVisible()) {\n <col [style.width.px]=\"gridService.selectionColumnWidth\" />\n }\n @for (col of gridService.visibleColumns(); track $index) {\n <col [style.width.px]=\"col.calculatedWidth\" />\n }\n </colgroup>\n <tfoot role=\"rowgroup\">\n <tr [class]=\"footerTableRowClass()\">\n @for (_ of gridService.groupColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [lockedStructuralOffset]=\"$index * gridService.groupColumnWidth\"\n [footerCellWidth]=\"gridService.groupColumnWidth\"></td>\n }\n @if (gridService.rowReorderColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'reorder'\"\n [footerCellWidth]=\"gridService.rowReorderColumnWidth\"></td>\n }\n @if (gridService.masterDetailTemplate()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'detail'\"\n [footerCellWidth]=\"gridService.detailColumnWidth\"></td>\n }\n @if (gridService.selectionColumnVisible()) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [lockedCellHeader]=\"true\"\n [structuralColumn]=\"'selection'\"\n [footerCellWidth]=\"gridService.selectionColumnWidth\"></td>\n }\n @for (column of gridService.visibleColumns(); track $index) {\n <td\n monaGridFooterTableCell\n monaGridLockedCell\n [column]=\"column\"\n [lockedCellHeader]=\"true\"\n [footerColumn]=\"column\">\n <mona-grid-footer-cell\n [column]=\"column\"\n [columnIndex]=\"$index\"></mona-grid-footer-cell>\n </td>\n }\n </tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n <mona-pager\n class=\"border-0 border-t border-t-border rounded-ss-none rounded-se-none\"\n [skip]=\"gridService.paginationState().skip\"\n [pageSize]=\"gridService.paginationState().take\"\n [total]=\"gridService.viewRowCount()\"\n [size]=\"'small'\"\n [rounded]=\"rounded()\"\n [pageInput]=\"true\"\n [pageSizeValues]=\"pageSizeValues()\"\n [responsive]=\"responsivePager()\"\n (pageSizeChange)=\"onPageSizeChange($event)\"\n (pageChange)=\"onPageChange($event)\"></mona-pager>\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\"></ng-container>\n }\n }\n} @placeholder {\n <mona-placeholder text=\"Loading...\"></mona-placeholder>\n}\n\n<ng-template #emptyGridTemplate>\n <div [class]=\"noDataClass()\">\n @if (noDataTemplate()) {\n <ng-container [ngTemplateOutlet]=\"noDataTemplate() ?? null\"></ng-container>\n } @else {\n <mona-placeholder [text]=\"gridService.messages().noData\"></mona-placeholder>\n }\n </div>\n</ng-template>\n" }]
|
|
5589
5637
|
}], ctorParameters: () => [], propDecorators: { columnDefinitions: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => GRID_COLUMN_DEFINITION), { isSignal: true }] }], footerScrollElement: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], gridDetailTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridDetailTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], gridHeaderElement: [{ type: i0.ViewChild, args: ["gridHeaderElement", { isSignal: true }] }], gridHeaderTableElement: [{ type: i0.ViewChild, args: ["headerTable", { isSignal: true }] }], groupColumnList: [{ type: i0.ViewChild, args: ["groupColumnList", { isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], toolbarElement: [{ type: i0.ViewChild, args: ["toolbarElement", { isSignal: true }] }], toolbarTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => GridToolbarTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], pageSizeValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSizeValues", required: false }] }], resizeMethod: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMethod", required: false }] }], rowKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowKey", required: false }] }], responsivePager: [{ type: i0.Input, args: [{ isSignal: true, alias: "responsivePager", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } }) });
|
|
5590
5638
|
|
|
5591
5639
|
/*
|
|
@@ -5596,5 +5644,5 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
|
|
|
5596
5644
|
* Generated bundle index. Do not edit.
|
|
5597
5645
|
*/
|
|
5598
5646
|
|
|
5599
|
-
export {
|
|
5600
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
5647
|
+
export { GridReorderableDirective as $, GRID_DEFAULT_MESSAGES as A, GridAddCommandDirective as B, CellEditEvent as C, GridAddEvent as D, GridCancelCommandDirective as E, GridCancelEvent as F, GridNavigationService as G, GridCellTemplateDirective as H, GridColumnComponent as I, GridColumnTitleTemplateDirective as J, GridCommandColumnComponent as K, GridComponent as L, GridContextMenuDirective as M, GridDetailTemplateDirective as N, GridEditCommandDirective as O, GridEditEvent as P, GridEditTemplateDirective as Q, GridEditableDirective as R, GridExportDirective as S, GridFilterableDirective as T, GridFooterTemplateDirective as U, GridGroupFooterTemplateDirective as V, GridGroupableDirective as W, GridHeaderTemplateDirective as X, GridNoDataTemplateDirective as Y, GridRemoveCommandDirective as Z, GridRemoveEvent as _, GridRowFlattenerService as a, GridResizableDirective as a0, GridRowReorderableDirective as a1, GridSaveCommandDirective as a2, GridSaveEvent as a3, GridSelectableDirective as a4, GridSortableDirective as a5, GridStatePersistenceDirective as a6, GridToolbarTemplateDirective as a7, GridVirtualScrollDirective as a8, RowEditEvent as a9, RowReorderEvent as aa, gridFooterTableRowThemeVariants as b, GridService as c, gridGroupRowThemeVariants as d, gridRowDragPlaceholderThemeVariants as e, gridRowDragPreviewThemeVariants as f, gridListBaseThemeVariants as g, gridListTableThemeVariants as h, GridLogicalCellDirective as i, GridLockedCellDirective as j, gridFooterThemeVariants as k, gridFooterTableThemeVariants as l, gridListTableCellThemeVariants as m, gridDetailContentCellThemeVariants as n, gridDetailIndentCellThemeVariants as o, gridDetailRowThemeVariants as p, gridListTableRowThemeVariants as q, gridCellEditorBaseThemeVariants as r, gridCellEditorInputThemeVariants as s, gridCellBaseThemeVariants as t, gridCellContainerThemeVariants as u, gridCellDirtyIndicatorThemeVariants as v, gridCellTextThemeVariants as w, gridRowReorderHandleThemeVariants as x, gridSelectionCellThemeVariants as y, gridFooterTableCellThemeVariants as z };
|
|
5648
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-DPmJmCap.mjs.map
|