@nanahoshi/mona-ui 0.23.0 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1 -1
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-row.component--nF_Q7Bd.mjs → nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-list.component-S2qxwP2M.mjs → nanahoshi-mona-ui-grid-grid-list.component-CpeheGXU.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-row.component-Dwy8hCm7.mjs → nanahoshi-mona-ui-grid-grid-row.component-B_5ay_Nz.mjs} +2 -2
- package/fesm2022/{nanahoshi-mona-ui-grid-grid-virtual-list.component-DArxdAah.mjs → nanahoshi-mona-ui-grid-grid-virtual-list.component-BzKywU5b.mjs} +4 -4
- package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-bduDEm-x.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs} +8 -8
- package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +47 -7
- package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +386 -180
- package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +266 -99
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +35 -32
- package/fesm2022/nanahoshi-mona-ui-locales.mjs +13 -0
- package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +1 -1
- package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-i18n.d.ts +1 -0
- package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +35 -1
- package/types/nanahoshi-mona-ui-internal-list.d.ts +82 -16
- package/types/nanahoshi-mona-ui-internal-tree.d.ts +50 -3
- package/types/nanahoshi-mona-ui-internal.d.ts +18 -4
- package/types/nanahoshi-mona-ui-locales.d.ts +13 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, computed, input, Directive, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
-
import { a as GridService, v as gridFooterTableCellThemeVariants, w as gridFooterTableRowThemeVariants, m as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
3
|
+
import { a as GridService, v as gridFooterTableCellThemeVariants, w as gridFooterTableRowThemeVariants, m as GridLockedCellDirective } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { ImmutableDictionary } from '@mirei/ts-collections';
|
|
6
6
|
|
|
@@ -166,4 +166,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
166
166
|
}], propDecorators: { groupKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupKey", required: false }] }] } });
|
|
167
167
|
|
|
168
168
|
export { GridFooterRowComponent };
|
|
169
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-row.component
|
|
169
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs.map
|
|
@@ -5,9 +5,9 @@ import { inject, DestroyRef, ElementRef, viewChild, computed, input, afterNextRe
|
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { ImmutableList } from '@mirei/ts-collections';
|
|
7
7
|
import { fromEvent } from 'rxjs';
|
|
8
|
-
import { G as GridNavigationService, g as gridListBaseThemeVariants, a as GridService, b as gridRowDragPreviewThemeVariants, c as gridListTableThemeVariants, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
9
|
-
import { G as GridAddRowComponent, a as GridDetailRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-
|
|
10
|
-
import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component
|
|
8
|
+
import { G as GridNavigationService, g as gridListBaseThemeVariants, a as GridService, b as gridRowDragPreviewThemeVariants, c as gridListTableThemeVariants, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs';
|
|
9
|
+
import { G as GridAddRowComponent, a as GridDetailRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-B_5ay_Nz.mjs';
|
|
10
|
+
import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs';
|
|
11
11
|
|
|
12
12
|
const ROW_MOVE_DURATION = 200;
|
|
13
13
|
const ROW_MOVE_EASING = "cubic-bezier(0.2, 0, 0, 1)";
|
|
@@ -173,4 +173,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
173
173
|
}], ctorParameters: () => [], propDecorators: { bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
174
174
|
|
|
175
175
|
export { GridListComponent };
|
|
176
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-
|
|
176
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-list.component-CpeheGXU.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, computed, input, Directive, Component, signal, ElementRef, viewChild, output, effect, untracked, afterNextRender, ChangeDetectionStrategy, model, Injector, LOCALE_ID } from '@angular/core';
|
|
3
|
-
import { a as GridService, i as gridListTableCellThemeVariants, j as gridCellEditorBaseThemeVariants, k as gridCellEditorInputThemeVariants, l as gridListTableRowThemeVariants, m as GridLockedCellDirective, n as GridLogicalCellDirective, o as gridGroupRowThemeVariants, G as GridNavigationService, p as gridCellBaseThemeVariants, q as gridCellContainerThemeVariants, r as gridCellDirtyIndicatorThemeVariants, s as gridCellTextThemeVariants, t as gridRowReorderHandleThemeVariants, u as gridSelectionCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
3
|
+
import { a as GridService, i as gridListTableCellThemeVariants, j as gridCellEditorBaseThemeVariants, k as gridCellEditorInputThemeVariants, l as gridListTableRowThemeVariants, m as GridLockedCellDirective, n as GridLogicalCellDirective, o as gridGroupRowThemeVariants, G as GridNavigationService, p as gridCellBaseThemeVariants, q as gridCellContainerThemeVariants, r as gridCellDirtyIndicatorThemeVariants, s as gridCellTextThemeVariants, t as gridRowReorderHandleThemeVariants, u as gridSelectionCellThemeVariants } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs';
|
|
4
4
|
import { NgTemplateOutlet, formatDate } from '@angular/common';
|
|
5
5
|
import { ContextMenuComponent } from '@nanahoshi/mona-ui/contextmenu';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -943,4 +943,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
943
943
|
}], propDecorators: { index: [{ type: i0.Input, args: [{ isSignal: true, alias: "index", required: true }] }], row: [{ type: i0.Input, args: [{ isSignal: true, alias: "row", required: true }] }] } });
|
|
944
944
|
|
|
945
945
|
export { GridAddRowComponent as G, GridDetailRowComponent as a, GridGroupRowComponent as b, GridRowComponent as c };
|
|
946
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-row.component-
|
|
946
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-row.component-B_5ay_Nz.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as GridNavigationService, a as GridService, g as gridListBaseThemeVariants, e as gridFooterThemeVariants, f as gridFooterTableThemeVariants, c as gridListTableThemeVariants, h as GRID_DEFAULT_VIRTUAL_ROW_HEIGHT, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
1
|
+
import { G as GridNavigationService, a as GridService, g as gridListBaseThemeVariants, e as gridFooterThemeVariants, f as gridFooterTableThemeVariants, c as gridListTableThemeVariants, h as GRID_DEFAULT_VIRTUAL_ROW_HEIGHT, d as GridColgroupComponent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs';
|
|
2
2
|
import { CdkVirtualScrollViewport, CdkFixedSizeVirtualScroll, CdkVirtualForOf } from '@angular/cdk/scrolling';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { inject, DestroyRef, ElementRef, Injector, viewChild, computed, input, effect, untracked, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
@@ -6,8 +6,8 @@ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
6
6
|
import { ImmutableList } from '@mirei/ts-collections';
|
|
7
7
|
import { rxTimeout } from '@nanahoshi/mona-ui/internal';
|
|
8
8
|
import { fromEvent } from 'rxjs';
|
|
9
|
-
import { G as GridAddRowComponent, a as GridDetailRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-
|
|
10
|
-
import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component
|
|
9
|
+
import { G as GridAddRowComponent, a as GridDetailRowComponent, b as GridGroupRowComponent, c as GridRowComponent } from './nanahoshi-mona-ui-grid-grid-row.component-B_5ay_Nz.mjs';
|
|
10
|
+
import { GridFooterRowComponent } from './nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs';
|
|
11
11
|
|
|
12
12
|
class GridVirtualListComponent {
|
|
13
13
|
#destroyRef;
|
|
@@ -170,4 +170,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
|
|
|
170
170
|
}], ctorParameters: () => [], propDecorators: { addRowScrollElementRef: [{ type: i0.ViewChild, args: ["addRowScrollElement", { isSignal: true }] }], bodyTableElementRef: [{ type: i0.ViewChild, args: ["bodyTable", { isSignal: true }] }], footerScrollElementRef: [{ type: i0.ViewChild, args: ["footerScrollElement", { isSignal: true }] }], viewport: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CdkVirtualScrollViewport), { isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
171
171
|
|
|
172
172
|
export { GridVirtualListComponent };
|
|
173
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
173
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-grid-virtual-list.component-BzKywU5b.mjs.map
|
|
@@ -4685,7 +4685,7 @@ class GridColumnChooserComponent {
|
|
|
4685
4685
|
this.filterText.set("");
|
|
4686
4686
|
}
|
|
4687
4687
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnChooserComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4688
|
-
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]" }] }); }
|
|
4688
|
+
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: ["activeDescendant", "ariaLabel", "controls", "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]" }] }); }
|
|
4689
4689
|
}
|
|
4690
4690
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridColumnChooserComponent, decorators: [{
|
|
4691
4691
|
type: Component,
|
|
@@ -5745,15 +5745,15 @@ class GridComponent {
|
|
|
5745
5745
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5746
5746
|
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 }, responsivePager: { classPropertyName: "responsivePager", publicName: "responsivePager", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, rowKey: { classPropertyName: "rowKey", publicName: "rowKey", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "class": "baseClass()", "attr.data-uid": "uid", "attr.aria-busy": "gridService.serverLoading() || null" } }, providers: [GridService, GridNavigationService, 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 <svg lucideArrowDown [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else if (groupColumn.groupSortDirection === \"desc\") {\n <svg lucideArrowUp [size]=\"16\" aria-hidden=\"true\"></svg>\n }\n <span>{{ groupColumn.title }}</span>\n <span class=\"ms-2\" (click)=\"$event.stopPropagation()\" #groupReorder>\n <svg lucideEllipsisVertical [size]=\"16\" aria-hidden=\"true\"></svg>\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 <svg lucideArrowLeft [size]=\"16\" aria-hidden=\"true\" class=\"rtl:rotate-180\"></svg>\n {{ 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 <svg lucideArrowRight [size]=\"16\" aria-hidden=\"true\" class=\"rtl:rotate-180\"></svg>\n {{ 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=\"flex flex-col flex-1 min-h-0\" [attr.role]=\"groupable() ? 'treegrid' : 'grid'\">\n <div [class]=\"headerClass()\" [style.margin-inline-end.px]=\"headerMarginInlineEnd()\" #gridHeaderElement>\n <div>\n <table\n role=\"presentation\"\n #headerTable\n [class]=\"headerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <thead role=\"rowgroup\" [style.visibility]=\"!gridWidthSet() ? 'hidden' : undefined\">\n <tr\n role=\"row\"\n cdkDropList\n [cdkDropListConnectedTo]=\"groupable() ? [groupColumnList()!] : []\"\n (cdkDropListDropped)=\"onColumnDrop()\"\n [class]=\"headerTableRowClass()\">\n @for (layoutColumn of gridService.layout(); track layoutColumn.key) {\n @if (layoutColumn.kind === \"column\") {\n @let column = layoutColumn.column;\n @let columnSortable =\n gridService.sortableOptions().enabled &&\n column.kind === \"data\" &&\n column.sortable &&\n column.field !== \"\";\n <th\n scope=\"col\"\n role=\"columnheader\"\n cdkDrag\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'header'\"\n [columnId]=\"column.id\"\n [rowIndex]=\"-1\"\n [colIndex]=\"layoutColumn.logicalIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"layoutColumn.firstInRow\"\n [lastInRow]=\"layoutColumn.lastInRow\"\n (toggleExpand)=\"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.aria-sort]=\"\n columnSortable ? (column.columnSortDirection | columnAriaSort) : null\n \">\n <div\n [class]=\"headerTableColumnWrapClass()\"\n [style.cursor]=\"columnSortable ? 'pointer' : 'default'\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: column,\n column\n }\"></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 (\n gridService.sortableOptions().enabled &&\n column.columnSortDirection !== null\n ) {\n <div class=\"inline-flex shrink-0 items-center gap-0.5\">\n @if (column.columnSortDirection === \"asc\") {\n <svg lucideArrowUp [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else {\n <svg lucideArrowDown [size]=\"16\" aria-hidden=\"true\"></svg>\n }\n @if (\n gridService.sortableOptions().mode === \"multiple\" &&\n gridService.sortableOptions().showIndices &&\n column.sortIndex !== null\n ) {\n <span class=\"tabular-nums\">{{ column.sortIndex }}</span>\n }\n </div>\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)=\"\n onColumnFilter(column, $event)\n \"></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]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n [class]=\"headerTableCellClass()\"\n [style.min-width.px]=\"column.minWidth\"\n [style.width.px]=\"column.calculatedWidth\">\n <div [class]=\"headerTableColumnWrapClass()\">\n @if (column.headerTemplate) {\n <ng-container\n [ngTemplateOutlet]=\"column.headerTemplate\"\n [ngTemplateOutletContext]=\"{\n $implicit: column,\n column\n }\"></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 } @else if (layoutColumn.kind === \"reorder\") {\n <th\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$rowReorder'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"layoutColumn.logicalIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"layoutColumn.firstInRow\"\n [lastInRow]=\"layoutColumn.lastInRow\"\n scope=\"col\"\n [attr.aria-label]=\"gridService.messages().rowReorder\"\n class=\"border-e border-border\"\n [style.width.px]=\"layoutColumn.width\"></th>\n } @else if (layoutColumn.kind === \"selection\") {\n <th\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n monaGridLogicalCell\n [cellKind]=\"'command'\"\n [columnId]=\"'$selection'\"\n [rowIndex]=\"-1\"\n [colIndex]=\"layoutColumn.logicalIndex\"\n [section]=\"'header'\"\n [firstInRow]=\"layoutColumn.firstInRow\"\n [lastInRow]=\"layoutColumn.lastInRow\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"layoutColumn.width\">\n @if (\n gridService.selectableOptions().mode === \"multiple\" &&\n gridService.selectableOptions().showSelectAll !== false\n ) {\n <mona-grid-select-all-checkbox />\n }\n </th>\n } @else {\n <th\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"layoutColumn.width\"></th>\n }\n }\n </tr>\n @if (filterRowEnabled()) {\n <tr role=\"row\" [class]=\"headerTableRowClass()\">\n @for (layoutColumn of gridService.layout(); track layoutColumn.key) {\n @if (layoutColumn.kind === \"column\") {\n @let column = layoutColumn.column;\n <th\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border overflow-hidden\"\n [style.width.px]=\"layoutColumn.width\"\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 } @else {\n <th\n [monaGridLockedCell]=\"layoutColumn.key\"\n [lockedCellHeader]=\"true\"\n scope=\"col\"\n class=\"border-e border-border\"\n [style.width.px]=\"layoutColumn.width\"></th>\n }\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 [data]=\"gridService.viewRows()\" />\n } @else {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n } @else {\n <div class=\"relative flex-1 min-h-0\" data-grid-body-region>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n <mona-grid-list [data]=\"gridService.viewPageRows()\" />\n } @else if (!gridService.serverLoading()) {\n <ng-container [ngTemplateOutlet]=\"emptyGridTemplate\" />\n }\n @if (gridService.serverLoading()) {\n <div class=\"absolute inset-0 z-20 flex items-center justify-center bg-surface/60\" data-grid-loading>\n <mona-spinner size=\"large\" />\n </div>\n }\n </div>\n @if (gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\n @if (footerVisible()) {\n <div\n [class]=\"footerClass()\"\n [style.margin-inline-end.px]=\"gridService.scrollbarGutterWidth()\"\n #footerScrollElement\n data-grid-footer-scroll>\n <div>\n <table\n role=\"presentation\"\n [class]=\"footerTableClass()\"\n [style.width.px]=\"gridService.tableWidth()\">\n <colgroup monaGridColgroup></colgroup>\n <tfoot role=\"rowgroup\">\n <tr monaGridFooterRow></tr>\n </tfoot>\n </table>\n </div>\n </div>\n }\n }\n }\n } @placeholder {\n <mona-placeholder text=\"Loading...\" />\n }\n</div>\n@if (!gridService.virtualScrollOptions().enabled) {\n @if (gridService.serverBindingEnabled() || gridService.viewPageRows().length !== 0 || gridService.addRowVisible()) {\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.pagerTotal()\"\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 }\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: "component", type: LucideArrowDown, selector: "svg[lucideArrowDown]" }, { kind: "component", type: LucideArrowLeft, selector: "svg[lucideArrowLeft]" }, { kind: "component", type: LucideArrowRight, selector: "svg[lucideArrowRight]" }, { kind: "component", type: LucideArrowUp, selector: "svg[lucideArrowUp]" }, { kind: "component", type: LucideEllipsisVertical, selector: "svg[lucideEllipsisVertical], svg[lucideMoreVertical]" }, { 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: GridColgroupComponent, selector: "colgroup[monaGridColgroup]" }, { 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: "component", type: PagerComponent, selector: "mona-pager", inputs: ["firstLast", "navigable", "pageInput", "pageSize", "pageSizeValues", "previousNext", "responsive", "rounded", "showInfo", "size", "skip", "total", "type", "class", "visiblePages"], outputs: ["pageChange", "pageSizeChange"] }, { 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", "toggleExpand"] }, { kind: "directive", type: GridLockedCellDirective, selector: "td[monaGridLockedCell], th[monaGridLockedCell]", inputs: ["monaGridLockedCell", "lockedCellHeader"] }, { 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,
|
|
5747
5747
|
GridColgroupComponent, /* @ts-ignore */
|
|
5748
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-row.component
|
|
5749
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5750
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5748
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs').then(m => m.GridFooterRowComponent), /* @ts-ignore */
|
|
5749
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-CpeheGXU.mjs').then(m => m.GridListComponent), /* @ts-ignore */
|
|
5750
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-BzKywU5b.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5751
5751
|
import('@nanahoshi/mona-ui/spinner').then(m => m.SpinnerComponent)]] }); }
|
|
5752
5752
|
}
|
|
5753
5753
|
i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ngImport: i0, type: GridComponent, resolveDeferredDeps: () => [/* @ts-ignore */
|
|
5754
|
-
import('./nanahoshi-mona-ui-grid-grid-footer-row.component
|
|
5755
|
-
import('./nanahoshi-mona-ui-grid-grid-list.component-
|
|
5756
|
-
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-
|
|
5754
|
+
import('./nanahoshi-mona-ui-grid-grid-footer-row.component-CIMXz60d.mjs').then(m => m.GridFooterRowComponent), /* @ts-ignore */
|
|
5755
|
+
import('./nanahoshi-mona-ui-grid-grid-list.component-CpeheGXU.mjs').then(m => m.GridListComponent), /* @ts-ignore */
|
|
5756
|
+
import('./nanahoshi-mona-ui-grid-grid-virtual-list.component-BzKywU5b.mjs').then(m => m.GridVirtualListComponent), /* @ts-ignore */
|
|
5757
5757
|
import('@nanahoshi/mona-ui/spinner').then(m => m.SpinnerComponent)], resolveMetadata: (GridFooterRowComponent, GridListComponent, GridVirtualListComponent, SpinnerComponent) => ({ decorators: [{
|
|
5758
5758
|
type: Component,
|
|
5759
5759
|
args: [{ selector: "mona-grid", changeDetection: ChangeDetectionStrategy.OnPush, providers: [GridService, GridNavigationService, FilterService], imports: [
|
|
@@ -5805,4 +5805,4 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "22.0.6", ng
|
|
|
5805
5805
|
*/
|
|
5806
5806
|
|
|
5807
5807
|
export { GridSaveCommandDirective as $, GridCancelCommandDirective as A, GridCancelEvent as B, CellEditEvent as C, GridCellTemplateDirective as D, GridColumnComponent as E, GridColumnTitleTemplateDirective as F, GridNavigationService as G, GridCommandColumnComponent as H, GridComponent as I, GridContextMenuDirective as J, GridDetailTemplateDirective as K, GridEditCommandDirective as L, GridEditEvent as M, GridEditTemplateDirective as N, GridEditableDirective as O, GridExportDirective as P, GridFilterableDirective as Q, GridFooterTemplateDirective as R, GridGroupFooterTemplateDirective as S, GridGroupableDirective as T, GridHeaderTemplateDirective as U, GridNoDataTemplateDirective as V, GridRemoveCommandDirective as W, GridRemoveEvent as X, GridReorderableDirective as Y, GridResizableDirective as Z, GridRowReorderableDirective as _, GridService as a, GridSaveEvent as a0, GridSelectableDirective as a1, GridServerBindingDirective as a2, GridSortableDirective as a3, GridStatePersistenceDirective as a4, GridToolbarTemplateDirective as a5, GridVirtualScrollDirective as a6, RowEditEvent as a7, RowReorderEvent as a8, gridRowDragPreviewThemeVariants as b, gridListTableThemeVariants as c, GridColgroupComponent as d, gridFooterThemeVariants as e, gridFooterTableThemeVariants as f, gridListBaseThemeVariants as g, GRID_DEFAULT_VIRTUAL_ROW_HEIGHT as h, gridListTableCellThemeVariants as i, gridCellEditorBaseThemeVariants as j, gridCellEditorInputThemeVariants as k, gridListTableRowThemeVariants as l, GridLockedCellDirective as m, GridLogicalCellDirective as n, gridGroupRowThemeVariants as o, gridCellBaseThemeVariants as p, gridCellContainerThemeVariants as q, gridCellDirtyIndicatorThemeVariants as r, gridCellTextThemeVariants as s, gridRowReorderHandleThemeVariants as t, gridSelectionCellThemeVariants as u, gridFooterTableCellThemeVariants as v, gridFooterTableRowThemeVariants as w, GRID_DEFAULT_MESSAGES as x, GridAddCommandDirective as y, GridAddEvent as z };
|
|
5808
|
-
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
5808
|
+
//# sourceMappingURL=nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CellEditEvent, x as GRID_DEFAULT_MESSAGES, y as GridAddCommandDirective, z as GridAddEvent, A as GridCancelCommandDirective, B as GridCancelEvent, D as GridCellTemplateDirective, E as GridColumnComponent, F as GridColumnTitleTemplateDirective, H as GridCommandColumnComponent, I as GridComponent, J as GridContextMenuDirective, K as GridDetailTemplateDirective, L as GridEditCommandDirective, M as GridEditEvent, N as GridEditTemplateDirective, O as GridEditableDirective, P as GridExportDirective, Q as GridFilterableDirective, R as GridFooterTemplateDirective, S as GridGroupFooterTemplateDirective, T as GridGroupableDirective, U as GridHeaderTemplateDirective, V as GridNoDataTemplateDirective, W as GridRemoveCommandDirective, X as GridRemoveEvent, Y as GridReorderableDirective, Z as GridResizableDirective, _ as GridRowReorderableDirective, $ as GridSaveCommandDirective, a0 as GridSaveEvent, a1 as GridSelectableDirective, a2 as GridServerBindingDirective, a3 as GridSortableDirective, a4 as GridStatePersistenceDirective, a5 as GridToolbarTemplateDirective, a6 as GridVirtualScrollDirective, a7 as RowEditEvent, a8 as RowReorderEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-
|
|
1
|
+
export { C as CellEditEvent, x as GRID_DEFAULT_MESSAGES, y as GridAddCommandDirective, z as GridAddEvent, A as GridCancelCommandDirective, B as GridCancelEvent, D as GridCellTemplateDirective, E as GridColumnComponent, F as GridColumnTitleTemplateDirective, H as GridCommandColumnComponent, I as GridComponent, J as GridContextMenuDirective, K as GridDetailTemplateDirective, L as GridEditCommandDirective, M as GridEditEvent, N as GridEditTemplateDirective, O as GridEditableDirective, P as GridExportDirective, Q as GridFilterableDirective, R as GridFooterTemplateDirective, S as GridGroupFooterTemplateDirective, T as GridGroupableDirective, U as GridHeaderTemplateDirective, V as GridNoDataTemplateDirective, W as GridRemoveCommandDirective, X as GridRemoveEvent, Y as GridReorderableDirective, Z as GridResizableDirective, _ as GridRowReorderableDirective, $ as GridSaveCommandDirective, a0 as GridSaveEvent, a1 as GridSelectableDirective, a2 as GridServerBindingDirective, a3 as GridSortableDirective, a4 as GridStatePersistenceDirective, a5 as GridToolbarTemplateDirective, a6 as GridVirtualScrollDirective, a7 as RowEditEvent, a8 as RowReorderEvent } from './nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-IewqeT4m.mjs';
|
|
2
2
|
//# sourceMappingURL=nanahoshi-mona-ui-grid.mjs.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, ElementRef, signal, input, output, effect, untracked, afterNextRender, Component } from '@angular/core';
|
|
3
|
-
import { LucideSearch } from '@lucide/angular';
|
|
2
|
+
import { inject, DestroyRef, ElementRef, signal, computed, input, output, effect, untracked, afterNextRender, Component } from '@angular/core';
|
|
4
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
4
|
import * as i1 from '@angular/forms';
|
|
6
5
|
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import { LucideSearch } from '@lucide/angular';
|
|
7
7
|
import { FilterChangeEvent } from '@nanahoshi/mona-ui/common';
|
|
8
8
|
import { TextBoxComponent, TextBoxPrefixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
|
|
9
|
-
import { Subject, fromEvent,
|
|
9
|
+
import { Subject, fromEvent, debounce, timer } from 'rxjs';
|
|
10
10
|
|
|
11
11
|
class FilterInputComponent {
|
|
12
12
|
#destroyRef;
|
|
@@ -17,6 +17,44 @@ class FilterInputComponent {
|
|
|
17
17
|
this.filter$ = new Subject();
|
|
18
18
|
this.filterText = signal("", /* @ts-ignore */
|
|
19
19
|
...(ngDevMode ? [{ debugName: "filterText" }] : /* istanbul ignore next */ []));
|
|
20
|
+
/**
|
|
21
|
+
* When the input controls a list, it acts as a combobox (WAI-ARIA APG): focus stays in the input
|
|
22
|
+
* and the highlighted option is exposed through `aria-activedescendant`.
|
|
23
|
+
*/
|
|
24
|
+
this.inputAttributes = computed(() => {
|
|
25
|
+
const controls = this.controls();
|
|
26
|
+
const ariaLabel = this.ariaLabel() || null;
|
|
27
|
+
if (!controls) {
|
|
28
|
+
return { "aria-label": ariaLabel };
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
role: "combobox",
|
|
32
|
+
"aria-label": ariaLabel,
|
|
33
|
+
"aria-activedescendant": this.activeDescendant() || null,
|
|
34
|
+
"aria-autocomplete": "list",
|
|
35
|
+
"aria-controls": controls,
|
|
36
|
+
"aria-expanded": true
|
|
37
|
+
};
|
|
38
|
+
}, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []));
|
|
40
|
+
/**
|
|
41
|
+
* @description Id of the highlighted option in the controlled list, exposed as `aria-activedescendant`.
|
|
42
|
+
* @default ""
|
|
43
|
+
*/
|
|
44
|
+
this.activeDescendant = input("", /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/**
|
|
47
|
+
* @description Accessible name of the input. The placeholder is not a reliable label, so set this whenever possible.
|
|
48
|
+
* @default ""
|
|
49
|
+
*/
|
|
50
|
+
this.ariaLabel = input("", /* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
52
|
+
/**
|
|
53
|
+
* @description Id of the list this input filters. When set, the input is exposed as a combobox controlling it.
|
|
54
|
+
* @default ""
|
|
55
|
+
*/
|
|
56
|
+
this.controls = input("", /* @ts-ignore */
|
|
57
|
+
...(ngDevMode ? [{ debugName: "controls" }] : /* istanbul ignore next */ []));
|
|
20
58
|
this.debounce = input(0, /* @ts-ignore */
|
|
21
59
|
...(ngDevMode ? [{ debugName: "debounce" }] : /* istanbul ignore next */ []));
|
|
22
60
|
this.filter = input("", /* @ts-ignore */
|
|
@@ -59,7 +97,9 @@ class FilterInputComponent {
|
|
|
59
97
|
this.setSubscriptions();
|
|
60
98
|
}
|
|
61
99
|
setSubscriptions() {
|
|
62
|
-
this.filter
|
|
100
|
+
this.filter$
|
|
101
|
+
.pipe(debounce(() => timer(this.debounce())), takeUntilDestroyed(this.#destroyRef))
|
|
102
|
+
.subscribe(value => {
|
|
63
103
|
const event = new FilterChangeEvent(value);
|
|
64
104
|
this.filterChange.emit(event);
|
|
65
105
|
if (!event.isDefaultPrevented()) {
|
|
@@ -69,12 +109,12 @@ class FilterInputComponent {
|
|
|
69
109
|
});
|
|
70
110
|
}
|
|
71
111
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FilterInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
72
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: FilterInputComponent, isStandalone: true, selector: "mona-filter-input", inputs: { debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange", inputBlur: "inputBlur", inputFocus: "inputFocus" }, ngImport: i0, template: "<mona-text-box\n [ngModel]=\"filterText()\"\n [clearButton]=\"true\"\n [placeholder]=\"placeholder()\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"inputBlur.emit($event)\"\n [tabindex]=\"0\"\n [size]=\"size()\"\n class=\"outline-none shadow-none focus-within:ring-1 focus-within:ring-primary/40\"\n (ngModelChange)=\"filter$.next($event)\">\n <ng-template monaTextBoxPrefixTemplate>\n <div class=\"h-full flex items-center justify-center ps-2\">\n <svg lucideSearch [size]=\"16\" aria-hidden=\"true\"></svg>\n </div>\n </ng-template>\n</mona-text-box>\n", dependencies: [{ kind: "component", type: LucideSearch, selector: "svg[lucideSearch]" }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }] }); }
|
|
112
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.6", type: FilterInputComponent, isStandalone: true, selector: "mona-filter-input", inputs: { activeDescendant: { classPropertyName: "activeDescendant", publicName: "activeDescendant", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, controls: { classPropertyName: "controls", publicName: "controls", isSignal: true, isRequired: false, transformFunction: null }, debounce: { classPropertyName: "debounce", publicName: "debounce", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange", inputBlur: "inputBlur", inputFocus: "inputFocus" }, ngImport: i0, template: "<mona-text-box\n [ngModel]=\"filterText()\"\n [clearButton]=\"true\"\n [placeholder]=\"placeholder()\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"inputBlur.emit($event)\"\n [tabindex]=\"0\"\n [inputAttributes]=\"inputAttributes()\"\n [size]=\"size()\"\n class=\"outline-none shadow-none focus-within:ring-1 focus-within:ring-primary/40\"\n (ngModelChange)=\"filter$.next($event)\">\n <ng-template monaTextBoxPrefixTemplate>\n <div class=\"h-full flex items-center justify-center ps-2\">\n <svg lucideSearch [size]=\"16\" aria-hidden=\"true\"></svg>\n </div>\n </ng-template>\n</mona-text-box>\n", dependencies: [{ kind: "component", type: LucideSearch, selector: "svg[lucideSearch]" }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }] }); }
|
|
73
113
|
}
|
|
74
114
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: FilterInputComponent, decorators: [{
|
|
75
115
|
type: Component,
|
|
76
|
-
args: [{ selector: "mona-filter-input", imports: [LucideSearch, TextBoxComponent, FormsModule, TextBoxPrefixTemplateDirective], template: "<mona-text-box\n [ngModel]=\"filterText()\"\n [clearButton]=\"true\"\n [placeholder]=\"placeholder()\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"inputBlur.emit($event)\"\n [tabindex]=\"0\"\n [size]=\"size()\"\n class=\"outline-none shadow-none focus-within:ring-1 focus-within:ring-primary/40\"\n (ngModelChange)=\"filter$.next($event)\">\n <ng-template monaTextBoxPrefixTemplate>\n <div class=\"h-full flex items-center justify-center ps-2\">\n <svg lucideSearch [size]=\"16\" aria-hidden=\"true\"></svg>\n </div>\n </ng-template>\n</mona-text-box>\n" }]
|
|
77
|
-
}], ctorParameters: () => [], propDecorators: { debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
116
|
+
args: [{ selector: "mona-filter-input", imports: [LucideSearch, TextBoxComponent, FormsModule, TextBoxPrefixTemplateDirective], template: "<mona-text-box\n [ngModel]=\"filterText()\"\n [clearButton]=\"true\"\n [placeholder]=\"placeholder()\"\n (inputFocus)=\"inputFocus.emit($event)\"\n (inputBlur)=\"inputBlur.emit($event)\"\n [tabindex]=\"0\"\n [inputAttributes]=\"inputAttributes()\"\n [size]=\"size()\"\n class=\"outline-none shadow-none focus-within:ring-1 focus-within:ring-primary/40\"\n (ngModelChange)=\"filter$.next($event)\">\n <ng-template monaTextBoxPrefixTemplate>\n <div class=\"h-full flex items-center justify-center ps-2\">\n <svg lucideSearch [size]=\"16\" aria-hidden=\"true\"></svg>\n </div>\n </ng-template>\n</mona-text-box>\n" }]
|
|
117
|
+
}], ctorParameters: () => [], propDecorators: { activeDescendant: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeDescendant", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], controls: [{ type: i0.Input, args: [{ isSignal: true, alias: "controls", required: false }] }], debounce: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounce", required: false }] }], filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
|
|
78
118
|
|
|
79
119
|
/*
|
|
80
120
|
* Public API Surface of @nanahoshi/mona-ui/filter-input
|