ngx-eiffage-material 0.0.12 → 0.0.14
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/ngx-eiffage-material.mjs +271 -45
- package/fesm2022/ngx-eiffage-material.mjs.map +1 -1
- package/index.d.ts +155 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, Component, Injectable, inject, output, computed, viewChild, effect, ChangeDetectorRef, signal, untracked, forwardRef, afterRenderEffect, ViewEncapsulation } from '@angular/core';
|
|
2
|
+
import { input, Component, Injectable, inject, output, computed, viewChild, effect, ChangeDetectorRef, signal, untracked, forwardRef, afterRenderEffect, ViewEncapsulation, ViewContainerRef, Directive } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/material/button';
|
|
4
4
|
import { MatButtonModule } from '@angular/material/button';
|
|
5
5
|
import * as i4 from '@angular/material/icon';
|
|
@@ -39,6 +39,7 @@ import * as i2$3 from '@angular/material/divider';
|
|
|
39
39
|
import { MatDividerModule } from '@angular/material/divider';
|
|
40
40
|
import * as i9 from '@angular/material/list';
|
|
41
41
|
import { MatListModule } from '@angular/material/list';
|
|
42
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog } from '@angular/material/dialog';
|
|
42
43
|
|
|
43
44
|
class NgxLoadingButton {
|
|
44
45
|
isLoading = input.required(...(ngDevMode ? [{ debugName: "isLoading" }] : [])); //Indica si el botón está cargando
|
|
@@ -50,17 +51,17 @@ class NgxLoadingButton {
|
|
|
50
51
|
spinnerStrokeWidth = input(3, ...(ngDevMode ? [{ debugName: "spinnerStrokeWidth" }] : [])); //StrokeWidth del spinner de carga
|
|
51
52
|
//Por defecto es Primary
|
|
52
53
|
color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : [])); //Color del botón
|
|
53
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
54
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxLoadingButton, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
55
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: NgxLoadingButton, isStandalone: true, selector: "ngx-loading-button", inputs: { isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, matButton: { classPropertyName: "matButton", publicName: "matButton", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, spinnerDiameter: { classPropertyName: "spinnerDiameter", publicName: "spinnerDiameter", isSignal: true, isRequired: false, transformFunction: null }, spinnerStrokeWidth: { classPropertyName: "spinnerStrokeWidth", publicName: "spinnerStrokeWidth", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<button\r\n class=\"loadingButton\"\r\n [matButton]=\"matButton()\"\r\n [type]=\"type()\"\r\n [disabled]=\"disabled() || isLoading()\"\r\n [class.isLoading]=\"isLoading()\"\r\n [class]=\"color() ?? ''\"\r\n>\r\n {{ label() }}\r\n</button>\r\n\r\n@if (isLoading()) {\r\n <mat-spinner\r\n class=\"spinnerLoadingButton\"\r\n [diameter]=\"spinnerDiameter()\"\r\n [strokeWidth]=\"spinnerStrokeWidth()\"\r\n />\r\n}\r\n", styles: [":host{display:inline-flex;position:relative}.loadingButton{width:100%}.spinnerLoadingButton{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.isLoading{--mat-button-filled-disabled-label-text-color: transparent;--mat-button-outlined-disabled-label-text-color: transparent;--mat-button-protected-disabled-label-text-color: transparent;--mat-button-text-disabled-label-text-color: transparent;--mat-button-tonal-disabled-label-text-color: transparent}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.secondarySpinner{--mat-progress-spinner-active-indicator-color: var(--mat-sys-secondary)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}.tertiarySpinner{--mat-progress-spinner-active-indicator-color: var(--mat-sys-tertiary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatIconModule }] });
|
|
55
56
|
}
|
|
56
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxLoadingButton, decorators: [{
|
|
57
58
|
type: Component,
|
|
58
59
|
args: [{ selector: 'ngx-loading-button', imports: [
|
|
59
60
|
MatButtonModule,
|
|
60
61
|
MatProgressSpinnerModule,
|
|
61
62
|
MatIconModule,
|
|
62
63
|
], template: "<button\r\n class=\"loadingButton\"\r\n [matButton]=\"matButton()\"\r\n [type]=\"type()\"\r\n [disabled]=\"disabled() || isLoading()\"\r\n [class.isLoading]=\"isLoading()\"\r\n [class]=\"color() ?? ''\"\r\n>\r\n {{ label() }}\r\n</button>\r\n\r\n@if (isLoading()) {\r\n <mat-spinner\r\n class=\"spinnerLoadingButton\"\r\n [diameter]=\"spinnerDiameter()\"\r\n [strokeWidth]=\"spinnerStrokeWidth()\"\r\n />\r\n}\r\n", styles: [":host{display:inline-flex;position:relative}.loadingButton{width:100%}.spinnerLoadingButton{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.isLoading{--mat-button-filled-disabled-label-text-color: transparent;--mat-button-outlined-disabled-label-text-color: transparent;--mat-button-protected-disabled-label-text-color: transparent;--mat-button-text-disabled-label-text-color: transparent;--mat-button-tonal-disabled-label-text-color: transparent}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.secondarySpinner{--mat-progress-spinner-active-indicator-color: var(--mat-sys-secondary)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}.tertiarySpinner{--mat-progress-spinner-active-indicator-color: var(--mat-sys-tertiary)}\n"] }]
|
|
63
|
-
}] });
|
|
64
|
+
}], propDecorators: { isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], matButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "matButton", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], spinnerDiameter: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinnerDiameter", required: false }] }], spinnerStrokeWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "spinnerStrokeWidth", required: false }] }], color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }] } });
|
|
64
65
|
|
|
65
66
|
class CommonTableService {
|
|
66
67
|
/**
|
|
@@ -186,10 +187,10 @@ class CommonTableService {
|
|
|
186
187
|
return value;
|
|
187
188
|
}
|
|
188
189
|
}
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
190
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
190
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CommonTableService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
191
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CommonTableService, providedIn: 'root' });
|
|
191
192
|
}
|
|
192
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CommonTableService, decorators: [{
|
|
193
194
|
type: Injectable,
|
|
194
195
|
args: [{
|
|
195
196
|
providedIn: 'root',
|
|
@@ -260,10 +261,10 @@ class CommonTableComponent {
|
|
|
260
261
|
onDeleteClick(row) {
|
|
261
262
|
this.delete.emit(row);
|
|
262
263
|
}
|
|
263
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
264
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.6", type: CommonTableComponent, isStandalone: true, selector: "common-table", inputs: { tableConfig: { classPropertyName: "tableConfig", publicName: "tableConfig", isSignal: true, isRequired: true, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create", view: "view", download: "download", update: "update", delete: "delete" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-card>\r\n <div class=\"tableContainer\">\r\n <div class=\"tableHeader\">\r\n <div class=\"tableHeader__title\">\r\n <span>{{ tableConfig().title }}</span>\r\n </div>\r\n <div class=\"tableHeader__buttons\">\r\n @if(canDoAction('canCreate')) {\r\n <button mat-raised-button type=\"button\" (click)=\"onCreateClick()\">\r\n <mat-icon>add</mat-icon>\r\n <span>Create</span>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n @if(isLoading()) {\r\n <ngx-skeleton-loader [count]=\"tableConfig().skeletonConfig?.count || 5\" />\r\n } @else { \r\n <div class=\"overflowTable\">\r\n <table mat-table class=\"mat-elevation-z8\" [dataSource]=\"datasource()\" class=\"customTable\" matSort>\r\n @for(column of tableConfig().tableColumns; track column.key) {\r\n <!-- Dynamically generate columns -->\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <!-- Header cell definition -->\r\n <th mat-header-cell *matHeaderCellDef>{{ column.displayName }}</th>\r\n \r\n <!-- Data cell definition -->\r\n <td mat-cell *matCellDef=\"let row\">\r\n @switch (column.type) {\r\n @case ('button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button\r\n [matButton]=\"column.buttonConfig?.variant || 'filled'\"\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.buttonConfig?.text) {\r\n {{ column.buttonConfig?.text }}\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('icon-button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button \r\n matIconButton\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('link') {\r\n @if(_commonTableService.isLinkVisible(column, row)) {\r\n <!-- External link -->\r\n @if(_commonTableService.getLinkHref(column, row)) {\r\n <a\r\n [style]=\"{ display: 'flex', alignItems: 'center', gap: '2px' }\"\r\n [href]=\"_commonTableService.getLinkHref(column, row)\"\r\n [target]=\"column.linkConfig?.target || '_blank'\"\r\n [matTooltip]=\"column.linkConfig?.tooltip || ''\"\r\n [style.color]=\"column.linkConfig?.color || 'primary'\"\r\n [style.text-decoration]=\"column.linkConfig?.underline ? 'underline' : 'none'\"\r\n >\r\n @if(column.linkConfig?.icon) {\r\n <mat-icon>{{ column.linkConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.linkConfig?.text) {\r\n {{ column.linkConfig?.text }}\r\n }\r\n </a>\r\n }\r\n }\r\n }\r\n <!-- Text is by default -->\r\n @default {\r\n {{ _commonTableService.getCellValue(column, row) }}\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <!-- Actions Column -->\r\n @if(hasActions()) {\r\n <ng-container matColumnDef=\"actions\">\r\n <th mat-header-cell *matHeaderCellDef>Actions</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(canDoAction('canView', row)) {\r\n <button matIconButton (click)=\"onViewClick(row)\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDownload', row)) {\r\n <button matIconButton (click)=\"onDownloadClick(row)\">\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canUpdate', row)) {\r\n <button matIconButton (click)=\"onUpdateClick(row)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDelete', row)) {\r\n <button matIconButton (click)=\"onDeleteClick(row)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <tr mat-header-row *matHeaderRowDef=\"getAllColumns()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: getAllColumns();\"></tr>\r\n <tr *matNoDataRow>No data available</tr>\r\n </table>\r\n <mat-paginator\r\n #paginator\r\n [length]=\"datasource().data.length\"\r\n [pageSize]=\"5\"\r\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n />\r\n </div>\r\n }\r\n\r\n </div>\r\n</mat-card>", styles: [".tableContainer{display:flex;flex-direction:column;padding:16px 8px;gap:12px}.tableContainer .tableHeader{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 0 0 8px}.tableContainer .tableHeader__title{font-size:16px;font-weight:500}.tableContainer .tableHeader__buttons{display:flex;flex-direction:row;align-items:center;gap:8px}.tableContainer .tableHeader__buttons button{padding:0 16px;height:28px;box-shadow:0 1px 2px #0000001a,0 1px 3px 2px #0000000d;border-radius:4px}.overflowTable{overflow-x:auto;width:100%}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }, { kind: "component", type: i8.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme", "size"] }] });
|
|
264
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CommonTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
265
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: CommonTableComponent, isStandalone: true, selector: "common-table", inputs: { tableConfig: { classPropertyName: "tableConfig", publicName: "tableConfig", isSignal: true, isRequired: true, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create", view: "view", download: "download", update: "update", delete: "delete" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, isSignal: true }], ngImport: i0, template: "<mat-card>\r\n <div class=\"tableContainer\">\r\n <div class=\"tableHeader\">\r\n <div class=\"tableHeader__title\">\r\n <span>{{ tableConfig().title }}</span>\r\n </div>\r\n <div class=\"tableHeader__buttons\">\r\n @if(canDoAction('canCreate')) {\r\n <button matMiniFab type=\"button\" (click)=\"onCreateClick()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n @if(isLoading()) {\r\n <ngx-skeleton-loader [count]=\"tableConfig().skeletonConfig?.count || 5\" />\r\n } @else { \r\n <div class=\"overflowTable\">\r\n <table mat-table class=\"mat-elevation-z8\" [dataSource]=\"datasource()\" class=\"customTable\" matSort>\r\n @for(column of tableConfig().tableColumns; track column.key) {\r\n <!-- Dynamically generate columns -->\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <!-- Header cell definition -->\r\n <th mat-header-cell *matHeaderCellDef>{{ column.displayName }}</th>\r\n \r\n <!-- Data cell definition -->\r\n <td mat-cell *matCellDef=\"let row\">\r\n @switch (column.type) {\r\n @case ('button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button\r\n [matButton]=\"column.buttonConfig?.variant || 'filled'\"\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.buttonConfig?.text) {\r\n {{ column.buttonConfig?.text }}\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('icon-button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button \r\n matIconButton\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('link') {\r\n @if(_commonTableService.isLinkVisible(column, row)) {\r\n <!-- External link -->\r\n @if(_commonTableService.getLinkHref(column, row)) {\r\n <a\r\n [style]=\"{ display: 'flex', alignItems: 'center', gap: '2px' }\"\r\n [href]=\"_commonTableService.getLinkHref(column, row)\"\r\n [target]=\"column.linkConfig?.target || '_blank'\"\r\n [matTooltip]=\"column.linkConfig?.tooltip || ''\"\r\n [style.color]=\"column.linkConfig?.color || 'primary'\"\r\n [style.text-decoration]=\"column.linkConfig?.underline ? 'underline' : 'none'\"\r\n >\r\n @if(column.linkConfig?.icon) {\r\n <mat-icon>{{ column.linkConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.linkConfig?.text) {\r\n {{ column.linkConfig?.text }}\r\n }\r\n </a>\r\n }\r\n }\r\n }\r\n <!-- Text is by default -->\r\n @default {\r\n {{ _commonTableService.getCellValue(column, row) }}\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <!-- Actions Column -->\r\n @if(hasActions()) {\r\n <ng-container matColumnDef=\"actions\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(canDoAction('canView', row)) {\r\n <button matIconButton (click)=\"onViewClick(row)\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDownload', row)) {\r\n <button matIconButton (click)=\"onDownloadClick(row)\">\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canUpdate', row)) {\r\n <button matIconButton (click)=\"onUpdateClick(row)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDelete', row)) {\r\n <button matIconButton (click)=\"onDeleteClick(row)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <tr mat-header-row *matHeaderRowDef=\"getAllColumns()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: getAllColumns();\"></tr>\r\n <tr *matNoDataRow>No data available</tr>\r\n </table>\r\n <mat-paginator\r\n #paginator\r\n [length]=\"datasource().data.length\"\r\n [pageSize]=\"5\"\r\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n />\r\n </div>\r\n }\r\n\r\n </div>\r\n</mat-card>", styles: [".tableContainer{display:flex;flex-direction:column;padding:16px 8px;gap:12px}.tableContainer .tableHeader{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 0 0 8px}.tableContainer .tableHeader__title{font-size:16px;font-weight:500}.tableContainer .tableHeader__buttons{display:flex;flex-direction:row;align-items:center;gap:8px}.tableContainer .tableHeader__buttons button{padding:0 16px;height:28px;box-shadow:0 1px 2px #0000001a,0 1px 3px 2px #0000000d;border-radius:4px}.overflowTable{overflow-x:auto;width:100%}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2$1.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i2$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i2$1.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "component", type: i1.MatMiniFabButton, selector: "button[mat-mini-fab], a[mat-mini-fab], button[matMiniFab], a[matMiniFab]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: NgxSkeletonLoaderModule }, { kind: "component", type: i8.NgxSkeletonLoaderComponent, selector: "ngx-skeleton-loader", inputs: ["count", "loadingText", "appearance", "animation", "ariaLabel", "theme", "size", "measureUnit"] }] });
|
|
265
266
|
}
|
|
266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: CommonTableComponent, decorators: [{
|
|
267
268
|
type: Component,
|
|
268
269
|
args: [{ selector: 'common-table', imports: [
|
|
269
270
|
MatCardModule,
|
|
@@ -274,8 +275,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
274
275
|
MatIconModule,
|
|
275
276
|
MatPaginatorModule,
|
|
276
277
|
NgxSkeletonLoaderModule
|
|
277
|
-
], template: "<mat-card>\r\n <div class=\"tableContainer\">\r\n <div class=\"tableHeader\">\r\n <div class=\"tableHeader__title\">\r\n <span>{{ tableConfig().title }}</span>\r\n </div>\r\n <div class=\"tableHeader__buttons\">\r\n @if(canDoAction('canCreate')) {\r\n <button mat-raised-button type=\"button\" (click)=\"onCreateClick()\">\r\n <mat-icon>add</mat-icon>\r\n <span>Create</span>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n @if(isLoading()) {\r\n <ngx-skeleton-loader [count]=\"tableConfig().skeletonConfig?.count || 5\" />\r\n } @else { \r\n <div class=\"overflowTable\">\r\n <table mat-table class=\"mat-elevation-z8\" [dataSource]=\"datasource()\" class=\"customTable\" matSort>\r\n @for(column of tableConfig().tableColumns; track column.key) {\r\n <!-- Dynamically generate columns -->\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <!-- Header cell definition -->\r\n <th mat-header-cell *matHeaderCellDef>{{ column.displayName }}</th>\r\n \r\n <!-- Data cell definition -->\r\n <td mat-cell *matCellDef=\"let row\">\r\n @switch (column.type) {\r\n @case ('button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button\r\n [matButton]=\"column.buttonConfig?.variant || 'filled'\"\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.buttonConfig?.text) {\r\n {{ column.buttonConfig?.text }}\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('icon-button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button \r\n matIconButton\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('link') {\r\n @if(_commonTableService.isLinkVisible(column, row)) {\r\n <!-- External link -->\r\n @if(_commonTableService.getLinkHref(column, row)) {\r\n <a\r\n [style]=\"{ display: 'flex', alignItems: 'center', gap: '2px' }\"\r\n [href]=\"_commonTableService.getLinkHref(column, row)\"\r\n [target]=\"column.linkConfig?.target || '_blank'\"\r\n [matTooltip]=\"column.linkConfig?.tooltip || ''\"\r\n [style.color]=\"column.linkConfig?.color || 'primary'\"\r\n [style.text-decoration]=\"column.linkConfig?.underline ? 'underline' : 'none'\"\r\n >\r\n @if(column.linkConfig?.icon) {\r\n <mat-icon>{{ column.linkConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.linkConfig?.text) {\r\n {{ column.linkConfig?.text }}\r\n }\r\n </a>\r\n }\r\n }\r\n }\r\n <!-- Text is by default -->\r\n @default {\r\n {{ _commonTableService.getCellValue(column, row) }}\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <!-- Actions Column -->\r\n @if(hasActions()) {\r\n <ng-container matColumnDef=\"actions\">\r\n <th mat-header-cell *matHeaderCellDef>Actions</th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(canDoAction('canView', row)) {\r\n <button matIconButton (click)=\"onViewClick(row)\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDownload', row)) {\r\n <button matIconButton (click)=\"onDownloadClick(row)\">\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canUpdate', row)) {\r\n <button matIconButton (click)=\"onUpdateClick(row)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDelete', row)) {\r\n <button matIconButton (click)=\"onDeleteClick(row)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <tr mat-header-row *matHeaderRowDef=\"getAllColumns()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: getAllColumns();\"></tr>\r\n <tr *matNoDataRow>No data available</tr>\r\n </table>\r\n <mat-paginator\r\n #paginator\r\n [length]=\"datasource().data.length\"\r\n [pageSize]=\"5\"\r\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n />\r\n </div>\r\n }\r\n\r\n </div>\r\n</mat-card>", styles: [".tableContainer{display:flex;flex-direction:column;padding:16px 8px;gap:12px}.tableContainer .tableHeader{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 0 0 8px}.tableContainer .tableHeader__title{font-size:16px;font-weight:500}.tableContainer .tableHeader__buttons{display:flex;flex-direction:row;align-items:center;gap:8px}.tableContainer .tableHeader__buttons button{padding:0 16px;height:28px;box-shadow:0 1px 2px #0000001a,0 1px 3px 2px #0000000d;border-radius:4px}.overflowTable{overflow-x:auto;width:100%}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}\n"] }]
|
|
278
|
-
}], ctorParameters: () => [] });
|
|
278
|
+
], template: "<mat-card>\r\n <div class=\"tableContainer\">\r\n <div class=\"tableHeader\">\r\n <div class=\"tableHeader__title\">\r\n <span>{{ tableConfig().title }}</span>\r\n </div>\r\n <div class=\"tableHeader__buttons\">\r\n @if(canDoAction('canCreate')) {\r\n <button matMiniFab type=\"button\" (click)=\"onCreateClick()\">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n @if(isLoading()) {\r\n <ngx-skeleton-loader [count]=\"tableConfig().skeletonConfig?.count || 5\" />\r\n } @else { \r\n <div class=\"overflowTable\">\r\n <table mat-table class=\"mat-elevation-z8\" [dataSource]=\"datasource()\" class=\"customTable\" matSort>\r\n @for(column of tableConfig().tableColumns; track column.key) {\r\n <!-- Dynamically generate columns -->\r\n <ng-container [matColumnDef]=\"column.key\">\r\n <!-- Header cell definition -->\r\n <th mat-header-cell *matHeaderCellDef>{{ column.displayName }}</th>\r\n \r\n <!-- Data cell definition -->\r\n <td mat-cell *matCellDef=\"let row\">\r\n @switch (column.type) {\r\n @case ('button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button\r\n [matButton]=\"column.buttonConfig?.variant || 'filled'\"\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.buttonConfig?.text) {\r\n {{ column.buttonConfig?.text }}\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('icon-button') {\r\n @if(_commonTableService.isButtonVisible(column, row)) {\r\n <button \r\n matIconButton\r\n [class]=\"column.buttonConfig?.color\"\r\n [disabled]=\"_commonTableService.isButtonDisabled(column, row)\"\r\n [matTooltip]=\"column.buttonConfig?.tooltip || ''\"\r\n (click)=\"_commonTableService.onCustomButtonClick(column, row)\"\r\n >\r\n @if(column.buttonConfig?.icon) {\r\n <mat-icon>{{ column.buttonConfig?.icon }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n }\r\n @case ('link') {\r\n @if(_commonTableService.isLinkVisible(column, row)) {\r\n <!-- External link -->\r\n @if(_commonTableService.getLinkHref(column, row)) {\r\n <a\r\n [style]=\"{ display: 'flex', alignItems: 'center', gap: '2px' }\"\r\n [href]=\"_commonTableService.getLinkHref(column, row)\"\r\n [target]=\"column.linkConfig?.target || '_blank'\"\r\n [matTooltip]=\"column.linkConfig?.tooltip || ''\"\r\n [style.color]=\"column.linkConfig?.color || 'primary'\"\r\n [style.text-decoration]=\"column.linkConfig?.underline ? 'underline' : 'none'\"\r\n >\r\n @if(column.linkConfig?.icon) {\r\n <mat-icon>{{ column.linkConfig?.icon }}</mat-icon>\r\n }\r\n @if(column.linkConfig?.text) {\r\n {{ column.linkConfig?.text }}\r\n }\r\n </a>\r\n }\r\n }\r\n }\r\n <!-- Text is by default -->\r\n @default {\r\n {{ _commonTableService.getCellValue(column, row) }}\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <!-- Actions Column -->\r\n @if(hasActions()) {\r\n <ng-container matColumnDef=\"actions\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n @if(canDoAction('canView', row)) {\r\n <button matIconButton (click)=\"onViewClick(row)\">\r\n <mat-icon>visibility</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDownload', row)) {\r\n <button matIconButton (click)=\"onDownloadClick(row)\">\r\n <mat-icon>download</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canUpdate', row)) {\r\n <button matIconButton (click)=\"onUpdateClick(row)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n }\r\n @if(canDoAction('canDelete', row)) {\r\n <button matIconButton (click)=\"onDeleteClick(row)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n \r\n <tr mat-header-row *matHeaderRowDef=\"getAllColumns()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: getAllColumns();\"></tr>\r\n <tr *matNoDataRow>No data available</tr>\r\n </table>\r\n <mat-paginator\r\n #paginator\r\n [length]=\"datasource().data.length\"\r\n [pageSize]=\"5\"\r\n [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n />\r\n </div>\r\n }\r\n\r\n </div>\r\n</mat-card>", styles: [".tableContainer{display:flex;flex-direction:column;padding:16px 8px;gap:12px}.tableContainer .tableHeader{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 0 0 8px}.tableContainer .tableHeader__title{font-size:16px;font-weight:500}.tableContainer .tableHeader__buttons{display:flex;flex-direction:row;align-items:center;gap:8px}.tableContainer .tableHeader__buttons button{padding:0 16px;height:28px;box-shadow:0 1px 2px #0000001a,0 1px 3px 2px #0000000d;border-radius:4px}.overflowTable{overflow-x:auto;width:100%}.secondary{--mat-button-filled-container-color: var(--mat-sys-secondary);--mat-button-filled-label-text-color: var(--mat-sys-on-secondary);--mat-button-outlined-label-text-color: var(--mat-sys-secondary);--mat-button-outlined-state-layer-color: var(--mat-sys-secondary);--mat-button-outlined-ripple-color: var(--mat-sys-secondary-container);--mat-button-protected-label-text-color: var(--mat-sys-secondary);--mat-button-protected-state-layer-color: var(--mat-sys-secondary);--mat-button-protected-ripple-color: var(--mat-sys-secondary-container);--mat-button-text-label-text-color: var(--mat-sys-secondary);--mat-button-text-state-layer-color: var(--mat-sys-secondary);--mat-button-text-ripple-color: var(--mat-sys-secondary-container)}.tertiary{--mat-button-filled-container-color: var(--mat-sys-tertiary);--mat-button-filled-label-text-color: var(--mat-sys-on-tertiary);--mat-button-outlined-label-text-color: var(--mat-sys-tertiary);--mat-button-outlined-state-layer-color: var(--mat-sys-tertiary);--mat-button-outlined-ripple-color: var(--mat-sys-tertiary-container);--mat-button-protected-label-text-color: var(--mat-sys-tertiary);--mat-button-protected-state-layer-color: var(--mat-sys-tertiary);--mat-button-protected-ripple-color: var(--mat-sys-tertiary-container);--mat-button-text-label-text-color: var(--mat-sys-tertiary);--mat-button-text-state-layer-color: var(--mat-sys-tertiary);--mat-button-text-ripple-color: var(--mat-sys-tertiary-container)}\n"] }]
|
|
279
|
+
}], ctorParameters: () => [], propDecorators: { tableConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableConfig", required: true }] }], tableData: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableData", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], create: [{ type: i0.Output, args: ["create"] }], view: [{ type: i0.Output, args: ["view"] }], download: [{ type: i0.Output, args: ["download"] }], update: [{ type: i0.Output, args: ["update"] }], delete: [{ type: i0.Output, args: ["delete"] }], paginator: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatPaginator), { isSignal: true }] }] } });
|
|
279
280
|
|
|
280
281
|
class NgxBasicTable {
|
|
281
282
|
//inputs
|
|
@@ -306,19 +307,19 @@ class NgxBasicTable {
|
|
|
306
307
|
onDeleteClick(row) {
|
|
307
308
|
this.delete.emit(row);
|
|
308
309
|
}
|
|
309
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
310
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxBasicTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
311
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.10", type: NgxBasicTable, isStandalone: true, selector: "ngx-basic-table", inputs: { tableConfig: { classPropertyName: "tableConfig", publicName: "tableConfig", isSignal: true, isRequired: true, transformFunction: null }, tableData: { classPropertyName: "tableData", publicName: "tableData", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { create: "create", view: "view", download: "download", update: "update", delete: "delete" }, ngImport: i0, template: "<common-table\r\n [tableConfig]=\"tableConfig()\"\r\n [tableData]=\"tableData()\"\r\n [isLoading]=\"isLoading()\"\r\n (create)=\"onCreateClick()\"\r\n (view)=\"onViewClick($event)\"\r\n (download)=\"onDownloadClick($event)\"\r\n (update)=\"onUpdateClick($event)\"\r\n (delete)=\"onDeleteClick($event)\"\r\n/>\r\n", styles: [""], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: CommonTableComponent, selector: "common-table", inputs: ["tableConfig", "tableData", "isLoading"], outputs: ["create", "view", "download", "update", "delete"] }] });
|
|
311
312
|
}
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxBasicTable, decorators: [{
|
|
313
314
|
type: Component,
|
|
314
315
|
args: [{ selector: 'ngx-basic-table', imports: [MatCardModule, CommonTableComponent], template: "<common-table\r\n [tableConfig]=\"tableConfig()\"\r\n [tableData]=\"tableData()\"\r\n [isLoading]=\"isLoading()\"\r\n (create)=\"onCreateClick()\"\r\n (view)=\"onViewClick($event)\"\r\n (download)=\"onDownloadClick($event)\"\r\n (update)=\"onUpdateClick($event)\"\r\n (delete)=\"onDeleteClick($event)\"\r\n/>\r\n" }]
|
|
315
|
-
}] });
|
|
316
|
+
}], propDecorators: { tableConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableConfig", required: true }] }], tableData: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableData", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], create: [{ type: i0.Output, args: ["create"] }], view: [{ type: i0.Output, args: ["view"] }], download: [{ type: i0.Output, args: ["download"] }], update: [{ type: i0.Output, args: ["update"] }], delete: [{ type: i0.Output, args: ["delete"] }] } });
|
|
316
317
|
|
|
317
318
|
class NgxPaginatedTable {
|
|
318
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
319
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
319
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxPaginatedTable, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
320
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.10", type: NgxPaginatedTable, isStandalone: true, selector: "ngx-paginated-table", ngImport: i0, template: "<p>ngx-paginated-table works!</p>\r\n", styles: [""] });
|
|
320
321
|
}
|
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
322
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxPaginatedTable, decorators: [{
|
|
322
323
|
type: Component,
|
|
323
324
|
args: [{ selector: 'ngx-paginated-table', imports: [], template: "<p>ngx-paginated-table works!</p>\r\n" }]
|
|
324
325
|
}] });
|
|
@@ -348,6 +349,7 @@ class NgxInputFile {
|
|
|
348
349
|
else {
|
|
349
350
|
this.internalControl.setErrors(null);
|
|
350
351
|
}
|
|
352
|
+
this._cdr.markForCheck();
|
|
351
353
|
}
|
|
352
354
|
controlEffect = effect(() => {
|
|
353
355
|
const value = this.value();
|
|
@@ -358,7 +360,6 @@ class NgxInputFile {
|
|
|
358
360
|
const fileNames = value.map(f => f.name);
|
|
359
361
|
this.internalControl.setValue(fileNames, { emitEvent: false });
|
|
360
362
|
this.checkErrors();
|
|
361
|
-
console.log('checkErrors', this.internalControl.errors);
|
|
362
363
|
this._cdr.markForCheck();
|
|
363
364
|
});
|
|
364
365
|
}, ...(ngDevMode ? [{ debugName: "controlEffect" }] : []));
|
|
@@ -369,12 +370,12 @@ class NgxInputFile {
|
|
|
369
370
|
}
|
|
370
371
|
}
|
|
371
372
|
onContainerClick() {
|
|
372
|
-
this.onTouchCb?.();
|
|
373
373
|
if (!this.disabled()) {
|
|
374
374
|
this.control().markAsTouched();
|
|
375
375
|
this.internalControl.markAsTouched();
|
|
376
|
-
this.
|
|
377
|
-
this.
|
|
376
|
+
this.checkErrors();
|
|
377
|
+
this._cdr.markForCheck();
|
|
378
|
+
this.onTouchCb?.();
|
|
378
379
|
this.inputFileRef()?.nativeElement.click();
|
|
379
380
|
}
|
|
380
381
|
}
|
|
@@ -398,6 +399,7 @@ class NgxInputFile {
|
|
|
398
399
|
this.onTouchCb?.();
|
|
399
400
|
if (!this.disabled()) {
|
|
400
401
|
const files = event.dataTransfer?.files;
|
|
402
|
+
// const validation = validateFiles(files, this.accept());
|
|
401
403
|
this.attachFiles(files);
|
|
402
404
|
}
|
|
403
405
|
}
|
|
@@ -444,16 +446,16 @@ class NgxInputFile {
|
|
|
444
446
|
bytesToMegaBytes(bytes) {
|
|
445
447
|
return (bytes / 1024 / 1024).toFixed(1);
|
|
446
448
|
}
|
|
447
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
448
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
449
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxInputFile, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
450
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: NgxInputFile, isStandalone: true, selector: "ngx-input-file", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, accept: { classPropertyName: "accept", publicName: "accept", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
449
451
|
{
|
|
450
452
|
provide: NG_VALUE_ACCESSOR,
|
|
451
453
|
useExisting: forwardRef(() => NgxInputFile),
|
|
452
454
|
multi: true,
|
|
453
455
|
},
|
|
454
|
-
], viewQueries: [{ propertyName: "inputFileRef", first: true, predicate: ["inputFileRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n (click)=\"onContainerClick()\"\r\n
|
|
456
|
+
], viewQueries: [{ propertyName: "inputFileRef", first: true, predicate: ["inputFileRef"], descendants: true, isSignal: true }], ngImport: i0, template: "<mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n (click)=\"onContainerClick()\"\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n [class.dragover]=\"isDropping()\"\r\n>\r\n <mat-label>{{ label() }}</mat-label>\r\n <mat-chip-grid \r\n #chipGrid \r\n [formControl]=\"internalControl\"\r\n class=\"chips-grid\"\r\n >\r\n @for(file of value(); track file.name + $index) {\r\n <mat-chip-row\r\n (removed)=\"onDeleteFileClick(file)\"\r\n class=\"chip-item\"\r\n [title]=\"file.name\"\r\n >\r\n <div class=\"chip-content\">\r\n <span class=\"chip-label\">\r\n ({{ bytesToMegaBytes(file.size) }} MB) {{ file.name }}\r\n </span>\r\n </div>\r\n <button matChipRemove [attr.aria-label]=\"'Eliminar ' + file.name\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n <input \r\n #inputFileRef\r\n type=\"file\"\r\n [accept]=\"getAccept()\" \r\n [multiple]=\"multiple()\" \r\n (change)=\"onInputchange($event)\"\r\n [matChipInputFor]=\"chipGrid\"\r\n style=\"display: none\"\r\n /> \r\n <mat-hint>{{ isDropping() ? 'Arrastrar archivos aqu\u00ED' : hint() }}</mat-hint>\r\n <mat-error>{{ error() }}</mat-error>\r\n</mat-form-field>", styles: [":host{display:block;width:100%}mat-form-field{width:100%;cursor:pointer;--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-focus-label-text-color: var(--mat-sys-on-surface)}.chips-grid{display:flex;flex-wrap:wrap;gap:8px;width:100%}.chip-item{max-width:100%!important;box-sizing:border-box!important}.chip-item ::ng-deep .mdc-evolution-chip__cell{display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__cell--primary{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__action--primary{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__text-label{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__cell--trailing{display:flex!important;align-items:center!important}.chip-content{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-label{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:100%!important;line-height:1.5!important}[matChipRemove]{flex-shrink:0!important;display:flex!important;align-items:center!important;justify-content:center!important}[matChipRemove] mat-icon{font-size:18px;width:18px;height:18px;line-height:18px}.dragover ::ng-deep .mat-mdc-text-field-wrapper{border-color:var(--mat-sys-primary);border-width:2px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatInputModule }] });
|
|
455
457
|
}
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxInputFile, decorators: [{
|
|
457
459
|
type: Component,
|
|
458
460
|
args: [{ selector: 'ngx-input-file', imports: [
|
|
459
461
|
CommonModule,
|
|
@@ -471,8 +473,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
471
473
|
useExisting: forwardRef(() => NgxInputFile),
|
|
472
474
|
multi: true,
|
|
473
475
|
},
|
|
474
|
-
], template: "<mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n (click)=\"onContainerClick()\"\r\n
|
|
475
|
-
}] });
|
|
476
|
+
], template: "<mat-form-field\r\n appearance=\"outline\"\r\n floatLabel=\"always\"\r\n (click)=\"onContainerClick()\"\r\n (dragover)=\"onDragOver($event)\"\r\n (dragleave)=\"onDragLeave($event)\"\r\n (drop)=\"onDrop($event)\"\r\n [class.dragover]=\"isDropping()\"\r\n>\r\n <mat-label>{{ label() }}</mat-label>\r\n <mat-chip-grid \r\n #chipGrid \r\n [formControl]=\"internalControl\"\r\n class=\"chips-grid\"\r\n >\r\n @for(file of value(); track file.name + $index) {\r\n <mat-chip-row\r\n (removed)=\"onDeleteFileClick(file)\"\r\n class=\"chip-item\"\r\n [title]=\"file.name\"\r\n >\r\n <div class=\"chip-content\">\r\n <span class=\"chip-label\">\r\n ({{ bytesToMegaBytes(file.size) }} MB) {{ file.name }}\r\n </span>\r\n </div>\r\n <button matChipRemove [attr.aria-label]=\"'Eliminar ' + file.name\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n </mat-chip-grid>\r\n <input \r\n #inputFileRef\r\n type=\"file\"\r\n [accept]=\"getAccept()\" \r\n [multiple]=\"multiple()\" \r\n (change)=\"onInputchange($event)\"\r\n [matChipInputFor]=\"chipGrid\"\r\n style=\"display: none\"\r\n /> \r\n <mat-hint>{{ isDropping() ? 'Arrastrar archivos aqu\u00ED' : hint() }}</mat-hint>\r\n <mat-error>{{ error() }}</mat-error>\r\n</mat-form-field>", styles: [":host{display:block;width:100%}mat-form-field{width:100%;cursor:pointer;--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-focus-label-text-color: var(--mat-sys-on-surface)}.chips-grid{display:flex;flex-wrap:wrap;gap:8px;width:100%}.chip-item{max-width:100%!important;box-sizing:border-box!important}.chip-item ::ng-deep .mdc-evolution-chip__cell{display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__cell--primary{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__action--primary{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__text-label{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-item ::ng-deep .mdc-evolution-chip__cell--trailing{display:flex!important;align-items:center!important}.chip-content{overflow:hidden!important;max-width:100%!important;display:flex!important;align-items:center!important}.chip-label{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;max-width:100%!important;line-height:1.5!important}[matChipRemove]{flex-shrink:0!important;display:flex!important;align-items:center!important;justify-content:center!important}[matChipRemove] mat-icon{font-size:18px;width:18px;height:18px;line-height:18px}.dragover ::ng-deep .mat-mdc-text-field-wrapper{border-color:var(--mat-sys-primary);border-width:2px}\n"] }]
|
|
477
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], accept: [{ type: i0.Input, args: [{ isSignal: true, alias: "accept", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], inputFileRef: [{ type: i0.ViewChild, args: ['inputFileRef', { isSignal: true }] }] } });
|
|
476
478
|
|
|
477
479
|
const includeNoSensible = (cadena, query) => {
|
|
478
480
|
const nomalizadoCadena = cadena
|
|
@@ -557,10 +559,10 @@ class NgxBasicSelect {
|
|
|
557
559
|
searchInputRef.nativeElement.focus();
|
|
558
560
|
}
|
|
559
561
|
}
|
|
560
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
561
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
562
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxBasicSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: NgxBasicSelect, isStandalone: true, selector: "ngx-basic-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, basicSelectConfig: { classPropertyName: "basicSelectConfig", publicName: "basicSelectConfig", isSignal: true, isRequired: true, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: true, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange" }, viewQueries: [{ propertyName: "matSelect", first: true, predicate: ["matSelect"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: "\n<mat-form-field [appearance]=\"appearance()\" [className]=\"class()\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select \n #matSelect\n [formControl]=\"control()\"\n (selectionChange)=\"onSelectionChange($event)\"\n [multiple]=\"multiple()\"\n [placeholder]=\"placeholder()\"\n (openedChange)=\"onOpenedChange($event)\"\n >\n @if(!isLoading()) {\n <div class=\"searchFilter\">\n <mat-icon class=\"searchIcon\">search</mat-icon>\n <input \n matInput\n #searchInput \n type=\"text\"\n (keydown)=\"$event.stopPropagation()\"\n />\n <button matIconButton (click)=\"onClearInputClick(); searchInput.value = ''\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @for(option of options(); track option[basicSelectConfig().valueKey]) {\n <mat-option \n [value]=\"option[basicSelectConfig().valueKey]\" \n [disabled]=\"basicSelectConfig().disabled ? basicSelectConfig().disabled?.(option) : false\"\n [style]=\"{ display: includeInFilter(option, searchInput.value) ? 'flex' : 'none' }\"\n > \n {{ basicSelectConfig().displayedLabel(option) }}\n </mat-option>\n }\n }\n </mat-select>\n @if(isLoading()) {\n <mat-icon matSuffix><mat-spinner diameter=\"20\" /></mat-icon>\n } @else if(clearable() && (multiple() ? control().value?.length : control().value)) {\n <mat-icon matSuffix (click)=\"onClearClick(); $event.stopPropagation()\">close</mat-icon>\n }\n <mat-error>{{ error() }}</mat-error>\n</mat-form-field>", styles: [":host{display:block;width:100%}mat-form-field{width:100%}mat-select{width:100%}.searchFilter{display:flex;align-items:center;position:sticky;top:-8px;height:48px;width:100%;background:#fff;z-index:10;border-bottom:1px solid var(--accent-3)}.searchFilter input{height:48px;padding:0 48px;width:calc(100% - 96px);position:absolute;top:0;left:0}.searchFilter .searchIcon{position:absolute;top:0;left:0;height:48px;width:48px;display:flex;align-items:center;justify-content:center}button{position:absolute;right:5px}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
562
564
|
}
|
|
563
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
565
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxBasicSelect, decorators: [{
|
|
564
566
|
type: Component,
|
|
565
567
|
args: [{ selector: 'ngx-basic-select', imports: [
|
|
566
568
|
MatInputModule,
|
|
@@ -571,7 +573,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
571
573
|
ReactiveFormsModule,
|
|
572
574
|
MatProgressSpinnerModule,
|
|
573
575
|
], template: "\n<mat-form-field [appearance]=\"appearance()\" [className]=\"class()\">\n <mat-label>{{ label() }}</mat-label>\n <mat-select \n #matSelect\n [formControl]=\"control()\"\n (selectionChange)=\"onSelectionChange($event)\"\n [multiple]=\"multiple()\"\n [placeholder]=\"placeholder()\"\n (openedChange)=\"onOpenedChange($event)\"\n >\n @if(!isLoading()) {\n <div class=\"searchFilter\">\n <mat-icon class=\"searchIcon\">search</mat-icon>\n <input \n matInput\n #searchInput \n type=\"text\"\n (keydown)=\"$event.stopPropagation()\"\n />\n <button matIconButton (click)=\"onClearInputClick(); searchInput.value = ''\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n @for(option of options(); track option[basicSelectConfig().valueKey]) {\n <mat-option \n [value]=\"option[basicSelectConfig().valueKey]\" \n [disabled]=\"basicSelectConfig().disabled ? basicSelectConfig().disabled?.(option) : false\"\n [style]=\"{ display: includeInFilter(option, searchInput.value) ? 'flex' : 'none' }\"\n > \n {{ basicSelectConfig().displayedLabel(option) }}\n </mat-option>\n }\n }\n </mat-select>\n @if(isLoading()) {\n <mat-icon matSuffix><mat-spinner diameter=\"20\" /></mat-icon>\n } @else if(clearable() && (multiple() ? control().value?.length : control().value)) {\n <mat-icon matSuffix (click)=\"onClearClick(); $event.stopPropagation()\">close</mat-icon>\n }\n <mat-error>{{ error() }}</mat-error>\n</mat-form-field>", styles: [":host{display:block;width:100%}mat-form-field{width:100%}mat-select{width:100%}.searchFilter{display:flex;align-items:center;position:sticky;top:-8px;height:48px;width:100%;background:#fff;z-index:10;border-bottom:1px solid var(--accent-3)}.searchFilter input{height:48px;padding:0 48px;width:calc(100% - 96px);position:absolute;top:0;left:0}.searchFilter .searchIcon{position:absolute;top:0;left:0;height:48px;width:48px;display:flex;align-items:center;justify-content:center}button{position:absolute;right:5px}\n"] }]
|
|
574
|
-
}], ctorParameters: () => [] });
|
|
576
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], basicSelectConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "basicSelectConfig", required: true }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], isLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "isLoading", required: true }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }], matSelect: [{ type: i0.ViewChild, args: ['matSelect', { isSignal: true }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
575
577
|
|
|
576
578
|
class PaginatedSelectBottomSheetComponent {
|
|
577
579
|
// dependencies injection
|
|
@@ -680,10 +682,10 @@ class PaginatedSelectBottomSheetComponent {
|
|
|
680
682
|
onConfirmMultiSelectionClick() {
|
|
681
683
|
this._bottomSheetRef.dismiss(this.selectedsOptions());
|
|
682
684
|
}
|
|
683
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
684
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
685
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: PaginatedSelectBottomSheetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
686
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: PaginatedSelectBottomSheetComponent, isStandalone: true, selector: "paginated-select-bottom-sheet", ngImport: i0, template: "<div class=\"bottomSheetContainer\">\n <div class=\"header\">\n @if(_data.title) {\n <div class=\"title\">\n {{ _data.title }}\n </div>\n }\n @if(!_data.hideFilter) {\n <mat-form-field subscriptSizing=\"dynamic\" appearance=\"outline\">\n <mat-icon matPrefix>search</mat-icon>\n <input matInput #searchInput [placeholder]=\"_data.filterPlaceholder\" [value]=\"queryInput()\" (input)=\"onQueryChange($event, optionsContainer); $event.stopPropagation()\" />\n @if(searchInput.value.length > 0) {\n <button matSuffix mat-icon-button (click)=\"onClearClick(searchInput); $event.stopPropagation()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n \n <mat-chip-listbox [multiple]=\"false\">\n @for(filterKey of _data.config.filtersKeys; track filterKey.key) {\n <mat-chip-option [value]=\"filterKey.key\" [selected]=\"\">{{ filterKey.label() }}</mat-chip-option>\n }\n </mat-chip-listbox>\n }\n\n @if(_data.extraFiltersTemplate) {\n <br />\n <ng-container *ngTemplateOutlet=\"_data.extraFiltersTemplate;\"></ng-container>\n }\n </div>\n <div>\n @if(isLoading()) {\n <mat-progress-bar mode=\"indeterminate\" />\n }\n </div>\n <div #optionsContainer class=\"optionsContainer\" (scroll)=\"onScroll(optionsContainer)\">\n <mat-selection-list [multiple]=\"_data.multiple\" (selectionChange)=\"onSelectionChange($event)\">\n @for(option of options(); track option[_data.config.valueKey]; let last = $last) {\n <mat-list-option \n [value]=\"option[_data.config.valueKey]\"\n [selected]=\"isSelected(option[_data.config.valueKey])\"\n [disabled]=\"_data.config.disabled ? _data.config.disabled(option) : false\"\n >\n {{_data.config.displayedLabel(option)}}\n </mat-list-option>\n @if(!last) {\n <mat-divider />\n }\n }\n </mat-selection-list>\n </div> \n\n\n <div class=\"footer\">\n @if(_data.multiple) {\n <div class=\"length\">\n {{ selectedsOptions().length }} / {{ total() }} {{ _data.multipleItemsLabel }}\n </div>\n <div class=\"actions\">\n @if(selectedsOptions().length > 0) {\n <button matButton (click)=\"onResetClick()\">{{ _data.resetLabel }}</button>\n }\n <button matButton=\"filled\" color=\"primary\" (click)=\"onConfirmMultiSelectionClick()\">{{ _data.confirmLabel }}</button>\n </div>\n } @else {\n <div class=\"length\">\n {{ total() }} {{ _data.itemsLabel }}\n </div>\n }\n </div>\n</div>", styles: [":host{display:flex;flex-direction:column;min-width:720px}.mat-bottom-sheet-container{padding:0 16px!important}.bottomSheetContainer{display:flex;flex-direction:column;height:100%;max-height:80vh}.bottomSheetContainer .header{width:100%;flex:0 0 auto;margin-top:15px}.bottomSheetContainer .header .title{margin-bottom:10px;font-size:20px;font-weight:500}.bottomSheetContainer .header mat-form-field{width:100%}.bottomSheetContainer .header mat-chip-listbox{width:100%}.bottomSheetContainer .loading{display:flex;align-items:center;width:100%;height:20px}.bottomSheetContainer .optionsContainer{flex:1 1 auto;height:360px;width:100%;overflow-y:auto}.bottomSheetContainer .footer{margin-top:8px;width:100%;flex:0 0 auto;display:flex;justify-content:space-between;height:56px;box-shadow:0 15px 10px -15px #0000001a}mat-form-field{--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline)}@media (max-width: 960px){:host{min-width:auto}}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["multiple", "aria-orientation", "selectable", "compareWith", "required", "hideSingleSelectionIndicator", "value"], outputs: ["change"] }, { kind: "component", type: i7$1.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i8$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i9.MatSelectionList, selector: "mat-selection-list", inputs: ["color", "compareWith", "multiple", "hideSingleSelectionIndicator", "disabled"], outputs: ["selectionChange"], exportAs: ["matSelectionList"] }, { kind: "component", type: i9.MatListOption, selector: "mat-list-option", inputs: ["togglePosition", "checkboxPosition", "color", "value", "selected"], outputs: ["selectedChange"], exportAs: ["matListOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
685
687
|
}
|
|
686
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
688
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: PaginatedSelectBottomSheetComponent, decorators: [{
|
|
687
689
|
type: Component,
|
|
688
690
|
args: [{ selector: 'paginated-select-bottom-sheet', imports: [
|
|
689
691
|
MatButtonModule,
|
|
@@ -696,7 +698,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
696
698
|
MatProgressBarModule,
|
|
697
699
|
MatListModule,
|
|
698
700
|
ReactiveFormsModule,
|
|
699
|
-
], encapsulation: ViewEncapsulation.None, template: "<div class=\"bottomSheetContainer\">\n <div class=\"header\">\n @if(_data.title) {\n <div class=\"title\">\n {{ _data.title }}\n </div>\n }\n @if(!_data.hideFilter) {\n <mat-form-field subscriptSizing=\"dynamic\" appearance=\"outline\">\n <mat-icon matPrefix>search</mat-icon>\n <input matInput #searchInput [placeholder]=\"_data.filterPlaceholder\" [value]=\"queryInput()\" (input)=\"onQueryChange($event, optionsContainer); $event.stopPropagation()\" />\n @if(searchInput.value.length > 0) {\n <button matSuffix mat-icon-button (click)=\"onClearClick(searchInput); $event.stopPropagation()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n \n <mat-chip-listbox [multiple]=\"false\">\n @for(filterKey of _data.config.filtersKeys; track filterKey.key) {\n <mat-chip-option [value]=\"filterKey.key\" [selected]=\"\">{{ filterKey.label() }}</mat-chip-option>\n }\n </mat-chip-listbox>\n }\n\n @if(_data.extraFiltersTemplate) {\n <br />\n <ng-container *ngTemplateOutlet=\"_data.extraFiltersTemplate;\"></ng-container>\n }\n </div>\n <div>\n @if(isLoading()) {\n <mat-progress-bar mode=\"indeterminate\" />\n }\n </div>\n <div #optionsContainer class=\"optionsContainer\" (scroll)=\"onScroll(optionsContainer)\">\n <mat-selection-list [multiple]=\"_data.multiple\" (selectionChange)=\"onSelectionChange($event)\">\n @for(option of options(); track option[_data.config.valueKey]; let last = $last) {\n <mat-list-option \n [value]=\"option[_data.config.valueKey]\"\n [selected]=\"isSelected(option[_data.config.valueKey])\"\n [disabled]=\"_data.config.disabled ? _data.config.disabled(option) : false\"\n >\n {{_data.config.displayedLabel(option)}}\n </mat-list-option>\n @if(!last) {\n <mat-divider />\n }\n }\n </mat-selection-list>\n </div> \n\n\n <div class=\"footer\">\n @if(_data.multiple) {\n <div class=\"length\">\n {{ selectedsOptions().length }} / {{ total() }} {{ _data.multipleItemsLabel }}\n </div>\n <div class=\"actions\">\n @if(selectedsOptions().length > 0) {\n <button
|
|
701
|
+
], encapsulation: ViewEncapsulation.None, template: "<div class=\"bottomSheetContainer\">\n <div class=\"header\">\n @if(_data.title) {\n <div class=\"title\">\n {{ _data.title }}\n </div>\n }\n @if(!_data.hideFilter) {\n <mat-form-field subscriptSizing=\"dynamic\" appearance=\"outline\">\n <mat-icon matPrefix>search</mat-icon>\n <input matInput #searchInput [placeholder]=\"_data.filterPlaceholder\" [value]=\"queryInput()\" (input)=\"onQueryChange($event, optionsContainer); $event.stopPropagation()\" />\n @if(searchInput.value.length > 0) {\n <button matSuffix mat-icon-button (click)=\"onClearClick(searchInput); $event.stopPropagation()\">\n <mat-icon>close</mat-icon>\n </button>\n }\n </mat-form-field>\n \n <mat-chip-listbox [multiple]=\"false\">\n @for(filterKey of _data.config.filtersKeys; track filterKey.key) {\n <mat-chip-option [value]=\"filterKey.key\" [selected]=\"\">{{ filterKey.label() }}</mat-chip-option>\n }\n </mat-chip-listbox>\n }\n\n @if(_data.extraFiltersTemplate) {\n <br />\n <ng-container *ngTemplateOutlet=\"_data.extraFiltersTemplate;\"></ng-container>\n }\n </div>\n <div>\n @if(isLoading()) {\n <mat-progress-bar mode=\"indeterminate\" />\n }\n </div>\n <div #optionsContainer class=\"optionsContainer\" (scroll)=\"onScroll(optionsContainer)\">\n <mat-selection-list [multiple]=\"_data.multiple\" (selectionChange)=\"onSelectionChange($event)\">\n @for(option of options(); track option[_data.config.valueKey]; let last = $last) {\n <mat-list-option \n [value]=\"option[_data.config.valueKey]\"\n [selected]=\"isSelected(option[_data.config.valueKey])\"\n [disabled]=\"_data.config.disabled ? _data.config.disabled(option) : false\"\n >\n {{_data.config.displayedLabel(option)}}\n </mat-list-option>\n @if(!last) {\n <mat-divider />\n }\n }\n </mat-selection-list>\n </div> \n\n\n <div class=\"footer\">\n @if(_data.multiple) {\n <div class=\"length\">\n {{ selectedsOptions().length }} / {{ total() }} {{ _data.multipleItemsLabel }}\n </div>\n <div class=\"actions\">\n @if(selectedsOptions().length > 0) {\n <button matButton (click)=\"onResetClick()\">{{ _data.resetLabel }}</button>\n }\n <button matButton=\"filled\" color=\"primary\" (click)=\"onConfirmMultiSelectionClick()\">{{ _data.confirmLabel }}</button>\n </div>\n } @else {\n <div class=\"length\">\n {{ total() }} {{ _data.itemsLabel }}\n </div>\n }\n </div>\n</div>", styles: [":host{display:flex;flex-direction:column;min-width:720px}.mat-bottom-sheet-container{padding:0 16px!important}.bottomSheetContainer{display:flex;flex-direction:column;height:100%;max-height:80vh}.bottomSheetContainer .header{width:100%;flex:0 0 auto;margin-top:15px}.bottomSheetContainer .header .title{margin-bottom:10px;font-size:20px;font-weight:500}.bottomSheetContainer .header mat-form-field{width:100%}.bottomSheetContainer .header mat-chip-listbox{width:100%}.bottomSheetContainer .loading{display:flex;align-items:center;width:100%;height:20px}.bottomSheetContainer .optionsContainer{flex:1 1 auto;height:360px;width:100%;overflow-y:auto}.bottomSheetContainer .footer{margin-top:8px;width:100%;flex:0 0 auto;display:flex;justify-content:space-between;height:56px;box-shadow:0 15px 10px -15px #0000001a}mat-form-field{--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline)}@media (max-width: 960px){:host{min-width:auto}}\n"] }]
|
|
700
702
|
}], ctorParameters: () => [] });
|
|
701
703
|
|
|
702
704
|
class NgxPaginatedSelect {
|
|
@@ -819,10 +821,10 @@ class NgxPaginatedSelect {
|
|
|
819
821
|
this.control().updateValueAndValidity();
|
|
820
822
|
this._cdr.markForCheck();
|
|
821
823
|
}
|
|
822
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
823
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
824
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxPaginatedSelect, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
825
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: NgxPaginatedSelect, isStandalone: true, selector: "ngx-paginated-select", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, endpoint: { classPropertyName: "endpoint", publicName: "endpoint", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, filters: { classPropertyName: "filters", publicName: "filters", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: true, transformFunction: null }, selectedItems: { classPropertyName: "selectedItems", publicName: "selectedItems", isSignal: true, isRequired: false, transformFunction: null }, hideFilter: { classPropertyName: "hideFilter", publicName: "hideFilter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, itemsLabel: { classPropertyName: "itemsLabel", publicName: "itemsLabel", isSignal: true, isRequired: false, transformFunction: null }, multipleItemsLabel: { classPropertyName: "multipleItemsLabel", publicName: "multipleItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null }, confirmLabel: { classPropertyName: "confirmLabel", publicName: "confirmLabel", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, hideChips: { classPropertyName: "hideChips", publicName: "hideChips", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { resetFilters: "resetFilters" }, viewQueries: [{ propertyName: "extraFiltersTemplate", first: true, predicate: ["extraFiltersTemplate"], descendants: true, isSignal: true }, { propertyName: "matSelect", first: true, predicate: ["matSelect"], descendants: true, isSignal: true }], ngImport: i0, template: "@if(hideChips()) {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n >\n <mat-label>{{ label() }}</mat-label>\n <mat-select \n #matSelect\n [formControl]=\"control()\"\n [multiple]=\"multiple()\"\n class=\"clickable-input\"\n (openedChange)=\"preventOpening($event)\"\n >\n @for(item of _selectedItems(); track item[config().valueKey]) {\n <mat-option [value]=\"item[config().valueKey]\">\n {{ config().displayedLabel(item) }}\n </mat-option>\n }\n </mat-select>\n <div matSuffix>\n @if(clearable() && control().value) {\n <button matIconButton matSuffix (click)=\"onResetClick($event);\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-icon matSuffix>arrow_drop_down</mat-icon>\n </div>\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n} @else {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n >\n <mat-label>{{ label() }}</mat-label>\n <mat-chip-grid \n #chipGrid \n class=\"chips-grid\" \n [formControl]=\"control()\"\n >\n @for(item of _selectedItems(); track item[config().valueKey]) {\n <mat-chip-row\n (removed)=\"onChipRemoved(item)\"\n class=\"chip-item\"\n >\n {{ config().displayedLabel(item) }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n </mat-chip-grid>\n\n\n <input \n matInput\n [matChipInputFor]=\"chipGrid\"\n style=\"display: none\"\n />\n <mat-icon matSuffix>arrow_drop_down</mat-icon>\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n}\n\n<ng-template #extraFiltersTemplate>\n <ng-content select=\"[extra-filters]\" />\n</ng-template>", styles: [":host{display:block;height:100%}mat-form-field{width:100%;cursor:pointer}:host ::ng-deep mat-select .mat-mdc-select-arrow-wrapper{display:none}.clickable-input{cursor:pointer!important;pointer-events:none}.chips-grid{display:flex;flex-wrap:wrap;gap:8px}.chip-item{width:auto!important;max-width:fit-content}mat-form-field{--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-focus-label-text-color: var(--mat-sys-on-surface)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatBottomSheetModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i3$1.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i7$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i7$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i7$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i7$1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }] });
|
|
824
826
|
}
|
|
825
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
827
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxPaginatedSelect, decorators: [{
|
|
826
828
|
type: Component,
|
|
827
829
|
args: [{ selector: 'ngx-paginated-select', imports: [
|
|
828
830
|
MatButtonModule,
|
|
@@ -835,15 +837,239 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImpor
|
|
|
835
837
|
ReactiveFormsModule,
|
|
836
838
|
MatChipsModule,
|
|
837
839
|
MatSelectModule,
|
|
838
|
-
], template: "@if(hideChips()) {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n >\n <mat-label>{{ label() }}</mat-label>\n <mat-select \n #matSelect\n [formControl]=\"control()\"\n [multiple]=\"multiple()\"\n class=\"clickable-input\"\n (openedChange)=\"preventOpening($event)\"\n >\n @for(item of _selectedItems(); track item[config().valueKey]) {\n <mat-option [value]=\"item[config().valueKey]\">\n {{ config().displayedLabel(item) }}\n </mat-option>\n }\n </mat-select>\n <div matSuffix>\n @if(clearable() && control().value) {\n <button matIconButton matSuffix (click)=\"onResetClick($event);\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-icon matSuffix>arrow_drop_down</mat-icon>\n </div>\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n} @else {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n
|
|
839
|
-
}], ctorParameters: () => [] });
|
|
840
|
+
], template: "@if(hideChips()) {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n >\n <mat-label>{{ label() }}</mat-label>\n <mat-select \n #matSelect\n [formControl]=\"control()\"\n [multiple]=\"multiple()\"\n class=\"clickable-input\"\n (openedChange)=\"preventOpening($event)\"\n >\n @for(item of _selectedItems(); track item[config().valueKey]) {\n <mat-option [value]=\"item[config().valueKey]\">\n {{ config().displayedLabel(item) }}\n </mat-option>\n }\n </mat-select>\n <div matSuffix>\n @if(clearable() && control().value) {\n <button matIconButton matSuffix (click)=\"onResetClick($event);\">\n <mat-icon>close</mat-icon>\n </button>\n }\n <mat-icon matSuffix>arrow_drop_down</mat-icon>\n </div>\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n} @else {\n <mat-form-field \n appearance=\"outline\" \n floatLabel=\"always\"\n (click)=\"onOpenBottomSheetClick($event)\"\n >\n <mat-label>{{ label() }}</mat-label>\n <mat-chip-grid \n #chipGrid \n class=\"chips-grid\" \n [formControl]=\"control()\"\n >\n @for(item of _selectedItems(); track item[config().valueKey]) {\n <mat-chip-row\n (removed)=\"onChipRemoved(item)\"\n class=\"chip-item\"\n >\n {{ config().displayedLabel(item) }}\n <button matChipRemove>\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip-row>\n }\n </mat-chip-grid>\n\n\n <input \n matInput\n [matChipInputFor]=\"chipGrid\"\n style=\"display: none\"\n />\n <mat-icon matSuffix>arrow_drop_down</mat-icon>\n <mat-error>{{ error() }}</mat-error>\n </mat-form-field>\n}\n\n<ng-template #extraFiltersTemplate>\n <ng-content select=\"[extra-filters]\" />\n</ng-template>", styles: [":host{display:block;height:100%}mat-form-field{width:100%;cursor:pointer}:host ::ng-deep mat-select .mat-mdc-select-arrow-wrapper{display:none}.clickable-input{cursor:pointer!important;pointer-events:none}.chips-grid{display:flex;flex-wrap:wrap;gap:8px}.chip-item{width:auto!important;max-width:fit-content}mat-form-field{--mat-form-field-outlined-focus-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-hover-outline-color: var(--mat-sys-outline);--mat-form-field-outlined-focus-label-text-color: var(--mat-sys-on-surface)}\n"] }]
|
|
841
|
+
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], endpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "endpoint", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], filters: [{ type: i0.Input, args: [{ isSignal: true, alias: "filters", required: false }] }], control: [{ type: i0.Input, args: [{ isSignal: true, alias: "control", required: true }] }], selectedItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedItems", required: false }] }], hideFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideFilter", required: false }] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], itemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemsLabel", required: false }] }], multipleItemsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleItemsLabel", required: false }] }], resetLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetLabel", required: false }] }], confirmLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "confirmLabel", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], hideChips: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideChips", required: false }] }], resetFilters: [{ type: i0.Output, args: ["resetFilters"] }], extraFiltersTemplate: [{ type: i0.ViewChild, args: ['extraFiltersTemplate', { isSignal: true }] }], matSelect: [{ type: i0.ViewChild, args: ['matSelect', { isSignal: true }] }] } });
|
|
842
|
+
|
|
843
|
+
var DialogBodyType;
|
|
844
|
+
(function (DialogBodyType) {
|
|
845
|
+
DialogBodyType["TEXT"] = "text";
|
|
846
|
+
DialogBodyType["HTML"] = "html";
|
|
847
|
+
DialogBodyType["COMPONENT"] = "component";
|
|
848
|
+
DialogBodyType["TEMPLATE"] = "template";
|
|
849
|
+
})(DialogBodyType || (DialogBodyType = {}));
|
|
850
|
+
// export interface DialogResult<T = any> {
|
|
851
|
+
// confirmed: boolean;
|
|
852
|
+
// data?: T;
|
|
853
|
+
// }
|
|
854
|
+
|
|
855
|
+
class DynamicHostDirective {
|
|
856
|
+
_vcr = inject(ViewContainerRef);
|
|
857
|
+
component = input(...(ngDevMode ? [undefined, { debugName: "component" }] : []));
|
|
858
|
+
data = input(...(ngDevMode ? [undefined, { debugName: "data" }] : []));
|
|
859
|
+
effect = effect(() => {
|
|
860
|
+
const component = this.component();
|
|
861
|
+
const data = this.data();
|
|
862
|
+
if (component) {
|
|
863
|
+
const compRef = this._vcr.createComponent(component);
|
|
864
|
+
if (data) {
|
|
865
|
+
compRef.instance.data = signal(data);
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
}, ...(ngDevMode ? [{ debugName: "effect" }] : []));
|
|
869
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DynamicHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
870
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.10", type: DynamicHostDirective, isStandalone: true, selector: "[ngxDynamicHost]", inputs: { component: { classPropertyName: "component", publicName: "component", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
871
|
+
}
|
|
872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: DynamicHostDirective, decorators: [{
|
|
873
|
+
type: Directive,
|
|
874
|
+
args: [{
|
|
875
|
+
selector: '[ngxDynamicHost]'
|
|
876
|
+
}]
|
|
877
|
+
}], propDecorators: { component: [{ type: i0.Input, args: [{ isSignal: true, alias: "component", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }] } });
|
|
878
|
+
|
|
879
|
+
class NgxDialog {
|
|
880
|
+
//dependencies injection
|
|
881
|
+
_dialogRef = inject((MatDialogRef));
|
|
882
|
+
_data = inject(MAT_DIALOG_DATA);
|
|
883
|
+
title = this._data.title;
|
|
884
|
+
icon = this._data.icon;
|
|
885
|
+
iconColor = this._data.iconColor;
|
|
886
|
+
subtitle = this._data.subtitle;
|
|
887
|
+
body = this._data.body;
|
|
888
|
+
showCancel = this._data.showCancel ?? true;
|
|
889
|
+
showConfirm = this._data.showConfirm ?? true;
|
|
890
|
+
cancelText = this._data.cancelText ?? 'Cancelar';
|
|
891
|
+
confirmText = this._data.confirmText ?? 'Aceptar';
|
|
892
|
+
DialogBodyType = DialogBodyType;
|
|
893
|
+
onCancelClick() {
|
|
894
|
+
this._dialogRef.close(false);
|
|
895
|
+
}
|
|
896
|
+
onConfirmClick() {
|
|
897
|
+
this._dialogRef.close(true);
|
|
898
|
+
}
|
|
899
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
900
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.10", type: NgxDialog, isStandalone: true, selector: "ngx-dialog", ngImport: i0, template: "<h2 mat-dialog-title class=\"title\">\n {{ title }}\n @if(icon) {\n <mat-icon \n [style.color]=\"iconColor\"\n class=\"icon\"\n >\n {{ icon }}\n </mat-icon>\n }\n</h2>\n<mat-dialog-content>\n @if(subtitle) {\n <p class=\"subtitle\">{{ subtitle }}</p>\n <mat-divider />\n }\n\n <div class=\"content\">\n @switch (body.type) {\n @case (DialogBodyType.TEXT) {\n <p>{{ body.content }}</p>\n }\n @case (DialogBodyType.HTML) {\n <div [innerHTML]=\"body.content\"></div>\n }\n @case (DialogBodyType.COMPONENT) {\n <ng-container \n ngxDynamicHost \n [component]=\"$any(body.content)\"\n [data]=\"body.data\"\n />\n }\n @case (DialogBodyType.TEMPLATE) {\n <ng-container \n [ngTemplateOutlet]=\"$any(body.content)\"\n [ngTemplateOutletContext]=\"{ $implicit: body.data }\"\n />\n }\n }\n </div>\n\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n @if(showCancel) {\n <button matButton=\"outlined\" (click)=\"onCancelClick()\">\n {{ cancelText }}\n </button>\n }\n @if(showConfirm) {\n <button matButton=\"filled\" (click)=\"onConfirmClick()\">\n {{ confirmText }}\n </button>\n }\n</mat-dialog-actions>\n", styles: [":host{display:block}h2{display:flex;align-items:center;font-weight:600;padding:8px 16px;gap:8px}mat-icon{min-width:28px;min-height:28px;font-size:28px}.subtitle{font-weight:400;font-size:14px;color:#0009;margin-top:-4px}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2$3.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.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"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: DynamicHostDirective, selector: "[ngxDynamicHost]", inputs: ["component", "data"] }] });
|
|
901
|
+
}
|
|
902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxDialog, decorators: [{
|
|
903
|
+
type: Component,
|
|
904
|
+
args: [{ selector: 'ngx-dialog', imports: [
|
|
905
|
+
MatDialogTitle,
|
|
906
|
+
MatDialogContent,
|
|
907
|
+
MatDialogActions,
|
|
908
|
+
MatDividerModule,
|
|
909
|
+
MatButtonModule,
|
|
910
|
+
MatIconModule,
|
|
911
|
+
CommonModule,
|
|
912
|
+
DynamicHostDirective
|
|
913
|
+
], template: "<h2 mat-dialog-title class=\"title\">\n {{ title }}\n @if(icon) {\n <mat-icon \n [style.color]=\"iconColor\"\n class=\"icon\"\n >\n {{ icon }}\n </mat-icon>\n }\n</h2>\n<mat-dialog-content>\n @if(subtitle) {\n <p class=\"subtitle\">{{ subtitle }}</p>\n <mat-divider />\n }\n\n <div class=\"content\">\n @switch (body.type) {\n @case (DialogBodyType.TEXT) {\n <p>{{ body.content }}</p>\n }\n @case (DialogBodyType.HTML) {\n <div [innerHTML]=\"body.content\"></div>\n }\n @case (DialogBodyType.COMPONENT) {\n <ng-container \n ngxDynamicHost \n [component]=\"$any(body.content)\"\n [data]=\"body.data\"\n />\n }\n @case (DialogBodyType.TEMPLATE) {\n <ng-container \n [ngTemplateOutlet]=\"$any(body.content)\"\n [ngTemplateOutletContext]=\"{ $implicit: body.data }\"\n />\n }\n }\n </div>\n\n</mat-dialog-content>\n<mat-dialog-actions align=\"end\">\n @if(showCancel) {\n <button matButton=\"outlined\" (click)=\"onCancelClick()\">\n {{ cancelText }}\n </button>\n }\n @if(showConfirm) {\n <button matButton=\"filled\" (click)=\"onConfirmClick()\">\n {{ confirmText }}\n </button>\n }\n</mat-dialog-actions>\n", styles: [":host{display:block}h2{display:flex;align-items:center;font-weight:600;padding:8px 16px;gap:8px}mat-icon{min-width:28px;min-height:28px;font-size:28px}.subtitle{font-weight:400;font-size:14px;color:#0009;margin-top:-4px}\n"] }]
|
|
914
|
+
}] });
|
|
915
|
+
|
|
916
|
+
class NgxDialogService {
|
|
917
|
+
// dependencies injection
|
|
918
|
+
_dialog = inject(MatDialog);
|
|
919
|
+
/**
|
|
920
|
+
*
|
|
921
|
+
* @param config
|
|
922
|
+
* @param dialogConfig
|
|
923
|
+
* @returns Observable<DialogResult>
|
|
924
|
+
*
|
|
925
|
+
* Opens a text dialog with the provided configuration.
|
|
926
|
+
*/
|
|
927
|
+
openText(config, dialogConfig) {
|
|
928
|
+
return this._dialog.open(NgxDialog, {
|
|
929
|
+
...dialogConfig,
|
|
930
|
+
data: {
|
|
931
|
+
...config,
|
|
932
|
+
body: {
|
|
933
|
+
type: DialogBodyType.TEXT,
|
|
934
|
+
content: config.content
|
|
935
|
+
},
|
|
936
|
+
},
|
|
937
|
+
minWidth: dialogConfig?.minWidth ?? '400px',
|
|
938
|
+
autoFocus: dialogConfig?.autoFocus ?? false
|
|
939
|
+
}).afterClosed();
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
*
|
|
943
|
+
* @param title
|
|
944
|
+
* @param message
|
|
945
|
+
* @param cancelText
|
|
946
|
+
* @param confirmText
|
|
947
|
+
* @param dialogConfig
|
|
948
|
+
* @returns Observable<DialogResult>
|
|
949
|
+
*
|
|
950
|
+
* Opens a confirmation dialog with cancel and confirm buttons.
|
|
951
|
+
*/
|
|
952
|
+
confirm(config, dialogConfig) {
|
|
953
|
+
return this.openText({
|
|
954
|
+
title: config.title,
|
|
955
|
+
content: config.message,
|
|
956
|
+
subtitle: config.subtitle,
|
|
957
|
+
icon: config.icon,
|
|
958
|
+
iconColor: config.iconColor,
|
|
959
|
+
cancelText: config.cancelText ?? 'Cancelar',
|
|
960
|
+
confirmText: config.confirmText ?? 'Confirmar'
|
|
961
|
+
}, dialogConfig);
|
|
962
|
+
}
|
|
963
|
+
/**
|
|
964
|
+
*
|
|
965
|
+
* @param title
|
|
966
|
+
* @param message
|
|
967
|
+
* @param confirmText
|
|
968
|
+
* @param dialogConfig
|
|
969
|
+
* @returns Observable<DialogResult>
|
|
970
|
+
*
|
|
971
|
+
* Opens an informational dialog with a single confirm button.
|
|
972
|
+
*/
|
|
973
|
+
info(config, dialogConfig) {
|
|
974
|
+
return this.openText({
|
|
975
|
+
title: config.title,
|
|
976
|
+
content: config.message,
|
|
977
|
+
subtitle: config.subtitle,
|
|
978
|
+
icon: config.icon,
|
|
979
|
+
iconColor: config.iconColor,
|
|
980
|
+
showCancel: false,
|
|
981
|
+
confirmText: config.confirmText ?? 'Aceptar',
|
|
982
|
+
}, dialogConfig);
|
|
983
|
+
}
|
|
984
|
+
/**
|
|
985
|
+
*
|
|
986
|
+
* @param config
|
|
987
|
+
* @param dialogConfig
|
|
988
|
+
* @returns Observable<DialogResult>
|
|
989
|
+
*
|
|
990
|
+
* Opens an HTML dialog with the provided configuration.
|
|
991
|
+
*/
|
|
992
|
+
html(config, dialogConfig) {
|
|
993
|
+
return this._dialog.open(NgxDialog, {
|
|
994
|
+
...dialogConfig,
|
|
995
|
+
data: {
|
|
996
|
+
...config,
|
|
997
|
+
body: {
|
|
998
|
+
type: DialogBodyType.HTML,
|
|
999
|
+
content: config.html
|
|
1000
|
+
},
|
|
1001
|
+
},
|
|
1002
|
+
minWidth: dialogConfig?.minWidth ?? '400px',
|
|
1003
|
+
autoFocus: dialogConfig?.autoFocus ?? false
|
|
1004
|
+
}).afterClosed();
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
*
|
|
1008
|
+
* @param config
|
|
1009
|
+
* @return Observable<DialogResult>
|
|
1010
|
+
*
|
|
1011
|
+
* Opens a component dialog with the provided configuration.
|
|
1012
|
+
*/
|
|
1013
|
+
component(config, dialogConfig) {
|
|
1014
|
+
return this._dialog.open((NgxDialog), {
|
|
1015
|
+
...dialogConfig,
|
|
1016
|
+
data: {
|
|
1017
|
+
title: config.title,
|
|
1018
|
+
subtitle: config.subtitle,
|
|
1019
|
+
icon: config.icon,
|
|
1020
|
+
iconColor: config.iconColor,
|
|
1021
|
+
body: {
|
|
1022
|
+
type: DialogBodyType.COMPONENT,
|
|
1023
|
+
content: config.component,
|
|
1024
|
+
data: config.componentData
|
|
1025
|
+
},
|
|
1026
|
+
cancelText: config.cancelText,
|
|
1027
|
+
confirmText: config.confirmText,
|
|
1028
|
+
showCancel: config.showCancel,
|
|
1029
|
+
showConfirm: config.showConfirm,
|
|
1030
|
+
},
|
|
1031
|
+
minWidth: dialogConfig?.minWidth ?? '400px',
|
|
1032
|
+
autoFocus: dialogConfig?.autoFocus ?? false
|
|
1033
|
+
}).afterClosed();
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
*
|
|
1037
|
+
* @param config
|
|
1038
|
+
* @param dialogConfig
|
|
1039
|
+
* @returns Observable<DialogResult>
|
|
1040
|
+
*
|
|
1041
|
+
* Opens a template dialog with the provided configuration.
|
|
1042
|
+
*/
|
|
1043
|
+
template(config, dialogConfig) {
|
|
1044
|
+
return this._dialog.open((NgxDialog), {
|
|
1045
|
+
...dialogConfig,
|
|
1046
|
+
data: {
|
|
1047
|
+
...config,
|
|
1048
|
+
body: {
|
|
1049
|
+
type: DialogBodyType.TEMPLATE,
|
|
1050
|
+
content: config.template,
|
|
1051
|
+
data: config.templateData
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
minWidth: dialogConfig?.minWidth ?? '400px',
|
|
1055
|
+
autoFocus: dialogConfig?.autoFocus ?? false
|
|
1056
|
+
}).afterClosed();
|
|
1057
|
+
}
|
|
1058
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1059
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxDialogService, providedIn: 'root' });
|
|
1060
|
+
}
|
|
1061
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.10", ngImport: i0, type: NgxDialogService, decorators: [{
|
|
1062
|
+
type: Injectable,
|
|
1063
|
+
args: [{
|
|
1064
|
+
providedIn: 'root'
|
|
1065
|
+
}]
|
|
1066
|
+
}] });
|
|
840
1067
|
|
|
841
|
-
// export * from './lib/services/index';
|
|
842
1068
|
// export * from './lib/utils/index';
|
|
843
1069
|
|
|
844
1070
|
/**
|
|
845
1071
|
* Generated bundle index. Do not edit.
|
|
846
1072
|
*/
|
|
847
1073
|
|
|
848
|
-
export { NgxBasicSelect, NgxBasicTable, NgxInputFile, NgxLoadingButton, NgxPaginatedSelect, NgxPaginatedTable };
|
|
1074
|
+
export { NgxBasicSelect, NgxBasicTable, NgxDialog, NgxDialogService, NgxInputFile, NgxLoadingButton, NgxPaginatedSelect, NgxPaginatedTable };
|
|
849
1075
|
//# sourceMappingURL=ngx-eiffage-material.mjs.map
|