@bootkit/ng0 0.0.0-alpha.36 → 0.0.0-alpha.38
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/components/accordion/index.d.ts +13 -3
- package/components/offcanvas/index.d.ts +13 -5
- package/fesm2022/bootkit-ng0-common.mjs +3 -3
- package/fesm2022/bootkit-ng0-common.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-accordion.mjs +29 -22
- package/fesm2022/bootkit-ng0-components-accordion.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-backdrop.mjs +3 -3
- package/fesm2022/bootkit-ng0-components-backdrop.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-button.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-button.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-card.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-card.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-code.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-code.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-collapse.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-collapse.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-confirmation.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-confirmation.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-dropdown.mjs +22 -22
- package/fesm2022/bootkit-ng0-components-dropdown.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-form-field.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-form-field.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-list.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-list.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-modal.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-modal.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-nav.mjs +19 -19
- package/fesm2022/bootkit-ng0-components-nav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs +19 -12
- package/fesm2022/bootkit-ng0-components-offcanvas.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-pagination.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-pagination.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-popover.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-popover.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-select.mjs +7 -7
- package/fesm2022/bootkit-ng0-components-select.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-sidenav.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-sidenav.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-stepper.mjs +10 -10
- package/fesm2022/bootkit-ng0-components-stepper.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-table.mjs +13 -13
- package/fesm2022/bootkit-ng0-components-table.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-toast.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-toast.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-tooltip.mjs +6 -6
- package/fesm2022/bootkit-ng0-components-tooltip.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs +19 -19
- package/fesm2022/bootkit-ng0-components-vertical-menu.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-form.mjs +25 -25
- package/fesm2022/bootkit-ng0-form.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-http.mjs +4 -4
- package/fesm2022/bootkit-ng0-http.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs +19 -19
- package/fesm2022/bootkit-ng0-layouts-layout1.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-localization.mjs +34 -34
- package/fesm2022/bootkit-ng0-localization.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-platform-browser.mjs +136 -8
- package/fesm2022/bootkit-ng0-platform-browser.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-routing.mjs +3 -3
- package/fesm2022/bootkit-ng0-routing.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-script.mjs +3 -3
- package/fesm2022/bootkit-ng0-script.mjs.map +1 -1
- package/fesm2022/bootkit-ng0-security.mjs +13 -13
- package/fesm2022/bootkit-ng0-security.mjs.map +1 -1
- package/fesm2022/bootkit-ng0.mjs +2 -2
- package/fesm2022/bootkit-ng0.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +13 -13
- package/platform/browser/index.d.ts +73 -7
|
@@ -125,10 +125,10 @@ class TableColumnDirective {
|
|
|
125
125
|
this.sortDirection.set('none');
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
129
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
128
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
129
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: TableColumnDirective, isStandalone: true, selector: "ng0-table-col", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, emptyCellText: { classPropertyName: "emptyCellText", publicName: "emptyCellText", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, cellClass: { classPropertyName: "cellClass", publicName: "cellClass", isSignal: true, isRequired: false, transformFunction: null }, bold: { classPropertyName: "bold", publicName: "bold", isSignal: true, isRequired: false, transformFunction: null }, shrink: { classPropertyName: "shrink", publicName: "shrink", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, filterValue: { classPropertyName: "filterValue", publicName: "filterValue", isSignal: true, isRequired: false, transformFunction: null }, filterField: { classPropertyName: "filterField", publicName: "filterField", isSignal: true, isRequired: false, transformFunction: null }, filterOperator: { classPropertyName: "filterOperator", publicName: "filterOperator", isSignal: true, isRequired: false, transformFunction: null }, filterOperators: { classPropertyName: "filterOperators", publicName: "filterOperators", isSignal: true, isRequired: false, transformFunction: null }, fieldName: { classPropertyName: "fieldName", publicName: "fieldName", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterValue: "filterValueChange", filterOperator: "filterOperatorChange", sortDirection: "sortDirectionChange" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0 });
|
|
130
130
|
}
|
|
131
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableColumnDirective, decorators: [{
|
|
132
132
|
type: Directive,
|
|
133
133
|
args: [{
|
|
134
134
|
selector: 'ng0-table-col',
|
|
@@ -145,10 +145,10 @@ class TableDetailRowDirective {
|
|
|
145
145
|
constructor(templateRef) {
|
|
146
146
|
this.templateRef = templateRef;
|
|
147
147
|
}
|
|
148
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
149
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
148
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableDetailRowDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
149
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: TableDetailRowDirective, isStandalone: true, selector: "[ng0-table-detail-row]", inputs: { showCallback: "showCallback" }, ngImport: i0 });
|
|
150
150
|
}
|
|
151
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
151
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableDetailRowDirective, decorators: [{
|
|
152
152
|
type: Directive,
|
|
153
153
|
args: [{
|
|
154
154
|
selector: '[ng0-table-detail-row]',
|
|
@@ -404,10 +404,10 @@ class TableComponent {
|
|
|
404
404
|
ngOnDestroy() {
|
|
405
405
|
this._changeSubscription?.unsubscribe();
|
|
406
406
|
}
|
|
407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.11", type: TableComponent, isStandalone: true, selector: "ng0-table", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, headerClass: { classPropertyName: "headerClass", publicName: "headerClass", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, loadingIndicator: { classPropertyName: "loadingIndicator", publicName: "loadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, loadingCover: { classPropertyName: "loadingCover", publicName: "loadingCover", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng0-loading": "this.isLoading" } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "@let $dataResult = _dataResult();\r\n@let $pageable = pageable();\r\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\r\n@let $data = $dataResult?.data;\r\n@let $anyRecords = $data && $data.length > 0;\r\n@let $totalRecordsCount = $dataResult?.total;\r\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\r\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\r\n@let $isLoading = _dataSource.isLoading();\r\n@let $isFirstLoad = $dataResult == undefined;\r\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\r\n@let $tableLocale = _ls.get()?.definition?.components?.table;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if (caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n @if (showHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n }\r\n\r\n @if (filterable()) {\r\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\r\n }\r\n\r\n <tbody>\r\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\r\n <tr class=\"ng0-table-loading-row\">\r\n <td [attr.colspan]=\"$columnsCount\">\r\n @switch (loadingIndicator()) {\r\n @case ('spinner') {\r\n <div class=\"text-center\">\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n </div>\r\n }\r\n }\r\n </td>\r\n </tr>\r\n } @else {\r\n @if ($data) {\r\n @if ($data.length > 0) {\r\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\r\n } @else {\r\n <tr class=\"ng0-table-no-records-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\r\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\r\n </td>\r\n </tr>\r\n }\r\n } @else if (_lastError) {\r\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n</div>\r\n\r\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\r\n<div class=\"ng0-table-loading-cover text-center\">\r\n @if (loadingCover() == 'spinner') {\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n }\r\n</div>\r\n}\r\n\r\n<ng-template #filtersTemplate>\r\n <thead>\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th>\r\n @if(col.filterable() && (col.field() || col.filterValue())) {\r\n\r\n <div class=\"input-group\">\r\n @switch (col.type()) {\r\n @case ('text') {\r\n <input [name]=\"'filter-' + col.field\"\r\n type=\"search\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n @case ('number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"search\"\r\n ng0Number\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n }\r\n\r\n <button class=\"btn btn-outline-light\"\r\n style=\"border-color: var(--bs-border-color);\"\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n (click)=\"_onToggleFilterOperator(col)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\r\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\r\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\r\n (detach)=\"col.showFilterOperators.set(false)\">\r\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\r\n @for (item of col.getFilterOperators(); track $index) {\r\n <li>\r\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\r\n (click)=\"_onSelectFilterOperator(col, item)\">\r\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </ng-template>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate>\r\n <thead [ngClass]=\"headerClass()\">\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th class=\"row-number text-muted\">#</th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th\r\n (click)=\"col.toggleSortDirection(); load()\"\r\n [class.sortable]=\"sortable() && col.sortable()\"\r\n [ngClass]=\"{ \r\n 'sort-asc': col.sortDirection() == 'asc', \r\n 'sort-desc': col.sortDirection() == 'desc',\r\n 'sort-none': col.sortDirection() == 'none'\r\n }\">\r\n {{ col.title() }}\r\n\r\n @if(sortable() && col.sortable()) {\r\n <svg class=\"ng0-table-sort-icon\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #dataRowsTemplate>\r\n @for (row of $data; track $index) {\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n @if (_detailRow) {\r\n <td class=\"detail-row-expander\">\r\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\r\n @if (isRowExpanded(row)) {\r\n <i class=\"far fa-minus\"></i>\r\n } @else {\r\n <i class=\"far fa-plus\"></i>\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <td class=\"ng0-table-row-number\">\r\n {{ $firstRecord + $index }}\r\n </td>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <td\r\n [ngClass]=\"col.cellClass()\"\r\n [class.shrinked]=\"col.shrink()\"\r\n [class.fw-bold]=\"col.bold()\">\r\n @if (col.template) {\r\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\r\n </ng-container>\r\n } @else if (col.field()) {\r\n @let cellValue = _getCellValue(row, col);\r\n\r\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\r\n {{ col.emptyCellText() }}\r\n } @else {\r\n @if (col.type()) {\r\n @let type = $any(col.type());\r\n\r\n @if (type == \"date\") {\r\n {{ cellValue | ng0Date }}\r\n } @else if (type == \"number\") {\r\n {{ cellValue | number }}\r\n } @else if (type == \"currency\") {\r\n {{ cellValue | currency }}\r\n } @else if (type.enum) {\r\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\r\n } @else if (type.boolean || type == \"boolean\") {\r\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\r\n }@else {\r\n {{ cellValue }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n }\r\n </tr>\r\n\r\n @if (_detailRow && isRowExpanded(row)) {\r\n <tr class=\"detail-row\">\r\n <td\r\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\r\n class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #footerTemplate>\r\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\r\n <div class=\"ng0-table-pagination me-2\">\r\n <ng0-pagination\r\n class=\"mb-0 d-inline-block\"\r\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\r\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\r\n [totalRecords]=\"$totalRecordsCount!\"\r\n [pageSize]=\"$pageable.pageSize!\"\r\n [selectedPage]=\"$pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{ \"first\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{ \"last\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{ \"next\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{ \"previous\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\r\n <div class=\"ng0-table-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n }\r\n\r\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\r\n <div class=\"ng0-table-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{\r\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\r\n currentPage: $pageIndex!})\r\n }}\r\n </ng-content>\r\n </div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #nowDataTemplate>\r\n <tr class=\"ng0-table-error-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\r\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\r\n {{ \"retry\" | ng0Translate }}\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}tbody{position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}.ng0-table-loading-cover{position:absolute;inset:0;background-color:#0000000d;transition:background-color .2s;z-index:1000;display:flex;align-items:center;justify-content:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "component", type: PaginationComponent, selector: "ng0-pagination", inputs: ["totalRecords", "pageSize", "selectedPage", "maxVisiblePages", "showNextPreviousButtons", "showFirstLastButtons"], outputs: ["itemClick"], exportAs: ["ng0Pagination"] }, { kind: "directive", type: NumberDirective, selector: "[ng0Number]", inputs: ["minFractionDigits", "maxFractionDigits", "useGrouping", "numberType"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i1.TranslateEnumPipe, name: "ng0TranslateEnum" }, { kind: "pipe", type: i1.DatePipe, name: "ng0Date" }, { kind: "pipe", type: i1.LocalizeBooleanPipe, name: "ng0LocalizeBool" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableComponent, deps: [{ token: i1.LocalizationService }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
408
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TableComponent, isStandalone: true, selector: "ng0-table", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, autoLoad: { classPropertyName: "autoLoad", publicName: "autoLoad", isSignal: true, isRequired: false, transformFunction: null }, showRowNumbers: { classPropertyName: "showRowNumbers", publicName: "showRowNumbers", isSignal: true, isRequired: false, transformFunction: null }, showHeader: { classPropertyName: "showHeader", publicName: "showHeader", isSignal: true, isRequired: false, transformFunction: null }, pageable: { classPropertyName: "pageable", publicName: "pageable", isSignal: true, isRequired: false, transformFunction: null }, sortable: { classPropertyName: "sortable", publicName: "sortable", isSignal: true, isRequired: false, transformFunction: null }, tableClass: { classPropertyName: "tableClass", publicName: "tableClass", isSignal: true, isRequired: false, transformFunction: null }, headerClass: { classPropertyName: "headerClass", publicName: "headerClass", isSignal: true, isRequired: false, transformFunction: null }, caption: { classPropertyName: "caption", publicName: "caption", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, filterable: { classPropertyName: "filterable", publicName: "filterable", isSignal: true, isRequired: false, transformFunction: null }, loadingIndicator: { classPropertyName: "loadingIndicator", publicName: "loadingIndicator", isSignal: true, isRequired: false, transformFunction: null }, loadingCover: { classPropertyName: "loadingCover", publicName: "loadingCover", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ng0-loading": "this.isLoading" } }, queries: [{ propertyName: "_detailRow", first: true, predicate: TableDetailRowDirective, descendants: true }, { propertyName: "_columns", predicate: TableColumnDirective }], exportAs: ["ng0Table"], ngImport: i0, template: "@let $dataResult = _dataResult();\r\n@let $pageable = pageable();\r\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\r\n@let $data = $dataResult?.data;\r\n@let $anyRecords = $data && $data.length > 0;\r\n@let $totalRecordsCount = $dataResult?.total;\r\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\r\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\r\n@let $isLoading = _dataSource.isLoading();\r\n@let $isFirstLoad = $dataResult == undefined;\r\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\r\n@let $tableLocale = _ls.get()?.definition?.components?.table;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if (caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n @if (showHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n }\r\n\r\n @if (filterable()) {\r\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\r\n }\r\n\r\n <tbody>\r\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\r\n <tr class=\"ng0-table-loading-row\">\r\n <td [attr.colspan]=\"$columnsCount\">\r\n @switch (loadingIndicator()) {\r\n @case ('spinner') {\r\n <div class=\"text-center\">\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n </div>\r\n }\r\n }\r\n </td>\r\n </tr>\r\n } @else {\r\n @if ($data) {\r\n @if ($data.length > 0) {\r\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\r\n } @else {\r\n <tr class=\"ng0-table-no-records-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\r\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\r\n </td>\r\n </tr>\r\n }\r\n } @else if (_lastError) {\r\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n</div>\r\n\r\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\r\n<div class=\"ng0-table-loading-cover text-center\">\r\n @if (loadingCover() == 'spinner') {\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n }\r\n</div>\r\n}\r\n\r\n<ng-template #filtersTemplate>\r\n <thead>\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th>\r\n @if(col.filterable() && (col.field() || col.filterValue())) {\r\n\r\n <div class=\"input-group\">\r\n @switch (col.type()) {\r\n @case ('text') {\r\n <input [name]=\"'filter-' + col.field\"\r\n type=\"search\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n @case ('number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"search\"\r\n ng0Number\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n }\r\n\r\n <button class=\"btn btn-outline-light\"\r\n style=\"border-color: var(--bs-border-color);\"\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n (click)=\"_onToggleFilterOperator(col)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\r\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\r\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\r\n (detach)=\"col.showFilterOperators.set(false)\">\r\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\r\n @for (item of col.getFilterOperators(); track $index) {\r\n <li>\r\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\r\n (click)=\"_onSelectFilterOperator(col, item)\">\r\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </ng-template>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate>\r\n <thead [ngClass]=\"headerClass()\">\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th class=\"row-number text-muted\">#</th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th\r\n (click)=\"col.toggleSortDirection(); load()\"\r\n [class.sortable]=\"sortable() && col.sortable()\"\r\n [ngClass]=\"{ \r\n 'sort-asc': col.sortDirection() == 'asc', \r\n 'sort-desc': col.sortDirection() == 'desc',\r\n 'sort-none': col.sortDirection() == 'none'\r\n }\">\r\n {{ col.title() }}\r\n\r\n @if(sortable() && col.sortable()) {\r\n <svg class=\"ng0-table-sort-icon\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #dataRowsTemplate>\r\n @for (row of $data; track $index) {\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n @if (_detailRow) {\r\n <td class=\"detail-row-expander\">\r\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\r\n @if (isRowExpanded(row)) {\r\n <i class=\"far fa-minus\"></i>\r\n } @else {\r\n <i class=\"far fa-plus\"></i>\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <td class=\"ng0-table-row-number\">\r\n {{ $firstRecord + $index }}\r\n </td>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <td\r\n [ngClass]=\"col.cellClass()\"\r\n [class.shrinked]=\"col.shrink()\"\r\n [class.fw-bold]=\"col.bold()\">\r\n @if (col.template) {\r\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\r\n </ng-container>\r\n } @else if (col.field()) {\r\n @let cellValue = _getCellValue(row, col);\r\n\r\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\r\n {{ col.emptyCellText() }}\r\n } @else {\r\n @if (col.type()) {\r\n @let type = $any(col.type());\r\n\r\n @if (type == \"date\") {\r\n {{ cellValue | ng0Date }}\r\n } @else if (type == \"number\") {\r\n {{ cellValue | number }}\r\n } @else if (type == \"currency\") {\r\n {{ cellValue | currency }}\r\n } @else if (type.enum) {\r\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\r\n } @else if (type.boolean || type == \"boolean\") {\r\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\r\n }@else {\r\n {{ cellValue }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n }\r\n </tr>\r\n\r\n @if (_detailRow && isRowExpanded(row)) {\r\n <tr class=\"detail-row\">\r\n <td\r\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\r\n class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #footerTemplate>\r\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\r\n <div class=\"ng0-table-pagination me-2\">\r\n <ng0-pagination\r\n class=\"mb-0 d-inline-block\"\r\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\r\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\r\n [totalRecords]=\"$totalRecordsCount!\"\r\n [pageSize]=\"$pageable.pageSize!\"\r\n [selectedPage]=\"$pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{ \"first\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{ \"last\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{ \"next\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{ \"previous\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\r\n <div class=\"ng0-table-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n }\r\n\r\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\r\n <div class=\"ng0-table-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{\r\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\r\n currentPage: $pageIndex!})\r\n }}\r\n </ng-content>\r\n </div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #nowDataTemplate>\r\n <tr class=\"ng0-table-error-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\r\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\r\n {{ \"retry\" | ng0Translate }}\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>", styles: [":host{display:flex;flex-direction:column;position:relative}@starting-style{.ng0-table-loading-cover{background-color:#0000}}table{margin-bottom:0}th.sortable{cursor:pointer;-webkit-user-select:none;user-select:none}th.sortable .ng0-table-sort-icon{transition:transform .2s;opacity:0}th.sortable.sort-none:hover .ng0-table-sort-icon{opacity:.4}th.sortable.sort-asc .ng0-table-sort-icon{transform:rotate(0);opacity:1;color:var(--bs-danger)}th.sortable.sort-desc .ng0-table-sort-icon{transform:rotate(180deg);opacity:1;color:var(--bs-primary)}tbody{position:relative}td.row-number{width:0}td.shrinked{width:0;white-space:nowrap}.ng0-table-loading-cover{position:absolute;inset:0;background-color:#0000000d;transition:background-color .2s;z-index:1000;display:flex;align-items:center;justify-content:center}.table-scrollable{overflow-y:auto;direction:ltr;scroll-padding:20px}.table-scrollable::-webkit-scrollbar{width:8px}.table-scrollable::-webkit-scrollbar-track{background-color:#00000008}.table-scrollable::-webkit-scrollbar-thumb{background-color:var(--bs-secondary)}.table-scrollable thead th{position:sticky;top:0}.ng0-table-footer{margin-top:.5rem}.fade-in{animation:fade-in .5s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "component", type: PaginationComponent, selector: "ng0-pagination", inputs: ["totalRecords", "pageSize", "selectedPage", "maxVisiblePages", "showNextPreviousButtons", "showFirstLastButtons"], outputs: ["itemClick"], exportAs: ["ng0Pagination"] }, { kind: "directive", type: NumberDirective, selector: "[ng0Number]", inputs: ["minFractionDigits", "maxFractionDigits", "useGrouping", "numberType"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1.TranslatePipe, name: "ng0Translate" }, { kind: "pipe", type: i1.TranslateEnumPipe, name: "ng0TranslateEnum" }, { kind: "pipe", type: i1.DatePipe, name: "ng0Date" }, { kind: "pipe", type: i1.LocalizeBooleanPipe, name: "ng0LocalizeBool" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
409
409
|
}
|
|
410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableComponent, decorators: [{
|
|
411
411
|
type: Component,
|
|
412
412
|
args: [{ selector: 'ng0-table', exportAs: 'ng0Table', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
|
|
413
413
|
CommonModule,
|
|
@@ -429,15 +429,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.11", ngImpo
|
|
|
429
429
|
}] } });
|
|
430
430
|
|
|
431
431
|
class TableModule {
|
|
432
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
433
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
433
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.9", ngImport: i0, type: TableModule, imports: [TableComponent,
|
|
434
434
|
TableColumnDirective,
|
|
435
435
|
TableDetailRowDirective], exports: [TableComponent,
|
|
436
436
|
TableColumnDirective,
|
|
437
437
|
TableDetailRowDirective] });
|
|
438
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
438
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableModule, imports: [TableComponent] });
|
|
439
439
|
}
|
|
440
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
440
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TableModule, decorators: [{
|
|
441
441
|
type: NgModule,
|
|
442
442
|
args: [{
|
|
443
443
|
imports: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-table.mjs","sources":["../../../projects/ng0/components/table/table-column.directive.ts","../../../projects/ng0/components/table/table-detail-row.directive.ts","../../../projects/ng0/components/table/table.component.ts","../../../projects/ng0/components/table/table.component.html","../../../projects/ng0/components/table/table.module.ts","../../../projects/ng0/components/table/bootkit-ng0-components-table.ts"],"sourcesContent":["import { booleanAttribute, ContentChild, Directive, input, model, OnInit, signal, TemplateRef } from '@angular/core';\r\nimport { TableCellType } from './types';\r\n\r\n@Directive({\r\n selector: 'ng0-table-col',\r\n standalone: true,\r\n})\r\nexport class TableColumnDirective implements OnInit {\r\n /**\r\n * The field in the data source to bind to. If not set, the column will not display any data.\r\n */\r\n field = input<string>();\r\n\r\n /**\r\n * The title of the column. This will be displayed in the header row.\r\n */\r\n title = input<string>();\r\n\r\n /**\r\n * Text to display in the cell if the value is null or undefined.\r\n */\r\n emptyCellText = input<string>();\r\n\r\n /**\r\n * Type of the table cell.\r\n */\r\n type = input<TableCellType>('text');\r\n\r\n /**\r\n * CSS class(es) to apply to the table cell.\r\n */\r\n cellClass = input<string | string[] | { [klass: string]: any; } | null>();\r\n\r\n /** \r\n * @deprecated Use `cellClass` instead.\r\n */\r\n bold = input(false, { transform: booleanAttribute });\r\n\r\n /** \r\n * @deprecated Use `cellClass` instead.\r\n */\r\n shrink = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the column will support filtering.\r\n */\r\n filterable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The current filter value of the column.\r\n */\r\n filterValue = model<any>();\r\n\r\n /**\r\n * The field to use for filtering. If not set, the `field` property will be used.\r\n * @deprecated Use `fieldName` instead.\r\n */\r\n filterField = input<string>();\r\n\r\n /**\r\n * The current filter operator of the column.\r\n */\r\n filterOperator = model<string>();\r\n\r\n /**\r\n * The list of filter operators to show in the filter dropdown. If not set, a default list will be used based on the column type.\r\n */\r\n filterOperators = input<string[]>();\r\n\r\n /**\r\n * If true, the filter operators dropdown will be shown.\r\n */\r\n showFilterOperators = signal(false);\r\n\r\n /**\r\n * The name of the field in the data source. If not set, the `field` property will be used.\r\n */\r\n fieldName = input<string>();\r\n\r\n /**\r\n * If true, the column will support sorting.\r\n */\r\n public sortable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The current sort direction of the column.\r\n */\r\n public sortDirection = model<'none' | 'asc' | 'desc'>('none');\r\n\r\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.filterOperator() == undefined) {\r\n this.filterOperator.set(this.type() == 'text' ? 'contains' : 'eq');\r\n }\r\n }\r\n\r\n /**\r\n * Get the list of filter operators to show in the filter dropdown.\r\n */\r\n public getFilterOperators(): string[] {\r\n let op = this.filterOperators();\r\n if (op && op.length > 0)\r\n return op;\r\n\r\n let type = this.type();\r\n if (type == 'number' || type == 'currency' || type == 'date' || type == 'time') {\r\n return ['eq', 'ne', 'gt', 'gte', 'lt', 'lte',]\r\n } else if (type == 'text') {\r\n return ['contains', 'startsWith', 'endsWith', 'eq', 'ne']\r\n } else {\r\n return []\r\n }\r\n }\r\n\r\n /**\r\n * Toggle the sort direction of the column.\r\n * @returns void\r\n */\r\n public toggleSortDirection(): void {\r\n if (!this.sortable()) {\r\n return;\r\n }\r\n\r\n let dir = this.sortDirection();\r\n if (dir === 'none') {\r\n this.sortDirection.set('asc');\r\n } else if (dir === 'asc') {\r\n this.sortDirection.set('desc');\r\n } else {\r\n this.sortDirection.set('none');\r\n }\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n selector: '[ng0-table-detail-row]',\r\n standalone: true,\r\n})\r\nexport class TableDetailRowDirective {\r\n @Input() showCallback?: (row: any) => boolean;\r\n\r\n constructor(public readonly templateRef: TemplateRef<any>) {\r\n }\r\n}\r\n","import { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, computed, ContentChild, ContentChildren, DestroyRef, HostBinding, input, model, OnDestroy, OnInit, QueryList, signal } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { formatString } from '@bootkit/ng0/common';\r\nimport { LocalizationModule, LocalizationService, TableComponentPagingFormatter } from '@bootkit/ng0/localization';\r\nimport { DataRequest, DataRequestFilter, DataRequestPage, DataRequestSort, DataResult, DataSource, dataSourceAttribute, DataSourceLike, LogicalOperator } from '@bootkit/ng0/data';\r\nimport { PaginationComponent } from '@bootkit/ng0/components/pagination';\r\nimport { TablePagingOptions } from './types';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NumberDirective } from '@bootkit/ng0/form';\r\n\r\n/**\r\n * A generic table component that can display data in a tabular format.\r\n * It supports features like pagination, sorting, filtering, and row details.\r\n * It can be used with any data source that implements the DataSource interface.\r\n */\r\n@Component({\r\n selector: 'ng0-table',\r\n exportAs: 'ng0Table',\r\n templateUrl: './table.component.html',\r\n styleUrls: ['./table.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n LocalizationModule,\r\n PaginationComponent,\r\n NumberDirective,\r\n OverlayModule\r\n ]\r\n})\r\nexport class TableComponent implements OnInit, AfterContentInit, OnDestroy {\r\n /**\r\n * The data source for the table.\r\n * This can be an array of data, a function that returns an observable of data,\r\n * or an instance of DataSource.\r\n */\r\n public source = input.required<DataSourceLike<any>>();\r\n\r\n /**\r\n * If true, the table will automatically load data when initialized.\r\n * This is useful for tables that need to display data immediately without user interaction.\r\n */\r\n public autoLoad = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the table will show row numbers.\r\n * This will add a column to the left of the table with the row numbers.\r\n */\r\n public showRowNumbers = input(false, { transform: booleanAttribute });\r\n\r\n /** \r\n * If true, the table will show the header row.\r\n */\r\n public showHeader = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the table will support pagination.\r\n * If false, the table will load all records at once.\r\n */\r\n public pageable = input<TablePagingOptions | undefined, TablePagingOptions | boolean>(undefined, {\r\n transform: v => {\r\n if (v === undefined || v === null || v === false) {\r\n return undefined;\r\n }\r\n\r\n if (v === true) {\r\n v = {};\r\n }\r\n\r\n v.pageIndex = v.pageIndex ?? 1;\r\n v.pageSize = v.pageSize ?? 10;\r\n v.maxVisiblePages = v.maxVisiblePages ?? 10;\r\n v.showPagingControls = v.showPagingControls ?? true;\r\n return v;\r\n }\r\n });\r\n\r\n /**\r\n * If true, the table will support sorting.\r\n * This will add a sort icon to each column header.\r\n */\r\n public sortable = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * The CSS class to apply to the table element.\r\n * This can be used to apply custom styles to the table.\r\n */\r\n public tableClass = input<string | string[]>();\r\n\r\n /**\r\n * The CSS class to apply to the header element.\r\n */\r\n public headerClass = input<string>();\r\n\r\n /**\r\n * The caption of the table.\r\n */\r\n public caption = input<string>();\r\n\r\n /**\r\n * The height of the table in pixels.\r\n * This can be used to set a fixed height for the table.\r\n */\r\n public height = input<number>();\r\n\r\n /**\r\n * If true, the table will support filtering.\r\n * This will add a filter input to each column header.\r\n */\r\n public filterable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The indicator to show while the table is loading data for the first time.\r\n */\r\n public loadingIndicator = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\r\n transform: v => {\r\n if (typeof v === 'boolean') {\r\n return v ? 'spinner' : 'none';\r\n }\r\n return v;\r\n }\r\n });\r\n\r\n /** If true, the table will show a loading cover while data is being loaded.\r\n * This can be used to prevent user interaction with the table while loading.\r\n * This cover is not displayed when the table is loading for the first time.\r\n * Instead, the table will show a loading based on loadingIndicator settings.\r\n */\r\n public loadingCover = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\r\n transform: v => {\r\n if (typeof v === 'boolean') {\r\n return v ? 'spinner' : 'none';\r\n }\r\n return v;\r\n }\r\n });\r\n\r\n // @Input() rowColor?: (row: any) => BootstrapColor;\r\n\r\n @ContentChildren(TableColumnDirective)\r\n protected _columns!: QueryList<TableColumnDirective>;\r\n\r\n @ContentChild(TableDetailRowDirective)\r\n protected _detailRow?: TableDetailRowDirective;\r\n\r\n protected _dataResult = signal<DataResult | undefined>(undefined);\r\n protected _lastRequest?: DataRequest; // The last data request made to the data source\r\n protected _loadingRequest?: DataRequest; // The current data request being processed\r\n protected _rowStates = new Map<any, { expanded: boolean }>();\r\n protected _formatString = formatString;\r\n private _changeSubscription?: Subscription;\r\n protected _dataSource!: DataSource;\r\n protected _pagingFormatter!: TableComponentPagingFormatter;\r\n protected _lastError?: any;\r\n\r\n\r\n constructor(protected _ls: LocalizationService, private _destroyRef: DestroyRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._dataSource = dataSourceAttribute(this.source());\r\n const locale = this._ls.get();\r\n this._pagingFormatter = locale?.definition.components?.table?.pagingInfo ??\r\n ((o) => `Showing ${o.firstRecord}-${o.lastRecord} of ${o.totalRecords} records`);\r\n\r\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n // this.reload();\r\n // });\r\n\r\n if (this.autoLoad()) {\r\n this.load(this.pageable()?.pageIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Load data for the specified page index (optional).\r\n * @param pageIndex The page index to load.\r\n */\r\n public load(pageIndex?: number) {\r\n let page: DataRequestPage | undefined;\r\n let filters: DataRequestFilter[] = [];\r\n let sort: DataRequestSort | undefined;\r\n\r\n if (this.filterable()) {\r\n this._columns.forEach(col => {\r\n if (col.filterable() && col.filterValue() != '' && col.filterValue() != undefined) {\r\n filters.push({ field: col.fieldName() ?? col.filterField() ?? col.field(), value: col.filterValue(), operator: col.filterOperator() });\r\n }\r\n });\r\n }\r\n\r\n if (this.pageable()) {\r\n page = {\r\n index: pageIndex || this._lastRequest?.page?.index || 1,\r\n size: this._lastRequest?.page?.size || 10,\r\n zeroBased: false\r\n };\r\n }\r\n\r\n if (this.sortable()) {\r\n let col = this._columns.find(c => c.sortable() && c.sortDirection() != 'none' && (c.field() != '' || c.fieldName() != ''));\r\n if (col) {\r\n sort = { \r\n field: col.fieldName() ?? col.field()!, \r\n asc: col.sortDirection() === 'asc' \r\n }\r\n }\r\n }\r\n\r\n this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });\r\n\r\n this._dataSource.load(this._loadingRequest)\r\n .pipe(takeUntilDestroyed(this._destroyRef)).subscribe({\r\n next: result => {\r\n this._dataResult.set(result);\r\n this._lastRequest = this._loadingRequest;\r\n this._loadingRequest = undefined;\r\n this._lastError = undefined;\r\n }, error: err => {\r\n this._lastError = err;\r\n this._lastRequest = this._loadingRequest;\r\n this._loadingRequest = undefined;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Determines if the table is currently loading data.\r\n */\r\n @HostBinding('class.ng0-loading')\r\n public get isLoading() {\r\n return this._dataSource.isLoading;\r\n }\r\n\r\n protected _getCellValue(row: any, col: TableColumnDirective) {\r\n var subFields = col.field()!.split('.');\r\n let value = row[subFields[0]];\r\n for (let i = 1; i < subFields.length; i++) {\r\n if (value == null) break;\r\n value = value[subFields[i]];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n\r\n protected _onPageChange(pageIndex: number) {\r\n this.load(pageIndex);\r\n }\r\n\r\n protected _onToggleRowDetailClick(row: any) {\r\n var state = this._rowStates.get(row)\r\n if (!state) {\r\n this._rowStates.set(row, { expanded: true });\r\n } else {\r\n state.expanded = !state.expanded;\r\n }\r\n }\r\n\r\n protected isRowExpanded(row: any) {\r\n var state = this._rowStates.get(row)\r\n return state == undefined ? false : state.expanded;\r\n }\r\n\r\n protected _onToggleFilterOperator(col: TableColumnDirective) {\r\n if (col.showFilterOperators()) {\r\n col.showFilterOperators.set(false)\r\n } else {\r\n this._columns.forEach(x => x.showFilterOperators.set(false));\r\n col.showFilterOperators.set(true)\r\n }\r\n }\r\n\r\n protected _onSelectFilterOperator(col: TableColumnDirective, filterOperator: string) {\r\n col.filterOperator.set(filterOperator);\r\n this._columns.forEach(x => x.showFilterOperators.set(false));\r\n this.load(0);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._changeSubscription?.unsubscribe();\r\n }\r\n}\r\n","@let $dataResult = _dataResult();\r\n@let $pageable = pageable();\r\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\r\n@let $data = $dataResult?.data;\r\n@let $anyRecords = $data && $data.length > 0;\r\n@let $totalRecordsCount = $dataResult?.total;\r\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\r\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\r\n@let $isLoading = _dataSource.isLoading();\r\n@let $isFirstLoad = $dataResult == undefined;\r\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\r\n@let $tableLocale = _ls.get()?.definition?.components?.table;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if (caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n @if (showHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n }\r\n\r\n @if (filterable()) {\r\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\r\n }\r\n\r\n <tbody>\r\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\r\n <tr class=\"ng0-table-loading-row\">\r\n <td [attr.colspan]=\"$columnsCount\">\r\n @switch (loadingIndicator()) {\r\n @case ('spinner') {\r\n <div class=\"text-center\">\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n </div>\r\n }\r\n }\r\n </td>\r\n </tr>\r\n } @else {\r\n @if ($data) {\r\n @if ($data.length > 0) {\r\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\r\n } @else {\r\n <tr class=\"ng0-table-no-records-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\r\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\r\n </td>\r\n </tr>\r\n }\r\n } @else if (_lastError) {\r\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n</div>\r\n\r\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\r\n<div class=\"ng0-table-loading-cover text-center\">\r\n @if (loadingCover() == 'spinner') {\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n }\r\n</div>\r\n}\r\n\r\n<ng-template #filtersTemplate>\r\n <thead>\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th>\r\n @if(col.filterable() && (col.field() || col.filterValue())) {\r\n\r\n <div class=\"input-group\">\r\n @switch (col.type()) {\r\n @case ('text') {\r\n <input [name]=\"'filter-' + col.field\"\r\n type=\"search\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n @case ('number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"search\"\r\n ng0Number\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n }\r\n\r\n <button class=\"btn btn-outline-light\"\r\n style=\"border-color: var(--bs-border-color);\"\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n (click)=\"_onToggleFilterOperator(col)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\r\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\r\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\r\n (detach)=\"col.showFilterOperators.set(false)\">\r\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\r\n @for (item of col.getFilterOperators(); track $index) {\r\n <li>\r\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\r\n (click)=\"_onSelectFilterOperator(col, item)\">\r\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </ng-template>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate>\r\n <thead [ngClass]=\"headerClass()\">\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th class=\"row-number text-muted\">#</th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th\r\n (click)=\"col.toggleSortDirection(); load()\"\r\n [class.sortable]=\"sortable() && col.sortable()\"\r\n [ngClass]=\"{ \r\n 'sort-asc': col.sortDirection() == 'asc', \r\n 'sort-desc': col.sortDirection() == 'desc',\r\n 'sort-none': col.sortDirection() == 'none'\r\n }\">\r\n {{ col.title() }}\r\n\r\n @if(sortable() && col.sortable()) {\r\n <svg class=\"ng0-table-sort-icon\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #dataRowsTemplate>\r\n @for (row of $data; track $index) {\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n @if (_detailRow) {\r\n <td class=\"detail-row-expander\">\r\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\r\n @if (isRowExpanded(row)) {\r\n <i class=\"far fa-minus\"></i>\r\n } @else {\r\n <i class=\"far fa-plus\"></i>\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <td class=\"ng0-table-row-number\">\r\n {{ $firstRecord + $index }}\r\n </td>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <td\r\n [ngClass]=\"col.cellClass()\"\r\n [class.shrinked]=\"col.shrink()\"\r\n [class.fw-bold]=\"col.bold()\">\r\n @if (col.template) {\r\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\r\n </ng-container>\r\n } @else if (col.field()) {\r\n @let cellValue = _getCellValue(row, col);\r\n\r\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\r\n {{ col.emptyCellText() }}\r\n } @else {\r\n @if (col.type()) {\r\n @let type = $any(col.type());\r\n\r\n @if (type == \"date\") {\r\n {{ cellValue | ng0Date }}\r\n } @else if (type == \"number\") {\r\n {{ cellValue | number }}\r\n } @else if (type == \"currency\") {\r\n {{ cellValue | currency }}\r\n } @else if (type.enum) {\r\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\r\n } @else if (type.boolean || type == \"boolean\") {\r\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\r\n }@else {\r\n {{ cellValue }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n }\r\n </tr>\r\n\r\n @if (_detailRow && isRowExpanded(row)) {\r\n <tr class=\"detail-row\">\r\n <td\r\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\r\n class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #footerTemplate>\r\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\r\n <div class=\"ng0-table-pagination me-2\">\r\n <ng0-pagination\r\n class=\"mb-0 d-inline-block\"\r\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\r\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\r\n [totalRecords]=\"$totalRecordsCount!\"\r\n [pageSize]=\"$pageable.pageSize!\"\r\n [selectedPage]=\"$pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{ \"first\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{ \"last\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{ \"next\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{ \"previous\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\r\n <div class=\"ng0-table-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n }\r\n\r\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\r\n <div class=\"ng0-table-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{\r\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\r\n currentPage: $pageIndex!})\r\n }}\r\n </ng-content>\r\n </div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #nowDataTemplate>\r\n <tr class=\"ng0-table-error-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\r\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\r\n {{ \"retry\" | ng0Translate }}\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableComponent } from './table.component';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective,\r\n ],\r\n exports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective\r\n ],\r\n})\r\nexport class TableModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOa,oBAAoB,CAAA;AAC/B;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEvB;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA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,YAVhB,cAAc;YACd,oBAAoB;AACpB,YAAA,uBAAuB,aAGvB,cAAc;YACd,oBAAoB;YACpB,uBAAuB,CAAA,EAAA,CAAA;AAGlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc,CAAA,EAAA,CAAA;;4FAUT,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB;AACH,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-table.mjs","sources":["../../../projects/ng0/components/table/table-column.directive.ts","../../../projects/ng0/components/table/table-detail-row.directive.ts","../../../projects/ng0/components/table/table.component.ts","../../../projects/ng0/components/table/table.component.html","../../../projects/ng0/components/table/table.module.ts","../../../projects/ng0/components/table/bootkit-ng0-components-table.ts"],"sourcesContent":["import { booleanAttribute, ContentChild, Directive, input, model, OnInit, signal, TemplateRef } from '@angular/core';\r\nimport { TableCellType } from './types';\r\n\r\n@Directive({\r\n selector: 'ng0-table-col',\r\n standalone: true,\r\n})\r\nexport class TableColumnDirective implements OnInit {\r\n /**\r\n * The field in the data source to bind to. If not set, the column will not display any data.\r\n */\r\n field = input<string>();\r\n\r\n /**\r\n * The title of the column. This will be displayed in the header row.\r\n */\r\n title = input<string>();\r\n\r\n /**\r\n * Text to display in the cell if the value is null or undefined.\r\n */\r\n emptyCellText = input<string>();\r\n\r\n /**\r\n * Type of the table cell.\r\n */\r\n type = input<TableCellType>('text');\r\n\r\n /**\r\n * CSS class(es) to apply to the table cell.\r\n */\r\n cellClass = input<string | string[] | { [klass: string]: any; } | null>();\r\n\r\n /** \r\n * @deprecated Use `cellClass` instead.\r\n */\r\n bold = input(false, { transform: booleanAttribute });\r\n\r\n /** \r\n * @deprecated Use `cellClass` instead.\r\n */\r\n shrink = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the column will support filtering.\r\n */\r\n filterable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The current filter value of the column.\r\n */\r\n filterValue = model<any>();\r\n\r\n /**\r\n * The field to use for filtering. If not set, the `field` property will be used.\r\n * @deprecated Use `fieldName` instead.\r\n */\r\n filterField = input<string>();\r\n\r\n /**\r\n * The current filter operator of the column.\r\n */\r\n filterOperator = model<string>();\r\n\r\n /**\r\n * The list of filter operators to show in the filter dropdown. If not set, a default list will be used based on the column type.\r\n */\r\n filterOperators = input<string[]>();\r\n\r\n /**\r\n * If true, the filter operators dropdown will be shown.\r\n */\r\n showFilterOperators = signal(false);\r\n\r\n /**\r\n * The name of the field in the data source. If not set, the `field` property will be used.\r\n */\r\n fieldName = input<string>();\r\n\r\n /**\r\n * If true, the column will support sorting.\r\n */\r\n public sortable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The current sort direction of the column.\r\n */\r\n public sortDirection = model<'none' | 'asc' | 'desc'>('none');\r\n\r\n @ContentChild(TemplateRef) template?: TemplateRef<any>;\r\n\r\n constructor() {\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.filterOperator() == undefined) {\r\n this.filterOperator.set(this.type() == 'text' ? 'contains' : 'eq');\r\n }\r\n }\r\n\r\n /**\r\n * Get the list of filter operators to show in the filter dropdown.\r\n */\r\n public getFilterOperators(): string[] {\r\n let op = this.filterOperators();\r\n if (op && op.length > 0)\r\n return op;\r\n\r\n let type = this.type();\r\n if (type == 'number' || type == 'currency' || type == 'date' || type == 'time') {\r\n return ['eq', 'ne', 'gt', 'gte', 'lt', 'lte',]\r\n } else if (type == 'text') {\r\n return ['contains', 'startsWith', 'endsWith', 'eq', 'ne']\r\n } else {\r\n return []\r\n }\r\n }\r\n\r\n /**\r\n * Toggle the sort direction of the column.\r\n * @returns void\r\n */\r\n public toggleSortDirection(): void {\r\n if (!this.sortable()) {\r\n return;\r\n }\r\n\r\n let dir = this.sortDirection();\r\n if (dir === 'none') {\r\n this.sortDirection.set('asc');\r\n } else if (dir === 'asc') {\r\n this.sortDirection.set('desc');\r\n } else {\r\n this.sortDirection.set('none');\r\n }\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef } from '@angular/core';\r\n\r\n\r\n@Directive({\r\n selector: '[ng0-table-detail-row]',\r\n standalone: true,\r\n})\r\nexport class TableDetailRowDirective {\r\n @Input() showCallback?: (row: any) => boolean;\r\n\r\n constructor(public readonly templateRef: TemplateRef<any>) {\r\n }\r\n}\r\n","import { AfterContentInit, booleanAttribute, ChangeDetectionStrategy, Component, computed, ContentChild, ContentChildren, DestroyRef, HostBinding, input, model, OnDestroy, OnInit, QueryList, signal } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { formatString } from '@bootkit/ng0/common';\r\nimport { LocalizationModule, LocalizationService, TableComponentPagingFormatter } from '@bootkit/ng0/localization';\r\nimport { DataRequest, DataRequestFilter, DataRequestPage, DataRequestSort, DataResult, DataSource, dataSourceAttribute, DataSourceLike, LogicalOperator } from '@bootkit/ng0/data';\r\nimport { PaginationComponent } from '@bootkit/ng0/components/pagination';\r\nimport { TablePagingOptions } from './types';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { NumberDirective } from '@bootkit/ng0/form';\r\n\r\n/**\r\n * A generic table component that can display data in a tabular format.\r\n * It supports features like pagination, sorting, filtering, and row details.\r\n * It can be used with any data source that implements the DataSource interface.\r\n */\r\n@Component({\r\n selector: 'ng0-table',\r\n exportAs: 'ng0Table',\r\n templateUrl: './table.component.html',\r\n styleUrls: ['./table.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n LocalizationModule,\r\n PaginationComponent,\r\n NumberDirective,\r\n OverlayModule\r\n ]\r\n})\r\nexport class TableComponent implements OnInit, AfterContentInit, OnDestroy {\r\n /**\r\n * The data source for the table.\r\n * This can be an array of data, a function that returns an observable of data,\r\n * or an instance of DataSource.\r\n */\r\n public source = input.required<DataSourceLike<any>>();\r\n\r\n /**\r\n * If true, the table will automatically load data when initialized.\r\n * This is useful for tables that need to display data immediately without user interaction.\r\n */\r\n public autoLoad = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the table will show row numbers.\r\n * This will add a column to the left of the table with the row numbers.\r\n */\r\n public showRowNumbers = input(false, { transform: booleanAttribute });\r\n\r\n /** \r\n * If true, the table will show the header row.\r\n */\r\n public showHeader = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * If true, the table will support pagination.\r\n * If false, the table will load all records at once.\r\n */\r\n public pageable = input<TablePagingOptions | undefined, TablePagingOptions | boolean>(undefined, {\r\n transform: v => {\r\n if (v === undefined || v === null || v === false) {\r\n return undefined;\r\n }\r\n\r\n if (v === true) {\r\n v = {};\r\n }\r\n\r\n v.pageIndex = v.pageIndex ?? 1;\r\n v.pageSize = v.pageSize ?? 10;\r\n v.maxVisiblePages = v.maxVisiblePages ?? 10;\r\n v.showPagingControls = v.showPagingControls ?? true;\r\n return v;\r\n }\r\n });\r\n\r\n /**\r\n * If true, the table will support sorting.\r\n * This will add a sort icon to each column header.\r\n */\r\n public sortable = input(true, { transform: booleanAttribute });\r\n\r\n /**\r\n * The CSS class to apply to the table element.\r\n * This can be used to apply custom styles to the table.\r\n */\r\n public tableClass = input<string | string[]>();\r\n\r\n /**\r\n * The CSS class to apply to the header element.\r\n */\r\n public headerClass = input<string>();\r\n\r\n /**\r\n * The caption of the table.\r\n */\r\n public caption = input<string>();\r\n\r\n /**\r\n * The height of the table in pixels.\r\n * This can be used to set a fixed height for the table.\r\n */\r\n public height = input<number>();\r\n\r\n /**\r\n * If true, the table will support filtering.\r\n * This will add a filter input to each column header.\r\n */\r\n public filterable = input(false, { transform: booleanAttribute });\r\n\r\n /**\r\n * The indicator to show while the table is loading data for the first time.\r\n */\r\n public loadingIndicator = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\r\n transform: v => {\r\n if (typeof v === 'boolean') {\r\n return v ? 'spinner' : 'none';\r\n }\r\n return v;\r\n }\r\n });\r\n\r\n /** If true, the table will show a loading cover while data is being loaded.\r\n * This can be used to prevent user interaction with the table while loading.\r\n * This cover is not displayed when the table is loading for the first time.\r\n * Instead, the table will show a loading based on loadingIndicator settings.\r\n */\r\n public loadingCover = input<'none' | 'simple' | 'spinner', boolean | 'none' | 'simple' | 'spinner'>('spinner', {\r\n transform: v => {\r\n if (typeof v === 'boolean') {\r\n return v ? 'spinner' : 'none';\r\n }\r\n return v;\r\n }\r\n });\r\n\r\n // @Input() rowColor?: (row: any) => BootstrapColor;\r\n\r\n @ContentChildren(TableColumnDirective)\r\n protected _columns!: QueryList<TableColumnDirective>;\r\n\r\n @ContentChild(TableDetailRowDirective)\r\n protected _detailRow?: TableDetailRowDirective;\r\n\r\n protected _dataResult = signal<DataResult | undefined>(undefined);\r\n protected _lastRequest?: DataRequest; // The last data request made to the data source\r\n protected _loadingRequest?: DataRequest; // The current data request being processed\r\n protected _rowStates = new Map<any, { expanded: boolean }>();\r\n protected _formatString = formatString;\r\n private _changeSubscription?: Subscription;\r\n protected _dataSource!: DataSource;\r\n protected _pagingFormatter!: TableComponentPagingFormatter;\r\n protected _lastError?: any;\r\n\r\n\r\n constructor(protected _ls: LocalizationService, private _destroyRef: DestroyRef) {\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngAfterContentInit(): void {\r\n this._dataSource = dataSourceAttribute(this.source());\r\n const locale = this._ls.get();\r\n this._pagingFormatter = locale?.definition.components?.table?.pagingInfo ??\r\n ((o) => `Showing ${o.firstRecord}-${o.lastRecord} of ${o.totalRecords} records`);\r\n\r\n // this._changeSubscription = this.dataSource().change.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(result => {\r\n // this.reload();\r\n // });\r\n\r\n if (this.autoLoad()) {\r\n this.load(this.pageable()?.pageIndex);\r\n }\r\n }\r\n\r\n /**\r\n * Load data for the specified page index (optional).\r\n * @param pageIndex The page index to load.\r\n */\r\n public load(pageIndex?: number) {\r\n let page: DataRequestPage | undefined;\r\n let filters: DataRequestFilter[] = [];\r\n let sort: DataRequestSort | undefined;\r\n\r\n if (this.filterable()) {\r\n this._columns.forEach(col => {\r\n if (col.filterable() && col.filterValue() != '' && col.filterValue() != undefined) {\r\n filters.push({ field: col.fieldName() ?? col.filterField() ?? col.field(), value: col.filterValue(), operator: col.filterOperator() });\r\n }\r\n });\r\n }\r\n\r\n if (this.pageable()) {\r\n page = {\r\n index: pageIndex || this._lastRequest?.page?.index || 1,\r\n size: this._lastRequest?.page?.size || 10,\r\n zeroBased: false\r\n };\r\n }\r\n\r\n if (this.sortable()) {\r\n let col = this._columns.find(c => c.sortable() && c.sortDirection() != 'none' && (c.field() != '' || c.fieldName() != ''));\r\n if (col) {\r\n sort = { \r\n field: col.fieldName() ?? col.field()!, \r\n asc: col.sortDirection() === 'asc' \r\n }\r\n }\r\n }\r\n\r\n this._loadingRequest = new DataRequest({ page, filters, sort, select: [], computeTotal: true });\r\n\r\n this._dataSource.load(this._loadingRequest)\r\n .pipe(takeUntilDestroyed(this._destroyRef)).subscribe({\r\n next: result => {\r\n this._dataResult.set(result);\r\n this._lastRequest = this._loadingRequest;\r\n this._loadingRequest = undefined;\r\n this._lastError = undefined;\r\n }, error: err => {\r\n this._lastError = err;\r\n this._lastRequest = this._loadingRequest;\r\n this._loadingRequest = undefined;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Determines if the table is currently loading data.\r\n */\r\n @HostBinding('class.ng0-loading')\r\n public get isLoading() {\r\n return this._dataSource.isLoading;\r\n }\r\n\r\n protected _getCellValue(row: any, col: TableColumnDirective) {\r\n var subFields = col.field()!.split('.');\r\n let value = row[subFields[0]];\r\n for (let i = 1; i < subFields.length; i++) {\r\n if (value == null) break;\r\n value = value[subFields[i]];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n\r\n protected _onPageChange(pageIndex: number) {\r\n this.load(pageIndex);\r\n }\r\n\r\n protected _onToggleRowDetailClick(row: any) {\r\n var state = this._rowStates.get(row)\r\n if (!state) {\r\n this._rowStates.set(row, { expanded: true });\r\n } else {\r\n state.expanded = !state.expanded;\r\n }\r\n }\r\n\r\n protected isRowExpanded(row: any) {\r\n var state = this._rowStates.get(row)\r\n return state == undefined ? false : state.expanded;\r\n }\r\n\r\n protected _onToggleFilterOperator(col: TableColumnDirective) {\r\n if (col.showFilterOperators()) {\r\n col.showFilterOperators.set(false)\r\n } else {\r\n this._columns.forEach(x => x.showFilterOperators.set(false));\r\n col.showFilterOperators.set(true)\r\n }\r\n }\r\n\r\n protected _onSelectFilterOperator(col: TableColumnDirective, filterOperator: string) {\r\n col.filterOperator.set(filterOperator);\r\n this._columns.forEach(x => x.showFilterOperators.set(false));\r\n this.load(0);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._changeSubscription?.unsubscribe();\r\n }\r\n}\r\n","@let $dataResult = _dataResult();\r\n@let $pageable = pageable();\r\n@let $pageIndex = _lastRequest?.page?.index ?? 1;\r\n@let $data = $dataResult?.data;\r\n@let $anyRecords = $data && $data.length > 0;\r\n@let $totalRecordsCount = $dataResult?.total;\r\n@let $firstRecord = $pageable ? ($pageable.pageSize! * ($pageIndex - 1) + 1) : 1;\r\n@let $lastRecord = $data ? $firstRecord + $data.length - 1 : 1;\r\n@let $isLoading = _dataSource.isLoading();\r\n@let $isFirstLoad = $dataResult == undefined;\r\n@let $columnsCount = _columns.length + (showRowNumbers() ? 1 : 0);\r\n@let $tableLocale = _ls.get()?.definition?.components?.table;\r\n\r\n<div class=\"table-responsive\" [style.height]=\"height()\" [class.table-scrollable]=\"height()! > 0\">\r\n <table class=\"table\" [ngClass]=\"tableClass()\">\r\n @if (caption()) {\r\n <caption>{{caption()}}</caption>\r\n }\r\n\r\n @if (showHeader()) {\r\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\r\n }\r\n\r\n @if (filterable()) {\r\n <ng-container *ngTemplateOutlet=\"filtersTemplate\"></ng-container>\r\n }\r\n\r\n <tbody>\r\n @if ($isLoading && $isFirstLoad && loadingIndicator()) {\r\n <tr class=\"ng0-table-loading-row\">\r\n <td [attr.colspan]=\"$columnsCount\">\r\n @switch (loadingIndicator()) {\r\n @case ('spinner') {\r\n <div class=\"text-center\">\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n </div>\r\n }\r\n }\r\n </td>\r\n </tr>\r\n } @else {\r\n @if ($data) {\r\n @if ($data.length > 0) {\r\n <ng-container *ngTemplateOutlet=\"dataRowsTemplate\"></ng-container>\r\n } @else {\r\n <tr class=\"ng0-table-no-records-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"text-center p-2\">\r\n {{ $tableLocale?.noRecords ?? 'No Records.' }}\r\n </td>\r\n </tr>\r\n }\r\n } @else if (_lastError) {\r\n <ng-container *ngTemplateOutlet=\"nowDataTemplate\"></ng-container>\r\n }\r\n }\r\n </tbody>\r\n </table>\r\n</div>\r\n\r\n<div class=\"ng0-table-footer d-flex align-items-baseline\">\r\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\r\n</div>\r\n\r\n@if ($isLoading && !$isFirstLoad && loadingCover()) {\r\n<div class=\"ng0-table-loading-cover text-center\">\r\n @if (loadingCover() == 'spinner') {\r\n <div class=\"spinner-border\" role=\"status\"></div>\r\n }\r\n</div>\r\n}\r\n\r\n<ng-template #filtersTemplate>\r\n <thead>\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th></th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th>\r\n @if(col.filterable() && (col.field() || col.filterValue())) {\r\n\r\n <div class=\"input-group\">\r\n @switch (col.type()) {\r\n @case ('text') {\r\n <input [name]=\"'filter-' + col.field\"\r\n type=\"search\"\r\n [maxlength]=\"50\"\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n @case ('number') {\r\n <input [name]=\"'datatablecol-' + col.field\"\r\n type=\"search\"\r\n ng0Number\r\n class=\"form-control form-control-sm\"\r\n [(ngModel)]=\"col.filterValue\"\r\n (keydown.enter)=\"load(0)\">\r\n }\r\n }\r\n\r\n <button class=\"btn btn-outline-light\"\r\n style=\"border-color: var(--bs-border-color);\"\r\n cdkOverlayOrigin\r\n #trigger=\"cdkOverlayOrigin\"\r\n (click)=\"_onToggleFilterOperator(col)\">\r\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M19 3H5C3.58579 3 2.87868 3 2.43934 3.4122C2 3.8244 2 4.48782 2 5.81466V6.50448C2 7.54232 2 8.06124 2.2596 8.49142C2.5192 8.9216 2.99347 9.18858 3.94202 9.72255L6.85504 11.3624C7.49146 11.7206 7.80967 11.8998 8.03751 12.0976C8.51199 12.5095 8.80408 12.9935 8.93644 13.5872C9 13.8722 9 14.2058 9 14.8729L9 17.5424C9 18.452 9 18.9067 9.25192 19.2613C9.50385 19.6158 9.95128 19.7907 10.8462 20.1406C12.7248 20.875 13.6641 21.2422 14.3321 20.8244C15 20.4066 15 19.4519 15 17.5424V14.8729C15 14.2058 15 13.8722 15.0636 13.5872C15.1959 12.9935 15.488 12.5095 15.9625 12.0976C16.1903 11.8998 16.5085 11.7206 17.145 11.3624L20.058 9.72255C21.0065 9.18858 21.4808 8.9216 21.7404 8.49142C22 8.06124 22 7.54232 22 6.50448V5.81466C22 4.48782 22 3.8244 21.5607 3.4122C21.1213 3 20.4142 3 19 3Z\"\r\n stroke=\"#1C274C\" stroke-width=\"1.5\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOrigin]=\"trigger\"\r\n [cdkConnectedOverlayOpen]=\"col.showFilterOperators()\"\r\n (overlayOutsideClick)=\"col.showFilterOperators.set(false)\"\r\n (detach)=\"col.showFilterOperators.set(false)\">\r\n <ul class=\"dropdown-menu show\" animate.enter=\"fade-in\">\r\n @for (item of col.getFilterOperators(); track $index) {\r\n <li>\r\n <button class=\"dropdown-item\" [class.active]=\"item == col.filterOperator()\"\r\n (click)=\"_onSelectFilterOperator(col, item)\">\r\n {{_ls.get()?.definition?.data?.logicalOperators?.[item] ?? item }}\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n </ng-template>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #headerTemplate>\r\n <thead [ngClass]=\"headerClass()\">\r\n <tr>\r\n @if (_detailRow) {\r\n <th></th>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <th class=\"row-number text-muted\">#</th>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <th\r\n (click)=\"col.toggleSortDirection(); load()\"\r\n [class.sortable]=\"sortable() && col.sortable()\"\r\n [ngClass]=\"{ \r\n 'sort-asc': col.sortDirection() == 'asc', \r\n 'sort-desc': col.sortDirection() == 'desc',\r\n 'sort-none': col.sortDirection() == 'none'\r\n }\">\r\n {{ col.title() }}\r\n\r\n @if(sortable() && col.sortable()) {\r\n <svg class=\"ng0-table-sort-icon\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\" fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\">\r\n <path d=\"M12 7L12 16\" stroke=\"currentColor\" stroke-width=\"1\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n <path d=\"M8 13L12 17L16 13\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n</ng-template>\r\n\r\n<ng-template #dataRowsTemplate>\r\n @for (row of $data; track $index) {\r\n <tr [class.table-active]=\"isRowExpanded(row)\">\r\n @if (_detailRow) {\r\n <td class=\"detail-row-expander\">\r\n @if (_detailRow.showCallback == null || _detailRow.showCallback(row)) {\r\n <button class=\"btn\" (click)=\"_onToggleRowDetailClick(row)\">\r\n @if (isRowExpanded(row)) {\r\n <i class=\"far fa-minus\"></i>\r\n } @else {\r\n <i class=\"far fa-plus\"></i>\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n\r\n @if (showRowNumbers()) {\r\n <td class=\"ng0-table-row-number\">\r\n {{ $firstRecord + $index }}\r\n </td>\r\n }\r\n\r\n @for (col of _columns; track $index) {\r\n <td\r\n [ngClass]=\"col.cellClass()\"\r\n [class.shrinked]=\"col.shrink()\"\r\n [class.fw-bold]=\"col.bold()\">\r\n @if (col.template) {\r\n <ng-container *ngTemplateOutlet=\"col.template; context: { $implicit: row }\">\r\n </ng-container>\r\n } @else if (col.field()) {\r\n @let cellValue = _getCellValue(row, col);\r\n\r\n @if ((cellValue === null || cellValue === undefined) && col.emptyCellText()) {\r\n {{ col.emptyCellText() }}\r\n } @else {\r\n @if (col.type()) {\r\n @let type = $any(col.type());\r\n\r\n @if (type == \"date\") {\r\n {{ cellValue | ng0Date }}\r\n } @else if (type == \"number\") {\r\n {{ cellValue | number }}\r\n } @else if (type == \"currency\") {\r\n {{ cellValue | currency }}\r\n } @else if (type.enum) {\r\n {{ cellValue | ng0TranslateEnum: type.enum.name : type.enum.fallback }}\r\n } @else if (type.boolean || type == \"boolean\") {\r\n {{ cellValue | ng0LocalizeBool: type.boolean.false ?? \"false\" : type.boolean.false ?? \"true\" }}\r\n }@else {\r\n {{ cellValue }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n }\r\n </tr>\r\n\r\n @if (_detailRow && isRowExpanded(row)) {\r\n <tr class=\"detail-row\">\r\n <td\r\n [attr.colspan]=\"_columns.length + (showRowNumbers() ? 1 : 0) + 1\"\r\n class=\"ps-2 pb-4\">\r\n <ng-container\r\n *ngTemplateOutlet=\"_detailRow.templateRef; context: { $implicit: row }\"></ng-container>\r\n </td>\r\n </tr>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #footerTemplate>\r\n @if ($pageable && $pageable.showPagingControls && $anyRecords && $totalRecordsCount! > 0) {\r\n <div class=\"ng0-table-pagination me-2\">\r\n <ng0-pagination\r\n class=\"mb-0 d-inline-block\"\r\n [showFirstLastButtons]=\"$pageable.showFirstLastButtons == true\"\r\n [showNextPreviousButtons]=\"$pageable.showNextPreviousButtons == true\"\r\n [totalRecords]=\"$totalRecordsCount!\"\r\n [pageSize]=\"$pageable.pageSize!\"\r\n [selectedPage]=\"$pageIndex\"\r\n (itemClick)=\"_onPageChange($event)\"\r\n [maxVisiblePages]=\"$pageable.maxVisiblePages!\">\r\n <ng-container ngProjectAs=\"first\">\r\n <ng-content select=\"paging-first\">\r\n {{ \"first\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"last\">\r\n <ng-content select=\"paging-last\">\r\n {{ \"last\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"next\">\r\n <ng-content select=\"paging-next\">\r\n {{ \"next\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n\r\n <ng-container ngProjectAs=\"previous\">\r\n <ng-content select=\"paging-previous\">\r\n {{ \"previous\" | ng0Translate }}\r\n </ng-content>\r\n </ng-container>\r\n </ng0-pagination>\r\n </div>\r\n\r\n @if ($pageable.showPageSizeOptions || $pageable.showPageSizeOptions == undefined) {\r\n <div class=\"ng0-table-paging-options\">\r\n <select name=\"pageSizeOptions\" class=\"form-select w-auto d-inline-block\">\r\n <option [ngValue]=\"10\" selected>10</option>\r\n </select>\r\n </div>\r\n }\r\n\r\n @if ($pageable.showPagingInfo == undefined || $pageable.showPagingInfo) {\r\n <div class=\"ng0-table-paging-info ms-auto\">\r\n <ng-content select=\"paging-info\">\r\n {{\r\n _pagingFormatter({firstRecord: $firstRecord, lastRecord: $lastRecord, totalRecords: $totalRecordsCount!,\r\n currentPage: $pageIndex!})\r\n }}\r\n </ng-content>\r\n </div>\r\n }\r\n }\r\n</ng-template>\r\n\r\n<ng-template #nowDataTemplate>\r\n <tr class=\"ng0-table-error-row\">\r\n <td [attr.colSpan]=\"$columnsCount\" class=\"p-2\">\r\n <div class=\"d-flex align-items-baseline\">\r\n <span>{{ $tableLocale?.loadError ?? 'Error loading data.' }} </span>\r\n <button (click)=\"load()\" class=\"btn btn-warning ms-auto\">\r\n {{ \"retry\" | ng0Translate }}\r\n </button>\r\n </div>\r\n </td>\r\n </tr>\r\n</ng-template>","import { NgModule } from '@angular/core';\r\nimport { TableColumnDirective } from './table-column.directive';\r\nimport { TableComponent } from './table.component';\r\nimport { TableDetailRowDirective } from './table-detail-row.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective,\r\n ],\r\n exports: [\r\n TableComponent,\r\n TableColumnDirective,\r\n TableDetailRowDirective\r\n ],\r\n})\r\nexport class TableModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAOa,oBAAoB,CAAA;AAC/B;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AAEvB;;AAEG;IACH,KAAK,GAAG,KAAK,CAAA,IAAA,SA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AA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc;YACd,oBAAoB;AACpB,YAAA,uBAAuB,aAGvB,cAAc;YACd,oBAAoB;YACpB,uBAAuB,CAAA,EAAA,CAAA;AAGlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YAVhB,cAAc,CAAA,EAAA,CAAA;;2FAUT,WAAW,EAAA,UAAA,EAAA,CAAA;kBAZvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB,uBAAuB;AAC1B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,cAAc;wBACd,oBAAoB;wBACpB;AACH,qBAAA;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -61,8 +61,8 @@ class ToastComponent {
|
|
|
61
61
|
this._changeDetectorRef.markForCheck();
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
65
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ToastComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.DestroyRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
65
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: ToastComponent, isStandalone: true, selector: "ng0-toast", host: { properties: { "@host": "this._show" } }, exportAs: ["ng0Toast"], ngImport: i0, template: "<div class=\"toast-header\" *ngIf=\"this._config.header\">\r\n @if(_hasHeaderTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.header)\"></ng-container>\r\n }@else {\r\n <span *ngIf=\"_config.icon\" class=\"me-2\" [ngClass]=\"_config.icon\"></span>\r\n <strong class=\"me-auto\">{{this._config.header}}</strong>\r\n <small *ngIf=\"_config.hint\">{{_config.hint}}</small>\r\n <button *ngIf=\"_config?.closeButton == undefined || _config?.closeButton\"\r\n type=\"button\"\r\n class=\"btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"toastRef.close()\">\r\n </button>\r\n }\r\n</div>\r\n\r\n<div class=\"toast-body\" *ngIf=\"this._config.body\">\r\n @if(_hasBodyTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.body)\"></ng-container>\r\n }@else {\r\n {{this._config.body}}\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
66
66
|
trigger('host', [
|
|
67
67
|
transition(':enter', [
|
|
68
68
|
style({ opacity: 0, transform: 'scale(.85)' }),
|
|
@@ -75,7 +75,7 @@ class ToastComponent {
|
|
|
75
75
|
]),
|
|
76
76
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
77
77
|
}
|
|
78
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
78
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ToastComponent, decorators: [{
|
|
79
79
|
type: Component,
|
|
80
80
|
args: [{ selector: 'ng0-toast', exportAs: 'ng0Toast', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
|
|
81
81
|
CommonModule,
|
|
@@ -173,10 +173,10 @@ class ToastService {
|
|
|
173
173
|
}, config?.duration ?? 3000);
|
|
174
174
|
return this._toastRef;
|
|
175
175
|
}
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
177
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
176
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ToastService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
177
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
178
178
|
}
|
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
179
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: ToastService, decorators: [{
|
|
180
180
|
type: Injectable,
|
|
181
181
|
args: [{
|
|
182
182
|
providedIn: 'root'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootkit-ng0-components-toast.mjs","sources":["../../../projects/ng0/components/toast/toast-ref.ts","../../../projects/ng0/components/toast/toast.component.ts","../../../projects/ng0/components/toast/toast.component.html","../../../projects/ng0/components/toast/toast.service.ts","../../../projects/ng0/components/toast/bootkit-ng0-components-toast.ts"],"sourcesContent":["import { OverlayRef } from \"@angular/cdk/overlay\";\r\nimport { Subject, timer } from \"rxjs\";\r\nimport { ToastConfig } from \"./types\";\r\n\r\nexport class ToastRef {\r\n private _isOpen = true;\r\n private _closedSubject = new Subject<any>();\r\n public closed = this._closedSubject.asObservable();\r\n\r\n constructor(public readonly config: ToastConfig, private overlayRef: OverlayRef) {\r\n }\r\n\r\n public get isOpen() {\r\n return this._isOpen;\r\n }\r\n\r\n public close() {\r\n if (this._isOpen) {\r\n this._closedSubject.next(0);\r\n this._isOpen = false;\r\n\r\n // Wait to ':leave' animation is done and then dispose the overlay\r\n timer(100).subscribe(x => {\r\n this.overlayRef.detach();\r\n this.overlayRef.dispose();\r\n });\r\n }\r\n }\r\n}\r\n","import { trigger, style, transition, animate, state } from '@angular/animations';\r\nimport { Component, OnInit, ChangeDetectionStrategy, DestroyRef, ChangeDetectorRef, HostBinding, Renderer2, ElementRef, TemplateRef } from '@angular/core';\r\nimport { ToastConfig } from './types';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ToastRef } from './toast-ref';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: 'ng0-toast',\r\n exportAs: 'ng0Toast',\r\n templateUrl: 'toast.component.html',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n ],\r\n animations: [\r\n trigger('host', [\r\n transition(':enter', [\r\n style({ opacity: 0, transform: 'scale(.85)' }),\r\n animate('.1s', style({ opacity: '1', transform: 'scale(1)' })),\r\n ]),\r\n state('false', style({ opacity: 0, transform: 'scale(.85)' })),\r\n transition('true => false', [\r\n animate('.1s'),\r\n ]),\r\n ]),\r\n ],\r\n})\r\nexport class ToastComponent implements OnInit {\r\n public toastRef!: ToastRef;\r\n protected _config!: ToastConfig;\r\n @HostBinding('@host') protected _show = true;\r\n protected _hasBodyTemplate!: boolean;\r\n protected _hasHeaderTemplate!: boolean;\r\n\r\n constructor(\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n private _renderer: Renderer2,\r\n private _elementRef: ElementRef,\r\n private _destroyRef: DestroyRef) {\r\n \r\n }\r\n\r\n ngOnInit(): void {\r\n this._config = this.toastRef.config;\r\n this._hasHeaderTemplate = this._config.header instanceof TemplateRef;\r\n this._hasBodyTemplate = this._config.body instanceof TemplateRef;\r\n \r\n let style = this._config.style ?? 'success';\r\n ['toast', 'show', `text-bg-${style}`].forEach(x => this._renderer.addClass(this._elementRef.nativeElement, x));\r\n this.toastRef.closed.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(x => {\r\n this._show = false;\r\n this._changeDetectorRef.markForCheck();\r\n })\r\n }\r\n}\r\n","<div class=\"toast-header\" *ngIf=\"this._config.header\">\r\n @if(_hasHeaderTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.header)\"></ng-container>\r\n }@else {\r\n <span *ngIf=\"_config.icon\" class=\"me-2\" [ngClass]=\"_config.icon\"></span>\r\n <strong class=\"me-auto\">{{this._config.header}}</strong>\r\n <small *ngIf=\"_config.hint\">{{_config.hint}}</small>\r\n <button *ngIf=\"_config?.closeButton == undefined || _config?.closeButton\"\r\n type=\"button\"\r\n class=\"btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"toastRef.close()\">\r\n </button>\r\n }\r\n</div>\r\n\r\n<div class=\"toast-body\" *ngIf=\"this._config.body\">\r\n @if(_hasBodyTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.body)\"></ng-container>\r\n }@else {\r\n {{this._config.body}}\r\n }\r\n</div>","import { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ToastComponent } from './toast.component';\r\nimport { ToastConfig } from './types';\r\nimport { ToastRef } from './toast-ref';\r\n\r\n\r\n/**\r\n * Service for displaying toast notifications in the application.\r\n *\r\n * The `ToastService` provides methods to open toast messages with customizable content,\r\n * header, style, position, and duration. It manages the lifecycle of toast notifications,\r\n * ensuring only one toast is visible at a time.\r\n *\r\n * @example\r\n * // Open a simple toast\r\n * toastService.open('Message body', 'Header', 'success');\r\n *\r\n * @example\r\n * // Open a toast with configuration\r\n * toastService.open({\r\n * body: 'Message body',\r\n * header: 'Header',\r\n * style: 'success',\r\n * verticalPosition: 'bottom',\r\n * horizontalPosition: 'end',\r\n * duration: 5000\r\n * });\r\n *\r\n * @remarks\r\n * - Only one toast can be displayed at a time; opening a new toast closes the previous one.\r\n * - The toast will automatically close after the specified duration (default: 3000ms).\r\n *\r\n * @publicApi\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ToastService {\r\n private _toastRef?: ToastRef;\r\n\r\n constructor(private _overlayService: Overlay, private _injector: Injector) { }\r\n\r\n open(body: string, header?: string, style?: string): ToastRef;\r\n open(config: ToastConfig): ToastRef;\r\n open(p: any): ToastRef {\r\n if (this._toastRef) {\r\n this._toastRef.close();\r\n }\r\n\r\n const config: ToastConfig =\r\n typeof p === 'object' ? p :\r\n { body: arguments[0], header: arguments[1], style: arguments[2] } as ToastConfig;\r\n\r\n var portal = new ComponentPortal(ToastComponent, null, this._injector);\r\n\r\n // Position\r\n var vertical = config.verticalPosition ?? 'top';\r\n var horizontal = config.horizontalPosition ?? 'center';\r\n var posStrategy = this._overlayService.position().global();\r\n const padding = '1rem';\r\n\r\n switch (vertical) {\r\n case 'top':\r\n posStrategy = posStrategy.top(padding)\r\n break;\r\n case 'bottom':\r\n posStrategy = posStrategy.bottom(padding)\r\n break;\r\n }\r\n\r\n switch (horizontal) {\r\n case 'center':\r\n posStrategy = posStrategy.centerHorizontally();\r\n break;\r\n case 'end':\r\n posStrategy = posStrategy.end(padding);\r\n break;\r\n case 'start':\r\n posStrategy = posStrategy.start(padding);\r\n break;\r\n }\r\n\r\n var overlayRef = this._overlayService.create({\r\n positionStrategy: posStrategy,\r\n });\r\n\r\n var componentRef = overlayRef.attach(portal);\r\n componentRef.instance.toastRef = this._toastRef = new ToastRef(config, overlayRef);\r\n\r\n setTimeout(() => {\r\n this._toastRef?.close();\r\n }, config?.duration ?? 3000);\r\n\r\n return this._toastRef;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;MAIa,QAAQ,CAAA;AAKW,IAAA,MAAA;AAA6B,IAAA,UAAA;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,EAAE,QAAQ,IAAI,IAAI,CAAC;QAE5B,OAAO,IAAI,CAAC,SAAS;IACvB;wGAzDW,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA;;4FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bootkit-ng0-components-toast.mjs","sources":["../../../projects/ng0/components/toast/toast-ref.ts","../../../projects/ng0/components/toast/toast.component.ts","../../../projects/ng0/components/toast/toast.component.html","../../../projects/ng0/components/toast/toast.service.ts","../../../projects/ng0/components/toast/bootkit-ng0-components-toast.ts"],"sourcesContent":["import { OverlayRef } from \"@angular/cdk/overlay\";\r\nimport { Subject, timer } from \"rxjs\";\r\nimport { ToastConfig } from \"./types\";\r\n\r\nexport class ToastRef {\r\n private _isOpen = true;\r\n private _closedSubject = new Subject<any>();\r\n public closed = this._closedSubject.asObservable();\r\n\r\n constructor(public readonly config: ToastConfig, private overlayRef: OverlayRef) {\r\n }\r\n\r\n public get isOpen() {\r\n return this._isOpen;\r\n }\r\n\r\n public close() {\r\n if (this._isOpen) {\r\n this._closedSubject.next(0);\r\n this._isOpen = false;\r\n\r\n // Wait to ':leave' animation is done and then dispose the overlay\r\n timer(100).subscribe(x => {\r\n this.overlayRef.detach();\r\n this.overlayRef.dispose();\r\n });\r\n }\r\n }\r\n}\r\n","import { trigger, style, transition, animate, state } from '@angular/animations';\r\nimport { Component, OnInit, ChangeDetectionStrategy, DestroyRef, ChangeDetectorRef, HostBinding, Renderer2, ElementRef, TemplateRef } from '@angular/core';\r\nimport { ToastConfig } from './types';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ToastRef } from './toast-ref';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: 'ng0-toast',\r\n exportAs: 'ng0Toast',\r\n templateUrl: 'toast.component.html',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n CommonModule,\r\n ],\r\n animations: [\r\n trigger('host', [\r\n transition(':enter', [\r\n style({ opacity: 0, transform: 'scale(.85)' }),\r\n animate('.1s', style({ opacity: '1', transform: 'scale(1)' })),\r\n ]),\r\n state('false', style({ opacity: 0, transform: 'scale(.85)' })),\r\n transition('true => false', [\r\n animate('.1s'),\r\n ]),\r\n ]),\r\n ],\r\n})\r\nexport class ToastComponent implements OnInit {\r\n public toastRef!: ToastRef;\r\n protected _config!: ToastConfig;\r\n @HostBinding('@host') protected _show = true;\r\n protected _hasBodyTemplate!: boolean;\r\n protected _hasHeaderTemplate!: boolean;\r\n\r\n constructor(\r\n private _changeDetectorRef: ChangeDetectorRef,\r\n private _renderer: Renderer2,\r\n private _elementRef: ElementRef,\r\n private _destroyRef: DestroyRef) {\r\n \r\n }\r\n\r\n ngOnInit(): void {\r\n this._config = this.toastRef.config;\r\n this._hasHeaderTemplate = this._config.header instanceof TemplateRef;\r\n this._hasBodyTemplate = this._config.body instanceof TemplateRef;\r\n \r\n let style = this._config.style ?? 'success';\r\n ['toast', 'show', `text-bg-${style}`].forEach(x => this._renderer.addClass(this._elementRef.nativeElement, x));\r\n this.toastRef.closed.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(x => {\r\n this._show = false;\r\n this._changeDetectorRef.markForCheck();\r\n })\r\n }\r\n}\r\n","<div class=\"toast-header\" *ngIf=\"this._config.header\">\r\n @if(_hasHeaderTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.header)\"></ng-container>\r\n }@else {\r\n <span *ngIf=\"_config.icon\" class=\"me-2\" [ngClass]=\"_config.icon\"></span>\r\n <strong class=\"me-auto\">{{this._config.header}}</strong>\r\n <small *ngIf=\"_config.hint\">{{_config.hint}}</small>\r\n <button *ngIf=\"_config?.closeButton == undefined || _config?.closeButton\"\r\n type=\"button\"\r\n class=\"btn-close\"\r\n aria-label=\"Close\"\r\n (click)=\"toastRef.close()\">\r\n </button>\r\n }\r\n</div>\r\n\r\n<div class=\"toast-body\" *ngIf=\"this._config.body\">\r\n @if(_hasBodyTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(_config.body)\"></ng-container>\r\n }@else {\r\n {{this._config.body}}\r\n }\r\n</div>","import { Overlay } from '@angular/cdk/overlay';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { Injectable, Injector } from '@angular/core';\r\nimport { ToastComponent } from './toast.component';\r\nimport { ToastConfig } from './types';\r\nimport { ToastRef } from './toast-ref';\r\n\r\n\r\n/**\r\n * Service for displaying toast notifications in the application.\r\n *\r\n * The `ToastService` provides methods to open toast messages with customizable content,\r\n * header, style, position, and duration. It manages the lifecycle of toast notifications,\r\n * ensuring only one toast is visible at a time.\r\n *\r\n * @example\r\n * // Open a simple toast\r\n * toastService.open('Message body', 'Header', 'success');\r\n *\r\n * @example\r\n * // Open a toast with configuration\r\n * toastService.open({\r\n * body: 'Message body',\r\n * header: 'Header',\r\n * style: 'success',\r\n * verticalPosition: 'bottom',\r\n * horizontalPosition: 'end',\r\n * duration: 5000\r\n * });\r\n *\r\n * @remarks\r\n * - Only one toast can be displayed at a time; opening a new toast closes the previous one.\r\n * - The toast will automatically close after the specified duration (default: 3000ms).\r\n *\r\n * @publicApi\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ToastService {\r\n private _toastRef?: ToastRef;\r\n\r\n constructor(private _overlayService: Overlay, private _injector: Injector) { }\r\n\r\n open(body: string, header?: string, style?: string): ToastRef;\r\n open(config: ToastConfig): ToastRef;\r\n open(p: any): ToastRef {\r\n if (this._toastRef) {\r\n this._toastRef.close();\r\n }\r\n\r\n const config: ToastConfig =\r\n typeof p === 'object' ? p :\r\n { body: arguments[0], header: arguments[1], style: arguments[2] } as ToastConfig;\r\n\r\n var portal = new ComponentPortal(ToastComponent, null, this._injector);\r\n\r\n // Position\r\n var vertical = config.verticalPosition ?? 'top';\r\n var horizontal = config.horizontalPosition ?? 'center';\r\n var posStrategy = this._overlayService.position().global();\r\n const padding = '1rem';\r\n\r\n switch (vertical) {\r\n case 'top':\r\n posStrategy = posStrategy.top(padding)\r\n break;\r\n case 'bottom':\r\n posStrategy = posStrategy.bottom(padding)\r\n break;\r\n }\r\n\r\n switch (horizontal) {\r\n case 'center':\r\n posStrategy = posStrategy.centerHorizontally();\r\n break;\r\n case 'end':\r\n posStrategy = posStrategy.end(padding);\r\n break;\r\n case 'start':\r\n posStrategy = posStrategy.start(padding);\r\n break;\r\n }\r\n\r\n var overlayRef = this._overlayService.create({\r\n positionStrategy: posStrategy,\r\n });\r\n\r\n var componentRef = overlayRef.attach(portal);\r\n componentRef.instance.toastRef = this._toastRef = new ToastRef(config, overlayRef);\r\n\r\n setTimeout(() => {\r\n this._toastRef?.close();\r\n }, config?.duration ?? 3000);\r\n\r\n return this._toastRef;\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;MAIa,QAAQ,CAAA;AAKW,IAAA,MAAA;AAA6B,IAAA,UAAA;IAJjD,OAAO,GAAG,IAAI;AACd,IAAA,cAAc,GAAG,IAAI,OAAO,EAAO;AACpC,IAAA,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE;IAElD,WAAA,CAA4B,MAAmB,EAAU,UAAsB,EAAA;QAAnD,IAAA,CAA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AAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAZ,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cAFX,MAAM,EAAA,CAAA;;2FAEP,YAAY,EAAA,UAAA,EAAA,CAAA;kBAHxB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACtCD;;AAEG;;;;"}
|
|
@@ -33,10 +33,10 @@ class TooltipWrapperComponent {
|
|
|
33
33
|
this.hasTemplate = content instanceof TemplateRef;
|
|
34
34
|
this.changeDetectorRef.markForCheck();
|
|
35
35
|
}
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
37
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TooltipWrapperComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
37
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: TooltipWrapperComponent, isStandalone: true, selector: "ng0-tooltip-wrapper", host: { properties: { "class.bs-tooltip-top": "placement == \"top\"", "class.bs-tooltip-bottom": "placement == \"bottom\"", "class.bs-tooltip-start": "placement == \"start\"", "class.bs-tooltip-end": "placement == \"end\"" } }, exportAs: ["ng0TooltipWrapper"], ngImport: i0, template: "<div class=\"tooltip-arrow\"></div>\r\n<div class=\"tooltip-inner\">\r\n @if(hasTemplate) {\r\n <ng-container [ngTemplateOutlet]=\"$any(content)\"></ng-container>\r\n }@else{\r\n {{content}}\r\n }\r\n</div>", styles: [":host{position:relative;padding:var(--bs-tooltip-arrow-height)}:host .tooltip-arrow{position:absolute}:host.bs-tooltip-top .tooltip-arrow{bottom:0;left:calc(50% - var(--bs-tooltip-arrow-width) / 2)}:host.bs-tooltip-bottom .tooltip-arrow{top:0;left:calc(50% - var(--bs-tooltip-arrow-width) / 2)}:host.bs-tooltip-start .tooltip-arrow{right:0;top:calc(50% - var(--bs-tooltip-arrow-width) / 2)}[dir=rtl] :host.bs-tooltip-start .tooltip-arrow{right:unset!important;left:0;transform:rotate(180deg)}:host.bs-tooltip-end .tooltip-arrow{left:0;top:calc(50% - var(--bs-tooltip-arrow-width) / 2)}[dir=rtl] :host.bs-tooltip-end .tooltip-arrow{left:unset!important;right:0;transform:rotate(180deg)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TooltipWrapperComponent, decorators: [{
|
|
40
40
|
type: Component,
|
|
41
41
|
args: [{ selector: 'ng0-tooltip-wrapper', exportAs: 'ng0TooltipWrapper', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [CommonModule], host: {
|
|
42
42
|
'[class.bs-tooltip-top]': 'placement == "top"',
|
|
@@ -115,10 +115,10 @@ class TooltipDirective {
|
|
|
115
115
|
ngOnDestroy() {
|
|
116
116
|
this.disposeOverlay();
|
|
117
117
|
}
|
|
118
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
119
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.DestroyRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
119
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: TooltipDirective, isStandalone: true, selector: "[ng0Tooltip]", inputs: { content: { classPropertyName: "content", publicName: "ng0Tooltip", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "placement", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, exportAs: ["ng0Tooltip"], ngImport: i0 });
|
|
120
120
|
}
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
122
122
|
type: Directive,
|
|
123
123
|
args: [{
|
|
124
124
|
selector: '[ng0Tooltip]',
|