@energinet/watt 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,6 +99,7 @@ class WattSegmentedButtonsComponent {
|
|
|
99
99
|
@for (segmentedButton of segmentedButtonElements(); track segmentedButton) {
|
|
100
100
|
<mat-button-toggle
|
|
101
101
|
[routerLink]="segmentedButton.link()"
|
|
102
|
+
queryParamsHandling="merge"
|
|
102
103
|
routerLinkActive="mat-button-toggle-checked"
|
|
103
104
|
[disableRipple]="true"
|
|
104
105
|
[value]="segmentedButton.value()"
|
|
@@ -133,6 +134,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
133
134
|
@for (segmentedButton of segmentedButtonElements(); track segmentedButton) {
|
|
134
135
|
<mat-button-toggle
|
|
135
136
|
[routerLink]="segmentedButton.link()"
|
|
137
|
+
queryParamsHandling="merge"
|
|
136
138
|
routerLinkActive="mat-button-toggle-checked"
|
|
137
139
|
[disableRipple]="true"
|
|
138
140
|
[value]="segmentedButton.value()"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-segmented-buttons.mjs","sources":["../../../libs/watt/package/segmented-buttons/watt-segmented-button.component.ts","../../../libs/watt/package/segmented-buttons/watt-segmented-buttons.component.ts","../../../libs/watt/package/segmented-buttons/index.ts","../../../libs/watt/package/segmented-buttons/energinet-watt-segmented-buttons.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, TemplateRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'watt-segmented-button',\n template: ` <ng-template>\n <ng-content />\n </ng-template>`,\n})\nexport class WattSegmentedButtonComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n value = input<string>();\n link = input<string>();\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 { RouterLinkWithHref, RouterLinkActive } from '@angular/router';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n model,\n signal,\n inject,\n Component,\n ElementRef,\n forwardRef,\n contentChildren,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\n\n/**\n * Segmented buttons.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatButtonToggleModule,\n FormsModule,\n NgTemplateOutlet,\n RouterLinkWithHref,\n RouterLinkActive,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattSegmentedButtonsComponent),\n multi: true,\n },\n ],\n selector: 'watt-segmented-buttons',\n styles: `\n @use '@energinet/watt/utils' as watt;\n @use '@angular/material' as mat;\n\n :root {\n @include mat.button-toggle-overrides(\n (\n selected-state-text-color: white,\n selected-state-background-color: var(--watt-color-primary),\n height: 2.5rem,\n )\n );\n\n mat-button-toggle-group {\n border-color: var(--watt-color-neutral-grey-700);\n\n mat-button-toggle {\n border-color: var(--watt-color-neutral-grey-700) !important;\n\n button {\n min-width: 6.5rem;\n\n span {\n font-size: 0.875rem;\n font-weight: 600;\n }\n }\n }\n }\n }\n `,\n template: `\n <mat-button-toggle-group\n [(ngModel)]=\"selected\"\n [multiple]=\"false\"\n [hideSingleSelectionIndicator]=\"true\"\n [disabled]=\"disabled()\"\n >\n @for (segmentedButton of segmentedButtonElements(); track segmentedButton) {\n <mat-button-toggle\n [routerLink]=\"segmentedButton.link()\"\n routerLinkActive=\"mat-button-toggle-checked\"\n [disableRipple]=\"true\"\n [value]=\"segmentedButton.value()\"\n >\n <ng-container *ngTemplateOutlet=\"segmentedButton.templateRef()\" />\n </mat-button-toggle>\n }\n </mat-button-toggle-group>\n `,\n})\nexport class WattSegmentedButtonsComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n segmentedButtonElements = contentChildren(WattSegmentedButtonComponent);\n selected = model<string>('');\n disabled = signal(false);\n\n writeValue(selected: string): void {\n this.selected.set(selected);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.selected.subscribe(fn);\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { WattSegmentedButtonsComponent } from './watt-segmented-buttons.component';\nimport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\n\nexport { WattSegmentedButtonsComponent } from './watt-segmented-buttons.component';\nexport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\nexport const WATT_SEGMENTED_BUTTONS = [\n WattSegmentedButtonsComponent,\n WattSegmentedButtonComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MASa,4BAA4B,CAAA;AACvC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC;IACnE,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACvB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHX,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,aAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EACgB,WAAW,EAAA,WAAA,EAAA,IA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AO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC5D,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EACS,wBAAwB,EAAA,QAAA,EAgCxB;;;;;;;;;;;;;;;;;;AAkBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,skBAAA,CAAA,EAAA;+GAIyC,4BAA4B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC9GxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAMO,MAAM,sBAAsB,GAAG;IACpC,6BAA6B;IAC7B,4BAA4B;;;ACzB9B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-segmented-buttons.mjs","sources":["../../../libs/watt/package/segmented-buttons/watt-segmented-button.component.ts","../../../libs/watt/package/segmented-buttons/watt-segmented-buttons.component.ts","../../../libs/watt/package/segmented-buttons/index.ts","../../../libs/watt/package/segmented-buttons/energinet-watt-segmented-buttons.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, TemplateRef, viewChild } from '@angular/core';\n\n@Component({\n selector: 'watt-segmented-button',\n template: ` <ng-template>\n <ng-content />\n </ng-template>`,\n})\nexport class WattSegmentedButtonComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n value = input<string>();\n link = input<string>();\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 { RouterLinkWithHref, RouterLinkActive } from '@angular/router';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport {\n model,\n signal,\n inject,\n Component,\n ElementRef,\n forwardRef,\n contentChildren,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\n\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\n\n/**\n * Segmented buttons.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatButtonToggleModule,\n FormsModule,\n NgTemplateOutlet,\n RouterLinkWithHref,\n RouterLinkActive,\n ],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattSegmentedButtonsComponent),\n multi: true,\n },\n ],\n selector: 'watt-segmented-buttons',\n styles: `\n @use '@energinet/watt/utils' as watt;\n @use '@angular/material' as mat;\n\n :root {\n @include mat.button-toggle-overrides(\n (\n selected-state-text-color: white,\n selected-state-background-color: var(--watt-color-primary),\n height: 2.5rem,\n )\n );\n\n mat-button-toggle-group {\n border-color: var(--watt-color-neutral-grey-700);\n\n mat-button-toggle {\n border-color: var(--watt-color-neutral-grey-700) !important;\n\n button {\n min-width: 6.5rem;\n\n span {\n font-size: 0.875rem;\n font-weight: 600;\n }\n }\n }\n }\n }\n `,\n template: `\n <mat-button-toggle-group\n [(ngModel)]=\"selected\"\n [multiple]=\"false\"\n [hideSingleSelectionIndicator]=\"true\"\n [disabled]=\"disabled()\"\n >\n @for (segmentedButton of segmentedButtonElements(); track segmentedButton) {\n <mat-button-toggle\n [routerLink]=\"segmentedButton.link()\"\n queryParamsHandling=\"merge\"\n routerLinkActive=\"mat-button-toggle-checked\"\n [disableRipple]=\"true\"\n [value]=\"segmentedButton.value()\"\n >\n <ng-container *ngTemplateOutlet=\"segmentedButton.templateRef()\" />\n </mat-button-toggle>\n }\n </mat-button-toggle-group>\n `,\n})\nexport class WattSegmentedButtonsComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n segmentedButtonElements = contentChildren(WattSegmentedButtonComponent);\n selected = model<string>('');\n disabled = signal(false);\n\n writeValue(selected: string): void {\n this.selected.set(selected);\n }\n\n registerOnChange(fn: (value: string) => void): void {\n this.selected.subscribe(fn);\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { WattSegmentedButtonsComponent } from './watt-segmented-buttons.component';\nimport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\n\nexport { WattSegmentedButtonsComponent } from './watt-segmented-buttons.component';\nexport { WattSegmentedButtonComponent } from './watt-segmented-button.component';\nexport const WATT_SEGMENTED_BUTTONS = [\n WattSegmentedButtonsComponent,\n WattSegmentedButtonComponent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MASa,4BAA4B,CAAA;AACvC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC;IACnE,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACvB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;wGAHX,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,aAAA,EAAA,KAAA,EAAA,IA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qBACjB,EAAA,SAAA,EACU;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,mCAAmC,CAAC;AAC5D,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EACS,wBAAwB,EAAA,QAAA,EAgCxB;;;;;;;;;;;;;;;;;;;AAmBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,skBAAA,CAAA,EAAA;+GAIyC,4BAA4B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,UAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/GxE;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAMO,MAAM,sBAAsB,GAAG;IACpC,6BAA6B;IAC7B,4BAA4B;;;ACzB9B;;AAEG;;;;"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { viewChild, input, output, Component,
|
|
3
|
-
import {
|
|
2
|
+
import { viewChild, input, output, Component, contentChildren, computed, effect, ViewEncapsulation } from '@angular/core';
|
|
3
|
+
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { NgTemplateOutlet } from '@angular/common';
|
|
5
5
|
import { STEPPER_GLOBAL_OPTIONS, CdkStepper } from '@angular/cdk/stepper';
|
|
6
6
|
export { CdkStep as WattStep } from '@angular/cdk/stepper';
|
|
7
7
|
import * as i1 from '@angular/material/stepper';
|
|
8
8
|
import { MatStep, MatStepper, MatStepperModule } from '@angular/material/stepper';
|
|
9
|
-
import {
|
|
10
|
-
import { from, withLatestFrom, of, map, startWith } from 'rxjs';
|
|
9
|
+
import { filter, switchMap } from 'rxjs';
|
|
11
10
|
import { WattButtonComponent } from '@energinet/watt/button';
|
|
12
11
|
import { WattIconComponent } from '@energinet/watt/icon';
|
|
13
12
|
|
|
@@ -74,70 +73,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
74
73
|
*/
|
|
75
74
|
//#endregion
|
|
76
75
|
class WattStepperComponent extends MatStepper {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
onFirstStep
|
|
83
|
-
onLastStep
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this.selectedIndexChanged$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((change) => {
|
|
94
|
-
this._steps.get(change.selectedIndex)?.entering.emit(change.selectedStep);
|
|
95
|
-
this._steps.get(change.previouslySelectedIndex)?.leaving.emit(change.previouslySelectedStep);
|
|
76
|
+
stepper = viewChild.required(MatStepper);
|
|
77
|
+
stepperSelectionChange = toSignal(toObservable(this.stepper).pipe(filter(Boolean), switchMap((stepper) => stepper.selectionChange)));
|
|
78
|
+
completed = output();
|
|
79
|
+
isCompleting = input(false, ...(ngDevMode ? [{ debugName: "isCompleting" }] : []));
|
|
80
|
+
wattSteps = contentChildren(WattStepperStepComponent, ...(ngDevMode ? [{ debugName: "wattSteps", descendants: true }] : [{ descendants: true }]));
|
|
81
|
+
onFirstStep = computed(() => (this.stepperSelectionChange()?.selectedIndex ?? 0) === 0, ...(ngDevMode ? [{ debugName: "onFirstStep" }] : []));
|
|
82
|
+
onLastStep = computed(() => (this.stepperSelectionChange()?.selectedIndex ?? 0) ===
|
|
83
|
+
this.wattSteps()?.filter((x) => x.enabled()).length - 1, ...(ngDevMode ? [{ debugName: "onLastStep" }] : []));
|
|
84
|
+
constructor() {
|
|
85
|
+
super();
|
|
86
|
+
effect(() => {
|
|
87
|
+
const change = this.stepperSelectionChange();
|
|
88
|
+
if (change) {
|
|
89
|
+
this.wattSteps()[change.selectedIndex]?.entering.emit(change.selectedStep);
|
|
90
|
+
this.wattSteps()[change.previouslySelectedIndex]?.leaving.emit(change.previouslySelectedStep);
|
|
91
|
+
}
|
|
96
92
|
});
|
|
97
93
|
}
|
|
94
|
+
reset() {
|
|
95
|
+
this.stepper().reset();
|
|
96
|
+
}
|
|
98
97
|
nextStep(step) {
|
|
99
98
|
step.next.emit();
|
|
100
|
-
this.stepper.selected?.stepControl?.markAllAsTouched();
|
|
101
|
-
this.stepper.next();
|
|
99
|
+
this.stepper().selected?.stepControl?.markAllAsTouched();
|
|
100
|
+
this.stepper().next();
|
|
102
101
|
}
|
|
103
102
|
previousStep() {
|
|
104
|
-
this.stepper.previous();
|
|
103
|
+
this.stepper().previous();
|
|
105
104
|
}
|
|
106
105
|
complete() {
|
|
107
|
-
this.stepper.selected?.stepControl?.markAllAsTouched();
|
|
106
|
+
this.stepper().selected?.stepControl?.markAllAsTouched();
|
|
108
107
|
this.completed.emit();
|
|
109
108
|
}
|
|
110
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattStepperComponent, deps:
|
|
111
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattStepperComponent, isStandalone: true, selector: "watt-stepper", inputs: { isCompleting: "isCompleting" }, outputs: { completed: "completed" }, providers: [
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: WattStepperComponent, isStandalone: true, selector: "watt-stepper", inputs: { isCompleting: { classPropertyName: "isCompleting", publicName: "isCompleting", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { completed: "completed" }, providers: [
|
|
112
111
|
{
|
|
113
112
|
provide: STEPPER_GLOBAL_OPTIONS,
|
|
114
113
|
useValue: { showError: true, displayDefaultIndicatorType: false },
|
|
115
114
|
},
|
|
116
115
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
117
116
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
118
|
-
], queries: [{ propertyName: "
|
|
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 });
|
|
119
118
|
}
|
|
120
119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattStepperComponent, decorators: [{
|
|
121
120
|
type: Component,
|
|
122
|
-
args: [{ selector: 'watt-stepper', encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet,
|
|
121
|
+
args: [{ selector: 'watt-stepper', encapsulation: ViewEncapsulation.None, imports: [NgTemplateOutlet, MatStepperModule, WattIconComponent, WattButtonComponent], providers: [
|
|
123
122
|
{
|
|
124
123
|
provide: STEPPER_GLOBAL_OPTIONS,
|
|
125
124
|
useValue: { showError: true, displayDefaultIndicatorType: false },
|
|
126
125
|
},
|
|
127
126
|
{ provide: CdkStepper, useExisting: WattStepperComponent },
|
|
128
127
|
{ provide: MatStepper, useExisting: WattStepperComponent },
|
|
129
|
-
], 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
|
|
130
|
-
}], propDecorators: { completed: [{
|
|
131
|
-
type: Output
|
|
132
|
-
}], isCompleting: [{
|
|
133
|
-
type: Input
|
|
134
|
-
}], _steps: [{
|
|
135
|
-
type: ContentChildren,
|
|
136
|
-
args: [WattStepperStepComponent, { descendants: true }]
|
|
137
|
-
}], stepper: [{
|
|
138
|
-
type: ViewChild,
|
|
139
|
-
args: [MatStepper]
|
|
140
|
-
}] } });
|
|
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
|
+
}], 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 }] }] } });
|
|
141
130
|
const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];
|
|
142
131
|
|
|
143
132
|
//#region License
|
|
@@ -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 AfterViewInit,\n Component,\n ContentChildren,\n DestroyRef,\n EventEmitter,\n inject,\n Input,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { CdkStepper, STEPPER_GLOBAL_OPTIONS, StepperSelectionEvent } from '@angular/cdk/stepper';\nimport { MatStepper, MatStepperModule } from '@angular/material/stepper';\nimport { RxPush } from '@rx-angular/template/push';\nimport { from, map, Observable, of, startWith, withLatestFrom } from 'rxjs';\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, RxPush, MatStepperModule, WattIconComponent, WattButtonComponent],\n providers: [\n {\n provide: STEPPER_GLOBAL_OPTIONS,\n useValue: { showError: true, displayDefaultIndicatorType: false },\n },\n { provide: CdkStepper, useExisting: WattStepperComponent },\n { provide: MatStepper, useExisting: WattStepperComponent },\n ],\n})\nexport class WattStepperComponent extends MatStepper implements AfterViewInit {\n @Output() completed = new EventEmitter<void>();\n @Input() isCompleting = false;\n\n @ContentChildren(WattStepperStepComponent, { descendants: true })\n declare _steps: QueryList<WattStepperStepComponent>;\n\n @ViewChild(MatStepper) stepper!: MatStepper;\n\n selectedIndexChanged$!: Observable<StepperSelectionEvent>;\n onFirstStep$!: Observable<boolean>;\n onLastStep$!: Observable<boolean>;\n\n private destroyRef = inject(DestroyRef);\n\n override reset() {\n this.stepper.reset();\n }\n\n override ngAfterViewInit(): void {\n this.selectedIndexChanged$ = from(this.stepper.selectionChange);\n this.onLastStep$ = this.selectedIndexChanged$.pipe(\n withLatestFrom(of(this._steps)),\n map(([index, steps]) => index.selectedIndex === steps.filter((x) => x.enabled()).length - 1),\n startWith(false)\n );\n this.onFirstStep$ = this.selectedIndexChanged$.pipe(\n map((index) => index.selectedIndex === 0),\n startWith(true)\n );\n\n // Emit entering and leaving events\n this.selectedIndexChanged$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((change) => {\n this._steps.get(change.selectedIndex)?.entering.emit(change.selectedStep);\n this._steps.get(change.previouslySelectedIndex)?.leaving.emit(change.previouslySelectedStep);\n });\n }\n\n nextStep(step: WattStepperStepComponent): void {\n step.next.emit();\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.stepper.next();\n }\n\n previousStep(): void {\n this.stepper.previous();\n }\n\n complete(): void {\n this.stepper.selected?.stepControl?.markAllAsTouched();\n this.completed.emit();\n }\n}\n\nexport const WATT_STEPPER = [WattStepperComponent, WattStepperStepComponent];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-stepper\n #stepper\n [disableRipple]=\"disableRipple\"\n [linear]=\"true\"\n animationDuration=\"0\"\n class=\"watt-stepper\"\n>\n <ng-template let-index=\"index\" matStepperIcon=\"edit\">\n {{ index + 1 }}\n </ng-template>\n <ng-template matStepperIcon=\"done\">\n <watt-icon name=\"checkmark\" />\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"number\">\n @if (\n stepper.steps.get(index)?.completed &&\n stepper.steps.get(index)?.interacted &&\n index !== stepper.selectedIndex\n ) {\n <watt-icon name=\"checkmark\" />\n } @else {\n {{ index + 1 }}\n }\n </ng-template>\n <ng-template let-index=\"index\" matStepperIcon=\"error\">\n {{ index + 1 }}\n </ng-template>\n @for (step of _steps; track step) {\n @if (step.enabled()) {\n <mat-step [editable]=\"step.editable\" [stepControl]=\"step.stepControl\">\n <ng-template matStepLabel>{{ step.label }}</ng-template>\n <div class=\"watt-stepper-content-wrapper\">\n <ng-container *ngTemplateOutlet=\"step.templateRef()\" />\n </div>\n <div class=\"watt-stepper-button-wrapper\">\n @if (!(onFirstStep$ | push)) {\n <watt-button\n [disabled]=\"step.disablePreviousButton()\"\n variant=\"secondary\"\n (click)=\"previousStep()\"\n >\n <watt-icon name=\"left\" />\n {{ step.previousButtonLabel() }}\n </watt-button>\n }\n\n @if (!(onLastStep$ | push)) {\n <watt-button\n variant=\"secondary\"\n (click)=\"nextStep(step)\"\n [loading]=\"step.loadingNextButton()\"\n [disabled]=\"step.disableNextButton()\"\n >\n {{ step.nextButtonLabel() }}\n <watt-icon name=\"right\" />\n </watt-button>\n }\n\n @if (onLastStep$ | push) {\n <watt-button\n variant=\"primary\"\n [loading]=\"isCompleting\"\n (click)=\"complete()\"\n [disabled]=\"step.disableNextButton()\"\n >{{ step.nextButtonLabel() }}\n </watt-button>\n }\n </div>\n </mat-step>\n }\n }\n</mat-stepper>\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WATT_STEPPER, WattStepperComponent } from './watt-stepper.component';\nexport { WattStepperStepComponent, WattStep } from './watt-stepper-step.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAaM,MAAO,wBAAyB,SAAQ,OAAO,CAAA;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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AAA,IAAA,EAAE,mBAAmB,iIAAhE,MAAM,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAUvB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,iBAGT,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,gBAAgB,EAAE,MAAM,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,CAAC,EAAA,SAAA,EAClF;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,sBAAsB;4BAC/B,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,2BAA2B,EAAE,KAAK,EAAE;AAClE,yBAAA;AACD,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC1D,wBAAA,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,sBAAsB,EAAE;AAC3D,qBAAA,EAAA,QAAA,EAAA,y1FAAA,EAAA,MAAA,EAAA,CAAA,q3DAAA,CAAA,EAAA;;sBAGA;;sBACA;;sBAEA,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,wBAAwB,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;;sBAG/D,SAAS;uBAAC,UAAU;;MA+CV,YAAY,GAAG,CAAC,oBAAoB,EAAE,wBAAwB;;AEhH3E;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,I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AAA,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;;;;"}
|
package/package.json
CHANGED
package/stepper/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef
|
|
3
|
-
import { CdkStep, StepperSelectionEvent } from '@angular/cdk/stepper';
|
|
4
|
-
export { CdkStep as WattStep } from '@angular/cdk/stepper';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
5
3
|
import { MatStep, MatStepper } from '@angular/material/stepper';
|
|
6
|
-
import {
|
|
4
|
+
import { CdkStep } from '@angular/cdk/stepper';
|
|
5
|
+
export { CdkStep as WattStep } from '@angular/cdk/stepper';
|
|
7
6
|
|
|
8
7
|
declare class WattStepperStepComponent extends MatStep {
|
|
9
8
|
readonly templateRef: _angular_core.Signal<TemplateRef<unknown> | undefined>;
|
|
@@ -20,39 +19,21 @@ declare class WattStepperStepComponent extends MatStep {
|
|
|
20
19
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattStepperStepComponent, "watt-stepper-step", never, { "nextButtonLabel": { "alias": "nextButtonLabel"; "required": false; "isSignal": true; }; "disableNextButton": { "alias": "disableNextButton"; "required": false; "isSignal": true; }; "loadingNextButton": { "alias": "loadingNextButton"; "required": false; "isSignal": true; }; "previousButtonLabel": { "alias": "previousButtonLabel"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "disablePreviousButton": { "alias": "disablePreviousButton"; "required": false; "isSignal": true; }; }, { "entering": "entering"; "leaving": "leaving"; "next": "next"; }, never, ["*"], true, never>;
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
34
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
35
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
36
|
-
* See the License for the specific language governing permissions and
|
|
37
|
-
* limitations under the License.
|
|
38
|
-
*/
|
|
39
|
-
|
|
40
|
-
declare class WattStepperComponent extends MatStepper implements AfterViewInit {
|
|
41
|
-
completed: EventEmitter<void>;
|
|
42
|
-
isCompleting: boolean;
|
|
43
|
-
_steps: QueryList<WattStepperStepComponent>;
|
|
44
|
-
stepper: MatStepper;
|
|
45
|
-
selectedIndexChanged$: Observable<StepperSelectionEvent>;
|
|
46
|
-
onFirstStep$: Observable<boolean>;
|
|
47
|
-
onLastStep$: Observable<boolean>;
|
|
48
|
-
private destroyRef;
|
|
22
|
+
declare class WattStepperComponent extends MatStepper {
|
|
23
|
+
stepper: _angular_core.Signal<MatStepper>;
|
|
24
|
+
private stepperSelectionChange;
|
|
25
|
+
completed: _angular_core.OutputEmitterRef<void>;
|
|
26
|
+
isCompleting: _angular_core.InputSignal<boolean>;
|
|
27
|
+
wattSteps: _angular_core.Signal<readonly WattStepperStepComponent[]>;
|
|
28
|
+
onFirstStep: _angular_core.Signal<boolean>;
|
|
29
|
+
onLastStep: _angular_core.Signal<boolean>;
|
|
30
|
+
constructor();
|
|
49
31
|
reset(): void;
|
|
50
|
-
ngAfterViewInit(): void;
|
|
51
32
|
nextStep(step: WattStepperStepComponent): void;
|
|
52
33
|
previousStep(): void;
|
|
53
34
|
complete(): void;
|
|
54
35
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<WattStepperComponent, never>;
|
|
55
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattStepperComponent, "watt-stepper", never, { "isCompleting": { "alias": "isCompleting"; "required": false; }; }, { "completed": "completed"; }, ["
|
|
36
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattStepperComponent, "watt-stepper", never, { "isCompleting": { "alias": "isCompleting"; "required": false; "isSignal": true; }; }, { "completed": "completed"; }, ["wattSteps"], never, true, never>;
|
|
56
37
|
}
|
|
57
38
|
declare const WATT_STEPPER: (typeof WattStepperStepComponent | typeof WattStepperComponent)[];
|
|
58
39
|
|