@energinet/watt 4.3.62 → 4.3.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/energinet-watt-badge.mjs +9 -9
- package/fesm2022/energinet-watt-badge.mjs.map +1 -1
- package/fesm2022/energinet-watt-breadcrumbs.mjs +7 -7
- package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -1
- package/fesm2022/energinet-watt-button.mjs +13 -13
- package/fesm2022/energinet-watt-button.mjs.map +1 -1
- package/fesm2022/energinet-watt-card.mjs +9 -9
- package/fesm2022/energinet-watt-card.mjs.map +1 -1
- package/fesm2022/energinet-watt-checkbox.mjs +6 -6
- package/fesm2022/energinet-watt-checkbox.mjs.map +1 -1
- package/fesm2022/energinet-watt-chip.mjs +58 -58
- package/fesm2022/energinet-watt-chip.mjs.map +1 -1
- package/fesm2022/energinet-watt-clipboard.mjs +7 -7
- package/fesm2022/energinet-watt-clipboard.mjs.map +1 -1
- package/fesm2022/energinet-watt-code.mjs +14 -14
- package/fesm2022/energinet-watt-code.mjs.map +1 -1
- package/fesm2022/energinet-watt-core-breakpoints.mjs +3 -3
- package/fesm2022/energinet-watt-core-color.mjs +3 -3
- package/fesm2022/energinet-watt-core-date.mjs +12 -12
- package/fesm2022/energinet-watt-core-date.mjs.map +1 -1
- package/fesm2022/energinet-watt-data.mjs +29 -29
- package/fesm2022/energinet-watt-data.mjs.map +1 -1
- package/fesm2022/energinet-watt-datetime-field.mjs +10 -10
- package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-description-list.mjs +14 -14
- package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
- package/fesm2022/energinet-watt-drawer.mjs +24 -24
- package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropdown.mjs +27 -25
- package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropzone.mjs +19 -19
- package/fesm2022/energinet-watt-dropzone.mjs.map +1 -1
- package/fesm2022/energinet-watt-empty-state.mjs +24 -24
- package/fesm2022/energinet-watt-empty-state.mjs.map +1 -1
- package/fesm2022/energinet-watt-expandable-card.mjs +14 -14
- package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -1
- package/fesm2022/energinet-watt-field.mjs +35 -35
- package/fesm2022/energinet-watt-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-file-field.mjs +6 -6
- package/fesm2022/energinet-watt-file-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-heading.mjs +5 -5
- package/fesm2022/energinet-watt-heading.mjs.map +1 -1
- package/fesm2022/energinet-watt-icon-flags.mjs +33 -33
- package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -1
- package/fesm2022/energinet-watt-icon.mjs +10 -10
- package/fesm2022/energinet-watt-icon.mjs.map +1 -1
- package/fesm2022/energinet-watt-json-viewer.mjs +37 -37
- package/fesm2022/energinet-watt-json-viewer.mjs.map +1 -1
- package/fesm2022/energinet-watt-menu.mjs +15 -15
- package/fesm2022/energinet-watt-menu.mjs.map +1 -1
- package/fesm2022/energinet-watt-modal.mjs +24 -24
- package/fesm2022/energinet-watt-modal.mjs.map +1 -1
- package/fesm2022/energinet-watt-paginator.mjs +14 -14
- package/fesm2022/energinet-watt-paginator.mjs.map +1 -1
- package/fesm2022/energinet-watt-phone-field.mjs +10 -10
- package/fesm2022/energinet-watt-phone-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-__shared.mjs +24 -24
- package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs +28 -28
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs +10 -10
- package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-progress-tracker.mjs +11 -11
- package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -1
- package/fesm2022/energinet-watt-query-params.mjs +3 -3
- package/fesm2022/energinet-watt-radio.mjs +20 -20
- package/fesm2022/energinet-watt-radio.mjs.map +1 -1
- package/fesm2022/energinet-watt-search.mjs +14 -14
- package/fesm2022/energinet-watt-search.mjs.map +1 -1
- package/fesm2022/energinet-watt-segmented-buttons.mjs +11 -11
- package/fesm2022/energinet-watt-segmented-buttons.mjs.map +1 -1
- package/fesm2022/energinet-watt-separator.mjs +5 -5
- package/fesm2022/energinet-watt-separator.mjs.map +1 -1
- package/fesm2022/energinet-watt-shell.mjs +20 -20
- package/fesm2022/energinet-watt-shell.mjs.map +1 -1
- package/fesm2022/energinet-watt-skeleton.mjs +6 -6
- package/fesm2022/energinet-watt-skeleton.mjs.map +1 -1
- package/fesm2022/energinet-watt-slide-toggle.mjs +6 -6
- package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
- package/fesm2022/energinet-watt-slider.mjs +8 -8
- package/fesm2022/energinet-watt-slider.mjs.map +1 -1
- package/fesm2022/energinet-watt-spinner.mjs +6 -6
- package/fesm2022/energinet-watt-spinner.mjs.map +1 -1
- package/fesm2022/energinet-watt-stepper.mjs +17 -17
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
- package/fesm2022/energinet-watt-table.mjs +45 -45
- package/fesm2022/energinet-watt-table.mjs.map +1 -1
- package/fesm2022/energinet-watt-tabs.mjs +22 -22
- package/fesm2022/energinet-watt-tabs.mjs.map +1 -1
- package/fesm2022/energinet-watt-text-field.mjs +18 -18
- package/fesm2022/energinet-watt-text-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-textarea-field.mjs +16 -16
- package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-toast.mjs +6 -6
- package/fesm2022/energinet-watt-tooltip.mjs +18 -18
- package/fesm2022/energinet-watt-tooltip.mjs.map +1 -1
- package/fesm2022/energinet-watt-utils-css.mjs +3 -3
- package/fesm2022/energinet-watt-utils-intersection-observer.mjs +3 -3
- package/fesm2022/energinet-watt-utils-resize-observer.mjs +6 -6
- package/fesm2022/energinet-watt-validation-message.mjs +11 -11
- package/fesm2022/energinet-watt-validation-message.mjs.map +1 -1
- package/fesm2022/energinet-watt-vater.mjs +60 -60
- package/fesm2022/energinet-watt-vater.mjs.map +1 -1
- package/fesm2022/energinet-watt-year-field.mjs +11 -11
- package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs +12 -12
- package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
- package/package.json +9 -9
|
@@ -31,10 +31,10 @@ import { Subject } from 'rxjs';
|
|
|
31
31
|
class WattFieldIntlService {
|
|
32
32
|
changes = new Subject();
|
|
33
33
|
required = 'Field is required';
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
35
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
34
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldIntlService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
35
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldIntlService, providedIn: 'root' });
|
|
36
36
|
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldIntlService, decorators: [{
|
|
38
38
|
type: Injectable,
|
|
39
39
|
args: [{ providedIn: 'root' }]
|
|
40
40
|
}] });
|
|
@@ -58,10 +58,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
58
58
|
*/
|
|
59
59
|
//#endregion
|
|
60
60
|
class WattFieldErrorComponent {
|
|
61
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
62
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
61
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFieldErrorComponent, isStandalone: true, selector: "watt-field-error", ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["watt-field-error{color:var(--watt-color-state-danger)}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldErrorComponent, decorators: [{
|
|
65
65
|
type: Component,
|
|
66
66
|
args: [{ selector: 'watt-field-error', template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: ["watt-field-error{color:var(--watt-color-state-danger)}\n"] }]
|
|
67
67
|
}] });
|
|
@@ -87,32 +87,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
87
87
|
class WattFieldComponent {
|
|
88
88
|
intl = inject(WattFieldIntlService);
|
|
89
89
|
elementRef = inject(ElementRef);
|
|
90
|
-
control = input(null, ...(ngDevMode ? [{ debugName: "control" }] : []));
|
|
91
|
-
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
92
|
-
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
90
|
+
control = input(null, ...(ngDevMode ? [{ debugName: "control" }] : /* istanbul ignore next */ []));
|
|
91
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
92
|
+
id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : /* istanbul ignore next */ []));
|
|
93
93
|
/** @deprecated Use `displayMode` instead. */
|
|
94
|
-
chipMode = input(false, ...(ngDevMode ? [{ debugName: "chipMode" }] : []));
|
|
95
|
-
tooltip = input(...(ngDevMode ? [undefined, { debugName: "tooltip" }] : []));
|
|
96
|
-
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
97
|
-
anchorName = input(...(ngDevMode ? [undefined, { debugName: "anchorName" }] : []));
|
|
98
|
-
displayMode = input('box', ...(ngDevMode ? [{ debugName: "displayMode" }] : []));
|
|
99
|
-
className = computed(() => `watt-field--${this.chipMode() ? 'chip' : this.displayMode()}`, ...(ngDevMode ? [{ debugName: "className" }] : []));
|
|
94
|
+
chipMode = input(false, ...(ngDevMode ? [{ debugName: "chipMode" }] : /* istanbul ignore next */ []));
|
|
95
|
+
tooltip = input(...(ngDevMode ? [undefined, { debugName: "tooltip" }] : /* istanbul ignore next */ []));
|
|
96
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
97
|
+
anchorName = input(...(ngDevMode ? [undefined, { debugName: "anchorName" }] : /* istanbul ignore next */ []));
|
|
98
|
+
displayMode = input('box', ...(ngDevMode ? [{ debugName: "displayMode" }] : /* istanbul ignore next */ []));
|
|
99
|
+
className = computed(() => `watt-field--${this.chipMode() ? 'chip' : this.displayMode()}`, ...(ngDevMode ? [{ debugName: "className" }] : /* istanbul ignore next */ []));
|
|
100
100
|
/**
|
|
101
101
|
* Whether the input should receive focus when the component is rendered.
|
|
102
102
|
*/
|
|
103
|
-
autoFocus = input(false, ...(ngDevMode ? [{ debugName: "autoFocus" }] : []));
|
|
103
|
+
autoFocus = input(false, ...(ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []));
|
|
104
104
|
/** @ignore */
|
|
105
|
-
labelElement = viewChild('label', ...(ngDevMode ? [{ debugName: "labelElement" }] : []));
|
|
106
|
-
wattLabelElement = viewChild('wattLabel', ...(ngDevMode ? [{ debugName: "wattLabelElement" }] : []));
|
|
107
|
-
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
108
|
-
filler = computed(() => this.placeholder().slice(this.value().length), ...(ngDevMode ? [{ debugName: "filler" }] : []));
|
|
109
|
-
ghost = computed(() => this.value().slice(0, this.placeholder().length), ...(ngDevMode ? [{ debugName: "ghost" }] : []));
|
|
110
|
-
errors = signal(null, ...(ngDevMode ? [{ debugName: "errors" }] : []));
|
|
111
|
-
isRequired = signal(false, ...(ngDevMode ? [{ debugName: "isRequired" }] : []));
|
|
112
|
-
isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired'], ...(ngDevMode ? [{ debugName: "isEmpty" }] : []));
|
|
113
|
-
showErrors = input(true, ...(ngDevMode ? [{ debugName: "showErrors" }] : []));
|
|
105
|
+
labelElement = viewChild('label', ...(ngDevMode ? [{ debugName: "labelElement" }] : /* istanbul ignore next */ []));
|
|
106
|
+
wattLabelElement = viewChild('wattLabel', ...(ngDevMode ? [{ debugName: "wattLabelElement" }] : /* istanbul ignore next */ []));
|
|
107
|
+
value = signal('', ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
108
|
+
filler = computed(() => this.placeholder().slice(this.value().length), ...(ngDevMode ? [{ debugName: "filler" }] : /* istanbul ignore next */ []));
|
|
109
|
+
ghost = computed(() => this.value().slice(0, this.placeholder().length), ...(ngDevMode ? [{ debugName: "ghost" }] : /* istanbul ignore next */ []));
|
|
110
|
+
errors = signal(null, ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
|
|
111
|
+
isRequired = signal(false, ...(ngDevMode ? [{ debugName: "isRequired" }] : /* istanbul ignore next */ []));
|
|
112
|
+
isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired'], ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
|
|
113
|
+
showErrors = input(true, ...(ngDevMode ? [{ debugName: "showErrors" }] : /* istanbul ignore next */ []));
|
|
114
114
|
// Used for text fields with autocomplete
|
|
115
|
-
wrapper = viewChild('wrapper', ...(ngDevMode ? [{ debugName: "wrapper" }] : []));
|
|
115
|
+
wrapper = viewChild('wrapper', ...(ngDevMode ? [{ debugName: "wrapper" }] : /* istanbul ignore next */ []));
|
|
116
116
|
constructor() {
|
|
117
117
|
const control$ = toObservable(this.control).pipe(filter((control) => control !== null));
|
|
118
118
|
// Track value in order to update ghost and filler
|
|
@@ -137,8 +137,8 @@ class WattFieldComponent {
|
|
|
137
137
|
const validators = [Validators.required, WattRangeValidators.required];
|
|
138
138
|
return validators.some((validator) => control.hasValidator(validator));
|
|
139
139
|
}
|
|
140
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
141
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: WattFieldComponent, isStandalone: true, selector: "watt-field", inputs: { control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, chipMode: { classPropertyName: "chipMode", publicName: "chipMode", isSignal: true, isRequired: false, transformFunction: null }, tooltip: { classPropertyName: "tooltip", publicName: "tooltip", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, anchorName: { classPropertyName: "anchorName", publicName: "anchorName", isSignal: true, isRequired: false, transformFunction: null }, displayMode: { classPropertyName: "displayMode", publicName: "displayMode", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, showErrors: { classPropertyName: "showErrors", publicName: "showErrors", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.watt-field--disabled": "control()?.disabled", "class.watt-field--show-errors": "showErrors()", "class": "className()" } }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["label"], descendants: true, isSignal: true }, { propertyName: "wattLabelElement", first: true, predicate: ["wattLabel"], descendants: true, isSignal: true }, { propertyName: "wrapper", first: true, predicate: ["wrapper"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
142
142
|
@if (chipMode() || displayMode() !== 'box') {
|
|
143
143
|
<span [attr.autofocus]="autoFocus() || null" class="watt-label" #wattLabel>
|
|
144
144
|
<ng-container *ngTemplateOutlet="template" />
|
|
@@ -187,7 +187,7 @@ class WattFieldComponent {
|
|
|
187
187
|
</ng-template>
|
|
188
188
|
`, isInline: true, styles: ["[watt-field-disabled=true] watt-field .label,.watt-field--disabled .label{color:var(--watt-disabled-text-label-color)}[watt-field-disabled=true] .watt-field-wrapper,.watt-field--disabled .watt-field-wrapper{background-color:var(--watt-field-disabled-background-color)}watt-field watt-field-hint{display:block}watt-field :is(watt-field-error,watt-field-warning),.ng-valid watt-field :is(watt-field-error,watt-field-warning),watt-field:has(.ng-valid) :is(watt-field-error,watt-field-warning){display:none}form.ng-submitted .ng-invalid watt-field watt-field-hint,form.ng-submitted watt-field:has(.ng-invalid) watt-field-hint,:not(form).ng-touched.ng-invalid watt-field watt-field-hint{display:none}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors :is(watt-field-error,watt-field-warning),form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors :is(watt-field-error,watt-field-warning),:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors :is(watt-field-error,watt-field-warning){display:block}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors .watt-field-wrapper,form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors .watt-field-wrapper,:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors .watt-field-wrapper{border-color:var(--watt-color-state-danger)}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors .label,form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors .label,:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors .label{color:var(--watt-color-state-danger)}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors .label.required:after,form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors .label.required:after,:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors .label.required:after{color:var(--watt-color-state-danger)}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors:has(watt-field-error,watt-field-warning),form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors:has(watt-field-error,watt-field-warning),:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors:has(watt-field-error,watt-field-warning){padding-bottom:0}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .label,form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .label,:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .label{color:var(--watt-text-color)}form.ng-submitted .ng-invalid watt-field.watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .watt-field-wrapper,form.ng-submitted watt-field:has(.ng-invalid).watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .watt-field-wrapper,:not(form).ng-touched.ng-invalid watt-field.watt-field--show-errors:has(watt-field-warning):not(:has(watt-field-error)) .watt-field-wrapper{border-color:var(--watt-color-state-warning)}.watt-field-wrapper input{width:100%;border:none;outline:none;background-color:transparent}.watt-field-placeholder{position:absolute;padding:1px 2px;pointer-events:none;white-space:nowrap}.watt-field--has-placeholder input,.watt-field-placeholder{font-family:Droid Sans Mono,monospace;letter-spacing:-.03em}.watt-field-filler{color:var(--watt-on-light-low-emphasis)}.watt-field-ghost{color:transparent}watt-field{--watt-text-color: var(--watt-on-light-high-emphasis);--watt-disabled-text-label-color: var(--watt-on-light-low-emphasis);--watt-field-disabled-background-color: var(--watt-color-neutral-grey-100);--watt-input-border-radius: 4px;--watt-border-color: var(--watt-on-light-low-emphasis);--watt-label-text-color: var(--watt-text-color);width:100%;display:block}watt-field:not(.watt-field--chip,:has(watt-field-hint)){padding-bottom:20px}watt-field .label{min-height:27px;display:flex;align-items:center}watt-field .label watt-icon{margin-left:var(--watt-space-s)}watt-field .label watt-tooltip{max-width:250px}watt-field .label.required:after{content:\"*\"}watt-field>label,watt-field>.watt-label{color:var(--watt-label-text-color);display:block;width:100%}watt-field>label .watt-field-wrapper,watt-field>.watt-label .watt-field-wrapper{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;display:flex;position:relative;width:100%;padding:0 var(--watt-space-s);border-radius:var(--watt-input-border-radius);border:1px solid var(--watt-border-color);overflow:hidden;color:var(--watt-text-color);align-items:center;gap:var(--watt-space-m);background-color:var(--watt-color-neutral-white)}watt-field>label .watt-field-wrapper:focus-within,watt-field>.watt-label .watt-field-wrapper:focus-within{--watt-border-color: var(--watt-color-primary)}watt-field>label watt-field-hint,watt-field>label watt-field-error,watt-field>label watt-field-warning,watt-field>.watt-label watt-field-hint,watt-field>.watt-label watt-field-error,watt-field>.watt-label watt-field-warning{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0}watt-field>label :not(.watt-field--chip) :is(watt-field-hint,watt-field-error,watt-field-warning),watt-field>.watt-label :not(.watt-field--chip) :is(watt-field-hint,watt-field-error,watt-field-warning){padding:0 var(--watt-space-s)}watt-field:not(.watt-field--box)>:is(label,.watt-label)>vater-flex>.watt-field-wrapper{border:none;padding:0}watt-field.watt-field--chip watt-field-hint,watt-field.watt-field--chip watt-field-error,watt-field.watt-field--chip watt-field-warning{margin-top:var(--watt-space-xs)}watt-field.watt-field--box .watt-field-wrapper{min-height:46px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "directive", type: WattTooltipDirective, selector: "[wattTooltip]", inputs: ["wattTooltip", "wattTooltipPosition", "wattTooltipVariant", "wattTooltipAlwaysVisible"], exportAs: ["wattTooltip"] }, { kind: "component", type: WattFieldErrorComponent, selector: "watt-field-error" }, { kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["center", "fill", "inset", "scrollable", "sticky", "fragment", "contain"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
189
189
|
}
|
|
190
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
190
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldComponent, decorators: [{
|
|
191
191
|
type: Component,
|
|
192
192
|
args: [{ selector: 'watt-field', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
|
|
193
193
|
NgTemplateOutlet,
|
|
@@ -269,10 +269,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
269
269
|
*/
|
|
270
270
|
//#endregion
|
|
271
271
|
class WattFieldHintComponent {
|
|
272
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
273
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
272
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldHintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
273
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFieldHintComponent, isStandalone: true, selector: "watt-field-hint", ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{color:var(--watt-color-neutral-grey-700)}\n"] });
|
|
274
274
|
}
|
|
275
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldHintComponent, decorators: [{
|
|
276
276
|
type: Component,
|
|
277
277
|
args: [{ selector: 'watt-field-hint', template: `<ng-content />`, styles: [":host{color:var(--watt-color-neutral-grey-700)}\n"] }]
|
|
278
278
|
}] });
|
|
@@ -296,10 +296,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
296
296
|
*/
|
|
297
297
|
//#endregion
|
|
298
298
|
class WattFieldWarningComponent {
|
|
299
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
300
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
299
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldWarningComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
300
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFieldWarningComponent, isStandalone: true, selector: "watt-field-warning", ngImport: i0, template: `<ng-content />`, isInline: true, styles: ["watt-field-warning{color:var(--watt-color-state-warning)}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
301
301
|
}
|
|
302
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
302
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFieldWarningComponent, decorators: [{
|
|
303
303
|
type: Component,
|
|
304
304
|
args: [{ selector: 'watt-field-warning', template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: ["watt-field-warning{color:var(--watt-color-state-warning)}\n"] }]
|
|
305
305
|
}] });
|
|
@@ -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/watt-field-warning.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 effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\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 { VaterFlexComponent, VaterUtilityDirective } 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';\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 VaterFlexComponent,\n VaterUtilityDirective,\n ],\n styleUrls: ['./watt-field.component.scss'],\n template: `\n @if (chipMode() || displayMode() !== 'box') {\n <span [attr.autofocus]=\"autoFocus() || null\" class=\"watt-label\" #wattLabel>\n <ng-container *ngTemplateOutlet=\"template\" />\n </span>\n } @else {\n <label [attr.autofocus]=\"autoFocus() || null\" [attr.for]=\"id()\" #label>\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-flex direction=\"row\" gap=\"s\" align=\"center\">\n <div\n vater\n fill=\"horizontal\"\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-flex>\n <ng-content select=\"[popover]\" />\n <ng-content select=\"watt-field-hint\" />\n <ng-content select=\"watt-field-error\" />\n <ng-content select=\"watt-field-warning\" />\n @if (isEmpty()) {\n <watt-field-error>{{ intl.required }}</watt-field-error>\n }\n </ng-template>\n `,\n host: {\n '[class.watt-field--disabled]': 'control()?.disabled',\n '[class.watt-field--show-errors]': 'showErrors()',\n '[class]': 'className()',\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 /** @deprecated Use `displayMode` instead. */\n chipMode = input(false);\n tooltip = input<string>();\n placeholder = input('');\n anchorName = input<string>();\n displayMode = input<'box' | 'chip' | 'content'>('box');\n className = computed(() => `watt-field--${this.chipMode() ? 'chip' : this.displayMode()}`);\n\n /**\n * Whether the input should receive focus when the component is rendered.\n */\n autoFocus = input(false);\n\n /** @ignore */\n labelElement = viewChild<ElementRef<HTMLLabelElement>>('label');\n wattLabelElement = viewChild<ElementRef<HTMLSpanElement>>('wattLabel');\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 errors = signal<ValidationErrors | null>(null);\n isRequired = signal(false);\n isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired']);\n showErrors = input(true);\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 effect(() => {\n if (this.autoFocus()) {\n if (this.chipMode()) {\n this.wattLabelElement()?.nativeElement.focus();\n } else {\n this.labelElement()?.nativeElement.focus();\n }\n }\n });\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\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'watt-field-warning',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-field-warning {\n color: var(--watt-color-state-warning);\n }\n `,\n ],\n})\nexport class WattFieldWarningComponent {}\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 { WattFieldWarningComponent } from './watt-field-warning.component';\nexport { WattFieldIntlService } from './watt-field-intl.service';\n","/**\n * Generated bundle index. Do not edit.\n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AAA,UAAA,EAAA,CAAA;kBAXlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,YAQjB,CAAA,cAAA,CAAgB,EAAA,MAAA,EAAA,CAAA,mDAAA,CAAA,EAAA;;;AC7B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAea,yBAAyB,CAAA;uGAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,yBAAyB,8EAV1B,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6DAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAUf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAZrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,QAAA,EACpB,CAAA,cAAA,CAAgB,EAAA,aAAA,EACX,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,6DAAA,CAAA,EAAA;;;ACvBvC;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/watt-field-warning.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 effect,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\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 { VaterFlexComponent, VaterUtilityDirective } 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';\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 VaterFlexComponent,\n VaterUtilityDirective,\n ],\n styleUrls: ['./watt-field.component.scss'],\n template: `\n @if (chipMode() || displayMode() !== 'box') {\n <span [attr.autofocus]=\"autoFocus() || null\" class=\"watt-label\" #wattLabel>\n <ng-container *ngTemplateOutlet=\"template\" />\n </span>\n } @else {\n <label [attr.autofocus]=\"autoFocus() || null\" [attr.for]=\"id()\" #label>\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-flex direction=\"row\" gap=\"s\" align=\"center\">\n <div\n vater\n fill=\"horizontal\"\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-flex>\n <ng-content select=\"[popover]\" />\n <ng-content select=\"watt-field-hint\" />\n <ng-content select=\"watt-field-error\" />\n <ng-content select=\"watt-field-warning\" />\n @if (isEmpty()) {\n <watt-field-error>{{ intl.required }}</watt-field-error>\n }\n </ng-template>\n `,\n host: {\n '[class.watt-field--disabled]': 'control()?.disabled',\n '[class.watt-field--show-errors]': 'showErrors()',\n '[class]': 'className()',\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 /** @deprecated Use `displayMode` instead. */\n chipMode = input(false);\n tooltip = input<string>();\n placeholder = input('');\n anchorName = input<string>();\n displayMode = input<'box' | 'chip' | 'content'>('box');\n className = computed(() => `watt-field--${this.chipMode() ? 'chip' : this.displayMode()}`);\n\n /**\n * Whether the input should receive focus when the component is rendered.\n */\n autoFocus = input(false);\n\n /** @ignore */\n labelElement = viewChild<ElementRef<HTMLLabelElement>>('label');\n wattLabelElement = viewChild<ElementRef<HTMLSpanElement>>('wattLabel');\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 errors = signal<ValidationErrors | null>(null);\n isRequired = signal(false);\n isEmpty = computed(() => this.errors()?.['required'] || this.errors()?.['rangeRequired']);\n showErrors = input(true);\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 effect(() => {\n if (this.autoFocus()) {\n if (this.chipMode()) {\n this.wattLabelElement()?.nativeElement.focus();\n } else {\n this.labelElement()?.nativeElement.focus();\n }\n }\n });\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\nimport { Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'watt-field-warning',\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-field-warning {\n color: var(--watt-color-state-warning);\n }\n `,\n ],\n})\nexport class WattFieldWarningComponent {}\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 { WattFieldWarningComponent } from './watt-field-warning.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,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA;;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACrBlC;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAea,uBAAuB,C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,EAAA,CAAA;;2FAUf,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAZrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAAA,QAAA,EACpB,CAAA,cAAA,CAAgB,EAAA,aAAA,EACX,iBAAiB,CAAC,IAAI,EAAA,MAAA,EAAA,CAAA,6DAAA,CAAA,EAAA;;;ACvBvC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -22,13 +22,13 @@ import { WattFieldComponent } from '@energinet/watt/field';
|
|
|
22
22
|
*/
|
|
23
23
|
//#endregion
|
|
24
24
|
class WattFileField {
|
|
25
|
-
file = model(...(ngDevMode ? [undefined, { debugName: "file" }] : []));
|
|
26
|
-
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
|
|
27
|
-
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
25
|
+
file = model(...(ngDevMode ? [undefined, { debugName: "file" }] : /* istanbul ignore next */ []));
|
|
26
|
+
label = input('', ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
27
|
+
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
28
28
|
clear = output();
|
|
29
29
|
clearSubscription = this.clear.subscribe(() => this.file.set(undefined));
|
|
30
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
31
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
30
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFileField, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: WattFileField, isStandalone: true, selector: "watt-file-field", inputs: { file: { classPropertyName: "file", publicName: "file", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { file: "fileChange", clear: "clear" }, ngImport: i0, template: `
|
|
32
32
|
<watt-field [label]="label()">
|
|
33
33
|
<input
|
|
34
34
|
disabled
|
|
@@ -47,7 +47,7 @@ class WattFileField {
|
|
|
47
47
|
</watt-field>
|
|
48
48
|
`, isInline: true, styles: [".watt-file-field-text{color:var(--watt-color-primary)}.watt-file-field-text:placeholder-shown{color:var(--watt-input-placeholder-color)}\n"], dependencies: [{ kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFileField, decorators: [{
|
|
51
51
|
type: Component,
|
|
52
52
|
args: [{ selector: 'watt-file-field', imports: [WattButtonComponent, WattFieldComponent], encapsulation: ViewEncapsulation.None, template: `
|
|
53
53
|
<watt-field [label]="label()">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-file-field.mjs","sources":["../../../libs/watt/package/file-field/watt-file-field.component.ts","../../../libs/watt/package/file-field/index.ts","../../../libs/watt/package/file-field/energinet-watt-file-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 { Component, ViewEncapsulation, input, model, output } from '@angular/core';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\n\n@Component({\n selector: 'watt-file-field',\n imports: [WattButtonComponent, WattFieldComponent],\n encapsulation: ViewEncapsulation.None,\n styles: `\n .watt-file-field-text {\n color: var(--watt-color-primary);\n }\n\n .watt-file-field-text:placeholder-shown {\n color: var(--watt-input-placeholder-color);\n }\n `,\n template: `\n <watt-field [label]=\"label()\">\n <input\n disabled\n class=\"watt-file-field-text\"\n [placeholder]=\"placeholder()\"\n type=\"text\"\n [value]=\"file()?.name\"\n />\n @if (!file()) {\n <input #input hidden type=\"file\" (change)=\"file.set(input.files?.item(0) ?? undefined)\" />\n <watt-button variant=\"icon\" icon=\"fileUpload\" (click)=\"input.click()\" />\n } @else {\n <watt-button variant=\"icon\" icon=\"remove\" (click)=\"clear.emit()\" />\n }\n <ng-content />\n </watt-field>\n `,\n})\nexport class WattFileField {\n readonly file = model<File>();\n readonly label = input('');\n readonly placeholder = input('');\n readonly clear = output();\n protected clearSubscription = this.clear.subscribe(() => this.file.set(undefined));\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattFileField } from './watt-file-field.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAqCa,aAAa,CAAA;IACf,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"energinet-watt-file-field.mjs","sources":["../../../libs/watt/package/file-field/watt-file-field.component.ts","../../../libs/watt/package/file-field/index.ts","../../../libs/watt/package/file-field/energinet-watt-file-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 { Component, ViewEncapsulation, input, model, output } from '@angular/core';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\n\n@Component({\n selector: 'watt-file-field',\n imports: [WattButtonComponent, WattFieldComponent],\n encapsulation: ViewEncapsulation.None,\n styles: `\n .watt-file-field-text {\n color: var(--watt-color-primary);\n }\n\n .watt-file-field-text:placeholder-shown {\n color: var(--watt-input-placeholder-color);\n }\n `,\n template: `\n <watt-field [label]=\"label()\">\n <input\n disabled\n class=\"watt-file-field-text\"\n [placeholder]=\"placeholder()\"\n type=\"text\"\n [value]=\"file()?.name\"\n />\n @if (!file()) {\n <input #input hidden type=\"file\" (change)=\"file.set(input.files?.item(0) ?? undefined)\" />\n <watt-button variant=\"icon\" icon=\"fileUpload\" (click)=\"input.click()\" />\n } @else {\n <watt-button variant=\"icon\" icon=\"remove\" (click)=\"clear.emit()\" />\n }\n <ng-content />\n </watt-field>\n `,\n})\nexport class WattFileField {\n readonly file = model<File>();\n readonly label = input('');\n readonly placeholder = input('');\n readonly clear = output();\n protected clearSubscription = this.clear.subscribe(() => this.file.set(undefined));\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattFileField } from './watt-file-field.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAqCa,aAAa,CAAA;IACf,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAQ;AACpB,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;AACjB,IAAA,WAAW,GAAG,KAAK,CAAC,EAAE,kFAAC;IACvB,KAAK,GAAG,MAAM,EAAE;AACf,IAAA,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;uGALvE,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAb,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA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AA,CAAA,EAAA,MAAA,EAAA,CAAA,4IAAA,CAAA,EAAA;;;ACpDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -24,12 +24,12 @@ import { input, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
|
24
24
|
* `import { WattHeadingComponent } from '@energinet/watt/heading';`
|
|
25
25
|
*/
|
|
26
26
|
class WattHeadingComponent {
|
|
27
|
-
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
28
|
-
class = computed(() => (this.size() ? 'watt-headline-' + this.size() : null), ...(ngDevMode ? [{ debugName: "class" }] : []));
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
30
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.
|
|
27
|
+
size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : /* istanbul ignore next */ []));
|
|
28
|
+
class = computed(() => (this.size() ? 'watt-headline-' + this.size() : null), ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattHeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: WattHeadingComponent, isStandalone: true, selector: "watt-heading, [watt-heading]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "class()", "attr.size": "null" } }, ngImport: i0, template: '<ng-content />', isInline: true, styles: ["watt-heading,[watt-heading]{margin:0}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattHeadingComponent, decorators: [{
|
|
33
33
|
type: Component,
|
|
34
34
|
args: [{ selector: 'watt-heading, [watt-heading]', encapsulation: ViewEncapsulation.None, template: '<ng-content />', host: {
|
|
35
35
|
'[class]': 'class()',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-heading.mjs","sources":["../../../libs/watt/package/heading/watt-heading.component.ts","../../../libs/watt/package/heading/index.ts","../../../libs/watt/package/heading/energinet-watt-heading.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, computed, input, ViewEncapsulation } from '@angular/core';\n\nexport type WattHeadingSize = '1' | '2' | '3' | '4' | '5' | '6';\n\n/**\n * Usage:\n * `import { WattHeadingComponent } from '@energinet/watt/heading';`\n */\n@Component({\n selector: 'watt-heading, [watt-heading]',\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n styles: `\n watt-heading,\n [watt-heading] {\n margin: 0;\n }\n `,\n host: {\n '[class]': 'class()',\n '[attr.size]': 'null',\n },\n})\nexport class WattHeadingComponent {\n readonly size = input<WattHeadingSize>();\n protected class = computed(() => (this.size() ? 'watt-headline-' + this.size() : null));\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattHeadingComponent, WattHeadingSize } from './watt-heading.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAKA;;;AAGG;MAgBU,oBAAoB,CAAA;IACtB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"energinet-watt-heading.mjs","sources":["../../../libs/watt/package/heading/watt-heading.component.ts","../../../libs/watt/package/heading/index.ts","../../../libs/watt/package/heading/energinet-watt-heading.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, computed, input, ViewEncapsulation } from '@angular/core';\n\nexport type WattHeadingSize = '1' | '2' | '3' | '4' | '5' | '6';\n\n/**\n * Usage:\n * `import { WattHeadingComponent } from '@energinet/watt/heading';`\n */\n@Component({\n selector: 'watt-heading, [watt-heading]',\n encapsulation: ViewEncapsulation.None,\n template: '<ng-content />',\n styles: `\n watt-heading,\n [watt-heading] {\n margin: 0;\n }\n `,\n host: {\n '[class]': 'class()',\n '[attr.size]': 'null',\n },\n})\nexport class WattHeadingComponent {\n readonly size = input<WattHeadingSize>();\n protected class = computed(() => (this.size() ? 'watt-headline-' + this.size() : null));\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattHeadingComponent, WattHeadingSize } from './watt-heading.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAKA;;;AAGG;MAgBU,oBAAoB,CAAA;IACtB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAmB;IAC9B,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,GAAG,gBAAgB,GAAG,IAAI,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAC;uGAF5E,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,4RAZrB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yCAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAYf,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAfhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,8BAA8B,iBACzB,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAC3B,gBAAgB,EAAA,IAAA,EAOpB;AACJ,wBAAA,SAAS,EAAE,SAAS;AACpB,wBAAA,aAAa,EAAE,MAAM;AACtB,qBAAA,EAAA,MAAA,EAAA,CAAA,yCAAA,CAAA,EAAA;;;ACvCH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -21,8 +21,8 @@ import { WattIconComponent } from '@energinet/watt/icon';
|
|
|
21
21
|
*/
|
|
22
22
|
//#endregion
|
|
23
23
|
class WattFlagDenmarkComponent {
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
24
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagDenmarkComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagDenmarkComponent, isStandalone: true, selector: "watt-flag-dk", ngImport: i0, template: `
|
|
26
26
|
<svg viewBox="0 0 640 480">
|
|
27
27
|
<path fill="#c8102e" d="M0 0h640.1v480H0z" />
|
|
28
28
|
<path fill="#fff" d="M205.7 0h68.6v480h-68.6z" />
|
|
@@ -30,7 +30,7 @@ class WattFlagDenmarkComponent {
|
|
|
30
30
|
</svg>
|
|
31
31
|
`, isInline: true });
|
|
32
32
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
33
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagDenmarkComponent, decorators: [{
|
|
34
34
|
type: Component,
|
|
35
35
|
args: [{
|
|
36
36
|
selector: 'watt-flag-dk',
|
|
@@ -63,8 +63,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
63
63
|
*/
|
|
64
64
|
//#endregion
|
|
65
65
|
class WattFlagFinlandComponent {
|
|
66
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
67
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
66
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagFinlandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
67
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagFinlandComponent, isStandalone: true, selector: "watt-flag-fi", ngImport: i0, template: `
|
|
68
68
|
<svg viewBox="0 0 640 480">
|
|
69
69
|
<path fill="#fff" d="M0 0h640v480H0z" />
|
|
70
70
|
<path fill="#002f6c" d="M0 174.5h640v131H0z" />
|
|
@@ -72,7 +72,7 @@ class WattFlagFinlandComponent {
|
|
|
72
72
|
</svg>
|
|
73
73
|
`, isInline: true });
|
|
74
74
|
}
|
|
75
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
75
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagFinlandComponent, decorators: [{
|
|
76
76
|
type: Component,
|
|
77
77
|
args: [{
|
|
78
78
|
selector: 'watt-flag-fi',
|
|
@@ -105,8 +105,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
105
105
|
*/
|
|
106
106
|
//#endregion
|
|
107
107
|
class WattFlagGermanyComponent {
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
109
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagGermanyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
109
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagGermanyComponent, isStandalone: true, selector: "watt-flag-de", ngImport: i0, template: `
|
|
110
110
|
<svg viewBox="0 0 640 480">
|
|
111
111
|
<path fill="#ffce00" d="M0 320h640v160H0z" />
|
|
112
112
|
<path fill="#000001" d="M0 0h640v160H0z" />
|
|
@@ -114,7 +114,7 @@ class WattFlagGermanyComponent {
|
|
|
114
114
|
</svg>
|
|
115
115
|
`, isInline: true });
|
|
116
116
|
}
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagGermanyComponent, decorators: [{
|
|
118
118
|
type: Component,
|
|
119
119
|
args: [{
|
|
120
120
|
selector: 'watt-flag-de',
|
|
@@ -147,8 +147,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
147
147
|
*/
|
|
148
148
|
//#endregion
|
|
149
149
|
class WattFlagNorwayComponent {
|
|
150
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
151
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
150
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagNorwayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
151
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagNorwayComponent, isStandalone: true, selector: "watt-flag-no", ngImport: i0, template: `
|
|
152
152
|
<svg viewBox="0 0 640 480">
|
|
153
153
|
<path fill="#ed2939" d="M0 0h640v480H0z" />
|
|
154
154
|
<path fill="#fff" d="M180 0h120v480H180z" />
|
|
@@ -158,7 +158,7 @@ class WattFlagNorwayComponent {
|
|
|
158
158
|
</svg>
|
|
159
159
|
`, isInline: true });
|
|
160
160
|
}
|
|
161
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagNorwayComponent, decorators: [{
|
|
162
162
|
type: Component,
|
|
163
163
|
args: [{
|
|
164
164
|
selector: 'watt-flag-no',
|
|
@@ -193,8 +193,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
193
193
|
*/
|
|
194
194
|
//#endregion
|
|
195
195
|
class WattFlagPolandComponent {
|
|
196
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
197
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
196
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagPolandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
197
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagPolandComponent, isStandalone: true, selector: "watt-flag-pl", ngImport: i0, template: `
|
|
198
198
|
<svg viewBox="0 0 640 480">
|
|
199
199
|
<g fill-rule="evenodd">
|
|
200
200
|
<path fill="#fff" d="M640 480H0V0h640z" />
|
|
@@ -203,7 +203,7 @@ class WattFlagPolandComponent {
|
|
|
203
203
|
</svg>
|
|
204
204
|
`, isInline: true });
|
|
205
205
|
}
|
|
206
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
206
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagPolandComponent, decorators: [{
|
|
207
207
|
type: Component,
|
|
208
208
|
args: [{
|
|
209
209
|
selector: 'watt-flag-pl',
|
|
@@ -237,15 +237,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
237
237
|
*/
|
|
238
238
|
//#endregion
|
|
239
239
|
class WattFlagSwedenComponent {
|
|
240
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
241
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
240
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagSwedenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
241
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagSwedenComponent, isStandalone: true, selector: "watt-flag-se", ngImport: i0, template: `
|
|
242
242
|
<svg viewBox="0 0 640 480">
|
|
243
243
|
<path fill="#005293" d="M0 0h640v480H0z" />
|
|
244
244
|
<path fill="#fecb00" d="M176 0v192H0v96h176v192h96V288h368v-96H272V0z" />
|
|
245
245
|
</svg>
|
|
246
246
|
`, isInline: true });
|
|
247
247
|
}
|
|
248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagSwedenComponent, decorators: [{
|
|
249
249
|
type: Component,
|
|
250
250
|
args: [{
|
|
251
251
|
selector: 'watt-flag-se',
|
|
@@ -277,8 +277,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
277
277
|
*/
|
|
278
278
|
//#endregion
|
|
279
279
|
class WattFlagNetherlandsComponent {
|
|
280
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
281
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
280
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagNetherlandsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
281
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagNetherlandsComponent, isStandalone: true, selector: "watt-flag-nl", ngImport: i0, template: `
|
|
282
282
|
<svg viewBox="0 0 640 480">
|
|
283
283
|
<path fill="#21468b" d="M0 0h640v480H0z" />
|
|
284
284
|
<path fill="#fff" d="M0 160h640v160H0z" />
|
|
@@ -286,7 +286,7 @@ class WattFlagNetherlandsComponent {
|
|
|
286
286
|
</svg>
|
|
287
287
|
`, isInline: true });
|
|
288
288
|
}
|
|
289
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagNetherlandsComponent, decorators: [{
|
|
290
290
|
type: Component,
|
|
291
291
|
args: [{
|
|
292
292
|
selector: 'watt-flag-nl',
|
|
@@ -319,8 +319,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
319
319
|
*/
|
|
320
320
|
//#endregion
|
|
321
321
|
class WattFlagSwitzerlandComponent {
|
|
322
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
323
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagSwitzerlandComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
323
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagSwitzerlandComponent, isStandalone: true, selector: "watt-flag-ch", ngImport: i0, template: `
|
|
324
324
|
<svg viewBox="0 0 640 480">
|
|
325
325
|
<g fill="#ff0000">
|
|
326
326
|
<path d="M0 0h640v480H0z" />
|
|
@@ -332,7 +332,7 @@ class WattFlagSwitzerlandComponent {
|
|
|
332
332
|
</svg>
|
|
333
333
|
`, isInline: true });
|
|
334
334
|
}
|
|
335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagSwitzerlandComponent, decorators: [{
|
|
336
336
|
type: Component,
|
|
337
337
|
args: [{
|
|
338
338
|
selector: 'watt-flag-ch',
|
|
@@ -369,8 +369,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
369
369
|
*/
|
|
370
370
|
//#endregion
|
|
371
371
|
class WattFlagUnitedKingdomComponent {
|
|
372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
373
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagUnitedKingdomComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
373
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: WattFlagUnitedKingdomComponent, isStandalone: true, selector: "watt-flag-gb", ngImport: i0, template: `
|
|
374
374
|
<svg viewBox="0 0 640 480">
|
|
375
375
|
<path fill="#012169" d="M0 0h640v480H0z" />
|
|
376
376
|
<path
|
|
@@ -386,7 +386,7 @@ class WattFlagUnitedKingdomComponent {
|
|
|
386
386
|
</svg>
|
|
387
387
|
`, isInline: true });
|
|
388
388
|
}
|
|
389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagUnitedKingdomComponent, decorators: [{
|
|
390
390
|
type: Component,
|
|
391
391
|
args: [{
|
|
392
392
|
selector: 'watt-flag-gb',
|
|
@@ -428,13 +428,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImpor
|
|
|
428
428
|
//#endregion
|
|
429
429
|
class WattFlagComponent {
|
|
430
430
|
/** Country code of the flag. */
|
|
431
|
-
country = input.required(...(ngDevMode ? [{ debugName: "country" }] : []));
|
|
431
|
+
country = input.required(...(ngDevMode ? [{ debugName: "country" }] : /* istanbul ignore next */ []));
|
|
432
432
|
/** Accessible label for the icon. */
|
|
433
|
-
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
433
|
+
label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
434
434
|
/** Size of the icon. */
|
|
435
|
-
size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
437
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
435
|
+
size = input('m', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
436
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: WattFlagComponent, isStandalone: true, selector: "watt-flag", inputs: { country: { classPropertyName: "country", publicName: "country", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
|
|
438
438
|
<watt-icon [size]="size()" [label]="label()">
|
|
439
439
|
@switch (country()) {
|
|
440
440
|
@case ('DK') {
|
|
@@ -468,7 +468,7 @@ class WattFlagComponent {
|
|
|
468
468
|
</watt-icon>
|
|
469
469
|
`, isInline: true, dependencies: [{ kind: "component", type: WattFlagDenmarkComponent, selector: "watt-flag-dk" }, { kind: "component", type: WattFlagFinlandComponent, selector: "watt-flag-fi" }, { kind: "component", type: WattFlagGermanyComponent, selector: "watt-flag-de" }, { kind: "component", type: WattFlagNorwayComponent, selector: "watt-flag-no" }, { kind: "component", type: WattFlagPolandComponent, selector: "watt-flag-pl" }, { kind: "component", type: WattFlagSwedenComponent, selector: "watt-flag-se" }, { kind: "component", type: WattFlagNetherlandsComponent, selector: "watt-flag-nl" }, { kind: "component", type: WattFlagSwitzerlandComponent, selector: "watt-flag-ch" }, { kind: "component", type: WattFlagUnitedKingdomComponent, selector: "watt-flag-gb" }, { kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }] });
|
|
470
470
|
}
|
|
471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
471
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: WattFlagComponent, decorators: [{
|
|
472
472
|
type: Component,
|
|
473
473
|
args: [{
|
|
474
474
|
selector: 'watt-flag',
|