@energinet/watt 1.6.2 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/watt-button.component.d.ts +4 -2
- package/dropzone/index.d.ts +19 -0
- package/dropzone/watt-dropzone-intl.d.ts +10 -0
- package/dropzone/watt-dropzone-validators.d.ts +27 -0
- package/dropzone/watt-dropzone.d.ts +25 -0
- package/fesm2022/energinet-watt-button.mjs +6 -5
- package/fesm2022/energinet-watt-button.mjs.map +1 -1
- package/fesm2022/energinet-watt-chip.mjs +1 -1
- package/fesm2022/energinet-watt-chip.mjs.map +1 -1
- package/fesm2022/energinet-watt-data.mjs +1 -1
- package/fesm2022/energinet-watt-data.mjs.map +1 -1
- package/fesm2022/energinet-watt-datetime-field.mjs +1 -1
- package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-drawer.mjs +1 -1
- package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropzone.mjs +278 -0
- package/fesm2022/energinet-watt-dropzone.mjs.map +1 -0
- package/fesm2022/energinet-watt-expansion.mjs +1 -1
- package/fesm2022/energinet-watt-expansion.mjs.map +1 -1
- package/fesm2022/energinet-watt-modal.mjs +1 -1
- package/fesm2022/energinet-watt-modal.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs +1 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs +1 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-shell.mjs +1 -1
- package/fesm2022/energinet-watt-shell.mjs.map +1 -1
- package/fesm2022/energinet-watt-stepper.mjs +1 -1
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
- package/fesm2022/energinet-watt-toast.mjs +1 -1
- package/fesm2022/energinet-watt-toast.mjs.map +1 -1
- package/fesm2022/energinet-watt-vater.mjs +4 -4
- package/fesm2022/energinet-watt-vater.mjs.map +1 -1
- package/fesm2022/energinet-watt-year-field.mjs +1 -1
- package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs +1 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
- package/package.json +5 -1
- package/vater/vater-flex.component.d.ts +1 -1
- package/vater/vater-stack.component.d.ts +1 -1
|
@@ -2,19 +2,21 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare const WattButtonTypes: readonly ["primary", "secondary", "text", "icon"];
|
|
3
3
|
export type WattButtonVariant = (typeof WattButtonTypes)[number];
|
|
4
4
|
export type WattButtonType = 'button' | 'reset' | 'submit';
|
|
5
|
+
export type WattButtonSize = 'small' | 'medium';
|
|
5
6
|
export declare class WattButtonComponent {
|
|
6
7
|
icon: import("@angular/core").InputSignal<"search" | "filter" | "plus" | "minus" | "edit" | "redo" | "undo" | "remove" | "removeForever" | "close" | "cancel" | "checkmark" | "user" | "settings" | "contentCopy" | "date" | "time" | "email" | "markEmailUnread" | "link" | "openInNew" | "monetization" | "payments" | "forwardMessage" | "menu" | "moreVertical" | "logout" | "login" | "help" | "alternateEmail" | "refresh" | "language" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "danger" | "warning" | "success" | "info" | "feedback" | "save" | "upload" | "download" | "fileDownload" | "print" | "preview" | "power" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notifications" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | "view_stream" | "construction" | undefined>;
|
|
7
8
|
variant: import("@angular/core").InputSignal<"primary" | "secondary" | "text" | "icon">;
|
|
9
|
+
size: import("@angular/core").InputSignal<WattButtonSize>;
|
|
8
10
|
type: import("@angular/core").InputSignal<WattButtonType>;
|
|
9
11
|
formId: import("@angular/core").InputSignal<string | null>;
|
|
10
12
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
11
13
|
loading: import("@angular/core").InputSignal<boolean>;
|
|
12
|
-
|
|
14
|
+
classes: import("@angular/core").Signal<string>;
|
|
13
15
|
pointerEvents: import("@angular/core").Signal<"none" | "auto">;
|
|
14
16
|
/**
|
|
15
17
|
* @ignore
|
|
16
18
|
*/
|
|
17
19
|
hasIcon: import("@angular/core").Signal<boolean>;
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<WattButtonComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<WattButtonComponent, "watt-button", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "formId": { "alias": "formId"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WattButtonComponent, "watt-button", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "formId": { "alias": "formId"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
20
22
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Energinet DataHub A/S
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { WattDropZone } from './watt-dropzone';
|
|
18
|
+
export { WattDropZoneIntlService } from './watt-dropzone-intl';
|
|
19
|
+
export { FileTypeValidator, MultipleFilesValidator, maxFileSize, limitFiles, } from './watt-dropzone-validators';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class WattDropZoneIntlService {
|
|
3
|
+
prompt: string;
|
|
4
|
+
promptMultiple: string;
|
|
5
|
+
separator: string;
|
|
6
|
+
button: string;
|
|
7
|
+
buttonMultiple: string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WattDropZoneIntlService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<WattDropZoneIntlService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AbstractControl, ValidationErrors, Validator } from '@angular/forms';
|
|
2
|
+
import { WattDropZone } from './watt-dropzone';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Directive that validates the file type of provided files. This is automatically
|
|
6
|
+
* applied to the `WattDropZone` component via `hostDirectives`.
|
|
7
|
+
*/
|
|
8
|
+
export declare class FileTypeValidator implements Validator {
|
|
9
|
+
component: WattDropZone;
|
|
10
|
+
validate(control: AbstractControl<File[] | null>): ValidationErrors | null;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FileTypeValidator, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<FileTypeValidator, never, never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Directive validating that a single file is selected when `multiple` is false.
|
|
16
|
+
* This is automatically applied to the `WattDropZone` component via `hostDirectives`.
|
|
17
|
+
*/
|
|
18
|
+
export declare class MultipleFilesValidator implements Validator {
|
|
19
|
+
component: WattDropZone;
|
|
20
|
+
validate(control: AbstractControl<File[] | null>): ValidationErrors | null;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultipleFilesValidator, never>;
|
|
22
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MultipleFilesValidator, never, never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
/** Validates that the file size is less than or equal to the specified maximum size. */
|
|
25
|
+
export declare const limitFiles: (limit: number) => (control: AbstractControl<File[] | null>) => ValidationErrors | null;
|
|
26
|
+
/** Validates that the file size is less than or equal to the specified maximum size. */
|
|
27
|
+
export declare const maxFileSize: (size: number) => (control: AbstractControl<File[] | null>) => ValidationErrors | null;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
2
|
+
import { WattDropZoneIntlService } from './watt-dropzone-intl';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./watt-dropzone-validators";
|
|
5
|
+
export type MimeType = `${string}/${string}`;
|
|
6
|
+
export declare class WattDropZone implements ControlValueAccessor {
|
|
7
|
+
intl: WattDropZoneIntlService;
|
|
8
|
+
/** Whether the dropzone should accept multiple files. */
|
|
9
|
+
multiple: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
10
|
+
/** Label for the dropzone. */
|
|
11
|
+
label: import("@angular/core").InputSignal<string | undefined>;
|
|
12
|
+
/** Comma-separated list of MIME types that the dropzone accepts. */
|
|
13
|
+
accept: import("@angular/core").InputSignalWithTransform<`${string}/${string}`[], `${string}/${string}`>;
|
|
14
|
+
/** Emits when one or more files are selected. */
|
|
15
|
+
selected: import("@angular/core").OutputEmitterRef<File[]>;
|
|
16
|
+
dragOver: import("@angular/core").WritableSignal<boolean>;
|
|
17
|
+
handleFiles(files: FileList | null): void;
|
|
18
|
+
handleDrop(event: DragEvent): void;
|
|
19
|
+
handleDragOver(event: DragEvent): void;
|
|
20
|
+
writeValue: () => void;
|
|
21
|
+
registerOnTouched: (fn: () => void) => import("@angular/core").OutputRefSubscription;
|
|
22
|
+
registerOnChange: (fn: (value: File[]) => void) => import("@angular/core").OutputRefSubscription;
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WattDropZone, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<WattDropZone, "watt-dropzone", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; }, { "selected": "selected"; }, never, ["*", "watt-field-error", "watt-field-hint"], true, [{ directive: typeof i1.FileTypeValidator; inputs: {}; outputs: {}; }, { directive: typeof i1.MultipleFilesValidator; inputs: {}; outputs: {}; }]>;
|
|
25
|
+
}
|
|
@@ -27,11 +27,12 @@ const WattButtonTypes = ['primary', 'secondary', 'text', 'icon'];
|
|
|
27
27
|
class WattButtonComponent {
|
|
28
28
|
icon = input();
|
|
29
29
|
variant = input('primary');
|
|
30
|
+
size = input('medium');
|
|
30
31
|
type = input('button');
|
|
31
32
|
formId = input(null);
|
|
32
33
|
disabled = input(false);
|
|
33
34
|
loading = input(false);
|
|
34
|
-
|
|
35
|
+
classes = computed(() => `watt-button--${this.variant()} watt-button-size--${this.size()}`);
|
|
35
36
|
// Prevents emitting a click event in Chrome/Edge/Safari when a disabled button is clicked
|
|
36
37
|
// WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=89041
|
|
37
38
|
// Note: This solution is preferred (in this particular case) over adding styling to the Scss file
|
|
@@ -42,7 +43,7 @@ class WattButtonComponent {
|
|
|
42
43
|
*/
|
|
43
44
|
hasIcon = computed(() => !!this.icon());
|
|
44
45
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattButtonComponent, isStandalone: true, selector: "watt-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class
|
|
46
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: WattButtonComponent, isStandalone: true, selector: "watt-button", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "classes()", "class.watt-button--disabled": "disabled()", "style.pointer-events": "pointerEvents()" } }, ngImport: i0, template: `
|
|
46
47
|
<button
|
|
47
48
|
mat-button
|
|
48
49
|
[disabled]="disabled()"
|
|
@@ -62,13 +63,13 @@ class WattButtonComponent {
|
|
|
62
63
|
}
|
|
63
64
|
</div>
|
|
64
65
|
</button>
|
|
65
|
-
`, isInline: true, styles: [":root{--watt-button-color: var(--watt-color-primary);--watt-button-text-hover-color: var(--watt-color-primary-dark);--watt-button-text-focus-color: var(--watt-color-primary);--watt-button-text-transform: none;--watt-button-primary-disabled-color: var(--watt-color-neutral-grey-500)}watt-button{display:inline-block}watt-button.watt-button--primary.watt-button--disabled .mat-mdc-button.mat-primary{background-color:transparent;color:var(--watt-button-primary-disabled-color)}watt-button.watt-button--primary watt-spinner{--watt-spinner-circle-color: var(--watt-color-neutral-white)}watt-button.watt-button--primary .mat-mdc-button.mat-primary{color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);--mdc-text-button-label-text-color: var(--watt-color-primary-contrast)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-secondary)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:hover,watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark)}watt-button.watt-button--secondary.watt-button--disabled .mat-mdc-button.mat-secondary{background-color:transparent;border-color:var(--watt-color-neutral-grey-300);color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary{border:1px solid var(--watt-color-primary);color:var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light);outline:1px solid var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:hover,watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light)}watt-button.watt-button--text.watt-button--disabled .mat-mdc-button.mat-text{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--text .mat-mdc-button.mat-text{color:var(--watt-button-color);text-transform:var(--watt-button-text-transform);outline:2px solid transparent}watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color);outline:2px solid var(--watt-button-text-focus-color)}watt-button.watt-button--text .mat-mdc-button.mat-text:hover,watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color)}watt-button.watt-button--icon.watt-button--disabled .mat-mdc-button.mat-icon{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--icon .mat-mdc-button.mat-icon{color:var(--watt-color-primary);padding:var(--watt-space-s)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-primary)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:hover,watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark)}watt-button.watt-button--icon .mat-mdc-button.mat-icon.mat-button{min-width:44px}watt-button .mdc-button{font-weight:600;font-size:1rem;line-height:1.5rem;padding:var(--watt-space-s) var(--watt-space-m)}watt-button .mdc-button.mat-mdc-button{min-width:44px;height:44px;--mdc-text-button-label-text-tracking: 0;--mat-text-button-state-layer-color: var(--watt-ripple-color);--mat-text-button-ripple-color: var(--watt-ripple-color)}watt-button .mdc-button watt-spinner{position:absolute}watt-button .mdc-button .mat-button-focus-overlay{background:transparent}watt-button .mdc-button .mdc-button__label{display:flex;justify-content:center;align-items:center}watt-button .mdc-button .mdc-button__label .content-wrapper{display:flex;gap:var(--watt-space-s)}watt-button .mdc-button .mdc-button__label .content-wrapper--loading{visibility:hidden}watt-button .mdc-button .mdc-button__label watt-icon{margin:-5px}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
66
|
+
`, isInline: true, styles: [":root{--watt-button-color: var(--watt-color-primary);--watt-button-text-hover-color: var(--watt-color-primary-dark);--watt-button-text-focus-color: var(--watt-color-primary);--watt-button-text-transform: none;--watt-button-primary-disabled-color: var(--watt-color-neutral-grey-500)}watt-button{display:inline-block}watt-button.watt-button--primary.watt-button--disabled .mat-mdc-button.mat-primary{background-color:transparent;color:var(--watt-button-primary-disabled-color)}watt-button.watt-button--primary watt-spinner{--watt-spinner-circle-color: var(--watt-color-neutral-white)}watt-button.watt-button--primary .mat-mdc-button.mat-primary{color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);--mdc-text-button-label-text-color: var(--watt-color-primary-contrast)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-secondary)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:hover,watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark)}watt-button.watt-button--secondary.watt-button--disabled .mat-mdc-button.mat-secondary{background-color:transparent;border-color:var(--watt-color-neutral-grey-300);color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary{border:1px solid var(--watt-color-primary);color:var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light);outline:1px solid var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:hover,watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light)}watt-button.watt-button--text.watt-button--disabled .mat-mdc-button.mat-text{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--text .mat-mdc-button.mat-text{color:var(--watt-button-color);text-transform:var(--watt-button-text-transform);outline:2px solid transparent}watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color);outline:2px solid var(--watt-button-text-focus-color)}watt-button.watt-button--text .mat-mdc-button.mat-text:hover,watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color)}watt-button.watt-button--icon.watt-button--disabled .mat-mdc-button.mat-icon{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--icon .mat-mdc-button.mat-icon{color:var(--watt-color-primary);padding:var(--watt-space-s)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-primary)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:hover,watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark)}watt-button.watt-button--icon .mat-mdc-button.mat-icon.mat-button{min-width:44px}watt-button .mdc-button{font-weight:600;font-size:1rem;line-height:1.5rem;padding:var(--watt-space-s) var(--watt-space-m)}watt-button .mdc-button.mat-mdc-button{min-width:44px;height:44px;--mdc-text-button-label-text-tracking: 0;--mat-text-button-state-layer-color: var(--watt-ripple-color);--mat-text-button-ripple-color: var(--watt-ripple-color)}watt-button .mdc-button watt-spinner{position:absolute}watt-button .mdc-button .mat-button-focus-overlay{background:transparent}watt-button .mdc-button .mdc-button__label{display:flex;justify-content:center;align-items:center}watt-button .mdc-button .mdc-button__label .content-wrapper{display:flex;gap:var(--watt-space-s)}watt-button .mdc-button .mdc-button__label .content-wrapper--loading{visibility:hidden}watt-button .mdc-button .mdc-button__label watt-icon{margin:-5px}watt-button.watt-button-size--small .mdc-button.mat-mdc-button{height:var(--watt-space-l)}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattSpinnerComponent, selector: "watt-spinner", inputs: ["diameter", "strokeWidth"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
66
67
|
}
|
|
67
68
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattButtonComponent, decorators: [{
|
|
68
69
|
type: Component,
|
|
69
70
|
args: [{ selector: 'watt-button', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
71
|
+
'[class]': 'classes()',
|
|
70
72
|
'[class.watt-button--disabled]': 'disabled()',
|
|
71
|
-
'[class]': 'buttonVariant()',
|
|
72
73
|
'[style.pointer-events]': 'pointerEvents()',
|
|
73
74
|
}, imports: [WattIconComponent, WattSpinnerComponent, MatButtonModule], template: `
|
|
74
75
|
<button
|
|
@@ -90,7 +91,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImpor
|
|
|
90
91
|
}
|
|
91
92
|
</div>
|
|
92
93
|
</button>
|
|
93
|
-
`, styles: [":root{--watt-button-color: var(--watt-color-primary);--watt-button-text-hover-color: var(--watt-color-primary-dark);--watt-button-text-focus-color: var(--watt-color-primary);--watt-button-text-transform: none;--watt-button-primary-disabled-color: var(--watt-color-neutral-grey-500)}watt-button{display:inline-block}watt-button.watt-button--primary.watt-button--disabled .mat-mdc-button.mat-primary{background-color:transparent;color:var(--watt-button-primary-disabled-color)}watt-button.watt-button--primary watt-spinner{--watt-spinner-circle-color: var(--watt-color-neutral-white)}watt-button.watt-button--primary .mat-mdc-button.mat-primary{color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);--mdc-text-button-label-text-color: var(--watt-color-primary-contrast)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-secondary)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:hover,watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark)}watt-button.watt-button--secondary.watt-button--disabled .mat-mdc-button.mat-secondary{background-color:transparent;border-color:var(--watt-color-neutral-grey-300);color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary{border:1px solid var(--watt-color-primary);color:var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light);outline:1px solid var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:hover,watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light)}watt-button.watt-button--text.watt-button--disabled .mat-mdc-button.mat-text{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--text .mat-mdc-button.mat-text{color:var(--watt-button-color);text-transform:var(--watt-button-text-transform);outline:2px solid transparent}watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color);outline:2px solid var(--watt-button-text-focus-color)}watt-button.watt-button--text .mat-mdc-button.mat-text:hover,watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color)}watt-button.watt-button--icon.watt-button--disabled .mat-mdc-button.mat-icon{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--icon .mat-mdc-button.mat-icon{color:var(--watt-color-primary);padding:var(--watt-space-s)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-primary)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:hover,watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark)}watt-button.watt-button--icon .mat-mdc-button.mat-icon.mat-button{min-width:44px}watt-button .mdc-button{font-weight:600;font-size:1rem;line-height:1.5rem;padding:var(--watt-space-s) var(--watt-space-m)}watt-button .mdc-button.mat-mdc-button{min-width:44px;height:44px;--mdc-text-button-label-text-tracking: 0;--mat-text-button-state-layer-color: var(--watt-ripple-color);--mat-text-button-ripple-color: var(--watt-ripple-color)}watt-button .mdc-button watt-spinner{position:absolute}watt-button .mdc-button .mat-button-focus-overlay{background:transparent}watt-button .mdc-button .mdc-button__label{display:flex;justify-content:center;align-items:center}watt-button .mdc-button .mdc-button__label .content-wrapper{display:flex;gap:var(--watt-space-s)}watt-button .mdc-button .mdc-button__label .content-wrapper--loading{visibility:hidden}watt-button .mdc-button .mdc-button__label watt-icon{margin:-5px}\n"] }]
|
|
94
|
+
`, styles: [":root{--watt-button-color: var(--watt-color-primary);--watt-button-text-hover-color: var(--watt-color-primary-dark);--watt-button-text-focus-color: var(--watt-color-primary);--watt-button-text-transform: none;--watt-button-primary-disabled-color: var(--watt-color-neutral-grey-500)}watt-button{display:inline-block}watt-button.watt-button--primary.watt-button--disabled .mat-mdc-button.mat-primary{background-color:transparent;color:var(--watt-button-primary-disabled-color)}watt-button.watt-button--primary watt-spinner{--watt-spinner-circle-color: var(--watt-color-neutral-white)}watt-button.watt-button--primary .mat-mdc-button.mat-primary{color:var(--watt-color-primary-contrast);background-color:var(--watt-color-primary);--mdc-text-button-label-text-color: var(--watt-color-primary-contrast)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-secondary)}watt-button.watt-button--primary .mat-mdc-button.mat-primary:hover,watt-button.watt-button--primary .mat-mdc-button.mat-primary:focus-visible{background:var(--watt-color-primary-dark)}watt-button.watt-button--secondary.watt-button--disabled .mat-mdc-button.mat-secondary{background-color:transparent;border-color:var(--watt-color-neutral-grey-300);color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary{border:1px solid var(--watt-color-primary);color:var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light);outline:1px solid var(--watt-color-primary)}watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:hover,watt-button.watt-button--secondary .mat-mdc-button.mat-secondary:focus-visible{background:var(--watt-color-primary-light)}watt-button.watt-button--text.watt-button--disabled .mat-mdc-button.mat-text{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--text .mat-mdc-button.mat-text{color:var(--watt-button-color);text-transform:var(--watt-button-text-transform);outline:2px solid transparent}watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color);outline:2px solid var(--watt-button-text-focus-color)}watt-button.watt-button--text .mat-mdc-button.mat-text:hover,watt-button.watt-button--text .mat-mdc-button.mat-text:focus-visible{color:var(--watt-button-text-hover-color)}watt-button.watt-button--icon.watt-button--disabled .mat-mdc-button.mat-icon{background-color:transparent;color:var(--watt-color-neutral-grey-500)}watt-button.watt-button--icon .mat-mdc-button.mat-icon{color:var(--watt-color-primary);padding:var(--watt-space-s)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark);outline:2px solid var(--watt-color-primary)}watt-button.watt-button--icon .mat-mdc-button.mat-icon:hover,watt-button.watt-button--icon .mat-mdc-button.mat-icon:focus-visible{color:var(--watt-color-primary-dark)}watt-button.watt-button--icon .mat-mdc-button.mat-icon.mat-button{min-width:44px}watt-button .mdc-button{font-weight:600;font-size:1rem;line-height:1.5rem;padding:var(--watt-space-s) var(--watt-space-m)}watt-button .mdc-button.mat-mdc-button{min-width:44px;height:44px;--mdc-text-button-label-text-tracking: 0;--mat-text-button-state-layer-color: var(--watt-ripple-color);--mat-text-button-ripple-color: var(--watt-ripple-color)}watt-button .mdc-button watt-spinner{position:absolute}watt-button .mdc-button .mat-button-focus-overlay{background:transparent}watt-button .mdc-button .mdc-button__label{display:flex;justify-content:center;align-items:center}watt-button .mdc-button .mdc-button__label .content-wrapper{display:flex;gap:var(--watt-space-s)}watt-button .mdc-button .mdc-button__label .content-wrapper--loading{visibility:hidden}watt-button .mdc-button .mdc-button__label watt-icon{margin:-5px}watt-button.watt-button-size--small .mdc-button.mat-mdc-button{height:var(--watt-space-l)}\n"] }]
|
|
94
95
|
}] });
|
|
95
96
|
|
|
96
97
|
//#region License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-button.mjs","sources":["../../../libs/watt/package/button/watt-button.component.ts","../../../libs/watt/package/button/index.ts","../../../libs/watt/package/button/energinet-watt-button.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n computed,\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport const WattButtonTypes = ['primary', 'secondary', 'text', 'icon'] as const;\nexport type WattButtonVariant = (typeof WattButtonTypes)[number];\nexport type WattButtonType = 'button' | 'reset' | 'submit';\n\n@Component({\n selector: 'watt-button',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./watt-button.component.scss'],\n host: {\n '[class
|
|
1
|
+
{"version":3,"file":"energinet-watt-button.mjs","sources":["../../../libs/watt/package/button/watt-button.component.ts","../../../libs/watt/package/button/index.ts","../../../libs/watt/package/button/energinet-watt-button.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n computed,\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\n\nexport const WattButtonTypes = ['primary', 'secondary', 'text', 'icon'] as const;\nexport type WattButtonVariant = (typeof WattButtonTypes)[number];\nexport type WattButtonType = 'button' | 'reset' | 'submit';\nexport type WattButtonSize = 'small' | 'medium';\n\n@Component({\n selector: 'watt-button',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n styleUrls: ['./watt-button.component.scss'],\n host: {\n '[class]': 'classes()',\n '[class.watt-button--disabled]': 'disabled()',\n '[style.pointer-events]': 'pointerEvents()',\n },\n imports: [WattIconComponent, WattSpinnerComponent, MatButtonModule],\n template: `\n <button\n mat-button\n [disabled]=\"disabled()\"\n [type]=\"type()\"\n [color]=\"variant()\"\n [attr.form]=\"type() === 'submit' ? formId() : null\"\n >\n @if (loading()) {\n <watt-spinner [diameter]=\"18\" />\n }\n <div [class.content-wrapper]=\"!loading()\" [class.content-wrapper--loading]=\"loading()\">\n @if (hasIcon()) {\n <watt-icon [name]=\"icon()\" />\n }\n @if (variant() !== 'icon') {\n <ng-content />\n }\n </div>\n </button>\n `,\n})\nexport class WattButtonComponent {\n icon = input<WattIcon>();\n variant = input<WattButtonVariant>('primary');\n size = input<WattButtonSize>('medium');\n type = input<WattButtonType>('button');\n formId = input<string | null>(null);\n disabled = input(false);\n loading = input(false);\n\n classes = computed(() => `watt-button--${this.variant()} watt-button-size--${this.size()}`);\n\n // Prevents emitting a click event in Chrome/Edge/Safari when a disabled button is clicked\n // WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=89041\n // Note: This solution is preferred (in this particular case) over adding styling to the Scss file\n // because the presence of inline styles can be tested with Jest.\n pointerEvents = computed(() => (this.disabled() ? 'none' : 'auto'));\n\n /**\n * @ignore\n */\n hasIcon = computed(() => !!this.icon());\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 { WattButtonComponent } from './watt-button.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAYO,MAAM,eAAe,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,CAAU;MAsCnE,mBAAmB,CAAA;IAC9B,IAAI,GAAG,KAAK,EAAY;AACxB,IAAA,OAAO,GAAG,KAAK,CAAoB,SAAS,CAAC;AAC7C,IAAA,IAAI,GAAG,KAAK,CAAiB,QAAQ,CAAC;AACtC,IAAA,IAAI,GAAG,KAAK,CAAiB,QAAQ,CAAC;AACtC,IAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,CAAC;AACnC,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AACvB,IAAA,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC;AAEtB,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,gBAAgB,IAAI,CAAC,OAAO,EAAE,sBAAsB,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,CAAC;;;;;IAM3F,aAAa,GAAG,QAAQ,CAAC,OA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AA,aAAA,EACR,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAEzC,IAAA,EAAA;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,+BAA+B,EAAE,YAAY;AAC7C,wBAAA,wBAAwB,EAAE,iBAAiB;AAC5C,qBAAA,EAAA,OAAA,EACQ,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,CAAC,EACzD,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;AAoBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2+HAAA,CAAA,EAAA;;;ACjEH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -462,7 +462,7 @@ class WattDateRangeChipComponent {
|
|
|
462
462
|
<ng-content ngProjectAs="watt-field-hint" select="watt-field-hint" />
|
|
463
463
|
<ng-content ngProjectAs="watt-field-error" select="watt-field-error" />
|
|
464
464
|
</watt-field>
|
|
465
|
-
`, isInline: true, styles: ["watt-date-range-chip mat-date-range-input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-range-chip.has-placeholder .value:before{content:\":\"}watt-date-range-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i1.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: WattMenuChipComponent, selector: "watt-menu-chip", inputs: ["opened", "disabled", "name", "value", "selected", "hasPopup"], outputs: ["toggle"] }, { kind: "pipe", type: WattDatePipe, name: "wattDate" }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
465
|
+
`, isInline: true, styles: ["watt-date-range-chip mat-date-range-input{top:0;bottom:0;height:auto;visibility:hidden}watt-date-range-chip.has-placeholder .value:before{content:\":\"}watt-date-range-chip watt-field label .watt-field-wrapper{background-color:transparent}\n"], dependencies: [{ kind: "ngmodule", type: MatDatepickerModule }, { kind: "component", type: i1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i1.MatStartDate, selector: "input[matStartDate]", outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i1.MatEndDate, selector: "input[matEndDate]", outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i1.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "component", type: i1.MatDatepickerActions, selector: "mat-datepicker-actions, mat-date-range-picker-actions" }, { kind: "directive", type: i1.MatDatepickerApply, selector: "[matDatepickerApply], [matDateRangePickerApply]" }, { kind: "component", type: WattMenuChipComponent, selector: "watt-menu-chip", inputs: ["opened", "disabled", "name", "value", "selected", "hasPopup"], outputs: ["toggle"] }, { kind: "pipe", type: WattDatePipe, name: "wattDate" }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
466
466
|
}
|
|
467
467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateRangeChipComponent, decorators: [{
|
|
468
468
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-chip.mjs","sources":["../../../libs/watt/package/chip/watt-chip.component.ts","../../../libs/watt/package/chip/watt-action-chip.component.ts","../../../libs/watt/package/chip/watt-menu-chip.component.ts","../../../libs/watt/package/chip/watt-date-chip.component.ts","../../../libs/watt/package/chip/watt-date-range-chip.component.ts","../../../libs/watt/package/chip/watt-filter-chip.component.ts","../../../libs/watt/package/chip/watt-chip.directive.ts","../../../libs/watt/package/chip/index.ts","../../../libs/watt/package/chip/energinet-watt-chip.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, input } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-chip',\n styleUrls: ['./watt-chip.component.scss'],\n template: `\n <label\n [class.selected]=\"selected()\"\n [class.disabled]=\"disabled()\"\n [class.read-only]=\"readonly()\"\n >\n @if (selected()) {\n <watt-icon class=\"selected-icon\" name=\"checkmark\" size=\"s\" [attr.aria-hidden]=\"true\" />\n }\n <ng-content />\n </label>\n `,\n})\nexport class WattChipComponent {\n selected = input(false);\n disabled = input(false);\n readonly = input(false);\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, input, output } from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-action-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled()\">\n <button\n type=\"button\"\n class=\"cdk-visually-hidden\"\n (click)=\"$event.stopImmediatePropagation(); action.emit()\"\n [disabled]=\"disabled()\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n [name]=\"icon()\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.disabled]=\"disabled()\"\n />\n </watt-chip>\n `,\n})\nexport class WattActionChipComponent {\n disabled = input(false);\n icon = input.required<WattIcon>();\n action = output<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\nexport type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-menu-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .menu-icon {\n margin-left: var(--watt-space-xs);\n transition: linear 0.2s all;\n color: var(--watt-color-primary);\n\n &.disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n }\n\n .opened {\n transform: rotate(180deg);\n }\n\n .selected {\n color: var(--watt-color-neutral-white);\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"selected\">\n <button\n class=\"cdk-visually-hidden\"\n [attr.aria-haspopup]=\"hasPopup\"\n [attr.aria-expanded]=\"opened\"\n [attr.aria-pressed]=\"selected\"\n (click)=\"toggle.emit()\"\n [disabled]=\"disabled\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n name=\"arrowDropDown\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.opened]=\"opened\"\n [class.selected]=\"selected\"\n [class.disabled]=\"disabled\"\n />\n </watt-chip>\n `,\n})\nexport class WattMenuChipComponent {\n @Input() opened = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: string;\n @Input() selected = false;\n @Input() hasPopup: WattMenuChipHasPopup = 'menu';\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() toggle = new EventEmitter<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { FormControl } from '@angular/forms';\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\n@Component({\n imports: [MatDatepickerModule, WattMenuChipComponent, WattFieldComponent, WattDatePipe],\n selector: 'watt-date-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-chip {\n input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-datepicker #picker />\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"!!value\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <input\n tabindex=\"-1\"\n class=\"cdk-visually-hidden\"\n type=\"text\"\n [value]=\"value\"\n [matDatepicker]=\"picker\"\n (dateChange)=\"value = $event.value\"\n (dateChange)=\"selectionChange.emit($event.value)\"\n />\n {{ placeholder }}\n <span>\n @if (value) {\n @if (placeholder) {\n :\n }\n {{ value | wattDate }}\n }\n </span>\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() placeholder?: string;\n @Input() value?: string;\n @Input({ required: true }) formControl!: FormControl;\n @Output() selectionChange = new EventEmitter<Date>();\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 { FormControl } from '@angular/forms';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n Injectable,\n Input,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport {\n DateRange,\n DefaultMatCalendarRangeStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { dayjs, WattDatePipe, WattRange } from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattDatepickerIntlService } from '@energinet/watt/picker/datepicker';\n\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\ntype customSelectionStrategy = (date: Date | null) => DateRange<Date>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattDateRangeSelectionStrategy extends DefaultMatCalendarRangeStrategy<Date> {\n private customSelectionStrategy!: customSelectionStrategy;\n\n setCustomSelectionStrategy(strategy: customSelectionStrategy) {\n this.customSelectionStrategy = strategy;\n }\n\n override selectionFinished(date: Date, currentRange: DateRange<Date>): DateRange<Date> {\n let range: DateRange<Date> = super.selectionFinished(date, currentRange);\n\n if (this.customSelectionStrategy) {\n range = this.customSelectionStrategy(date);\n }\n\n return range.end ? new DateRange(range.start, dayjs(range.end).endOf('day').toDate()) : range;\n }\n\n override createPreview(activeDate: Date | null, currentRange: DateRange<Date>): DateRange<Date> {\n if (!this.customSelectionStrategy) {\n return super.createPreview(activeDate, currentRange);\n } else {\n return this.customSelectionStrategy(activeDate);\n }\n }\n}\n\n@Component({\n imports: [\n MatDatepickerModule,\n WattMenuChipComponent,\n WattDatePipe,\n WattFieldComponent,\n WattButtonComponent,\n ],\n providers: [\n {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n useFactory: (comp: WattDateRangeChipComponent) => comp.selectionStrategy(),\n deps: [WattDateRangeChipComponent],\n },\n ],\n selector: 'watt-date-range-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-range-chip {\n mat-date-range-input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n &.has-placeholder .value::before {\n content: ':';\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-date-range-picker #picker>\n @if (showActions) {\n <mat-date-range-picker-actions>\n <watt-button variant=\"text\" (click)=\"clearInput()\" icon=\"remove\">{{\n intl.clear\n }}</watt-button>\n <watt-button variant=\"primary\" matDateRangePickerApply>{{ intl.select }}</watt-button>\n </mat-date-range-picker-actions>\n }\n </mat-date-range-picker>\n\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"value?.start && value?.end ? true : false\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <mat-date-range-input\n #input\n class=\"cdk-visually-hidden\"\n separator=\"\"\n [rangePicker]=\"picker\"\n >\n <input\n type=\"text\"\n matStartDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.start\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"showActions && onSelectionChange($event.value ? input.value! : null)\"\n />\n <input\n type=\"text\"\n matEndDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.end\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"onSelectionChange($event.value ? input.value! : null)\"\n />\n </mat-date-range-input>\n <ng-content />\n @if (value?.start && value?.end) {\n <span class=\"value\">\n {{ value | wattDate }}\n </span>\n }\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateRangeChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() value?: WattRange<Date>;\n @Input({ required: true }) formControl!: FormControl;\n @Input() placeholder = true;\n @Input() showActions = false;\n @Input() customSelectionStrategy!: (date: Date | null) => DateRange<Date>;\n\n @HostBinding('class.has-placeholder')\n get hasPlaceholderClass(): boolean {\n return this.placeholder;\n }\n\n @Output() selectionChange = new EventEmitter<WattRange<Date> | null>();\n\n private _dateAdapter = inject(DateAdapter);\n protected intl = inject(WattDatepickerIntlService);\n\n selectionStrategy() {\n const strategy = new WattDateRangeSelectionStrategy(this._dateAdapter);\n strategy.setCustomSelectionStrategy(this.customSelectionStrategy);\n return strategy;\n }\n\n clearInput(): void {\n this.value = undefined;\n this.selectionChange.emit(null);\n }\n\n onSelectionChange(value: WattRange<Date> | null): void {\n this.selectionChange.emit(value);\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, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattChipComponent } from './watt-chip.component';\n\nfunction isFirstRender() {\n let isFirstRender = true;\n return () => {\n if (!isFirstRender) return false;\n isFirstRender = false;\n return true;\n };\n}\n\n@Component({\n imports: [WattChipComponent],\n selector: 'watt-filter-chip',\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"isFirstRender() ? selected : input.checked\">\n <input\n #input\n class=\"cdk-visually-hidden\"\n [type]=\"choice === undefined ? 'checkbox' : 'radio'\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n (change)=\"onChange(input)\"\n />\n <ng-content />\n </watt-chip>\n `,\n})\nexport class WattFilterChipComponent<T = string> {\n @Input() selected = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: T;\n @Input() choice?: string;\n @Output() selectionChange = new EventEmitter<T>();\n isFirstRender = isFirstRender();\n\n onChange(input: HTMLInputElement): void {\n const value = this.choice !== undefined ? input.value : input.checked;\n this.selectionChange.emit(value as T);\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 { Directive, ElementRef, EventEmitter, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WattFilterChipComponent } from './watt-filter-chip.component';\nimport { WattDateChipComponent } from './watt-date-chip.component';\nimport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface WattChip {\n value?: any;\n disabled: boolean;\n selectionChange: EventEmitter<any>;\n}\n\n@Directive({\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattFormChipDirective),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `\n watt-filter-chip[formControl],\n watt-date-chip[formControl],\n watt-date-range-chip[formControl],\n watt-filter-chip[formControlName],\n watt-date-chip[formControlName],\n watt-date-range-chip[formControlName],\n `,\n})\nexport class WattFormChipDirective implements ControlValueAccessor {\n private filterChip = inject(WattFilterChipComponent, { host: true, optional: true, self: true });\n private dateChip = inject(WattDateChipComponent, { host: true, optional: true, self: true });\n private dateRangeChip = inject(WattDateRangeChipComponent, {\n host: true,\n optional: true,\n self: true,\n });\n\n private element = inject(ElementRef);\n private component?: WattChip;\n\n constructor() {\n if (this.filterChip) {\n this.component = this.filterChip;\n } else if (this.dateChip) {\n this.component = this.dateChip;\n } else if (this.dateRangeChip) {\n this.component = this.dateRangeChip;\n }\n }\n\n writeValue(value?: any): void {\n if (this.component) {\n this.component.value = value;\n }\n }\n\n registerOnChange(fn: () => void) {\n this.component?.selectionChange.subscribe(fn);\n }\n\n registerOnTouched(fn: () => void) {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState(disabled: boolean) {\n if (this.component) {\n this.component.disabled = disabled;\n }\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattActionChipComponent } from './watt-action-chip.component';\nexport { WattChipComponent } from './watt-chip.component';\nexport { WattDateChipComponent } from './watt-date-chip.component';\nexport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\nexport { WattFilterChipComponent } from './watt-filter-chip.component';\nexport { WattFormChipDirective } from './watt-chip.directive';\nexport { WattMenuChipComponent } from './watt-menu-chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAuBa,iBAAiB,CAAA;AAC5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AAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,EAjBrB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8OAAA,EAAA,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,iBAAiB;AAC1B,gBAAA,WAAW,EAAE,UAAU,CAAC,MAAM,qBAAqB,CAAC;AACpD,gBAAA,KAAK,EAAE,IAAI;AACZ,aAAA;AACF,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAWU,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAlBjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;;AAED,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACF,iBAAA;;;ACjDD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-chip.mjs","sources":["../../../libs/watt/package/chip/watt-chip.component.ts","../../../libs/watt/package/chip/watt-action-chip.component.ts","../../../libs/watt/package/chip/watt-menu-chip.component.ts","../../../libs/watt/package/chip/watt-date-chip.component.ts","../../../libs/watt/package/chip/watt-date-range-chip.component.ts","../../../libs/watt/package/chip/watt-filter-chip.component.ts","../../../libs/watt/package/chip/watt-chip.directive.ts","../../../libs/watt/package/chip/index.ts","../../../libs/watt/package/chip/energinet-watt-chip.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, input } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-chip',\n styleUrls: ['./watt-chip.component.scss'],\n template: `\n <label\n [class.selected]=\"selected()\"\n [class.disabled]=\"disabled()\"\n [class.read-only]=\"readonly()\"\n >\n @if (selected()) {\n <watt-icon class=\"selected-icon\" name=\"checkmark\" size=\"s\" [attr.aria-hidden]=\"true\" />\n }\n <ng-content />\n </label>\n `,\n})\nexport class WattChipComponent {\n selected = input(false);\n disabled = input(false);\n readonly = input(false);\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, input, output } from '@angular/core';\n\nimport { WattIcon, WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-action-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled()\">\n <button\n type=\"button\"\n class=\"cdk-visually-hidden\"\n (click)=\"$event.stopImmediatePropagation(); action.emit()\"\n [disabled]=\"disabled()\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n [name]=\"icon()\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.disabled]=\"disabled()\"\n />\n </watt-chip>\n `,\n})\nexport class WattActionChipComponent {\n disabled = input(false);\n icon = input.required<WattIcon>();\n action = output<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { WattChipComponent } from './watt-chip.component';\n\nexport type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';\n\n@Component({\n imports: [WattChipComponent, WattIconComponent],\n selector: 'watt-menu-chip',\n styles: [\n `\n :host {\n display: block;\n }\n\n .menu-icon {\n margin-left: var(--watt-space-xs);\n transition: linear 0.2s all;\n color: var(--watt-color-primary);\n\n &.disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n }\n\n .opened {\n transform: rotate(180deg);\n }\n\n .selected {\n color: var(--watt-color-neutral-white);\n }\n\n .disabled {\n color: var(--watt-on-light-low-emphasis);\n }\n `,\n ],\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"selected\">\n <button\n class=\"cdk-visually-hidden\"\n [attr.aria-haspopup]=\"hasPopup\"\n [attr.aria-expanded]=\"opened\"\n [attr.aria-pressed]=\"selected\"\n (click)=\"toggle.emit()\"\n [disabled]=\"disabled\"\n ></button>\n <ng-content />\n <watt-icon\n size=\"s\"\n name=\"arrowDropDown\"\n class=\"menu-icon\"\n [attr.aria-hidden]=\"true\"\n [class.opened]=\"opened\"\n [class.selected]=\"selected\"\n [class.disabled]=\"disabled\"\n />\n </watt-chip>\n `,\n})\nexport class WattMenuChipComponent {\n @Input() opened = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: string;\n @Input() selected = false;\n @Input() hasPopup: WattMenuChipHasPopup = 'menu';\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() toggle = new EventEmitter<void>();\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\n\nimport { WattDatePipe } from '@energinet/watt/core/date';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { FormControl } from '@angular/forms';\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\n@Component({\n imports: [MatDatepickerModule, WattMenuChipComponent, WattFieldComponent, WattDatePipe],\n selector: 'watt-date-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-chip {\n input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-datepicker #picker />\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"!!value\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <input\n tabindex=\"-1\"\n class=\"cdk-visually-hidden\"\n type=\"text\"\n [value]=\"value\"\n [matDatepicker]=\"picker\"\n (dateChange)=\"value = $event.value\"\n (dateChange)=\"selectionChange.emit($event.value)\"\n />\n {{ placeholder }}\n <span>\n @if (value) {\n @if (placeholder) {\n :\n }\n {{ value | wattDate }}\n }\n </span>\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() placeholder?: string;\n @Input() value?: string;\n @Input({ required: true }) formControl!: FormControl;\n @Output() selectionChange = new EventEmitter<Date>();\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 { FormControl } from '@angular/forms';\nimport {\n Component,\n EventEmitter,\n HostBinding,\n Injectable,\n Input,\n Output,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport {\n DateRange,\n DefaultMatCalendarRangeStrategy,\n MAT_DATE_RANGE_SELECTION_STRATEGY,\n MatDatepickerModule,\n} from '@angular/material/datepicker';\nimport { dayjs, WattDatePipe, WattRange } from '@energinet/watt/core/date';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattDatepickerIntlService } from '@energinet/watt/picker/datepicker';\n\nimport { WattMenuChipComponent } from './watt-menu-chip.component';\n\ntype customSelectionStrategy = (date: Date | null) => DateRange<Date>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattDateRangeSelectionStrategy extends DefaultMatCalendarRangeStrategy<Date> {\n private customSelectionStrategy!: customSelectionStrategy;\n\n setCustomSelectionStrategy(strategy: customSelectionStrategy) {\n this.customSelectionStrategy = strategy;\n }\n\n override selectionFinished(date: Date, currentRange: DateRange<Date>): DateRange<Date> {\n let range: DateRange<Date> = super.selectionFinished(date, currentRange);\n\n if (this.customSelectionStrategy) {\n range = this.customSelectionStrategy(date);\n }\n\n return range.end ? new DateRange(range.start, dayjs(range.end).endOf('day').toDate()) : range;\n }\n\n override createPreview(activeDate: Date | null, currentRange: DateRange<Date>): DateRange<Date> {\n if (!this.customSelectionStrategy) {\n return super.createPreview(activeDate, currentRange);\n } else {\n return this.customSelectionStrategy(activeDate);\n }\n }\n}\n\n@Component({\n imports: [\n MatDatepickerModule,\n WattMenuChipComponent,\n WattDatePipe,\n WattFieldComponent,\n WattButtonComponent,\n ],\n providers: [\n {\n provide: MAT_DATE_RANGE_SELECTION_STRATEGY,\n useFactory: (comp: WattDateRangeChipComponent) => comp.selectionStrategy(),\n deps: [WattDateRangeChipComponent],\n },\n ],\n selector: 'watt-date-range-chip',\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-date-range-chip {\n mat-date-range-input {\n top: 0;\n bottom: 0;\n height: auto;\n visibility: hidden;\n }\n\n &.has-placeholder .value::before {\n content: ':';\n }\n\n watt-field label .watt-field-wrapper {\n background-color: transparent;\n }\n }\n `,\n ],\n template: `\n <mat-date-range-picker #picker>\n @if (showActions) {\n <mat-date-range-picker-actions>\n <watt-button variant=\"text\" (click)=\"clearInput()\" icon=\"remove\">{{\n intl.clear\n }}</watt-button>\n <watt-button variant=\"primary\" matDateRangePickerApply>{{ intl.select }}</watt-button>\n </mat-date-range-picker-actions>\n }\n </mat-date-range-picker>\n\n <watt-field [control]=\"formControl\" [chipMode]=\"true\">\n <watt-menu-chip\n hasPopup=\"dialog\"\n [disabled]=\"disabled\"\n [selected]=\"value?.start && value?.end ? true : false\"\n [opened]=\"picker.opened\"\n (toggle)=\"picker.open()\"\n >\n <mat-date-range-input\n #input\n class=\"cdk-visually-hidden\"\n separator=\"\"\n [rangePicker]=\"picker\"\n >\n <input\n type=\"text\"\n matStartDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.start\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"showActions && onSelectionChange($event.value ? input.value! : null)\"\n />\n <input\n type=\"text\"\n matEndDate\n tabindex=\"-1\"\n role=\"none\"\n [value]=\"value?.end\"\n (dateChange)=\"value = input.value!\"\n (dateChange)=\"onSelectionChange($event.value ? input.value! : null)\"\n />\n </mat-date-range-input>\n <ng-content />\n @if (value?.start && value?.end) {\n <span class=\"value\">\n {{ value | wattDate }}\n </span>\n }\n </watt-menu-chip>\n <ng-content ngProjectAs=\"watt-field-hint\" select=\"watt-field-hint\" />\n <ng-content ngProjectAs=\"watt-field-error\" select=\"watt-field-error\" />\n </watt-field>\n `,\n})\nexport class WattDateRangeChipComponent {\n @Input() disabled = false;\n @Input() label?: string;\n @Input() value?: WattRange<Date>;\n @Input({ required: true }) formControl!: FormControl;\n @Input() placeholder = true;\n @Input() showActions = false;\n @Input() customSelectionStrategy!: (date: Date | null) => DateRange<Date>;\n\n @HostBinding('class.has-placeholder')\n get hasPlaceholderClass(): boolean {\n return this.placeholder;\n }\n\n @Output() selectionChange = new EventEmitter<WattRange<Date> | null>();\n\n private _dateAdapter = inject(DateAdapter);\n protected intl = inject(WattDatepickerIntlService);\n\n selectionStrategy() {\n const strategy = new WattDateRangeSelectionStrategy(this._dateAdapter);\n strategy.setCustomSelectionStrategy(this.customSelectionStrategy);\n return strategy;\n }\n\n clearInput(): void {\n this.value = undefined;\n this.selectionChange.emit(null);\n }\n\n onSelectionChange(value: WattRange<Date> | null): void {\n this.selectionChange.emit(value);\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, EventEmitter, Input, Output } from '@angular/core';\n\nimport { WattChipComponent } from './watt-chip.component';\n\nfunction isFirstRender() {\n let isFirstRender = true;\n return () => {\n if (!isFirstRender) return false;\n isFirstRender = false;\n return true;\n };\n}\n\n@Component({\n imports: [WattChipComponent],\n selector: 'watt-filter-chip',\n template: `\n <watt-chip [disabled]=\"disabled\" [selected]=\"isFirstRender() ? selected : input.checked\">\n <input\n #input\n class=\"cdk-visually-hidden\"\n [type]=\"choice === undefined ? 'checkbox' : 'radio'\"\n [name]=\"name\"\n [value]=\"value\"\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n (change)=\"onChange(input)\"\n />\n <ng-content />\n </watt-chip>\n `,\n})\nexport class WattFilterChipComponent<T = string> {\n @Input() selected = false;\n @Input() disabled = false;\n @Input() name?: string;\n @Input() value?: T;\n @Input() choice?: string;\n @Output() selectionChange = new EventEmitter<T>();\n isFirstRender = isFirstRender();\n\n onChange(input: HTMLInputElement): void {\n const value = this.choice !== undefined ? input.value : input.checked;\n this.selectionChange.emit(value as T);\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 { Directive, ElementRef, EventEmitter, forwardRef, inject } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { WattFilterChipComponent } from './watt-filter-chip.component';\nimport { WattDateChipComponent } from './watt-date-chip.component';\nimport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\ninterface WattChip {\n value?: any;\n disabled: boolean;\n selectionChange: EventEmitter<any>;\n}\n\n@Directive({\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattFormChipDirective),\n multi: true,\n },\n ],\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: `\n watt-filter-chip[formControl],\n watt-date-chip[formControl],\n watt-date-range-chip[formControl],\n watt-filter-chip[formControlName],\n watt-date-chip[formControlName],\n watt-date-range-chip[formControlName],\n `,\n})\nexport class WattFormChipDirective implements ControlValueAccessor {\n private filterChip = inject(WattFilterChipComponent, { host: true, optional: true, self: true });\n private dateChip = inject(WattDateChipComponent, { host: true, optional: true, self: true });\n private dateRangeChip = inject(WattDateRangeChipComponent, {\n host: true,\n optional: true,\n self: true,\n });\n\n private element = inject(ElementRef);\n private component?: WattChip;\n\n constructor() {\n if (this.filterChip) {\n this.component = this.filterChip;\n } else if (this.dateChip) {\n this.component = this.dateChip;\n } else if (this.dateRangeChip) {\n this.component = this.dateRangeChip;\n }\n }\n\n writeValue(value?: any): void {\n if (this.component) {\n this.component.value = value;\n }\n }\n\n registerOnChange(fn: () => void) {\n this.component?.selectionChange.subscribe(fn);\n }\n\n registerOnTouched(fn: () => void) {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n setDisabledState(disabled: boolean) {\n if (this.component) {\n this.component.disabled = disabled;\n }\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattActionChipComponent } from './watt-action-chip.component';\nexport { WattChipComponent } from './watt-chip.component';\nexport { WattDateChipComponent } from './watt-date-chip.component';\nexport { WattDateRangeChipComponent } from './watt-date-range-chip.component';\nexport { WattFilterChipComponent } from './watt-filter-chip.component';\nexport { WattFormChipDirective } from './watt-chip.directive';\nexport { WattMenuChipComponent } from './watt-menu-chip.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAuBa,iBAAiB,CAAA;AAC5B,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AACvB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;AACvB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;uGAHZ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iBAAiB,EAblB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAA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AeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -201,7 +201,7 @@ class WattDataTableComponent {
|
|
|
201
201
|
}
|
|
202
202
|
</vater-flex>
|
|
203
203
|
</watt-card>
|
|
204
|
-
`, isInline: true, styles: [":root{--watt-data-table-empty-state-margin: auto}watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-data-filters{min-height:44px}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m)) -24px -24px}watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.watt-data-table--empty-state{margin-bottom:var(--watt-space-m);overflow:auto}.watt-data-table--empty-state>watt-empty-state{margin:var(--watt-data-table-empty-state-margin)}\n"], dependencies: [{ kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["direction", "grow", "shrink", "basis", "gap", "justify", "wrap", "scrollable", "offset"] }, { kind: "component", type: VaterSpacerComponent, selector: "vater-spacer, [vater-spacer]" }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]", inputs: ["align", "direction", "gap", "justify", "offset"] }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["fill", "inset", "center"] }, { kind: "component", type: WattCardComponent, selector: "watt-card", inputs: ["variant", "loading"] }, { kind: "component", type: WattEmptyStateComponent, selector: "watt-empty-state", inputs: ["icon", "size", "title", "message", "useHTML"] }, { kind: "component", type: WattPaginatorComponent, selector: "watt-paginator", inputs: ["length", "pageSizeOptions", "pageSize", "pageIndex", "for"], outputs: ["changed"] }, { kind: "component", type: WattSearchComponent, selector: "watt-search", inputs: ["label", "debounceTime"], outputs: ["search"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
204
|
+
`, isInline: true, styles: [":root{--watt-data-table-empty-state-margin: auto}watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-data-filters{min-height:44px}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m)) -24px -24px}watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell{border-bottom:none}.watt-data-table--empty-state{margin-bottom:var(--watt-space-m);overflow:auto}.watt-data-table--empty-state>watt-empty-state{margin:var(--watt-data-table-empty-state-margin)}\n"], dependencies: [{ kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["direction", "grow", "shrink", "basis", "gap", "justify", "wrap", "scrollable", "offset"] }, { kind: "component", type: VaterSpacerComponent, selector: "vater-spacer, [vater-spacer]" }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]", inputs: ["align", "direction", "gap", "justify", "offset"] }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["fill", "inset", "center"] }, { kind: "component", type: WattCardComponent, selector: "watt-card", inputs: ["variant", "loading"] }, { kind: "component", type: WattEmptyStateComponent, selector: "watt-empty-state", inputs: ["icon", "size", "title", "message", "useHTML"] }, { kind: "component", type: WattPaginatorComponent, selector: "watt-paginator", inputs: ["length", "pageSizeOptions", "pageSize", "pageIndex", "for"], outputs: ["changed"] }, { kind: "component", type: WattSearchComponent, selector: "watt-search", inputs: ["label", "debounceTime"], outputs: ["search"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
205
205
|
}
|
|
206
206
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDataTableComponent, decorators: [{
|
|
207
207
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.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 } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\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-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattSearchComponent,\n WattButtonComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n :root {\n --watt-data-table-empty-state-margin: auto;\n }\n\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-data-filters {\n min-height: 44px;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m)) -24px -24px;\n }\n\n watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell {\n border-bottom: none;\n }\n\n .watt-data-table--empty-state {\n margin-bottom: var(--watt-space-m);\n overflow: auto;\n\n & > watt-empty-state {\n margin: var(--watt-data-table-empty-state-margin);\n }\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex fill=\"vertical\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"s\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">{{ count() ?? table().dataSource.totalCount }}</span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n </vater-stack>\n <ng-content />\n <vater-spacer />\n @if (enableSearch()) {\n <watt-search [label]=\"searchLabel() ?? intl.search\" (search)=\"onSearch($event)\" />\n }\n <ng-content select=\"watt-data-actions\" />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <ng-content select=\"watt-data-filters\" />\n <vater-flex scrollable fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() && !table().loading && table().dataSource.filteredData.length === 0\n ) {\n <div class=\"watt-data-table--empty-state\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\">{{\n intl.emptyRetry\n }}</watt-button>\n }\n </watt-empty-state>\n </div>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource\"\n [length]=\"count() ?? 0\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n count = input<number>();\n variant = input<WATT_CARD_VARIANT>('elevation');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource.filter = value;\n if (!value) this.clear.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\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;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A,EAAA;wBACP,kBAAkB;wBAClB,oBAAoB;wBACpB,mBAAmB;wBACnB,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,sBAAsB;wBACtB,mBAAmB;wBACnB,mBAAmB;qBACpB,EACc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAqC3B,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA;;;ACnJH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.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 } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\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-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattSearchComponent,\n WattButtonComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n :root {\n --watt-data-table-empty-state-margin: auto;\n }\n\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-data-filters {\n min-height: 44px;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m)) -24px -24px;\n }\n\n watt-data-table watt-table .mat-mdc-table tr.mdc-data-table__row:last-child .mat-mdc-cell {\n border-bottom: none;\n }\n\n .watt-data-table--empty-state {\n margin-bottom: var(--watt-space-m);\n overflow: auto;\n\n & > watt-empty-state {\n margin: var(--watt-data-table-empty-state-margin);\n }\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex fill=\"vertical\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"s\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">{{ count() ?? table().dataSource.totalCount }}</span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n </vater-stack>\n <ng-content />\n <vater-spacer />\n @if (enableSearch()) {\n <watt-search [label]=\"searchLabel() ?? intl.search\" (search)=\"onSearch($event)\" />\n }\n <ng-content select=\"watt-data-actions\" />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <ng-content select=\"watt-data-filters\" />\n <vater-flex scrollable fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() && !table().loading && table().dataSource.filteredData.length === 0\n ) {\n <div class=\"watt-data-table--empty-state\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\">{{\n intl.emptyRetry\n }}</watt-button>\n }\n </watt-empty-state>\n </div>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource\"\n [length]=\"count() ?? 0\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n count = input<number>();\n variant = input<WATT_CARD_VARIANT>('elevation');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource.filter = value;\n if (!value) this.clear.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\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAgB,cAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;2FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAgB,cAAA,CAAA;AAC3B,iBAAA;;;ACvBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,I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AAsB,EACtB,QAAA,EAAA,gBAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,WAAA,EAAA,KAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,mBAAmB,gHACnB,mBAAmB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FA6FV,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAxGlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAClB,OAAA,EAAA;wBACP,kBAAkB;wBAClB,oBAAoB;wBACpB,mBAAmB;wBACnB,qBAAqB;wBACrB,iBAAiB;wBACjB,uBAAuB;wBACvB,sBAAsB;wBACtB,mBAAmB;wBACnB,mBAAmB;qBACpB,EACc,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAqC3B,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,ijBAAA,CAAA,EAAA;;;ACnJH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -153,7 +153,7 @@ class WattDateTimeField {
|
|
|
153
153
|
<ng-content select="watt-field-error" ngProjectAs="watt-field-error" />
|
|
154
154
|
<ng-content select="watt-field-hint" ngProjectAs="watt-field-hint" />
|
|
155
155
|
</watt-field>
|
|
156
|
-
`, isInline: true, styles: ["watt-datetime-field{display:block;width:100%}.watt-datetime-field-picker{position:fixed;position-area:bottom span-right;position-try-fallbacks:flip-block;width:296px;height:354px;inset:unset;margin:unset;border:0}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
156
|
+
`, isInline: true, styles: ["watt-datetime-field{display:block;width:100%}.watt-datetime-field-picker{position:fixed;position-area:bottom span-right;position-try-fallbacks:flip-block;width:296px;height:354px;inset:unset;margin:unset;border:0}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: MaskitoDirective, selector: "[maskito]", inputs: ["maskito", "maskitoElement"] }, { kind: "component", type: MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd", "startDateAccessibleName", "endDateAccessibleName"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection", "_userDragDrop"], exportAs: ["matCalendar"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
157
157
|
}
|
|
158
158
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: WattDateTimeField, decorators: [{
|
|
159
159
|
type: Component,
|