ngssm-ag-grid 20.1.1 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngssm-ag-grid.mjs +103 -44
- package/fesm2022/ngssm-ag-grid.mjs.map +1 -1
- package/index.d.ts +25 -2
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import { __decorate } from 'tslib';
|
|
|
2
2
|
import update from 'immutability-helper';
|
|
3
3
|
import { NgSsmFeatureState, Logger, Store, createSignal, provideReducers, provideEffect } from 'ngssm-store';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { inject, EnvironmentInjector, signal, runInInjectionContext, isSignal, ChangeDetectionStrategy, Component, InjectionToken, HostBinding, Directive, Injector, input, effect, Injectable, makeEnvironmentProviders } from '@angular/core';
|
|
5
|
+
import { inject, EnvironmentInjector, signal, runInInjectionContext, isSignal, ChangeDetectionStrategy, Component, InjectionToken, HostBinding, Directive, Injector, input, effect, Injectable, makeEnvironmentProviders, provideAppInitializer } from '@angular/core';
|
|
6
6
|
import { CdkOverlayOrigin, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
7
7
|
import { MatIcon } from '@angular/material/icon';
|
|
8
8
|
import { MatTooltip } from '@angular/material/tooltip';
|
|
@@ -152,7 +152,7 @@ var ChangeOrigin;
|
|
|
152
152
|
class NgssmActionsCellRendererComponent {
|
|
153
153
|
constructor() {
|
|
154
154
|
this.environmentInjector = inject(EnvironmentInjector);
|
|
155
|
-
this.actionButtons = signal([]);
|
|
155
|
+
this.actionButtons = signal([], ...(ngDevMode ? [{ debugName: "actionButtons" }] : []));
|
|
156
156
|
}
|
|
157
157
|
agInit(params) {
|
|
158
158
|
this.cellParams = params;
|
|
@@ -216,10 +216,10 @@ class NgssmActionsCellRendererComponent {
|
|
|
216
216
|
setupPopupComponent(component, action) {
|
|
217
217
|
component?.init?.(action.popupRendered, this.cellParams, action.actionConfig.popupParameter);
|
|
218
218
|
}
|
|
219
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
220
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmActionsCellRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
220
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.4", type: NgssmActionsCellRendererComponent, isStandalone: true, selector: "ngssm-actions-cell-renderer", ngImport: i0, template: "<div class=\"ngssm-actions-cell\">\n @for (actionButton of actionButtons(); track actionButton; let idx = $index) {\n @if (!actionButton.isHidden()) {\n @if (actionButton.actionConfig.popupComponent) {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n [matTooltip]=\"actionButton.tooltip\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"actionButton.popupRendered.set(true)\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"actionButton.popupRendered()\">\n <div [ngssmComponentDisplay]=\"actionButton.actionConfig.popupComponent\" [ngssmComponentAction]=\"actionButton.popupAction\"></div>\n </ng-template>\n } @else {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n (click)=\"executeAction(actionButton)\"\n [matTooltip]=\"actionButton.tooltip\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n }\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: NgssmComponentDisplayDirective, selector: "[ngssmComponentDisplay]", inputs: ["ngssmComponentDisplay", "ngssmComponentAction"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
221
221
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmActionsCellRendererComponent, decorators: [{
|
|
223
223
|
type: Component,
|
|
224
224
|
args: [{ selector: 'ngssm-actions-cell-renderer', imports: [MatIconButton, MatIcon, MatTooltip, CdkOverlayOrigin, CdkConnectedOverlay, NgssmComponentDisplayDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ngssm-actions-cell\">\n @for (actionButton of actionButtons(); track actionButton; let idx = $index) {\n @if (!actionButton.isHidden()) {\n @if (actionButton.actionConfig.popupComponent) {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n [matTooltip]=\"actionButton.tooltip\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"actionButton.popupRendered.set(true)\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"actionButton.popupRendered()\">\n <div [ngssmComponentDisplay]=\"actionButton.actionConfig.popupComponent\" [ngssmComponentAction]=\"actionButton.popupAction\"></div>\n </ng-template>\n } @else {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n (click)=\"executeAction(actionButton)\"\n [matTooltip]=\"actionButton.tooltip\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n }\n }\n }\n</div>\n" }]
|
|
225
225
|
}] });
|
|
@@ -241,13 +241,26 @@ const defaultAgGridColumnsEvents = [
|
|
|
241
241
|
'filterChanged'
|
|
242
242
|
];
|
|
243
243
|
|
|
244
|
+
/**
|
|
245
|
+
* Configuration options for NgssmAgGrid.
|
|
246
|
+
* - theme: The CSS theme to use for the grid.
|
|
247
|
+
* - statusBar: Optional status bar configuration for AG Grid.
|
|
248
|
+
* - defaultColDef: Optional default column definition for all columns.
|
|
249
|
+
* - loadSavedGridStatesAtStartup: If true, grid states saved in local storage are loaded during app initialization.
|
|
250
|
+
*/
|
|
244
251
|
class NgssmAgGridOptions {
|
|
245
252
|
constructor() {
|
|
246
253
|
this.theme = 'ag-theme-material';
|
|
247
254
|
this.statusBar = undefined;
|
|
248
255
|
this.defaultColDef = undefined;
|
|
256
|
+
this.loadSavedGridStatesAtStartup = undefined;
|
|
249
257
|
}
|
|
250
258
|
}
|
|
259
|
+
/**
|
|
260
|
+
* Injection token for providing NgssmAgGridOptions in Angular DI.
|
|
261
|
+
*
|
|
262
|
+
* Provide options through the provideNgssmAgGrid function instead of using this token.
|
|
263
|
+
*/
|
|
251
264
|
const NGSSM_AG_GRID_OPTIONS = new InjectionToken('NGSSM_AG_GRID_OPTIONS');
|
|
252
265
|
|
|
253
266
|
class NgssmAgGridThemeDirective {
|
|
@@ -263,10 +276,10 @@ class NgssmAgGridThemeDirective {
|
|
|
263
276
|
this.agGridAngular.defaultColDef = this.options?.defaultColDef;
|
|
264
277
|
}
|
|
265
278
|
}
|
|
266
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
267
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
279
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmAgGridThemeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
280
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.4", type: NgssmAgGridThemeDirective, isStandalone: true, selector: "[ngssmAgGridTheme]", host: { properties: { "class": "this.className" } }, ngImport: i0 }); }
|
|
268
281
|
}
|
|
269
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmAgGridThemeDirective, decorators: [{
|
|
270
283
|
type: Directive,
|
|
271
284
|
args: [{
|
|
272
285
|
selector: '[ngssmAgGridTheme]',
|
|
@@ -283,23 +296,34 @@ class NgssmAgGridDirective {
|
|
|
283
296
|
this.store = inject(Store);
|
|
284
297
|
this.agGridAngular = inject(AgGridAngular);
|
|
285
298
|
this.injector = inject(Injector);
|
|
286
|
-
this.gridInitialized = signal(false);
|
|
299
|
+
this.gridInitialized = signal(false, ...(ngDevMode ? [{ debugName: "gridInitialized" }] : []));
|
|
287
300
|
this.gridStates = createSignal((state) => selectAgGridState(state).gridStates);
|
|
288
301
|
this.selectedRows = createSignal((state) => selectAgGridState(state).selectedRows);
|
|
289
|
-
this.config = input.required({
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
302
|
+
this.config = input.required(...(ngDevMode ? [{ debugName: "config", alias: 'ngssmAgGrid',
|
|
303
|
+
transform: (v) => {
|
|
304
|
+
if (typeof v === 'string') {
|
|
305
|
+
return {
|
|
306
|
+
gridId: v
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
const conf = v;
|
|
293
310
|
return {
|
|
294
|
-
|
|
311
|
+
...conf
|
|
312
|
+
};
|
|
313
|
+
} }] : [{
|
|
314
|
+
alias: 'ngssmAgGrid',
|
|
315
|
+
transform: (v) => {
|
|
316
|
+
if (typeof v === 'string') {
|
|
317
|
+
return {
|
|
318
|
+
gridId: v
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
const conf = v;
|
|
322
|
+
return {
|
|
323
|
+
...conf
|
|
295
324
|
};
|
|
296
325
|
}
|
|
297
|
-
|
|
298
|
-
return {
|
|
299
|
-
...conf
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
});
|
|
326
|
+
}]));
|
|
303
327
|
// Setup gridInintialized signal
|
|
304
328
|
this.agGridAngular.gridReady.pipe(take(1)).subscribe(() => this.gridInitialized.set(true));
|
|
305
329
|
// Apply registered grid setup is any and start listening to ag-grid events
|
|
@@ -330,7 +354,7 @@ class NgssmAgGridDirective {
|
|
|
330
354
|
runInInjectionContext(this.injector, () => this.initSateChangeListener());
|
|
331
355
|
effectRef.destroy();
|
|
332
356
|
this.logger.information(`[NgssmAgGridDirective] Initialization for '${this.config().gridId}' done`);
|
|
333
|
-
});
|
|
357
|
+
}, ...(ngDevMode ? [{ debugName: "effectRef" }] : []));
|
|
334
358
|
// process changes in columns when not comming from ui
|
|
335
359
|
effect(() => {
|
|
336
360
|
if (!this.gridInitialized()) {
|
|
@@ -423,10 +447,10 @@ class NgssmAgGridDirective {
|
|
|
423
447
|
}
|
|
424
448
|
return menuItems;
|
|
425
449
|
}
|
|
426
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
427
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.
|
|
450
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmAgGridDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
451
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.4", type: NgssmAgGridDirective, isStandalone: true, selector: "[ngssmAgGrid]", inputs: { config: { classPropertyName: "config", publicName: "ngssmAgGrid", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
428
452
|
}
|
|
429
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
453
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: NgssmAgGridDirective, decorators: [{
|
|
430
454
|
type: Directive,
|
|
431
455
|
args: [{
|
|
432
456
|
selector: '[ngssmAgGrid]'
|
|
@@ -534,11 +558,11 @@ class NgssmBaseCellEditor {
|
|
|
534
558
|
*/
|
|
535
559
|
class ActionConfirmationPopupComponent {
|
|
536
560
|
constructor() {
|
|
537
|
-
this.message = signal('No message');
|
|
538
|
-
this.cancelButtonLabel = signal('No');
|
|
539
|
-
this.confirmButtonLabel = signal('Yes');
|
|
540
|
-
this.color = signal('primary');
|
|
541
|
-
this.isOpen = signal(false);
|
|
561
|
+
this.message = signal('No message', ...(ngDevMode ? [{ debugName: "message" }] : []));
|
|
562
|
+
this.cancelButtonLabel = signal('No', ...(ngDevMode ? [{ debugName: "cancelButtonLabel" }] : []));
|
|
563
|
+
this.confirmButtonLabel = signal('Yes', ...(ngDevMode ? [{ debugName: "confirmButtonLabel" }] : []));
|
|
564
|
+
this.color = signal('primary', ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
565
|
+
this.isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
542
566
|
}
|
|
543
567
|
init(popupRendered, params, popupParameter) {
|
|
544
568
|
this.params = params;
|
|
@@ -556,10 +580,10 @@ class ActionConfirmationPopupComponent {
|
|
|
556
580
|
this.popupParameter?.confirmAction?.(this.params);
|
|
557
581
|
this.closePopup();
|
|
558
582
|
}
|
|
559
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
560
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
583
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ActionConfirmationPopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
584
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.4", type: ActionConfirmationPopupComponent, isStandalone: true, selector: "ngssm-action-confirmation-popup", ngImport: i0, template: "<mat-card class=\"fxFlex flex-column-stretch\">\n <mat-card-header>\n <mat-card-title>{{ message() }}</mat-card-title>\n </mat-card-header>\n <mat-card-actions class=\"flex-row-center\">\n <span class=\"fxFlex\"></span>\n <button mat-button (click)=\"closePopup()\">{{ cancelButtonLabel() }}</button>\n <button mat-raised-button [color]=\"color()\" (click)=\"executeAction()\">{{ confirmButtonLabel() }}</button>\n </mat-card-actions>\n</mat-card>\n", dependencies: [{ kind: "component", type: MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "component", type: MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "component", type: MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
561
585
|
}
|
|
562
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: ActionConfirmationPopupComponent, decorators: [{
|
|
563
587
|
type: Component,
|
|
564
588
|
args: [{ selector: 'ngssm-action-confirmation-popup', imports: [MatCard, MatCardHeader, MatCardTitle, MatCardActions, MatButton], changeDetection: ChangeDetectionStrategy.OnPush, template: "<mat-card class=\"fxFlex flex-column-stretch\">\n <mat-card-header>\n <mat-card-title>{{ message() }}</mat-card-title>\n </mat-card-header>\n <mat-card-actions class=\"flex-row-center\">\n <span class=\"fxFlex\"></span>\n <button mat-button (click)=\"closePopup()\">{{ cancelButtonLabel() }}</button>\n <button mat-raised-button [color]=\"color()\" (click)=\"executeAction()\">{{ confirmButtonLabel() }}</button>\n </mat-card-actions>\n</mat-card>\n" }]
|
|
565
589
|
}] });
|
|
@@ -620,10 +644,10 @@ class LocalStorageEffect {
|
|
|
620
644
|
getFilterModelLocalStorageKey(gridId) {
|
|
621
645
|
return `ngssm-ag-grid_filters_${gridId}`;
|
|
622
646
|
}
|
|
623
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
624
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
647
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: LocalStorageEffect, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
648
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: LocalStorageEffect }); }
|
|
625
649
|
}
|
|
626
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
650
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: LocalStorageEffect, decorators: [{
|
|
627
651
|
type: Injectable
|
|
628
652
|
}] });
|
|
629
653
|
|
|
@@ -650,10 +674,10 @@ class GridStatesReducer {
|
|
|
650
674
|
}
|
|
651
675
|
return state;
|
|
652
676
|
}
|
|
653
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
654
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
677
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GridStatesReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
678
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GridStatesReducer }); }
|
|
655
679
|
}
|
|
656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
680
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: GridStatesReducer, decorators: [{
|
|
657
681
|
type: Injectable
|
|
658
682
|
}] });
|
|
659
683
|
|
|
@@ -679,15 +703,50 @@ class SelectedRowsReducer {
|
|
|
679
703
|
}
|
|
680
704
|
return state;
|
|
681
705
|
}
|
|
682
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
683
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
706
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectedRowsReducer, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
707
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectedRowsReducer }); }
|
|
684
708
|
}
|
|
685
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
709
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.4", ngImport: i0, type: SelectedRowsReducer, decorators: [{
|
|
686
710
|
type: Injectable
|
|
687
711
|
}] });
|
|
688
712
|
|
|
689
|
-
|
|
690
|
-
|
|
713
|
+
/**
|
|
714
|
+
* Loads saved grid states from localStorage at application startup if enabled in options.
|
|
715
|
+
* Dispatches actions to restore grid state for each matching key.
|
|
716
|
+
*/
|
|
717
|
+
const loadGridStates = () => {
|
|
718
|
+
const logger = inject(Logger);
|
|
719
|
+
const options = inject(NGSSM_AG_GRID_OPTIONS, { optional: true });
|
|
720
|
+
if (!options?.loadSavedGridStatesAtStartup) {
|
|
721
|
+
logger.information('[ag-grid] No grid state must be loaded at startup.');
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
const store = inject(Store);
|
|
725
|
+
const wantedPrefix = 'ngssm-ag-grid_';
|
|
726
|
+
for (let i = 0; i < localStorage.length; i++) {
|
|
727
|
+
const key = localStorage.key(i);
|
|
728
|
+
if (key?.startsWith(wantedPrefix)) {
|
|
729
|
+
const gridId = key.slice(wantedPrefix.length);
|
|
730
|
+
logger.information(`[ag-grid] Restoring '${gridId}'.`);
|
|
731
|
+
store.dispatchAction(new AgGridAction(AgGridActionType.resetColumnsStateFromDisk, gridId));
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
/**
|
|
736
|
+
* Provides all necessary providers for NgssmAgGrid, including reducers, effects, options, and grid state loading.
|
|
737
|
+
* @param options Optional configuration for the grid.
|
|
738
|
+
* @returns EnvironmentProviders for NgssmAgGrid.
|
|
739
|
+
*/
|
|
740
|
+
const provideNgssmAgGrid = (options) => {
|
|
741
|
+
return makeEnvironmentProviders([
|
|
742
|
+
provideAppInitializer(loadGridStates),
|
|
743
|
+
{
|
|
744
|
+
provide: NGSSM_AG_GRID_OPTIONS,
|
|
745
|
+
useValue: options ?? null
|
|
746
|
+
},
|
|
747
|
+
provideReducers(GridStatesReducer, SelectedRowsReducer),
|
|
748
|
+
provideEffect(LocalStorageEffect)
|
|
749
|
+
]);
|
|
691
750
|
};
|
|
692
751
|
|
|
693
752
|
/*
|
|
@@ -698,5 +757,5 @@ const provideNgssmAgGrid = () => {
|
|
|
698
757
|
* Generated bundle index. Do not edit.
|
|
699
758
|
*/
|
|
700
759
|
|
|
701
|
-
export { ActionConfirmationPopupComponent, AgGridAction, AgGridActionType, AgGridStateSpecification, ChangeOrigin, NGSSM_AG_GRID_OPTIONS, NgssmActionsCellRendererComponent, NgssmAgGridDirective, NgssmAgGridOptions, NgssmAgGridThemeDirective, NgssmBaseCellEditor, RegisterAgGridStateAction, RegisterSelectedRowsAction, defaultAgGridColumnsEvents, getColDefForEditableColumn, getColDefWithNoPadding, getNgssmActionsCellColDef, provideNgssmAgGrid, selectAgGridState, updateAgGridState };
|
|
760
|
+
export { ActionConfirmationPopupComponent, AgGridAction, AgGridActionType, AgGridStateSpecification, ChangeOrigin, NGSSM_AG_GRID_OPTIONS, NgssmActionsCellRendererComponent, NgssmAgGridDirective, NgssmAgGridOptions, NgssmAgGridThemeDirective, NgssmBaseCellEditor, RegisterAgGridStateAction, RegisterSelectedRowsAction, defaultAgGridColumnsEvents, getColDefForEditableColumn, getColDefWithNoPadding, getNgssmActionsCellColDef, loadGridStates, provideNgssmAgGrid, selectAgGridState, updateAgGridState };
|
|
702
761
|
//# sourceMappingURL=ngssm-ag-grid.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngssm-ag-grid.mjs","sources":["../../../projects/ngssm-ag-grid/src/lib/actions/ag-grid-action-type.ts","../../../projects/ngssm-ag-grid/src/lib/actions/register-ag-grid-state.action.ts","../../../projects/ngssm-ag-grid/src/lib/actions/register-selected-rows.action.ts","../../../projects/ngssm-ag-grid/src/lib/actions/ag-grid.action.ts","../../../projects/ngssm-ag-grid/src/lib/state/ag-grid.state.ts","../../../projects/ngssm-ag-grid/src/lib/state/change-origin.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer.component.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer.component.html","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer-params.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid-config.ts","../../../projects/ngssm-ag-grid/src/lib/ngssm-ag-grid-options.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid-theme.directive.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid.directive.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-base-cell-editor.ts","../../../projects/ngssm-ag-grid/src/lib/components/action-confirmation-popup/action-confirmation-popup.component.ts","../../../projects/ngssm-ag-grid/src/lib/components/action-confirmation-popup/action-confirmation-popup.component.html","../../../projects/ngssm-ag-grid/src/lib/helpers.ts","../../../projects/ngssm-ag-grid/src/lib/effects/local-storage.effect.ts","../../../projects/ngssm-ag-grid/src/lib/reducers/grid-states.reducer.ts","../../../projects/ngssm-ag-grid/src/lib/reducers/selected-rows.reducer.ts","../../../projects/ngssm-ag-grid/src/lib/provide-ngssm-ag-grid.ts","../../../projects/ngssm-ag-grid/src/public-api.ts","../../../projects/ngssm-ag-grid/src/ngssm-ag-grid.ts"],"sourcesContent":["export enum AgGridActionType {\n registerAgGridState = '[AgGridActionType] registerAgGridState',\n registerSelectedRows = '[AgGridActionType] registerSelectedRows',\n saveColumnsStateOnDisk = '[AgGridActionType] saveColumnsStateOnDisk',\n resetColumnsStateFromDisk = '[AgGridActionType] resetColumnsStateFromDisk'\n}\n","import { ColumnState, FilterModel } from 'ag-grid-community';\n\nimport { Action } from 'ngssm-store';\n\nimport { ChangeOrigin } from '../state';\nimport { AgGridActionType } from './ag-grid-action-type';\n\nexport class RegisterAgGridStateAction implements Action {\n public readonly type: string = AgGridActionType.registerAgGridState;\n\n constructor(\n public readonly gridId: string,\n public readonly origin: ChangeOrigin,\n public readonly columnStates: ColumnState[],\n public readonly filterModel: FilterModel | null\n ) {}\n}\n","import { Action } from 'ngssm-store';\nimport { ChangeOrigin } from '../state';\nimport { AgGridActionType } from './ag-grid-action-type';\n\nexport class RegisterSelectedRowsAction implements Action {\n public readonly type: string = AgGridActionType.registerSelectedRows;\n\n constructor(\n public readonly gridId: string,\n public readonly origin: ChangeOrigin,\n public readonly ids: string[]\n ) {}\n}\n","import { Action } from 'ngssm-store';\n\nexport class AgGridAction implements Action {\n constructor(\n public readonly type: string,\n public readonly gridId: string\n ) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\nimport { GridState } from './grid-state';\nimport { SelectedRows } from './selected-rows';\n\nexport const selectAgGridState = (state: State): AgGridState => state[AgGridStateSpecification.featureStateKey] as AgGridState;\n\nexport const updateAgGridState = (state: State, command: Spec<AgGridState, never>): State =>\n update(state, {\n [AgGridStateSpecification.featureStateKey]: command\n });\n\nexport interface AgGridState {\n gridStates: Record<string, GridState>;\n selectedRows: Record<string, SelectedRows>;\n}\n\n@NgSsmFeatureState({\n featureStateKey: AgGridStateSpecification.featureStateKey,\n initialState: AgGridStateSpecification.initialState\n})\nexport class AgGridStateSpecification {\n public static readonly featureStateKey = 'ag-grid-state';\n public static readonly initialState: AgGridState = {\n gridStates: {},\n selectedRows: {}\n };\n}\n","export enum ChangeOrigin {\n agGrid = 'agGrid',\n other = 'other'\n}\n","/**\n * The `NgssmActionsCellRendererComponent` is a custom cell renderer for `ag-grid` that dynamically renders\n * action buttons within a grid cell. It provides flexibility in configuring button behavior, visibility, and state.\n *\n * ### Features:\n * - Dynamically generates action buttons based on the provided configuration.\n * - Supports reactive state management using Angular signals.\n * - Integrates with observables, functions, or signals for `isDisabled` and `isHidden` properties.\n * - Provides customizable tooltips and button styles.\n * - Executes custom actions when buttons are clicked.\n *\n * ### Usage:\n * To use this component, provide it as a cell renderer in your `ag-grid` column definition:\n *\n * ```typescript\n * columnDefs: [\n * {\n * headerName: 'Actions',\n * field: 'actions',\n * cellRenderer: NgssmActionsCellRendererComponent,\n * cellRendererParams: {\n * actions: [\n * {\n * cssClass: 'delete-button',\n * color: 'warn',\n * tooltip: 'Delete Item',\n * isDisabled: (params) => params.data.isLocked,\n * isHidden: (params) => !params.data.canDelete,\n * click: (params) => console.log('Delete action clicked', params)\n * }\n * ]\n * }\n * }\n * ];\n * ```\n *\n * ### Inputs:\n * - `NgssmActionsCellRendererParams`: Configuration object passed to the component via `cellRendererParams`.\n * - `actions`: Array of `ActionConfig` objects defining the buttons to render.\n *\n * ### Outputs:\n * None.\n *\n * ### Dependencies:\n * - Angular Material components: `MatIconButton`, `MatIcon`, `MatTooltip`.\n * - `ag-grid-angular` for integration with `ag-grid`.\n *\n * ### Example ActionConfig:\n * ```typescript\n * interface ActionConfig {\n * cssClass: string; // CSS class for the button.\n * color?: string; // Button color (e.g., 'primary', 'warn').\n * tooltip?: string; // Tooltip text for the button.\n * isDisabled?: boolean | Signal<boolean> | Observable<boolean> | ((params: ICellRendererParams) => boolean);\n * isHidden?: boolean | Signal<boolean> | Observable<boolean> | ((params: ICellRendererParams) => boolean);\n * click?: (params: ICellRendererParams) => void; // Action to execute on button click.\n * }\n * ```\n *\n * ### Methods:\n * - `agInit(params: ICellRendererParams)`: Initializes the component with the provided cell renderer parameters.\n * - `refresh(params: ICellRendererParams)`: Refreshes the component state when the grid updates.\n * - `executeAction(action: ActionButton)`: Executes the action associated with a button.\n *\n * ### Internal Logic:\n * - The `setupActions` method initializes the action buttons based on the provided configuration.\n * - The `setUpActionSignal` method handles the initialization of `isDisabled` and `isHidden` states for each button.\n * - The component uses Angular signals (`WritableSignal` and `Signal`) to manage the state of `isDisabled` and `isHidden`.\n * - Observables are converted to signals using `toSignal` for seamless integration with Angular's reactivity system.\n *\n * ### Change Detection:\n * - The component uses `ChangeDetectionStrategy.OnPush` for improved performance by minimizing unnecessary change detection cycles.\n *\n * ### Notes:\n * - Ensure that the `actions` array in `NgssmActionsCellRendererParams` is properly configured to avoid runtime errors.\n * - The component is designed to work with Angular Material and requires the relevant modules to be imported in your application.\n * - The `isDisabled` and `isHidden` properties can accept multiple input types (boolean, function, signal, or observable), providing flexibility in defining button behavior.\n */\n\nimport {\n Component,\n ChangeDetectionStrategy,\n signal,\n WritableSignal,\n Signal,\n inject,\n EnvironmentInjector,\n runInInjectionContext,\n isSignal\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { MatIconButton } from '@angular/material/button';\nimport { isObservable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { ICellRendererAngularComp } from 'ag-grid-angular';\nimport { ICellRendererParams } from 'ag-grid-community';\n\nimport { NgssmComponentAction, NgssmComponentDisplayDirective } from 'ngssm-toolkit';\n\nimport { NgssmActionsCellRendererParams } from './ngssm-actions-cell-renderer-params';\nimport { ActionConfig, ActionDisabledFunc, ActionHiddenFunc, ActionPopupComponent } from './action-config';\n\ninterface ActionButton {\n cssClass: string;\n color: string;\n\n isDisabled: WritableSignal<boolean> | Signal<boolean>;\n isHidden: WritableSignal<boolean> | Signal<boolean>;\n\n isDisabledInputAFunction: boolean;\n isHiddenInputAFunction: boolean;\n\n actionConfig: ActionConfig;\n\n tooltip: string;\n\n popupRendered: WritableSignal<boolean>;\n popupAction?: NgssmComponentAction;\n}\n\n@Component({\n selector: 'ngssm-actions-cell-renderer',\n imports: [MatIconButton, MatIcon, MatTooltip, CdkOverlayOrigin, CdkConnectedOverlay, NgssmComponentDisplayDirective],\n templateUrl: './ngssm-actions-cell-renderer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmActionsCellRendererComponent implements ICellRendererAngularComp {\n private environmentInjector = inject(EnvironmentInjector);\n private cellParams: ICellRendererParams | undefined;\n\n public readonly actionButtons = signal<ActionButton[]>([]);\n\n public agInit(params: ICellRendererParams): void {\n this.cellParams = params;\n this.setupActions(params as unknown as NgssmActionsCellRendererParams);\n }\n\n public refresh(params: ICellRendererParams): boolean {\n this.cellParams = params;\n this.actionButtons().forEach((a) => {\n if (a.isDisabledInputAFunction) {\n (a.isDisabled as WritableSignal<boolean>).set((a.actionConfig.isDisabled as ActionDisabledFunc)(params));\n }\n\n if (a.isHiddenInputAFunction) {\n (a.isHidden as WritableSignal<boolean>).set((a.actionConfig.isHidden as ActionHiddenFunc)(params));\n }\n });\n return true;\n }\n\n public executeAction(action: ActionButton): void {\n const params = this.cellParams;\n if (params) {\n action.actionConfig.click?.(params);\n }\n }\n\n private setupActions(rendererParams: NgssmActionsCellRendererParams): void {\n runInInjectionContext(this.environmentInjector, () => {\n const actionButtons: ActionButton[] = (rendererParams?.actions ?? []).map((a) => {\n const actionButton: ActionButton = {\n cssClass: a.cssClass,\n color: a.color ?? 'primary',\n isDisabled: signal(false),\n isDisabledInputAFunction: false,\n isHidden: signal(false),\n isHiddenInputAFunction: false,\n actionConfig: a,\n tooltip: a.tooltip ?? '',\n popupRendered: signal(false)\n };\n\n if (a.popupComponent) {\n actionButton.popupAction = ((component: ActionPopupComponent) =>\n this.setupPopupComponent(component, actionButton)) as NgssmComponentAction;\n }\n\n this.setUpActionSignal(actionButton, a, rendererParams, 'isDisabled');\n this.setUpActionSignal(actionButton, a, rendererParams, 'isHidden');\n\n return actionButton;\n });\n\n this.actionButtons.set(actionButtons);\n });\n }\n\n private setUpActionSignal(\n actionButton: ActionButton,\n config: ActionConfig,\n rendererParams: NgssmActionsCellRendererParams,\n signalName: 'isDisabled' | 'isHidden'\n ): void {\n const input = config[signalName];\n\n if (isSignal(input)) {\n actionButton[signalName] = input as Signal<boolean>;\n } else if (input instanceof Function) {\n (actionButton[signalName] as WritableSignal<boolean>).set(input(rendererParams as unknown as ICellRendererParams));\n actionButton[`${signalName}InputAFunction`] = true;\n } else if (isObservable(input)) {\n actionButton[signalName] = toSignal(input, { initialValue: false });\n }\n }\n\n private setupPopupComponent(component: ActionPopupComponent, action: ActionButton): void {\n component?.init?.(action.popupRendered, this.cellParams as unknown as ICellRendererParams, action.actionConfig.popupParameter);\n }\n}\n","<div class=\"ngssm-actions-cell\">\n @for (actionButton of actionButtons(); track actionButton; let idx = $index) {\n @if (!actionButton.isHidden()) {\n @if (actionButton.actionConfig.popupComponent) {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n [matTooltip]=\"actionButton.tooltip\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"actionButton.popupRendered.set(true)\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"actionButton.popupRendered()\">\n <div [ngssmComponentDisplay]=\"actionButton.actionConfig.popupComponent\" [ngssmComponentAction]=\"actionButton.popupAction\"></div>\n </ng-template>\n } @else {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n (click)=\"executeAction(actionButton)\"\n [matTooltip]=\"actionButton.tooltip\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n }\n }\n }\n</div>\n","import { ColDef } from 'ag-grid-community';\n\nimport { ActionConfig } from './action-config';\nimport { NgssmActionsCellRendererComponent } from './ngssm-actions-cell-renderer.component';\n\n// Parameters of the actions cell renderer\n// For now, an action is rendered as a mat-icon-button with the class passed in ActionConfig\nexport interface NgssmActionsCellRendererParams<TData = unknown, TValue = unknown> {\n actions: ActionConfig<TData, TValue>[];\n}\n\nexport const getNgssmActionsCellColDef = <TData = unknown, TValue = unknown>(\n params: NgssmActionsCellRendererParams<TData, TValue>\n): Partial<ColDef> => ({\n cellRenderer: NgssmActionsCellRendererComponent,\n cellRendererParams: params\n});\n","import { AgPublicEventType, GetContextMenuItems } from 'ag-grid-community';\n\n/**\n * List of default ag-grid events listened by the directive to update the stored state.\n */\nexport const defaultAgGridColumnsEvents: AgPublicEventType[] = [\n 'sortChanged',\n 'filterChanged',\n 'columnPinned',\n 'columnResized',\n 'displayedColumnsChanged',\n 'filterChanged'\n];\n\n/**\n * Configuration parameters of the {@link NgssmAgGridDirective} directive to apply on a\n * {@link https://www.ag-grid.com/ ag-grid instance}\n */\nexport interface NgssmAgGridConfig {\n /**\n * Unique identifier of the grid on which the directive is applied\n */\n gridId: string;\n\n /**\n * If true, the selected rows are stored in the state and restored when the directive is created.\n */\n keepSelection?: boolean;\n\n /**\n * If true, context menus are added to the grid to save the columns state into the local storage\n * and to restore from the local storage.\n *\n * @remarks\n *\n * this functionnality is only available for enterprise version of {@link https://www.ag-grid.com/}.\n */\n canSaveOnDiskColumnsState?: boolean;\n\n /**\n * Used to override default context menu items.\n */\n getContextMenuItems?: GetContextMenuItems;\n\n /**\n * Defines the list of ag-grid events listened to by the directive to update the state of stored columns.\n * By default: defaultAgGridColumnsEvents\n */\n listenedColumnsEvents?: AgPublicEventType[];\n}\n","import { InjectionToken } from '@angular/core';\nimport { ColDef, StatusPanelDef } from 'ag-grid-community';\n\nexport class NgssmAgGridOptions {\n theme = 'ag-theme-material';\n statusBar:\n | {\n statusPanels: StatusPanelDef[];\n }\n | undefined = undefined;\n defaultColDef: ColDef | undefined = undefined;\n}\n\nexport const NGSSM_AG_GRID_OPTIONS = new InjectionToken<NgssmAgGridOptions>('NGSSM_AG_GRID_OPTIONS');\n","import { Directive, HostBinding, inject } from '@angular/core';\n\nimport { AgGridAngular } from 'ag-grid-angular';\n\nimport { NgssmAgGridOptions, NGSSM_AG_GRID_OPTIONS } from '../ngssm-ag-grid-options';\n\n@Directive({\n selector: '[ngssmAgGridTheme]',\n standalone: true\n})\nexport class NgssmAgGridThemeDirective {\n private readonly options: NgssmAgGridOptions | null = inject(NGSSM_AG_GRID_OPTIONS, { optional: true });\n private agGridAngular = inject(AgGridAngular);\n\n @HostBinding('class') className = '';\n\n constructor() {\n this.className = (this.options ?? new NgssmAgGridOptions()).theme;\n if (this.agGridAngular.statusBar === undefined) {\n this.agGridAngular.statusBar = this.options?.statusBar;\n }\n\n if (this.agGridAngular.defaultColDef === undefined) {\n this.agGridAngular.defaultColDef = this.options?.defaultColDef;\n }\n }\n}\n","import { Directive, inject, signal, input, effect, runInInjectionContext, Injector } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { take } from 'rxjs';\n\nimport { AgGridAngular } from 'ag-grid-angular';\nimport { DefaultMenuItem, GetContextMenuItemsParams, MenuItemDef } from 'ag-grid-community';\n\nimport { createSignal, Logger, Store } from 'ngssm-store';\n\nimport { AgGridAction, AgGridActionType, RegisterAgGridStateAction, RegisterSelectedRowsAction } from '../actions';\nimport { ChangeOrigin, selectAgGridState } from '../state';\nimport { defaultAgGridColumnsEvents, NgssmAgGridConfig } from './ngssm-ag-grid-config';\n\n@Directive({\n selector: '[ngssmAgGrid]'\n})\nexport class NgssmAgGridDirective {\n private readonly logger = inject(Logger);\n private readonly store = inject(Store);\n private readonly agGridAngular = inject(AgGridAngular);\n private readonly injector = inject(Injector);\n\n private readonly gridInitialized = signal(false);\n private readonly gridStates = createSignal((state) => selectAgGridState(state).gridStates);\n private readonly selectedRows = createSignal((state) => selectAgGridState(state).selectedRows);\n\n public readonly config = input.required<NgssmAgGridConfig, string | NgssmAgGridConfig>({\n alias: 'ngssmAgGrid',\n transform: (v) => {\n if (typeof v === 'string') {\n return {\n gridId: v as string\n };\n }\n\n const conf = v as NgssmAgGridConfig;\n return {\n ...conf\n };\n }\n });\n\n constructor() {\n // Setup gridInintialized signal\n this.agGridAngular.gridReady.pipe(take(1)).subscribe(() => this.gridInitialized.set(true));\n\n // Apply registered grid setup is any and start listening to ag-grid events\n const effectRef = effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n this.logger.information(`[NgssmAgGridDirective] Initialization for '${this.config().gridId}' in progress`);\n\n const gridState = this.gridStates()[this.config().gridId];\n if (gridState) {\n this.agGridAngular.api.applyColumnState({\n state: gridState.columnsState,\n applyOrder: true\n });\n this.agGridAngular.api.setFilterModel(gridState.filterModel);\n }\n\n if (this.config().keepSelection) {\n const selection = this.selectedRows()[this.config().gridId];\n if (selection) {\n const ids = selection.ids ?? [];\n this.agGridAngular.api.forEachNode((node) => {\n if (node.id) {\n node.setSelected(ids.includes(node.id));\n }\n });\n }\n }\n\n runInInjectionContext(this.injector, () => this.initSateChangeListener());\n\n effectRef.destroy();\n\n this.logger.information(`[NgssmAgGridDirective] Initialization for '${this.config().gridId}' done`);\n });\n\n // process changes in columns when not comming from ui\n effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n const gridState = this.gridStates()[this.config().gridId];\n if (gridState?.origin === ChangeOrigin.other) {\n this.agGridAngular.api.applyColumnState({\n state: gridState.columnsState,\n applyOrder: true\n });\n this.agGridAngular.api.setFilterModel(gridState.filterModel);\n }\n });\n\n // process changes in selection when not comming from ui\n effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n if (this.config().keepSelection !== true) {\n return;\n }\n\n const selection = this.selectedRows()[this.config().gridId];\n if (!selection || selection.origin !== ChangeOrigin.other) {\n return;\n }\n\n const ids = selection.ids ?? [];\n this.agGridAngular.api.forEachNode((node) => {\n if (node.id) {\n node.setSelected(ids.includes(node.id));\n }\n });\n });\n\n this.agGridAngular.getContextMenuItems = (params) => this.getContextMenuItems(params);\n }\n\n private initSateChangeListener(): void {\n (this.config().listenedColumnsEvents ?? defaultAgGridColumnsEvents).forEach((eventType) => {\n this.agGridAngular.api.addEventListener(eventType, () => this.saveGridState());\n });\n\n this.agGridAngular.rowSelected.pipe(takeUntilDestroyed()).subscribe(() => this.processSelectionChanged());\n }\n\n private saveGridState(): void {\n const state = this.agGridAngular.api.getColumnState();\n const filterModel = this.agGridAngular.api.getFilterModel();\n this.store.dispatchAction(new RegisterAgGridStateAction(this.config().gridId, ChangeOrigin.agGrid, state, filterModel));\n }\n\n private processSelectionChanged(): void {\n if (this.config().keepSelection !== true) {\n return;\n }\n\n const selectedRows = this.agGridAngular.api\n .getSelectedNodes()\n .map((n) => n.id ?? '')\n .filter((n) => n !== '');\n\n this.store.dispatchAction(new RegisterSelectedRowsAction(this.config().gridId, ChangeOrigin.agGrid, selectedRows));\n }\n\n private getContextMenuItems(params: GetContextMenuItemsParams): (DefaultMenuItem | MenuItemDef)[] {\n this.logger.information('[NgssmAgGridDirective] Generating the context menu...');\n const menuItems: (DefaultMenuItem | MenuItemDef)[] = [];\n const getContextMenuItems = this.config().getContextMenuItems;\n if (getContextMenuItems) {\n menuItems.push(...(getContextMenuItems(params) as (DefaultMenuItem | MenuItemDef)[]));\n } else {\n menuItems.push(...(params.defaultItems ?? []));\n }\n\n if (this.config().canSaveOnDiskColumnsState === true) {\n const gridId = this.config().gridId;\n menuItems.push(\n ...[\n 'separator' as DefaultMenuItem,\n {\n name: 'Save columns state',\n action: () => this.store.dispatchAction(new AgGridAction(AgGridActionType.saveColumnsStateOnDisk, gridId)),\n icon: '<i class=\"fa-regular fa-floppy-disk\"></i>'\n },\n {\n name: 'Restore columns state',\n action: () => this.store.dispatchAction(new AgGridAction(AgGridActionType.resetColumnsStateFromDisk, gridId)),\n icon: '<i class=\"fa-solid fa-rotate-right\"></i>'\n },\n {\n name: 'Reset columns state to default',\n action: () => {\n this.agGridAngular.api.resetColumnState();\n this.agGridAngular.api.setFilterModel(null);\n },\n icon: '<i class=\"fa-solid fa-clock-rotate-left\"></i>'\n }\n ]\n );\n }\n return menuItems;\n }\n}\n","import { ICellEditorAngularComp } from 'ag-grid-angular';\nimport { ICellEditorParams } from 'ag-grid-community';\n\nexport abstract class NgssmBaseCellEditor implements ICellEditorAngularComp {\n protected params?: ICellEditorParams;\n\n public agInit(params: ICellEditorParams): void {\n this.params = params;\n }\n\n public getValue() {\n return '';\n }\n\n public isPopup(): boolean {\n return true;\n }\n\n public getPopupPosition(): 'over' | 'under' | undefined {\n return 'over';\n }\n\n public isCancelAfterEnd(): boolean {\n return true;\n }\n\n public cancel(): void {\n this.params?.stopEditing();\n }\n}\n","import { ChangeDetectionStrategy, Component, signal, WritableSignal } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatCard, MatCardActions, MatCardTitle, MatCardHeader } from '@angular/material/card';\nimport { ICellRendererParams } from 'ag-grid-community';\n\nimport { ActionConfirmationPopupParameter } from './action-confirmation-popup-parameter';\nimport { ActionPopupComponent } from '../ngssm-actions-cell-renderer';\n\n/**\n * The `ActionConfirmationPopupComponent` is a reusable confirmation popup component designed to work with `ag-grid`.\n * It provides a customizable confirmation dialog for user actions, allowing developers to define messages, button labels,\n * and actions dynamically.\n *\n * ### Features:\n * - Displays a confirmation popup with customizable message, button labels, and color.\n * - Integrates with the `ActionPopupComponent` interface for seamless use with `NgssmActionsCellRendererComponent`.\n * - Uses Angular signals for efficient state management.\n * - Supports dynamic initialization with parameters provided by `ag-grid`.\n * - Provides methods to handle user actions (confirm or cancel) and close the popup.\n *\n * ### Usage:\n * This component is typically used as a popup in conjunction with the `NgssmActionsCellRendererComponent`.\n * To configure it, pass an `ActionConfirmationPopupParameter` object when initializing the popup.\n *\n * Example:\n * ```typescript\n * const popupParameter: ActionConfirmationPopupParameter = {\n * messageBuilder: (params) => `Are you sure you want to delete ${params.data.name}?`,\n * color: 'warn',\n * cancelButtonLabel: 'No',\n * confirmButtonLabel: 'Yes',\n * confirmAction: (params) => console.log('Confirmed action for:', params.data)\n * };\n * ```\n *\n * ### Inputs:\n * - `popupRendered`: A writable signal indicating whether the popup is currently rendered.\n * - `params`: The cell renderer parameters provided by `ag-grid`.\n * - `popupParameter`: An object of type `ActionConfirmationPopupParameter` that defines the popup's behavior and content.\n *\n * ### Outputs:\n * None.\n *\n * ### Dependencies:\n * - Angular Material components: `MatCard`, `MatButton`.\n * - `ag-grid-community` for integration with `ag-grid`.\n *\n * ### Methods:\n * - `init(popupRendered, params, popupParameter)`: Initializes the popup with the provided parameters.\n * - `popupRendered`: A writable signal to track the popup's visibility.\n * - `params`: The cell renderer parameters from `ag-grid`.\n * - `popupParameter`: The configuration object for the popup.\n *\n * - `closePopup()`: Closes the popup by setting the `isOpen` signal to `false`.\n *\n * - `executeAction()`: Executes the confirmation action defined in the `popupParameter` and closes the popup.\n *\n * ### Signals:\n * - `message`: The message displayed in the popup.\n * - `cancelButtonLabel`: The label for the cancel button.\n * - `confirmButtonLabel`: The label for the confirm button.\n * - `color`: The color theme for the confirm button (e.g., 'primary', 'warn').\n * - `isOpen`: Tracks whether the popup is currently open.\n *\n * ### Example Initialization:\n * ```typescript\n * const popup = new ActionConfirmationPopupComponent();\n * popup.init(\n * popupRenderedSignal,\n * cellRendererParams,\n * {\n * messageBuilder: (params) => `Are you sure you want to delete ${params.data.name}?`,\n * color: 'warn',\n * cancelButtonLabel: 'No',\n * confirmButtonLabel: 'Yes',\n * confirmAction: (params) => console.log('Confirmed action for:', params.data)\n * }\n * );\n * ```\n *\n * ### Notes:\n * - Ensure that the `popupParameter` object is properly configured to avoid runtime errors.\n * - The `messageBuilder` function in `popupParameter` allows dynamic message generation based on the `params` object.\n * - The component uses `ChangeDetectionStrategy.OnPush` for performance optimization.\n * - The `isOpen` signal can be used to programmatically control the popup's visibility.\n */\n@Component({\n selector: 'ngssm-action-confirmation-popup',\n imports: [MatCard, MatCardHeader, MatCardTitle, MatCardActions, MatButton],\n templateUrl: './action-confirmation-popup.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionConfirmationPopupComponent implements ActionPopupComponent<unknown, unknown, ActionConfirmationPopupParameter> {\n private params?: ICellRendererParams;\n private popupParameter?: ActionConfirmationPopupParameter;\n public readonly message = signal<string>('No message');\n public readonly cancelButtonLabel = signal<string>('No');\n public readonly confirmButtonLabel = signal<string>('Yes');\n public readonly color = signal<string>('primary');\n\n public isOpen = signal<boolean>(false);\n\n public init(\n popupRendered: WritableSignal<boolean>,\n params?: ICellRendererParams<unknown, unknown>,\n popupParameter?: ActionConfirmationPopupParameter\n ): void {\n this.params = params;\n this.popupParameter = popupParameter;\n\n this.message.set(popupParameter?.messageBuilder?.(params) ?? 'No message');\n this.color.set(popupParameter?.color ?? 'primary');\n this.cancelButtonLabel.set(popupParameter?.cancelButtonLabel ?? 'Cancel');\n this.confirmButtonLabel.set(popupParameter?.confirmButtonLabel ?? 'Confirm');\n\n this.isOpen = popupRendered;\n }\n\n public closePopup(): void {\n this.isOpen.set(false);\n }\n\n public executeAction(): void {\n this.popupParameter?.confirmAction?.(this.params);\n this.closePopup();\n }\n}\n","<mat-card class=\"fxFlex flex-column-stretch\">\n <mat-card-header>\n <mat-card-title>{{ message() }}</mat-card-title>\n </mat-card-header>\n <mat-card-actions class=\"flex-row-center\">\n <span class=\"fxFlex\"></span>\n <button mat-button (click)=\"closePopup()\">{{ cancelButtonLabel() }}</button>\n <button mat-raised-button [color]=\"color()\" (click)=\"executeAction()\">{{ confirmButtonLabel() }}</button>\n </mat-card-actions>\n</mat-card>\n","import { ColDef } from 'ag-grid-community';\n\nexport const getColDefWithNoPadding = (): Partial<ColDef> => ({\n cellClass: ['cell-with-no-padding']\n});\n\nexport const getColDefForEditableColumn = (): Partial<ColDef> => ({\n editable: true,\n headerClass: 'ngssm-ag-editable-cell',\n valueSetter: () => false\n});\n","import { inject, Injectable } from '@angular/core';\n\nimport { Effect, State, Action, Logger, ActionDispatcher } from 'ngssm-store';\n\nimport { AgGridAction, AgGridActionType, RegisterAgGridStateAction } from '../actions';\nimport { ChangeOrigin, selectAgGridState } from '../state';\n\n@Injectable()\nexport class LocalStorageEffect implements Effect {\n private readonly logger = inject(Logger);\n\n public readonly processedActions: string[] = [AgGridActionType.saveColumnsStateOnDisk, AgGridActionType.resetColumnsStateFromDisk];\n\n public processAction(actiondispatcher: ActionDispatcher, state: State, action: Action): void {\n const agGridAction = action as AgGridAction;\n\n switch (action.type) {\n case AgGridActionType.saveColumnsStateOnDisk: {\n const gridState = selectAgGridState(state).gridStates[agGridAction.gridId];\n if (gridState) {\n localStorage.setItem(this.getColumnsStateLocalStorageKey(agGridAction.gridId), JSON.stringify(gridState.columnsState));\n if (gridState.filterModel) {\n localStorage.setItem(this.getFilterModelLocalStorageKey(agGridAction.gridId), JSON.stringify(gridState.filterModel));\n }\n }\n\n break;\n }\n\n case AgGridActionType.resetColumnsStateFromDisk: {\n const stored = localStorage.getItem(this.getColumnsStateLocalStorageKey(agGridAction.gridId));\n const filterModelStored = localStorage.getItem(this.getFilterModelLocalStorageKey(agGridAction.gridId));\n console.log(stored, filterModelStored);\n if (stored) {\n try {\n const columnsState = JSON.parse(stored);\n if (Array.isArray(columnsState)) {\n const action = new RegisterAgGridStateAction(\n agGridAction.gridId,\n ChangeOrigin.other,\n columnsState,\n filterModelStored ? JSON.parse(filterModelStored) : null\n );\n actiondispatcher.dispatchAction(action);\n } else {\n this.logger.error(`Wrong columns state config for grid '${agGridAction.gridId}'`, stored);\n }\n } catch (error) {\n this.logger.error(`Unable to load config for grid '${agGridAction.gridId}'`, error);\n }\n }\n\n break;\n }\n }\n }\n\n private getColumnsStateLocalStorageKey(gridId: string): string {\n return `ngssm-ag-grid_${gridId}`;\n }\n\n private getFilterModelLocalStorageKey(gridId: string): string {\n return `ngssm-ag-grid_filters_${gridId}`;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport { AgGridActionType, RegisterAgGridStateAction } from '../actions';\nimport { updateAgGridState } from '../state';\n\n@Injectable()\nexport class GridStatesReducer implements Reducer {\n public readonly processedActions: string[] = [AgGridActionType.registerAgGridState];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case AgGridActionType.registerAgGridState: {\n const registerAgGridStateAction = action as RegisterAgGridStateAction;\n return updateAgGridState(state, {\n gridStates: {\n [registerAgGridStateAction.gridId]: {\n $set: {\n origin: registerAgGridStateAction.origin,\n columnsState: registerAgGridStateAction.columnStates,\n filterModel: registerAgGridStateAction.filterModel\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport { AgGridActionType, RegisterSelectedRowsAction } from '../actions';\nimport { updateAgGridState } from '../state';\n\n@Injectable()\nexport class SelectedRowsReducer implements Reducer {\n public readonly processedActions: string[] = [AgGridActionType.registerSelectedRows];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case AgGridActionType.registerSelectedRows: {\n const registerSelectedRowsAction = action as RegisterSelectedRowsAction;\n return updateAgGridState(state, {\n selectedRows: {\n [registerSelectedRowsAction.gridId]: {\n $set: {\n origin: registerSelectedRowsAction.origin,\n ids: registerSelectedRowsAction.ids\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\n\nimport { provideEffect, provideReducers } from 'ngssm-store';\n\nimport { LocalStorageEffect } from './effects/local-storage.effect';\nimport { GridStatesReducer } from './reducers/grid-states.reducer';\nimport { SelectedRowsReducer } from './reducers/selected-rows.reducer';\n\nexport const provideNgssmAgGrid = (): EnvironmentProviders => {\n return makeEnvironmentProviders([provideReducers(GridStatesReducer, SelectedRowsReducer), provideEffect(LocalStorageEffect)]);\n};\n","/*\n * Public API Surface of ngssm-ag-grid\n */\n\nexport * from './lib/actions';\nexport * from './lib/state';\nexport * from './lib/components';\nexport * from './lib/ngssm-ag-grid-options';\nexport * from './lib/helpers';\nexport * from './lib/provide-ngssm-ag-grid';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,qBAAA,CAAA,GAAA,wCAA8D;AAC9D,IAAA,gBAAA,CAAA,sBAAA,CAAA,GAAA,yCAAgE;AAChE,IAAA,gBAAA,CAAA,wBAAA,CAAA,GAAA,2CAAoE;AACpE,IAAA,gBAAA,CAAA,2BAAA,CAAA,GAAA,8CAA0E;AAC5E,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAK3B,EAAA,CAAA,CAAA;;MCEY,yBAAyB,CAAA;AAGpC,IAAA,WAAA,CACkB,MAAc,EACd,MAAoB,EACpB,YAA2B,EAC3B,WAA+B,EAAA;QAH/B,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAY,CAAA,YA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CAAC,CAAC,eAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAC/H;;ACVA;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngssm-ag-grid.mjs","sources":["../../../projects/ngssm-ag-grid/src/lib/actions/ag-grid-action-type.ts","../../../projects/ngssm-ag-grid/src/lib/actions/register-ag-grid-state.action.ts","../../../projects/ngssm-ag-grid/src/lib/actions/register-selected-rows.action.ts","../../../projects/ngssm-ag-grid/src/lib/actions/ag-grid.action.ts","../../../projects/ngssm-ag-grid/src/lib/state/ag-grid.state.ts","../../../projects/ngssm-ag-grid/src/lib/state/change-origin.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer.component.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer.component.html","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-actions-cell-renderer/ngssm-actions-cell-renderer-params.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid-config.ts","../../../projects/ngssm-ag-grid/src/lib/ngssm-ag-grid-options.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid-theme.directive.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-ag-grid.directive.ts","../../../projects/ngssm-ag-grid/src/lib/components/ngssm-base-cell-editor.ts","../../../projects/ngssm-ag-grid/src/lib/components/action-confirmation-popup/action-confirmation-popup.component.ts","../../../projects/ngssm-ag-grid/src/lib/components/action-confirmation-popup/action-confirmation-popup.component.html","../../../projects/ngssm-ag-grid/src/lib/helpers.ts","../../../projects/ngssm-ag-grid/src/lib/effects/local-storage.effect.ts","../../../projects/ngssm-ag-grid/src/lib/reducers/grid-states.reducer.ts","../../../projects/ngssm-ag-grid/src/lib/reducers/selected-rows.reducer.ts","../../../projects/ngssm-ag-grid/src/lib/provide-ngssm-ag-grid.ts","../../../projects/ngssm-ag-grid/src/public-api.ts","../../../projects/ngssm-ag-grid/src/ngssm-ag-grid.ts"],"sourcesContent":["export enum AgGridActionType {\n registerAgGridState = '[AgGridActionType] registerAgGridState',\n registerSelectedRows = '[AgGridActionType] registerSelectedRows',\n saveColumnsStateOnDisk = '[AgGridActionType] saveColumnsStateOnDisk',\n resetColumnsStateFromDisk = '[AgGridActionType] resetColumnsStateFromDisk'\n}\n","import { ColumnState, FilterModel } from 'ag-grid-community';\n\nimport { Action } from 'ngssm-store';\n\nimport { ChangeOrigin } from '../state';\nimport { AgGridActionType } from './ag-grid-action-type';\n\nexport class RegisterAgGridStateAction implements Action {\n public readonly type: string = AgGridActionType.registerAgGridState;\n\n constructor(\n public readonly gridId: string,\n public readonly origin: ChangeOrigin,\n public readonly columnStates: ColumnState[],\n public readonly filterModel: FilterModel | null\n ) {}\n}\n","import { Action } from 'ngssm-store';\nimport { ChangeOrigin } from '../state';\nimport { AgGridActionType } from './ag-grid-action-type';\n\nexport class RegisterSelectedRowsAction implements Action {\n public readonly type: string = AgGridActionType.registerSelectedRows;\n\n constructor(\n public readonly gridId: string,\n public readonly origin: ChangeOrigin,\n public readonly ids: string[]\n ) {}\n}\n","import { Action } from 'ngssm-store';\n\nexport class AgGridAction implements Action {\n constructor(\n public readonly type: string,\n public readonly gridId: string\n ) {}\n}\n","import update, { Spec } from 'immutability-helper';\n\nimport { NgSsmFeatureState, State } from 'ngssm-store';\nimport { GridState } from './grid-state';\nimport { SelectedRows } from './selected-rows';\n\nexport const selectAgGridState = (state: State): AgGridState => state[AgGridStateSpecification.featureStateKey] as AgGridState;\n\nexport const updateAgGridState = (state: State, command: Spec<AgGridState, never>): State =>\n update(state, {\n [AgGridStateSpecification.featureStateKey]: command\n });\n\nexport interface AgGridState {\n gridStates: Record<string, GridState>;\n selectedRows: Record<string, SelectedRows>;\n}\n\n@NgSsmFeatureState({\n featureStateKey: AgGridStateSpecification.featureStateKey,\n initialState: AgGridStateSpecification.initialState\n})\nexport class AgGridStateSpecification {\n public static readonly featureStateKey = 'ag-grid-state';\n public static readonly initialState: AgGridState = {\n gridStates: {},\n selectedRows: {}\n };\n}\n","export enum ChangeOrigin {\n agGrid = 'agGrid',\n other = 'other'\n}\n","/**\n * The `NgssmActionsCellRendererComponent` is a custom cell renderer for `ag-grid` that dynamically renders\n * action buttons within a grid cell. It provides flexibility in configuring button behavior, visibility, and state.\n *\n * ### Features:\n * - Dynamically generates action buttons based on the provided configuration.\n * - Supports reactive state management using Angular signals.\n * - Integrates with observables, functions, or signals for `isDisabled` and `isHidden` properties.\n * - Provides customizable tooltips and button styles.\n * - Executes custom actions when buttons are clicked.\n *\n * ### Usage:\n * To use this component, provide it as a cell renderer in your `ag-grid` column definition:\n *\n * ```typescript\n * columnDefs: [\n * {\n * headerName: 'Actions',\n * field: 'actions',\n * cellRenderer: NgssmActionsCellRendererComponent,\n * cellRendererParams: {\n * actions: [\n * {\n * cssClass: 'delete-button',\n * color: 'warn',\n * tooltip: 'Delete Item',\n * isDisabled: (params) => params.data.isLocked,\n * isHidden: (params) => !params.data.canDelete,\n * click: (params) => console.log('Delete action clicked', params)\n * }\n * ]\n * }\n * }\n * ];\n * ```\n *\n * ### Inputs:\n * - `NgssmActionsCellRendererParams`: Configuration object passed to the component via `cellRendererParams`.\n * - `actions`: Array of `ActionConfig` objects defining the buttons to render.\n *\n * ### Outputs:\n * None.\n *\n * ### Dependencies:\n * - Angular Material components: `MatIconButton`, `MatIcon`, `MatTooltip`.\n * - `ag-grid-angular` for integration with `ag-grid`.\n *\n * ### Example ActionConfig:\n * ```typescript\n * interface ActionConfig {\n * cssClass: string; // CSS class for the button.\n * color?: string; // Button color (e.g., 'primary', 'warn').\n * tooltip?: string; // Tooltip text for the button.\n * isDisabled?: boolean | Signal<boolean> | Observable<boolean> | ((params: ICellRendererParams) => boolean);\n * isHidden?: boolean | Signal<boolean> | Observable<boolean> | ((params: ICellRendererParams) => boolean);\n * click?: (params: ICellRendererParams) => void; // Action to execute on button click.\n * }\n * ```\n *\n * ### Methods:\n * - `agInit(params: ICellRendererParams)`: Initializes the component with the provided cell renderer parameters.\n * - `refresh(params: ICellRendererParams)`: Refreshes the component state when the grid updates.\n * - `executeAction(action: ActionButton)`: Executes the action associated with a button.\n *\n * ### Internal Logic:\n * - The `setupActions` method initializes the action buttons based on the provided configuration.\n * - The `setUpActionSignal` method handles the initialization of `isDisabled` and `isHidden` states for each button.\n * - The component uses Angular signals (`WritableSignal` and `Signal`) to manage the state of `isDisabled` and `isHidden`.\n * - Observables are converted to signals using `toSignal` for seamless integration with Angular's reactivity system.\n *\n * ### Change Detection:\n * - The component uses `ChangeDetectionStrategy.OnPush` for improved performance by minimizing unnecessary change detection cycles.\n *\n * ### Notes:\n * - Ensure that the `actions` array in `NgssmActionsCellRendererParams` is properly configured to avoid runtime errors.\n * - The component is designed to work with Angular Material and requires the relevant modules to be imported in your application.\n * - The `isDisabled` and `isHidden` properties can accept multiple input types (boolean, function, signal, or observable), providing flexibility in defining button behavior.\n */\n\nimport {\n Component,\n ChangeDetectionStrategy,\n signal,\n WritableSignal,\n Signal,\n inject,\n EnvironmentInjector,\n runInInjectionContext,\n isSignal\n} from '@angular/core';\nimport { CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';\nimport { MatIcon } from '@angular/material/icon';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { MatIconButton } from '@angular/material/button';\nimport { isObservable } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\nimport { ICellRendererAngularComp } from 'ag-grid-angular';\nimport { ICellRendererParams } from 'ag-grid-community';\n\nimport { NgssmComponentAction, NgssmComponentDisplayDirective } from 'ngssm-toolkit';\n\nimport { NgssmActionsCellRendererParams } from './ngssm-actions-cell-renderer-params';\nimport { ActionConfig, ActionDisabledFunc, ActionHiddenFunc, ActionPopupComponent } from './action-config';\n\ninterface ActionButton {\n cssClass: string;\n color: string;\n\n isDisabled: WritableSignal<boolean> | Signal<boolean>;\n isHidden: WritableSignal<boolean> | Signal<boolean>;\n\n isDisabledInputAFunction: boolean;\n isHiddenInputAFunction: boolean;\n\n actionConfig: ActionConfig;\n\n tooltip: string;\n\n popupRendered: WritableSignal<boolean>;\n popupAction?: NgssmComponentAction;\n}\n\n@Component({\n selector: 'ngssm-actions-cell-renderer',\n imports: [MatIconButton, MatIcon, MatTooltip, CdkOverlayOrigin, CdkConnectedOverlay, NgssmComponentDisplayDirective],\n templateUrl: './ngssm-actions-cell-renderer.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class NgssmActionsCellRendererComponent implements ICellRendererAngularComp {\n private environmentInjector = inject(EnvironmentInjector);\n private cellParams: ICellRendererParams | undefined;\n\n public readonly actionButtons = signal<ActionButton[]>([]);\n\n public agInit(params: ICellRendererParams): void {\n this.cellParams = params;\n this.setupActions(params as unknown as NgssmActionsCellRendererParams);\n }\n\n public refresh(params: ICellRendererParams): boolean {\n this.cellParams = params;\n this.actionButtons().forEach((a) => {\n if (a.isDisabledInputAFunction) {\n (a.isDisabled as WritableSignal<boolean>).set((a.actionConfig.isDisabled as ActionDisabledFunc)(params));\n }\n\n if (a.isHiddenInputAFunction) {\n (a.isHidden as WritableSignal<boolean>).set((a.actionConfig.isHidden as ActionHiddenFunc)(params));\n }\n });\n return true;\n }\n\n public executeAction(action: ActionButton): void {\n const params = this.cellParams;\n if (params) {\n action.actionConfig.click?.(params);\n }\n }\n\n private setupActions(rendererParams: NgssmActionsCellRendererParams): void {\n runInInjectionContext(this.environmentInjector, () => {\n const actionButtons: ActionButton[] = (rendererParams?.actions ?? []).map((a) => {\n const actionButton: ActionButton = {\n cssClass: a.cssClass,\n color: a.color ?? 'primary',\n isDisabled: signal(false),\n isDisabledInputAFunction: false,\n isHidden: signal(false),\n isHiddenInputAFunction: false,\n actionConfig: a,\n tooltip: a.tooltip ?? '',\n popupRendered: signal(false)\n };\n\n if (a.popupComponent) {\n actionButton.popupAction = ((component: ActionPopupComponent) =>\n this.setupPopupComponent(component, actionButton)) as NgssmComponentAction;\n }\n\n this.setUpActionSignal(actionButton, a, rendererParams, 'isDisabled');\n this.setUpActionSignal(actionButton, a, rendererParams, 'isHidden');\n\n return actionButton;\n });\n\n this.actionButtons.set(actionButtons);\n });\n }\n\n private setUpActionSignal(\n actionButton: ActionButton,\n config: ActionConfig,\n rendererParams: NgssmActionsCellRendererParams,\n signalName: 'isDisabled' | 'isHidden'\n ): void {\n const input = config[signalName];\n\n if (isSignal(input)) {\n actionButton[signalName] = input as Signal<boolean>;\n } else if (input instanceof Function) {\n (actionButton[signalName] as WritableSignal<boolean>).set(input(rendererParams as unknown as ICellRendererParams));\n actionButton[`${signalName}InputAFunction`] = true;\n } else if (isObservable(input)) {\n actionButton[signalName] = toSignal(input, { initialValue: false });\n }\n }\n\n private setupPopupComponent(component: ActionPopupComponent, action: ActionButton): void {\n component?.init?.(action.popupRendered, this.cellParams as unknown as ICellRendererParams, action.actionConfig.popupParameter);\n }\n}\n","<div class=\"ngssm-actions-cell\">\n @for (actionButton of actionButtons(); track actionButton; let idx = $index) {\n @if (!actionButton.isHidden()) {\n @if (actionButton.actionConfig.popupComponent) {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n [matTooltip]=\"actionButton.tooltip\"\n cdkOverlayOrigin\n #trigger=\"cdkOverlayOrigin\"\n (click)=\"actionButton.popupRendered.set(true)\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"actionButton.popupRendered()\">\n <div [ngssmComponentDisplay]=\"actionButton.actionConfig.popupComponent\" [ngssmComponentAction]=\"actionButton.popupAction\"></div>\n </ng-template>\n } @else {\n <button\n mat-icon-button\n class=\"ngssm-actions-cell-button\"\n [color]=\"actionButton.color\"\n id=\"action_{{ idx }}\"\n [disabled]=\"actionButton.isDisabled()\"\n (click)=\"executeAction(actionButton)\"\n [matTooltip]=\"actionButton.tooltip\">\n <mat-icon [class]=\"actionButton.cssClass\"></mat-icon>\n </button>\n }\n }\n }\n</div>\n","import { ColDef } from 'ag-grid-community';\n\nimport { ActionConfig } from './action-config';\nimport { NgssmActionsCellRendererComponent } from './ngssm-actions-cell-renderer.component';\n\n// Parameters of the actions cell renderer\n// For now, an action is rendered as a mat-icon-button with the class passed in ActionConfig\nexport interface NgssmActionsCellRendererParams<TData = unknown, TValue = unknown> {\n actions: ActionConfig<TData, TValue>[];\n}\n\nexport const getNgssmActionsCellColDef = <TData = unknown, TValue = unknown>(\n params: NgssmActionsCellRendererParams<TData, TValue>\n): Partial<ColDef> => ({\n cellRenderer: NgssmActionsCellRendererComponent,\n cellRendererParams: params\n});\n","import { AgPublicEventType, GetContextMenuItems } from 'ag-grid-community';\n\n/**\n * List of default ag-grid events listened by the directive to update the stored state.\n */\nexport const defaultAgGridColumnsEvents: AgPublicEventType[] = [\n 'sortChanged',\n 'filterChanged',\n 'columnPinned',\n 'columnResized',\n 'displayedColumnsChanged',\n 'filterChanged'\n];\n\n/**\n * Configuration parameters of the {@link NgssmAgGridDirective} directive to apply on a\n * {@link https://www.ag-grid.com/ ag-grid instance}\n */\nexport interface NgssmAgGridConfig {\n /**\n * Unique identifier of the grid on which the directive is applied\n */\n gridId: string;\n\n /**\n * If true, the selected rows are stored in the state and restored when the directive is created.\n */\n keepSelection?: boolean;\n\n /**\n * If true, context menus are added to the grid to save the columns state into the local storage\n * and to restore from the local storage.\n *\n * @remarks\n *\n * this functionnality is only available for enterprise version of {@link https://www.ag-grid.com/}.\n */\n canSaveOnDiskColumnsState?: boolean;\n\n /**\n * Used to override default context menu items.\n */\n getContextMenuItems?: GetContextMenuItems;\n\n /**\n * Defines the list of ag-grid events listened to by the directive to update the state of stored columns.\n * By default: defaultAgGridColumnsEvents\n */\n listenedColumnsEvents?: AgPublicEventType[];\n}\n","import { InjectionToken } from '@angular/core';\nimport { ColDef, StatusPanelDef } from 'ag-grid-community';\n\n/**\n * Configuration options for NgssmAgGrid.\n * - theme: The CSS theme to use for the grid.\n * - statusBar: Optional status bar configuration for AG Grid.\n * - defaultColDef: Optional default column definition for all columns.\n * - loadSavedGridStatesAtStartup: If true, grid states saved in local storage are loaded during app initialization.\n */\nexport class NgssmAgGridOptions {\n theme = 'ag-theme-material';\n statusBar:\n | {\n statusPanels: StatusPanelDef[];\n }\n | undefined = undefined;\n defaultColDef: ColDef | undefined = undefined;\n loadSavedGridStatesAtStartup?: boolean = undefined;\n}\n\n/**\n * Injection token for providing NgssmAgGridOptions in Angular DI.\n *\n * Provide options through the provideNgssmAgGrid function instead of using this token.\n */\nexport const NGSSM_AG_GRID_OPTIONS = new InjectionToken<NgssmAgGridOptions>('NGSSM_AG_GRID_OPTIONS');\n","import { Directive, HostBinding, inject } from '@angular/core';\n\nimport { AgGridAngular } from 'ag-grid-angular';\n\nimport { NgssmAgGridOptions, NGSSM_AG_GRID_OPTIONS } from '../ngssm-ag-grid-options';\n\n@Directive({\n selector: '[ngssmAgGridTheme]',\n standalone: true\n})\nexport class NgssmAgGridThemeDirective {\n private readonly options: NgssmAgGridOptions | null = inject(NGSSM_AG_GRID_OPTIONS, { optional: true });\n private agGridAngular = inject(AgGridAngular);\n\n @HostBinding('class') className = '';\n\n constructor() {\n this.className = (this.options ?? new NgssmAgGridOptions()).theme;\n if (this.agGridAngular.statusBar === undefined) {\n this.agGridAngular.statusBar = this.options?.statusBar;\n }\n\n if (this.agGridAngular.defaultColDef === undefined) {\n this.agGridAngular.defaultColDef = this.options?.defaultColDef;\n }\n }\n}\n","import { Directive, inject, signal, input, effect, runInInjectionContext, Injector } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { take } from 'rxjs';\n\nimport { AgGridAngular } from 'ag-grid-angular';\nimport { DefaultMenuItem, GetContextMenuItemsParams, MenuItemDef } from 'ag-grid-community';\n\nimport { createSignal, Logger, Store } from 'ngssm-store';\n\nimport { AgGridAction, AgGridActionType, RegisterAgGridStateAction, RegisterSelectedRowsAction } from '../actions';\nimport { ChangeOrigin, selectAgGridState } from '../state';\nimport { defaultAgGridColumnsEvents, NgssmAgGridConfig } from './ngssm-ag-grid-config';\n\n@Directive({\n selector: '[ngssmAgGrid]'\n})\nexport class NgssmAgGridDirective {\n private readonly logger = inject(Logger);\n private readonly store = inject(Store);\n private readonly agGridAngular = inject(AgGridAngular);\n private readonly injector = inject(Injector);\n\n private readonly gridInitialized = signal(false);\n private readonly gridStates = createSignal((state) => selectAgGridState(state).gridStates);\n private readonly selectedRows = createSignal((state) => selectAgGridState(state).selectedRows);\n\n public readonly config = input.required<NgssmAgGridConfig, string | NgssmAgGridConfig>({\n alias: 'ngssmAgGrid',\n transform: (v) => {\n if (typeof v === 'string') {\n return {\n gridId: v as string\n };\n }\n\n const conf = v as NgssmAgGridConfig;\n return {\n ...conf\n };\n }\n });\n\n constructor() {\n // Setup gridInintialized signal\n this.agGridAngular.gridReady.pipe(take(1)).subscribe(() => this.gridInitialized.set(true));\n\n // Apply registered grid setup is any and start listening to ag-grid events\n const effectRef = effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n this.logger.information(`[NgssmAgGridDirective] Initialization for '${this.config().gridId}' in progress`);\n\n const gridState = this.gridStates()[this.config().gridId];\n if (gridState) {\n this.agGridAngular.api.applyColumnState({\n state: gridState.columnsState,\n applyOrder: true\n });\n this.agGridAngular.api.setFilterModel(gridState.filterModel);\n }\n\n if (this.config().keepSelection) {\n const selection = this.selectedRows()[this.config().gridId];\n if (selection) {\n const ids = selection.ids ?? [];\n this.agGridAngular.api.forEachNode((node) => {\n if (node.id) {\n node.setSelected(ids.includes(node.id));\n }\n });\n }\n }\n\n runInInjectionContext(this.injector, () => this.initSateChangeListener());\n\n effectRef.destroy();\n\n this.logger.information(`[NgssmAgGridDirective] Initialization for '${this.config().gridId}' done`);\n });\n\n // process changes in columns when not comming from ui\n effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n const gridState = this.gridStates()[this.config().gridId];\n if (gridState?.origin === ChangeOrigin.other) {\n this.agGridAngular.api.applyColumnState({\n state: gridState.columnsState,\n applyOrder: true\n });\n this.agGridAngular.api.setFilterModel(gridState.filterModel);\n }\n });\n\n // process changes in selection when not comming from ui\n effect(() => {\n if (!this.gridInitialized()) {\n return;\n }\n\n if (this.config().keepSelection !== true) {\n return;\n }\n\n const selection = this.selectedRows()[this.config().gridId];\n if (!selection || selection.origin !== ChangeOrigin.other) {\n return;\n }\n\n const ids = selection.ids ?? [];\n this.agGridAngular.api.forEachNode((node) => {\n if (node.id) {\n node.setSelected(ids.includes(node.id));\n }\n });\n });\n\n this.agGridAngular.getContextMenuItems = (params) => this.getContextMenuItems(params);\n }\n\n private initSateChangeListener(): void {\n (this.config().listenedColumnsEvents ?? defaultAgGridColumnsEvents).forEach((eventType) => {\n this.agGridAngular.api.addEventListener(eventType, () => this.saveGridState());\n });\n\n this.agGridAngular.rowSelected.pipe(takeUntilDestroyed()).subscribe(() => this.processSelectionChanged());\n }\n\n private saveGridState(): void {\n const state = this.agGridAngular.api.getColumnState();\n const filterModel = this.agGridAngular.api.getFilterModel();\n this.store.dispatchAction(new RegisterAgGridStateAction(this.config().gridId, ChangeOrigin.agGrid, state, filterModel));\n }\n\n private processSelectionChanged(): void {\n if (this.config().keepSelection !== true) {\n return;\n }\n\n const selectedRows = this.agGridAngular.api\n .getSelectedNodes()\n .map((n) => n.id ?? '')\n .filter((n) => n !== '');\n\n this.store.dispatchAction(new RegisterSelectedRowsAction(this.config().gridId, ChangeOrigin.agGrid, selectedRows));\n }\n\n private getContextMenuItems(params: GetContextMenuItemsParams): (DefaultMenuItem | MenuItemDef)[] {\n this.logger.information('[NgssmAgGridDirective] Generating the context menu...');\n const menuItems: (DefaultMenuItem | MenuItemDef)[] = [];\n const getContextMenuItems = this.config().getContextMenuItems;\n if (getContextMenuItems) {\n menuItems.push(...(getContextMenuItems(params) as (DefaultMenuItem | MenuItemDef)[]));\n } else {\n menuItems.push(...(params.defaultItems ?? []));\n }\n\n if (this.config().canSaveOnDiskColumnsState === true) {\n const gridId = this.config().gridId;\n menuItems.push(\n ...[\n 'separator' as DefaultMenuItem,\n {\n name: 'Save columns state',\n action: () => this.store.dispatchAction(new AgGridAction(AgGridActionType.saveColumnsStateOnDisk, gridId)),\n icon: '<i class=\"fa-regular fa-floppy-disk\"></i>'\n },\n {\n name: 'Restore columns state',\n action: () => this.store.dispatchAction(new AgGridAction(AgGridActionType.resetColumnsStateFromDisk, gridId)),\n icon: '<i class=\"fa-solid fa-rotate-right\"></i>'\n },\n {\n name: 'Reset columns state to default',\n action: () => {\n this.agGridAngular.api.resetColumnState();\n this.agGridAngular.api.setFilterModel(null);\n },\n icon: '<i class=\"fa-solid fa-clock-rotate-left\"></i>'\n }\n ]\n );\n }\n return menuItems;\n }\n}\n","import { ICellEditorAngularComp } from 'ag-grid-angular';\nimport { ICellEditorParams } from 'ag-grid-community';\n\nexport abstract class NgssmBaseCellEditor implements ICellEditorAngularComp {\n protected params?: ICellEditorParams;\n\n public agInit(params: ICellEditorParams): void {\n this.params = params;\n }\n\n public getValue() {\n return '';\n }\n\n public isPopup(): boolean {\n return true;\n }\n\n public getPopupPosition(): 'over' | 'under' | undefined {\n return 'over';\n }\n\n public isCancelAfterEnd(): boolean {\n return true;\n }\n\n public cancel(): void {\n this.params?.stopEditing();\n }\n}\n","import { ChangeDetectionStrategy, Component, signal, WritableSignal } from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatCard, MatCardActions, MatCardTitle, MatCardHeader } from '@angular/material/card';\nimport { ICellRendererParams } from 'ag-grid-community';\n\nimport { ActionConfirmationPopupParameter } from './action-confirmation-popup-parameter';\nimport { ActionPopupComponent } from '../ngssm-actions-cell-renderer';\n\n/**\n * The `ActionConfirmationPopupComponent` is a reusable confirmation popup component designed to work with `ag-grid`.\n * It provides a customizable confirmation dialog for user actions, allowing developers to define messages, button labels,\n * and actions dynamically.\n *\n * ### Features:\n * - Displays a confirmation popup with customizable message, button labels, and color.\n * - Integrates with the `ActionPopupComponent` interface for seamless use with `NgssmActionsCellRendererComponent`.\n * - Uses Angular signals for efficient state management.\n * - Supports dynamic initialization with parameters provided by `ag-grid`.\n * - Provides methods to handle user actions (confirm or cancel) and close the popup.\n *\n * ### Usage:\n * This component is typically used as a popup in conjunction with the `NgssmActionsCellRendererComponent`.\n * To configure it, pass an `ActionConfirmationPopupParameter` object when initializing the popup.\n *\n * Example:\n * ```typescript\n * const popupParameter: ActionConfirmationPopupParameter = {\n * messageBuilder: (params) => `Are you sure you want to delete ${params.data.name}?`,\n * color: 'warn',\n * cancelButtonLabel: 'No',\n * confirmButtonLabel: 'Yes',\n * confirmAction: (params) => console.log('Confirmed action for:', params.data)\n * };\n * ```\n *\n * ### Inputs:\n * - `popupRendered`: A writable signal indicating whether the popup is currently rendered.\n * - `params`: The cell renderer parameters provided by `ag-grid`.\n * - `popupParameter`: An object of type `ActionConfirmationPopupParameter` that defines the popup's behavior and content.\n *\n * ### Outputs:\n * None.\n *\n * ### Dependencies:\n * - Angular Material components: `MatCard`, `MatButton`.\n * - `ag-grid-community` for integration with `ag-grid`.\n *\n * ### Methods:\n * - `init(popupRendered, params, popupParameter)`: Initializes the popup with the provided parameters.\n * - `popupRendered`: A writable signal to track the popup's visibility.\n * - `params`: The cell renderer parameters from `ag-grid`.\n * - `popupParameter`: The configuration object for the popup.\n *\n * - `closePopup()`: Closes the popup by setting the `isOpen` signal to `false`.\n *\n * - `executeAction()`: Executes the confirmation action defined in the `popupParameter` and closes the popup.\n *\n * ### Signals:\n * - `message`: The message displayed in the popup.\n * - `cancelButtonLabel`: The label for the cancel button.\n * - `confirmButtonLabel`: The label for the confirm button.\n * - `color`: The color theme for the confirm button (e.g., 'primary', 'warn').\n * - `isOpen`: Tracks whether the popup is currently open.\n *\n * ### Example Initialization:\n * ```typescript\n * const popup = new ActionConfirmationPopupComponent();\n * popup.init(\n * popupRenderedSignal,\n * cellRendererParams,\n * {\n * messageBuilder: (params) => `Are you sure you want to delete ${params.data.name}?`,\n * color: 'warn',\n * cancelButtonLabel: 'No',\n * confirmButtonLabel: 'Yes',\n * confirmAction: (params) => console.log('Confirmed action for:', params.data)\n * }\n * );\n * ```\n *\n * ### Notes:\n * - Ensure that the `popupParameter` object is properly configured to avoid runtime errors.\n * - The `messageBuilder` function in `popupParameter` allows dynamic message generation based on the `params` object.\n * - The component uses `ChangeDetectionStrategy.OnPush` for performance optimization.\n * - The `isOpen` signal can be used to programmatically control the popup's visibility.\n */\n@Component({\n selector: 'ngssm-action-confirmation-popup',\n imports: [MatCard, MatCardHeader, MatCardTitle, MatCardActions, MatButton],\n templateUrl: './action-confirmation-popup.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ActionConfirmationPopupComponent implements ActionPopupComponent<unknown, unknown, ActionConfirmationPopupParameter> {\n private params?: ICellRendererParams;\n private popupParameter?: ActionConfirmationPopupParameter;\n public readonly message = signal<string>('No message');\n public readonly cancelButtonLabel = signal<string>('No');\n public readonly confirmButtonLabel = signal<string>('Yes');\n public readonly color = signal<string>('primary');\n\n public isOpen = signal<boolean>(false);\n\n public init(\n popupRendered: WritableSignal<boolean>,\n params?: ICellRendererParams<unknown, unknown>,\n popupParameter?: ActionConfirmationPopupParameter\n ): void {\n this.params = params;\n this.popupParameter = popupParameter;\n\n this.message.set(popupParameter?.messageBuilder?.(params) ?? 'No message');\n this.color.set(popupParameter?.color ?? 'primary');\n this.cancelButtonLabel.set(popupParameter?.cancelButtonLabel ?? 'Cancel');\n this.confirmButtonLabel.set(popupParameter?.confirmButtonLabel ?? 'Confirm');\n\n this.isOpen = popupRendered;\n }\n\n public closePopup(): void {\n this.isOpen.set(false);\n }\n\n public executeAction(): void {\n this.popupParameter?.confirmAction?.(this.params);\n this.closePopup();\n }\n}\n","<mat-card class=\"fxFlex flex-column-stretch\">\n <mat-card-header>\n <mat-card-title>{{ message() }}</mat-card-title>\n </mat-card-header>\n <mat-card-actions class=\"flex-row-center\">\n <span class=\"fxFlex\"></span>\n <button mat-button (click)=\"closePopup()\">{{ cancelButtonLabel() }}</button>\n <button mat-raised-button [color]=\"color()\" (click)=\"executeAction()\">{{ confirmButtonLabel() }}</button>\n </mat-card-actions>\n</mat-card>\n","import { ColDef } from 'ag-grid-community';\n\nexport const getColDefWithNoPadding = (): Partial<ColDef> => ({\n cellClass: ['cell-with-no-padding']\n});\n\nexport const getColDefForEditableColumn = (): Partial<ColDef> => ({\n editable: true,\n headerClass: 'ngssm-ag-editable-cell',\n valueSetter: () => false\n});\n","import { inject, Injectable } from '@angular/core';\n\nimport { Effect, State, Action, Logger, ActionDispatcher } from 'ngssm-store';\n\nimport { AgGridAction, AgGridActionType, RegisterAgGridStateAction } from '../actions';\nimport { ChangeOrigin, selectAgGridState } from '../state';\n\n@Injectable()\nexport class LocalStorageEffect implements Effect {\n private readonly logger = inject(Logger);\n\n public readonly processedActions: string[] = [AgGridActionType.saveColumnsStateOnDisk, AgGridActionType.resetColumnsStateFromDisk];\n\n public processAction(actiondispatcher: ActionDispatcher, state: State, action: Action): void {\n const agGridAction = action as AgGridAction;\n\n switch (action.type) {\n case AgGridActionType.saveColumnsStateOnDisk: {\n const gridState = selectAgGridState(state).gridStates[agGridAction.gridId];\n if (gridState) {\n localStorage.setItem(this.getColumnsStateLocalStorageKey(agGridAction.gridId), JSON.stringify(gridState.columnsState));\n if (gridState.filterModel) {\n localStorage.setItem(this.getFilterModelLocalStorageKey(agGridAction.gridId), JSON.stringify(gridState.filterModel));\n }\n }\n\n break;\n }\n\n case AgGridActionType.resetColumnsStateFromDisk: {\n const stored = localStorage.getItem(this.getColumnsStateLocalStorageKey(agGridAction.gridId));\n const filterModelStored = localStorage.getItem(this.getFilterModelLocalStorageKey(agGridAction.gridId));\n console.log(stored, filterModelStored);\n if (stored) {\n try {\n const columnsState = JSON.parse(stored);\n if (Array.isArray(columnsState)) {\n const action = new RegisterAgGridStateAction(\n agGridAction.gridId,\n ChangeOrigin.other,\n columnsState,\n filterModelStored ? JSON.parse(filterModelStored) : null\n );\n actiondispatcher.dispatchAction(action);\n } else {\n this.logger.error(`Wrong columns state config for grid '${agGridAction.gridId}'`, stored);\n }\n } catch (error) {\n this.logger.error(`Unable to load config for grid '${agGridAction.gridId}'`, error);\n }\n }\n\n break;\n }\n }\n }\n\n private getColumnsStateLocalStorageKey(gridId: string): string {\n return `ngssm-ag-grid_${gridId}`;\n }\n\n private getFilterModelLocalStorageKey(gridId: string): string {\n return `ngssm-ag-grid_filters_${gridId}`;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport { AgGridActionType, RegisterAgGridStateAction } from '../actions';\nimport { updateAgGridState } from '../state';\n\n@Injectable()\nexport class GridStatesReducer implements Reducer {\n public readonly processedActions: string[] = [AgGridActionType.registerAgGridState];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case AgGridActionType.registerAgGridState: {\n const registerAgGridStateAction = action as RegisterAgGridStateAction;\n return updateAgGridState(state, {\n gridStates: {\n [registerAgGridStateAction.gridId]: {\n $set: {\n origin: registerAgGridStateAction.origin,\n columnsState: registerAgGridStateAction.columnStates,\n filterModel: registerAgGridStateAction.filterModel\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { Reducer, State, Action } from 'ngssm-store';\n\nimport { AgGridActionType, RegisterSelectedRowsAction } from '../actions';\nimport { updateAgGridState } from '../state';\n\n@Injectable()\nexport class SelectedRowsReducer implements Reducer {\n public readonly processedActions: string[] = [AgGridActionType.registerSelectedRows];\n\n public updateState(state: State, action: Action): State {\n switch (action.type) {\n case AgGridActionType.registerSelectedRows: {\n const registerSelectedRowsAction = action as RegisterSelectedRowsAction;\n return updateAgGridState(state, {\n selectedRows: {\n [registerSelectedRowsAction.gridId]: {\n $set: {\n origin: registerSelectedRowsAction.origin,\n ids: registerSelectedRowsAction.ids\n }\n }\n }\n });\n }\n }\n\n return state;\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders, inject, provideAppInitializer } from '@angular/core';\n\nimport { Logger, provideEffect, provideReducers, Store } from 'ngssm-store';\n\nimport { LocalStorageEffect } from './effects/local-storage.effect';\nimport { GridStatesReducer } from './reducers/grid-states.reducer';\nimport { SelectedRowsReducer } from './reducers/selected-rows.reducer';\nimport { NGSSM_AG_GRID_OPTIONS, NgssmAgGridOptions } from './ngssm-ag-grid-options';\nimport { AgGridAction, AgGridActionType } from './actions';\n\n/**\n * Loads saved grid states from localStorage at application startup if enabled in options.\n * Dispatches actions to restore grid state for each matching key.\n */\nexport const loadGridStates = () => {\n const logger = inject(Logger);\n const options = inject(NGSSM_AG_GRID_OPTIONS, { optional: true });\n if (!options?.loadSavedGridStatesAtStartup) {\n logger.information('[ag-grid] No grid state must be loaded at startup.');\n return;\n }\n\n const store = inject(Store);\n const wantedPrefix = 'ngssm-ag-grid_';\n for (let i = 0; i < localStorage.length; i++) {\n const key = localStorage.key(i);\n if (key?.startsWith(wantedPrefix)) {\n const gridId = key.slice(wantedPrefix.length);\n logger.information(`[ag-grid] Restoring '${gridId}'.`);\n store.dispatchAction(new AgGridAction(AgGridActionType.resetColumnsStateFromDisk, gridId));\n }\n }\n};\n\n/**\n * Provides all necessary providers for NgssmAgGrid, including reducers, effects, options, and grid state loading.\n * @param options Optional configuration for the grid.\n * @returns EnvironmentProviders for NgssmAgGrid.\n */\nexport const provideNgssmAgGrid = (options?: NgssmAgGridOptions): EnvironmentProviders => {\n return makeEnvironmentProviders([\n provideAppInitializer(loadGridStates),\n {\n provide: NGSSM_AG_GRID_OPTIONS,\n useValue: options ?? null\n },\n provideReducers(GridStatesReducer, SelectedRowsReducer),\n provideEffect(LocalStorageEffect)\n ]);\n};\n","/*\n * Public API Surface of ngssm-ag-grid\n */\n\nexport * from './lib/actions';\nexport * from './lib/state';\nexport * from './lib/components';\nexport * from './lib/ngssm-ag-grid-options';\nexport * from './lib/helpers';\nexport * from './lib/provide-ngssm-ag-grid';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,qBAAA,CAAA,GAAA,wCAA8D;AAC9D,IAAA,gBAAA,CAAA,sBAAA,CAAA,GAAA,yCAAgE;AAChE,IAAA,gBAAA,CAAA,wBAAA,CAAA,GAAA,2CAAoE;AACpE,IAAA,gBAAA,CAAA,2BAAA,CAAA,GAAA,8CAA0E;AAC5E,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;;MCOf,yBAAyB,CAAA;AAGpC,IAAA,WAAA,CACkB,MAAc,EACd,MAAoB,EACpB,YAA2B,EAC3B,WAA+B,EAAA;QAH/B,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,WAAW,GAAX,WAAW;AANb,QAAA,IAAA,CAAA,IAAI,GAAW,gBAAgB,CAAC,mBAAmB;;AAQpE;;MCZY,0BAA0B,CAAA;AAGrC,IAAA,WAAA,CACkB,MAAc,EACd,MAAoB,EACpB,GAAa,EAAA;QAFb,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,GAAG,GAAH,GAAG;AALL,QAAA,IAAA,CAAA,IAAI,GAAW,gBAAgB,CAAC,oBAAoB;;AAOrE;;MCVY,YAAY,CAAA;IACvB,WAAA,CACkB,IAAY,EACZ,MAAc,EAAA;QADd,IAAA,CAAA,IAAI,GAAJ,IAAI;QACJ,IAAA,CAAA,MAAM,GAAN,MAAM;;AAEzB;;ACDM,MAAM,iBAA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AAC;AACjE,IAAA,IAAI,CAAC,OAAO,EAAE,4BAA4B,EAAE;AAC1C,QAAA,MAAM,CAAC,WAAW,CAAC,oDAAoD,CAAC;QACxE;;AAGF,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC3B,MAAM,YAAY,GAAG,gBAAgB;AACrC,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAC5C,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/B,QAAA,IAAI,GAAG,EAAE,UAAU,CAAC,YAAY,CAAC,EAAE;YACjC,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC;AAC7C,YAAA,MAAM,CAAC,WAAW,CAAC,wBAAwB,MAAM,CAAA,EAAA,CAAI,CAAC;AACtD,YAAA,KAAK,CAAC,cAAc,CAAC,IAAI,YAAY,CAAC,gBAAgB,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;;;AAGhG;AAEA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG,CAAC,OAA4B,KAA0B;AACvF,IAAA,OAAO,wBAAwB,CAAC;QAC9B,qBAAqB,CAAC,cAAc,CAAC;AACrC,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,OAAO,IAAI;AACtB,SAAA;AACD,QAAA,eAAe,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;QACvD,aAAa,CAAC,kBAAkB;AACjC,KAAA,CAAC;AACJ;;ACjDA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -465,19 +465,42 @@ declare class ActionConfirmationPopupComponent implements ActionPopupComponent<u
|
|
|
465
465
|
static ɵcmp: i0.ɵɵComponentDeclaration<ActionConfirmationPopupComponent, "ngssm-action-confirmation-popup", never, {}, {}, never, never, true, never>;
|
|
466
466
|
}
|
|
467
467
|
|
|
468
|
+
/**
|
|
469
|
+
* Configuration options for NgssmAgGrid.
|
|
470
|
+
* - theme: The CSS theme to use for the grid.
|
|
471
|
+
* - statusBar: Optional status bar configuration for AG Grid.
|
|
472
|
+
* - defaultColDef: Optional default column definition for all columns.
|
|
473
|
+
* - loadSavedGridStatesAtStartup: If true, grid states saved in local storage are loaded during app initialization.
|
|
474
|
+
*/
|
|
468
475
|
declare class NgssmAgGridOptions {
|
|
469
476
|
theme: string;
|
|
470
477
|
statusBar: {
|
|
471
478
|
statusPanels: StatusPanelDef[];
|
|
472
479
|
} | undefined;
|
|
473
480
|
defaultColDef: ColDef | undefined;
|
|
481
|
+
loadSavedGridStatesAtStartup?: boolean;
|
|
474
482
|
}
|
|
483
|
+
/**
|
|
484
|
+
* Injection token for providing NgssmAgGridOptions in Angular DI.
|
|
485
|
+
*
|
|
486
|
+
* Provide options through the provideNgssmAgGrid function instead of using this token.
|
|
487
|
+
*/
|
|
475
488
|
declare const NGSSM_AG_GRID_OPTIONS: InjectionToken<NgssmAgGridOptions>;
|
|
476
489
|
|
|
477
490
|
declare const getColDefWithNoPadding: () => Partial<ColDef>;
|
|
478
491
|
declare const getColDefForEditableColumn: () => Partial<ColDef>;
|
|
479
492
|
|
|
480
|
-
|
|
493
|
+
/**
|
|
494
|
+
* Loads saved grid states from localStorage at application startup if enabled in options.
|
|
495
|
+
* Dispatches actions to restore grid state for each matching key.
|
|
496
|
+
*/
|
|
497
|
+
declare const loadGridStates: () => void;
|
|
498
|
+
/**
|
|
499
|
+
* Provides all necessary providers for NgssmAgGrid, including reducers, effects, options, and grid state loading.
|
|
500
|
+
* @param options Optional configuration for the grid.
|
|
501
|
+
* @returns EnvironmentProviders for NgssmAgGrid.
|
|
502
|
+
*/
|
|
503
|
+
declare const provideNgssmAgGrid: (options?: NgssmAgGridOptions) => EnvironmentProviders;
|
|
481
504
|
|
|
482
|
-
export { ActionConfirmationPopupComponent, AgGridAction, AgGridActionType, AgGridStateSpecification, ChangeOrigin, NGSSM_AG_GRID_OPTIONS, NgssmActionsCellRendererComponent, NgssmAgGridDirective, NgssmAgGridOptions, NgssmAgGridThemeDirective, NgssmBaseCellEditor, RegisterAgGridStateAction, RegisterSelectedRowsAction, defaultAgGridColumnsEvents, getColDefForEditableColumn, getColDefWithNoPadding, getNgssmActionsCellColDef, provideNgssmAgGrid, selectAgGridState, updateAgGridState };
|
|
505
|
+
export { ActionConfirmationPopupComponent, AgGridAction, AgGridActionType, AgGridStateSpecification, ChangeOrigin, NGSSM_AG_GRID_OPTIONS, NgssmActionsCellRendererComponent, NgssmAgGridDirective, NgssmAgGridOptions, NgssmAgGridThemeDirective, NgssmBaseCellEditor, RegisterAgGridStateAction, RegisterSelectedRowsAction, defaultAgGridColumnsEvents, getColDefForEditableColumn, getColDefWithNoPadding, getNgssmActionsCellColDef, loadGridStates, provideNgssmAgGrid, selectAgGridState, updateAgGridState };
|
|
483
506
|
export type { ActionConfig, ActionConfirmationPopupParameter, ActionDisabledFunc, ActionHiddenFunc, ActionPopupComponent, AgGridState, GridState, NgssmActionsCellRendererParams, NgssmAgGridConfig, SelectedRows };
|