@energinet/watt 0.0.2-alpha.3 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/watt-button.component.d.ts +1 -1
- package/chip/watt-action-chip.component.d.ts +1 -1
- package/empty-state/watt-empty-state.component.d.ts +1 -1
- package/fesm2022/energinet-watt-icon.mjs +6 -0
- package/fesm2022/energinet-watt-icon.mjs.map +1 -1
- package/fesm2022/energinet-watt-stepper.mjs +14 -29
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
- package/fesm2022/energinet-watt-table.mjs +10 -2
- package/fesm2022/energinet-watt-table.mjs.map +1 -1
- package/fesm2022/energinet-watt.mjs +0 -16
- package/fesm2022/energinet-watt.mjs.map +1 -1
- package/icon/icon.component.d.ts +1 -1
- package/icon/icons.d.ts +6 -0
- package/index.d.ts +0 -16
- package/package.json +33 -15
- package/stepper/watt-stepper-step.component.d.ts +11 -10
- package/table/watt-table.component.d.ts +34 -1
- package/validation-message/watt-validation-message.component.d.ts +1 -1
|
@@ -3,7 +3,7 @@ export declare const WattButtonTypes: readonly ["primary", "secondary", "text",
|
|
|
3
3
|
export type WattButtonVariant = (typeof WattButtonTypes)[number];
|
|
4
4
|
export type WattButtonType = 'button' | 'reset' | 'submit';
|
|
5
5
|
export declare class WattButtonComponent {
|
|
6
|
-
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
|
|
6
|
+
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | undefined>;
|
|
7
7
|
variant: import("@angular/core").InputSignal<"primary" | "secondary" | "text" | "icon">;
|
|
8
8
|
type: import("@angular/core").InputSignal<WattButtonType>;
|
|
9
9
|
formId: import("@angular/core").InputSignal<string | null>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare class WattActionChipComponent {
|
|
3
3
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
4
|
-
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump">;
|
|
4
|
+
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list">;
|
|
5
5
|
action: import("@angular/core").OutputEmitterRef<void>;
|
|
6
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<WattActionChipComponent, never>;
|
|
7
7
|
static ɵcmp: i0.ɵɵComponentDeclaration<WattActionChipComponent, "watt-action-chip", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": true; "isSignal": true; }; }, { "action": "action"; }, never, ["*"], true, never>;
|
|
@@ -5,7 +5,7 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
* `import { WattEmptyStateComponent } from '@energinet-datahub/watt/empty-state';`
|
|
6
6
|
*/
|
|
7
7
|
export declare class WattEmptyStateComponent {
|
|
8
|
-
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "custom-power" | "custom-explore" | "custom-no-results" | undefined>;
|
|
8
|
+
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | "custom-power" | "custom-explore" | "custom-no-results" | undefined>;
|
|
9
9
|
size: import("@angular/core").InputSignal<"small" | "large">;
|
|
10
10
|
title: import("@angular/core").InputSignal<string>;
|
|
11
11
|
message: import("@angular/core").InputSignal<string>;
|
|
@@ -64,6 +64,7 @@ const WattIconMap = {
|
|
|
64
64
|
down: 'expand_more',
|
|
65
65
|
arrowDropDown: 'arrow_drop_down',
|
|
66
66
|
arrowRightAlt: 'arrow_right_alt',
|
|
67
|
+
arrowLeftAlt: 'arrow_left_alt',
|
|
67
68
|
// Alerts
|
|
68
69
|
danger: 'dangerous',
|
|
69
70
|
warning: 'report_problem',
|
|
@@ -89,6 +90,11 @@ const WattIconMap = {
|
|
|
89
90
|
horizontalRule: 'horizontal_rule',
|
|
90
91
|
wrongLocation: 'wrong_location',
|
|
91
92
|
heatPump: 'heat_pump',
|
|
93
|
+
inventory: 'inventory',
|
|
94
|
+
globe: 'globe',
|
|
95
|
+
calculate: 'calculate',
|
|
96
|
+
bar_chart_4_bars: 'bar_chart_4_bars',
|
|
97
|
+
view_list: 'view_list',
|
|
92
98
|
};
|
|
93
99
|
|
|
94
100
|
//#region License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-icon.mjs","sources":["../../../libs/watt/package/icon/icons.ts","../../../libs/watt/package/icon/icon.component.ts","../../../libs/watt/package/icon/index.ts","../../../libs/watt/package/icon/energinet-watt-icon.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\nexport const WattIconMap = {\n search: 'search',\n filter: 'filter_list',\n plus: 'add',\n minus: 'remove',\n edit: 'edit',\n redo: 'redo',\n undo: 'undo',\n remove: 'delete',\n removeForever: 'delete_forever',\n close: 'close',\n cancel: 'cancel',\n checkmark: 'check',\n user: 'account_circle',\n settings: 'settings',\n contentCopy: 'content_copy',\n date: 'calendar_today',\n time: 'schedule',\n email: 'email',\n markEmailUnread: 'mark_email_unread',\n link: 'link',\n openInNew: 'open_in_new',\n monetization: 'monetization_on',\n payments: 'payments',\n forwardMessage: 'forward_to_inbox',\n menu: 'menu',\n moreVertical: 'more_vert',\n logout: 'logout',\n login: 'lock_open',\n help: 'help',\n alternateEmail: 'alternate_email',\n refresh: 'refresh',\n language: 'language',\n pendingActions: 'pending_actions',\n toggleOn: 'toggle_on',\n toggleOff: 'toggle_off',\n personCheck: 'person_check',\n // Navigation\n left: 'navigate_before',\n right: 'navigate_next',\n up: 'expand_less',\n down: 'expand_more',\n arrowDropDown: 'arrow_drop_down',\n arrowRightAlt: 'arrow_right_alt',\n // Alerts\n danger: 'dangerous',\n warning: 'report_problem',\n success: 'check_circle',\n info: 'info',\n feedback: 'feedback',\n // Files\n save: 'save_alt',\n upload: 'cloud_upload',\n download: 'cloud_download',\n fileDownload: 'download',\n print: 'print',\n preview: 'preview',\n // Other\n power: 'power',\n location: 'location_on',\n smartDisplay: 'smart_display',\n windmill: 'energy',\n solarPower: 'solar_power',\n priorityHigh: 'priority_high',\n notifications: 'notifications',\n notificationsUnread: 'notifications_unread',\n horizontalRule: 'horizontal_rule',\n wrongLocation: 'wrong_location',\n heatPump: 'heat_pump',\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 ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { WattIconMap } from './icons';\n\nexport type WattIcon = keyof typeof WattIconMap;\nexport type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\nexport type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classNames()' },\n imports: [MatIcon],\n selector: 'watt-icon',\n styleUrls: ['./icon.component.scss'],\n template: `\n @if (icon()) {\n <mat-icon aria-hidden=\"false\" [attr.aria-label]=\"label()\" fontSet=\"material-symbols-sharp\">\n {{ icon() }}\n </mat-icon>\n } @else {\n <div class=\"watt-custom-icon\">\n <ng-content />\n </div>\n }\n `,\n})\nexport class WattIconComponent {\n /** Name of an icon within the font set. */\n name = input<WattIcon>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\n\n /** Color the icon to match a chosen state. */\n state = input<WattIconState>();\n\n icon = computed(() => {\n const name = this.name();\n if (!name) return null;\n return WattIconMap[name];\n });\n\n computedState = computed(() => {\n const name = this.name();\n const state = this.state();\n if (state) return state;\n switch (name) {\n case 'success':\n case 'danger':\n case 'warning':\n case 'info':\n return name;\n default:\n return 'default';\n }\n });\n\n classNames = computed(() => `icon-size-${this.size()} icon-state-${this.computedState()}`);\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 { WattIconComponent, WattIcon, WattIconSize, WattIconState } from './icon.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,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EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,cAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kiEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAbS,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAeN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAnB7B,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,cAAc,EAAE,EAC1B,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,QAAA,EACR,WAAW,EAEX,QAAA,EAAA;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,kiEAAA,CAAA,EAAA;;;ACjDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-icon.mjs","sources":["../../../libs/watt/package/icon/icons.ts","../../../libs/watt/package/icon/icon.component.ts","../../../libs/watt/package/icon/index.ts","../../../libs/watt/package/icon/energinet-watt-icon.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\nexport const WattIconMap = {\n search: 'search',\n filter: 'filter_list',\n plus: 'add',\n minus: 'remove',\n edit: 'edit',\n redo: 'redo',\n undo: 'undo',\n remove: 'delete',\n removeForever: 'delete_forever',\n close: 'close',\n cancel: 'cancel',\n checkmark: 'check',\n user: 'account_circle',\n settings: 'settings',\n contentCopy: 'content_copy',\n date: 'calendar_today',\n time: 'schedule',\n email: 'email',\n markEmailUnread: 'mark_email_unread',\n link: 'link',\n openInNew: 'open_in_new',\n monetization: 'monetization_on',\n payments: 'payments',\n forwardMessage: 'forward_to_inbox',\n menu: 'menu',\n moreVertical: 'more_vert',\n logout: 'logout',\n login: 'lock_open',\n help: 'help',\n alternateEmail: 'alternate_email',\n refresh: 'refresh',\n language: 'language',\n pendingActions: 'pending_actions',\n toggleOn: 'toggle_on',\n toggleOff: 'toggle_off',\n personCheck: 'person_check',\n // Navigation\n left: 'navigate_before',\n right: 'navigate_next',\n up: 'expand_less',\n down: 'expand_more',\n arrowDropDown: 'arrow_drop_down',\n arrowRightAlt: 'arrow_right_alt',\n arrowLeftAlt: 'arrow_left_alt',\n // Alerts\n danger: 'dangerous',\n warning: 'report_problem',\n success: 'check_circle',\n info: 'info',\n feedback: 'feedback',\n // Files\n save: 'save_alt',\n upload: 'cloud_upload',\n download: 'cloud_download',\n fileDownload: 'download',\n print: 'print',\n preview: 'preview',\n // Other\n power: 'power',\n location: 'location_on',\n smartDisplay: 'smart_display',\n windmill: 'energy',\n solarPower: 'solar_power',\n priorityHigh: 'priority_high',\n notifications: 'notifications',\n notificationsUnread: 'notifications_unread',\n horizontalRule: 'horizontal_rule',\n wrongLocation: 'wrong_location',\n heatPump: 'heat_pump',\n inventory: 'inventory',\n globe: 'globe',\n calculate: 'calculate',\n bar_chart_4_bars: 'bar_chart_4_bars',\n view_list: 'view_list',\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 ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { WattIconMap } from './icons';\n\nexport type WattIcon = keyof typeof WattIconMap;\nexport type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\nexport type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classNames()' },\n imports: [MatIcon],\n selector: 'watt-icon',\n styleUrls: ['./icon.component.scss'],\n template: `\n @if (icon()) {\n <mat-icon aria-hidden=\"false\" [attr.aria-label]=\"label()\" fontSet=\"material-symbols-sharp\">\n {{ icon() }}\n </mat-icon>\n } @else {\n <div class=\"watt-custom-icon\">\n <ng-content />\n </div>\n }\n `,\n})\nexport class WattIconComponent {\n /** Name of an icon within the font set. */\n name = input<WattIcon>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\n\n /** Color the icon to match a chosen state. */\n state = input<WattIconState>();\n\n icon = computed(() => {\n const name = this.name();\n if (!name) return null;\n return WattIconMap[name];\n });\n\n computedState = computed(() => {\n const name = this.name();\n const state = this.state();\n if (state) return state;\n switch (name) {\n case 'success':\n case 'danger':\n case 'warning':\n case 'info':\n return name;\n default:\n return 'default';\n }\n });\n\n classNames = computed(() => `icon-size-${this.size()} icon-state-${this.computedState()}`);\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 { WattIconComponent, WattIcon, WattIconSize, WattIconState } from './icon.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,WAAW,GAAG;AACzB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,IAAI,EA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,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,kiEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAbS,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAeN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAnB7B,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,cAAc,EAAE,EAC1B,OAAA,EAAA,CAAC,OAAO,CAAC,EAAA,QAAA,EACR,WAAW,EAEX,QAAA,EAAA;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,kiEAAA,CAAA,EAAA;;;ACjDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { input, output, ViewChild, Component, EventEmitter, inject, DestroyRef, ContentChildren, Input, Output, ViewEncapsulation } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { STEPPER_GLOBAL_OPTIONS, CdkStepper } from '@angular/cdk/stepper';
|
|
@@ -31,16 +31,17 @@ import { WattIconComponent } from '@energinet/watt/icon';
|
|
|
31
31
|
//#endregion
|
|
32
32
|
class WattStepperStepComponent extends MatStep {
|
|
33
33
|
templateRef = null;
|
|
34
|
-
nextButtonLabel;
|
|
35
|
-
disableNextButton = false;
|
|
36
|
-
loadingNextButton = false;
|
|
37
|
-
previousButtonLabel;
|
|
38
|
-
enabled = true;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
nextButtonLabel = input();
|
|
35
|
+
disableNextButton = input(false);
|
|
36
|
+
loadingNextButton = input(false);
|
|
37
|
+
previousButtonLabel = input();
|
|
38
|
+
enabled = input(true);
|
|
39
|
+
disablePreviousButton = input(false);
|
|
40
|
+
entering = output();
|
|
41
|
+
leaving = output();
|
|
42
|
+
next = output();
|
|
42
43
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattStepperStepComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
44
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: WattStepperStepComponent, isStandalone: true, selector: "watt-stepper-step", inputs: { nextButtonLabel: { classPropertyName: "nextButtonLabel", publicName: "nextButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, disableNextButton: { classPropertyName: "disableNextButton", publicName: "disableNextButton", isSignal: true, isRequired: false, transformFunction: null }, loadingNextButton: { classPropertyName: "loadingNextButton", publicName: "loadingNextButton", isSignal: true, isRequired: false, transformFunction: null }, previousButtonLabel: { classPropertyName: "previousButtonLabel", publicName: "previousButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: false, transformFunction: null }, disablePreviousButton: { classPropertyName: "disablePreviousButton", publicName: "disablePreviousButton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entering: "entering", leaving: "leaving", next: "next" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: ["templateRef"], descendants: true }], usesInheritance: true, ngImport: i0, template: ` <ng-template #templateRef>
|
|
44
45
|
<ng-content />
|
|
45
46
|
</ng-template>`, isInline: true });
|
|
46
47
|
}
|
|
@@ -48,29 +49,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
48
49
|
type: Component,
|
|
49
50
|
args: [{
|
|
50
51
|
selector: 'watt-stepper-step',
|
|
51
|
-
template:
|
|
52
|
+
template: ` <ng-template #templateRef>
|
|
52
53
|
<ng-content />
|
|
53
54
|
</ng-template>`,
|
|
54
55
|
}]
|
|
55
56
|
}], propDecorators: { templateRef: [{
|
|
56
57
|
type: ViewChild,
|
|
57
58
|
args: ['templateRef']
|
|
58
|
-
}], nextButtonLabel: [{
|
|
59
|
-
type: Input
|
|
60
|
-
}], disableNextButton: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], loadingNextButton: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}], previousButtonLabel: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}], enabled: [{
|
|
67
|
-
type: Input
|
|
68
|
-
}], entering: [{
|
|
69
|
-
type: Output
|
|
70
|
-
}], leaving: [{
|
|
71
|
-
type: Output
|
|
72
|
-
}], next: [{
|
|
73
|
-
type: Output
|
|
74
59
|
}] } });
|
|
75
60
|
|
|
76
61
|
//#region License
|
|
@@ -133,7 +118,7 @@ class WattStepperComponent extends MatStepper {
|
|
|
133
118
|
},
|
|
134
119
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
135
120
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
136
|
-
], queries: [{ propertyName: "_steps", predicate: WattStepperStepComponent, descendants: true }], viewQueries: [{ propertyName: "stepper", first: true, predicate: MatStepper, descendants: true }], usesInheritance: 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<mat-stepper
|
|
121
|
+
], queries: [{ propertyName: "_steps", predicate: WattStepperStepComponent, descendants: true }], viewQueries: [{ propertyName: "stepper", first: true, predicate: MatStepper, descendants: true }], usesInheritance: 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<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of _steps; track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!(onFirstStep$ | push)) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!(onLastStep$ | push)) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep$ | push) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:#fff;color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media (max-width: 719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: RxPush, name: "push" }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i1.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
137
122
|
}
|
|
138
123
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattStepperComponent, decorators: [{
|
|
139
124
|
type: Component,
|
|
@@ -144,7 +129,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
144
129
|
},
|
|
145
130
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
146
131
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
147
|
-
], 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<mat-stepper
|
|
132
|
+
], 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<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of _steps; track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!(onFirstStep$ | push)) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!(onLastStep$ | push)) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep$ | push) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:#fff;color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media (max-width: 719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"] }]
|
|
148
133
|
}], propDecorators: { completed: [{
|
|
149
134
|
type: Output
|
|
150
135
|
}], isCompleting: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-stepper.mjs","sources":["../../../libs/watt/package/stepper/watt-stepper-step.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.html","../../../libs/watt/package/stepper/index.ts","../../../libs/watt/package/stepper/energinet-watt-stepper.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, EventEmitter, Input, Output, TemplateRef, ViewChild } from '@angular/core';\nimport { MatStep } from '@angular/material/stepper';\nimport { CdkStep } from '@angular/cdk/stepper';\nexport { CdkStep as WattStep };\n\n@Component({\n selector: 'watt-stepper-step',\n template: `<ng-template #templateRef>\n <ng-content />\n </ng-template>`,\n})\nexport class WattStepperStepComponent extends MatStep {\n @ViewChild('templateRef') public templateRef: TemplateRef<unknown> | null = null;\n\n @Input() nextButtonLabel?: string;\n @Input() disableNextButton = false;\n @Input() loadingNextButton = false;\n @Input() previousButtonLabel?: string;\n @Input() enabled = true;\n\n @Output() entering = new EventEmitter<CdkStep>();\n @Output() leaving = new EventEmitter<CdkStep>();\n @Output() next = new EventEmitter<void>();\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 AfterViewInit,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { CdkStepper, STEPPER_GLOBAL_OPTIONS, StepperSelectionEvent } from '@angular/cdk/stepper';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { RxPush } from '@rx-angular/template/push';\nimport { from, map, Observable, of, startWith, withLatestFrom } from 'rxjs';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattStepperStepComponent } from './watt-stepper-step.component';\n\n@Component({\n selector: 'watt-stepper',\n templateUrl: './watt-stepper.component.html',\n styleUrls: ['./watt-stepper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RxPush, MatStepperModule, WattIconComponent, WattButtonComponent],\n providers: [\n {\n provide: STEPPER_GLOBAL_OPTIONS,\n useValue: { showError: true, displayDefaultIndicatorType: false },\n },\n { provide: CdkStepper, useExisting: WattStepperComponent },\n { provide: MatStepper, useExisting: WattStepperComponent },\n ],\n})\nexport class WattStepperComponent extends MatStepper implements AfterViewInit {\n @Output() completed = new EventEmitter<void>();\n @Input() isCompleting = false;\n\n @ContentChildren(WattStepperStepComponent, { descendants: true })\n declare _steps: QueryList<WattStepperStepComponent>;\n\n @ViewChild(MatStepper) stepper!: MatStepper;\n\n selectedIndexChanged$!: Observable<StepperSelectionEvent>;\n onFirstStep$!: Observable<boolean>;\n onLastStep$!: Observable<boolean>;\n\n private destroyRef = inject(DestroyRef);\n\n override reset() {\n this.stepper.reset();\n }\n\n override ngAfterViewInit(): void {\n this.selectedIndexChanged$ = from(this.stepper.selectionChange);\n this.onLastStep$ = this.selectedIndexChanged$.pipe(\n withLatestFrom(of(this._steps)),\n map(([index, steps]) => index.selectedIndex === steps.filter((x) => x.enabled).length - 1),\n startWith(false)\n );\n this.onFirstStep$ = this.selectedIndexChanged$.pipe(\n map((index) => index.selectedIndex === 0),\n startWith(true)\n );\n\n // Emit entering and leaving events\n this.selectedIndexChanged$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((change) => {\n this._steps.get(change.selectedIndex)?.entering.emit(change.selectedStep);\n this._steps.get(change.previouslySelectedIndex)?.leaving.emit(change.previouslySelectedStep);\n });\n }\n\n nextStep(step: WattStepperStepComponent): void {\n step.next.emit();\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.stepper.next();\n }\n\n previousStep(): void {\n this.stepper.previous();\n }\n\n complete(): void {\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.completed.emit();\n }\n}\n\nexport const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];\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<mat-stepper animationDuration=\"0\" class=\"watt-stepper\" [linear]=\"true\" #stepper>\n <ng-template matStepperIcon=\"edit\" let-index=\"index\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template matStepperIcon=\"number\" let-index=\"index\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template matStepperIcon=\"error\" let-index=\"index\">\n {{ index + 1 }}\n </ng-template>\n @for (step of _steps; track step) {\n @if (step.enabled) {\n <mat-step [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!(onFirstStep$ | push)) {\n <watt-button variant=\"secondary\" (click)=\"previousStep()\">\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel }}\n </watt-button>\n }\n\n @if (!(onLastStep$ | push)) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton\"\n [disabled]=\"step.disableNextButton\"\n >\n {{ step.nextButtonLabel }}<watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep$ | push) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton\"\n >{{ step.nextButtonLabel }}</watt-button\n >\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\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 { WATT_STEPPER, WattStepperComponent } from './watt-stepper.component';\nexport { WattStepperStepComponent, WattStep } from './watt-stepper-step.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAYM,MAAO,wBAAyB,SAAQ,OAAO,CAAA;IAClB,WAAW,GAAgC,IAAI;AAEvE,IAAA,eAAe;IACf,iBAAiB,GAAG,KAAK;IACzB,iBAAiB,GAAG,KAAK;AACzB,IAAA,mBAAmB;IACnB,OAAO,GAAG,IAAI;AAEb,IAAA,QAAQ,GAAG,IAAI,YAAY,EAAW;AACtC,IAAA,OAAO,GAAG,IAAI,YAAY,EAAW;AACrC,IAAA,IAAI,GAAG,IAAI,YAAY,EAAQ;uGAX9B,wBAAwB,EAAA,IAAA,EAAA,IAAA,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,EAJzB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,eAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,EA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AAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAUjF,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,iBAGT,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAClF,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;4BAC/B,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,2BAA2B,EAAE,KAAK,EAAE;AAClE,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC1D,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC3D,qBAAA,EAAA,QAAA,EAAA,koFAAA,EAAA,MAAA,EAAA,CAAA,41DAAA,CAAA,EAAA;8BAGS,SAAS,EAAA,CAAA;sBAAlB;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBAGO,MAAM,EAAA,CAAA;sBADb,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,wBAAwB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;gBAGzC,OAAO,EAAA,CAAA;sBAA7B,SAAS;uBAAC,UAAU;;MA+CV,YAAY,GAAG,CAAC,oBAAoB,EAAE,wBAAwB;;AE9G3E;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-stepper.mjs","sources":["../../../libs/watt/package/stepper/watt-stepper-step.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.html","../../../libs/watt/package/stepper/index.ts","../../../libs/watt/package/stepper/energinet-watt-stepper.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, input, output, TemplateRef, ViewChild } from '@angular/core';\nimport { MatStep } from '@angular/material/stepper';\nimport { CdkStep } from '@angular/cdk/stepper';\n\nexport { CdkStep as WattStep };\n\n@Component({\n selector: 'watt-stepper-step',\n template: ` <ng-template #templateRef>\n <ng-content />\n </ng-template>`,\n})\nexport class WattStepperStepComponent extends MatStep {\n @ViewChild('templateRef') public templateRef: TemplateRef<unknown> | null = null;\n\n nextButtonLabel = input<string>();\n disableNextButton = input<boolean>(false);\n loadingNextButton = input<boolean>(false);\n previousButtonLabel = input<string>();\n enabled = input<boolean>(true);\n disablePreviousButton = input<boolean>(false);\n\n entering = output<CdkStep>();\n leaving = output<CdkStep>();\n next = output<void>();\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 AfterViewInit,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { CdkStepper, STEPPER_GLOBAL_OPTIONS, StepperSelectionEvent } from '@angular/cdk/stepper';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { RxPush } from '@rx-angular/template/push';\nimport { from, map, Observable, of, startWith, withLatestFrom } from 'rxjs';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattStepperStepComponent } from './watt-stepper-step.component';\n\n@Component({\n selector: 'watt-stepper',\n templateUrl: './watt-stepper.component.html',\n styleUrls: ['./watt-stepper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, RxPush, MatStepperModule, WattIconComponent, WattButtonComponent],\n providers: [\n {\n provide: STEPPER_GLOBAL_OPTIONS,\n useValue: { showError: true, displayDefaultIndicatorType: false },\n },\n { provide: CdkStepper, useExisting: WattStepperComponent },\n { provide: MatStepper, useExisting: WattStepperComponent },\n ],\n})\nexport class WattStepperComponent extends MatStepper implements AfterViewInit {\n @Output() completed = new EventEmitter<void>();\n @Input() isCompleting = false;\n\n @ContentChildren(WattStepperStepComponent, { descendants: true })\n declare _steps: QueryList<WattStepperStepComponent>;\n\n @ViewChild(MatStepper) stepper!: MatStepper;\n\n selectedIndexChanged$!: Observable<StepperSelectionEvent>;\n onFirstStep$!: Observable<boolean>;\n onLastStep$!: Observable<boolean>;\n\n private destroyRef = inject(DestroyRef);\n\n override reset() {\n this.stepper.reset();\n }\n\n override ngAfterViewInit(): void {\n this.selectedIndexChanged$ = from(this.stepper.selectionChange);\n this.onLastStep$ = this.selectedIndexChanged$.pipe(\n withLatestFrom(of(this._steps)),\n map(([index, steps]) => index.selectedIndex === steps.filter((x) => x.enabled).length - 1),\n startWith(false)\n );\n this.onFirstStep$ = this.selectedIndexChanged$.pipe(\n map((index) => index.selectedIndex === 0),\n startWith(true)\n );\n\n // Emit entering and leaving events\n this.selectedIndexChanged$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((change) => {\n this._steps.get(change.selectedIndex)?.entering.emit(change.selectedStep);\n this._steps.get(change.previouslySelectedIndex)?.leaving.emit(change.previouslySelectedStep);\n });\n }\n\n nextStep(step: WattStepperStepComponent): void {\n step.next.emit();\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.stepper.next();\n }\n\n previousStep(): void {\n this.stepper.previous();\n }\n\n complete(): void {\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.completed.emit();\n }\n}\n\nexport const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];\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<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of _steps; track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!(onFirstStep$ | push)) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!(onLastStep$ | push)) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep$ | push) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\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 { WATT_STEPPER, WattStepperComponent } from './watt-stepper.component';\nexport { WattStepperStepComponent, WattStep } from './watt-stepper-step.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAaM,MAAO,wBAAyB,SAAQ,OAAO,CAAA;IAClB,WAAW,GAAgC,IAAI;IAEhF,eAAe,GAAG,KAAK,EAAU;AACjC,IAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK,CAAC;AACzC,IAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK,CAAC;IACzC,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AoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,iBAGT,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAClF,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;4BAC/B,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,2BAA2B,EAAE,KAAK,EAAE;AAClE,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC1D,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC3D,qBAAA,EAAA,QAAA,EAAA,u1FAAA,EAAA,MAAA,EAAA,CAAA,41DAAA,CAAA,EAAA;8BAGS,SAAS,EAAA,CAAA;sBAAlB;gBACQ,YAAY,EAAA,CAAA;sBAApB;gBAGO,MAAM,EAAA,CAAA;sBADb,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,wBAAwB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;gBAGzC,OAAO,EAAA,CAAA;sBAA7B,SAAS;uBAAC,UAAU;;MA+CV,YAAY,GAAG,CAAC,oBAAoB,EAAE,wBAAwB;;AE9G3E;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -194,6 +194,8 @@ class WattTableComponent {
|
|
|
194
194
|
/** @ignore */
|
|
195
195
|
_datePipe = inject(WattDatePipe);
|
|
196
196
|
/** @ignore */
|
|
197
|
+
_hasFooter = false;
|
|
198
|
+
/** @ignore */
|
|
197
199
|
formatCellData(cell) {
|
|
198
200
|
if (!cell)
|
|
199
201
|
return '—';
|
|
@@ -209,6 +211,10 @@ class WattTableComponent {
|
|
|
209
211
|
const cell = typeof accessor === 'function' ? accessor(row) : row[accessor];
|
|
210
212
|
return this.formatCellData(cell);
|
|
211
213
|
}
|
|
214
|
+
/** @ignore */
|
|
215
|
+
checkHasFooter() {
|
|
216
|
+
this._hasFooter = Object.values(this.columns).some((column) => !!column.footer);
|
|
217
|
+
}
|
|
212
218
|
constructor() {
|
|
213
219
|
effect(() => {
|
|
214
220
|
this._selectionModel.setSelection(...(this.initialSelection() ?? []));
|
|
@@ -220,6 +226,7 @@ class WattTableComponent {
|
|
|
220
226
|
ngAfterViewInit() {
|
|
221
227
|
if (this.dataSource === undefined)
|
|
222
228
|
return;
|
|
229
|
+
this.checkHasFooter();
|
|
223
230
|
this.dataSource.sort = this._sort;
|
|
224
231
|
if (this.dataSource instanceof WattTableDataSource === false)
|
|
225
232
|
return;
|
|
@@ -252,6 +259,7 @@ class WattTableComponent {
|
|
|
252
259
|
sizing.unshift('var(--watt-space-xl)');
|
|
253
260
|
}
|
|
254
261
|
this._element.nativeElement.style.setProperty('--watt-table-grid-template-columns', sizing.join(' '));
|
|
262
|
+
this.checkHasFooter();
|
|
255
263
|
}
|
|
256
264
|
}
|
|
257
265
|
/**
|
|
@@ -321,7 +329,7 @@ class WattTableComponent {
|
|
|
321
329
|
this.rowClick.emit(row);
|
|
322
330
|
}
|
|
323
331
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
324
|
-
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\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }}\"\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' }}\"\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 </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 <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-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}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 .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 });
|
|
325
333
|
}
|
|
326
334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattTableComponent, decorators: [{
|
|
327
335
|
type: Component,
|
|
@@ -334,7 +342,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
334
342
|
MatTableModule,
|
|
335
343
|
WattCheckboxComponent,
|
|
336
344
|
WattIconComponent,
|
|
337
|
-
], 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\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }}\"\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' }}\"\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 </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 <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-cell{display:flex;align-items:center;min-height:56px;padding:var(--watt-space-s) var(--watt-space-m)}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 .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"] }]
|
|
338
346
|
}], ctorParameters: () => [], propDecorators: { dataSource: [{
|
|
339
347
|
type: Input
|
|
340
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 } 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/**\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 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 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.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 }\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\">\n <th\n mat-header-cell\n *matHeaderCellDef\n class=\"watt-table-align-{{ column.value.align ?? 'left' }}\"\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' }}\"\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 </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 <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;MAsGa,sBAAsB,CAAA;;AAET,IAAA,MAAM;AACA,IAAA,MAAM;AACpC,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoC,EAAC;AAC1D,IAAA,OAAO,sBAAsB,CAC3B,UAAqC,EACrC,OAAgB,EAAA;AAEhB,QAAA,OAAO,IAAI;;uGATF,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,CAAA,eAAA,EAAA,QAAA,CAAA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AAA,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;;;AEzdjC;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;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,sBAAsB,CAAA;;AAET,IAAA,MAAM;AACA,IAAA,MAAM;AACpC,IAAA,WAAW,GAAG,MAAM,EAAC,WAAoC,EAAC;AAC1D,IAAA,OAAO,sBAAsB,CAC3B,UAAqC,EACrC,OAAgB,EAAA;AAEhB,QAAA,OAAO,IAAI;;uGATF,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,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,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;;;;"}
|
|
@@ -16,22 +16,6 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
//#endregion
|
|
19
|
-
/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
22
|
-
*
|
|
23
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
24
|
-
* you may not use this file except in compliance with the License.
|
|
25
|
-
* You may obtain a copy of the License at
|
|
26
|
-
*
|
|
27
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
28
|
-
*
|
|
29
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
30
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
31
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
32
|
-
* See the License for the specific language governing permissions and
|
|
33
|
-
* limitations under the License.
|
|
34
|
-
*/
|
|
35
19
|
// primary entry-point which is empty. All components should
|
|
36
20
|
// be imported through their individual entry-points. This file is needed to
|
|
37
21
|
// satisfy the "ng_package" rule which also requires a primary entry-point.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt.mjs","sources":["../../../libs/watt/package/index.ts","../../../libs/watt/package/energinet-watt.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\n
|
|
1
|
+
{"version":3,"file":"energinet-watt.mjs","sources":["../../../libs/watt/package/index.ts","../../../libs/watt/package/energinet-watt.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\n\n// primary entry-point which is empty. All components should\n// be imported through their individual entry-points. This file is needed to\n// satisfy the \"ng_package\" rule which also requires a primary entry-point.\n\n// Workaround for: https://github.com/microsoft/rushstack/issues/2806.\n// This is a private export that can be removed at any time.\nexport const ɵɵtsModuleIndicatorApiExtractorWorkaround = true;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAEA;AACA;AACA;AAEA;AACA;AACO,MAAM,yCAAyC,GAAG;;ACzBzD;;AAEG;;;;"}
|
package/icon/icon.component.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
|
|
|
5
5
|
export type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';
|
|
6
6
|
export declare class WattIconComponent {
|
|
7
7
|
/** Name of an icon within the font set. */
|
|
8
|
-
name: import("@angular/core").InputSignal<"search" | "remove" | "edit" | "redo" | "undo" | "close" | "cancel" | "settings" | "email" | "link" | "payments" | "menu" | "logout" | "help" | "refresh" | "language" | "info" | "feedback" | "download" | "print" | "preview" | "power" | "notifications" | "success" | "danger" | "warning" | "filter" | "plus" | "minus" | "removeForever" | "checkmark" | "user" | "contentCopy" | "date" | "time" | "markEmailUnread" | "openInNew" | "monetization" | "forwardMessage" | "moreVertical" | "login" | "alternateEmail" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "save" | "upload" | "fileDownload" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
|
|
8
|
+
name: import("@angular/core").InputSignal<"search" | "remove" | "edit" | "redo" | "undo" | "close" | "cancel" | "settings" | "email" | "link" | "payments" | "menu" | "logout" | "help" | "refresh" | "language" | "info" | "feedback" | "download" | "print" | "preview" | "power" | "notifications" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | "success" | "danger" | "warning" | "filter" | "plus" | "minus" | "removeForever" | "checkmark" | "user" | "contentCopy" | "date" | "time" | "markEmailUnread" | "openInNew" | "monetization" | "forwardMessage" | "moreVertical" | "login" | "alternateEmail" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "save" | "upload" | "fileDownload" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
|
|
9
9
|
/** Accessible label for the icon. */
|
|
10
10
|
label: import("@angular/core").InputSignal<string | undefined>;
|
|
11
11
|
/** Size of the icon. */
|
package/icon/icons.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export declare const WattIconMap: {
|
|
|
57
57
|
down: string;
|
|
58
58
|
arrowDropDown: string;
|
|
59
59
|
arrowRightAlt: string;
|
|
60
|
+
arrowLeftAlt: string;
|
|
60
61
|
danger: string;
|
|
61
62
|
warning: string;
|
|
62
63
|
success: string;
|
|
@@ -79,4 +80,9 @@ export declare const WattIconMap: {
|
|
|
79
80
|
horizontalRule: string;
|
|
80
81
|
wrongLocation: string;
|
|
81
82
|
heatPump: string;
|
|
83
|
+
inventory: string;
|
|
84
|
+
globe: string;
|
|
85
|
+
calculate: string;
|
|
86
|
+
bar_chart_4_bars: string;
|
|
87
|
+
view_list: string;
|
|
82
88
|
};
|
package/index.d.ts
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
1
|
/**
|
|
18
2
|
* @license
|
|
19
3
|
* Copyright 2020 Energinet DataHub A/S
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@energinet/watt",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -23,26 +23,26 @@
|
|
|
23
23
|
"types": "./breadcrumbs/index.d.ts",
|
|
24
24
|
"default": "./fesm2022/energinet-watt-breadcrumbs.mjs"
|
|
25
25
|
},
|
|
26
|
-
"./card": {
|
|
27
|
-
"types": "./card/index.d.ts",
|
|
28
|
-
"default": "./fesm2022/energinet-watt-card.mjs"
|
|
29
|
-
},
|
|
30
26
|
"./button": {
|
|
31
27
|
"types": "./button/index.d.ts",
|
|
32
28
|
"default": "./fesm2022/energinet-watt-button.mjs"
|
|
33
29
|
},
|
|
30
|
+
"./card": {
|
|
31
|
+
"types": "./card/index.d.ts",
|
|
32
|
+
"default": "./fesm2022/energinet-watt-card.mjs"
|
|
33
|
+
},
|
|
34
34
|
"./checkbox": {
|
|
35
35
|
"types": "./checkbox/index.d.ts",
|
|
36
36
|
"default": "./fesm2022/energinet-watt-checkbox.mjs"
|
|
37
37
|
},
|
|
38
|
-
"./clipboard": {
|
|
39
|
-
"types": "./clipboard/index.d.ts",
|
|
40
|
-
"default": "./fesm2022/energinet-watt-clipboard.mjs"
|
|
41
|
-
},
|
|
42
38
|
"./chip": {
|
|
43
39
|
"types": "./chip/index.d.ts",
|
|
44
40
|
"default": "./fesm2022/energinet-watt-chip.mjs"
|
|
45
41
|
},
|
|
42
|
+
"./clipboard": {
|
|
43
|
+
"types": "./clipboard/index.d.ts",
|
|
44
|
+
"default": "./fesm2022/energinet-watt-clipboard.mjs"
|
|
45
|
+
},
|
|
46
46
|
"./code": {
|
|
47
47
|
"types": "./code/index.d.ts",
|
|
48
48
|
"default": "./fesm2022/energinet-watt-code.mjs"
|
|
@@ -171,14 +171,14 @@
|
|
|
171
171
|
"types": "./core/breakpoints/index.d.ts",
|
|
172
172
|
"default": "./fesm2022/energinet-watt-core-breakpoints.mjs"
|
|
173
173
|
},
|
|
174
|
-
"./core/date": {
|
|
175
|
-
"types": "./core/date/index.d.ts",
|
|
176
|
-
"default": "./fesm2022/energinet-watt-core-date.mjs"
|
|
177
|
-
},
|
|
178
174
|
"./core/color": {
|
|
179
175
|
"types": "./core/color/index.d.ts",
|
|
180
176
|
"default": "./fesm2022/energinet-watt-core-color.mjs"
|
|
181
177
|
},
|
|
178
|
+
"./core/date": {
|
|
179
|
+
"types": "./core/date/index.d.ts",
|
|
180
|
+
"default": "./fesm2022/energinet-watt-core-date.mjs"
|
|
181
|
+
},
|
|
182
182
|
"./icon/flags": {
|
|
183
183
|
"types": "./icon/flags/index.d.ts",
|
|
184
184
|
"default": "./fesm2022/energinet-watt-icon-flags.mjs"
|
|
@@ -208,11 +208,29 @@
|
|
|
208
208
|
"default": "./fesm2022/energinet-watt-utils-resize-observer.mjs"
|
|
209
209
|
}
|
|
210
210
|
},
|
|
211
|
+
"peerDependencies": {
|
|
212
|
+
"@angular/cdk": "^19.2.2",
|
|
213
|
+
"@angular/common": "^19.2.1",
|
|
214
|
+
"@angular/core": "^19.2.1",
|
|
215
|
+
"@angular/forms": "^19.2.1",
|
|
216
|
+
"@angular/material": "^19.2.2",
|
|
217
|
+
"@angular/router": "^19.2.1",
|
|
218
|
+
"@maskito/angular": "^2.5.0",
|
|
219
|
+
"@maskito/core": "^2.5.0",
|
|
220
|
+
"@maskito/kit": "^2.5.0",
|
|
221
|
+
"@maskito/phone": "^2.5.0",
|
|
222
|
+
"@popperjs/core": "^2.11.8",
|
|
223
|
+
"@rx-angular/template": "^17.1.0",
|
|
224
|
+
"dayjs": "^1.11.13",
|
|
225
|
+
"libphonenumber-js": "^1.11.9",
|
|
226
|
+
"ngx-mat-select-search": "^8.0.0",
|
|
227
|
+
"qs": "^6.12.1",
|
|
228
|
+
"rxjs": "^7.8.2"
|
|
229
|
+
},
|
|
211
230
|
"module": "fesm2022/energinet-watt.mjs",
|
|
212
231
|
"typings": "index.d.ts",
|
|
213
232
|
"sideEffects": false,
|
|
214
233
|
"dependencies": {
|
|
215
234
|
"tslib": "^2.3.0"
|
|
216
|
-
}
|
|
217
|
-
"peerDependencies": {}
|
|
235
|
+
}
|
|
218
236
|
}
|
|
@@ -14,21 +14,22 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
import {
|
|
17
|
+
import { TemplateRef } from '@angular/core';
|
|
18
18
|
import { MatStep } from '@angular/material/stepper';
|
|
19
19
|
import { CdkStep } from '@angular/cdk/stepper';
|
|
20
20
|
import * as i0 from "@angular/core";
|
|
21
21
|
export { CdkStep as WattStep };
|
|
22
22
|
export declare class WattStepperStepComponent extends MatStep {
|
|
23
23
|
templateRef: TemplateRef<unknown> | null;
|
|
24
|
-
nextButtonLabel
|
|
25
|
-
disableNextButton: boolean
|
|
26
|
-
loadingNextButton: boolean
|
|
27
|
-
previousButtonLabel
|
|
28
|
-
enabled: boolean
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
nextButtonLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
25
|
+
disableNextButton: import("@angular/core").InputSignal<boolean>;
|
|
26
|
+
loadingNextButton: import("@angular/core").InputSignal<boolean>;
|
|
27
|
+
previousButtonLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
28
|
+
enabled: import("@angular/core").InputSignal<boolean>;
|
|
29
|
+
disablePreviousButton: import("@angular/core").InputSignal<boolean>;
|
|
30
|
+
entering: import("@angular/core").OutputEmitterRef<CdkStep>;
|
|
31
|
+
leaving: import("@angular/core").OutputEmitterRef<CdkStep>;
|
|
32
|
+
next: import("@angular/core").OutputEmitterRef<void>;
|
|
32
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<WattStepperStepComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WattStepperStepComponent, "watt-stepper-step", never, { "nextButtonLabel": { "alias": "nextButtonLabel"; "required": false; }; "disableNextButton": { "alias": "disableNextButton"; "required": false; }; "loadingNextButton": { "alias": "loadingNextButton"; "required": false; }; "previousButtonLabel": { "alias": "previousButtonLabel"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; }, { "entering": "entering"; "leaving": "leaving"; "next": "next"; }, never, ["*"], true, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WattStepperStepComponent, "watt-stepper-step", never, { "nextButtonLabel": { "alias": "nextButtonLabel"; "required": false; "isSignal": true; }; "disableNextButton": { "alias": "disableNextButton"; "required": false; "isSignal": true; }; "loadingNextButton": { "alias": "loadingNextButton"; "required": false; "isSignal": true; }; "previousButtonLabel": { "alias": "previousButtonLabel"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "disablePreviousButton": { "alias": "disablePreviousButton"; "required": false; "isSignal": true; }; }, { "entering": "entering"; "leaving": "leaving"; "next": "next"; }, never, ["*"], true, never>;
|
|
34
35
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
18
18
|
import { KeyValue } from '@angular/common';
|
|
19
19
|
import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
20
|
-
import type { QueryList } from '@angular/core';
|
|
20
|
+
import type { QueryList, Signal } from '@angular/core';
|
|
21
21
|
import { MatSort, Sort, SortDirection } from '@angular/material/sort';
|
|
22
22
|
import { WattDatePipe } from '@energinet/watt/core/date';
|
|
23
23
|
import { IWattTableDataSource } from './watt-table-data-source';
|
|
@@ -64,6 +64,35 @@ export interface WattTableColumn<T> {
|
|
|
64
64
|
* Helper icon will be shown in the header cell, with an click event.
|
|
65
65
|
*/
|
|
66
66
|
helperAction?: () => void;
|
|
67
|
+
/**
|
|
68
|
+
* CSS class to apply to the header cell element.
|
|
69
|
+
*/
|
|
70
|
+
headerCellClass?: string;
|
|
71
|
+
/**
|
|
72
|
+
* CSS class to apply to the data cell element.
|
|
73
|
+
*/
|
|
74
|
+
dataCellClass?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Footer configuration for the column.
|
|
77
|
+
*/
|
|
78
|
+
footer?: WattTableColumnFooter;
|
|
79
|
+
/**
|
|
80
|
+
* When set to `true`, the column remains visible when horizontally scrolling.
|
|
81
|
+
*/
|
|
82
|
+
stickyEnd?: Signal<boolean>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Configuration for the footer cell of a column.
|
|
86
|
+
*/
|
|
87
|
+
export interface WattTableColumnFooter {
|
|
88
|
+
/**
|
|
89
|
+
* The value that will be displayed in the footer cell.
|
|
90
|
+
*/
|
|
91
|
+
value?: Signal<string | number>;
|
|
92
|
+
/**
|
|
93
|
+
* CSS class to apply to the footer cell.
|
|
94
|
+
*/
|
|
95
|
+
class?: string;
|
|
67
96
|
}
|
|
68
97
|
/**
|
|
69
98
|
* Record for defining columns with keys used as column identifiers.
|
|
@@ -199,9 +228,13 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
|
|
|
199
228
|
/** @ignore */
|
|
200
229
|
_datePipe: WattDatePipe;
|
|
201
230
|
/** @ignore */
|
|
231
|
+
_hasFooter: boolean;
|
|
232
|
+
/** @ignore */
|
|
202
233
|
private formatCellData;
|
|
203
234
|
/** @ignore */
|
|
204
235
|
private getCellData;
|
|
236
|
+
/** @ignore */
|
|
237
|
+
private checkHasFooter;
|
|
205
238
|
constructor();
|
|
206
239
|
ngAfterViewInit(): void;
|
|
207
240
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -29,7 +29,7 @@ export declare class WattValidationMessageComponent implements AfterViewInit {
|
|
|
29
29
|
private elementRef;
|
|
30
30
|
label: import("@angular/core").InputSignal<string>;
|
|
31
31
|
message: import("@angular/core").InputSignal<string>;
|
|
32
|
-
icon: import("@angular/core").InputSignal<"info" | "warning" | "success" | "danger" | "search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
|
|
32
|
+
icon: import("@angular/core").InputSignal<"info" | "warning" | "success" | "danger" | "search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | undefined>;
|
|
33
33
|
type: import("@angular/core").InputSignal<WattValidationMessageType>;
|
|
34
34
|
size: import("@angular/core").InputSignal<WattValidationMessageSize>;
|
|
35
35
|
autoScrollIntoView: import("@angular/core").InputSignal<boolean>;
|