@energinet/watt 1.7.1 → 2.0.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-field.mjs","sources":["../../../libs/watt/package/field/watt-field-intl.service.ts","../../../libs/watt/package/field/watt-field-error.component.ts","../../../libs/watt/package/field/watt-field.component.ts","../../../libs/watt/package/field/watt-field-hint.component.ts","../../../libs/watt/package/field/index.ts","../../../libs/watt/package/field/energinet-watt-field.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 { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattFieldIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n required = 'Field is required';\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 { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'watt-field-error',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-field-error {\n color: var(--watt-color-state-danger);\n }\n `,\n ],\n})\nexport class WattFieldErrorComponent {}\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 ElementRef,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormControl, ValidationErrors, Validators } from '@angular/forms';\nimport { filter, map, startWith, switchMap, tap } from 'rxjs/operators';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattTooltipDirective } from '@energinet/watt/tooltip';\nimport { VaterStackComponent } from '@energinet/watt/vater';\nimport { WattRangeValidators } from '@energinet/watt/validators';\n\nimport { WattFieldIntlService } from './watt-field-intl.service';\nimport { WattFieldErrorComponent } from './watt-field-error.component';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'watt-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgTemplateOutlet,\n WattIconComponent,\n WattTooltipDirective,\n WattFieldErrorComponent,\n VaterStackComponent,\n ],\n styleUrls: ['./watt-field.component.scss'],\n template: `\n @if (chipMode()) {\n <span class=\"watt-label\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </span>\n } @else {\n <label [attr.for]=\"id()\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </label>\n }\n\n <ng-template #template>\n @if (label()) {\n <span class=\"label\" [class.required]=\"isRequired()\">\n {{ label() }}\n @if (tooltip(); as tooltip) {\n <watt-icon name=\"info\" wattTooltipPosition=\"top\" [wattTooltip]=\"tooltip\" />\n }\n </span>\n }\n <vater-stack direction=\"row\" gap=\"s\">\n <div\n #wrapper\n class=\"watt-field-wrapper\"\n [class.watt-field--has-placeholder]=\"!!placeholder()\"\n [style.anchor-name]=\"anchorName()\"\n >\n @if (placeholder()) {\n <div class=\"watt-field-placeholder\" aria-hidden=\"true\">\n <span class=\"watt-field-ghost\">{{ ghost() }}</span>\n <span class=\"watt-field-filler\">{{ filler() }}</span>\n </div>\n }\n <ng-content />\n </div>\n <ng-content select=\"watt-field-descriptor\" />\n </vater-stack>\n <ng-content select=\"[popover]\" />\n <ng-content select=\"watt-field-hint\" />\n <ng-content select=\"watt-field-error\" />\n @if (isEmpty()) {\n <watt-field-error>{{ intl.required }}</watt-field-error>\n }\n </ng-template>\n `,\n host: {\n '[class.watt-field--chip]': 'chipMode()',\n '[class.watt-field--unlabelled]': 'unlabelled()',\n '[class.watt-field--disabled]': 'control()?.disabled',\n },\n})\nexport class WattFieldComponent {\n intl = inject(WattFieldIntlService);\n elementRef = inject<ElementRef>(ElementRef);\n\n control = input<FormControl | null>(null);\n label = input<string>();\n id = input<string>();\n chipMode = input(false);\n tooltip = input<string>();\n placeholder = input('');\n anchorName = input<string>();\n\n value = signal('');\n filler = computed(() => this.placeholder().slice(this.value().length));\n ghost = computed(() => this.value().slice(0, this.placeholder().length));\n\n unlabelled = computed(() => !this.label());\n\n errors = signal<ValidationErrors | null>(null);\n isRequired = signal(false);\n isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired']);\n\n // Used for text fields with autocomplete\n wrapper = viewChild<ElementRef>('wrapper');\n\n constructor() {\n const control$ = toObservable(this.control).pipe(filter((control) => control !== null));\n\n // Track value in order to update ghost and filler\n const value$ = control$.pipe(\n switchMap((control) =>\n control.valueChanges.pipe(\n startWith(control.value),\n map((value) => (value === null || value === undefined ? '' : value.toString())),\n tap((value) => this.value.set(value))\n )\n ),\n takeUntilDestroyed()\n );\n\n // Track status in order to update required state and show errors\n const status$ = control$.pipe(\n switchMap((control) =>\n control.statusChanges.pipe(\n startWith(control.status),\n tap(() => this.isRequired.set(this.isRequiredControl(control))),\n tap(() => this.errors.set(control.errors))\n )\n ),\n takeUntilDestroyed()\n );\n\n // Subscribe for side effects\n value$.subscribe();\n status$.subscribe();\n }\n\n isRequiredControl(control: FormControl) {\n const validators = [Validators.required, WattRangeValidators.required];\n return validators.some((validator) => control.hasValidator(validator));\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 { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-field-hint',\n styles: [\n `\n :host {\n color: var(--watt-color-neutral-grey-700);\n }\n `,\n ],\n template: `<ng-content />`,\n})\nexport class WattFieldHintComponent {}\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 { WattFieldComponent } from './watt-field.component';\nexport { WattFieldErrorComponent } from './watt-field-error.component';\nexport { WattFieldHintComponent } from './watt-field-hint.component';\nexport { WattFieldIntlService } from './watt-field-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n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,eAAA,EACL,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,IAAI,EAC5B,OAAA,EAAA;wBACP,gBAAgB;wBAChB,iBAAiB;wBACjB,oBAAoB;wBACpB,uBAAuB;wBACvB,mBAAmB;qBACpB,EAES,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CT,EACK,IAAA,EAAA;AACJ,wBAAA,0BAA0B,EAAE,YAAY;AACxC,wBAAA,gCAAgC,EAAE,cAAc;AAChD,wBAAA,8BAA8B,EAAE,qBAAqB;AACtD,qBAAA,EAAA,MAAA,EAAA,CAAA,uoHAAA,CAAA,EAAA;;;ACvGH;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAca,sBAAsB,CAAA;uGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,2EAFvB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,mDAAA,CAAA,EAAA,CAAA;;2FAEf,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,YAQjB,CAAgB,cAAA,CAAA,EAAA,MAAA,EAAA,CAAA,mDAAA,CAAA,EAAA;;;AC7B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-field.mjs","sources":["../../../libs/watt/package/field/watt-field-intl.service.ts","../../../libs/watt/package/field/watt-field-error.component.ts","../../../libs/watt/package/field/watt-field.component.ts","../../../libs/watt/package/field/watt-field-hint.component.ts","../../../libs/watt/package/field/index.ts","../../../libs/watt/package/field/energinet-watt-field.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 { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattFieldIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n required = 'Field is required';\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 { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'watt-field-error',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-field-error {\n color: var(--watt-color-state-danger);\n }\n `,\n ],\n})\nexport class WattFieldErrorComponent {}\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 ElementRef,\n ViewEncapsulation,\n computed,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { FormControl, ValidationErrors, Validators } from '@angular/forms';\nimport { filter, map, startWith, switchMap, tap } from 'rxjs/operators';\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattTooltipDirective } from '@energinet/watt/tooltip';\nimport { VaterStackComponent } from '@energinet/watt/vater';\nimport { WattRangeValidators } from '@energinet/watt/validators';\n\nimport { WattFieldIntlService } from './watt-field-intl.service';\nimport { WattFieldErrorComponent } from './watt-field-error.component';\nimport { NgTemplateOutlet } from '@angular/common';\n\n@Component({\n selector: 'watt-field',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgTemplateOutlet,\n WattIconComponent,\n WattTooltipDirective,\n WattFieldErrorComponent,\n VaterStackComponent,\n ],\n styleUrls: ['./watt-field.component.scss'],\n template: `\n @if (chipMode()) {\n <span class=\"watt-label\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </span>\n } @else {\n <label [attr.for]=\"id()\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </label>\n }\n\n <ng-template #template>\n @if (label()) {\n <span class=\"label\" [class.required]=\"isRequired()\">\n {{ label() }}\n @if (tooltip(); as tooltip) {\n <watt-icon name=\"info\" wattTooltipPosition=\"top\" [wattTooltip]=\"tooltip\" />\n }\n </span>\n }\n <vater-stack direction=\"row\" gap=\"s\">\n <div\n #wrapper\n class=\"watt-field-wrapper\"\n [class.watt-field--has-placeholder]=\"!!placeholder()\"\n [style.anchor-name]=\"anchorName()\"\n >\n @if (placeholder()) {\n <div class=\"watt-field-placeholder\" aria-hidden=\"true\">\n <span class=\"watt-field-ghost\">{{ ghost() }}</span>\n <span class=\"watt-field-filler\">{{ filler() }}</span>\n </div>\n }\n <ng-content />\n </div>\n <ng-content select=\"watt-field-descriptor\" />\n </vater-stack>\n <ng-content select=\"[popover]\" />\n <ng-content select=\"watt-field-hint\" />\n <ng-content select=\"watt-field-error\" />\n @if (isEmpty()) {\n <watt-field-error>{{ intl.required }}</watt-field-error>\n }\n </ng-template>\n `,\n host: {\n '[class.watt-field--chip]': 'chipMode()',\n '[class.watt-field--unlabelled]': 'unlabelled()',\n '[class.watt-field--disabled]': 'control()?.disabled',\n },\n})\nexport class WattFieldComponent {\n intl = inject(WattFieldIntlService);\n elementRef = inject<ElementRef>(ElementRef);\n\n control = input<FormControl | null>(null);\n label = input<string>();\n id = input<string>();\n chipMode = input(false);\n tooltip = input<string>();\n placeholder = input('');\n anchorName = input<string>();\n\n value = signal('');\n filler = computed(() => this.placeholder().slice(this.value().length));\n ghost = computed(() => this.value().slice(0, this.placeholder().length));\n\n unlabelled = computed(() => !this.label());\n\n errors = signal<ValidationErrors | null>(null);\n isRequired = signal(false);\n isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired']);\n\n // Used for text fields with autocomplete\n wrapper = viewChild<ElementRef>('wrapper');\n\n constructor() {\n const control$ = toObservable(this.control).pipe(filter((control) => control !== null));\n\n // Track value in order to update ghost and filler\n const value$ = control$.pipe(\n switchMap((control) =>\n control.valueChanges.pipe(\n startWith(control.value),\n map((value) => (value === null || value === undefined ? '' : value.toString())),\n tap((value) => this.value.set(value))\n )\n ),\n takeUntilDestroyed()\n );\n\n // Track status in order to update required state and show errors\n const status$ = control$.pipe(\n switchMap((control) =>\n control.statusChanges.pipe(\n startWith(control.status),\n tap(() => this.isRequired.set(this.isRequiredControl(control))),\n tap(() => this.errors.set(control.errors))\n )\n ),\n takeUntilDestroyed()\n );\n\n // Subscribe for side effects\n value$.subscribe();\n status$.subscribe();\n }\n\n isRequiredControl(control: FormControl) {\n const validators = [Validators.required, WattRangeValidators.required];\n return validators.some((validator) => control.hasValidator(validator));\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 { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-field-hint',\n styles: [\n `\n :host {\n color: var(--watt-color-neutral-grey-700);\n }\n `,\n ],\n template: `<ng-content />`,\n})\nexport class WattFieldHintComponent {}\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 { WattFieldComponent } from './watt-field.component';\nexport { WattFieldErrorComponent } from './watt-field-error.component';\nexport { WattFieldHintComponent } from './watt-field-hint.component';\nexport { WattFieldIntlService } from './watt-field-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAKa,oBAAoB,CAAA;AACtB,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAQ;IACrD,QAAQ,GAAG,mBAAmB;uGAFnB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAApB,IAAA,OAAA,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AAA,EAAA,CAAA,uoHAAA,CAAA,EAAA;;;ACvGH;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAca,sBAAsB,CAAA;uGAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,2EAFvB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,mDAAA,CAAA,EAAA,CAAA;;2FAEf,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,YAQjB,CAAgB,cAAA,CAAA,EAAA,MAAA,EAAA,CAAA,mDAAA,CAAA,EAAA;;;AC7B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -24,7 +24,7 @@ import { WattSpinnerComponent } from '@energinet/watt/spinner';
24
24
  //#endregion
25
25
  class WattProgressTrackerComponent {
26
26
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattProgressTrackerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
27
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattProgressTrackerComponent, isStandalone: true, selector: "watt-progress-tracker", ngImport: i0, template: `<vater-stack direction="row"><ng-content /></vater-stack>`, isInline: true, styles: ["watt-progress-tracker{display:block}\n"], dependencies: [{ kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]", inputs: ["align", "direction", "gap", "justify", "offset"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
27
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: WattProgressTrackerComponent, isStandalone: true, selector: "watt-progress-tracker", ngImport: i0, template: `<vater-stack direction="row"><ng-content /></vater-stack>`, isInline: true, styles: ["watt-progress-tracker{display:block}\n"], dependencies: [{ kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
28
28
  }
29
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattProgressTrackerComponent, decorators: [{
30
30
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-progress-tracker.mjs","sources":["../../../libs/watt/package/progress-tracker/watt-progress-tracker.component.ts","../../../libs/watt/package/progress-tracker/watt-progress-tracker-step.component.ts","../../../libs/watt/package/progress-tracker/index.ts","../../../libs/watt/package/progress-tracker/energinet-watt-progress-tracker.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 { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\n@Component({\n imports: [VaterStackComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-progress-tracker',\n styles: [\n `\n watt-progress-tracker {\n display: block;\n }\n `,\n ],\n template: `<vater-stack direction=\"row\"><ng-content /></vater-stack>`,\n})\nexport class WattProgressTrackerComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\n@Component({\n imports: [WattIconComponent, WattSpinnerComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-progress-tracker-step',\n host: {\n '[attr.role]': 'current() ? \"status\" : \"presentation\"',\n '[attr.class]': 'class()',\n '[attr.aria-current]': 'ariaCurrent()',\n '[attr.aria-label]': 'label()',\n },\n styleUrl: './watt-progress-tracker-step.component.scss',\n template: `\n <div class=\"watt-progress-tracker-step-icon\">\n @switch (status()) {\n @case ('running') {\n <watt-spinner [diameter]=\"26\" [strokeWidth]=\"2\" />\n }\n @case ('skipped') {\n <watt-icon name=\"horizontalRule\" size=\"xs\" />\n }\n @case ('canceled') {\n <watt-icon name=\"close\" size=\"xs\" />\n }\n @case ('failed') {\n <watt-icon name=\"priorityHigh\" size=\"xs\" />\n }\n @case ('succeeded') {\n <watt-icon name=\"checkmark\" size=\"xs\" />\n }\n }\n </div>\n <div class=\"watt-progress-tracker-step-text\"><ng-content /></div>\n `,\n})\nexport class WattProgressTrackerStepComponent {\n status = input.required<\n 'pending' | 'running' | 'skipped' | 'canceled' | 'failed' | 'succeeded'\n >();\n label = input<string>();\n current = input(false);\n ariaCurrent = computed(() => (this.current() ? 'step' : false));\n class = computed(() => `watt-progress-tracker-step-${this.status()}`);\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 { WattProgressTrackerComponent } from './watt-progress-tracker.component';\nimport { WattProgressTrackerStepComponent } from './watt-progress-tracker-step.component';\n\nexport { WattProgressTrackerComponent } from './watt-progress-tracker.component';\nexport { WattProgressTrackerStepComponent } from './watt-progress-tracker-step.component';\n\nexport const WATT_PROGRESS_TRACKER = [\n WattProgressTrackerComponent,\n WattProgressTrackerStepComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,4BAA4B,CAAA;uGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAF7B,CAA2D,yDAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAX3D,mBAAmB,EAAA,QAAA,EAAA,4BAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,WAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA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BAC/B,EAES,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;AAqBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,0yFAAA,CAAA,EAAA;;;AC7DH;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAOa,MAAA,qBAAqB,GAAG;IACnC,4BAA4B;IAC5B,gCAAgC;;;AC1BlC;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-progress-tracker.mjs","sources":["../../../libs/watt/package/progress-tracker/watt-progress-tracker.component.ts","../../../libs/watt/package/progress-tracker/watt-progress-tracker-step.component.ts","../../../libs/watt/package/progress-tracker/index.ts","../../../libs/watt/package/progress-tracker/energinet-watt-progress-tracker.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 { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\n@Component({\n imports: [VaterStackComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-progress-tracker',\n styles: [\n `\n watt-progress-tracker {\n display: block;\n }\n `,\n ],\n template: `<vater-stack direction=\"row\"><ng-content /></vater-stack>`,\n})\nexport class WattProgressTrackerComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\n@Component({\n imports: [WattIconComponent, WattSpinnerComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-progress-tracker-step',\n host: {\n '[attr.role]': 'current() ? \"status\" : \"presentation\"',\n '[attr.class]': 'class()',\n '[attr.aria-current]': 'ariaCurrent()',\n '[attr.aria-label]': 'label()',\n },\n styleUrl: './watt-progress-tracker-step.component.scss',\n template: `\n <div class=\"watt-progress-tracker-step-icon\">\n @switch (status()) {\n @case ('running') {\n <watt-spinner [diameter]=\"26\" [strokeWidth]=\"2\" />\n }\n @case ('skipped') {\n <watt-icon name=\"horizontalRule\" size=\"xs\" />\n }\n @case ('canceled') {\n <watt-icon name=\"close\" size=\"xs\" />\n }\n @case ('failed') {\n <watt-icon name=\"priorityHigh\" size=\"xs\" />\n }\n @case ('succeeded') {\n <watt-icon name=\"checkmark\" size=\"xs\" />\n }\n }\n </div>\n <div class=\"watt-progress-tracker-step-text\"><ng-content /></div>\n `,\n})\nexport class WattProgressTrackerStepComponent {\n status = input.required<\n 'pending' | 'running' | 'skipped' | 'canceled' | 'failed' | 'succeeded'\n >();\n label = input<string>();\n current = input(false);\n ariaCurrent = computed(() => (this.current() ? 'step' : false));\n class = computed(() => `watt-progress-tracker-step-${this.status()}`);\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 { WattProgressTrackerComponent } from './watt-progress-tracker.component';\nimport { WattProgressTrackerStepComponent } from './watt-progress-tracker-step.component';\n\nexport { WattProgressTrackerComponent } from './watt-progress-tracker.component';\nexport { WattProgressTrackerStepComponent } from './watt-progress-tracker-step.component';\n\nexport const WATT_PROGRESS_TRACKER = [\n WattProgressTrackerComponent,\n WattProgressTrackerStepComponent,\n];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,4BAA4B,CAAA;uGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAF7B,CAA2D,yDAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,wCAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAX3D,mBAAmB,EAAA,QAAA,EAAA,4BAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAalB,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAdxC,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAC,mBAAmB,CAAC,EACb,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAChC,aAAA,EAAA,iBAAiB,CAAC,IAAI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inkTabsComponent {
60
60
  tabElements = contentChildren(WattLinkTabComponent);
61
61
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattLinkTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
62
62
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattLinkTabsComponent, isStandalone: true, selector: "watt-link-tabs", queries: [{ propertyName: "tabElements", predicate: WattLinkTabComponent, isSignal: true }], ngImport: i0, template: `
63
- <vater-flex direction="column" fill="vertical">
63
+ <vater-flex autoSize fill="vertical">
64
64
  <nav
65
65
  mat-tab-nav-bar
66
66
  [disableRipple]="true"
@@ -77,12 +77,12 @@ class WattLinkTabsComponent {
77
77
 
78
78
  <mat-tab-nav-panel #tabPanel><router-outlet /></mat-tab-nav-panel>
79
79
  </vater-flex>
80
- `, isInline: true, styles: ["@use \"@energinet-datahub/watt/utils\" as watt;watt-link-tabs .mat-mdc-tab-header{box-shadow:var(--watt-bottom-box-shadow);background-color:var(--watt-color-neutral-white)}watt-link-tabs .mat-mdc-tab-nav-panel{display:block;position:relative;height:100%}watt-link-tabs .mat-mdc-tab-links,watt-link-tabs .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}watt-link-tabs .mat-mdc-tab-labels,watt-link-tabs .mat-mdc-tab-links{padding-left:var(--watt-space-ml)}watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link{min-width:120px;opacity:1}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link) .mdc-tab__content{@include watt.typography-watt-button;color:var(--watt-on-light-medium-emphasis)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{color:var(--watt-on-light-medium-emphasis)}:is(:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover) .mdc-tab__content{color:var(--watt-color-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i1.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["direction", "grow", "shrink", "basis", "gap", "justify", "wrap", "scrollable", "offset"] }], encapsulation: i0.ViewEncapsulation.None });
80
+ `, isInline: true, styles: ["@use \"@energinet-datahub/watt/utils\" as watt;watt-link-tabs .mat-mdc-tab-header{box-shadow:var(--watt-bottom-box-shadow);background-color:var(--watt-color-neutral-white)}watt-link-tabs .mat-mdc-tab-nav-panel{display:block;position:relative;height:100%}watt-link-tabs .mat-mdc-tab-links,watt-link-tabs .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}watt-link-tabs .mat-mdc-tab-labels,watt-link-tabs .mat-mdc-tab-links{padding-left:var(--watt-space-ml)}watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link{min-width:120px;opacity:1}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link) .mdc-tab__content{@include watt.typography-watt-button;color:var(--watt-on-light-medium-emphasis)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{border-bottom:2px solid var(--watt-color-primary)}:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover{color:var(--watt-on-light-medium-emphasis)}:is(:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link.active,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab:hover,:is(watt-link-tabs .mat-mdc-tab,watt-link-tabs .mat-mdc-tab-link).mat-mdc-tab-link:hover) .mdc-tab__content{color:var(--watt-color-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["fitInkBarToContent", "mat-stretch-tabs", "animationDuration", "backgroundColor", "disableRipple", "color", "tabPanel"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "component", type: i1.MatTabNavPanel, selector: "mat-tab-nav-panel", inputs: ["id"], exportAs: ["matTabNavPanel"] }, { kind: "component", type: i1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["active", "disabled", "disableRipple", "tabIndex", "id"], exportAs: ["matTabLink"] }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }], encapsulation: i0.ViewEncapsulation.None });
81
81
  }
82
82
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattLinkTabsComponent, decorators: [{
83
83
  type: Component,
84
84
  args: [{ selector: 'watt-link-tabs', encapsulation: ViewEncapsulation.None, imports: [MatTabsModule, RouterOutlet, RouterLink, RouterLinkActive, VaterFlexComponent], template: `
85
- <vater-flex direction="column" fill="vertical">
85
+ <vater-flex autoSize fill="vertical">
86
86
  <nav
87
87
  mat-tab-nav-bar
88
88
  [disableRipple]="true"
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-tabs.mjs","sources":["../../../libs/watt/package/tabs/watt-link-tab.component.ts","../../../libs/watt/package/tabs/watt-link-tabs.component.ts","../../../libs/watt/package/tabs/watt-tab.component.ts","../../../libs/watt/package/tabs/watt-tabs-action.component.ts","../../../libs/watt/package/tabs/watt-tabs.component.ts","../../../libs/watt/package/tabs/watt-tabs.component.html","../../../libs/watt/package/tabs/index.ts","../../../libs/watt/package/tabs/energinet-watt-tabs.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 } from '@angular/core';\n\n@Component({\n selector: 'watt-link-tab',\n template: ``,\n})\nexport class WattLinkTabComponent {\n label = input.required<string>();\n link = input.required<string>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, contentChildren } from '@angular/core';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\nimport { MatTabsModule } from '@angular/material/tabs';\n\nimport { VaterFlexComponent } from '@energinet/watt/vater';\nimport { WattLinkTabComponent } from './watt-link-tab.component';\n\n@Component({\n selector: 'watt-link-tabs',\n encapsulation: ViewEncapsulation.None,\n imports: [MatTabsModule, RouterOutlet, RouterLink, RouterLinkActive, VaterFlexComponent],\n styles: `\n @use '@energinet-datahub/watt/utils' as watt;\n\n watt-link-tabs {\n .mat-mdc-tab-header {\n box-shadow: var(--watt-bottom-box-shadow);\n background-color: var(--watt-color-neutral-white);\n }\n\n .mat-mdc-tab-nav-panel {\n display: block;\n position: relative;\n height: 100%;\n }\n\n .mat-mdc-tab-links,\n .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label {\n color: var(--mat-tab-header-active-label-text-color);\n }\n\n .mat-mdc-tab-labels,\n .mat-mdc-tab-links {\n padding-left: var(--watt-space-ml);\n }\n\n .mat-mdc-tab,\n .mat-mdc-tab-link {\n min-width: 120px;\n opacity: 1;\n\n .mdc-tab__content {\n @include watt.typography-watt-button;\n color: var(--watt-on-light-medium-emphasis);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active,\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n color: var(--watt-on-light-medium-emphasis);\n\n .mdc-tab__content {\n color: var(--watt-color-primary);\n }\n }\n }\n }\n `,\n template: `\n <vater-flex direction=\"column\" fill=\"vertical\">\n <nav\n mat-tab-nav-bar\n [disableRipple]=\"true\"\n animationDuration=\"0ms\"\n [mat-stretch-tabs]=\"false\"\n [tabPanel]=\"tabPanel\"\n >\n @for (tab of tabElements(); track tab) {\n <a mat-tab-link [routerLink]=\"tab.link()\" routerLinkActive=\"active\">\n {{ tab.label() }}\n </a>\n }\n </nav>\n\n <mat-tab-nav-panel #tabPanel><router-outlet /></mat-tab-nav-panel>\n </vater-flex>\n `,\n})\nexport class WattLinkTabsComponent {\n tabElements = contentChildren(WattLinkTabComponent);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, TemplateRef, input, output, viewChild } from '@angular/core';\n\n@Component({\n selector: 'watt-tab',\n template: `<ng-template>\n <ng-content />\n </ng-template>`,\n})\nexport class WattTabComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n label = input<string>('');\n changed = output<void>();\n\n emitChange() {\n this.changed.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-tabs-action',\n template: `<ng-content />`,\n})\nexport class WattTabsActionComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n AfterViewInit,\n ViewEncapsulation,\n inject,\n HostBinding,\n contentChild,\n viewChild,\n input,\n contentChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatTabGroup, MatTabsModule } from '@angular/material/tabs';\n\nimport { WattTabComponent } from './watt-tab.component';\nimport { WattTabsActionComponent } from './watt-tabs-action.component';\n\n@Component({\n selector: 'watt-tabs',\n styleUrls: ['./watt-tabs.component.scss'],\n templateUrl: './watt-tabs.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [NgTemplateOutlet, MatTabsModule],\n})\nexport class WattTabsComponent implements AfterViewInit {\n private readonly cdr = inject(ChangeDetectorRef);\n\n variant = input<string>();\n\n @HostBinding('class')\n get hostClass() {\n return this.variant() ? `watt-tabs-${this.variant()}` : '';\n }\n\n tabElements = contentChildren(WattTabComponent);\n activeTabIndex = 0;\n\n tabGroup = viewChild.required(MatTabGroup);\n\n actionsTab = contentChild(WattTabsActionComponent);\n\n ngAfterViewInit() {\n this.cdr.detectChanges();\n }\n\n emitSelectedTabChange(selectedIndex: number) {\n this.activeTabIndex = selectedIndex;\n const currentTab = this.tabElements().find((tab, index) => index === selectedIndex);\n currentTab?.emitChange();\n }\n\n setSelectedIndex(index: number) {\n this.tabGroup().selectedIndex = index;\n }\n\n triggerChange() {\n this.emitSelectedTabChange(this.activeTabIndex);\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-tab-group\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n animationDuration=\"0ms\"\n [disableRipple]=\"true\"\n (selectedIndexChange)=\"emitSelectedTabChange($event)\"\n>\n @for (tab of tabElements(); track tab) {\n <mat-tab [label]=\"tab.label()\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </mat-tab>\n }\n\n @if (actionsTab()) {\n <mat-tab labelClass=\"watt-tabs-action\" [disabled]=\"true\">\n <ng-template mat-tab-label>\n <ng-content />\n </ng-template>\n </mat-tab>\n }\n</mat-tab-group>\n","//#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 { WattLinkTabComponent } from './watt-link-tab.component';\nimport { WattLinkTabsComponent } from './watt-link-tabs.component';\n\nimport { WattTabComponent } from './watt-tab.component';\nimport { WattTabsActionComponent } from './watt-tabs-action.component';\nimport { WattTabsComponent } from './watt-tabs.component';\n\nexport { WattTabComponent } from './watt-tab.component';\nexport { WattTabsActionComponent } from './watt-tabs-action.component';\nexport { WattTabsComponent } from './watt-tabs.component';\n\nexport { WattLinkTabComponent } from './watt-link-tab.component';\nexport { WattLinkTabsComponent } from './watt-link-tabs.component';\n\nexport const WATT_TABS = [WattTabsComponent, WattTabComponent, WattTabsActionComponent];\nexport const WATT_LINK_TABS = [WattLinkTabsComponent, WattLinkTabComponent];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,oBAAoB,CAAA;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;AAChC,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAU;uGAFpB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,gUAFrB,CAAE,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAED,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,CAAE,CAAA;AACb,iBAAA;;;ACvBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MA0Fa,qBAAqB,CAAA;AAChC,IAAA,WAAW,GAAG,eAAe,CAAC,oBAAoB,CAAC;uGADxC,qBAAqB,EAAA,IAAA,EAAA,EAAA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,UAAA,EAAA,CAAA;kBAR7B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAGN,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,OAAO,EACvC,OAAA,EAAA,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,gpCAAA,EAAA,MAAA,EAAA,CAAA,syHAAA,CAAA,EAAA;8BAQtC,SAAS,EAAA,CAAA;sBADZ,WAAW;uBAAC,OAAO;;;AElDtB;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAea,MAAA,SAAS,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB;MACzE,cAAc,GAAG,CAAC,qBAAqB,EAAE,oBAAoB;;ACjC1E;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-tabs.mjs","sources":["../../../libs/watt/package/tabs/watt-link-tab.component.ts","../../../libs/watt/package/tabs/watt-link-tabs.component.ts","../../../libs/watt/package/tabs/watt-tab.component.ts","../../../libs/watt/package/tabs/watt-tabs-action.component.ts","../../../libs/watt/package/tabs/watt-tabs.component.ts","../../../libs/watt/package/tabs/watt-tabs.component.html","../../../libs/watt/package/tabs/index.ts","../../../libs/watt/package/tabs/energinet-watt-tabs.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 } from '@angular/core';\n\n@Component({\n selector: 'watt-link-tab',\n template: ``,\n})\nexport class WattLinkTabComponent {\n label = input.required<string>();\n link = input.required<string>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, ViewEncapsulation, contentChildren } from '@angular/core';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\nimport { MatTabsModule } from '@angular/material/tabs';\n\nimport { VaterFlexComponent } from '@energinet/watt/vater';\nimport { WattLinkTabComponent } from './watt-link-tab.component';\n\n@Component({\n selector: 'watt-link-tabs',\n encapsulation: ViewEncapsulation.None,\n imports: [MatTabsModule, RouterOutlet, RouterLink, RouterLinkActive, VaterFlexComponent],\n styles: `\n @use '@energinet-datahub/watt/utils' as watt;\n\n watt-link-tabs {\n .mat-mdc-tab-header {\n box-shadow: var(--watt-bottom-box-shadow);\n background-color: var(--watt-color-neutral-white);\n }\n\n .mat-mdc-tab-nav-panel {\n display: block;\n position: relative;\n height: 100%;\n }\n\n .mat-mdc-tab-links,\n .mat-focus-indicator.mat-mdc-tab-link.active .mdc-tab__text-label {\n color: var(--mat-tab-header-active-label-text-color);\n }\n\n .mat-mdc-tab-labels,\n .mat-mdc-tab-links {\n padding-left: var(--watt-space-ml);\n }\n\n .mat-mdc-tab,\n .mat-mdc-tab-link {\n min-width: 120px;\n opacity: 1;\n\n .mdc-tab__content {\n @include watt.typography-watt-button;\n color: var(--watt-on-light-medium-emphasis);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n border-bottom: 2px solid var(--watt-color-primary);\n }\n\n &.mat-mdc-tab-active,\n &.mat-mdc-tab-link.active,\n &.mat-mdc-tab:hover,\n &.mat-mdc-tab-link:hover {\n color: var(--watt-on-light-medium-emphasis);\n\n .mdc-tab__content {\n color: var(--watt-color-primary);\n }\n }\n }\n }\n `,\n template: `\n <vater-flex autoSize fill=\"vertical\">\n <nav\n mat-tab-nav-bar\n [disableRipple]=\"true\"\n animationDuration=\"0ms\"\n [mat-stretch-tabs]=\"false\"\n [tabPanel]=\"tabPanel\"\n >\n @for (tab of tabElements(); track tab) {\n <a mat-tab-link [routerLink]=\"tab.link()\" routerLinkActive=\"active\">\n {{ tab.label() }}\n </a>\n }\n </nav>\n\n <mat-tab-nav-panel #tabPanel><router-outlet /></mat-tab-nav-panel>\n </vater-flex>\n `,\n})\nexport class WattLinkTabsComponent {\n tabElements = contentChildren(WattLinkTabComponent);\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, TemplateRef, input, output, viewChild } from '@angular/core';\n\n@Component({\n selector: 'watt-tab',\n template: `<ng-template>\n <ng-content />\n </ng-template>`,\n})\nexport class WattTabComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n label = input<string>('');\n changed = output<void>();\n\n emitChange() {\n this.changed.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-tabs-action',\n template: `<ng-content />`,\n})\nexport class WattTabsActionComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n AfterViewInit,\n ViewEncapsulation,\n inject,\n HostBinding,\n contentChild,\n viewChild,\n input,\n contentChildren,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MatTabGroup, MatTabsModule } from '@angular/material/tabs';\n\nimport { WattTabComponent } from './watt-tab.component';\nimport { WattTabsActionComponent } from './watt-tabs-action.component';\n\n@Component({\n selector: 'watt-tabs',\n styleUrls: ['./watt-tabs.component.scss'],\n templateUrl: './watt-tabs.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [NgTemplateOutlet, MatTabsModule],\n})\nexport class WattTabsComponent implements AfterViewInit {\n private readonly cdr = inject(ChangeDetectorRef);\n\n variant = input<string>();\n\n @HostBinding('class')\n get hostClass() {\n return this.variant() ? `watt-tabs-${this.variant()}` : '';\n }\n\n tabElements = contentChildren(WattTabComponent);\n activeTabIndex = 0;\n\n tabGroup = viewChild.required(MatTabGroup);\n\n actionsTab = contentChild(WattTabsActionComponent);\n\n ngAfterViewInit() {\n this.cdr.detectChanges();\n }\n\n emitSelectedTabChange(selectedIndex: number) {\n this.activeTabIndex = selectedIndex;\n const currentTab = this.tabElements().find((tab, index) => index === selectedIndex);\n currentTab?.emitChange();\n }\n\n setSelectedIndex(index: number) {\n this.tabGroup().selectedIndex = index;\n }\n\n triggerChange() {\n this.emitSelectedTabChange(this.activeTabIndex);\n }\n}\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<mat-tab-group\n [mat-stretch-tabs]=\"false\"\n dynamicHeight\n animationDuration=\"0ms\"\n [disableRipple]=\"true\"\n (selectedIndexChange)=\"emitSelectedTabChange($event)\"\n>\n @for (tab of tabElements(); track tab) {\n <mat-tab [label]=\"tab.label()\">\n <ng-container *ngTemplateOutlet=\"tab.templateRef()\" />\n </mat-tab>\n }\n\n @if (actionsTab()) {\n <mat-tab labelClass=\"watt-tabs-action\" [disabled]=\"true\">\n <ng-template mat-tab-label>\n <ng-content />\n </ng-template>\n </mat-tab>\n }\n</mat-tab-group>\n","//#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 { WattLinkTabComponent } from './watt-link-tab.component';\nimport { WattLinkTabsComponent } from './watt-link-tabs.component';\n\nimport { WattTabComponent } from './watt-tab.component';\nimport { WattTabsActionComponent } from './watt-tabs-action.component';\nimport { WattTabsComponent } from './watt-tabs.component';\n\nexport { WattTabComponent } from './watt-tab.component';\nexport { WattTabsActionComponent } from './watt-tabs-action.component';\nexport { WattTabsComponent } from './watt-tabs.component';\n\nexport { WattLinkTabComponent } from './watt-link-tab.component';\nexport { WattLinkTabsComponent } from './watt-link-tabs.component';\n\nexport const WATT_TABS = [WattTabsComponent, WattTabComponent, WattTabsActionComponent];\nexport const WATT_LINK_TABS = [WattLinkTabsComponent, WattLinkTabComponent];\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,oBAAoB,CAAA;AAC/B,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;AAChC,IAAA,IAAI,GAAG,KAAK,CAAC,QAAQ,EAAU;uGAFpB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,gUAFrB,CAAE,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAED,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,CAAE,CAAA;AACb,iBAAA;;;ACvBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MA0Fa,qBAAqB,CAAA;AAChC,IAAA,WAAW,GAAG,eAAe,CAAC,oBAAoB,CAAC;uGADxC,qBAAqB,EAAA,IAAA,EAAA,EA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AAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,OAAO,EACvC,OAAA,EAAA,CAAC,gBAAgB,EAAE,aAAa,CAAC,EAAA,QAAA,EAAA,gpCAAA,EAAA,MAAA,EAAA,CAAA,syHAAA,CAAA,EAAA;8BAQtC,SAAS,EAAA,CAAA;sBADZ,WAAW;uBAAC,OAAO;;;AElDtB;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAea,MAAA,SAAS,GAAG,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,uBAAuB;MACzE,cAAc,GAAG,CAAC,qBAAqB,EAAE,oBAAoB;;ACjC1E;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { HostBinding, Input, Directive, ViewEncapsulation, Component } from '@angular/core';
2
+ import { input, booleanAttribute, computed, Directive, ViewEncapsulation, Component } from '@angular/core';
3
3
 
4
4
  //#region License
5
5
  /**
@@ -21,40 +21,89 @@ import { HostBinding, Input, Directive, ViewEncapsulation, Component } from '@an
21
21
  //#endregion
22
22
  /* eslint-disable @angular-eslint/no-input-rename */
23
23
  class VaterUtilityDirective {
24
+ /** Center the element horizontally and vertically. */
25
+ center = input(false, { transform: booleanAttribute });
24
26
  /** Stretch the element to fill the available space in one or both directions. */
25
- fill;
27
+ fill = input();
26
28
  /** Position the element absolute with the provided inset value. */
27
- inset;
28
- center;
29
- get _class() {
30
- return [this.fill, this.inset].filter(Boolean);
31
- }
32
- get _center() {
33
- return this.center === '';
34
- }
29
+ inset = input();
30
+ /** Make the element scrollable. */
31
+ scrollable = input(false, { transform: booleanAttribute });
32
+ // Computed class names
33
+ fillClass = computed(() => this.fill() && `vater-fill-${this.fill()}`);
34
+ insetClass = computed(() => this.inset() && `vater-inset-${this.inset()}`);
35
+ class = computed(() => [this.fillClass(), this.insetClass()].filter(Boolean));
35
36
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterUtilityDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
36
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.1", type: VaterUtilityDirective, isStandalone: true, selector: "[vater]", inputs: { fill: ["fill", "fill", (value) => `vater-fill-${value}`], inset: ["inset", "inset", (value) => `vater-inset-${value}`], center: "center" }, host: { properties: { "class": "this._class", "class.vater-center": "this._center" } }, ngImport: i0 });
37
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: VaterUtilityDirective, isStandalone: true, selector: "[vater]", inputs: { center: { classPropertyName: "center", publicName: "center", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, inset: { classPropertyName: "inset", publicName: "inset", isSignal: true, isRequired: false, transformFunction: null }, scrollable: { classPropertyName: "scrollable", publicName: "scrollable", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()", "class.vater-center": "center()", "class.vater-scrollable": "scrollable()" } }, ngImport: i0 });
37
38
  }
38
39
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterUtilityDirective, decorators: [{
39
40
  type: Directive,
40
41
  args: [{
41
42
  selector: '[vater]',
43
+ host: {
44
+ '[class]': 'class()',
45
+ '[class.vater-center]': 'center()',
46
+ '[class.vater-scrollable]': 'scrollable()',
47
+ },
42
48
  }]
43
- }], propDecorators: { fill: [{
44
- type: Input,
45
- args: [{ transform: (value) => `vater-fill-${value}` }]
46
- }], inset: [{
47
- type: Input,
48
- args: [{ transform: (value) => `vater-inset-${value}` }]
49
- }], center: [{
50
- type: Input
51
- }], _class: [{
52
- type: HostBinding,
53
- args: ['class']
54
- }], _center: [{
55
- type: HostBinding,
56
- args: ['class.vater-center']
57
- }] } });
49
+ }] });
50
+
51
+ //#region License
52
+ /**
53
+ * @license
54
+ * Copyright 2020 Energinet DataHub A/S
55
+ *
56
+ * Licensed under the Apache License, Version 2.0 (the "License2");
57
+ * you may not use this file except in compliance with the License.
58
+ * You may obtain a copy of the License at
59
+ *
60
+ * http://www.apache.org/licenses/LICENSE-2.0
61
+ *
62
+ * Unless required by applicable law or agreed to in writing, software
63
+ * distributed under the License is distributed on an "AS IS" BASIS,
64
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
65
+ * See the License for the specific language governing permissions and
66
+ * limitations under the License.
67
+ */
68
+ //#endregion
69
+ class VaterLayoutDirective {
70
+ /** Cross axis alignment of the flex items. */
71
+ align = input();
72
+ /** Direction of the flex items. Defaults to `column`. */
73
+ direction = input('column');
74
+ /** Spacing between the flex items. */
75
+ gap = input();
76
+ /** Main axis alignment of the flex items. */
77
+ justify = input();
78
+ /** Offset to apply along the main axis. */
79
+ offset = input();
80
+ /** Whether the flex items should wrap. */
81
+ wrap = input(false, { transform: booleanAttribute });
82
+ // Computed class names
83
+ alignClass = computed(() => this.align() && `vater-align-${this.align()}`);
84
+ directionClass = computed(() => this.direction() && `vater-${this.direction()}`);
85
+ gapClass = computed(() => this.gap() && `vater-gap-${this.gap()}`);
86
+ justifyClass = computed(() => this.justify() && `vater-justify-${this.justify()}`);
87
+ offsetClass = computed(() => this.offset() && `vater-offset-${this.offset()}`);
88
+ class = computed(() => [
89
+ this.alignClass(),
90
+ this.directionClass(),
91
+ this.gapClass(),
92
+ this.justifyClass(),
93
+ this.offsetClass(),
94
+ ].filter(Boolean));
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterLayoutDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
96
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: VaterLayoutDirective, isStandalone: true, inputs: { align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "offset", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()", "class.vater-wrap": "wrap()" } }, ngImport: i0 });
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterLayoutDirective, decorators: [{
99
+ type: Directive,
100
+ args: [{
101
+ host: {
102
+ '[class]': 'class()',
103
+ '[class.vater-wrap]': 'wrap()',
104
+ },
105
+ }]
106
+ }] });
58
107
 
59
108
  //#region License
60
109
  /**
@@ -75,88 +124,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
75
124
  */
76
125
  //#endregion
77
126
  class VaterFlexComponent {
78
- direction = 'column';
79
- grow = '1';
80
- shrink = '1';
81
- basis = 'auto';
82
- gap;
83
- justify;
84
- wrap = 'nowrap';
85
- scrollable;
86
- offset;
87
- get _offset() {
88
- if (!this.offset)
89
- return undefined;
90
- switch (this.direction) {
91
- case 'column':
92
- return `var(--watt-space-${this.offset}) 0`;
93
- case 'row':
94
- return `0 var(--watt-space-${this.offset})`;
95
- }
96
- }
97
- get _gap() {
98
- return this.gap ? `var(--watt-space-${this.gap})` : undefined;
99
- }
100
- get _overflow() {
101
- return this.scrollable === '' ? 'auto' : undefined;
102
- }
127
+ /**
128
+ * When set, sizes the flex items according to their width or height properties.
129
+ * @see https://drafts.csswg.org/css-flexbox-1/#flex-common
130
+ * @remarks
131
+ * Prefer setting `fill` on flex items over using `autoSize`.
132
+ */
133
+ autoSize = input(false, { transform: booleanAttribute });
103
134
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterFlexComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterFlexComponent, isStandalone: true, selector: "vater-flex, [vater-flex]", inputs: { direction: "direction", grow: "grow", shrink: "shrink", basis: "basis", gap: "gap", justify: "justify", wrap: "wrap", scrollable: "scrollable", offset: "offset" }, host: { properties: { "style.flex-direction": "this.direction", "style.--grow": "this.grow", "style.--shrink": "this.shrink", "style.--basis": "this.basis", "style.justify-content": "this.justify", "style.flex-wrap": "this.wrap", "style.padding": "this._offset", "style.gap": "this._gap", "style.overflow": "this._overflow" } }, hostDirectives: [{ directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}vater-flex>*,[vater-flex]>*{flex:var(--grow) var(--shrink) var(--basis)}\n"], encapsulation: i0.ViewEncapsulation.None });
135
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: VaterFlexComponent, isStandalone: true, selector: "vater-flex, [vater-flex]", inputs: { autoSize: { classPropertyName: "autoSize", publicName: "autoSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.vater-flex-auto": "autoSize()" } }, hostDirectives: [{ directive: VaterLayoutDirective, inputs: ["align", "align", "direction", "direction", "justify", "justify", "wrap", "wrap", "gap", "gap", "offset", "offset"] }, { directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset", "scrollable", "scrollable"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
105
136
  }
106
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterFlexComponent, decorators: [{
107
138
  type: Component,
108
139
  args: [{ selector: 'vater-flex, [vater-flex]', encapsulation: ViewEncapsulation.None, hostDirectives: [
140
+ {
141
+ directive: VaterLayoutDirective,
142
+ inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],
143
+ },
109
144
  {
110
145
  directive: VaterUtilityDirective,
111
- inputs: ['center', 'fill', 'inset'],
146
+ inputs: ['center', 'fill', 'inset', 'scrollable'],
112
147
  },
113
- ], template: `<ng-content />`, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}vater-flex>*,[vater-flex]>*{flex:var(--grow) var(--shrink) var(--basis)}\n"] }]
114
- }], propDecorators: { direction: [{
115
- type: Input
116
- }, {
117
- type: HostBinding,
118
- args: ['style.flex-direction']
119
- }], grow: [{
120
- type: Input
121
- }, {
122
- type: HostBinding,
123
- args: ['style.--grow']
124
- }], shrink: [{
125
- type: Input
126
- }, {
127
- type: HostBinding,
128
- args: ['style.--shrink']
129
- }], basis: [{
130
- type: Input
131
- }, {
132
- type: HostBinding,
133
- args: ['style.--basis']
134
- }], gap: [{
135
- type: Input
136
- }], justify: [{
137
- type: Input
138
- }, {
139
- type: HostBinding,
140
- args: ['style.justify-content']
141
- }], wrap: [{
142
- type: Input
143
- }, {
144
- type: HostBinding,
145
- args: ['style.flex-wrap']
146
- }], scrollable: [{
147
- type: Input
148
- }], offset: [{
149
- type: Input
150
- }], _offset: [{
151
- type: HostBinding,
152
- args: ['style.padding']
153
- }], _gap: [{
154
- type: HostBinding,
155
- args: ['style.gap']
156
- }], _overflow: [{
157
- type: HostBinding,
158
- args: ['style.overflow']
159
- }] } });
148
+ ], host: { '[class.vater-flex-auto]': 'autoSize()' }, template: `<ng-content />`, styles: ["vater-flex,[vater-flex]{display:flex;line-height:normal}\n"] }]
149
+ }] });
160
150
 
161
151
  //#region License
162
152
  /**
@@ -178,11 +168,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
178
168
  //#endregion
179
169
  class VaterSpacerComponent {
180
170
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterSpacerComponent, isStandalone: true, selector: "vater-spacer, [vater-spacer]", ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"], encapsulation: i0.ViewEncapsulation.None });
171
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterSpacerComponent, isStandalone: true, selector: "vater-spacer, [vater-spacer]", ngImport: i0, template: '<ng-content />', isInline: true, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"], encapsulation: i0.ViewEncapsulation.None });
182
172
  }
183
173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterSpacerComponent, decorators: [{
184
174
  type: Component,
185
- args: [{ selector: 'vater-spacer, [vater-spacer]', encapsulation: ViewEncapsulation.None, template: `<ng-content />`, styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"] }]
175
+ args: [{ selector: 'vater-spacer, [vater-spacer]', encapsulation: ViewEncapsulation.None, template: '<ng-content />', styles: ["vater-spacer,[vater-spacer]{flex:1;align-self:stretch}\n"] }]
186
176
  }] });
187
177
 
188
178
  //#region License
@@ -204,61 +194,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
204
194
  */
205
195
  //#endregion
206
196
  class VaterStackComponent {
207
- align = 'center';
208
- direction = 'column';
209
- gap;
210
- justify;
211
- offset;
212
- get _offset() {
213
- if (!this.offset)
214
- return undefined;
215
- switch (this.direction) {
216
- case 'column':
217
- return `var(--watt-space-${this.offset}) 0`;
218
- case 'row':
219
- return `0 var(--watt-space-${this.offset})`;
220
- }
221
- }
222
- get _gap() {
223
- return this.gap ? `var(--watt-space-${this.gap})` : undefined;
224
- }
225
197
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
226
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterStackComponent, isStandalone: true, selector: "vater-stack, [vater-stack]", inputs: { align: "align", direction: "direction", gap: "gap", justify: "justify", offset: "offset" }, host: { properties: { "style.align-items": "this.align", "style.flex-direction": "this.direction", "style.justify-content": "this.justify", "style.padding": "this._offset", "style.gap": "this._gap" } }, hostDirectives: [{ directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
198
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.1", type: VaterStackComponent, isStandalone: true, selector: "vater-stack, [vater-stack]", hostDirectives: [{ directive: VaterLayoutDirective, inputs: ["align", "align", "direction", "direction", "justify", "justify", "wrap", "wrap", "gap", "gap", "offset", "offset"] }, { directive: VaterUtilityDirective, inputs: ["center", "center", "fill", "fill", "inset", "inset", "scrollable", "scrollable"] }], ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"], encapsulation: i0.ViewEncapsulation.None });
227
199
  }
228
200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: VaterStackComponent, decorators: [{
229
201
  type: Component,
230
202
  args: [{ selector: 'vater-stack, [vater-stack]', encapsulation: ViewEncapsulation.None, hostDirectives: [
203
+ {
204
+ directive: VaterLayoutDirective,
205
+ inputs: ['align', 'direction', 'justify', 'wrap', 'gap', 'offset'],
206
+ },
231
207
  {
232
208
  directive: VaterUtilityDirective,
233
- inputs: ['center', 'fill', 'inset'],
209
+ inputs: ['center', 'fill', 'inset', 'scrollable'],
234
210
  },
235
211
  ], template: `<ng-content />`, styles: ["vater-stack,[vater-stack]{display:flex;line-height:normal}\n"] }]
236
- }], propDecorators: { align: [{
237
- type: Input
238
- }, {
239
- type: HostBinding,
240
- args: ['style.align-items']
241
- }], direction: [{
242
- type: Input
243
- }, {
244
- type: HostBinding,
245
- args: ['style.flex-direction']
246
- }], gap: [{
247
- type: Input
248
- }], justify: [{
249
- type: Input
250
- }, {
251
- type: HostBinding,
252
- args: ['style.justify-content']
253
- }], offset: [{
254
- type: Input
255
- }], _offset: [{
256
- type: HostBinding,
257
- args: ['style.padding']
258
- }], _gap: [{
259
- type: HostBinding,
260
- args: ['style.gap']
261
- }] } });
212
+ }] });
262
213
 
263
214
  //#region License
264
215
  /**
@@ -283,5 +234,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
283
234
  * Generated bundle index. Do not edit.
284
235
  */
285
236
 
286
- export { VaterFlexComponent, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective };
237
+ export { VaterFlexComponent, VaterLayoutDirective, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective };
287
238
  //# sourceMappingURL=energinet-watt-vater.mjs.map