@energinet/watt 4.3.5 → 4.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/energinet-watt-breadcrumbs.mjs +2 -2
- package/fesm2022/energinet-watt-modal.mjs +2 -2
- package/fesm2022/energinet-watt-modal.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs +4 -3
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-shell.mjs +2 -2
- package/fesm2022/energinet-watt-shell.mjs.map +1 -1
- package/fesm2022/energinet-watt-stepper.mjs +2 -2
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
- package/package.json +1 -1
- package/picker/datepicker/index.d.ts +2 -1
- package/table/index.d.ts +1 -1
|
@@ -65,7 +65,7 @@ class WattBreadcrumbsComponent {
|
|
|
65
65
|
</span>
|
|
66
66
|
}
|
|
67
67
|
</nav>
|
|
68
|
-
`, isInline: true, styles: ["watt-breadcrumbs{display:block;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-breadcrumbs nav,watt-breadcrumbs .watt-breadcrumb{align-items:center;display:flex}watt-breadcrumbs .watt-breadcrumb{cursor:default}watt-breadcrumbs .watt-breadcrumb.interactive{cursor:pointer}watt-breadcrumbs .watt-breadcrumb:not(:last-child){color:var(--watt-color-primary);text-decoration:none}watt-breadcrumbs mat-icon
|
|
68
|
+
`, isInline: true, styles: ["watt-breadcrumbs{display:block;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-breadcrumbs nav,watt-breadcrumbs .watt-breadcrumb{align-items:center;display:flex}watt-breadcrumbs .watt-breadcrumb{cursor:default}watt-breadcrumbs .watt-breadcrumb.interactive{cursor:pointer}watt-breadcrumbs .watt-breadcrumb:not(:last-child){color:var(--watt-color-primary);text-decoration:none}watt-breadcrumbs mat-icon{color:var(--watt-color-neutral-black)}watt-breadcrumbs mat-icon:hover{color:var(--watt-color-primary-dark)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
69
69
|
}
|
|
70
70
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattBreadcrumbsComponent, decorators: [{
|
|
71
71
|
type: Component,
|
|
@@ -85,7 +85,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
85
85
|
</span>
|
|
86
86
|
}
|
|
87
87
|
</nav>
|
|
88
|
-
`, styles: ["watt-breadcrumbs{display:block;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-breadcrumbs nav,watt-breadcrumbs .watt-breadcrumb{align-items:center;display:flex}watt-breadcrumbs .watt-breadcrumb{cursor:default}watt-breadcrumbs .watt-breadcrumb.interactive{cursor:pointer}watt-breadcrumbs .watt-breadcrumb:not(:last-child){color:var(--watt-color-primary);text-decoration:none}watt-breadcrumbs mat-icon
|
|
88
|
+
`, styles: ["watt-breadcrumbs{display:block;font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-breadcrumbs nav,watt-breadcrumbs .watt-breadcrumb{align-items:center;display:flex}watt-breadcrumbs .watt-breadcrumb{cursor:default}watt-breadcrumbs .watt-breadcrumb.interactive{cursor:pointer}watt-breadcrumbs .watt-breadcrumb:not(:last-child){color:var(--watt-color-primary);text-decoration:none}watt-breadcrumbs mat-icon{color:var(--watt-color-neutral-black)}watt-breadcrumbs mat-icon:hover{color:var(--watt-color-primary-dark)}\n"] }]
|
|
89
89
|
}], propDecorators: { breadcrumbs: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WattBreadcrumbComponent), { isSignal: true }] }] } });
|
|
90
90
|
const WATT_BREADCRUMBS = [WattBreadcrumbsComponent, WattBreadcrumbComponent];
|
|
91
91
|
|
|
@@ -170,7 +170,7 @@ class WattModalComponent {
|
|
|
170
170
|
this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);
|
|
171
171
|
}
|
|
172
172
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
173
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattModalComponent, isStandalone: true, selector: "watt-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, hideCloseButton: { classPropertyName: "hideCloseButton", publicName: "hideCloseButton", isSignal: true, isRequired: false, transformFunction: null }, disableEscAndBackdropClose: { classPropertyName: "disableEscAndBackdropClose", publicName: "disableEscAndBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, titleIcon: { classPropertyName: "titleIcon", publicName: "titleIcon", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], 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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media(min-width:600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media(min-width:1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media(min-width:720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media(min-width:786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media(min-width:960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media(min-width:720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: WattResizeObserverDirective, selector: "[wattResizeObserver]", outputs: ["resize"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
173
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattModalComponent, isStandalone: true, selector: "watt-modal", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, loadingMessage: { classPropertyName: "loadingMessage", publicName: "loadingMessage", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, hideCloseButton: { classPropertyName: "hideCloseButton", publicName: "hideCloseButton", isSignal: true, isRequired: false, transformFunction: null }, disableEscAndBackdropClose: { classPropertyName: "disableEscAndBackdropClose", publicName: "disableEscAndBackdropClose", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, panelClass: { classPropertyName: "panelClass", publicName: "panelClass", isSignal: true, isRequired: false, transformFunction: null }, minHeight: { classPropertyName: "minHeight", publicName: "minHeight", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, titleIcon: { classPropertyName: "titleIcon", publicName: "titleIcon", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "modal", first: true, predicate: ["modal"], 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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media (min-width: 600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media (min-width: 1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media (min-width: 786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media (min-width: 960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media (min-width: 720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: WattResizeObserverDirective, selector: "[wattResizeObserver]", outputs: ["resize"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
174
174
|
}
|
|
175
175
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattModalComponent, decorators: [{
|
|
176
176
|
type: Component,
|
|
@@ -180,7 +180,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
180
180
|
WattButtonComponent,
|
|
181
181
|
WattSpinnerComponent,
|
|
182
182
|
WattIconComponent,
|
|
183
|
-
], 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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media(min-width:600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media(min-width:1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media(min-width:720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media(min-width:786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media(min-width:960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media(min-width:720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"] }]
|
|
183
|
+
], 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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n", styles: [":root{--watt-modal-width: 100vw;--watt-modal-min-height: auto;--watt-modal-height: calc(100vh - var(--watt-topbar-height, 0px));--watt-modal-content-padding: 0 var(--watt-space-ml)}.watt-modal{width:var(--watt-modal-width);max-width:100vw;height:var(--watt-modal-height);min-height:var(--watt-modal-min-height);max-height:100vh;position:relative;display:grid;padding:0;align-items:center;grid-template-columns:1fr auto;grid-template-rows:auto 1fr auto;grid-template-areas:\"title close\" \"content content\" \"actions actions\"}.watt-modal--small{--watt-modal-width: 320px;--watt-modal-height: auto}@media (min-width: 600.02px){.watt-modal--small{--watt-modal-width: 520px}}.watt-modal--small .watt-modal-title{color:var(--watt-typography-headline-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none;letter-spacing:0}@media (min-width: 1280px){.watt-modal--small .watt-modal-title{font-size:1.25rem;line-height:1.75rem}}@media (min-width: 720.02px){.watt-modal--medium{--watt-modal-width: 720px;--watt-modal-height: auto}}@media (min-width: 786.02px){.watt-modal--large{--watt-modal-width: 786px;--watt-modal-height: auto}}@media (min-width: 960.02px){.watt-modal--large{--watt-modal-width: 936px;--watt-modal-height: auto}}.watt-modal-panel{margin-top:var(--watt-topbar-height)}.watt-modal-panel .mat-mdc-dialog-container .mdc-dialog__surface{width:auto}.watt-modal-panel .watt-modal-close{grid-area:close;align-self:start;margin:var(--watt-space-s);color:var(--watt-color-primary)}.watt-modal-panel .watt-modal-title{grid-area:title;margin:var(--watt-space-s) var(--watt-space-ml);color:var(--watt-typography-text-color)}.watt-modal-panel .watt-modal-title.watt-modal-title-icon{display:flex;align-items:center;gap:var(--watt-space-s)}.watt-modal-panel .watt-modal-content{align-self:stretch;grid-area:content;overflow:auto;padding:var(--watt-modal-content-padding)}.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{display:block;margin:0 calc(-1 * var(--watt-space-s)) 0 0}@media (min-width: 720.02px){.watt-modal-panel .watt-modal-content .watt-modal-content--full-width{margin:0 calc(-1 * var(--watt-space-ml))}}.watt-modal-panel .watt-modal-scrollable{border:1px solid var(--watt-color-neutral-grey-300);border-left:none;border-right:none}.watt-modal-panel watt-modal-actions{grid-area:actions;display:flex;justify-content:flex-end;padding:var(--watt-space-ml);gap:var(--watt-space-m)}.watt-modal-panel .watt-modal__spinner{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fffc}.watt-modal-panel .watt-modal__spinner div{display:flex;align-items:center;justify-content:center;flex-wrap:wrap}.watt-modal-panel .watt-modal__spinner div p{margin-top:var(--watt-space-m);width:100%}\n"] }]
|
|
184
184
|
}], ctorParameters: () => [], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], loadingMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingMessage", required: false }] }], disableClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableClose", required: false }] }], hideCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideCloseButton", required: false }] }], disableEscAndBackdropClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableEscAndBackdropClose", required: false }] }], closeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeLabel", required: false }] }], panelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelClass", required: false }] }], minHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minHeight", required: false }] }], restoreFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "restoreFocus", required: false }] }], titleIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleIcon", required: false }] }], autoOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoOpen", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], modal: [{ type: i0.ViewChild, args: ['modal', { isSignal: true }] }] } });
|
|
185
185
|
/**
|
|
186
186
|
* Component for projecting buttons (actions) to the bottom of the modal.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-modal.mjs","sources":["../../../libs/watt/package/modal/watt-modal.service.ts","../../../libs/watt/package/modal/watt-modal.component.ts","../../../libs/watt/package/modal/watt-modal.component.html","../../../libs/watt/package/modal/index.ts","../../../libs/watt/package/modal/energinet-watt-modal.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ComponentType } from '@angular/cdk/portal';\nimport { EventEmitter, Injectable, Injector, TemplateRef, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { map, take } from 'rxjs';\n\nexport interface WattModalConfig<T> {\n templateRef?: TemplateRef<unknown>;\n component?: ComponentType<WattTypedModal<T>>;\n data?: T;\n disableClose?: boolean;\n onClosed?: EventEmitter<boolean> | ((result: boolean) => void);\n minHeight?: string;\n panelClass?: string[];\n injector?: Injector;\n restoreFocus?: boolean;\n}\n\nexport abstract class WattTypedModal<T = void> {\n protected modalData: T = inject(MAT_DIALOG_DATA);\n protected dialogRef: MatDialogRef<WattTypedModal<T>> = inject(MatDialogRef);\n}\n\n@Injectable()\nexport class WattModalService {\n private readonly dialog = inject(MatDialog);\n private matDialogRef: MatDialogRef<unknown> | undefined;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open = <T>(config: WattModalConfig<T>) => {\n const template = config.templateRef ?? config.component;\n\n if (!template) return;\n\n this.matDialogRef = this.openModal(template, config);\n\n this.matDialogRef\n .afterClosed()\n .pipe(map(Boolean), take(1))\n .subscribe((result) => {\n if (config?.onClosed instanceof EventEmitter) {\n config?.onClosed.emit(result);\n } else {\n config?.onClosed?.(result);\n }\n });\n\n if (config.minHeight) this.setMinHeight(config.minHeight);\n };\n\n /**\n * Opens the modal using the provided template and configuration.\n */\n private openModal<T>(\n template: TemplateRef<unknown> | ComponentType<WattTypedModal<T>>,\n config: WattModalConfig<T>\n ): MatDialogRef<unknown> {\n return this.dialog.open(template, {\n autoFocus: 'dialog',\n panelClass: [\n 'watt-modal-panel',\n ...(config.component ? ['watt-modal-panel--component'] : []),\n ...(config.panelClass ?? []),\n ],\n disableClose: config.disableClose ?? false,\n data: config.data,\n maxWidth: 'none',\n injector: config.injector,\n restoreFocus: config.restoreFocus === false ? false : true,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.matDialogRef?.close(result);\n }\n\n private setMinHeight(minHeight: string) {\n setTimeout(() => {\n document\n ?.getElementById(this.matDialogRef?.id ?? '')\n ?.querySelector('.watt-modal')\n ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);\n });\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n inject,\n input,\n output,\n viewChild,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattModalService } from './watt-modal.service';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattModalSize = 'small' | 'medium' | 'large';\n\n/**\n * Component for representing a binary decision in the form of\n * a modal window that appears in front of the entire content.\n *\n * Usage:\n * `import { WATT_MODAL } from '@energinet/watt/modal';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-modal',\n styleUrls: ['./watt-modal.component.scss'],\n templateUrl: './watt-modal.component.html',\n imports: [\n NgTemplateOutlet,\n WattResizeObserverDirective,\n WattButtonComponent,\n WattSpinnerComponent,\n WattIconComponent,\n ],\n})\nexport class WattModalComponent {\n private modalService = inject(WattModalService);\n protected dialogRef = inject<MatDialogRef<unknown>>(MatDialogRef, { optional: true });\n\n /** Title to stay fixed to top of modal. */\n title = input('');\n\n size = input<WattModalSize>('medium');\n\n /** Whether the modal should show a loading state. */\n loading = input(false);\n\n /** Whether the modal should show a loading text for the loading state. */\n loadingMessage = input('');\n\n /** Disable ESC, close button and backdrop click as methods of closing. */\n disableClose = input(false);\n\n /** Whether to show the close button */\n hideCloseButton = input(false);\n\n /** Disable ESC, backdrop click as methods of closing. */\n disableEscAndBackdropClose = input(false);\n\n /** The aria-label for the close button. */\n closeLabel = input('Close');\n\n /** Classes added to the modal panel */\n panelClass = input<string[]>([]);\n\n minHeight = input('147px');\n\n /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */\n restoreFocus = input(true);\n\n /** Icon displayed next to the modal title. */\n titleIcon = input<WattIcon | undefined>(undefined);\n\n /** Whether the modal should open automatically when rendered. */\n autoOpen = input(false, { transform: booleanAttribute });\n\n closed = output<boolean>();\n\n modal = viewChild<TemplateRef<Element>>('modal');\n\n scrollable = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.autoOpen()) {\n this.open();\n }\n });\n }\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open() {\n this.modalService.open({\n disableClose: this.disableEscAndBackdropClose() || this.disableClose(),\n templateRef: this.modal(),\n onClosed: (result: boolean) => this.closed.emit(result),\n minHeight: this.minHeight(),\n panelClass: this.panelClass(),\n restoreFocus: this.restoreFocus(),\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.modalService.close(result); // inline modal\n this.dialogRef?.close(result); // injected modal\n }\n\n /**\n * Called when the modal content element changes size.\n * @ignore\n */\n onResize(event: ResizeObserverEntry) {\n this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);\n }\n}\n\n/**\n * Component for projecting buttons (actions) to the bottom of the modal.\n */\n@Component({\n selector: 'watt-modal-actions',\n template: '<ng-content />',\n})\nexport class WattModalActionsComponent {}\n\nexport const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];\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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattModalComponent, WattModalActionsComponent, WATT_MODAL } from './watt-modal.component';\nexport { WattModalService, WattModalConfig, WattTypedModal } from './watt-modal.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAmCsB,cAAc,CAAA;AACxB,IAAA,SAAS,GAAM,MAAM,CAAC,eAAe,CAAC;AACtC,IAAA,SAAS,GAAoC,MAAM,CAAC,YAAY,CAAC;AAC5E;MAGY,gBAAgB,CAAA;AACV,IAAA,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC;AACnC,IAAA,YAAY;AAEpB;;;AAGG;AACH,IAAA,IAAI,GAAG,CAAI,MAA0B,KAAI;QACvC,MAAM,QAAQ,GAAG,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,SAAS;AAEvD,QAAA,IAAI,CAAC,QAAQ;YAAE;QAEf,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC;AAEpD,QAAA,IAAI,CAAC;AACF,aAAA,WAAW;aACX,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1B,aAAA,SAAS,CAAC,CAAC,MAAM,KAAI;AACpB,YAAA,IAAI,MAAM,EAAE,QAAQ,YAAY,YAAY,EAAE;AAC5C,gBAAA,MAAM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A,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,8EAF1B,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAJrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,QAAQ,EAAE,gBAAgB;AAC3B,iBAAA;;MAGY,UAAU,GAAG,CAAC,kBAAkB,EAAE,yBAAyB;;AEjKxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-modal.mjs","sources":["../../../libs/watt/package/modal/watt-modal.service.ts","../../../libs/watt/package/modal/watt-modal.component.ts","../../../libs/watt/package/modal/watt-modal.component.html","../../../libs/watt/package/modal/index.ts","../../../libs/watt/package/modal/energinet-watt-modal.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ComponentType } from '@angular/cdk/portal';\nimport { EventEmitter, Injectable, Injector, TemplateRef, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { map, take } from 'rxjs';\n\nexport interface WattModalConfig<T> {\n templateRef?: TemplateRef<unknown>;\n component?: ComponentType<WattTypedModal<T>>;\n data?: T;\n disableClose?: boolean;\n onClosed?: EventEmitter<boolean> | ((result: boolean) => void);\n minHeight?: string;\n panelClass?: string[];\n injector?: Injector;\n restoreFocus?: boolean;\n}\n\nexport abstract class WattTypedModal<T = void> {\n protected modalData: T = inject(MAT_DIALOG_DATA);\n protected dialogRef: MatDialogRef<WattTypedModal<T>> = inject(MatDialogRef);\n}\n\n@Injectable()\nexport class WattModalService {\n private readonly dialog = inject(MatDialog);\n private matDialogRef: MatDialogRef<unknown> | undefined;\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open = <T>(config: WattModalConfig<T>) => {\n const template = config.templateRef ?? config.component;\n\n if (!template) return;\n\n this.matDialogRef = this.openModal(template, config);\n\n this.matDialogRef\n .afterClosed()\n .pipe(map(Boolean), take(1))\n .subscribe((result) => {\n if (config?.onClosed instanceof EventEmitter) {\n config?.onClosed.emit(result);\n } else {\n config?.onClosed?.(result);\n }\n });\n\n if (config.minHeight) this.setMinHeight(config.minHeight);\n };\n\n /**\n * Opens the modal using the provided template and configuration.\n */\n private openModal<T>(\n template: TemplateRef<unknown> | ComponentType<WattTypedModal<T>>,\n config: WattModalConfig<T>\n ): MatDialogRef<unknown> {\n return this.dialog.open(template, {\n autoFocus: 'dialog',\n panelClass: [\n 'watt-modal-panel',\n ...(config.component ? ['watt-modal-panel--component'] : []),\n ...(config.panelClass ?? []),\n ],\n disableClose: config.disableClose ?? false,\n data: config.data,\n maxWidth: 'none',\n injector: config.injector,\n restoreFocus: config.restoreFocus === false ? false : true,\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.matDialogRef?.close(result);\n }\n\n private setMinHeight(minHeight: string) {\n setTimeout(() => {\n document\n ?.getElementById(this.matDialogRef?.id ?? '')\n ?.querySelector('.watt-modal')\n ?.setAttribute('style', `--watt-modal-min-height: ${minHeight}`);\n });\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n inject,\n input,\n output,\n viewChild,\n signal,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatDialogRef } from '@angular/material/dialog';\n\nimport { WattResizeObserverDirective } from '@energinet/watt/utils/resize-observer';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\nimport { WattModalService } from './watt-modal.service';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport type WattModalSize = 'small' | 'medium' | 'large';\n\n/**\n * Component for representing a binary decision in the form of\n * a modal window that appears in front of the entire content.\n *\n * Usage:\n * `import { WATT_MODAL } from '@energinet/watt/modal';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-modal',\n styleUrls: ['./watt-modal.component.scss'],\n templateUrl: './watt-modal.component.html',\n imports: [\n NgTemplateOutlet,\n WattResizeObserverDirective,\n WattButtonComponent,\n WattSpinnerComponent,\n WattIconComponent,\n ],\n})\nexport class WattModalComponent {\n private modalService = inject(WattModalService);\n protected dialogRef = inject<MatDialogRef<unknown>>(MatDialogRef, { optional: true });\n\n /** Title to stay fixed to top of modal. */\n title = input('');\n\n size = input<WattModalSize>('medium');\n\n /** Whether the modal should show a loading state. */\n loading = input(false);\n\n /** Whether the modal should show a loading text for the loading state. */\n loadingMessage = input('');\n\n /** Disable ESC, close button and backdrop click as methods of closing. */\n disableClose = input(false);\n\n /** Whether to show the close button */\n hideCloseButton = input(false);\n\n /** Disable ESC, backdrop click as methods of closing. */\n disableEscAndBackdropClose = input(false);\n\n /** The aria-label for the close button. */\n closeLabel = input('Close');\n\n /** Classes added to the modal panel */\n panelClass = input<string[]>([]);\n\n minHeight = input('147px');\n\n /** Whether the dialog should restore focus to the previously-focused element, after it's closed. */\n restoreFocus = input(true);\n\n /** Icon displayed next to the modal title. */\n titleIcon = input<WattIcon | undefined>(undefined);\n\n /** Whether the modal should open automatically when rendered. */\n autoOpen = input(false, { transform: booleanAttribute });\n\n closed = output<boolean>();\n\n modal = viewChild<TemplateRef<Element>>('modal');\n\n scrollable = signal(false);\n\n constructor() {\n afterRenderEffect(() => {\n if (this.autoOpen()) {\n this.open();\n }\n });\n }\n\n /**\n * Opens the modal. Subsequent calls are ignored while the modal is opened.\n * @ignore\n */\n open() {\n this.modalService.open({\n disableClose: this.disableEscAndBackdropClose() || this.disableClose(),\n templateRef: this.modal(),\n onClosed: (result: boolean) => this.closed.emit(result),\n minHeight: this.minHeight(),\n panelClass: this.panelClass(),\n restoreFocus: this.restoreFocus(),\n });\n }\n\n /**\n * Closes the modal with `true` for acceptance or `false` for rejection.\n * @ignore\n */\n close(result: boolean) {\n this.modalService.close(result); // inline modal\n this.dialogRef?.close(result); // injected modal\n }\n\n /**\n * Called when the modal content element changes size.\n * @ignore\n */\n onResize(event: ResizeObserverEntry) {\n this.scrollable.set(event.target.scrollHeight > event.target.clientHeight);\n }\n}\n\n/**\n * Component for projecting buttons (actions) to the bottom of the modal.\n */\n@Component({\n selector: 'watt-modal-actions',\n template: '<ng-content />',\n})\nexport class WattModalActionsComponent {}\n\nexport const WATT_MODAL = [WattModalComponent, WattModalActionsComponent];\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<ng-template #modal>\n <div class=\"watt-modal\" [class]=\"'watt-modal--' + size()\">\n @if (!disableClose() && !hideCloseButton()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-modal-close\"\n [attr.aria-label]=\"closeLabel()\"\n (click)=\"close(false)\"\n />\n }\n\n @if (!loading()) {\n <ng-content select=\"h2\">\n @if (title()) {\n <h2 class=\"watt-modal-title\" [class.watt-modal-title-icon]=\"titleIcon()\">\n @if (titleIcon()) {\n <watt-icon [name]=\"titleIcon()\" size=\"l\" />\n }\n {{ title() }}\n </h2>\n }\n </ng-content>\n }\n\n <div\n wattResizeObserver\n class=\"watt-modal-content\"\n [class.watt-modal-scrollable]=\"scrollable()\"\n (resize)=\"onResize($event)\"\n >\n <ng-content />\n </div>\n <ng-content select=\"watt-modal-actions\" />\n\n @if (loading()) {\n <div class=\"watt-modal__spinner\">\n <div>\n <watt-spinner />\n <p>{{ loadingMessage() }}</p>\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n@if (dialogRef) {\n <ng-template [ngTemplateOutlet]=\"modal\" />\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattModalComponent, WattModalActionsComponent, WATT_MODAL } from './watt-modal.component';\nexport { WattModalService, WattModalConfig, WattTypedModal } from './watt-modal.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"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[{ debugName: "rangeMonthOnlyMode" }] : []));
|
|
51
51
|
startAt = input(null, ...(ngDevMode ? [{ debugName: "startAt" }] : []));
|
|
52
52
|
dateClass = input(() => '', ...(ngDevMode ? [{ debugName: "dateClass" }] : []));
|
|
53
|
+
dateFilter = input(...(ngDevMode ? [undefined, { debugName: "dateFilter" }] : []));
|
|
53
54
|
canStepThroughDays = input(false, ...(ngDevMode ? [{ debugName: "canStepThroughDays", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
54
55
|
matEndDate = viewChild(MatEndDate, ...(ngDevMode ? [{ debugName: "matEndDate" }] : []));
|
|
55
56
|
matStartDate = viewChild(MatStartDate, ...(ngDevMode ? [{ debugName: "matStartDate" }] : []));
|
|
@@ -286,7 +287,7 @@ class WattDatepickerComponent extends WattPickerBase {
|
|
|
286
287
|
return maybeDateInDanishTimeZone;
|
|
287
288
|
}
|
|
288
289
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
289
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattDatepickerComponent, isStandalone: true, selector: "watt-datepicker", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, rangeMonthOnlyMode: { classPropertyName: "rangeMonthOnlyMode", publicName: "rangeMonthOnlyMode", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null }, canStepThroughDays: { classPropertyName: "canStepThroughDays", publicName: "canStepThroughDays", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent }], viewQueries: [{ propertyName: "matEndDate", first: true, predicate: MatEndDate, descendants: true, isSignal: true }, { propertyName: "matStartDate", first: true, predicate: MatStartDate, descendants: true, isSignal: true }, { propertyName: "matDateRangeInput", first: true, predicate: MatDateRangeInput, descendants: true, isSignal: true }, { propertyName: "matDatepickerInput", first: true, predicate: MatDatepickerInput, descendants: true, isSignal: true }, { propertyName: "matDateRangePicker", first: true, predicate: MatDateRangePicker, descendants: true, isSignal: true }, { propertyName: "actualInput", first: true, predicate: ["actualInput"], descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["dateInput"], descendants: true, isSignal: true }, { propertyName: "endInput", first: true, predicate: ["endDateInput"], descendants: true, isSignal: true }, { propertyName: "startInput", first: true, predicate: ["startDateInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattPlaceholderMaskComponent, selector: "watt-placeholder-mask", inputs: ["primaryInputElement", "secondaryInputElement", "mask", "placeholder"], outputs: ["maskApplied"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
290
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattDatepickerComponent, isStandalone: true, selector: "watt-datepicker", inputs: { max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, rangeMonthOnlyMode: { classPropertyName: "rangeMonthOnlyMode", publicName: "rangeMonthOnlyMode", isSignal: true, isRequired: false, transformFunction: null }, startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, dateClass: { classPropertyName: "dateClass", publicName: "dateClass", isSignal: true, isRequired: false, transformFunction: null }, dateFilter: { classPropertyName: "dateFilter", publicName: "dateFilter", isSignal: true, isRequired: false, transformFunction: null }, canStepThroughDays: { classPropertyName: "canStepThroughDays", publicName: "canStepThroughDays", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent }], viewQueries: [{ propertyName: "matEndDate", first: true, predicate: MatEndDate, descendants: true, isSignal: true }, { propertyName: "matStartDate", first: true, predicate: MatStartDate, descendants: true, isSignal: true }, { propertyName: "matDateRangeInput", first: true, predicate: MatDateRangeInput, descendants: true, isSignal: true }, { propertyName: "matDatepickerInput", first: true, predicate: MatDatepickerInput, descendants: true, isSignal: true }, { propertyName: "matDateRangePicker", first: true, predicate: MatDateRangePicker, descendants: true, isSignal: true }, { propertyName: "actualInput", first: true, predicate: ["actualInput"], descendants: true, isSignal: true }, { propertyName: "input", first: true, predicate: ["dateInput"], descendants: true, isSignal: true }, { propertyName: "endInput", first: true, predicate: ["endDateInput"], descendants: true, isSignal: true }, { propertyName: "startInput", first: true, predicate: ["startDateInput"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [matDatepicker]=\"singleDatepicker\"\n [matDatepickerFilter]=\"dateFilter()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i2.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i2.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i2.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i2.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i2.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i2.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattPlaceholderMaskComponent, selector: "watt-placeholder-mask", inputs: ["primaryInputElement", "secondaryInputElement", "mask", "placeholder"], outputs: ["maskApplied"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
290
291
|
}
|
|
291
292
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDatepickerComponent, decorators: [{
|
|
292
293
|
type: Component,
|
|
@@ -296,8 +297,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
296
297
|
WattFieldComponent,
|
|
297
298
|
WattButtonComponent,
|
|
298
299
|
WattPlaceholderMaskComponent,
|
|
299
|
-
], 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<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"] }]
|
|
300
|
-
}], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], rangeMonthOnlyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMonthOnlyMode", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], canStepThroughDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "canStepThroughDays", required: false }] }], matEndDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatEndDate), { isSignal: true }] }], matStartDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatStartDate), { isSignal: true }] }], matDateRangeInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangeInput), { isSignal: true }] }], matDatepickerInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDatepickerInput), { isSignal: true }] }], matDateRangePicker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangePicker), { isSignal: true }] }], actualInput: [{ type: i0.ViewChild, args: ['actualInput', { isSignal: true }] }], input: [{ type: i0.ViewChild, args: ['dateInput', { isSignal: true }] }], endInput: [{ type: i0.ViewChild, args: ['endDateInput', { isSignal: true }] }], startInput: [{ type: i0.ViewChild, args: ['startDateInput', { isSignal: true }] }] } });
|
|
300
|
+
], 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<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [matDatepicker]=\"singleDatepicker\"\n [matDatepickerFilter]=\"dateFilter()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n", styles: ["watt-datepicker{display:flex;align-items:center;width:100%}watt-datepicker watt-button[variant=icon]{margin-left:auto}watt-datepicker watt-button[variant=icon] .watt-button--icon{height:42px}watt-datepicker mat-datepicker,watt-datepicker mat-date-range-picker{display:none}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker .mat-date-range-input-mirror,watt-datepicker input.mask-input{font-family:Droid Sans Mono,monospace}watt-datepicker input.mat-date-range-input-inner,watt-datepicker input.mat-mdc-input-element,watt-datepicker input.mask-input{border:none;caret-color:var(--watt-color-neutral-black);letter-spacing:-.03em;-webkit-background-clip:text;-moz-background-clip:text;background-clip:text;color:transparent}watt-datepicker input.mask-input{color:#000}watt-datepicker input.mask-input{position:absolute;min-width:100%;padding:2px 1px}watt-datepicker input.mask-input:focus-visible{outline:none}watt-datepicker .mat-date-range-input-container{align-items:initial}watt-datepicker .mat-date-range-input-start-wrapper,watt-datepicker .mat-date-range-input-end-wrapper{max-width:calc(50% - var(--watt-space-s));overflow:visible;position:relative}watt-datepicker .mat-date-range-input-separator{display:flex;align-items:center}watt-datepicker .mat-date-range-input-separator-hidden,watt-datepicker .mat-date-range-input-separator{opacity:0!important}watt-datepicker .mat-date-range-input-inner::-webkit-input-placeholder{color:var(--watt-color-neutral-grey-500)!important;-webkit-text-fill-color:var(--watt-color-neutral-grey-500)}watt-datepicker watt-button .mat-button{background:transparent}watt-datepicker:has(.watt-datepicker-single__step-through){align-items:flex-start}watt-datepicker:has(.watt-datepicker-single__step-through) .watt-datepicker-single__step-through{display:flex;margin-top:1px}watt-datepicker:has(.watt-datepicker-single__has-label) .watt-datepicker-single__step-through{margin-top:28px}.watt-datepicker-range__panel--month-only .mat-calendar-period-button{pointer-events:none}\n"] }]
|
|
301
|
+
}], ctorParameters: () => [], propDecorators: { max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], rangeMonthOnlyMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangeMonthOnlyMode", required: false }] }], startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], dateClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateClass", required: false }] }], dateFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFilter", required: false }] }], canStepThroughDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "canStepThroughDays", required: false }] }], matEndDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatEndDate), { isSignal: true }] }], matStartDate: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatStartDate), { isSignal: true }] }], matDateRangeInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangeInput), { isSignal: true }] }], matDatepickerInput: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDatepickerInput), { isSignal: true }] }], matDateRangePicker: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatDateRangePicker), { isSignal: true }] }], actualInput: [{ type: i0.ViewChild, args: ['actualInput', { isSignal: true }] }], input: [{ type: i0.ViewChild, args: ['dateInput', { isSignal: true }] }], endInput: [{ type: i0.ViewChild, args: ['endDateInput', { isSignal: true }] }], startInput: [{ type: i0.ViewChild, args: ['startDateInput', { isSignal: true }] }] } });
|
|
301
302
|
|
|
302
303
|
//#region License
|
|
303
304
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-picker-datepicker.mjs","sources":["../../../libs/watt/package/picker/datepicker/watt-datepicker.component.ts","../../../libs/watt/package/picker/datepicker/watt-datepicker.component.html","../../../libs/watt/package/picker/datepicker/watt-datepicker-intl.service.ts","../../../libs/watt/package/picker/datepicker/index.ts","../../../libs/watt/package/picker/datepicker/energinet-watt-picker-datepicker.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n signal,\n effect,\n inject,\n computed,\n Component,\n viewChild,\n ElementRef,\n linkedSignal,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { AbstractControl, NgControl, Validator } from '@angular/forms';\n\nimport {\n MatEndDate,\n MatStartDate,\n MatDateRangeInput,\n MatDateRangePicker,\n MatDatepickerInput,\n MatDatepickerModule,\n MatCalendarCellClassFunction,\n} from '@angular/material/datepicker';\n\nimport { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';\n\nimport {\n dayjs,\n WattRange,\n WattDateRange,\n WattLocaleService,\n WattSupportedLocales,\n} from '@energinet/watt/core/date';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\nimport {\n WattPickerBase,\n WattPickerValue,\n WattPlaceholderMaskComponent,\n} from '@energinet/watt/picker/__shared';\n\nconst dateShortFormat = 'DD-MM-YYYY';\nexport const danishTimeZoneIdentifier = 'Europe/Copenhagen';\n\n/**\n * Usage:\n * `import { WattDatepickerComponent } from '@energinet/watt/datepicker';`\n *\n * IMPORTANT:\n * The styling is calculated based on our monospaced font.\n */\n@Component({\n selector: 'watt-datepicker',\n templateUrl: './watt-datepicker.component.html',\n styleUrls: ['./watt-datepicker.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent }],\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatInputModule,\n MatDatepickerModule,\n\n WattFieldComponent,\n WattButtonComponent,\n WattPlaceholderMaskComponent,\n ],\n})\nexport class WattDatepickerComponent extends WattPickerBase implements Validator, AfterViewInit {\n protected override elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected override changeDetectionRef = inject(ChangeDetectorRef);\n protected override ngControl = inject(NgControl, { optional: true, self: true });\n private localeService = inject(WattLocaleService);\n\n max = input<Date>();\n min = input<Date>();\n label = input<string>('');\n rangeMonthOnlyMode = input(false);\n startAt = input<Date | null>(null);\n dateClass = input<MatCalendarCellClassFunction<Date>>(() => '');\n canStepThroughDays = input(false, { transform: booleanAttribute });\n\n matEndDate = viewChild<MatEndDate<Date | null>>(MatEndDate);\n matStartDate = viewChild<MatStartDate<Date | null>>(MatStartDate);\n matDateRangeInput = viewChild<MatDateRangeInput<Date | null>>(MatDateRangeInput);\n matDatepickerInput = viewChild<MatDatepickerInput<Date | null>>(MatDatepickerInput);\n matDateRangePicker = viewChild<MatDateRangePicker<Date | null>>(MatDateRangePicker);\n\n actualInput = viewChild<ElementRef<HTMLInputElement>>('actualInput');\n override input = viewChild<ElementRef<HTMLInputElement>>('dateInput');\n override endInput = viewChild<ElementRef<HTMLInputElement>>('endDateInput');\n override startInput = viewChild<ElementRef<HTMLInputElement>>('startDateInput');\n\n rangeSeparator = ' - ';\n\n rangePlaceholder = signal('');\n\n inputMask = computed(() =>\n maskitoDateOptionsGenerator({\n mode: 'dd/mm/yyyy',\n separator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n rangeInputMask = computed(() =>\n maskitoDateRangeOptionsGenerator({\n mode: 'dd/mm/yyyy',\n dateSeparator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n getPlaceholderByLocale = (locale: WattSupportedLocales) =>\n locale === 'da' ? 'dd-mm-åååå' : 'dd-mm-yyyy';\n\n getRangePlaceholder(): string {\n return this.placeholder() + this.rangeSeparator + this.placeholder();\n }\n\n isPrevDayButtonDisabled = linkedSignal(() => this.isPrevDayBeforeOrEqualToMinDate());\n isNextDayButtonDisabled = linkedSignal(() => this.isNextDayAfterOrEqualToMaxDate());\n\n constructor() {\n super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);\n\n effect(() => {\n const locale = this.localeService.locale();\n this.placeholder.set(this.getPlaceholderByLocale(locale));\n this.rangePlaceholder.set(this.getRangePlaceholder());\n });\n\n effect(() => {\n this.rangeMonthOnlyMode();\n this.ngControl?.control?.updateValueAndValidity();\n });\n }\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.ngControl?.control?.addValidators(this.validate);\n }\n\n validate = ({ value }: AbstractControl<WattRange<string>>) => {\n if (!value?.end || !value?.start) return null;\n if (!this.rangeMonthOnlyMode()) return null;\n const start = dayjs(value.start);\n const end = dayjs(value.end);\n return start.isSame(start.startOf('month')) && end.isSame(start.endOf('month'))\n ? null\n : { monthOnly: true };\n };\n\n protected initSingleInput() {\n const matDatepickerInput = this.matDatepickerInput();\n if (this.initialValue && matDatepickerInput) {\n matDatepickerInput.value = this.initialValue;\n this.datepickerClosed();\n }\n }\n\n inputChanged(value: string) {\n const dateString = value.slice(0, this.placeholder().length);\n\n if (dateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (dateString.length !== this.placeholder().length) {\n return;\n }\n\n const date = this.parseDateShortFormat(dateString);\n this.control?.setValue(this.formatDateFromViewToModel(date));\n }\n\n datepickerClosed() {\n const matDatepickerInput = this.matDatepickerInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDatepickerInput && matDatepickerInput.value) {\n this.control?.setValue(matDatepickerInput.value);\n\n actualInput.nativeElement.value = this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDatepickerInput.value)\n );\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n this.isPrevDayButtonDisabled.set(this.isPrevDayBeforeOrEqualToMinDate());\n this.isNextDayButtonDisabled.set(this.isNextDayAfterOrEqualToMaxDate());\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n onMonthSelected(date: Date) {\n const matDateRangePicker = this.matDateRangePicker();\n if (matDateRangePicker && this.rangeMonthOnlyMode() && date) {\n matDateRangePicker.select(dayjs(date).startOf('month').toDate());\n matDateRangePicker.select(dayjs(date).endOf('month').toDate());\n matDateRangePicker.close();\n }\n }\n\n protected initRangeInput() {\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (this.initialValue && matStartDate && matEndDate) {\n matStartDate.value = (this.initialValue as WattDateRange).start;\n matEndDate.value = (this.initialValue as WattDateRange).end;\n this.rangePickerClosed();\n }\n }\n\n clearRangePicker() {\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n this.control?.setValue(null);\n actualInput.nativeElement.value = '';\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n rangeInputChanged(value: string) {\n const startDateString = value.slice(0, this.placeholder().length);\n\n if (startDateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (startDateString.length !== this.placeholder().length) {\n return;\n }\n\n const start = this.parseDateShortFormat(startDateString);\n const endDateString = value.slice(this.placeholder().length + this.rangeSeparator.length);\n let end = this.setEndDateToDanishTimeZone(endDateString);\n\n if (end !== null) {\n end = this.setToEndOfDay(end);\n this.control?.setValue({ start, end });\n }\n }\n\n rangePickerClosed() {\n const matDateRangeInput = this.matDateRangeInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDateRangeInput?.value?.start && matDateRangeInput?.value?.end) {\n actualInput.nativeElement.value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value?.start)\n ) +\n '-' +\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value.end)\n );\n\n this.control?.setValue({\n start: this.formatDateFromViewToModel(matDateRangeInput.value.start),\n end: this.formatDateFromViewToModel(matDateRangeInput.value.end),\n });\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n protected setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ) {\n const matDatepickerInput = this.matDatepickerInput();\n if (matDatepickerInput) {\n this.setValueToInput(value, input, matDatepickerInput);\n }\n }\n\n protected setRangeValue(\n value: WattDateRange | null,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ) {\n const { start, end } = value ?? {};\n\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (!matStartDate || !matEndDate) return;\n\n this.setValueToInput(start, startInput, matStartDate);\n this.setValueToInput(end, endInput, matEndDate);\n }\n\n prevDay() {\n this.changeDay(-1);\n }\n\n nextDay() {\n this.changeDay(1);\n }\n\n private changeDay(value: number) {\n const currentDate = this.matDatepickerInput()?.value;\n\n if (currentDate) {\n const newDate = dayjs(currentDate).add(value, 'day').toISOString();\n const newDateFormatted = this.formatDateTimeFromModelToView(newDate);\n\n this.inputChanged(newDateFormatted);\n this.datepickerClosed();\n }\n }\n\n private isPrevDayBeforeOrEqualToMinDate() {\n const min = this.min();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!min || !selectedDate) return false;\n\n const isBefore = dayjs(selectedDate).isBefore(min, 'day');\n const isSame = dayjs(selectedDate).isSame(min, 'day');\n\n return isSame || isBefore;\n }\n\n private isNextDayAfterOrEqualToMaxDate() {\n const max = this.max();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!max || !selectedDate) return false;\n\n const isAfter = dayjs(selectedDate).isAfter(max, 'day');\n const isSame = dayjs(selectedDate).isSame(max, 'day');\n\n return isSame || isAfter;\n }\n\n private parseDateShortFormat(value: string): Date {\n return dayjs(value, dateShortFormat).toDate();\n }\n\n private setValueToInput<D extends { value: Date | null }>(\n value: string | null | undefined,\n nativeInput: HTMLInputElement,\n matDateInput: D\n ): void {\n nativeInput.value = value ? this.formatDateTimeFromModelToView(value) : '';\n matDateInput.value = value ? dayjs(value).utc().toDate() : null;\n }\n\n /**\n * @ignore\n * Formats Date to full ISO 8601 format (e.g. `2022-08-31T22:00:00.000Z`)\n */\n private formatDateFromViewToModel(value: Date): string {\n return dayjs(value).utc().toISOString();\n }\n\n private formatDateTimeFromModelToView(value: string): string {\n return dayjs(value).tz(danishTimeZoneIdentifier).format(dateShortFormat);\n }\n\n private toDanishTimeZone(value: Date): Date {\n return dayjs(value.toISOString()).tz(danishTimeZoneIdentifier).toDate();\n }\n\n private setToEndOfDay(value: Date): Date {\n return dayjs(value).endOf('day').toDate();\n }\n\n private setEndDateToDanishTimeZone(value: string): Date | null {\n const dateBasedOnShortFormat = this.parseDateShortFormat(value);\n\n let maybeDateInDanishTimeZone: Date | null = null;\n\n if (dayjs(dateBasedOnShortFormat).isValid()) {\n maybeDateInDanishTimeZone = this.toDanishTimeZone(dateBasedOnShortFormat);\n }\n\n return maybeDateInDanishTimeZone;\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<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [matDatepicker]=\"singleDatepicker\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDatepickerIntlService {\n clear = 'Clear';\n select = 'OK';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDatepickerComponent } from './watt-datepicker.component';\nexport { danishTimeZoneIdentifier } from './watt-datepicker.component';\nexport { WattDatepickerIntlService } from './watt-datepicker-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAkDA,MAAM,eAAe,GAAG,YAAY;AAC7B,MAAM,wBAAwB,GAAG;AAExC;;;;;;AAMG;AAgBG,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AACtC,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AACxE,IAAA,aAAa,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAEjD,GAAG,GAAG,KAAK,CAA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AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;4FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-picker-datepicker.mjs","sources":["../../../libs/watt/package/picker/datepicker/watt-datepicker.component.ts","../../../libs/watt/package/picker/datepicker/watt-datepicker.component.html","../../../libs/watt/package/picker/datepicker/watt-datepicker-intl.service.ts","../../../libs/watt/package/picker/datepicker/index.ts","../../../libs/watt/package/picker/datepicker/energinet-watt-picker-datepicker.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n signal,\n effect,\n inject,\n computed,\n Component,\n viewChild,\n ElementRef,\n linkedSignal,\n AfterViewInit,\n booleanAttribute,\n ChangeDetectorRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { AbstractControl, NgControl, Validator } from '@angular/forms';\n\nimport {\n MatEndDate,\n MatStartDate,\n MatDateRangeInput,\n MatDateRangePicker,\n MatDatepickerInput,\n MatDatepickerModule,\n MatCalendarCellClassFunction,\n} from '@angular/material/datepicker';\n\nimport { maskitoDateOptionsGenerator, maskitoDateRangeOptionsGenerator } from '@maskito/kit';\n\nimport {\n dayjs,\n WattRange,\n WattDateRange,\n WattLocaleService,\n WattSupportedLocales,\n} from '@energinet/watt/core/date';\n\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\nimport {\n WattPickerBase,\n WattPickerValue,\n WattPlaceholderMaskComponent,\n} from '@energinet/watt/picker/__shared';\n\nconst dateShortFormat = 'DD-MM-YYYY';\nexport const danishTimeZoneIdentifier = 'Europe/Copenhagen';\n\n/**\n * Usage:\n * `import { WattDatepickerComponent } from '@energinet/watt/datepicker';`\n *\n * IMPORTANT:\n * The styling is calculated based on our monospaced font.\n */\n@Component({\n selector: 'watt-datepicker',\n templateUrl: './watt-datepicker.component.html',\n styleUrls: ['./watt-datepicker.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: WattDatepickerComponent }],\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatInputModule,\n MatDatepickerModule,\n\n WattFieldComponent,\n WattButtonComponent,\n WattPlaceholderMaskComponent,\n ],\n})\nexport class WattDatepickerComponent extends WattPickerBase implements Validator, AfterViewInit {\n protected override elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n protected override changeDetectionRef = inject(ChangeDetectorRef);\n protected override ngControl = inject(NgControl, { optional: true, self: true });\n private localeService = inject(WattLocaleService);\n\n max = input<Date>();\n min = input<Date>();\n label = input<string>('');\n rangeMonthOnlyMode = input(false);\n startAt = input<Date | null>(null);\n dateClass = input<MatCalendarCellClassFunction<Date>>(() => '');\n dateFilter = input<((date: Date | null) => boolean) | undefined>();\n canStepThroughDays = input(false, { transform: booleanAttribute });\n\n matEndDate = viewChild<MatEndDate<Date | null>>(MatEndDate);\n matStartDate = viewChild<MatStartDate<Date | null>>(MatStartDate);\n matDateRangeInput = viewChild<MatDateRangeInput<Date | null>>(MatDateRangeInput);\n matDatepickerInput = viewChild<MatDatepickerInput<Date | null>>(MatDatepickerInput);\n matDateRangePicker = viewChild<MatDateRangePicker<Date | null>>(MatDateRangePicker);\n\n actualInput = viewChild<ElementRef<HTMLInputElement>>('actualInput');\n override input = viewChild<ElementRef<HTMLInputElement>>('dateInput');\n override endInput = viewChild<ElementRef<HTMLInputElement>>('endDateInput');\n override startInput = viewChild<ElementRef<HTMLInputElement>>('startDateInput');\n\n rangeSeparator = ' - ';\n\n rangePlaceholder = signal('');\n\n inputMask = computed(() =>\n maskitoDateOptionsGenerator({\n mode: 'dd/mm/yyyy',\n separator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n rangeInputMask = computed(() =>\n maskitoDateRangeOptionsGenerator({\n mode: 'dd/mm/yyyy',\n dateSeparator: '-',\n max: this.max(),\n min: this.min(),\n })\n );\n\n getPlaceholderByLocale = (locale: WattSupportedLocales) =>\n locale === 'da' ? 'dd-mm-åååå' : 'dd-mm-yyyy';\n\n getRangePlaceholder(): string {\n return this.placeholder() + this.rangeSeparator + this.placeholder();\n }\n\n isPrevDayButtonDisabled = linkedSignal(() => this.isPrevDayBeforeOrEqualToMinDate());\n isNextDayButtonDisabled = linkedSignal(() => this.isNextDayAfterOrEqualToMaxDate());\n\n constructor() {\n super(`watt-datepicker-${WattDatepickerComponent.nextId++}`);\n\n effect(() => {\n const locale = this.localeService.locale();\n this.placeholder.set(this.getPlaceholderByLocale(locale));\n this.rangePlaceholder.set(this.getRangePlaceholder());\n });\n\n effect(() => {\n this.rangeMonthOnlyMode();\n this.ngControl?.control?.updateValueAndValidity();\n });\n }\n\n override ngAfterViewInit(): void {\n super.ngAfterViewInit();\n this.ngControl?.control?.addValidators(this.validate);\n }\n\n validate = ({ value }: AbstractControl<WattRange<string>>) => {\n if (!value?.end || !value?.start) return null;\n if (!this.rangeMonthOnlyMode()) return null;\n const start = dayjs(value.start);\n const end = dayjs(value.end);\n return start.isSame(start.startOf('month')) && end.isSame(start.endOf('month'))\n ? null\n : { monthOnly: true };\n };\n\n protected initSingleInput() {\n const matDatepickerInput = this.matDatepickerInput();\n if (this.initialValue && matDatepickerInput) {\n matDatepickerInput.value = this.initialValue;\n this.datepickerClosed();\n }\n }\n\n inputChanged(value: string) {\n const dateString = value.slice(0, this.placeholder().length);\n\n if (dateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (dateString.length !== this.placeholder().length) {\n return;\n }\n\n const date = this.parseDateShortFormat(dateString);\n this.control?.setValue(this.formatDateFromViewToModel(date));\n }\n\n datepickerClosed() {\n const matDatepickerInput = this.matDatepickerInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDatepickerInput && matDatepickerInput.value) {\n this.control?.setValue(matDatepickerInput.value);\n\n actualInput.nativeElement.value = this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDatepickerInput.value)\n );\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n this.isPrevDayButtonDisabled.set(this.isPrevDayBeforeOrEqualToMinDate());\n this.isNextDayButtonDisabled.set(this.isNextDayAfterOrEqualToMaxDate());\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n onMonthSelected(date: Date) {\n const matDateRangePicker = this.matDateRangePicker();\n if (matDateRangePicker && this.rangeMonthOnlyMode() && date) {\n matDateRangePicker.select(dayjs(date).startOf('month').toDate());\n matDateRangePicker.select(dayjs(date).endOf('month').toDate());\n matDateRangePicker.close();\n }\n }\n\n protected initRangeInput() {\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (this.initialValue && matStartDate && matEndDate) {\n matStartDate.value = (this.initialValue as WattDateRange).start;\n matEndDate.value = (this.initialValue as WattDateRange).end;\n this.rangePickerClosed();\n }\n }\n\n clearRangePicker() {\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n this.control?.setValue(null);\n actualInput.nativeElement.value = '';\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n rangeInputChanged(value: string) {\n const startDateString = value.slice(0, this.placeholder().length);\n\n if (startDateString.length === 0) {\n this.control?.setValue(null);\n return;\n }\n\n if (startDateString.length !== this.placeholder().length) {\n return;\n }\n\n const start = this.parseDateShortFormat(startDateString);\n const endDateString = value.slice(this.placeholder().length + this.rangeSeparator.length);\n let end = this.setEndDateToDanishTimeZone(endDateString);\n\n if (end !== null) {\n end = this.setToEndOfDay(end);\n this.control?.setValue({ start, end });\n }\n }\n\n rangePickerClosed() {\n const matDateRangeInput = this.matDateRangeInput();\n const actualInput = this.actualInput();\n\n if (!actualInput) return;\n\n if (matDateRangeInput?.value?.start && matDateRangeInput?.value?.end) {\n actualInput.nativeElement.value =\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value?.start)\n ) +\n '-' +\n this.formatDateTimeFromModelToView(\n this.formatDateFromViewToModel(matDateRangeInput.value.end)\n );\n\n this.control?.setValue({\n start: this.formatDateFromViewToModel(matDateRangeInput.value.start),\n end: this.formatDateFromViewToModel(matDateRangeInput.value.end),\n });\n } else {\n actualInput.nativeElement.value = '';\n this.control?.setValue(null);\n }\n\n actualInput.nativeElement.dispatchEvent(new InputEvent('input'));\n }\n\n protected setSingleValue(\n value: Exclude<WattPickerValue, WattDateRange>,\n input: HTMLInputElement\n ) {\n const matDatepickerInput = this.matDatepickerInput();\n if (matDatepickerInput) {\n this.setValueToInput(value, input, matDatepickerInput);\n }\n }\n\n protected setRangeValue(\n value: WattDateRange | null,\n startInput: HTMLInputElement,\n endInput: HTMLInputElement\n ) {\n const { start, end } = value ?? {};\n\n const matStartDate = this.matStartDate();\n const matEndDate = this.matEndDate();\n\n if (!matStartDate || !matEndDate) return;\n\n this.setValueToInput(start, startInput, matStartDate);\n this.setValueToInput(end, endInput, matEndDate);\n }\n\n prevDay() {\n this.changeDay(-1);\n }\n\n nextDay() {\n this.changeDay(1);\n }\n\n private changeDay(value: number) {\n const currentDate = this.matDatepickerInput()?.value;\n\n if (currentDate) {\n const newDate = dayjs(currentDate).add(value, 'day').toISOString();\n const newDateFormatted = this.formatDateTimeFromModelToView(newDate);\n\n this.inputChanged(newDateFormatted);\n this.datepickerClosed();\n }\n }\n\n private isPrevDayBeforeOrEqualToMinDate() {\n const min = this.min();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!min || !selectedDate) return false;\n\n const isBefore = dayjs(selectedDate).isBefore(min, 'day');\n const isSame = dayjs(selectedDate).isSame(min, 'day');\n\n return isSame || isBefore;\n }\n\n private isNextDayAfterOrEqualToMaxDate() {\n const max = this.max();\n const selectedDate = this.matDatepickerInput()?.value;\n\n if (!max || !selectedDate) return false;\n\n const isAfter = dayjs(selectedDate).isAfter(max, 'day');\n const isSame = dayjs(selectedDate).isSame(max, 'day');\n\n return isSame || isAfter;\n }\n\n private parseDateShortFormat(value: string): Date {\n return dayjs(value, dateShortFormat).toDate();\n }\n\n private setValueToInput<D extends { value: Date | null }>(\n value: string | null | undefined,\n nativeInput: HTMLInputElement,\n matDateInput: D\n ): void {\n nativeInput.value = value ? this.formatDateTimeFromModelToView(value) : '';\n matDateInput.value = value ? dayjs(value).utc().toDate() : null;\n }\n\n /**\n * @ignore\n * Formats Date to full ISO 8601 format (e.g. `2022-08-31T22:00:00.000Z`)\n */\n private formatDateFromViewToModel(value: Date): string {\n return dayjs(value).utc().toISOString();\n }\n\n private formatDateTimeFromModelToView(value: string): string {\n return dayjs(value).tz(danishTimeZoneIdentifier).format(dateShortFormat);\n }\n\n private toDanishTimeZone(value: Date): Date {\n return dayjs(value.toISOString()).tz(danishTimeZoneIdentifier).toDate();\n }\n\n private setToEndOfDay(value: Date): Date {\n return dayjs(value).endOf('day').toDate();\n }\n\n private setEndDateToDanishTimeZone(value: string): Date | null {\n const dateBasedOnShortFormat = this.parseDateShortFormat(value);\n\n let maybeDateInDanishTimeZone: Date | null = null;\n\n if (dayjs(dateBasedOnShortFormat).isValid()) {\n maybeDateInDanishTimeZone = this.toDanishTimeZone(dateBasedOnShortFormat);\n }\n\n return maybeDateInDanishTimeZone;\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<watt-field [control]=\"control\" [label]=\"label()\">\n @if (range()) {\n <mat-date-range-input\n [disabled]=\"disabled()\"\n [rangePicker]=\"rangeDatepicker\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n >\n <input\n inert\n aria-label=\"start-date-input\"\n matStartDate\n #startDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n\n <input\n inert\n aria-label=\"end-date-input\"\n matEndDate\n #endDateInput\n [readOnly]=\"rangeMonthOnlyMode()\"\n autocomplete=\"off\"\n spellcheck=\"false\"\n [hidden]=\"true\"\n />\n </mat-date-range-input>\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"rangeInputMask()\"\n [placeholder]=\"rangePlaceholder()\"\n (maskApplied)=\"rangeInputChanged($event)\"\n />\n\n <watt-button\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n [attr.aria-pressed]=\"false\"\n (click)=\"rangeDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-date-range-picker\n [panelClass]=\"rangeMonthOnlyMode() ? 'watt-datepicker-range__panel--month-only' : ''\"\n [startView]=\"rangeMonthOnlyMode() ? 'multi-year' : 'month'\"\n [startAt]=\"startAt()\"\n (monthSelected)=\"onMonthSelected($event)\"\n (closed)=\"rangePickerClosed()\"\n #rangeDatepicker\n />\n } @else {\n <input\n inert\n matInput\n tabindex=\"-1\"\n aria-label=\"date-input\"\n #dateInput\n autocomplete=\"off\"\n spellcheck=\"false\"\n [disabled]=\"disabled()\"\n [min]=\"min() ?? null\"\n [max]=\"max() ?? null\"\n [matDatepicker]=\"singleDatepicker\"\n [matDatepickerFilter]=\"dateFilter()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n <input #actualInput class=\"mask-input\" [disabled]=\"disabled()\" />\n <watt-placeholder-mask\n [primaryInputElement]=\"actualInput\"\n [mask]=\"inputMask()\"\n [placeholder]=\"placeholder()\"\n (maskApplied)=\"inputChanged($event)\"\n />\n\n <watt-button\n wattSuffix\n variant=\"icon\"\n icon=\"date\"\n [disabled]=\"disabled()\"\n (click)=\"singleDatepicker.open()\"\n (focusin)=\"onFocusIn()\"\n (focusout)=\"onFocusOut($event)\"\n />\n\n <mat-datepicker\n #singleDatepicker\n panelClass=\"watt-datepicker-single__panel\"\n [dateClass]=\"dateClass()\"\n [startAt]=\"startAt()\"\n (closed)=\"datepickerClosed()\"\n />\n }\n\n <ng-content />\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n <ng-content ngProjectAs=\"watt-field-warning\" select=\"watt-field-warning\" />\n</watt-field>\n\n@if (!range() && canStepThroughDays()) {\n <span\n class=\"watt-datepicker-single__step-through\"\n [class.watt-datepicker-single__has-label]=\"!!label()\"\n >\n <watt-button\n variant=\"icon\"\n icon=\"left\"\n (click)=\"prevDay()\"\n [disabled]=\"disabled() || isPrevDayButtonDisabled()\"\n />\n <watt-button\n variant=\"icon\"\n icon=\"right\"\n (click)=\"nextDay()\"\n [disabled]=\"disabled() || isNextDayButtonDisabled()\"\n />\n </span>\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDatepickerIntlService {\n clear = 'Clear';\n select = 'OK';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDatepickerComponent } from './watt-datepicker.component';\nexport { danishTimeZoneIdentifier } from './watt-datepicker.component';\nexport { WattDatepickerIntlService } from './watt-datepicker-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAkDA,MAAM,eAAe,GAAG,YAAY;AAC7B,MAAM,wBAAwB,GAAG;AAExC;;;;;;AAMG;AAgBG,MAAO,uBAAwB,SAAQ,cAAc,CAAA;AACtC,IAAA,UAAU,GAAG,MAAM,CAA0B,UAAU,CAAC;AACxD,IAAA,kBAAkB,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC9C,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE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AA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACV,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CACR,cAAc,oEACZ,gBAAgB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpHhF;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAIa,yBAAyB,CAAA;IACpC,KAAK,GAAG,OAAO;IACf,MAAM,GAAG,IAAI;wGAFF,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yBAAyB,cADZ,MAAM,EAAA,CAAA;;4FACnB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -54,11 +54,11 @@ class WattShellComponent {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattShellComponent, isStandalone: true, selector: "watt-shell", viewQueries: [{ propertyName: "sidenav", first: true, predicate: ["drawer"], 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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:block}.watt-sidenav-container{height:100vh}.watt-sidenav-close-button{position:absolute;top:10px;right:0}.mat-drawer{overflow-y:visible}.watt-sidenav{width:245px;background-color:var(--watt-sidenav-background-color)}@media(max-width:1279.98px){.watt-sidenav{width:289px}}.watt-sidenav.mat-drawer-over.mat-drawer-opened .watt-sidenav-close-button{opacity:1}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button{opacity:0;transition:opacity 50ms linear}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button ::ng-deep .mat-mdc-button.mat-icon{color:var(--watt-color-neutral-white)}.watt-sidenav-content{display:grid;grid-template-rows:auto minmax(30rem,1fr)}.watt-main-content{position:relative;height:100%}.watt-toolbar{position:sticky;top:0;background-color:var(--watt-color-neutral-white);border-bottom:1px solid var(--watt-color-neutral-grey-300);height:var(--watt-space-xl);z-index:2}.watt-main-content,.watt-toolbar{width:100vw}@media(min-width:1280px){.watt-main-content,.watt-toolbar{width:calc(100vw - 245px)}}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }] });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattShellComponent, isStandalone: true, selector: "watt-shell", viewQueries: [{ propertyName: "sidenav", first: true, predicate: ["drawer"], 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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:block}.watt-sidenav-container{height:100vh}.watt-sidenav-close-button{position:absolute;top:10px;right:0}.mat-drawer{overflow-y:visible}.watt-sidenav{width:245px;background-color:var(--watt-sidenav-background-color)}@media (max-width: 1279.98px){.watt-sidenav{width:289px}}.watt-sidenav.mat-drawer-over.mat-drawer-opened .watt-sidenav-close-button{opacity:1}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button{opacity:0;transition:opacity 50ms linear}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button ::ng-deep .mat-mdc-button.mat-icon{color:var(--watt-color-neutral-white)}.watt-sidenav-content{display:grid;grid-template-rows:auto minmax(30rem,1fr)}.watt-main-content{position:relative;height:100%}.watt-toolbar{position:sticky;top:0;background-color:var(--watt-color-neutral-white);border-bottom:1px solid var(--watt-color-neutral-grey-300);height:var(--watt-space-xl);z-index:2}.watt-main-content,.watt-toolbar{width:100vw}@media (min-width: 1280px){.watt-main-content,.watt-toolbar{width:calc(100vw - 245px)}}\n"], dependencies: [{ kind: "ngmodule", type: MatSidenavModule }, { kind: "component", type: i1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i2.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }] });
|
|
58
58
|
}
|
|
59
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattShellComponent, decorators: [{
|
|
60
60
|
type: Component,
|
|
61
|
-
args: [{ selector: 'watt-shell', imports: [MatSidenavModule, MatToolbarModule, WattButtonComponent], 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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:block}.watt-sidenav-container{height:100vh}.watt-sidenav-close-button{position:absolute;top:10px;right:0}.mat-drawer{overflow-y:visible}.watt-sidenav{width:245px;background-color:var(--watt-sidenav-background-color)}@media(max-width:1279.98px){.watt-sidenav{width:289px}}.watt-sidenav.mat-drawer-over.mat-drawer-opened .watt-sidenav-close-button{opacity:1}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button{opacity:0;transition:opacity 50ms linear}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button ::ng-deep .mat-mdc-button.mat-icon{color:var(--watt-color-neutral-white)}.watt-sidenav-content{display:grid;grid-template-rows:auto minmax(30rem,1fr)}.watt-main-content{position:relative;height:100%}.watt-toolbar{position:sticky;top:0;background-color:var(--watt-color-neutral-white);border-bottom:1px solid var(--watt-color-neutral-grey-300);height:var(--watt-space-xl);z-index:2}.watt-main-content,.watt-toolbar{width:100vw}@media(min-width:1280px){.watt-main-content,.watt-toolbar{width:calc(100vw - 245px)}}\n"] }]
|
|
61
|
+
args: [{ selector: 'watt-shell', imports: [MatSidenavModule, MatToolbarModule, WattButtonComponent], 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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n", styles: [":host{display:block}.watt-sidenav-container{height:100vh}.watt-sidenav-close-button{position:absolute;top:10px;right:0}.mat-drawer{overflow-y:visible}.watt-sidenav{width:245px;background-color:var(--watt-sidenav-background-color)}@media (max-width: 1279.98px){.watt-sidenav{width:289px}}.watt-sidenav.mat-drawer-over.mat-drawer-opened .watt-sidenav-close-button{opacity:1}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button{opacity:0;transition:opacity 50ms linear}.watt-sidenav.mat-drawer-over .watt-sidenav-close-button ::ng-deep .mat-mdc-button.mat-icon{color:var(--watt-color-neutral-white)}.watt-sidenav-content{display:grid;grid-template-rows:auto minmax(30rem,1fr)}.watt-main-content{position:relative;height:100%}.watt-toolbar{position:sticky;top:0;background-color:var(--watt-color-neutral-white);border-bottom:1px solid var(--watt-color-neutral-grey-300);height:var(--watt-space-xl);z-index:2}.watt-main-content,.watt-toolbar{width:100vw}@media (min-width: 1280px){.watt-main-content,.watt-toolbar{width:calc(100vw - 245px)}}\n"] }]
|
|
62
62
|
}], ctorParameters: () => [], propDecorators: { sidenav: [{ type: i0.ViewChild, args: ['drawer', { isSignal: true }] }] } });
|
|
63
63
|
|
|
64
64
|
//#region License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-shell.mjs","sources":["../../../libs/watt/package/shell/shell.component.ts","../../../libs/watt/package/shell/shell.component.html","../../../libs/watt/package/shell/nav-list/watt-expand-on-active-link.directive.ts","../../../libs/watt/package/shell/nav-list/watt-nav-list-item.component.ts","../../../libs/watt/package/shell/nav-list/watt-nav-list.component.ts","../../../libs/watt/package/shell/nav-list/index.ts","../../../libs/watt/package/shell/index.ts","../../../libs/watt/package/shell/energinet-watt-shell.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Component, inject, viewChild } from '@angular/core';\n\nimport { filter, map } from 'rxjs';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\n\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattBreakpointsObserver } from '@energinet/watt/core/breakpoints';\n\n@Component({\n selector: 'watt-shell',\n styleUrls: ['./shell.component.scss'],\n templateUrl: './shell.component.html',\n imports: [MatSidenavModule, MatToolbarModule, WattButtonComponent],\n})\nexport class WattShellComponent {\n private breakpointObserver = inject(WattBreakpointsObserver);\n private router = inject(Router);\n private readonly sidenav = viewChild.required<MatSidenav>('drawer');\n\n /**\n * @ignore\n */\n private onNavigationEnd$ = this.router.events.pipe(\n filter((event) => event instanceof NavigationEnd)\n );\n\n /**\n * @ignore\n */\n isHandset = toSignal(\n this.breakpointObserver\n .observe(['XSmall', 'Small', 'Medium'])\n .pipe(map((result) => result.matches))\n );\n\n constructor() {\n this.onNavigationEnd$.pipe(takeUntilDestroyed()).subscribe(() => {\n const sidenav = this.sidenav();\n if (this.isHandset() && sidenav.opened) {\n sidenav.close();\n }\n });\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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, inject, input, effect, OutputRefSubscription } from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\n\nimport { type WattNavListItemComponent } from './watt-nav-list-item.component';\n\n@Directive({\n selector: '[wattExpandOnActiveLink]',\n exportAs: 'wattExpandOnActiveLink',\n})\nexport class WattExpandOnActiveLinkDirective {\n private panel = inject(MatExpansionPanel);\n\n private navListItemsEffect = effect((cleanupFn) => {\n const subs: OutputRefSubscription[] = [];\n\n cleanupFn(() => subs.forEach((sub) => sub.unsubscribe()));\n\n const navListItems = this.wattNavListItemComponents();\n\n if (navListItems.length > 0) {\n subs.push(\n ...navListItems.map((item) =>\n item.isActive.subscribe((isActive) => {\n if (isActive) {\n this.panel.open();\n }\n })\n )\n );\n }\n });\n\n wattNavListItemComponents = input<readonly WattNavListItemComponent[]>([]);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\n@Component({\n selector: 'watt-nav-list-item',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, RouterLink, RouterLinkActive],\n template: `\n @if (isExternalLink()) {\n <a [href]=\"link()\" [attr.target]=\"target()\"\n ><ng-container *ngTemplateOutlet=\"templateContent\"\n /></a>\n } @else {\n <a\n [routerLink]=\"link()\"\n routerLinkActive=\"active\"\n (isActiveChange)=\"onRouterLinkActive($event)\"\n ><ng-container *ngTemplateOutlet=\"templateContent\"\n /></a>\n }\n\n <ng-template #templateContent>\n <ng-content />\n </ng-template>\n `,\n})\nexport class WattNavListItemComponent {\n link = input.required<string>();\n target = input<'_self' | '_blank' | '_parent' | '_top'>('_self');\n isActive = output<boolean>();\n\n /**\n * @ignore\n */\n isExternalLink = computed(() => /^(http:\\/\\/|https:\\/\\/)/i.test(this.link()));\n\n /**\n * @ignore\n */\n onRouterLinkActive(isActive: boolean) {\n this.isActive.emit(isActive);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n contentChildren,\n input,\n} from '@angular/core';\nimport { MatExpansionModule } from '@angular/material/expansion';\n\nimport { WattExpandOnActiveLinkDirective } from './watt-expand-on-active-link.directive';\nimport { WattNavListItemComponent } from './watt-nav-list-item.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-nav-list',\n styleUrl: './watt-nav-list.component.scss',\n host: {\n '[class.watt-nav-list--expandable]': 'expandable()',\n },\n template: `\n @if (expandable()) {\n <mat-expansion-panel\n wattExpandOnActiveLink\n [wattNavListItemComponents]=\"navListItemComponents()\"\n class=\"mat-elevation-z0\"\n >\n <mat-expansion-panel-header>\n <mat-panel-title class=\"watt-text-m\">{{ title() }}</mat-panel-title>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"navListTemplate\" />\n </mat-expansion-panel>\n } @else {\n <ng-container *ngTemplateOutlet=\"navListTemplate\" />\n }\n\n <ng-template #navListTemplate>\n <ng-content />\n </ng-template>\n `,\n imports: [NgTemplateOutlet, MatExpansionModule, WattExpandOnActiveLinkDirective],\n})\nexport class WattNavListComponent {\n /**\n * @ignore\n */\n navListItemComponents = contentChildren(WattNavListItemComponent);\n\n expandable = input(false);\n title = input('');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattNavListComponent } from './watt-nav-list.component';\nexport { WattNavListItemComponent } from './watt-nav-list-item.component';\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattShellComponent } from './shell.component';\nexport * from './nav-list';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,kBAAkB,CAAA;AACrB,IAAA,kBAAkB,GAAG,MAAM,CAAC,uBAAuB,CAAC;AACpD,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACd,IAAA,OAAO,GAAG,SAAS,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mjs","sources":["../../../libs/watt/package/shell/shell.component.ts","../../../libs/watt/package/shell/shell.component.html","../../../libs/watt/package/shell/nav-list/watt-expand-on-active-link.directive.ts","../../../libs/watt/package/shell/nav-list/watt-nav-list-item.component.ts","../../../libs/watt/package/shell/nav-list/watt-nav-list.component.ts","../../../libs/watt/package/shell/nav-list/index.ts","../../../libs/watt/package/shell/index.ts","../../../libs/watt/package/shell/energinet-watt-shell.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Router, NavigationEnd } from '@angular/router';\nimport { Component, inject, viewChild } from '@angular/core';\n\nimport { filter, map } from 'rxjs';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { MatSidenav, MatSidenavModule } from '@angular/material/sidenav';\n\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattBreakpointsObserver } from '@energinet/watt/core/breakpoints';\n\n@Component({\n selector: 'watt-shell',\n styleUrls: ['./shell.component.scss'],\n templateUrl: './shell.component.html',\n imports: [MatSidenavModule, MatToolbarModule, WattButtonComponent],\n})\nexport class WattShellComponent {\n private breakpointObserver = inject(WattBreakpointsObserver);\n private router = inject(Router);\n private readonly sidenav = viewChild.required<MatSidenav>('drawer');\n\n /**\n * @ignore\n */\n private onNavigationEnd$ = this.router.events.pipe(\n filter((event) => event instanceof NavigationEnd)\n );\n\n /**\n * @ignore\n */\n isHandset = toSignal(\n this.breakpointObserver\n .observe(['XSmall', 'Small', 'Medium'])\n .pipe(map((result) => result.matches))\n );\n\n constructor() {\n this.onNavigationEnd$.pipe(takeUntilDestroyed()).subscribe(() => {\n const sidenav = this.sidenav();\n if (this.isHandset() && sidenav.opened) {\n sidenav.close();\n }\n });\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-sidenav-container class=\"watt-sidenav-container\">\n <mat-sidenav\n #drawer\n class=\"watt-sidenav\"\n [disableClose]=\"isHandset() === false\"\n [mode]=\"isHandset() ? 'over' : 'side'\"\n [opened]=\"isHandset() === false\"\n role=\"navigation\"\n >\n @if (isHandset()) {\n <watt-button\n variant=\"icon\"\n icon=\"close\"\n class=\"watt-sidenav-close-button\"\n (click)=\"drawer.toggle()\"\n />\n }\n <ng-content select=\"[watt-shell-sidenav]\" />\n </mat-sidenav>\n\n <mat-sidenav-content class=\"watt-sidenav-content\">\n <mat-toolbar class=\"watt-toolbar\">\n @if (isHandset()) {\n <watt-button variant=\"icon\" icon=\"menu\" (click)=\"drawer.toggle()\" />\n }\n\n <ng-content select=\"[watt-shell-toolbar]\" />\n </mat-toolbar>\n\n <main class=\"watt-main-content\">\n <ng-content />\n </main>\n </mat-sidenav-content>\n</mat-sidenav-container>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, inject, input, effect, OutputRefSubscription } from '@angular/core';\nimport { MatExpansionPanel } from '@angular/material/expansion';\n\nimport { type WattNavListItemComponent } from './watt-nav-list-item.component';\n\n@Directive({\n selector: '[wattExpandOnActiveLink]',\n exportAs: 'wattExpandOnActiveLink',\n})\nexport class WattExpandOnActiveLinkDirective {\n private panel = inject(MatExpansionPanel);\n\n private navListItemsEffect = effect((cleanupFn) => {\n const subs: OutputRefSubscription[] = [];\n\n cleanupFn(() => subs.forEach((sub) => sub.unsubscribe()));\n\n const navListItems = this.wattNavListItemComponents();\n\n if (navListItems.length > 0) {\n subs.push(\n ...navListItems.map((item) =>\n item.isActive.subscribe((isActive) => {\n if (isActive) {\n this.panel.open();\n }\n })\n )\n );\n }\n });\n\n wattNavListItemComponents = input<readonly WattNavListItemComponent[]>([]);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\n\n@Component({\n selector: 'watt-nav-list-item',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, RouterLink, RouterLinkActive],\n template: `\n @if (isExternalLink()) {\n <a [href]=\"link()\" [attr.target]=\"target()\"\n ><ng-container *ngTemplateOutlet=\"templateContent\"\n /></a>\n } @else {\n <a\n [routerLink]=\"link()\"\n routerLinkActive=\"active\"\n (isActiveChange)=\"onRouterLinkActive($event)\"\n ><ng-container *ngTemplateOutlet=\"templateContent\"\n /></a>\n }\n\n <ng-template #templateContent>\n <ng-content />\n </ng-template>\n `,\n})\nexport class WattNavListItemComponent {\n link = input.required<string>();\n target = input<'_self' | '_blank' | '_parent' | '_top'>('_self');\n isActive = output<boolean>();\n\n /**\n * @ignore\n */\n isExternalLink = computed(() => /^(http:\\/\\/|https:\\/\\/)/i.test(this.link()));\n\n /**\n * @ignore\n */\n onRouterLinkActive(isActive: boolean) {\n this.isActive.emit(isActive);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n contentChildren,\n input,\n} from '@angular/core';\nimport { MatExpansionModule } from '@angular/material/expansion';\n\nimport { WattExpandOnActiveLinkDirective } from './watt-expand-on-active-link.directive';\nimport { WattNavListItemComponent } from './watt-nav-list-item.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-nav-list',\n styleUrl: './watt-nav-list.component.scss',\n host: {\n '[class.watt-nav-list--expandable]': 'expandable()',\n },\n template: `\n @if (expandable()) {\n <mat-expansion-panel\n wattExpandOnActiveLink\n [wattNavListItemComponents]=\"navListItemComponents()\"\n class=\"mat-elevation-z0\"\n >\n <mat-expansion-panel-header>\n <mat-panel-title class=\"watt-text-m\">{{ title() }}</mat-panel-title>\n </mat-expansion-panel-header>\n <ng-container *ngTemplateOutlet=\"navListTemplate\" />\n </mat-expansion-panel>\n } @else {\n <ng-container *ngTemplateOutlet=\"navListTemplate\" />\n }\n\n <ng-template #navListTemplate>\n <ng-content />\n </ng-template>\n `,\n imports: [NgTemplateOutlet, MatExpansionModule, WattExpandOnActiveLinkDirective],\n})\nexport class WattNavListComponent {\n /**\n * @ignore\n */\n navListItemComponents = contentChildren(WattNavListItemComponent);\n\n expandable = input(false);\n title = input('');\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattNavListComponent } from './watt-nav-list.component';\nexport { WattNavListItemComponent } from './watt-nav-list-item.component';\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattShellComponent } from './shell.component';\nexport * from './nav-list';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,kBAAkB,CAAA;AACrB,IAAA,kBAAkB,GAAG,MAAM,CAAC,uBAAuB,CAAC;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;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -114,7 +114,7 @@ class WattStepperComponent extends MatStepper {
|
|
|
114
114
|
},
|
|
115
115
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
116
116
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
117
|
-
], queries: [{ propertyName: "wattSteps", predicate: WattStepperStepComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "stepper", first: true, predicate: MatStepper, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:var(--watt-color-neutral-white);color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media(max-width:719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i1.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
117
|
+
], queries: [{ propertyName: "wattSteps", predicate: WattStepperStepComponent, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "stepper", first: true, predicate: MatStepper, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:var(--watt-color-neutral-white);color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media (max-width: 719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "directive", type: i1.MatStepperIcon, selector: "ng-template[matStepperIcon]", inputs: ["matStepperIcon"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
118
118
|
}
|
|
119
119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattStepperComponent, decorators: [{
|
|
120
120
|
type: Component,
|
|
@@ -125,7 +125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
125
125
|
},
|
|
126
126
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
127
127
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
128
|
-
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:var(--watt-color-neutral-white);color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media(max-width:719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"] }]
|
|
128
|
+
], template: "<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n", styles: [".watt-stepper .mat-horizontal-stepper-header-container{padding-bottom:var(--watt-space-ml)}.watt-stepper .mat-step-label.mat-step-label-selected{color:var(--watt-color-primary)}.watt-stepper .mat-form-field-suffix{padding-right:var(--watt-space-s);color:var(--watt-color-neutral-grey-600)}.watt-stepper .mat-step-label{color:var(--watt-typography-label-color);font-size:1rem;line-height:1.5rem;font-weight:600;text-transform:none}.watt-stepper .mat-step-header .mat-step-icon-selected{border:solid 1px var(--watt-color-primary);background-color:var(--watt-color-neutral-white);color:var(--watt-color-primary)}.watt-stepper .mat-stepper-horizontal-line{margin:0 5px}.watt-stepper .watt-stepper-button-wrapper{display:flex;justify-content:flex-end;gap:var(--watt-space-m);width:100%;padding-top:var(--watt-space-ml)}.watt-stepper .mat-step-icon-state-error{color:var(--watt-color-state-danger);border:solid 1px var(--watt-color-state-danger)}@media (max-width: 719.98px){.watt-stepper .mat-horizontal-stepper-header{padding:0}.watt-stepper .mat-step-label:not(.mat-step-label-selected){display:none}.watt-stepper .mat-horizontal-content-container{padding:0 0 24px}}.watt-modal--medium watt-stepper,.watt-modal--medium .watt-stepper,.watt-modal--large watt-stepper,.watt-modal--large .watt-stepper{height:100%}.watt-modal--medium .mat-horizontal-stepper-content,.watt-modal--large .mat-horizontal-stepper-content{display:grid;align-items:center;grid-template-rows:1fr auto;grid-template-areas:\"content\" \"actions\"}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-content-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-content-wrapper{align-self:stretch;grid-area:content;overflow:auto}.watt-modal--medium .mat-horizontal-stepper-content .watt-stepper-button-wrapper,.watt-modal--large .mat-horizontal-stepper-content .watt-stepper-button-wrapper{grid-area:actions}\n"] }]
|
|
129
129
|
}], ctorParameters: () => [], propDecorators: { stepper: [{ type: i0.ViewChild, args: [i0.forwardRef(() => MatStepper), { isSignal: true }] }], completed: [{ type: i0.Output, args: ["completed"] }], isCompleting: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCompleting", required: false }] }], wattSteps: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => WattStepperStepComponent), { ...{ descendants: true }, isSignal: true }] }] } });
|
|
130
130
|
const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];
|
|
131
131
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-stepper.mjs","sources":["../../../libs/watt/package/stepper/watt-stepper-step.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.html","../../../libs/watt/package/stepper/index.ts","../../../libs/watt/package/stepper/energinet-watt-stepper.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, input, output, TemplateRef, viewChild } from '@angular/core';\nimport { MatStep } from '@angular/material/stepper';\nimport { CdkStep } from '@angular/cdk/stepper';\n\nexport { CdkStep as WattStep };\n\n@Component({\n selector: 'watt-stepper-step',\n template: ` <ng-template #templateRef>\n <ng-content />\n </ng-template>`,\n})\nexport class WattStepperStepComponent extends MatStep {\n public readonly templateRef = viewChild<TemplateRef<unknown>>('templateRef');\n\n nextButtonLabel = input<string>();\n disableNextButton = input<boolean>(false);\n loadingNextButton = input<boolean>(false);\n previousButtonLabel = input<string>();\n enabled = input<boolean>(true);\n disablePreviousButton = input<boolean>(false);\n\n entering = output<CdkStep>();\n leaving = output<CdkStep>();\n next = output<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n computed,\n contentChildren,\n effect,\n input,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { CdkStepper, STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { filter, switchMap } from 'rxjs';\n\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\nimport { WattStepperStepComponent } from './watt-stepper-step.component';\n\n@Component({\n selector: 'watt-stepper',\n templateUrl: './watt-stepper.component.html',\n styleUrls: ['./watt-stepper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, MatStepperModule, WattIconComponent, WattButtonComponent],\n providers: [\n {\n provide: STEPPER_GLOBAL_OPTIONS,\n useValue: { showError: true, displayDefaultIndicatorType: false },\n },\n { provide: CdkStepper, useExisting: WattStepperComponent },\n { provide: MatStepper, useExisting: WattStepperComponent },\n ],\n})\nexport class WattStepperComponent extends MatStepper {\n stepper = viewChild.required(MatStepper);\n private stepperSelectionChange = toSignal(\n toObservable(this.stepper).pipe(\n filter(Boolean),\n switchMap((stepper) => stepper.selectionChange)\n )\n );\n\n completed = output<void>();\n isCompleting = input(false);\n wattSteps = contentChildren(WattStepperStepComponent, { descendants: true });\n onFirstStep = computed(() => (this.stepperSelectionChange()?.selectedIndex ?? 0) === 0);\n onLastStep = computed(\n () =>\n (this.stepperSelectionChange()?.selectedIndex ?? 0) ===\n this.wattSteps()?.filter((x) => x.enabled()).length - 1\n );\n\n constructor() {\n super();\n\n effect(() => {\n const change = this.stepperSelectionChange();\n if (change) {\n this.wattSteps()[change.selectedIndex]?.entering.emit(change.selectedStep);\n this.wattSteps()[change.previouslySelectedIndex]?.leaving.emit(\n change.previouslySelectedStep\n );\n }\n });\n }\n\n override reset() {\n this.stepper().reset();\n }\n\n nextStep(step: WattStepperStepComponent): void {\n step.next.emit();\n this.stepper().selected?.stepControl?.markAllAsTouched();\n this.stepper().next();\n }\n\n previousStep(): void {\n this.stepper().previous();\n }\n\n complete(): void {\n this.stepper().selected?.stepControl?.markAllAsTouched();\n this.completed.emit();\n }\n}\n\nexport const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WATT_STEPPER, WattStepperComponent } from './watt-stepper.component';\nexport { WattStepperStepComponent, WattStep } from './watt-stepper-step.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAaM,MAAO,wBAAyB,SAAQ,OAAO,CAAA;AACnC,IAAA,WAAW,GAAG,SAAS,CAAuB,aAAa,uDAAC;IAE5E,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA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EAAE,KAAK,EAAE;AAClE,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC1D,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC3D,qBAAA,EAAA,QAAA,EAAA,00FAAA,EAAA,MAAA,EAAA,CAAA,q3DAAA,CAAA,EAAA;AAG4B,SAAA,CAAA,EAAA,cAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,UAAU,6PAUX,wBAAwB,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;MA0ChE,YAAY,GAAG,CAAC,oBAAoB,EAAE,wBAAwB;;AE3G3E;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-stepper.mjs","sources":["../../../libs/watt/package/stepper/watt-stepper-step.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.ts","../../../libs/watt/package/stepper/watt-stepper.component.html","../../../libs/watt/package/stepper/index.ts","../../../libs/watt/package/stepper/energinet-watt-stepper.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, input, output, TemplateRef, viewChild } from '@angular/core';\nimport { MatStep } from '@angular/material/stepper';\nimport { CdkStep } from '@angular/cdk/stepper';\n\nexport { CdkStep as WattStep };\n\n@Component({\n selector: 'watt-stepper-step',\n template: ` <ng-template #templateRef>\n <ng-content />\n </ng-template>`,\n})\nexport class WattStepperStepComponent extends MatStep {\n public readonly templateRef = viewChild<TemplateRef<unknown>>('templateRef');\n\n nextButtonLabel = input<string>();\n disableNextButton = input<boolean>(false);\n loadingNextButton = input<boolean>(false);\n previousButtonLabel = input<string>();\n enabled = input<boolean>(true);\n disablePreviousButton = input<boolean>(false);\n\n entering = output<CdkStep>();\n leaving = output<CdkStep>();\n next = output<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n computed,\n contentChildren,\n effect,\n input,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { CdkStepper, STEPPER_GLOBAL_OPTIONS } from '@angular/cdk/stepper';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { filter, switchMap } from 'rxjs';\n\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\nimport { WattStepperStepComponent } from './watt-stepper-step.component';\n\n@Component({\n selector: 'watt-stepper',\n templateUrl: './watt-stepper.component.html',\n styleUrls: ['./watt-stepper.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, MatStepperModule, WattIconComponent, WattButtonComponent],\n providers: [\n {\n provide: STEPPER_GLOBAL_OPTIONS,\n useValue: { showError: true, displayDefaultIndicatorType: false },\n },\n { provide: CdkStepper, useExisting: WattStepperComponent },\n { provide: MatStepper, useExisting: WattStepperComponent },\n ],\n})\nexport class WattStepperComponent extends MatStepper {\n stepper = viewChild.required(MatStepper);\n private stepperSelectionChange = toSignal(\n toObservable(this.stepper).pipe(\n filter(Boolean),\n switchMap((stepper) => stepper.selectionChange)\n )\n );\n\n completed = output<void>();\n isCompleting = input(false);\n wattSteps = contentChildren(WattStepperStepComponent, { descendants: true });\n onFirstStep = computed(() => (this.stepperSelectionChange()?.selectedIndex ?? 0) === 0);\n onLastStep = computed(\n () =>\n (this.stepperSelectionChange()?.selectedIndex ?? 0) ===\n this.wattSteps()?.filter((x) => x.enabled()).length - 1\n );\n\n constructor() {\n super();\n\n effect(() => {\n const change = this.stepperSelectionChange();\n if (change) {\n this.wattSteps()[change.selectedIndex]?.entering.emit(change.selectedStep);\n this.wattSteps()[change.previouslySelectedIndex]?.leaving.emit(\n change.previouslySelectedStep\n );\n }\n });\n }\n\n override reset() {\n this.stepper().reset();\n }\n\n nextStep(step: WattStepperStepComponent): void {\n step.next.emit();\n this.stepper().selected?.stepControl?.markAllAsTouched();\n this.stepper().next();\n }\n\n previousStep(): void {\n this.stepper().previous();\n }\n\n complete(): void {\n this.stepper().selected?.stepControl?.markAllAsTouched();\n this.completed.emit();\n }\n}\n\nexport const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of wattSteps(); track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!onFirstStep()) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!onLastStep()) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep()) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting()\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WATT_STEPPER, WattStepperComponent } from './watt-stepper.component';\nexport { WattStepperStepComponent, WattStep } from './watt-stepper-step.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAaM,MAAO,wBAAyB,SAAQ,OAAO,CAAA;AACnC,IAAA,WAAW,GAAG,SAAS,CAAuB,aAAa,uDAAC;IAE5E,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACjC,IAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK,6DAAC;AACzC,IAAA,iBAAiB,GAAG,KAAK,CAAU,KAAK,6DAAC;IACzC,mBAAmB,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,qBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;AACrC,IAAA,OAAO,GAAG,KAAK,CAAU,IAAI,mDAAC;AAC9B,IAAA,qBAAqB,GAAG,KAAK,CAAU,KAAK,iEAAC;IAE7C,QAAQ,GAAG,MAAM,EAAW;IAC5B,OAAO,GAAG,MAAM,EAAW;IAC3B,IAAI,GAAG,MAAM,EAAQ;wGAZV,wBAAwB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,U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EG;;;;"}
|
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ declare class WattDatepickerComponent extends WattPickerBase implements Validato
|
|
|
25
25
|
rangeMonthOnlyMode: _angular_core.InputSignal<boolean>;
|
|
26
26
|
startAt: _angular_core.InputSignal<Date | null>;
|
|
27
27
|
dateClass: _angular_core.InputSignal<MatCalendarCellClassFunction<Date>>;
|
|
28
|
+
dateFilter: _angular_core.InputSignal<((date: Date | null) => boolean) | undefined>;
|
|
28
29
|
canStepThroughDays: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
29
30
|
matEndDate: _angular_core.Signal<MatEndDate<Date | null> | undefined>;
|
|
30
31
|
matStartDate: _angular_core.Signal<MatStartDate<Date | null> | undefined>;
|
|
@@ -75,7 +76,7 @@ declare class WattDatepickerComponent extends WattPickerBase implements Validato
|
|
|
75
76
|
private setToEndOfDay;
|
|
76
77
|
private setEndDateToDanishTimeZone;
|
|
77
78
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WattDatepickerComponent, never>;
|
|
78
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattDatepickerComponent, "watt-datepicker", never, { "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "rangeMonthOnlyMode": { "alias": "rangeMonthOnlyMode"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "canStepThroughDays": { "alias": "canStepThroughDays"; "required": false; "isSignal": true; }; }, {}, never, ["*", "watt-field-hint", "watt-field-error", "watt-field-warning"], true, never>;
|
|
79
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattDatepickerComponent, "watt-datepicker", never, { "max": { "alias": "max"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "rangeMonthOnlyMode": { "alias": "rangeMonthOnlyMode"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "canStepThroughDays": { "alias": "canStepThroughDays"; "required": false; "isSignal": true; }; }, {}, never, ["*", "watt-field-hint", "watt-field-error", "watt-field-warning"], true, never>;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
declare class WattDatepickerIntlService {
|
package/table/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { MatPaginator } from '@angular/material/paginator';
|
|
|
3
3
|
import { MatSort, SortDirection, Sort } from '@angular/material/sort';
|
|
4
4
|
import { MatTableDataSource } from '@angular/material/table';
|
|
5
5
|
import * as _angular_core from '@angular/core';
|
|
6
|
-
import { Signal, TrackByFunction,
|
|
6
|
+
import { TemplateRef, Signal, TrackByFunction, ElementRef } from '@angular/core';
|
|
7
7
|
import { KeyValue } from '@angular/common';
|
|
8
8
|
import { Subject } from 'rxjs';
|
|
9
9
|
|