@energinet/watt 1.2.1 → 1.2.3
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/data/watt-data-table.component.d.ts +2 -1
- package/fesm2022/energinet-watt-data.mjs +8 -3
- package/fesm2022/energinet-watt-data.mjs.map +1 -1
- package/fesm2022/energinet-watt-slide-toggle.mjs +2 -2
- package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
- package/fesm2022/energinet-watt-table.mjs +2 -2
- package/fesm2022/energinet-watt-table.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ export declare class WattDataTableComponent {
|
|
|
10
10
|
ready: import("@angular/core").InputSignal<boolean>;
|
|
11
11
|
enableSearch: import("@angular/core").InputSignal<boolean>;
|
|
12
12
|
enableRetry: import("@angular/core").InputSignal<boolean>;
|
|
13
|
+
enableCount: import("@angular/core").InputSignal<boolean>;
|
|
13
14
|
queryTime: import("@angular/core").InputSignal<number | undefined>;
|
|
14
15
|
searchLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
15
16
|
enablePaginator: import("@angular/core").InputSignal<boolean>;
|
|
@@ -23,5 +24,5 @@ export declare class WattDataTableComponent {
|
|
|
23
24
|
reset: () => void | undefined;
|
|
24
25
|
onSearch(value: string): void;
|
|
25
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<WattDataTableComponent, never>;
|
|
26
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WattDataTableComponent, "watt-data-table", never, { "error": { "alias": "error"; "required": false; "isSignal": true; }; "ready": { "alias": "ready"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "enableRetry": { "alias": "enableRetry"; "required": false; "isSignal": true; }; "queryTime": { "alias": "queryTime"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "enablePaginator": { "alias": "enablePaginator"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "clear": "clear"; "pageChanged": "pageChanged"; "retry": "retry"; }, ["table"], ["h3", "h4", "*", "watt-data-actions", "watt-button", "watt-data-filters", "watt-table"], true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WattDataTableComponent, "watt-data-table", never, { "error": { "alias": "error"; "required": false; "isSignal": true; }; "ready": { "alias": "ready"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "enableRetry": { "alias": "enableRetry"; "required": false; "isSignal": true; }; "enableCount": { "alias": "enableCount"; "required": false; "isSignal": true; }; "queryTime": { "alias": "queryTime"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "enablePaginator": { "alias": "enablePaginator"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, { "clear": "clear"; "pageChanged": "pageChanged"; "retry": "retry"; }, ["table"], ["h3", "h4", "*", "watt-data-actions", "watt-button", "watt-data-filters", "watt-table"], true, never>;
|
|
27
28
|
}
|
|
@@ -129,6 +129,7 @@ class WattDataTableComponent {
|
|
|
129
129
|
ready = input(true);
|
|
130
130
|
enableSearch = input(true);
|
|
131
131
|
enableRetry = input(false);
|
|
132
|
+
enableCount = input(true);
|
|
132
133
|
queryTime = input();
|
|
133
134
|
searchLabel = input();
|
|
134
135
|
enablePaginator = input(true);
|
|
@@ -146,14 +147,16 @@ class WattDataTableComponent {
|
|
|
146
147
|
this.clear.emit();
|
|
147
148
|
}
|
|
148
149
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDataTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
149
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDataTableComponent, isStandalone: true, selector: "watt-data-table", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, ready: { classPropertyName: "ready", publicName: "ready", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, enableRetry: { classPropertyName: "enableRetry", publicName: "enableRetry", isSignal: true, isRequired: false, transformFunction: null }, queryTime: { classPropertyName: "queryTime", publicName: "queryTime", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, enablePaginator: { classPropertyName: "enablePaginator", publicName: "enablePaginator", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear", pageChanged: "pageChanged", retry: "retry" }, queries: [{ propertyName: "table", first: true, predicate: (WattTableComponent), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "search", first: true, predicate: WattSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
150
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattDataTableComponent, isStandalone: true, selector: "watt-data-table", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, ready: { classPropertyName: "ready", publicName: "ready", isSignal: true, isRequired: false, transformFunction: null }, enableSearch: { classPropertyName: "enableSearch", publicName: "enableSearch", isSignal: true, isRequired: false, transformFunction: null }, enableRetry: { classPropertyName: "enableRetry", publicName: "enableRetry", isSignal: true, isRequired: false, transformFunction: null }, enableCount: { classPropertyName: "enableCount", publicName: "enableCount", isSignal: true, isRequired: false, transformFunction: null }, queryTime: { classPropertyName: "queryTime", publicName: "queryTime", isSignal: true, isRequired: false, transformFunction: null }, searchLabel: { classPropertyName: "searchLabel", publicName: "searchLabel", isSignal: true, isRequired: false, transformFunction: null }, enablePaginator: { classPropertyName: "enablePaginator", publicName: "enablePaginator", isSignal: true, isRequired: false, transformFunction: null }, count: { classPropertyName: "count", publicName: "count", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clear: "clear", pageChanged: "pageChanged", retry: "retry" }, queries: [{ propertyName: "table", first: true, predicate: (WattTableComponent), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "search", first: true, predicate: WattSearchComponent, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
150
151
|
<watt-card vater fill="vertical" [variant]="variant()">
|
|
151
152
|
<vater-flex fill="vertical" gap="m">
|
|
152
153
|
<vater-stack direction="row" gap="m">
|
|
153
154
|
<vater-stack direction="row" gap="s">
|
|
154
155
|
<ng-content select="h3" />
|
|
155
156
|
<ng-content select="h4" />
|
|
156
|
-
|
|
157
|
+
@if (enableCount()) {
|
|
158
|
+
<span class="watt-chip-label">{{ count() ?? table().dataSource.totalCount }}</span>
|
|
159
|
+
}
|
|
157
160
|
@if (queryTime()) {
|
|
158
161
|
<span class="watt-label">in {{ queryTime() }} ms</span>
|
|
159
162
|
}
|
|
@@ -215,7 +218,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
215
218
|
<vater-stack direction="row" gap="s">
|
|
216
219
|
<ng-content select="h3" />
|
|
217
220
|
<ng-content select="h4" />
|
|
218
|
-
|
|
221
|
+
@if (enableCount()) {
|
|
222
|
+
<span class="watt-chip-label">{{ count() ?? table().dataSource.totalCount }}</span>
|
|
223
|
+
}
|
|
219
224
|
@if (queryTime()) {
|
|
220
225
|
<span class="watt-label">in {{ queryTime() }} ms</span>
|
|
221
226
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattSearchComponent,\n WattButtonComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n :root {\n --watt-data-table-empty-state-margin: auto;\n }\n\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-data-filters {\n min-height: 44px;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m)) -24px -24px;\n }\n\n watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell {\n border-bottom: none;\n }\n\n .watt-data-table--empty-state {\n margin-bottom: var(--watt-space-m);\n overflow: auto;\n\n & > watt-empty-state {\n margin: var(--watt-data-table-empty-state-margin);\n }\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex fill=\"vertical\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"s\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n <span class=\"watt-chip-label\">{{ count() ?? table().dataSource.totalCount }}</span>\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n </vater-stack>\n <ng-content />\n <vater-spacer />\n @if (enableSearch()) {\n <watt-search [label]=\"searchLabel() ?? intl.search\" (search)=\"onSearch($event)\" />\n }\n <ng-content select=\"watt-data-actions\" />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <ng-content select=\"watt-data-filters\" />\n <vater-flex scrollable fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (!table().loading && table().dataSource.filteredData.length === 0) {\n <div class=\"watt-data-table--empty-state\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? 'cancel' : 'custom-explore'\"\n [title]=\"error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\">{{\n intl.emptyRetry\n }}</watt-button>\n }\n </watt-empty-state>\n </div>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource\"\n [length]=\"count() ?? 0\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n enableRetry = input(false);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n count = input<number>();\n variant = input<WATT_CARD_VARIANT>('elevation');\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource.filter = value;\n if (!value) this.clear.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,E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;;;;;;;;;;;;;;;;;;;;;;AAgDT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA;;;AC9IH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattSearchComponent,\n WattButtonComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n :root {\n --watt-data-table-empty-state-margin: auto;\n }\n\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-data-filters {\n min-height: 44px;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m)) -24px -24px;\n }\n\n watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell {\n border-bottom: none;\n }\n\n .watt-data-table--empty-state {\n margin-bottom: var(--watt-space-m);\n overflow: auto;\n\n & > watt-empty-state {\n margin: var(--watt-data-table-empty-state-margin);\n }\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex fill=\"vertical\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"s\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">{{ count() ?? table().dataSource.totalCount }}</span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n </vater-stack>\n <ng-content />\n <vater-spacer />\n @if (enableSearch()) {\n <watt-search [label]=\"searchLabel() ?? intl.search\" (search)=\"onSearch($event)\" />\n }\n <ng-content select=\"watt-data-actions\" />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <ng-content select=\"watt-data-filters\" />\n <vater-flex scrollable fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (!table().loading && table().dataSource.filteredData.length === 0) {\n <div class=\"watt-data-table--empty-state\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? 'cancel' : 'custom-explore'\"\n [title]=\"error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\">{{\n intl.emptyRetry\n }}</watt-button>\n }\n </watt-empty-state>\n </div>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource\"\n [length]=\"count() ?? 0\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n count = input<number>();\n variant = input<WATT_CARD_VARIANT>('elevation');\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource.filter = value;\n if (!value) this.clear.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAgB,cAAA,CAAA;AAC3B,iBAAA;;;ACvBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAgB,cAAA,CAAA;AAC3B,iBAAA;;;ACvBD;AACA;;;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,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAClB,OAAA,EAAA;wBACP,kBAAkB;wBAClB,oBAAoB;wBACpB,mBAAmB;wBACnB,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,sBAAsB;wBACtB,mBAAmB;wBACnB,mBAAmB;qBACpB,EACc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAqC3B,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA;;;AChJH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -57,7 +57,7 @@ class WattSlideToggleComponent {
|
|
|
57
57
|
[disableRipple]="true"
|
|
58
58
|
[hideIcon]="true"
|
|
59
59
|
><ng-content
|
|
60
|
-
/></mat-slide-toggle>`, isInline: true, styles: ["watt-slide-toggle .mat-mdc-slide-toggle{--mat-switch-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-unselected-handle-horizontal-margin: 0 8px;--mat-switch-unselected-pressed-handle-horizontal-margin: 0 8px;--mat-switch-selected-handle-horizontal-margin: 0 -8px;--mat-switch-selected-pressed-handle-horizontal-margin: 0 -8px;--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-pressed-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-focus-handle-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-width: 0px}watt-slide-toggle .mat-mdc-slide-toggle:focus-within{--mat-switch-track-outline-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle * label{font-size
|
|
60
|
+
/></mat-slide-toggle>`, isInline: true, styles: ["watt-slide-toggle .mat-mdc-slide-toggle{--mat-switch-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-unselected-handle-horizontal-margin: 0 8px;--mat-switch-unselected-pressed-handle-horizontal-margin: 0 8px;--mat-switch-selected-handle-horizontal-margin: 0 -8px;--mat-switch-selected-pressed-handle-horizontal-margin: 0 -8px;--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-pressed-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-focus-handle-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-width: 0px}watt-slide-toggle .mat-mdc-slide-toggle:focus-within{--mat-switch-track-outline-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle * label{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;padding-left:8px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__track{--mdc-switch-track-shape: 100px;--mdc-switch-track-height: 32px;--mdc-switch-unselected-track-color: white;--mdc-switch-unselected-hover-track-color: white;--mdc-switch-unselected-focus-track-color: white;--mdc-switch-unselected-pressed-track-color: white;--mdc-switch-selected-track-color: var(--watt-color-primary);--mdc-switch-selected-pressed-track-color: var(--watt-color-primary);--mdc-switch-selected-hover-track-color: var(--watt-color-primary);--mdc-switch-selected-focus-track-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch{--mdc-switch-track-width: 52px;--mdc-switch-handle-elevation-shadow: none}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle{--mdc-switch-handle-surface-color: var(--watt-on-light-low-emphasis);--mdc-switch-handle-width: 16px;--mdc-switch-handle-height: 16px;--mdc-switch-handle-shape: 24px;--mat-switch-unselected-handle-size: 16px;--mat-switch-pressed-handle-size: 16px;--mat-switch-selected-handle-size: 16px;--mat-switch-selected-pressed-handle-size: 16px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle,watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch--selected{--mdc-switch-handle-surface-color: white}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle,watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch--unselected:enabled:hover:not(:focus):not(:active){--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis)}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle-track{--mdc-switch-handle-width: 16px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__ripple{display:none}\n"], dependencies: [{ kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i1.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
61
61
|
}
|
|
62
62
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattSlideToggleComponent, decorators: [{
|
|
63
63
|
type: Component,
|
|
@@ -74,7 +74,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
74
74
|
[disableRipple]="true"
|
|
75
75
|
[hideIcon]="true"
|
|
76
76
|
><ng-content
|
|
77
|
-
/></mat-slide-toggle>`, styles: ["watt-slide-toggle .mat-mdc-slide-toggle{--mat-switch-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-unselected-handle-horizontal-margin: 0 8px;--mat-switch-unselected-pressed-handle-horizontal-margin: 0 8px;--mat-switch-selected-handle-horizontal-margin: 0 -8px;--mat-switch-selected-pressed-handle-horizontal-margin: 0 -8px;--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-pressed-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-focus-handle-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-width: 0px}watt-slide-toggle .mat-mdc-slide-toggle:focus-within{--mat-switch-track-outline-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle * label{font-size
|
|
77
|
+
/></mat-slide-toggle>`, styles: ["watt-slide-toggle .mat-mdc-slide-toggle{--mat-switch-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-color: var(--watt-on-light-low-emphasis);--mat-switch-unselected-handle-horizontal-margin: 0 8px;--mat-switch-unselected-pressed-handle-horizontal-margin: 0 8px;--mat-switch-selected-handle-horizontal-margin: 0 -8px;--mat-switch-selected-pressed-handle-horizontal-margin: 0 -8px;--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-pressed-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-handle-color: var(--watt-on-light-low-emphasis);--mdc-switch-unselected-focus-handle-color: var(--watt-on-light-low-emphasis);--mat-switch-selected-track-outline-width: 0px}watt-slide-toggle .mat-mdc-slide-toggle:focus-within{--mat-switch-track-outline-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle * label{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;padding-left:8px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__track{--mdc-switch-track-shape: 100px;--mdc-switch-track-height: 32px;--mdc-switch-unselected-track-color: white;--mdc-switch-unselected-hover-track-color: white;--mdc-switch-unselected-focus-track-color: white;--mdc-switch-unselected-pressed-track-color: white;--mdc-switch-selected-track-color: var(--watt-color-primary);--mdc-switch-selected-pressed-track-color: var(--watt-color-primary);--mdc-switch-selected-hover-track-color: var(--watt-color-primary);--mdc-switch-selected-focus-track-color: var(--watt-color-primary)}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch{--mdc-switch-track-width: 52px;--mdc-switch-handle-elevation-shadow: none}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle{--mdc-switch-handle-surface-color: var(--watt-on-light-low-emphasis);--mdc-switch-handle-width: 16px;--mdc-switch-handle-height: 16px;--mdc-switch-handle-shape: 24px;--mat-switch-unselected-handle-size: 16px;--mat-switch-pressed-handle-size: 16px;--mat-switch-selected-handle-size: 16px;--mat-switch-selected-pressed-handle-size: 16px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle,watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch--selected{--mdc-switch-handle-surface-color: white}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle,watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch--unselected:enabled:hover:not(:focus):not(:active){--mdc-switch-unselected-hover-handle-color: var(--watt-on-light-low-emphasis)}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__handle-track{--mdc-switch-handle-width: 16px}watt-slide-toggle .mat-mdc-slide-toggle .mdc-switch__ripple{display:none}\n"] }]
|
|
78
78
|
}] });
|
|
79
79
|
|
|
80
80
|
//#region License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-slide-toggle.mjs","sources":["../../../libs/watt/package/slide-toggle/watt-slide-toggle.component.ts","../../../libs/watt/package/slide-toggle/index.ts","../../../libs/watt/package/slide-toggle/energinet-watt-slide-toggle.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport {\n inject,\n input,\n model,\n signal,\n Component,\n forwardRef,\n ElementRef,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\n/**\n * Slide toggle\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [MatSlideToggleModule, FormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattSlideToggleComponent),\n multi: true,\n },\n ],\n selector: 'watt-slide-toggle',\n styleUrls: ['./watt-slide-toggle.component.scss'],\n template: `<mat-slide-toggle\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [(ngModel)]=\"checked\"\n [disableRipple]=\"true\"\n [hideIcon]=\"true\"\n ><ng-content\n /></mat-slide-toggle>`,\n})\nexport class WattSlideToggleComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n\n checked = model(false);\n isDisabled = signal(false);\n required = input(false);\n\n writeValue(checked: boolean): void {\n this.checked.set(checked);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.checked.subscribe(fn);\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattSlideToggleComponent } from './watt-slide-toggle.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAgBA;;AAEG;MAuBU,wBAAwB,CAAA;AAC3B,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAEpC,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1B,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AAEvB,IAAA,UAAU,CAAC,OAAgB,EAAA;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;;AAG3B,IAAA,gBAAgB,CAAC,EAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;;AAG5B,IAAA,iBAAiB,CAAC,EAA4B,EAAA;QAC5C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC;;AAG7D,IAAA,gBAAgB,CAAE,UAAmB,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC;;uGApBtB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAlBxB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,EAAA,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,wBAAwB,CAAC;AACvD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;SACF,EAGS,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;;wBAOY,EAjBZ,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"energinet-watt-slide-toggle.mjs","sources":["../../../libs/watt/package/slide-toggle/watt-slide-toggle.component.ts","../../../libs/watt/package/slide-toggle/index.ts","../../../libs/watt/package/slide-toggle/energinet-watt-slide-toggle.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\nimport {\n inject,\n input,\n model,\n signal,\n Component,\n forwardRef,\n ElementRef,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\n\n/**\n * Slide toggle\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [MatSlideToggleModule, FormsModule],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattSlideToggleComponent),\n multi: true,\n },\n ],\n selector: 'watt-slide-toggle',\n styleUrls: ['./watt-slide-toggle.component.scss'],\n template: `<mat-slide-toggle\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [(ngModel)]=\"checked\"\n [disableRipple]=\"true\"\n [hideIcon]=\"true\"\n ><ng-content\n /></mat-slide-toggle>`,\n})\nexport class WattSlideToggleComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n\n checked = model(false);\n isDisabled = signal(false);\n required = input(false);\n\n writeValue(checked: boolean): void {\n this.checked.set(checked);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.checked.subscribe(fn);\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattSlideToggleComponent } from './watt-slide-toggle.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAgBA;;AAEG;MAuBU,wBAAwB,CAAA;AAC3B,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAEpC,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AACtB,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1B,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AAEvB,IAAA,UAAU,CAAC,OAAgB,EAAA;AACzB,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;;AAG3B,IAAA,gBAAgB,CAAC,EAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;;AAG5B,IAAA,iBAAiB,CAAC,EAA4B,EAAA;QAC5C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC;;AAG7D,IAAA,gBAAgB,CAAE,UAAmB,EAAA;AACnC,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC;;uGApBtB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAlBxB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAA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,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAmBhC,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAtBpC,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA,CAAC,oBAAoB,EAAE,WAAW,CAAC,EACjC,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,8BAA8B,CAAC;AACvD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EACS,mBAAmB,EAEnB,QAAA,EAAA,CAAA;;;;;;;AAOY,uBAAA,CAAA,EAAA,MAAA,EAAA,CAAA,sqFAAA,CAAA,EAAA;;;ACxDxB;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -329,7 +329,7 @@ class WattTableComponent {
|
|
|
329
329
|
this.rowClick.emit(row);
|
|
330
330
|
}
|
|
331
331
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
332
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattTableComponent, isStandalone: true, selector: "watt-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: null }, resolveHeader: { classPropertyName: "resolveHeader", publicName: "resolveHeader", isSignal: false, isRequired: false, transformFunction: null }, sortBy: { classPropertyName: "sortBy", publicName: "sortBy", isSignal: false, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: false, isRequired: false, transformFunction: null }, sortClear: { classPropertyName: "sortClear", publicName: "sortClear", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: false, isRequired: false, transformFunction: null }, initialSelection: { classPropertyName: "initialSelection", publicName: "initialSelection", isSignal: true, isRequired: false, transformFunction: null }, suppressRowHoverHighlight: { classPropertyName: "suppressRowHoverHighlight", publicName: "suppressRowHoverHighlight", isSignal: false, isRequired: false, transformFunction: null }, activeRow: { classPropertyName: "activeRow", publicName: "activeRow", isSignal: false, isRequired: false, transformFunction: null }, activeRowComparator: { classPropertyName: "activeRowComparator", publicName: "activeRowComparator", isSignal: false, isRequired: false, transformFunction: null }, hideColumnHeaders: { classPropertyName: "hideColumnHeaders", publicName: "hideColumnHeaders", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", rowClick: "rowClick", sortChange: "sortChange" }, providers: [WattDatePipe], queries: [{ propertyName: "_toolbar", first: true, predicate: WattTableToolbarDirective, descendants: true }, { propertyName: "_cells", predicate: WattTableCellDirective }], viewQueries: [{ propertyName: "_sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n", styles: ["watt-table{--mat-table-row-item-label-text-font: $primary-font-family;--mat-table-row-item-outline-color: var(--watt-color-neutral-grey-300);--mat-table-header-headline-font: $primary-font-family}watt-table,watt-table .mat-mdc-table{display:grid;position:relative;overflow:auto;min-height:44px}watt-table .mat-mdc-table{grid-template-columns:var(--watt-table-grid-template-columns);grid-auto-rows:max-content;max-height:100%;z-index:1}watt-table .mat-mdc-table thead,watt-table .mat-mdc-table tbody,watt-table .mat-mdc-table tfoot,watt-table .mat-mdc-table tr.mat-mdc-row,watt-table .mat-mdc-table tr.mat-mdc-header-row,watt-table .mat-mdc-table tr.mat-mdc-footer-row{display:contents}watt-table .mat-mdc-table tr.mat-mdc-header-row{flex:0 0 auto}watt-table .mat-mdc-table th.mat-mdc-header-cell{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:uppercase;box-sizing:border-box;display:flex;position:sticky;top:0;padding:0 var(--watt-space-s);height:auto;background:var(--watt-color-primary-ultralight);box-shadow:0 -1px #0000001f inset;border:0;z-index:2!important;white-space:nowrap;-webkit-user-select:none;user-select:none}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table td.mat-mdc-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row td{cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row) td{background:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-active-row td{background:var(--watt-color-secondary-ultralight)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .mat-sort-header-arrow{margin-left:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-header-cell{padding:.75rem var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-checkbox-cell{justify-content:center}watt-table .mat-mdc-table th.watt-table-checkbox-cell{display:flex;align-items:center}watt-table .mat-mdc-table .watt-table-align-center,watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-container{justify-content:center}watt-table .mat-mdc-table .watt-table-align-right,watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-container{justify-content:right}.watt-table-footer-spacer{display:none;height:76px;border:0}.watt-table-has-selection .watt-table-footer-spacer{display:block}.watt-table-has-selection+.watt-table-toolbar{opacity:1;visibility:visible;transition:opacity .3s cubic-bezier(0,0,.2,1),visibility .5s}.watt-table-toolbar{position:absolute;bottom:var(--watt-space-m);left:50%;transform:translate(-50%);display:flex;align-items:center;padding:0 var(--watt-space-m);min-height:44px;border-radius:22px;color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);z-index:1;opacity:0;visibility:hidden;transition:none}.watt-table-toolbar .watt-button--disabled{opacity:.4;--watt-button-primary-disabled-color: #fff}.watt-table-loading-cell:before{content:\"\";flex:1;display:block;max-width:200px;height:var(--watt-space-m);border-radius:var(--watt-space-m);opacity:.75;animation:shine 2s infinite linear;background-color:var(--watt-color-neutral-grey-200);background-size:300px;background-position:-100px;background-image:linear-gradient(90deg,var(--watt-color-neutral-grey-300) 0px,var(--watt-color-neutral-grey-200) 40px,var(--watt-color-neutral-grey-300) 80px)}@keyframes shine{40%,to{background-position:200px}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i3.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "component", type: WattCheckboxComponent, selector: "watt-checkbox", inputs: ["required"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
332
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattTableComponent, isStandalone: true, selector: "watt-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: false, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: false, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: false, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: false, isRequired: false, transformFunction: null }, resolveHeader: { classPropertyName: "resolveHeader", publicName: "resolveHeader", isSignal: false, isRequired: false, transformFunction: null }, sortBy: { classPropertyName: "sortBy", publicName: "sortBy", isSignal: false, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: false, isRequired: false, transformFunction: null }, sortClear: { classPropertyName: "sortClear", publicName: "sortClear", isSignal: false, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: false, isRequired: false, transformFunction: null }, initialSelection: { classPropertyName: "initialSelection", publicName: "initialSelection", isSignal: true, isRequired: false, transformFunction: null }, suppressRowHoverHighlight: { classPropertyName: "suppressRowHoverHighlight", publicName: "suppressRowHoverHighlight", isSignal: false, isRequired: false, transformFunction: null }, activeRow: { classPropertyName: "activeRow", publicName: "activeRow", isSignal: false, isRequired: false, transformFunction: null }, activeRowComparator: { classPropertyName: "activeRowComparator", publicName: "activeRowComparator", isSignal: false, isRequired: false, transformFunction: null }, hideColumnHeaders: { classPropertyName: "hideColumnHeaders", publicName: "hideColumnHeaders", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { selectionChange: "selectionChange", rowClick: "rowClick", sortChange: "sortChange" }, providers: [WattDatePipe], queries: [{ propertyName: "_toolbar", first: true, predicate: WattTableToolbarDirective, descendants: true }, { propertyName: "_cells", predicate: WattTableCellDirective }], viewQueries: [{ propertyName: "_sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n", styles: ["watt-table{--mat-table-row-item-label-text-font: $primary-font-family;--mat-table-row-item-outline-color: var(--watt-color-neutral-grey-300);--mat-table-header-headline-font: $primary-font-family}watt-table,watt-table .mat-mdc-table{display:grid;position:relative;overflow:auto;min-height:44px}watt-table .mat-mdc-table{grid-template-columns:var(--watt-table-grid-template-columns);grid-auto-rows:max-content;max-height:100%;z-index:1}watt-table .mat-mdc-table thead,watt-table .mat-mdc-table tbody,watt-table .mat-mdc-table tfoot,watt-table .mat-mdc-table tr.mat-mdc-row,watt-table .mat-mdc-table tr.mat-mdc-header-row,watt-table .mat-mdc-table tr.mat-mdc-footer-row{display:contents}watt-table .mat-mdc-table tr.mat-mdc-header-row{flex:0 0 auto}watt-table .mat-mdc-table th.mat-mdc-header-cell{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:uppercase;box-sizing:border-box;display:flex;position:sticky;top:0;padding:0 var(--watt-space-s);height:auto;background:var(--watt-color-primary-ultralight);box-shadow:0 -1px #0000001f inset;border:0;z-index:2!important;white-space:nowrap;-webkit-user-select:none;user-select:none}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table td.mat-mdc-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table td.mat-mdc-footer-cell{font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:none;letter-spacing:0;border-top:2px solid var(--watt-color-neutral-grey-300);background-color:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row td{cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row) td{background:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-active-row td{background:var(--watt-color-secondary-ultralight)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .mat-sort-header-arrow{margin-left:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-header-cell{padding:.75rem var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-checkbox-cell{justify-content:center}watt-table .mat-mdc-table th.watt-table-checkbox-cell{display:flex;align-items:center}watt-table .mat-mdc-table .watt-table-align-center,watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-container{justify-content:center}watt-table .mat-mdc-table .watt-table-align-right,watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-container{justify-content:right}.watt-table-footer-spacer{display:none;height:76px;border:0}.watt-table-has-selection .watt-table-footer-spacer{display:block}.watt-table-has-selection+.watt-table-toolbar{opacity:1;visibility:visible;transition:opacity .3s cubic-bezier(0,0,.2,1),visibility .5s}.watt-table-toolbar{position:absolute;bottom:var(--watt-space-m);left:50%;transform:translate(-50%);display:flex;align-items:center;padding:0 var(--watt-space-m);min-height:44px;border-radius:22px;color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);z-index:1;opacity:0;visibility:hidden;transition:none}.watt-table-toolbar .watt-button--disabled{opacity:.4;--watt-button-primary-disabled-color: #fff}.watt-table-loading-cell:before{content:\"\";flex:1;display:block;max-width:200px;height:var(--watt-space-m);border-radius:var(--watt-space-m);opacity:.75;animation:shine 2s infinite linear;background-color:var(--watt-color-neutral-grey-200);background-size:300px;background-position:-100px;background-image:linear-gradient(90deg,var(--watt-color-neutral-grey-300) 0px,var(--watt-color-neutral-grey-200) 40px,var(--watt-color-neutral-grey-300) 80px)}@keyframes shine{40%,to{background-position:200px}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i2.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i3.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i3.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i3.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i3.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i3.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i3.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i3.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i3.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i3.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i3.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i3.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i3.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i3.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i3.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: i3.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "component", type: WattCheckboxComponent, selector: "watt-checkbox", inputs: ["required"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
333
333
|
}
|
|
334
334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattTableComponent, decorators: [{
|
|
335
335
|
type: Component,
|
|
@@ -342,7 +342,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
342
342
|
MatTableModule,
|
|
343
343
|
WattCheckboxComponent,
|
|
344
344
|
WattIconComponent,
|
|
345
|
-
], providers: [WattDatePipe], encapsulation: ViewEncapsulation.None, selector: 'watt-table', template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n", styles: ["watt-table{--mat-table-row-item-label-text-font: $primary-font-family;--mat-table-row-item-outline-color: var(--watt-color-neutral-grey-300);--mat-table-header-headline-font: $primary-font-family}watt-table,watt-table .mat-mdc-table{display:grid;position:relative;overflow:auto;min-height:44px}watt-table .mat-mdc-table{grid-template-columns:var(--watt-table-grid-template-columns);grid-auto-rows:max-content;max-height:100%;z-index:1}watt-table .mat-mdc-table thead,watt-table .mat-mdc-table tbody,watt-table .mat-mdc-table tfoot,watt-table .mat-mdc-table tr.mat-mdc-row,watt-table .mat-mdc-table tr.mat-mdc-header-row,watt-table .mat-mdc-table tr.mat-mdc-footer-row{display:contents}watt-table .mat-mdc-table tr.mat-mdc-header-row{flex:0 0 auto}watt-table .mat-mdc-table th.mat-mdc-header-cell{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:uppercase;box-sizing:border-box;display:flex;position:sticky;top:0;padding:0 var(--watt-space-s);height:auto;background:var(--watt-color-primary-ultralight);box-shadow:0 -1px #0000001f inset;border:0;z-index:2!important;white-space:nowrap;-webkit-user-select:none;user-select:none}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table td.mat-mdc-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row td{cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row) td{background:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-active-row td{background:var(--watt-color-secondary-ultralight)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .mat-sort-header-arrow{margin-left:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-header-cell{padding:.75rem var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-checkbox-cell{justify-content:center}watt-table .mat-mdc-table th.watt-table-checkbox-cell{display:flex;align-items:center}watt-table .mat-mdc-table .watt-table-align-center,watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-container{justify-content:center}watt-table .mat-mdc-table .watt-table-align-right,watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-container{justify-content:right}.watt-table-footer-spacer{display:none;height:76px;border:0}.watt-table-has-selection .watt-table-footer-spacer{display:block}.watt-table-has-selection+.watt-table-toolbar{opacity:1;visibility:visible;transition:opacity .3s cubic-bezier(0,0,.2,1),visibility .5s}.watt-table-toolbar{position:absolute;bottom:var(--watt-space-m);left:50%;transform:translate(-50%);display:flex;align-items:center;padding:0 var(--watt-space-m);min-height:44px;border-radius:22px;color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);z-index:1;opacity:0;visibility:hidden;transition:none}.watt-table-toolbar .watt-button--disabled{opacity:.4;--watt-button-primary-disabled-color: #fff}.watt-table-loading-cell:before{content:\"\";flex:1;display:block;max-width:200px;height:var(--watt-space-m);border-radius:var(--watt-space-m);opacity:.75;animation:shine 2s infinite linear;background-color:var(--watt-color-neutral-grey-200);background-size:300px;background-position:-100px;background-image:linear-gradient(90deg,var(--watt-color-neutral-grey-300) 0px,var(--watt-color-neutral-grey-200) 40px,var(--watt-color-neutral-grey-300) 80px)}@keyframes shine{40%,to{background-position:200px}}\n"] }]
|
|
345
|
+
], providers: [WattDatePipe], encapsulation: ViewEncapsulation.None, selector: 'watt-table', template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n", styles: ["watt-table{--mat-table-row-item-label-text-font: $primary-font-family;--mat-table-row-item-outline-color: var(--watt-color-neutral-grey-300);--mat-table-header-headline-font: $primary-font-family}watt-table,watt-table .mat-mdc-table{display:grid;position:relative;overflow:auto;min-height:44px}watt-table .mat-mdc-table{grid-template-columns:var(--watt-table-grid-template-columns);grid-auto-rows:max-content;max-height:100%;z-index:1}watt-table .mat-mdc-table thead,watt-table .mat-mdc-table tbody,watt-table .mat-mdc-table tfoot,watt-table .mat-mdc-table tr.mat-mdc-row,watt-table .mat-mdc-table tr.mat-mdc-header-row,watt-table .mat-mdc-table tr.mat-mdc-footer-row{display:contents}watt-table .mat-mdc-table tr.mat-mdc-header-row{flex:0 0 auto}watt-table .mat-mdc-table th.mat-mdc-header-cell{color:var(--watt-typography-label-color);font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:uppercase;box-sizing:border-box;display:flex;position:sticky;top:0;padding:0 var(--watt-space-s);height:auto;background:var(--watt-color-primary-ultralight);box-shadow:0 -1px #0000001f inset;border:0;z-index:2!important;white-space:nowrap;-webkit-user-select:none;user-select:none}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table td.mat-mdc-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}watt-table .mat-mdc-table td.mat-mdc-footer-cell,watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table td.mat-mdc-footer-cell{font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:none;letter-spacing:0;border-top:2px solid var(--watt-color-neutral-grey-300);background-color:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row td{cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row) td{background:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-active-row td{background:var(--watt-color-secondary-ultralight)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .mat-sort-header-arrow{margin-left:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-header-cell{padding:.75rem var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-checkbox-cell{justify-content:center}watt-table .mat-mdc-table th.watt-table-checkbox-cell{display:flex;align-items:center}watt-table .mat-mdc-table .watt-table-align-center,watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-container{justify-content:center}watt-table .mat-mdc-table .watt-table-align-right,watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-container{justify-content:right}.watt-table-footer-spacer{display:none;height:76px;border:0}.watt-table-has-selection .watt-table-footer-spacer{display:block}.watt-table-has-selection+.watt-table-toolbar{opacity:1;visibility:visible;transition:opacity .3s cubic-bezier(0,0,.2,1),visibility .5s}.watt-table-toolbar{position:absolute;bottom:var(--watt-space-m);left:50%;transform:translate(-50%);display:flex;align-items:center;padding:0 var(--watt-space-m);min-height:44px;border-radius:22px;color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);z-index:1;opacity:0;visibility:hidden;transition:none}.watt-table-toolbar .watt-button--disabled{opacity:.4;--watt-button-primary-disabled-color: #fff}.watt-table-loading-cell:before{content:\"\";flex:1;display:block;max-width:200px;height:var(--watt-space-m);border-radius:var(--watt-space-m);opacity:.75;animation:shine 2s infinite linear;background-color:var(--watt-color-neutral-grey-200);background-size:300px;background-position:-100px;background-image:linear-gradient(90deg,var(--watt-color-neutral-grey-300) 0px,var(--watt-color-neutral-grey-200) 40px,var(--watt-color-neutral-grey-300) 80px)}@keyframes shine{40%,to{background-position:200px}}\n"] }]
|
|
346
346
|
}], ctorParameters: () => [], propDecorators: { dataSource: [{
|
|
347
347
|
type: Input
|
|
348
348
|
}], columns: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-table.mjs","sources":["../../../libs/watt/package/table/watt-table-data-source.ts","../../../libs/watt/package/table/watt-table.component.ts","../../../libs/watt/package/table/watt-table.component.html","../../../libs/watt/package/table/index.ts","../../../libs/watt/package/table/energinet-watt-table.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\n\nexport interface IWattTableDataSource<T> extends DataSource<T> {\n data: T[];\n filter: string;\n filteredData: T[];\n paginator: MatPaginator | null;\n sort: MatSort | null;\n totalCount: number;\n}\n\n/**\n * @see https://material.angular.io/components/table/api#MatTableDataSource\n */\nexport class WattTableDataSource<T>\n extends MatTableDataSource<T>\n implements IWattTableDataSource<T>\n{\n constructor(\n initialData?: T[],\n config: { disableClientSideSort: boolean } = { disableClientSideSort: false }\n ) {\n super(initialData);\n\n if (config.disableClientSideSort)\n this.sortData = (data: T[]): T[] => {\n return data;\n };\n }\n\n get totalCount() {\n return this.data.length;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { KeyValue, KeyValuePipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n effect,\n ElementRef,\n EventEmitter,\n inject,\n input,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { QueryList, Signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { MatSort, MatSortModule, Sort, SortDirection } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { map } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\n\nexport interface WattTableColumn<T> {\n /**\n * The data that this column should be bound to, either as a property of `T`\n * or derived from each row of `T` using an accessor function. Use `null`\n * for columns that should not be associated with data, but note that this\n * will disable sorting and automatic cell population.\n */\n accessor: keyof T | ((row: T) => unknown) | null;\n\n /**\n * Resolve the header text to a static display value. This will prevent\n * the `resolveHeader` input function from being called for this column.\n */\n header?: string;\n\n /**\n * Callback for determining cell content when not using template. By default,\n * cell content is found using the `accessor` (unless it is `null`).\n */\n cell?: (row: T) => string;\n\n /**\n * Enable or disable sorting for this column. Defaults to `true`\n * unless `accessor` is `null`.\n */\n sort?: boolean;\n\n /**\n * Set the column size using grid sizing values. Defaults to `\"auto\"`.\n *\n * @remarks\n * Accepts all of the CSS grid track size keywords (such as `min-content`,\n * `max-content`, `minmax()`) as well as fractional (`fr`), percentage (`%`)\n * and length (`px`, `em`, etc) units.\n *\n * @see https://drafts.csswg.org/css-grid/#track-sizes\n */\n size?: string;\n\n /**\n * Horizontally align the contents of the column. Defaults to `\"left\"`.\n */\n align?: 'left' | 'right' | 'center';\n\n /**\n * Helper icon will be shown in the header cell, with an click event.\n */\n helperAction?: () => void;\n\n /**\n * CSS class to apply to the header cell element.\n */\n headerCellClass?: string;\n\n /**\n * CSS class to apply to the data cell element.\n */\n dataCellClass?: string;\n\n /**\n * Footer configuration for the column.\n */\n footer?: WattTableColumnFooter;\n\n /**\n * When set to `true`, the column remains visible when horizontally scrolling.\n */\n stickyEnd?: Signal<boolean>;\n}\n\n/**\n * Configuration for the footer cell of a column.\n */\nexport interface WattTableColumnFooter {\n /**\n * The value that will be displayed in the footer cell.\n */\n value?: Signal<string | number>;\n\n /**\n * CSS class to apply to the footer cell.\n */\n class?: string;\n}\n\n/**\n * Record for defining columns with keys used as column identifiers.\n */\nexport type WattTableColumnDef<T> = Record<string, WattTableColumn<T>>;\n\n// Used for strongly typing the structural directive\ninterface WattTableCellContext<T> {\n $implicit: T;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n /** The WattTableColumn this template applies to. */\n @Input('wattTableCell') column!: WattTableColumn<T>;\n @Input('wattTableCellHeader') header?: string;\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableCellDirective<T>,\n context: unknown\n ): context is WattTableCellContext<T> {\n return true;\n }\n}\n\n@Directive({\n selector: '[wattTableToolbar]',\n})\nexport class WattTableToolbarDirective<T> {\n templateRef = inject(TemplateRef<WattTableToolbarContext<T[]>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableToolbarDirective<T>,\n context: unknown\n ): context is WattTableToolbarContext<T[]> {\n return true;\n }\n}\n\n/**\n * Usage:\n * `import { WATT_TABLE } from '@energinet-datahub/watt/table';`\n */\n@Component({\n imports: [\n NgClass,\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattCheckboxComponent,\n WattIconComponent,\n ],\n providers: [WattDatePipe],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n})\nexport class WattTableComponent<T> implements OnChanges, AfterViewInit {\n /**\n * The table's source of data. Property should not be changed after\n * initialization, instead update the data on the instance itself.\n */\n @Input() dataSource!: IWattTableDataSource<T>;\n\n /**\n * Column definition record with keys representing the column identifiers\n * and values being the column configuration. The order of the columns\n * is determined by the property order, but can be overruled by the\n * `displayedColumns` input.\n */\n @Input() columns: WattTableColumnDef<T> = {};\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n @Input() displayedColumns?: string[];\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n @Input() disabled = false;\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n @Input() description = '';\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n @Input() loading = false;\n\n /**\n * Optional callback for determining header text for columns that\n * do not have a static header text set in the column definition.\n * Useful for providing translations of column headers.\n */\n @Input()\n resolveHeader?: (key: string) => string;\n\n /**\n * Identifier for column that should be sorted initially.\n */\n @Input()\n sortBy = '';\n\n /**\n * The sort direction of the initially sorted column.\n */\n @Input()\n sortDirection: SortDirection = '';\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n @Input()\n sortClear = true;\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n @Input()\n selectable = false;\n\n /**\n * Sets the initially selected rows. Only works when selectable is `true`.\n */\n\n initialSelection = input<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n @Input()\n suppressRowHoverHighlight = false;\n\n /**\n * Highlights the currently active row.\n */\n @Input()\n activeRow?: T;\n\n /**\n * Custom comparator function to determine if two rows are equal.\n *\n * @remarks\n * The default behavior for determining the active row is to compare\n * the two row objects using strict equality check. This is sufficient\n * as long as the instances remain the same, which may not be the case\n * if row data is recreated or rebuilt from serialization.\n */\n @Input()\n activeRowComparator?: (currentRow: T, activeRow: T) => boolean;\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n @Input()\n hideColumnHeaders = false;\n\n /**\n * Emits whenever the selection updates. Only works when selectable is `true`.\n */\n @Output()\n selectionChange = new EventEmitter<T[]>();\n\n /**\n * Emits whenever a row is clicked.\n */\n @Output()\n rowClick = new EventEmitter<T>();\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n @Output()\n sortChange = new EventEmitter<Sort>();\n\n /** @ignore */\n @ContentChildren(WattTableCellDirective)\n _cells!: QueryList<WattTableCellDirective<T>>;\n\n /** @ignore */\n @ContentChild(WattTableToolbarDirective)\n _toolbar?: WattTableToolbarDirective<T>;\n\n /** @ignore */\n @ViewChild(MatSort)\n _sort!: MatSort;\n\n /** @ignore */\n _selectionModel = new SelectionModel<T>(true, []);\n\n /** @ignore */\n _checkboxColumn = '__checkboxColumn__';\n\n /** @ignore */\n _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @ignore */\n _datePipe = inject(WattDatePipe);\n\n /** @ignore */\n _hasFooter = false;\n\n /** @ignore */\n private formatCellData(cell: unknown) {\n if (!cell) return '—';\n if (cell instanceof Date) return this._datePipe.transform(cell);\n return cell;\n }\n\n /** @ignore */\n private getCellData(row: T, column?: WattTableColumn<T>) {\n if (!column?.accessor) return null;\n const { accessor } = column;\n const cell = typeof accessor === 'function' ? accessor(row) : row[accessor];\n return this.formatCellData(cell);\n }\n\n /** @ignore */\n private checkHasFooter(): void {\n this._hasFooter = Object.values(this.columns).some((column) => !!column.footer);\n }\n\n constructor() {\n effect(() => {\n this._selectionModel.setSelection(...(this.initialSelection() ?? []));\n });\n this._selectionModel.changed\n .pipe(\n map(() => this._selectionModel.selected),\n takeUntilDestroyed()\n )\n .subscribe((selection) => this.selectionChange.emit(selection));\n }\n\n ngAfterViewInit() {\n if (this.dataSource === undefined) return;\n\n this.checkHasFooter();\n this.dataSource.sort = this._sort;\n if (this.dataSource instanceof WattTableDataSource === false) return;\n this.dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const sortColumn = this.columns[sortHeaderId];\n if (!sortColumn?.accessor) return '';\n\n // Access raw value for sorting, instead of applying default formatting.\n const { accessor } = sortColumn;\n const cell = typeof accessor === 'function' ? accessor(row) : row[accessor];\n\n // Make sorting by text case insensitive.\n if (typeof cell === 'string') return cell.toLowerCase();\n if (cell instanceof Date) return cell.getTime();\n return cell as number;\n };\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['columns'] || changes['displayedColumns'] || changes['selectable']) {\n const { displayedColumns } = this;\n\n if (this.columns === undefined) return;\n\n const sizing = Object.keys(this.columns)\n .filter((key) => !displayedColumns || displayedColumns.includes(key))\n .map((key) => this.columns[key].size)\n .map((size) => size ?? 'auto');\n\n if (this.selectable) {\n // Add space for extra checkbox column\n sizing.unshift('var(--watt-space-xl)');\n }\n\n this._element.nativeElement.style.setProperty(\n '--watt-table-grid-template-columns',\n sizing.join(' ')\n );\n\n this.checkHasFooter();\n }\n }\n\n /**\n * Clears the selection. Only works when selectable is `true`.\n */\n clearSelection() {\n if (this.selectable) {\n this._selectionModel.clear();\n }\n }\n\n /** @ignore */\n get _columnSelection() {\n if (this.dataSource.filteredData.length === 0) return false;\n return this.dataSource.filteredData.every((row) => this._selectionModel.isSelected(row));\n }\n\n /** @ignore */\n set _columnSelection(value) {\n if (value) {\n this._selectionModel.setSelection(...this.dataSource.filteredData);\n } else {\n this.clearSelection();\n }\n }\n\n get _filteredSelection() {\n return this._selectionModel.selected.filter((row) =>\n this.dataSource.filteredData.includes(row)\n );\n }\n\n /** @ignore */\n _getColumns() {\n if (this.columns === undefined) return [];\n const columns = this.displayedColumns ?? Object.keys(this.columns);\n return this.selectable ? [this._checkboxColumn, ...columns] : columns;\n }\n\n /** @ignore */\n _getColumnTemplate(column: WattTableColumn<T>) {\n return this._cells.find((item) => item.column === column)?.templateRef;\n }\n\n /** @ignore */\n _getColumnHeader(column: KeyValue<string, WattTableColumn<T>>) {\n if (typeof column.value.header === 'string') return column.value.header;\n const cell = this._cells.find((item) => item.column === column.value);\n return cell?.header ?? this.resolveHeader?.(column.key) ?? column.key;\n }\n\n /** @ignore */\n _getColumnHelperAction(column: KeyValue<string, WattTableColumn<T>>) {\n return column.value.helperAction;\n }\n\n /** @ignore */\n _getColumnCell(column: KeyValue<string, WattTableColumn<T>>, row: T) {\n return column.value.cell?.(row) ?? this.getCellData(row, column.value);\n }\n\n /** @ignore */\n _isActiveRow(row: T) {\n if (!this.activeRow) return false;\n return this.activeRowComparator\n ? this.activeRowComparator(row, this.activeRow)\n : row === this.activeRow;\n }\n\n /** @ignore */\n _onRowClick(row: T) {\n if (this.disabled || window.getSelection()?.toString() !== '') return;\n this.rowClick.emit(row);\n }\n}\n\n@Component({\n selector: 'watt-table-toolbar-spacer',\n template: '',\n styles: [\n `\n :host {\n width: var(--watt-space-xl);\n }\n `,\n ],\n})\nexport class WattTableToolbarSpacerComponent {}\n\nexport const WATT_TABLE = [\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WattTableToolbarSpacerComponent,\n];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nexport {\n type WattTableColumn,\n type WattTableColumnDef,\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WattTableToolbarSpacerComponent,\n WATT_TABLE,\n} from './watt-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgCA;;AAEG;AACG,MAAO,mBACX,SAAQ,kBAAqB,CAAA;AAG7B,IAAA,WAAA,CACE,WAAiB,EACjB,MAAA,GAA6C,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAA;QAE7E,KAAK,CAAC,WAAW,CAAC;QAElB,IAAI,MAAM,CAAC,qBAAqB;AAC9B,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAS,KAAS;AACjC,gBAAA,OAAO,IAAI;AACb,aAAC;;AAGL,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM;;AAE1B;;ACtDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAyIa,s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SAAS,EAAA,CAAA;sBADR;gBAOD,UAAU,EAAA,CAAA;sBADT;gBAaD,yBAAyB,EAAA,CAAA;sBADxB;gBAOD,SAAS,EAAA,CAAA;sBADR;gBAaD,mBAAmB,EAAA,CAAA;sBADlB;gBAOD,iBAAiB,EAAA,CAAA;sBADhB;gBAOD,eAAe,EAAA,CAAA;sBADd;gBAOD,QAAQ,EAAA,CAAA;sBADP;gBAOD,UAAU,EAAA,CAAA;sBADT;gBAKD,MAAM,EAAA,CAAA;sBADL,eAAe;uBAAC,sBAAsB;gBAKvC,QAAQ,EAAA,CAAA;sBADP,YAAY;uBAAC,yBAAyB;gBAKvC,KAAK,EAAA,CAAA;sBADJ,SAAS;uBAAC,OAAO;;MAqLP,+BAA+B,CAAA;uGAA/B,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA/B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,+BAA+B,qFAThC,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qCAAA,CAAA,EAAA,CAAA;;2FASD,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAX3C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,2BAA2B,YAC3B,EAAE,EAAA,MAAA,EAAA,CAAA,qCAAA,CAAA,EAAA;;AAWD,MAAA,UAAU,GAAG;IACxB,kBAAkB;IAClB,sBAAsB;IACtB,yBAAyB;IACzB,+BAA+B;;;AEvgBjC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-table.mjs","sources":["../../../libs/watt/package/table/watt-table-data-source.ts","../../../libs/watt/package/table/watt-table.component.ts","../../../libs/watt/package/table/watt-table.component.html","../../../libs/watt/package/table/index.ts","../../../libs/watt/package/table/energinet-watt-table.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { DataSource } from '@angular/cdk/collections';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\n\nexport interface IWattTableDataSource<T> extends DataSource<T> {\n data: T[];\n filter: string;\n filteredData: T[];\n paginator: MatPaginator | null;\n sort: MatSort | null;\n totalCount: number;\n}\n\n/**\n * @see https://material.angular.io/components/table/api#MatTableDataSource\n */\nexport class WattTableDataSource<T>\n extends MatTableDataSource<T>\n implements IWattTableDataSource<T>\n{\n constructor(\n initialData?: T[],\n config: { disableClientSideSort: boolean } = { disableClientSideSort: false }\n ) {\n super(initialData);\n\n if (config.disableClientSideSort)\n this.sortData = (data: T[]): T[] => {\n return data;\n };\n }\n\n get totalCount() {\n return this.data.length;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { KeyValue, KeyValuePipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n AfterViewInit,\n Component,\n ContentChild,\n ContentChildren,\n Directive,\n effect,\n ElementRef,\n EventEmitter,\n inject,\n input,\n Input,\n OnChanges,\n Output,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { QueryList, Signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { MatSort, MatSortModule, Sort, SortDirection } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { map } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\n\nexport interface WattTableColumn<T> {\n /**\n * The data that this column should be bound to, either as a property of `T`\n * or derived from each row of `T` using an accessor function. Use `null`\n * for columns that should not be associated with data, but note that this\n * will disable sorting and automatic cell population.\n */\n accessor: keyof T | ((row: T) => unknown) | null;\n\n /**\n * Resolve the header text to a static display value. This will prevent\n * the `resolveHeader` input function from being called for this column.\n */\n header?: string;\n\n /**\n * Callback for determining cell content when not using template. By default,\n * cell content is found using the `accessor` (unless it is `null`).\n */\n cell?: (row: T) => string;\n\n /**\n * Enable or disable sorting for this column. Defaults to `true`\n * unless `accessor` is `null`.\n */\n sort?: boolean;\n\n /**\n * Set the column size using grid sizing values. Defaults to `\"auto\"`.\n *\n * @remarks\n * Accepts all of the CSS grid track size keywords (such as `min-content`,\n * `max-content`, `minmax()`) as well as fractional (`fr`), percentage (`%`)\n * and length (`px`, `em`, etc) units.\n *\n * @see https://drafts.csswg.org/css-grid/#track-sizes\n */\n size?: string;\n\n /**\n * Horizontally align the contents of the column. Defaults to `\"left\"`.\n */\n align?: 'left' | 'right' | 'center';\n\n /**\n * Helper icon will be shown in the header cell, with an click event.\n */\n helperAction?: () => void;\n\n /**\n * CSS class to apply to the header cell element.\n */\n headerCellClass?: string;\n\n /**\n * CSS class to apply to the data cell element.\n */\n dataCellClass?: string;\n\n /**\n * Footer configuration for the column.\n */\n footer?: WattTableColumnFooter;\n\n /**\n * When set to `true`, the column remains visible when horizontally scrolling.\n */\n stickyEnd?: Signal<boolean>;\n}\n\n/**\n * Configuration for the footer cell of a column.\n */\nexport interface WattTableColumnFooter {\n /**\n * The value that will be displayed in the footer cell.\n */\n value?: Signal<string | number>;\n\n /**\n * CSS class to apply to the footer cell.\n */\n class?: string;\n}\n\n/**\n * Record for defining columns with keys used as column identifiers.\n */\nexport type WattTableColumnDef<T> = Record<string, WattTableColumn<T>>;\n\n// Used for strongly typing the structural directive\ninterface WattTableCellContext<T> {\n $implicit: T;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n /** The WattTableColumn this template applies to. */\n @Input('wattTableCell') column!: WattTableColumn<T>;\n @Input('wattTableCellHeader') header?: string;\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableCellDirective<T>,\n context: unknown\n ): context is WattTableCellContext<T> {\n return true;\n }\n}\n\n@Directive({\n selector: '[wattTableToolbar]',\n})\nexport class WattTableToolbarDirective<T> {\n templateRef = inject(TemplateRef<WattTableToolbarContext<T[]>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableToolbarDirective<T>,\n context: unknown\n ): context is WattTableToolbarContext<T[]> {\n return true;\n }\n}\n\n/**\n * Usage:\n * `import { WATT_TABLE } from '@energinet-datahub/watt/table';`\n */\n@Component({\n imports: [\n NgClass,\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattCheckboxComponent,\n WattIconComponent,\n ],\n providers: [WattDatePipe],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n})\nexport class WattTableComponent<T> implements OnChanges, AfterViewInit {\n /**\n * The table's source of data. Property should not be changed after\n * initialization, instead update the data on the instance itself.\n */\n @Input() dataSource!: IWattTableDataSource<T>;\n\n /**\n * Column definition record with keys representing the column identifiers\n * and values being the column configuration. The order of the columns\n * is determined by the property order, but can be overruled by the\n * `displayedColumns` input.\n */\n @Input() columns: WattTableColumnDef<T> = {};\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n @Input() displayedColumns?: string[];\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n @Input() disabled = false;\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n @Input() description = '';\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n @Input() loading = false;\n\n /**\n * Optional callback for determining header text for columns that\n * do not have a static header text set in the column definition.\n * Useful for providing translations of column headers.\n */\n @Input()\n resolveHeader?: (key: string) => string;\n\n /**\n * Identifier for column that should be sorted initially.\n */\n @Input()\n sortBy = '';\n\n /**\n * The sort direction of the initially sorted column.\n */\n @Input()\n sortDirection: SortDirection = '';\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n @Input()\n sortClear = true;\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n @Input()\n selectable = false;\n\n /**\n * Sets the initially selected rows. Only works when selectable is `true`.\n */\n\n initialSelection = input<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n @Input()\n suppressRowHoverHighlight = false;\n\n /**\n * Highlights the currently active row.\n */\n @Input()\n activeRow?: T;\n\n /**\n * Custom comparator function to determine if two rows are equal.\n *\n * @remarks\n * The default behavior for determining the active row is to compare\n * the two row objects using strict equality check. This is sufficient\n * as long as the instances remain the same, which may not be the case\n * if row data is recreated or rebuilt from serialization.\n */\n @Input()\n activeRowComparator?: (currentRow: T, activeRow: T) => boolean;\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n @Input()\n hideColumnHeaders = false;\n\n /**\n * Emits whenever the selection updates. Only works when selectable is `true`.\n */\n @Output()\n selectionChange = new EventEmitter<T[]>();\n\n /**\n * Emits whenever a row is clicked.\n */\n @Output()\n rowClick = new EventEmitter<T>();\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n @Output()\n sortChange = new EventEmitter<Sort>();\n\n /** @ignore */\n @ContentChildren(WattTableCellDirective)\n _cells!: QueryList<WattTableCellDirective<T>>;\n\n /** @ignore */\n @ContentChild(WattTableToolbarDirective)\n _toolbar?: WattTableToolbarDirective<T>;\n\n /** @ignore */\n @ViewChild(MatSort)\n _sort!: MatSort;\n\n /** @ignore */\n _selectionModel = new SelectionModel<T>(true, []);\n\n /** @ignore */\n _checkboxColumn = '__checkboxColumn__';\n\n /** @ignore */\n _element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** @ignore */\n _datePipe = inject(WattDatePipe);\n\n /** @ignore */\n _hasFooter = false;\n\n /** @ignore */\n private formatCellData(cell: unknown) {\n if (!cell) return '—';\n if (cell instanceof Date) return this._datePipe.transform(cell);\n return cell;\n }\n\n /** @ignore */\n private getCellData(row: T, column?: WattTableColumn<T>) {\n if (!column?.accessor) return null;\n const { accessor } = column;\n const cell = typeof accessor === 'function' ? accessor(row) : row[accessor];\n return this.formatCellData(cell);\n }\n\n /** @ignore */\n private checkHasFooter(): void {\n this._hasFooter = Object.values(this.columns).some((column) => !!column.footer);\n }\n\n constructor() {\n effect(() => {\n this._selectionModel.setSelection(...(this.initialSelection() ?? []));\n });\n this._selectionModel.changed\n .pipe(\n map(() => this._selectionModel.selected),\n takeUntilDestroyed()\n )\n .subscribe((selection) => this.selectionChange.emit(selection));\n }\n\n ngAfterViewInit() {\n if (this.dataSource === undefined) return;\n\n this.checkHasFooter();\n this.dataSource.sort = this._sort;\n if (this.dataSource instanceof WattTableDataSource === false) return;\n this.dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const sortColumn = this.columns[sortHeaderId];\n if (!sortColumn?.accessor) return '';\n\n // Access raw value for sorting, instead of applying default formatting.\n const { accessor } = sortColumn;\n const cell = typeof accessor === 'function' ? accessor(row) : row[accessor];\n\n // Make sorting by text case insensitive.\n if (typeof cell === 'string') return cell.toLowerCase();\n if (cell instanceof Date) return cell.getTime();\n return cell as number;\n };\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['columns'] || changes['displayedColumns'] || changes['selectable']) {\n const { displayedColumns } = this;\n\n if (this.columns === undefined) return;\n\n const sizing = Object.keys(this.columns)\n .filter((key) => !displayedColumns || displayedColumns.includes(key))\n .map((key) => this.columns[key].size)\n .map((size) => size ?? 'auto');\n\n if (this.selectable) {\n // Add space for extra checkbox column\n sizing.unshift('var(--watt-space-xl)');\n }\n\n this._element.nativeElement.style.setProperty(\n '--watt-table-grid-template-columns',\n sizing.join(' ')\n );\n\n this.checkHasFooter();\n }\n }\n\n /**\n * Clears the selection. Only works when selectable is `true`.\n */\n clearSelection() {\n if (this.selectable) {\n this._selectionModel.clear();\n }\n }\n\n /** @ignore */\n get _columnSelection() {\n if (this.dataSource.filteredData.length === 0) return false;\n return this.dataSource.filteredData.every((row) => this._selectionModel.isSelected(row));\n }\n\n /** @ignore */\n set _columnSelection(value) {\n if (value) {\n this._selectionModel.setSelection(...this.dataSource.filteredData);\n } else {\n this.clearSelection();\n }\n }\n\n get _filteredSelection() {\n return this._selectionModel.selected.filter((row) =>\n this.dataSource.filteredData.includes(row)\n );\n }\n\n /** @ignore */\n _getColumns() {\n if (this.columns === undefined) return [];\n const columns = this.displayedColumns ?? Object.keys(this.columns);\n return this.selectable ? [this._checkboxColumn, ...columns] : columns;\n }\n\n /** @ignore */\n _getColumnTemplate(column: WattTableColumn<T>) {\n return this._cells.find((item) => item.column === column)?.templateRef;\n }\n\n /** @ignore */\n _getColumnHeader(column: KeyValue<string, WattTableColumn<T>>) {\n if (typeof column.value.header === 'string') return column.value.header;\n const cell = this._cells.find((item) => item.column === column.value);\n return cell?.header ?? this.resolveHeader?.(column.key) ?? column.key;\n }\n\n /** @ignore */\n _getColumnHelperAction(column: KeyValue<string, WattTableColumn<T>>) {\n return column.value.helperAction;\n }\n\n /** @ignore */\n _getColumnCell(column: KeyValue<string, WattTableColumn<T>>, row: T) {\n return column.value.cell?.(row) ?? this.getCellData(row, column.value);\n }\n\n /** @ignore */\n _isActiveRow(row: T) {\n if (!this.activeRow) return false;\n return this.activeRowComparator\n ? this.activeRowComparator(row, this.activeRow)\n : row === this.activeRow;\n }\n\n /** @ignore */\n _onRowClick(row: T) {\n if (this.disabled || window.getSelection()?.toString() !== '') return;\n this.rowClick.emit(row);\n }\n}\n\n@Component({\n selector: 'watt-table-toolbar-spacer',\n template: '',\n styles: [\n `\n :host {\n width: var(--watt-space-xl);\n }\n `,\n ],\n})\nexport class WattTableToolbarSpacerComponent {}\n\nexport const WATT_TABLE = [\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WattTableToolbarSpacerComponent,\n];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': _filteredSelection.length > 0 }\"\n [matSortActive]=\"sortBy\"\n [matSortDirection]=\"sortDirection\"\n [matSortDisableClear]=\"!sortClear\"\n [dataSource]=\"dataSource\"\n [attr.aria-label]=\"description\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable) {\n <ng-container [matColumnDef]=\"_checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox [(ngModel)]=\"_columnSelection\" />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"_selectionModel.isSelected(row)\"\n (ngModelChange)=\"_selectionModel.toggle(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n @for (column of columns | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (_getColumnHelperAction(column); as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ _getColumnHeader(column) }}\n </div>\n </th>\n <td\n mat-cell\n *matCellDef=\"let row\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n >\n @if (_getColumnTemplate(column.value); as template) {\n <div>\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row }\" />\n </div>\n } @else {\n {{ _getColumnCell(column, row) }}\n }\n </td>\n\n @if (_hasFooter) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }}\"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders) {\n <tr mat-header-row *matHeaderRowDef=\"_getColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: _getColumns()\"\n [attr.aria-selected]=\"row === activeRow\"\n (click)=\"_onRowClick(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled && !suppressRowHoverHighlight,\n 'watt-table-clickable-row': !disabled && rowClick.observed,\n 'watt-table-active-row': _isActiveRow(row),\n 'watt-table-no-end-divider': hideColumnHeaders,\n }\"\n ></tr>\n\n @if (_toolbar) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (_hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"_getColumns()\"></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of _getColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (_toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"_toolbar.templateRef; context: { $implicit: _filteredSelection }\"\n />\n </div>\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nexport {\n type WattTableColumn,\n type WattTableColumnDef,\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WattTableToolbarSpacerComponent,\n WATT_TABLE,\n} from './watt-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAgCA;;AAEG;AACG,MAAO,mBACX,SAAQ,kBAAqB,CAAA;AA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