@energinet/watt 4.2.4 → 4.2.5
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/esm2022/badge/watt-badge.component.js +3 -3
- package/esm2022/badge/watt-badge.component.js.map +1 -1
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js +6 -6
- package/esm2022/breadcrumbs/watt-breadcrumbs.component.js.map +1 -1
- package/esm2022/button/watt-button.component.js +3 -3
- package/esm2022/button/watt-button.component.js.map +1 -1
- package/esm2022/card/watt-card-title.component.js +3 -3
- package/esm2022/card/watt-card-title.component.js.map +1 -1
- package/esm2022/card/watt-card.component.js +3 -3
- package/esm2022/card/watt-card.component.js.map +1 -1
- package/esm2022/checkbox/watt-checkbox.component.js +3 -3
- package/esm2022/checkbox/watt-checkbox.component.js.map +1 -1
- package/esm2022/chip/watt-action-chip.component.js +3 -3
- package/esm2022/chip/watt-action-chip.component.js.map +1 -1
- package/esm2022/chip/watt-chip.component.js +3 -3
- package/esm2022/chip/watt-chip.component.js.map +1 -1
- package/esm2022/chip/watt-chip.directive.js +3 -3
- package/esm2022/chip/watt-chip.directive.js.map +1 -1
- package/esm2022/chip/watt-date-chip.component.js +3 -3
- package/esm2022/chip/watt-date-chip.component.js.map +1 -1
- package/esm2022/chip/watt-date-range-chip.component.js +6 -6
- package/esm2022/chip/watt-date-range-chip.component.js.map +1 -1
- package/esm2022/chip/watt-filter-chip.component.js +3 -3
- package/esm2022/chip/watt-filter-chip.component.js.map +1 -1
- package/esm2022/chip/watt-menu-chip.component.js +3 -3
- package/esm2022/chip/watt-menu-chip.component.js.map +1 -1
- package/esm2022/clipboard/watt-clipboard-intl.service.js +3 -3
- package/esm2022/clipboard/watt-clipboard-intl.service.js.map +1 -1
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js +3 -3
- package/esm2022/clipboard/watt-copy-to-clipboard.directive.js.map +1 -1
- package/esm2022/code/watt-code-intl.service.js +3 -3
- package/esm2022/code/watt-code-intl.service.js.map +1 -1
- package/esm2022/code/watt-code.component.js +3 -3
- package/esm2022/code/watt-code.component.js.map +1 -1
- package/esm2022/core/breakpoints/breakpoints-observer.js +3 -3
- package/esm2022/core/breakpoints/breakpoints-observer.js.map +1 -1
- package/esm2022/core/color/color-helper.service.js +3 -3
- package/esm2022/core/color/color-helper.service.js.map +1 -1
- package/esm2022/core/date/watt-date.pipe.js +3 -3
- package/esm2022/core/date/watt-date.pipe.js.map +1 -1
- package/esm2022/core/date/watt-locale.service.js +3 -3
- package/esm2022/core/date/watt-locale.service.js.map +1 -1
- package/esm2022/data/watt-data-actions.component.js +3 -3
- package/esm2022/data/watt-data-actions.component.js.map +1 -1
- package/esm2022/data/watt-data-filters.component.js +3 -3
- package/esm2022/data/watt-data-filters.component.js.map +1 -1
- package/esm2022/data/watt-data-intl.service.js +3 -3
- package/esm2022/data/watt-data-intl.service.js.map +1 -1
- package/esm2022/data/watt-data-table.component.js +3 -3
- package/esm2022/data/watt-data-table.component.js.map +1 -1
- package/esm2022/datetime-field/watt-datetime-field.component.js +3 -3
- package/esm2022/datetime-field/watt-datetime-field.component.js.map +1 -1
- package/esm2022/description-list/watt-description-list-item.component.js +3 -3
- package/esm2022/description-list/watt-description-list-item.component.js.map +1 -1
- package/esm2022/description-list/watt-description-list.component.js +3 -3
- package/esm2022/description-list/watt-description-list.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-actions.component.js +3 -3
- package/esm2022/drawer/watt-drawer-actions.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-content.component.js +3 -3
- package/esm2022/drawer/watt-drawer-content.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-heading.component.js +3 -3
- package/esm2022/drawer/watt-drawer-heading.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer-topbar.component.js +3 -3
- package/esm2022/drawer/watt-drawer-topbar.component.js.map +1 -1
- package/esm2022/drawer/watt-drawer.component.js +3 -3
- package/esm2022/drawer/watt-drawer.component.js.map +1 -1
- package/esm2022/dropdown/watt-dropdown.component.js +3 -3
- package/esm2022/dropdown/watt-dropdown.component.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone-intl.js +3 -3
- package/esm2022/dropzone/watt-dropzone-intl.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone-validators.js +6 -6
- package/esm2022/dropzone/watt-dropzone-validators.js.map +1 -1
- package/esm2022/dropzone/watt-dropzone.js +3 -3
- package/esm2022/dropzone/watt-dropzone.js.map +1 -1
- package/esm2022/empty-state/icons/explore.js +3 -3
- package/esm2022/empty-state/icons/explore.js.map +1 -1
- package/esm2022/empty-state/icons/no-results.js +3 -3
- package/esm2022/empty-state/icons/no-results.js.map +1 -1
- package/esm2022/empty-state/icons/not-found.js +3 -3
- package/esm2022/empty-state/icons/not-found.js.map +1 -1
- package/esm2022/empty-state/icons/power.js +3 -3
- package/esm2022/empty-state/icons/power.js.map +1 -1
- package/esm2022/empty-state/watt-empty-state.component.js +3 -3
- package/esm2022/empty-state/watt-empty-state.component.js.map +1 -1
- package/esm2022/expandable-card/watt-expandable-card.component.js +9 -9
- package/esm2022/expandable-card/watt-expandable-card.component.js.map +1 -1
- package/esm2022/field/watt-field-error.component.js +3 -3
- package/esm2022/field/watt-field-error.component.js.map +1 -1
- package/esm2022/field/watt-field-hint.component.js +3 -3
- package/esm2022/field/watt-field-hint.component.js.map +1 -1
- package/esm2022/field/watt-field-intl.service.js +3 -3
- package/esm2022/field/watt-field-intl.service.js.map +1 -1
- package/esm2022/field/watt-field-warning.component.js +3 -3
- package/esm2022/field/watt-field-warning.component.js.map +1 -1
- package/esm2022/field/watt-field.component.js +3 -3
- package/esm2022/field/watt-field.component.js.map +1 -1
- package/esm2022/file-field/watt-file-field.component.js +3 -3
- package/esm2022/file-field/watt-file-field.component.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-ch.js +3 -3
- package/esm2022/icon/flags/watt-flag-ch.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-de.js +3 -3
- package/esm2022/icon/flags/watt-flag-de.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-dk.js +3 -3
- package/esm2022/icon/flags/watt-flag-dk.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-fi.js +3 -3
- package/esm2022/icon/flags/watt-flag-fi.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-gb.js +3 -3
- package/esm2022/icon/flags/watt-flag-gb.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-nl.js +3 -3
- package/esm2022/icon/flags/watt-flag-nl.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-no.js +3 -3
- package/esm2022/icon/flags/watt-flag-no.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-pl.js +3 -3
- package/esm2022/icon/flags/watt-flag-pl.js.map +1 -1
- package/esm2022/icon/flags/watt-flag-se.js +3 -3
- package/esm2022/icon/flags/watt-flag-se.js.map +1 -1
- package/esm2022/icon/flags/watt-flag.js +3 -3
- package/esm2022/icon/flags/watt-flag.js.map +1 -1
- package/esm2022/icon/icon.component.js +3 -3
- package/esm2022/icon/icon.component.js.map +1 -1
- package/esm2022/menu/watt-menu-group.component.js +3 -3
- package/esm2022/menu/watt-menu-group.component.js.map +1 -1
- package/esm2022/menu/watt-menu-item.component.js +3 -3
- package/esm2022/menu/watt-menu-item.component.js.map +1 -1
- package/esm2022/menu/watt-menu-trigger.directive.js +3 -3
- package/esm2022/menu/watt-menu-trigger.directive.js.map +1 -1
- package/esm2022/menu/watt-menu.component.js +3 -3
- package/esm2022/menu/watt-menu.component.js.map +1 -1
- package/esm2022/modal/watt-modal.component.js +6 -6
- package/esm2022/modal/watt-modal.component.js.map +1 -1
- package/esm2022/modal/watt-modal.service.js +3 -3
- package/esm2022/modal/watt-modal.service.js.map +1 -1
- package/esm2022/paginator/watt-paginator-intl.service.js +3 -3
- package/esm2022/paginator/watt-paginator-intl.service.js.map +1 -1
- package/esm2022/paginator/watt-paginator.component.js +3 -3
- package/esm2022/paginator/watt-paginator.component.js.map +1 -1
- package/esm2022/phone-field/watt-phone-field-intl.service.js +3 -3
- package/esm2022/phone-field/watt-phone-field-intl.service.js.map +1 -1
- package/esm2022/phone-field/watt-phone-field.component.js +3 -3
- package/esm2022/phone-field/watt-phone-field.component.js.map +1 -1
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js +3 -3
- package/esm2022/picker/__shared/placeholder-mask/watt-placeholder-mask.component.js.map +1 -1
- package/esm2022/picker/__shared/watt-picker-base.js +3 -3
- package/esm2022/picker/__shared/watt-picker-base.js.map +1 -1
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js +3 -3
- package/esm2022/picker/datepicker/watt-datepicker-intl.service.js.map +1 -1
- package/esm2022/picker/datepicker/watt-datepicker.component.js +3 -3
- package/esm2022/picker/datepicker/watt-datepicker.component.js.map +1 -1
- package/esm2022/picker/timepicker/watt-timepicker.component.js +3 -3
- package/esm2022/picker/timepicker/watt-timepicker.component.js.map +1 -1
- package/esm2022/progress-tracker/watt-progress-tracker-step.component.js +3 -3
- package/esm2022/progress-tracker/watt-progress-tracker-step.component.js.map +1 -1
- package/esm2022/progress-tracker/watt-progress-tracker.component.js +3 -3
- package/esm2022/progress-tracker/watt-progress-tracker.component.js.map +1 -1
- package/esm2022/query-params/watt-query-params.directive.js +3 -3
- package/esm2022/query-params/watt-query-params.directive.js.map +1 -1
- package/esm2022/radio/watt-radio-group.component.js +3 -3
- package/esm2022/radio/watt-radio-group.component.js.map +1 -1
- package/esm2022/radio/watt-radio.component.js +3 -3
- package/esm2022/radio/watt-radio.component.js.map +1 -1
- package/esm2022/search/watt-search.component.js +3 -3
- package/esm2022/search/watt-search.component.js.map +1 -1
- package/esm2022/segmented-buttons/watt-segmented-button.component.js +3 -3
- package/esm2022/segmented-buttons/watt-segmented-button.component.js.map +1 -1
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js +3 -3
- package/esm2022/segmented-buttons/watt-segmented-buttons.component.js.map +1 -1
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js +3 -3
- package/esm2022/shell/nav-list/watt-expand-on-active-link.directive.js.map +1 -1
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js +3 -3
- package/esm2022/shell/nav-list/watt-nav-list-item.component.js.map +1 -1
- package/esm2022/shell/nav-list/watt-nav-list.component.js +3 -3
- package/esm2022/shell/nav-list/watt-nav-list.component.js.map +1 -1
- package/esm2022/shell/shell.component.js +3 -3
- package/esm2022/shell/shell.component.js.map +1 -1
- package/esm2022/slide-toggle/watt-slide-toggle.component.js +3 -3
- package/esm2022/slide-toggle/watt-slide-toggle.component.js.map +1 -1
- package/esm2022/slider/watt-slider.component.js +3 -3
- package/esm2022/slider/watt-slider.component.js.map +1 -1
- package/esm2022/spinner/watt-spinner.component.js +3 -3
- package/esm2022/spinner/watt-spinner.component.js.map +1 -1
- package/esm2022/stepper/watt-stepper-step.component.js +3 -3
- package/esm2022/stepper/watt-stepper-step.component.js.map +1 -1
- package/esm2022/stepper/watt-stepper.component.js +3 -3
- package/esm2022/stepper/watt-stepper.component.js.map +1 -1
- package/esm2022/table/watt-table.component.js +9 -9
- package/esm2022/table/watt-table.component.js.map +1 -1
- package/esm2022/tabs/watt-link-tab.component.js +3 -3
- package/esm2022/tabs/watt-link-tab.component.js.map +1 -1
- package/esm2022/tabs/watt-link-tabs.component.js +3 -3
- package/esm2022/tabs/watt-link-tabs.component.js.map +1 -1
- package/esm2022/tabs/watt-tab.component.js +3 -3
- package/esm2022/tabs/watt-tab.component.js.map +1 -1
- package/esm2022/tabs/watt-tabs-action.component.js +3 -3
- package/esm2022/tabs/watt-tabs-action.component.js.map +1 -1
- package/esm2022/tabs/watt-tabs.component.js +3 -3
- package/esm2022/tabs/watt-tabs.component.js.map +1 -1
- package/esm2022/text-field/watt-text-field.component.js +3 -3
- package/esm2022/text-field/watt-text-field.component.js.map +1 -1
- package/esm2022/textarea-field/watt-textarea-field.component.js +3 -3
- package/esm2022/textarea-field/watt-textarea-field.component.js.map +1 -1
- package/esm2022/toast/watt-toast.component.js +3 -3
- package/esm2022/toast/watt-toast.component.js.map +1 -1
- package/esm2022/toast/watt-toast.service.js +3 -3
- package/esm2022/toast/watt-toast.service.js.map +1 -1
- package/esm2022/tooltip/watt-tooltip.component.js +3 -3
- package/esm2022/tooltip/watt-tooltip.component.js.map +1 -1
- package/esm2022/tooltip/watt-tooltip.directive.js +3 -3
- package/esm2022/tooltip/watt-tooltip.directive.js.map +1 -1
- package/esm2022/utils/css/css-custom-properties.service.js +3 -3
- package/esm2022/utils/css/css-custom-properties.service.js.map +1 -1
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js +3 -3
- package/esm2022/utils/intersection-observer/watt-intersection-observer.service.js.map +1 -1
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js +3 -3
- package/esm2022/utils/resize-observer/watt-resize-observer.directive.js.map +1 -1
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js +3 -3
- package/esm2022/utils/resize-observer/watt-resize-observer.service.js.map +1 -1
- package/esm2022/validation-message/watt-validation-message.component.js +3 -3
- package/esm2022/validation-message/watt-validation-message.component.js.map +1 -1
- package/esm2022/vater/vater-flex.component.js +3 -3
- package/esm2022/vater/vater-flex.component.js.map +1 -1
- package/esm2022/vater/vater-layout.directive.js +3 -3
- package/esm2022/vater/vater-layout.directive.js.map +1 -1
- package/esm2022/vater/vater-spacer.component.js +3 -3
- package/esm2022/vater/vater-spacer.component.js.map +1 -1
- package/esm2022/vater/vater-stack.component.js +3 -3
- package/esm2022/vater/vater-stack.component.js.map +1 -1
- package/esm2022/vater/vater-utility.directive.js +3 -3
- package/esm2022/vater/vater-utility.directive.js.map +1 -1
- package/esm2022/year-field/watt-year-field.component.js +3 -3
- package/esm2022/year-field/watt-year-field.component.js.map +1 -1
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js +3 -3
- package/esm2022/yearmonth-field/watt-yearmonth-field.component.js.map +1 -1
- package/package.json +8 -8
|
@@ -47,10 +47,10 @@ export class WattTableCellDirective {
|
|
|
47
47
|
static ngTemplateContextGuard(_directive, context) {
|
|
48
48
|
return true;
|
|
49
49
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableCellDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
51
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.15", type: WattTableCellDirective, isStandalone: true, selector: "[wattTableCell]", inputs: { column: { classPropertyName: "column", publicName: "wattTableCell", isSignal: true, isRequired: true, transformFunction: null }, header: { classPropertyName: "header", publicName: "wattTableCellHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableCellDirective, decorators: [{
|
|
54
54
|
type: Directive,
|
|
55
55
|
args: [{
|
|
56
56
|
selector: '[wattTableCell]',
|
|
@@ -61,10 +61,10 @@ export class WattTableToolbarDirective {
|
|
|
61
61
|
static ngTemplateContextGuard(_directive, context) {
|
|
62
62
|
return true;
|
|
63
63
|
}
|
|
64
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
65
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.
|
|
64
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableToolbarDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
65
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.15", type: WattTableToolbarDirective, isStandalone: true, selector: "[wattTableToolbar]", ngImport: i0 });
|
|
66
66
|
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableToolbarDirective, decorators: [{
|
|
68
68
|
type: Directive,
|
|
69
69
|
args: [{
|
|
70
70
|
selector: '[wattTableToolbar]',
|
|
@@ -312,10 +312,10 @@ export class WattTableComponent {
|
|
|
312
312
|
* Toggles the selection of a row.
|
|
313
313
|
*/
|
|
314
314
|
toggleSelection = (row) => this.selection.update((s) => (s.includes(row) ? s.filter((r) => r !== row) : s.concat(row)));
|
|
315
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
316
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: WattTableComponent, isStandalone: true, selector: "watt-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyFooter: { classPropertyName: "stickyFooter", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null }, resolveHeader: { classPropertyName: "resolveHeader", publicName: "resolveHeader", isSignal: true, isRequired: false, transformFunction: null }, sortBy: { classPropertyName: "sortBy", publicName: "sortBy", isSignal: true, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null }, sortClear: { classPropertyName: "sortClear", publicName: "sortClear", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, suppressRowHoverHighlight: { classPropertyName: "suppressRowHoverHighlight", publicName: "suppressRowHoverHighlight", isSignal: true, isRequired: false, transformFunction: null }, activeRow: { classPropertyName: "activeRow", publicName: "activeRow", isSignal: true, isRequired: false, transformFunction: null }, activeRowComparator: { classPropertyName: "activeRowComparator", publicName: "activeRowComparator", isSignal: true, isRequired: false, transformFunction: null }, hideColumnHeaders: { classPropertyName: "hideColumnHeaders", publicName: "hideColumnHeaders", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", expanded: "expandedChange", rowClick: "rowClick", sortChange: "sortChange" }, host: { properties: { "class.watt-table-variant-zebra": "variant() === \"zebra\"", "style.--watt-table-grid-template-columns": "sizing().join(\" \")" } }, queries: [{ propertyName: "cells", predicate: (WattTableCellDirective), isSignal: true }, { propertyName: "toolbar", first: true, predicate: (WattTableToolbarDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "tableCellElements", predicate: ["td"], descendants: true, isSignal: 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': getSelectionState() !== false }\"\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\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\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-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; 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 @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\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=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(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\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></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 renderedColumns(); 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(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\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.watt-table-hide-footer{display:none}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;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:48px;padding:var(--watt-space-xs) var(--watt-space-m);line-height:18px}watt-table .mat-mdc-table td.mat-mdc-cell.watt-table-cell--expandable{padding:0}watt-table .mat-mdc-table td.mat-mdc-footer-cell:not(.watt-table-footer-spacer),watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table td.mat-mdc-footer-cell:not(.watt-table-footer-spacer){font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:none;letter-spacing:0;border-top:2px solid var(--watt-color-neutral-grey-300);background-color:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row>td:not(.watt-table-cell--expandable),watt-table .mat-mdc-table tr:has(>.watt-table-cell--expandable)>td:not(.watt-table-cell--expandable){cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row,:has(>.watt-table-cell--expandable:hover))>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-column-__expandableColumn__>watt-icon{transition:transform .2s}watt-table .mat-mdc-table .mat-column-__expandableColumn__.watt-table-cell--expanded>watt-icon{transform:rotate(90deg)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-arrow{margin-right:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-arrow,watt-table .mat-mdc-table .watt-table-align-left .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;text-align: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;text-align:right}.watt-table-variant-zebra>table>tbody>tr:nth-child(2n):not(.watt-table-active-row)>td{background-color:var(--watt-color-neutral-grey-50)}watt-table .mat-mdc-table th.watt-table-cell--expandable{display:none}watt-table .mat-mdc-table tr.mat-mdc-row td.mat-mdc-cell.watt-table-cell--expandable{position:relative;min-height:0;max-height:0;border-bottom-width:0;overflow:hidden;pointer-events:none;grid-column:1/-1;background:transparent;flex:1 1 auto;opacity:0;will-change:opacity;transition:opacity .2s cubic-bezier(.4,0,.2,1),overflow 0s .3s allow-discrete}watt-table .mat-mdc-table tr.mat-mdc-row td.mat-mdc-cell.watt-table-cell--expandable>.watt-table-cell-wrapper{position:absolute;top:0;width:100%}watt-table .mat-mdc-table tr.mat-mdc-row td.watt-table-cell--expandable.watt-table-cell--expanded{height:auto;max-height:initial;opacity:1;border-bottom-width:1px;pointer-events:all;overflow:visible}watt-table .mat-mdc-table tr.mat-mdc-row td.watt-table-cell--expandable.watt-table-cell--expanded>.watt-table-cell-wrapper{position:relative}.watt-table-cell-wrapper{width:100%}.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: "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: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattCheckboxComponent, selector: "watt-checkbox", inputs: ["required"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [NgTemplateOutlet]] });
|
|
315
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
316
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattTableComponent, isStandalone: true, selector: "watt-table", inputs: { dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, displayedColumns: { classPropertyName: "displayedColumns", publicName: "displayedColumns", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, stickyFooter: { classPropertyName: "stickyFooter", publicName: "stickyFooter", isSignal: true, isRequired: false, transformFunction: null }, resolveHeader: { classPropertyName: "resolveHeader", publicName: "resolveHeader", isSignal: true, isRequired: false, transformFunction: null }, sortBy: { classPropertyName: "sortBy", publicName: "sortBy", isSignal: true, isRequired: false, transformFunction: null }, sortDirection: { classPropertyName: "sortDirection", publicName: "sortDirection", isSignal: true, isRequired: false, transformFunction: null }, sortClear: { classPropertyName: "sortClear", publicName: "sortClear", isSignal: true, isRequired: false, transformFunction: null }, rowClass: { classPropertyName: "rowClass", publicName: "rowClass", isSignal: true, isRequired: false, transformFunction: null }, selectable: { classPropertyName: "selectable", publicName: "selectable", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, suppressRowHoverHighlight: { classPropertyName: "suppressRowHoverHighlight", publicName: "suppressRowHoverHighlight", isSignal: true, isRequired: false, transformFunction: null }, activeRow: { classPropertyName: "activeRow", publicName: "activeRow", isSignal: true, isRequired: false, transformFunction: null }, activeRowComparator: { classPropertyName: "activeRowComparator", publicName: "activeRowComparator", isSignal: true, isRequired: false, transformFunction: null }, hideColumnHeaders: { classPropertyName: "hideColumnHeaders", publicName: "hideColumnHeaders", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, trackBy: { classPropertyName: "trackBy", publicName: "trackBy", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selection: "selectionChange", expanded: "expandedChange", rowClick: "rowClick", sortChange: "sortChange" }, host: { properties: { "class.watt-table-variant-zebra": "variant() === \"zebra\"", "style.--watt-table-grid-template-columns": "sizing().join(\" \")" } }, queries: [{ propertyName: "cells", predicate: (WattTableCellDirective), isSignal: true }, { propertyName: "toolbar", first: true, predicate: (WattTableToolbarDirective), descendants: true, isSignal: true }], viewQueries: [{ propertyName: "sort", first: true, predicate: MatSort, descendants: true, isSignal: true }, { propertyName: "tableCellElements", predicate: ["td"], descendants: true, isSignal: 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': getSelectionState() !== false }\"\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\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\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-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; 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 @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\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=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(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\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></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 renderedColumns(); 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(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\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.watt-table-hide-footer{display:none}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;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:48px;padding:var(--watt-space-xs) var(--watt-space-m);line-height:18px}watt-table .mat-mdc-table td.mat-mdc-cell.watt-table-cell--expandable{padding:0}watt-table .mat-mdc-table td.mat-mdc-footer-cell:not(.watt-table-footer-spacer),watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:1px solid var(--watt-color-neutral-grey-300)}watt-table .mat-mdc-table td.mat-mdc-footer-cell:not(.watt-table-footer-spacer){font-size:.875rem;line-height:1.25rem;font-weight:600;text-transform:none;letter-spacing:0;border-top:2px solid var(--watt-color-neutral-grey-300);background-color:var(--watt-color-neutral-grey-100)}watt-table .mat-mdc-table .watt-table-no-end-divider:last-child .mat-mdc-cell{border-bottom:0px solid var(--watt-color-neutral-grey-300)!important}watt-table .mat-mdc-table .watt-table-clickable-row>td:not(.watt-table-cell--expandable),watt-table .mat-mdc-table tr:has(>.watt-table-cell--expandable)>td:not(.watt-table-cell--expandable){cursor:pointer;-webkit-user-select:text;user-select:text}watt-table .mat-mdc-table .watt-table-highlight-row:hover:not(.watt-table-active-row,:has(>.watt-table-cell--expandable:hover))>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-column-__expandableColumn__>watt-icon{transition:transform .2s}watt-table .mat-mdc-table .mat-column-__expandableColumn__.watt-table-cell--expanded>watt-icon{transform:rotate(90deg)}watt-table .mat-mdc-table .mat-sort-header-arrow{margin:0}watt-table .mat-mdc-table .watt-table-align-right .mat-sort-header-arrow{margin-right:var(--watt-space-s)}watt-table .mat-mdc-table .watt-table-align-center .mat-sort-header-arrow,watt-table .mat-mdc-table .watt-table-align-left .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;text-align: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;text-align:right}.watt-table-variant-zebra>table>tbody>tr:nth-child(2n):not(.watt-table-active-row)>td{background-color:var(--watt-color-neutral-grey-50)}watt-table .mat-mdc-table th.watt-table-cell--expandable{display:none}watt-table .mat-mdc-table tr.mat-mdc-row td.mat-mdc-cell.watt-table-cell--expandable{position:relative;min-height:0;max-height:0;border-bottom-width:0;overflow:hidden;pointer-events:none;grid-column:1/-1;background:transparent;flex:1 1 auto;opacity:0;will-change:opacity;transition:opacity .2s cubic-bezier(.4,0,.2,1),overflow 0s .3s allow-discrete}watt-table .mat-mdc-table tr.mat-mdc-row td.mat-mdc-cell.watt-table-cell--expandable>.watt-table-cell-wrapper{position:absolute;top:0;width:100%}watt-table .mat-mdc-table tr.mat-mdc-row td.watt-table-cell--expandable.watt-table-cell--expanded{height:auto;max-height:initial;opacity:1;border-bottom-width:1px;pointer-events:all;overflow:visible}watt-table .mat-mdc-table tr.mat-mdc-row td.watt-table-cell--expandable.watt-table-cell--expanded>.watt-table-cell-wrapper{position:relative}.watt-table-cell-wrapper{width:100%}.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: "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: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattCheckboxComponent, selector: "watt-checkbox", inputs: ["required"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }], encapsulation: i0.ViewEncapsulation.None, deferBlockDependencies: [() => [NgTemplateOutlet]] });
|
|
317
317
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTableComponent, decorators: [{
|
|
319
319
|
type: Component,
|
|
320
320
|
args: [{ imports: [
|
|
321
321
|
NgClass,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-table.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/table/watt-table.component.ts","../../../../libs/watt/package/table/watt-table.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAY,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,MAAM,EAEN,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW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AC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;uGA7QpF,kBAAkB;2FAAlB,kBAAkB,2sGA0IK,CAAA,sBAAyB,CAAA,uEAC1B,CAAA,yBAA4B,CAAA,sGAClC,OAAO,6JChXpC,+2MA6LA,kgMDqBI,OAAO,oFACP,gBAAgB,mJAEhB,WAAW,8VACX,aAAa,idACb,cAAc,+gDACd,iBAAiB,kGACjB,qBAAqB,2EALrB,YAAY,iGADZ,gBAAgB;;2FAiBP,kBAAkB;kBApB9B,SAAS;8BACC;wBACP,OAAO;wBACP,gBAAgB;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,cAAc;wBACd,iBAAiB;wBACjB,qBAAqB;qBACtB,iBACc,iBAAiB,CAAC,IAAI,YAC3B,YAAY,QAGhB;wBACJ,kCAAkC,EAAE,uBAAuB;wBAC3D,4CAA4C,EAAE,oBAAoB;qBACnE;i6EA4IiC,sBAAyB,yFAC1B,yBAA4B,mFAClC,OAAO,+EAG2C,IAAI;AAiInF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,yBAAyB,CAAC,CAAC","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 { KeyValue, KeyValuePipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n viewChild,\n viewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { Signal, TrackByFunction } from '@angular/core';\nimport { outputFromObservable } 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 { Subject } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { wattFormatDate } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nimport { animateExpandableCells } from './watt-table-expand-animation';\n\n/** Class name for expandable cells. */\nexport const EXPANDABLE_CLASS = 'watt-table-cell--expandable';\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 * When `true`, the cell is replaced with an expandable arrow and the content is deferred.\n * Clicking on the arrow reveals the content below the current row.\n *\n * @remarks\n * It is recommended to provide a custom `trackBy` function when using `expandable`,\n * otherwise animations can be inaccurate when data is changed.\n */\n expandable?: boolean;\n\n /**\n * Tooltip text to show on hover of the header cell.\n */\n tooltip?: string;\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 index: number;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n\n /**\n * The WattTableColumn this template applies to.\n */\n readonly column = input.required<WattTableColumn<T>>({ alias: 'wattTableCell' });\n\n /**\n * Optional header text for the column.\n */\n readonly header = input<string>(undefined, { alias: 'wattTableCellHeader' });\n\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/watt/table';`\n */\n@Component({\n imports: [\n NgClass,\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattIconComponent,\n WattCheckboxComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n host: {\n '[class.watt-table-variant-zebra]': 'variant() === \"zebra\"',\n '[style.--watt-table-grid-template-columns]': 'sizing().join(\" \")',\n },\n})\nexport class WattTableComponent<T> {\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 readonly dataSource = input.required<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 readonly columns = input<WattTableColumnDef<T>>({});\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n readonly displayedColumns = input<string[]>();\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n readonly disabled = input(false);\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n readonly description = input('');\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n readonly loading = input(false);\n\n /**\n * If true the footer will be sticky\n */\n readonly stickyFooter = input(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 readonly resolveHeader = input<(key: string) => string>();\n\n /**\n * Identifier for column that should be sorted initially.\n */\n readonly sortBy = input('');\n\n /**\n * The sort direction of the initially sorted column.\n */\n readonly sortDirection = input<SortDirection>('');\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n readonly sortClear = input(true);\n\n /**\n * Optional function to determine CSS class(es) for each row.\n */\n readonly rowClass = input<(row: T) => string | string[]>();\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n readonly selectable = input(false);\n\n /**\n * Sets the selected rows. Only applicable when selectable is `true`.\n */\n readonly selection = model<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n readonly suppressRowHoverHighlight = input(false);\n\n /**\n * Highlights the currently active row.\n */\n readonly activeRow = input<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 readonly activeRowComparator = input<(currentRow: T, activeRow: T) => boolean>();\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n readonly hideColumnHeaders = input(false);\n\n /**\n * Choose from a predefined set of display variants.\n */\n readonly variant = input<'zebra'>();\n\n /**\n * Array of rows that are currently expanded.\n */\n readonly expanded = model<T[]>([]);\n\n /**\n * Optional function for uniquely identifying rows.\n */\n readonly trackBy = input<TrackByFunction<T> | keyof T>();\n\n /**\n * @ignore\n * The `observed` boolean from the `Subject` is used to determine if a row is\n * clickable or not. This is available on `EventEmitter`, but not on `output`,\n * which is why this workaround is used.\n */\n protected rowClick$ = new Subject<T>();\n\n /**\n * Emits whenever a row is clicked.\n */\n readonly rowClick = outputFromObservable(this.rowClick$);\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n readonly sortChange = output<Sort>();\n\n // Queries\n protected cells = contentChildren(WattTableCellDirective<T>);\n protected toolbar = contentChild(WattTableToolbarDirective<T>);\n protected sort = viewChild(MatSort);\n\n // Enables animation for expanding/collapsing cells\n protected tableCellElements = viewChildren<ElementRef<HTMLTableCellElement>>('td');\n protected animationEffect = animateExpandableCells(this.tableCellElements, this.expanded);\n\n // Selectable\n protected filterSelectionBy = (rows: T[]) => rows.filter((row) => this.selection().includes(row));\n protected getSelectionState = () => {\n const filteredData = this.dataSource().filteredData;\n const filteredSelection = this.filterSelectionBy(filteredData);\n if (!filteredSelection.length) return false;\n return filteredSelection.length === this.dataSource().filteredData.length ? true : null;\n };\n\n // Unique names for special columns\n protected checkboxColumn = '__checkboxColumn__';\n protected expandableColumn = '__expandableColumn__';\n\n protected hasFooter = computed(() => Object.values(this.columns()).some((c) => c.footer));\n protected isExpandable = computed(() => Object.values(this.columns()).some((c) => c.expandable));\n protected renderedColumns = computed(() => {\n const columns = this.displayedColumns() ?? Object.keys(this.columns());\n return [\n ...(this.selectable() ? [this.checkboxColumn] : []),\n ...columns.filter((key) => !this.columns()[key].expandable),\n ...(this.isExpandable() ? [this.expandableColumn] : []),\n ...columns.filter((key) => this.columns()[key].expandable),\n ];\n });\n\n protected sizing = computed(() => {\n const columns = this.columns();\n return this.renderedColumns()\n .filter((key) => !columns[key]?.expandable)\n .map((key) => {\n switch (key) {\n case this.checkboxColumn:\n return 'var(--watt-space-xl)';\n case this.expandableColumn:\n return 'min-content';\n default:\n return columns[key]?.size ?? 'auto';\n }\n });\n });\n\n /** Try to get cell data for a specific `column` and `row`. */\n private getCellData = (column: WattTableColumn<T>, row: T) => {\n if (column.cell) return column.cell(row);\n return !column.accessor\n ? ''\n : typeof column.accessor === 'function'\n ? column.accessor(row)\n : row[column.accessor];\n };\n\n protected getColumnTemplate = (column: WattTableColumn<T>) =>\n this.cells().find((item) => item.column() === column)?.templateRef;\n\n protected 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 protected getColumnCell = (column: WattTableColumn<T>, row: T) => {\n const cell = this.getCellData(column, row);\n if (cell === undefined || cell === null) return '—';\n if (cell instanceof Date) return wattFormatDate(cell);\n return cell;\n };\n\n protected getRowKey = (index: number, row: T) => {\n const trackBy = this.trackBy();\n if (typeof trackBy === 'string') return row[trackBy];\n if (typeof trackBy === 'function') return trackBy(index, row);\n return this.dataSource().data.indexOf(row);\n };\n\n protected isActiveRow = (row: T) => {\n const activeRow = this.activeRow();\n const activeRowComparator = this.activeRowComparator();\n if (!activeRow) return false;\n return activeRowComparator ? activeRowComparator(row, activeRow) : row === activeRow;\n };\n\n protected getRowClass = (row: T): string => {\n const rowClass = this.rowClass();\n if (!rowClass) return '';\n const result = rowClass(row);\n return Array.isArray(result) ? result.join(' ') : result;\n };\n\n protected onRowClick = (row: T) => {\n if (this.disabled() || window.getSelection()?.toString() !== '') return;\n if (this.isExpandable()) {\n this.expanded.update((rows) =>\n rows.includes(row) ? rows.filter((r) => r != row) : [...rows, row]\n );\n }\n\n this.rowClick$.next(row);\n };\n\n constructor() {\n effect(() => {\n const dataSource = this.dataSource();\n dataSource.sort = this.sort();\n if (!(dataSource instanceof WattTableDataSource)) return;\n dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const column = this.columns()[sortHeaderId];\n const value = this.getCellData(column, row);\n if (typeof value === 'string') return value.toLowerCase(); // case insensitive sorting\n if (value instanceof Date) return value.getTime();\n return value as number;\n };\n });\n }\n\n /**\n * Clears the selection, emitting `selectionChange` if `selection` was not empty.\n */\n clearSelection = () => this.selection.update((s) => (!s.length ? s : []));\n\n /**\n * Toggles the selection of a row.\n */\n toggleSelection = (row: T) =>\n this.selection.update((s) => (s.includes(row) ? s.filter((r) => r !== row) : s.concat(row)));\n}\n\nexport const WATT_TABLE = [WattTableComponent, WattTableCellDirective, WattTableToolbarDirective];\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': getSelectionState() !== false }\"\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\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\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-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; 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 @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\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=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(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\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></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 renderedColumns(); 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(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\n />\n </div>\n}\n"]}
|
|
1
|
+
{"version":3,"file":"watt-table.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/table/watt-table.component.ts","../../../../libs/watt/package/table/watt-table.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAY,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,SAAS,EACT,MAAM,EAEN,MAAM,EACN,KAAK,EACL,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,YAAY,EACZ,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,aAAa,EAAuB,MAAM,wBAAwB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,OAAO,EAAE,qB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9B,SAAS;8BACC;wBACP,OAAO;wBACP,gBAAgB;wBAChB,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,cAAc;wBACd,iBAAiB;wBACjB,qBAAqB;qBACtB,iBACc,iBAAiB,CAAC,IAAI,YAC3B,YAAY,QAGhB;wBACJ,kCAAkC,EAAE,uBAAuB;wBAC3D,4CAA4C,EAAE,oBAAoB;qBACnE;i6EA4IiC,sBAAyB,yFAC1B,yBAA4B,mFAClC,OAAO,+EAG2C,IAAI;AAiInF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,yBAAyB,CAAC,CAAC","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 { KeyValue, KeyValuePipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n viewChild,\n viewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { Signal, TrackByFunction } from '@angular/core';\nimport { outputFromObservable } 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 { Subject } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { wattFormatDate } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nimport { animateExpandableCells } from './watt-table-expand-animation';\n\n/** Class name for expandable cells. */\nexport const EXPANDABLE_CLASS = 'watt-table-cell--expandable';\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 * When `true`, the cell is replaced with an expandable arrow and the content is deferred.\n * Clicking on the arrow reveals the content below the current row.\n *\n * @remarks\n * It is recommended to provide a custom `trackBy` function when using `expandable`,\n * otherwise animations can be inaccurate when data is changed.\n */\n expandable?: boolean;\n\n /**\n * Tooltip text to show on hover of the header cell.\n */\n tooltip?: string;\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 index: number;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n\n /**\n * The WattTableColumn this template applies to.\n */\n readonly column = input.required<WattTableColumn<T>>({ alias: 'wattTableCell' });\n\n /**\n * Optional header text for the column.\n */\n readonly header = input<string>(undefined, { alias: 'wattTableCellHeader' });\n\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/watt/table';`\n */\n@Component({\n imports: [\n NgClass,\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattIconComponent,\n WattCheckboxComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n host: {\n '[class.watt-table-variant-zebra]': 'variant() === \"zebra\"',\n '[style.--watt-table-grid-template-columns]': 'sizing().join(\" \")',\n },\n})\nexport class WattTableComponent<T> {\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 readonly dataSource = input.required<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 readonly columns = input<WattTableColumnDef<T>>({});\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n readonly displayedColumns = input<string[]>();\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n readonly disabled = input(false);\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n readonly description = input('');\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n readonly loading = input(false);\n\n /**\n * If true the footer will be sticky\n */\n readonly stickyFooter = input(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 readonly resolveHeader = input<(key: string) => string>();\n\n /**\n * Identifier for column that should be sorted initially.\n */\n readonly sortBy = input('');\n\n /**\n * The sort direction of the initially sorted column.\n */\n readonly sortDirection = input<SortDirection>('');\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n readonly sortClear = input(true);\n\n /**\n * Optional function to determine CSS class(es) for each row.\n */\n readonly rowClass = input<(row: T) => string | string[]>();\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n readonly selectable = input(false);\n\n /**\n * Sets the selected rows. Only applicable when selectable is `true`.\n */\n readonly selection = model<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n readonly suppressRowHoverHighlight = input(false);\n\n /**\n * Highlights the currently active row.\n */\n readonly activeRow = input<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 readonly activeRowComparator = input<(currentRow: T, activeRow: T) => boolean>();\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n readonly hideColumnHeaders = input(false);\n\n /**\n * Choose from a predefined set of display variants.\n */\n readonly variant = input<'zebra'>();\n\n /**\n * Array of rows that are currently expanded.\n */\n readonly expanded = model<T[]>([]);\n\n /**\n * Optional function for uniquely identifying rows.\n */\n readonly trackBy = input<TrackByFunction<T> | keyof T>();\n\n /**\n * @ignore\n * The `observed` boolean from the `Subject` is used to determine if a row is\n * clickable or not. This is available on `EventEmitter`, but not on `output`,\n * which is why this workaround is used.\n */\n protected rowClick$ = new Subject<T>();\n\n /**\n * Emits whenever a row is clicked.\n */\n readonly rowClick = outputFromObservable(this.rowClick$);\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n readonly sortChange = output<Sort>();\n\n // Queries\n protected cells = contentChildren(WattTableCellDirective<T>);\n protected toolbar = contentChild(WattTableToolbarDirective<T>);\n protected sort = viewChild(MatSort);\n\n // Enables animation for expanding/collapsing cells\n protected tableCellElements = viewChildren<ElementRef<HTMLTableCellElement>>('td');\n protected animationEffect = animateExpandableCells(this.tableCellElements, this.expanded);\n\n // Selectable\n protected filterSelectionBy = (rows: T[]) => rows.filter((row) => this.selection().includes(row));\n protected getSelectionState = () => {\n const filteredData = this.dataSource().filteredData;\n const filteredSelection = this.filterSelectionBy(filteredData);\n if (!filteredSelection.length) return false;\n return filteredSelection.length === this.dataSource().filteredData.length ? true : null;\n };\n\n // Unique names for special columns\n protected checkboxColumn = '__checkboxColumn__';\n protected expandableColumn = '__expandableColumn__';\n\n protected hasFooter = computed(() => Object.values(this.columns()).some((c) => c.footer));\n protected isExpandable = computed(() => Object.values(this.columns()).some((c) => c.expandable));\n protected renderedColumns = computed(() => {\n const columns = this.displayedColumns() ?? Object.keys(this.columns());\n return [\n ...(this.selectable() ? [this.checkboxColumn] : []),\n ...columns.filter((key) => !this.columns()[key].expandable),\n ...(this.isExpandable() ? [this.expandableColumn] : []),\n ...columns.filter((key) => this.columns()[key].expandable),\n ];\n });\n\n protected sizing = computed(() => {\n const columns = this.columns();\n return this.renderedColumns()\n .filter((key) => !columns[key]?.expandable)\n .map((key) => {\n switch (key) {\n case this.checkboxColumn:\n return 'var(--watt-space-xl)';\n case this.expandableColumn:\n return 'min-content';\n default:\n return columns[key]?.size ?? 'auto';\n }\n });\n });\n\n /** Try to get cell data for a specific `column` and `row`. */\n private getCellData = (column: WattTableColumn<T>, row: T) => {\n if (column.cell) return column.cell(row);\n return !column.accessor\n ? ''\n : typeof column.accessor === 'function'\n ? column.accessor(row)\n : row[column.accessor];\n };\n\n protected getColumnTemplate = (column: WattTableColumn<T>) =>\n this.cells().find((item) => item.column() === column)?.templateRef;\n\n protected 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 protected getColumnCell = (column: WattTableColumn<T>, row: T) => {\n const cell = this.getCellData(column, row);\n if (cell === undefined || cell === null) return '—';\n if (cell instanceof Date) return wattFormatDate(cell);\n return cell;\n };\n\n protected getRowKey = (index: number, row: T) => {\n const trackBy = this.trackBy();\n if (typeof trackBy === 'string') return row[trackBy];\n if (typeof trackBy === 'function') return trackBy(index, row);\n return this.dataSource().data.indexOf(row);\n };\n\n protected isActiveRow = (row: T) => {\n const activeRow = this.activeRow();\n const activeRowComparator = this.activeRowComparator();\n if (!activeRow) return false;\n return activeRowComparator ? activeRowComparator(row, activeRow) : row === activeRow;\n };\n\n protected getRowClass = (row: T): string => {\n const rowClass = this.rowClass();\n if (!rowClass) return '';\n const result = rowClass(row);\n return Array.isArray(result) ? result.join(' ') : result;\n };\n\n protected onRowClick = (row: T) => {\n if (this.disabled() || window.getSelection()?.toString() !== '') return;\n if (this.isExpandable()) {\n this.expanded.update((rows) =>\n rows.includes(row) ? rows.filter((r) => r != row) : [...rows, row]\n );\n }\n\n this.rowClick$.next(row);\n };\n\n constructor() {\n effect(() => {\n const dataSource = this.dataSource();\n dataSource.sort = this.sort();\n if (!(dataSource instanceof WattTableDataSource)) return;\n dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const column = this.columns()[sortHeaderId];\n const value = this.getCellData(column, row);\n if (typeof value === 'string') return value.toLowerCase(); // case insensitive sorting\n if (value instanceof Date) return value.getTime();\n return value as number;\n };\n });\n }\n\n /**\n * Clears the selection, emitting `selectionChange` if `selection` was not empty.\n */\n clearSelection = () => this.selection.update((s) => (!s.length ? s : []));\n\n /**\n * Toggles the selection of a row.\n */\n toggleSelection = (row: T) =>\n this.selection.update((s) => (s.includes(row) ? s.filter((r) => r !== row) : s.concat(row)));\n}\n\nexport const WATT_TABLE = [WattTableComponent, WattTableCellDirective, WattTableToolbarDirective];\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': getSelectionState() !== false }\"\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\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\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-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; 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 @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\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=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(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\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></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 renderedColumns(); 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(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\n />\n </div>\n}\n"]}
|
|
@@ -21,10 +21,10 @@ import * as i0 from "@angular/core";
|
|
|
21
21
|
export class WattLinkTabComponent {
|
|
22
22
|
label = input.required(...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
23
23
|
link = input.required(...(ngDevMode ? [{ debugName: "link" }] : []));
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLinkTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: WattLinkTabComponent, isStandalone: true, selector: "watt-link-tab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: ``, isInline: true });
|
|
26
26
|
}
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLinkTabComponent, decorators: [{
|
|
28
28
|
type: Component,
|
|
29
29
|
args: [{
|
|
30
30
|
selector: 'watt-link-tab',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-link-tab.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-link-tab.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAMjD,MAAM,OAAO,oBAAoB;IAC/B,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAU,CAAC;IACjC,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-link-tab.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-link-tab.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;;AAMjD,MAAM,OAAO,oBAAoB;IAC/B,KAAK,GAAG,KAAK,CAAC,QAAQ,gDAAU,CAAC;IACjC,IAAI,GAAG,KAAK,CAAC,QAAQ,+CAAU,CAAC;wGAFrB,oBAAoB;4FAApB,oBAAoB,gUAFrB,EAAE;;4FAED,oBAAoB;kBAJhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,eAAe;oBACzB,QAAQ,EAAE,EAAE;iBACb","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 } from '@angular/core';\n\n@Component({\n selector: 'watt-link-tab',\n template: ``,\n})\nexport class WattLinkTabComponent {\n label = input.required<string>();\n link = input.required<string>();\n}\n"]}
|
|
@@ -25,8 +25,8 @@ import * as i0 from "@angular/core";
|
|
|
25
25
|
import * as i1 from "@angular/material/tabs";
|
|
26
26
|
export class WattLinkTabsComponent {
|
|
27
27
|
tabElements = contentChildren(WattLinkTabComponent, ...(ngDevMode ? [{ debugName: "tabElements" }] : []));
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLinkTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattLinkTabsComponent, isStandalone: true, selector: "watt-link-tabs", queries: [{ propertyName: "tabElements", predicate: WattLinkTabComponent, isSignal: true }], ngImport: i0, template: `
|
|
30
30
|
<vater-flex autoSize fill="vertical">
|
|
31
31
|
<nav
|
|
32
32
|
mat-tab-nav-bar
|
|
@@ -46,7 +46,7 @@ export class WattLinkTabsComponent {
|
|
|
46
46
|
</vater-flex>
|
|
47
47
|
`, isInline: true, styles: ["@use \"@energinet/watt/utils\" as watt;watt-link-tabs .mat-mdc-tab-header{box-shadow:var(--watt-bottom-box-shadow);background-color:var(--watt-color-neutral-white)}watt-link-tabs .mat-mdc-tab-nav-panel{display:block;position:relative;height:100%}watt-link-tabs .mat-mdc-tab-links,watt-link-tabs .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label{color:var(--mat-tab-active-label-text-color)}watt-link-tabs .mat-mdc-tab-labels,watt-link-tabs .mat-mdc-tab-links{padding-left:var(--watt-space-ml)}watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link{min-width:120px;opacity:1}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link) .mdc-tab__content{@include watt.typography-watt-button;color:var(--watt-on-light-medium-emphasis)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{color:var(--watt-on-light-medium-emphasis)}:is(:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover) .mdc-tab__content{color:var(--watt-color-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i1.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
48
48
|
}
|
|
49
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattLinkTabsComponent, decorators: [{
|
|
50
50
|
type: Component,
|
|
51
51
|
args: [{ selector: 'watt-link-tabs', encapsulation: ViewEncapsulation.None, imports: [MatTabsModule, RouterOutlet, RouterLink, RouterLinkActive, VaterFlexComponent], template: `
|
|
52
52
|
<vater-flex autoSize fill="vertical">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-link-tabs.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-link-tabs.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;;AAoFjE,MAAM,OAAO,qBAAqB;IAChC,WAAW,GAAG,eAAe,CAAC,oBAAoB,uDAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-link-tabs.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-link-tabs.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;;;AAoFjE,MAAM,OAAO,qBAAqB;IAChC,WAAW,GAAG,eAAe,CAAC,oBAAoB,uDAAC,CAAC;wGADzC,qBAAqB;4FAArB,qBAAqB,sGACF,oBAAoB,6CArBxC;;;;;;;;;;;;;;;;;;GAkBT,6hEA7ES,aAAa,okBAAE,YAAY,+KAAE,UAAU,oOAAE,gBAAgB,8MAAE,kBAAkB;;4FA+E5E,qBAAqB;kBAlFjC,SAAS;+BACE,gBAAgB,iBACX,iBAAiB,CAAC,IAAI,WAC5B,CAAC,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,YA2D9E;;;;;;;;;;;;;;;;;;GAkBT;mGAG6B,oBAAoB","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, ViewEncapsulation, contentChildren } from '@angular/core';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\nimport { MatTabsModule } from '@angular/material/tabs';\n\nimport { VaterFlexComponent } from '@energinet/watt/vater';\nimport { WattLinkTabComponent } from './watt-link-tab.component';\n\n@Component({\n selector: 'watt-link-tabs',\n encapsulation: ViewEncapsulation.None,\n imports: [MatTabsModule, RouterOutlet, RouterLink, RouterLinkActive, VaterFlexComponent],\n styles: `\n @use '@energinet/watt/utils' as watt;\n\n watt-link-tabs {\n .mat-mdc-tab-header {\n box-shadow: var(--watt-bottom-box-shadow);\n background-color: var(--watt-color-neutral-white);\n }\n\n .mat-mdc-tab-nav-panel {\n display: block;\n position: relative;\n height: 100%;\n }\n\n .mat-mdc-tab-links,\n .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label {\n color: var(--mat-tab-active-label-text-color);\n }\n\n .mat-mdc-tab-labels,\n .mat-mdc-tab-links {\n padding-left: var(--watt-space-ml);\n }\n\n .mat-mdc-tab,\n .mat-mdc-tab-link {\n min-width: 120px;\n opacity: 1;\n\n .mdc-tab__content {\n @include watt.typography-watt-button;\n color: var(--watt-on-light-medium-emphasis);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active,\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n color: var(--watt-on-light-medium-emphasis);\n\n .mdc-tab__content {\n color: var(--watt-color-primary);\n }\n }\n }\n }\n `,\n template: `\n <vater-flex autoSize fill=\"vertical\">\n <nav\n mat-tab-nav-bar\n [disableRipple]=\"true\"\n animationDuration=\"0ms\"\n [mat-stretch-tabs]=\"false\"\n [tabPanel]=\"tabPanel\"\n >\n @for (tab of tabElements(); track tab) {\n <a mat-tab-link [routerLink]=\"tab.link()\" routerLinkActive=\"active\">\n {{ tab.label() }}\n </a>\n }\n </nav>\n\n <mat-tab-nav-panel #tabPanel><router-outlet /></mat-tab-nav-panel>\n </vater-flex>\n `,\n})\nexport class WattLinkTabsComponent {\n tabElements = contentChildren(WattLinkTabComponent);\n}\n"]}
|
|
@@ -25,12 +25,12 @@ export class WattTabComponent {
|
|
|
25
25
|
emitChange() {
|
|
26
26
|
this.changed.emit();
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
29
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: WattTabComponent, isStandalone: true, selector: "watt-tab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { changed: "changed" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: `<ng-template>
|
|
30
30
|
<ng-content />
|
|
31
31
|
</ng-template>`, isInline: true });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: 'watt-tab',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-tab.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tab.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAQjF,MAAM,OAAO,gBAAgB;IAC3B,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC,CAAC;IACpE,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC,CAAC;IAC1B,OAAO,GAAG,MAAM,EAAQ,CAAC;IAEzB,UAAU;QACR,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-tab.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tab.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAQjF,MAAM,OAAO,gBAAgB;IAC3B,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC,CAAC;IACpE,KAAK,GAAG,KAAK,CAAS,EAAE,iDAAC,CAAC;IAC1B,OAAO,GAAG,MAAM,EAAQ,CAAC;IAEzB,UAAU;QACR,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACtB,CAAC;wGAPU,gBAAgB;4FAAhB,gBAAgB,sRAC4B,WAAW,gEALxD;;iBAEK;;4FAEJ,gBAAgB;kBAN5B,SAAS;mBAAC;oBACT,QAAQ,EAAE,UAAU;oBACpB,QAAQ,EAAE;;iBAEK;iBAChB;6FAEwD,WAAW","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, TemplateRef, input, output, viewChild } from '@angular/core';\n\n@Component({\n selector: 'watt-tab',\n template: `<ng-template>\n <ng-content />\n </ng-template>`,\n})\nexport class WattTabComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n label = input<string>('');\n changed = output<void>();\n\n emitChange() {\n this.changed.emit();\n }\n}\n"]}
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
import { Component } from '@angular/core';
|
|
20
20
|
import * as i0 from "@angular/core";
|
|
21
21
|
export class WattTabsActionComponent {
|
|
22
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
23
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabsActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WattTabsActionComponent, isStandalone: true, selector: "watt-tabs-action", ngImport: i0, template: `<ng-content />`, isInline: true });
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabsActionComponent, decorators: [{
|
|
26
26
|
type: Component,
|
|
27
27
|
args: [{
|
|
28
28
|
selector: 'watt-tabs-action',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-tabs-action.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tabs-action.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAM1C,MAAM,OAAO,uBAAuB;
|
|
1
|
+
{"version":3,"file":"watt-tabs-action.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tabs-action.component.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;;AAM1C,MAAM,OAAO,uBAAuB;wGAAvB,uBAAuB;4FAAvB,uBAAuB,4EAFxB,gBAAgB;;4FAEf,uBAAuB;kBAJnC,SAAS;mBAAC;oBACT,QAAQ,EAAE,kBAAkB;oBAC5B,QAAQ,EAAE,gBAAgB;iBAC3B","sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-tabs-action',\n template: `<ng-content />`,\n})\nexport class WattTabsActionComponent {}\n"]}
|
|
@@ -47,10 +47,10 @@ export class WattTabsComponent {
|
|
|
47
47
|
triggerChange() {
|
|
48
48
|
this.emitSelectedTabChange(this.activeTabIndex);
|
|
49
49
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattTabsComponent, isStandalone: true, selector: "watt-tabs", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.hostClass" } }, queries: [{ propertyName: "tabElements", predicate: WattTabComponent, isSignal: true }, { propertyName: "actionsTab", first: true, predicate: WattTabsActionComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "tabGroup", first: true, predicate: MatTabGroup, descendants: true, isSignal: 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-tab-group\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n animationDuration=\"0ms\"\n [disableRipple]=\"true\"\n (selectedIndexChange)=\"emitSelectedTabChange($event)\"\n>\n @for (tab of tabElements(); track tab) {\n <mat-tab [label]=\"tab.label()\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </mat-tab>\n }\n\n @if (actionsTab()) {\n <mat-tab labelClass=\"watt-tabs-action\" [disabled]=\"true\">\n <ng-template mat-tab-label>\n <ng-content />\n </ng-template>\n </mat-tab>\n }\n</mat-tab-group>\n", styles: ["watt-drawer watt-tabs .mat-mdc-tab-group,watt-drawer watt-tabs .mat-mdc-tab-body-wrapper{height:100%}watt-tabs.watt-tabs-secondary .mat-mdc-tab.mat-mdc-tab:hover{border-bottom:none}watt-tabs.watt-tabs-secondary .mdc-tab{padding-left:var(--watt-space-m);padding-right:var(--watt-space-m);height:32px}watt-tabs.watt-tabs-secondary .mat-mdc-tab-group.mat-primary .mdc-tab.cdk-focused.cdk-keyboard-focused:focus{background-color:transparent}watt-tabs.watt-tabs-secondary .mat-mdc-tab-group,watt-tabs.watt-tabs-secondary .mat-mdc-tab-nav-bar{--mat-tab-active-focus-indicator-color: var(--watt-color-secondary);--mat-tab-active-focus-label-text-color: var(--watt-color-neutral-black);--mat-tab-active-hover-indicator-color: var(--watt-color-secondary);--mat-tab-active-hover-label-text-color: var(--watt-color-neutral-black);--mat-tab-active-label-text-color: var(--watt-color-neutral-black);--mat-tab-inactive-label-text-color: var(--watt-on-light-low-emphasis);--mat-tab-inactive-ripple-color: none;--mat-tab-disabled-ripple-color: none;--mat-tab-active-indicator-color: var(--watt-color-secondary);--mat-tab-active-indicator-height: 3px;--mat-tab-active-indicator-shape: 99999px;--mat-tab-active-ripple-color: transparent}watt-tabs.watt-tabs-secondary .mat-mdc-tab-header{background:none;box-shadow:none}watt-tabs.watt-tabs-secondary .mat-mdc-tab-labels{flex-wrap:wrap;padding-left:0}watt-tabs.watt-tabs-secondary .mdc-tab-indicator__content--underline{width:43px}watt-tabs.watt-tabs-secondary .mat-mdc-tab-body-wrapper{padding:var(--watt-space-s);padding-top:var(--watt-space-m)}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action{flex-grow:1;justify-content:flex-end;cursor:default;height:auto}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action.mat-mdc-tab-disabled{opacity:1}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action.mat-mdc-tab-disabled,watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action .mdc-tab__content{pointer-events:initial}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action:hover{border-bottom:none}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action:hover .mdc-tab__ripple{display:none}watt-tabs .mat-mdc-tab-body{width:100%}watt-tabs .mat-mdc-tab-group,watt-tabs .mat-mdc-tab-body-wrapper{height:100%}watt-tabs .mat-mdc-tab-group.mat-primary .mdc-tab.cdk-focused.cdk-keyboard-focused:focus{background-color:var(--watt-color-primary-ultralight)}watt-tabs .mat-mdc-tab-labels{padding-left:var(--watt-space-ml)}watt-tabs .mat-mdc-tab{min-width:120px;opacity:1}watt-tabs .mat-mdc-tab .mdc-tab__content{color:var(--watt-typography-button-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0;color:var(--watt-on-light-medium-emphasis)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active{border-bottom:2px solid var(--watt-color-primary)}watt-tabs .mat-mdc-tab.mat-mdc-tab:hover{border-bottom:2px solid var(--watt-color-primary)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active,watt-tabs .mat-mdc-tab.mat-mdc-tab:hover{color:var(--watt-on-light-medium-emphasis)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active .mdc-tab__content,watt-tabs .mat-mdc-tab.mat-mdc-tab:hover .mdc-tab__content{color:var(--watt-color-primary)}watt-tabs .mat-mdc-tab-body-wrapper{padding:var(--watt-space-ml)}watt-tabs .mat-mdc-tab-body.mat-mdc-tab-body-active,watt-tabs .mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active,watt-tabs .mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{position:relative;overflow:initial}watt-tabs .mat-tab-label-container{padding-left:var(--watt-space-ml)}watt-tabs .mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:none}watt-tabs .mat-mdc-tab-header{box-shadow:var(--watt-bottom-box-shadow);background-color:var(--watt-color-neutral-white)}watt-tabs .mat-ink-bar{display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "directive", type: i1.MatTabLabel, selector: "[mat-tab-label], [matTabLabel]" }, { kind: "component", type: i1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTabsComponent, decorators: [{
|
|
54
54
|
type: Component,
|
|
55
55
|
args: [{ selector: 'watt-tabs', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, imports: [NgTemplateOutlet, MatTabsModule], 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-tab-group\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n animationDuration=\"0ms\"\n [disableRipple]=\"true\"\n (selectedIndexChange)=\"emitSelectedTabChange($event)\"\n>\n @for (tab of tabElements(); track tab) {\n <mat-tab [label]=\"tab.label()\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </mat-tab>\n }\n\n @if (actionsTab()) {\n <mat-tab labelClass=\"watt-tabs-action\" [disabled]=\"true\">\n <ng-template mat-tab-label>\n <ng-content />\n </ng-template>\n </mat-tab>\n }\n</mat-tab-group>\n", styles: ["watt-drawer watt-tabs .mat-mdc-tab-group,watt-drawer watt-tabs .mat-mdc-tab-body-wrapper{height:100%}watt-tabs.watt-tabs-secondary .mat-mdc-tab.mat-mdc-tab:hover{border-bottom:none}watt-tabs.watt-tabs-secondary .mdc-tab{padding-left:var(--watt-space-m);padding-right:var(--watt-space-m);height:32px}watt-tabs.watt-tabs-secondary .mat-mdc-tab-group.mat-primary .mdc-tab.cdk-focused.cdk-keyboard-focused:focus{background-color:transparent}watt-tabs.watt-tabs-secondary .mat-mdc-tab-group,watt-tabs.watt-tabs-secondary .mat-mdc-tab-nav-bar{--mat-tab-active-focus-indicator-color: var(--watt-color-secondary);--mat-tab-active-focus-label-text-color: var(--watt-color-neutral-black);--mat-tab-active-hover-indicator-color: var(--watt-color-secondary);--mat-tab-active-hover-label-text-color: var(--watt-color-neutral-black);--mat-tab-active-label-text-color: var(--watt-color-neutral-black);--mat-tab-inactive-label-text-color: var(--watt-on-light-low-emphasis);--mat-tab-inactive-ripple-color: none;--mat-tab-disabled-ripple-color: none;--mat-tab-active-indicator-color: var(--watt-color-secondary);--mat-tab-active-indicator-height: 3px;--mat-tab-active-indicator-shape: 99999px;--mat-tab-active-ripple-color: transparent}watt-tabs.watt-tabs-secondary .mat-mdc-tab-header{background:none;box-shadow:none}watt-tabs.watt-tabs-secondary .mat-mdc-tab-labels{flex-wrap:wrap;padding-left:0}watt-tabs.watt-tabs-secondary .mdc-tab-indicator__content--underline{width:43px}watt-tabs.watt-tabs-secondary .mat-mdc-tab-body-wrapper{padding:var(--watt-space-s);padding-top:var(--watt-space-m)}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action{flex-grow:1;justify-content:flex-end;cursor:default;height:auto}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action.mat-mdc-tab-disabled{opacity:1}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action.mat-mdc-tab-disabled,watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action .mdc-tab__content{pointer-events:initial}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action:hover{border-bottom:none}watt-tabs .mat-mdc-tab.mdc-tab.watt-tabs-action:hover .mdc-tab__ripple{display:none}watt-tabs .mat-mdc-tab-body{width:100%}watt-tabs .mat-mdc-tab-group,watt-tabs .mat-mdc-tab-body-wrapper{height:100%}watt-tabs .mat-mdc-tab-group.mat-primary .mdc-tab.cdk-focused.cdk-keyboard-focused:focus{background-color:var(--watt-color-primary-ultralight)}watt-tabs .mat-mdc-tab-labels{padding-left:var(--watt-space-ml)}watt-tabs .mat-mdc-tab{min-width:120px;opacity:1}watt-tabs .mat-mdc-tab .mdc-tab__content{color:var(--watt-typography-button-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0;color:var(--watt-on-light-medium-emphasis)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active{border-bottom:2px solid var(--watt-color-primary)}watt-tabs .mat-mdc-tab.mat-mdc-tab:hover{border-bottom:2px solid var(--watt-color-primary)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active,watt-tabs .mat-mdc-tab.mat-mdc-tab:hover{color:var(--watt-on-light-medium-emphasis)}watt-tabs .mat-mdc-tab.mat-mdc-tab-active .mdc-tab__content,watt-tabs .mat-mdc-tab.mat-mdc-tab:hover .mdc-tab__content{color:var(--watt-color-primary)}watt-tabs .mat-mdc-tab-body-wrapper{padding:var(--watt-space-ml)}watt-tabs .mat-mdc-tab-body.mat-mdc-tab-body-active,watt-tabs .mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active,watt-tabs .mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{position:relative;overflow:initial}watt-tabs .mat-tab-label-container{padding-left:var(--watt-space-ml)}watt-tabs .mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:none}watt-tabs .mat-mdc-tab-header{box-shadow:var(--watt-bottom-box-shadow);background-color:var(--watt-color-neutral-white)}watt-tabs .mat-ink-bar{display:none}\n"] }]
|
|
56
56
|
}], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], hostClass: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watt-tabs.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tabs.component.ts","../../../../libs/watt/package/tabs/watt-tabs.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EAET,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,EACL,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;;;AAUvE,MAAM,OAAO,iBAAiB;IACX,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAEjD,OAAO,GAAG,KAAK,6DAAU,CAAC;IAE1B,IACI,SAAS;QACX,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7D,CAAC;IAED,WAAW,GAAG,eAAe,CAAC,gBAAgB,uDAAC,CAAC;IAChD,cAAc,GAAG,CAAC,CAAC;IAEnB,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IAE3C,UAAU,GAAG,YAAY,CAAC,uBAAuB,sDAAC,CAAC;IAEnD,eAAe;QACb,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC3B,CAAC;IAED,qBAAqB,CAAC,aAAqB;QACzC,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,aAAa,CAAC,CAAC;QACpF,UAAU,EAAE,UAAU,EAAE,CAAC;IAC3B,CAAC;IAED,gBAAgB,CAAC,KAAa;QAC5B,IAAI,CAAC,QAAQ,EAAE,CAAC,aAAa,GAAG,KAAK,CAAC;IACxC,CAAC;IAED,aAAa;QACX,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClD,CAAC;
|
|
1
|
+
{"version":3,"file":"watt-tabs.component.js","sourceRoot":"","sources":["../../../../libs/watt/package/tabs/watt-tabs.component.ts","../../../../libs/watt/package/tabs/watt-tabs.component.html"],"names":[],"mappings":"AAAA,iBAAiB;AACjB;;;;;;;;;;;;;;;GAeG;AACH,YAAY;AACZ,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EAET,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,EACL,eAAe,GAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAA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CAqCA,iwHDMY,gBAAgB,mJAAE,aAAa;;4FAE9B,iBAAiB;kBAR7B,SAAS;+BACE,WAAW,iBAGN,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,OAAO,WACvC,CAAC,gBAAgB,EAAE,aAAa,CAAC;;sBAOzC,WAAW;uBAAC,OAAO;qFAKU,gBAAgB,uFAGhB,WAAW,4FAEf,uBAAuB","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 {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n AfterViewInit,\n ViewEncapsulation,\n inject,\n HostBinding,\n contentChild,\n viewChild,\n input,\n contentChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatTabGroup, MatTabsModule } from '@angular/material/tabs';\n\nimport { WattTabComponent } from './watt-tab.component';\nimport { WattTabsActionComponent } from './watt-tabs-action.component';\n\n@Component({\n selector: 'watt-tabs',\n styleUrls: ['./watt-tabs.component.scss'],\n templateUrl: './watt-tabs.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [NgTemplateOutlet, MatTabsModule],\n})\nexport class WattTabsComponent implements AfterViewInit {\n private readonly cdr = inject(ChangeDetectorRef);\n\n variant = input<string>();\n\n @HostBinding('class')\n get hostClass() {\n return this.variant() ? `watt-tabs-${this.variant()}` : '';\n }\n\n tabElements = contentChildren(WattTabComponent);\n activeTabIndex = 0;\n\n tabGroup = viewChild.required(MatTabGroup);\n\n actionsTab = contentChild(WattTabsActionComponent);\n\n ngAfterViewInit() {\n this.cdr.detectChanges();\n }\n\n emitSelectedTabChange(selectedIndex: number) {\n this.activeTabIndex = selectedIndex;\n const currentTab = this.tabElements().find((tab, index) => index === selectedIndex);\n currentTab?.emitChange();\n }\n\n setSelectedIndex(index: number) {\n this.tabGroup().selectedIndex = index;\n }\n\n triggerChange() {\n this.emitSelectedTabChange(this.activeTabIndex);\n }\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<mat-tab-group\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n animationDuration=\"0ms\"\n [disableRipple]=\"true\"\n (selectedIndexChange)=\"emitSelectedTabChange($event)\"\n>\n @for (tab of tabElements(); track tab) {\n <mat-tab [label]=\"tab.label()\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </mat-tab>\n }\n\n @if (actionsTab()) {\n <mat-tab labelClass=\"watt-tabs-action\" [disabled]=\"true\">\n <ng-template mat-tab-label>\n <ng-content />\n </ng-template>\n </mat-tab>\n }\n</mat-tab-group>\n"]}
|
|
@@ -121,8 +121,8 @@ export class WattTextFieldComponent {
|
|
|
121
121
|
setDisabledState(isDisabled) {
|
|
122
122
|
this.isDisabled.set(isDisabled);
|
|
123
123
|
}
|
|
124
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.
|
|
124
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
125
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattTextFieldComponent, isStandalone: true, selector: "watt-text-field", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, prefix: { classPropertyName: "prefix", publicName: "prefix", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, formControl: { classPropertyName: "formControl", publicName: "formControl", isSignal: true, isRequired: true, transformFunction: null }, autocompleteOptions: { classPropertyName: "autocompleteOptions", publicName: "autocompleteOptions", isSignal: true, isRequired: false, transformFunction: null }, autocompleteMatcherFn: { classPropertyName: "autocompleteMatcherFn", publicName: "autocompleteMatcherFn", isSignal: true, isRequired: false, transformFunction: null }, showErrors: { classPropertyName: "showErrors", publicName: "showErrors", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchChanged: "searchChanged", autocompleteOptionSelected: "autocompleteOptionSelected", autocompleteOptionDeselected: "autocompleteOptionDeselected" }, host: { properties: { "attr.watt-field-disabled": "isDisabled()" } }, providers: [
|
|
126
126
|
{
|
|
127
127
|
provide: NG_VALUE_ACCESSOR,
|
|
128
128
|
useExisting: forwardRef(() => WattTextFieldComponent),
|
|
@@ -177,7 +177,7 @@ export class WattTextFieldComponent {
|
|
|
177
177
|
</watt-field>
|
|
178
178
|
`, isInline: true, styles: ["watt-text-field{display:block;width:100%}watt-text-field input{border:none;width:100%;outline:none;background-color:transparent}watt-text-field input::placeholder{color:var(--watt-on-light-low-emphasis)}watt-text-field[size]{width:auto}\n"], dependencies: [{ kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i1.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i1.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i1.MatAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
179
179
|
}
|
|
180
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattTextFieldComponent, decorators: [{
|
|
181
181
|
type: Component,
|
|
182
182
|
args: [{ imports: [MatAutocompleteModule, ReactiveFormsModule, WattFieldComponent, WattIconComponent], selector: 'watt-text-field', encapsulation: ViewEncapsulation.None, host: {
|
|
183
183
|
'[attr.watt-field-disabled]': 'isDisabled()',
|