@energinet/watt 2.0.8 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/energinet-watt-badge.mjs.map +1 -1
- package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -1
- package/fesm2022/energinet-watt-button.mjs.map +1 -1
- package/fesm2022/energinet-watt-card.mjs.map +1 -1
- package/fesm2022/energinet-watt-checkbox.mjs.map +1 -1
- package/fesm2022/energinet-watt-chip.mjs.map +1 -1
- package/fesm2022/energinet-watt-code.mjs.map +1 -1
- package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -1
- package/fesm2022/energinet-watt-core-color.mjs.map +1 -1
- package/fesm2022/energinet-watt-core-date.mjs.map +1 -1
- package/fesm2022/energinet-watt-data.mjs.map +1 -1
- package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
- package/fesm2022/energinet-watt-drawer.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropzone.mjs.map +1 -1
- package/fesm2022/energinet-watt-empty-state.mjs.map +1 -1
- package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -1
- package/fesm2022/energinet-watt-expansion.mjs.map +1 -1
- package/fesm2022/energinet-watt-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -1
- package/fesm2022/energinet-watt-icon.mjs.map +1 -1
- package/fesm2022/energinet-watt-modal.mjs.map +1 -1
- package/fesm2022/energinet-watt-paginator.mjs.map +1 -1
- package/fesm2022/energinet-watt-phone-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -1
- package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -1
- package/fesm2022/energinet-watt-radio.mjs.map +1 -1
- package/fesm2022/energinet-watt-search.mjs.map +1 -1
- package/fesm2022/energinet-watt-segmented-buttons.mjs.map +1 -1
- package/fesm2022/energinet-watt-shell.mjs.map +1 -1
- package/fesm2022/energinet-watt-slide-toggle.mjs.map +1 -1
- package/fesm2022/energinet-watt-spinner.mjs.map +1 -1
- package/fesm2022/energinet-watt-stepper.mjs.map +1 -1
- package/fesm2022/energinet-watt-table.mjs.map +1 -1
- package/fesm2022/energinet-watt-tabs.mjs.map +1 -1
- package/fesm2022/energinet-watt-text-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-toast.mjs.map +1 -1
- package/fesm2022/energinet-watt-tooltip.mjs +2 -2
- package/fesm2022/energinet-watt-tooltip.mjs.map +1 -1
- package/fesm2022/energinet-watt-utils-css.mjs.map +1 -1
- package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -1
- package/fesm2022/energinet-watt-validation-message.mjs.map +1 -1
- package/fesm2022/energinet-watt-vater.mjs.map +1 -1
- package/fesm2022/energinet-watt-year-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-yearmonth-field.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-badge.mjs","sources":["../../../libs/watt/package/badge/watt-badge.component.ts","../../../libs/watt/package/badge/index.ts","../../../libs/watt/package/badge/energinet-watt-badge.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, computed, input } from '@angular/core';\n\nexport type WattBadgeType =\n | 'warning'\n | 'success'\n | 'danger'\n | 'info'\n | 'neutral'\n | 'version'\n | 'skeleton';\n\nexport type WattBadgeSize = 'normal' | 'large';\n\n/**\n * Usage:\n * `import { WattBadgeComponent } from '@energinet-datahub/watt/badge';`\n */\n@Component({\n selector: 'watt-badge',\n styleUrls: ['./watt-badge.component.scss'],\n template: '<ng-content />',\n host: {\n '[class]': 'badgeType()',\n '[class.watt-badge-large]': 'isLarge()',\n },\n})\nexport class WattBadgeComponent {\n type = input<WattBadgeType>('info');\n size = input<WattBadgeSize>('normal');\n badgeType = computed(() => `watt-badge-${this.type()}`);\n isLarge = computed(() => this.size() === 'large');\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 { WattBadgeComponent, WattBadgeType, WattBadgeSize } from './watt-badge.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAcA;;;AAGG;MAUU,kBAAkB,CAAA;AAC7B,IAAA,IAAI,GAAG,KAAK,CAAgB,MAAM,CAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAgB,QAAQ,CAAC;AACrC,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"energinet-watt-badge.mjs","sources":["../../../libs/watt/package/badge/watt-badge.component.ts","../../../libs/watt/package/badge/index.ts","../../../libs/watt/package/badge/energinet-watt-badge.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component, computed, input } from '@angular/core';\n\nexport type WattBadgeType =\n | 'warning'\n | 'success'\n | 'danger'\n | 'info'\n | 'neutral'\n | 'version'\n | 'skeleton';\n\nexport type WattBadgeSize = 'normal' | 'large';\n\n/**\n * Usage:\n * `import { WattBadgeComponent } from '@energinet-datahub/watt/badge';`\n */\n@Component({\n selector: 'watt-badge',\n styleUrls: ['./watt-badge.component.scss'],\n template: '<ng-content />',\n host: {\n '[class]': 'badgeType()',\n '[class.watt-badge-large]': 'isLarge()',\n },\n})\nexport class WattBadgeComponent {\n type = input<WattBadgeType>('info');\n size = input<WattBadgeSize>('normal');\n badgeType = computed(() => `watt-badge-${this.type()}`);\n isLarge = computed(() => this.size() === 'large');\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 { WattBadgeComponent, WattBadgeType, WattBadgeSize } from './watt-badge.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAcA;;;AAGG;MAUU,kBAAkB,CAAA;AAC7B,IAAA,IAAI,GAAG,KAAK,CAAgB,MAAM,CAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAgB,QAAQ,CAAC;AACrC,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAA,WAAA,EAAc,IAAI,CAAC,IAAI,EAAE,CAAA,CAAE,CAAC;AACvD,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,KAAK,OAAO,CAAC;uGAJtC,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,kBAAkB,qZANnB,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,gtCAAA,CAAA,EAAA,CAAA;;2FAMf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAT9B,SAAS;+BACE,YAAY,EAAA,QAAA,EAEZ,gBAAgB,EAAA,IAAA,EACpB;AACJ,wBAAA,SAAS,EAAE,aAAa;AACxB,wBAAA,0BAA0B,EAAE,WAAW;AACxC,qBAAA,EAAA,MAAA,EAAA,CAAA,gtCAAA,CAAA,EAAA;;;AC1CH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-breadcrumbs.mjs","sources":["../../../libs/watt/package/breadcrumbs/watt-breadcrumbs.component.ts","../../../libs/watt/package/breadcrumbs/index.ts","../../../libs/watt/package/breadcrumbs/energinet-watt-breadcrumbs.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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n TemplateRef,\n ViewEncapsulation,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n selector: 'watt-breadcrumb',\n encapsulation: ViewEncapsulation.None,\n template: `<ng-template #templateRef><ng-content /></ng-template>`,\n})\nexport class WattBreadcrumbComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>('templateRef');\n // Used to determine if the breadcrumb is interactive or not\n actionEmitter = new Subject<unknown>();\n click = outputFromObservable(this.actionEmitter);\n}\n\n/**\n * Usage:\n * `import { WATT_BREADCRUMBS } from '@energinet-datahub/watt/breadcrumbs';`\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, WattIconComponent],\n selector: 'watt-breadcrumbs',\n styleUrls: ['./watt-breadcrumbs.component.scss'],\n template: `\n <nav>\n @for (breadcrumb of breadcrumbs(); track breadcrumb; let isLast = $last) {\n <span\n class=\"watt-breadcrumb\"\n (click)=\"breadcrumb.actionEmitter.next($event)\"\n [class.interactive]=\"breadcrumb.actionEmitter.observed\"\n [attr.role]=\"breadcrumb.actionEmitter.observed ? 'link' : null\"\n >\n <ng-container *ngTemplateOutlet=\"breadcrumb.templateRef()\" />\n @if (!isLast) {\n <watt-icon name=\"right\" />\n }\n </span>\n }\n </nav>\n `,\n})\nexport class WattBreadcrumbsComponent {\n /**\n * @ignore\n */\n breadcrumbs = contentChildren<WattBreadcrumbComponent>(WattBreadcrumbComponent);\n}\n\nexport const WATT_BREADCRUMBS = [WattBreadcrumbsComponent, WattBreadcrumbComponent] as const;\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 {\n WATT_BREADCRUMBS,\n WattBreadcrumbsComponent,\n WattBreadcrumbComponent,\n} from './watt-breadcrumbs.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,uBAAuB,CAAA;AAClC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,aAAa,CAAC;;AAErE,IAAA,aAAa,GAAG,IAAI,OAAO,EAAW;AACtC,IAAA,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC;uGAJrC,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,oOAFxB,
|
|
1
|
+
{"version":3,"file":"energinet-watt-breadcrumbs.mjs","sources":["../../../libs/watt/package/breadcrumbs/watt-breadcrumbs.component.ts","../../../libs/watt/package/breadcrumbs/index.ts","../../../libs/watt/package/breadcrumbs/energinet-watt-breadcrumbs.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 { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n TemplateRef,\n ViewEncapsulation,\n contentChildren,\n viewChild,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { WattIconComponent } from '@energinet/watt/icon';\n\n@Component({\n selector: 'watt-breadcrumb',\n encapsulation: ViewEncapsulation.None,\n template: `<ng-template #templateRef><ng-content /></ng-template>`,\n})\nexport class WattBreadcrumbComponent {\n templateRef = viewChild.required<TemplateRef<unknown>>('templateRef');\n // Used to determine if the breadcrumb is interactive or not\n actionEmitter = new Subject<unknown>();\n click = outputFromObservable(this.actionEmitter);\n}\n\n/**\n * Usage:\n * `import { WATT_BREADCRUMBS } from '@energinet-datahub/watt/breadcrumbs';`\n */\n@Component({\n encapsulation: ViewEncapsulation.None,\n imports: [NgTemplateOutlet, WattIconComponent],\n selector: 'watt-breadcrumbs',\n styleUrls: ['./watt-breadcrumbs.component.scss'],\n template: `\n <nav>\n @for (breadcrumb of breadcrumbs(); track breadcrumb; let isLast = $last) {\n <span\n class=\"watt-breadcrumb\"\n (click)=\"breadcrumb.actionEmitter.next($event)\"\n [class.interactive]=\"breadcrumb.actionEmitter.observed\"\n [attr.role]=\"breadcrumb.actionEmitter.observed ? 'link' : null\"\n >\n <ng-container *ngTemplateOutlet=\"breadcrumb.templateRef()\" />\n @if (!isLast) {\n <watt-icon name=\"right\" />\n }\n </span>\n }\n </nav>\n `,\n})\nexport class WattBreadcrumbsComponent {\n /**\n * @ignore\n */\n breadcrumbs = contentChildren<WattBreadcrumbComponent>(WattBreadcrumbComponent);\n}\n\nexport const WATT_BREADCRUMBS = [WattBreadcrumbsComponent, WattBreadcrumbComponent] as const;\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 {\n WATT_BREADCRUMBS,\n WattBreadcrumbsComponent,\n WattBreadcrumbComponent,\n} from './watt-breadcrumbs.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAkBa,uBAAuB,CAAA;AAClC,IAAA,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAuB,aAAa,CAAC;;AAErE,IAAA,aAAa,GAAG,IAAI,OAAO,EAAW;AACtC,IAAA,KAAK,GAAG,oBAAoB,CAAC,IAAI,CAAC,aAAa,CAAC;uGAJrC,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,oOAFxB,CAAA,sDAAA,CAAwD,EAAA,QAAA,EAAA,IAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAEvD,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,Q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;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -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';\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,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAEnE;;AAEG;AACH,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;uGApB5B,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,
|
|
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,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;AAEnE;;AAEG;AACH,IAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;uGApB5B,mBAAmB,EAAA,I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5C,qBAAA,EAAA,OAAA,EACQ,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,CAAC,EAAA,QAAA,EACzD;;;;;;;;;;;;;;;;;;;;AAoBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,2+HAAA,CAAA,EAAA;;;ACjEH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-card.mjs","sources":["../../../libs/watt/package/card/watt-card-title.component.ts","../../../libs/watt/package/card/watt-card.component.ts","../../../libs/watt/package/card/index.ts","../../../libs/watt/package/card/energinet-watt-card.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\nconst selector = 'watt-card-title';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector,\n styles: [\n `\n ${selector} {\n display: block;\n }\n\n ${selector} h4, ${selector} h3 {\n color: var(--watt-typography-text-color);\n margin: 0;\n }\n `,\n ],\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClass()',\n },\n})\nexport class WattCardTitleComponent {\n cssClass = () => 'watt-card__title watt-space-stack-m';\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 { input, computed, Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { WattCardTitleComponent } from './watt-card-title.component';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\n/**\n * Usage:\n * `import { WattCardComponent } from '@energinet-datahub/watt/card';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-card',\n styles: [\n `\n :host {\n border-radius: 4px;\n display: block;\n padding: calc(1.5 * var(--watt-space-m)); /* 24px */\n background: var(--bg-card);\n }\n\n :host.watt-solid {\n border: 1px solid var(--watt-color-neutral-grey-300);\n }\n\n :host.watt-fill {\n border: 1px solid var(--watt-color-neutral-grey-100);\n background: var(--watt-color-neutral-grey-100);\n }\n\n .watt-card__spinner {\n z-index: 1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--watt-color-neutral-white);\n opacity: 0.5;\n }\n `,\n ],\n template: `\n <ng-content select=\"watt-card-title\" />\n\n <ng-content />\n\n @if (loading()) {\n <div class=\"watt-card__spinner\">\n <watt-spinner />\n </div>\n }\n `,\n imports: [WattSpinnerComponent],\n host: {\n '[class]': 'cardVariant()',\n },\n})\nexport class WattCardComponent {\n variant = input<WATT_CARD_VARIANT>('elevation');\n loading = input<boolean>(false);\n cardVariant = computed(() => `watt-card watt-${this.variant()}`);\n}\n\nexport type WATT_CARD_VARIANT = 'solid' | 'elevation' | 'fill';\nexport const WATT_CARD = [WattCardComponent, WattCardTitleComponent];\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 { WattCardComponent, WATT_CARD, WATT_CARD_VARIANT } from './watt-card.component';\nexport { WattCardTitleComponent } from './watt-card-title.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAGA,MAAM,QAAQ,GAAG,iBAAiB;MAuBrB,sBAAsB,CAAA;AACjC,IAAA,QAAQ,GAAG,MAAM,qCAAqC;uGAD3C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,4HANvB,
|
|
1
|
+
{"version":3,"file":"energinet-watt-card.mjs","sources":["../../../libs/watt/package/card/watt-card-title.component.ts","../../../libs/watt/package/card/watt-card.component.ts","../../../libs/watt/package/card/index.ts","../../../libs/watt/package/card/energinet-watt-card.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\nconst selector = 'watt-card-title';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector,\n styles: [\n `\n ${selector} {\n display: block;\n }\n\n ${selector} h4, ${selector} h3 {\n color: var(--watt-typography-text-color);\n margin: 0;\n }\n `,\n ],\n template: `<ng-content />`,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'cssClass()',\n },\n})\nexport class WattCardTitleComponent {\n cssClass = () => 'watt-card__title watt-space-stack-m';\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 { input, computed, Component, ChangeDetectionStrategy } from '@angular/core';\n\nimport { WattCardTitleComponent } from './watt-card-title.component';\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\n\n/**\n * Usage:\n * `import { WattCardComponent } from '@energinet-datahub/watt/card';`\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'watt-card',\n styles: [\n `\n :host {\n border-radius: 4px;\n display: block;\n padding: calc(1.5 * var(--watt-space-m)); /* 24px */\n background: var(--bg-card);\n }\n\n :host.watt-solid {\n border: 1px solid var(--watt-color-neutral-grey-300);\n }\n\n :host.watt-fill {\n border: 1px solid var(--watt-color-neutral-grey-100);\n background: var(--watt-color-neutral-grey-100);\n }\n\n .watt-card__spinner {\n z-index: 1;\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--watt-color-neutral-white);\n opacity: 0.5;\n }\n `,\n ],\n template: `\n <ng-content select=\"watt-card-title\" />\n\n <ng-content />\n\n @if (loading()) {\n <div class=\"watt-card__spinner\">\n <watt-spinner />\n </div>\n }\n `,\n imports: [WattSpinnerComponent],\n host: {\n '[class]': 'cardVariant()',\n },\n})\nexport class WattCardComponent {\n variant = input<WATT_CARD_VARIANT>('elevation');\n loading = input<boolean>(false);\n cardVariant = computed(() => `watt-card watt-${this.variant()}`);\n}\n\nexport type WATT_CARD_VARIANT = 'solid' | 'elevation' | 'fill';\nexport const WATT_CARD = [WattCardComponent, WattCardTitleComponent];\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 { WattCardComponent, WATT_CARD, WATT_CARD_VARIANT } from './watt-card.component';\nexport { WattCardTitleComponent } from './watt-card-title.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAGA,MAAM,QAAQ,GAAG,iBAAiB;MAuBrB,sBAAsB,CAAA;AACjC,IAAA,QAAQ,GAAG,MAAM,qCAAqC;uGAD3C,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,4HANvB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,yHA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EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,eAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAhBlB;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8cAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACS,oBAAoB,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAKnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBApD7B,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,WAAW,EAAA,QAAA,EAkCX;;;;;;;;;;GAUT,EAAA,OAAA,EACQ,CAAC,oBAAoB,CAAC,EAAA,IAAA,EACzB;AACJ,wBAAA,SAAS,EAAE,eAAe;AAC3B,qBAAA,EAAA,MAAA,EAAA,CAAA,8cAAA,CAAA,EAAA;;MASU,SAAS,GAAG,CAAC,iBAAiB,EAAE,sBAAsB;;ACtFnE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-checkbox.mjs","sources":["../../../libs/watt/package/checkbox/watt-checkbox.component.ts","../../../libs/watt/package/checkbox/index.ts","../../../libs/watt/package/checkbox/energinet-watt-checkbox.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n signal,\n inject,\n Component,\n ElementRef,\n forwardRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'watt-checkbox',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./watt-checkbox.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattCheckboxComponent),\n multi: true,\n },\n ],\n host: {\n '[class.watt-checkbox--disabled]': 'isdisabled()',\n '[class.watt-checkbox--indeterminate]': 'indeterminate()',\n },\n imports: [FormsModule],\n template: `<label>\n <input\n [ngModel]=\"checked\"\n [disabled]=\"isdisabled()\"\n [indeterminate]=\"indeterminate()\"\n [required]=\"required()\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"checkbox\"\n />\n <ng-content />\n </label>`,\n})\nexport class WattCheckboxComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n\n checked: boolean | null = null;\n\n isdisabled = signal(false);\n indeterminate = signal(false);\n required = input(false);\n\n onChange: (value: boolean) => void = () => {\n //\n };\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n writeValue(checked: boolean | null) {\n this.indeterminate.set(checked === null ? true : false);\n this.checked = checked;\n }\n\n onModelChange(e: boolean) {\n this.indeterminate.set(false);\n this.checked = e;\n this.onChange(e);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isdisabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattCheckboxComponent } from './watt-checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAyCa,qBAAqB,CAAA;AACxB,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;IAEpC,OAAO,GAAmB,IAAI;AAE9B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AAC7B,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC;IAEvB,QAAQ,GAA6B,MAAK;;AAE1C,KAAC;AAED,IAAA,gBAAgB,CAAC,EAA4B,EAAA;AAC3C,QAAA,IAAI,CAAC,QAAQ,GAAG,EAAE;;AAGpB,IAAA,iBAAiB,CAAC,EAA4B,EAAA;QAC5C,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC;;AAG7D,IAAA,UAAU,CAAC,OAAuB,EAAA;AAChC,QAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,OAAO,KAAK,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AACvD,QAAA,IAAI,CAAC,OAAO,GAAG,OAAO;;AAGxB,IAAA,aAAa,CAAC,CAAU,EAAA;AACtB,QAAA,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC;AAC7B,QAAA,IAAI,CAAC,OAAO,GAAG,CAAC;AAChB,QAAA,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;;AAGlB,IAAA,gBAAgB,CAAC,UAAmB,EAAA;AAClC,QAAA,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAC;;uGAjCtB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,
|
|
1
|
+
{"version":3,"file":"energinet-watt-checkbox.mjs","sources":["../../../libs/watt/package/checkbox/watt-checkbox.component.ts","../../../libs/watt/package/checkbox/index.ts","../../../libs/watt/package/checkbox/energinet-watt-checkbox.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n input,\n signal,\n inject,\n Component,\n ElementRef,\n forwardRef,\n ViewEncapsulation,\n} from '@angular/core';\n\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'watt-checkbox',\n encapsulation: ViewEncapsulation.None,\n styleUrls: ['./watt-checkbox.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => WattCheckboxComponent),\n multi: true,\n },\n ],\n host: {\n '[class.watt-checkbox--disabled]': 'isdisabled()',\n '[class.watt-checkbox--indeterminate]': 'indeterminate()',\n },\n imports: [FormsModule],\n template: `<label>\n <input\n [ngModel]=\"checked\"\n [disabled]=\"isdisabled()\"\n [indeterminate]=\"indeterminate()\"\n [required]=\"required()\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"checkbox\"\n />\n <ng-content />\n </label>`,\n})\nexport class WattCheckboxComponent implements ControlValueAccessor {\n private element = inject(ElementRef);\n\n checked: boolean | null = null;\n\n isdisabled = signal(false);\n indeterminate = signal(false);\n required = input(false);\n\n onChange: (value: boolean) => void = () => {\n //\n };\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: (value: boolean) => void): void {\n this.element.nativeElement.addEventListener('focusout', fn);\n }\n\n writeValue(checked: boolean | null) {\n this.indeterminate.set(checked === null ? true : false);\n this.checked = checked;\n }\n\n onModelChange(e: boolean) {\n this.indeterminate.set(false);\n this.checked = e;\n this.onChange(e);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.isdisabled.set(isDisabled);\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattCheckboxComponent } from './watt-checkbox.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAyCa,qBAAqB,CAAA;AACxB,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;IAEpC,OAAO,GAAmB,IAAI;AAE9B,IAAA,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC;AAC1B,IAAA,aAAa,GAAG,MAAM,CAAC,KAAK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,IAAI,EAAA,SAAA,EAE1B;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EAAA,IAAA,EACK;AACJ,wBAAA,iCAAiC,EAAE,cAAc;AACjD,wBAAA,sCAAsC,EAAE,iBAAiB;qBAC1D,EAAA,OAAA,EACQ,CAAC,WAAW,CAAC,EAAA,QAAA,EACZ,CAAA;;;;;;;;;;AAUD,UAAA,CAAA,EAAA,MAAA,EAAA,CAAA,qkEAAA,CAAA,EAAA;;;ACxDX;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -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;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,KAAA,EAAA,iBAAA,EAAA,IAAA,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,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;;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;AAG7D,IAAA,gBAAgB,CAAC,QAAiB,EAAA;AAChC,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AAClB,YAAA,IAAI,CAAC,SAAS,CAAC,QAAQ,GAAG,QAAQ;;;uGAtC3B,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAArB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,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,EAAA,YAAA,EAAA,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AS;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code.worker.token.ts","../../../libs/watt/package/code/watt-code.component.ts","../../../libs/watt/package/code/index.ts","../../../libs/watt/package/code/energinet-watt-code.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 { InjectionToken } from '@angular/core';\n\nexport const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken<(() => Worker) | null>(\n 'WattCodeHighlightWorkerFactory',\n { factory: () => null }\n);\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n input,\n OnDestroy,\n inject,\n effect,\n linkedSignal,\n} from '@angular/core';\n\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\nimport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n\n@Component({\n selector: 'watt-code',\n template: `\n @if (loading()) {\n <vater-stack fill=\"horizontal\" alignment=\"center\"><watt-spinner /></vater-stack>\n } @else {\n <pre>\n <code class=\"watt-code-content\" [innerHTML]=\"formattedCode()\"></code>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n\n code = input.required<string | null | undefined>();\n\n /** @ignore */\n formattedCode = linkedSignal(() => this.code() ?? '');\n\n /** @ignore */\n loading = signal(false);\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\n }\n\n constructor() {\n effect(() => {\n const code = this.code();\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n this.formattedCode.set(event.data);\n this.loading.set(false);\n };\n this.worker.postMessage(code);\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 { WattCodeComponent } from './watt-code.component';\nexport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;
|
|
1
|
+
{"version":3,"file":"energinet-watt-code.mjs","sources":["../../../libs/watt/package/code/watt-code.worker.token.ts","../../../libs/watt/package/code/watt-code.component.ts","../../../libs/watt/package/code/index.ts","../../../libs/watt/package/code/energinet-watt-code.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 { InjectionToken } from '@angular/core';\n\nexport const WATT_CODE_HIGHLIGHT_WORKER_FACTORY = new InjectionToken<(() => Worker) | null>(\n 'WattCodeHighlightWorkerFactory',\n { factory: () => null }\n);\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n signal,\n input,\n OnDestroy,\n inject,\n effect,\n linkedSignal,\n} from '@angular/core';\n\nimport { WattSpinnerComponent } from '@energinet/watt/spinner';\nimport { VaterStackComponent } from '@energinet/watt/vater';\n\nimport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY } from './watt-code.worker.token';\n\n@Component({\n selector: 'watt-code',\n template: `\n @if (loading()) {\n <vater-stack fill=\"horizontal\" alignment=\"center\"><watt-spinner /></vater-stack>\n } @else {\n <pre>\n <code class=\"watt-code-content\" [innerHTML]=\"formattedCode()\"></code>\n </pre>\n }\n `,\n styleUrls: ['./watt-code.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [WattSpinnerComponent, VaterStackComponent],\n})\nexport class WattCodeComponent implements OnDestroy {\n private highlightWorkerFactory = inject(WATT_CODE_HIGHLIGHT_WORKER_FACTORY);\n private worker = this.highlightWorkerFactory?.();\n\n code = input.required<string | null | undefined>();\n\n /** @ignore */\n formattedCode = linkedSignal(() => this.code() ?? '');\n\n /** @ignore */\n loading = signal(false);\n\n /** @ignore */\n ngOnDestroy(): void {\n this.worker?.terminate();\n }\n\n constructor() {\n effect(() => {\n const code = this.code();\n if (!code) return;\n if (!this.worker) return;\n this.loading.set(true);\n this.worker.onmessage = (event) => {\n this.formattedCode.set(event.data);\n this.loading.set(false);\n };\n this.worker.postMessage(code);\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 { WattCodeComponent } from './watt-code.component';\nexport { WATT_CODE_HIGHLIGHT_WORKER_FACTORY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oints.ts","../../../libs/watt/package/core/breakpoints/breakpoints-observer.ts","../../../libs/watt/package/core/breakpoints/index.ts","../../../libs/watt/package/core/breakpoints/energinet-watt-core-breakpoints.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\n/**\n * NOTE: Keep in sync with ./_breakpoints.scss\n * NOTE: We don't use CSS Custom Properties for our breakpoints,\n * because they can't be used in media queries and we don't want those changed on the fly\n */\nexport const WattBreakpoint = {\n XSmall: '(max-width: 599.98px)' as const,\n Small: '(min-width: 600px) and (max-width: 959.98px)' as const,\n Medium: '(min-width: 960px) and (max-width: 1279.98px)' as const,\n Large: '(min-width: 1280px) and (max-width: 1919.98px)' as const,\n XLarge: '(min-width: 1920px)' as const,\n};\n\nexport type WattBreakpointType = keyof typeof WattBreakpoint;\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 { BreakpointObserver } from '@angular/cdk/layout';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { WattBreakpoint, WattBreakpointType } from './breakpoints';\n\nexport interface WattBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WattBreakpointsObserver {\n constructor(private breakpointObserver: BreakpointObserver) {}\n\n observe(breakpoints: WattBreakpointType | WattBreakpointType[]): Observable<WattBreakpointState> {\n if (Array.isArray(breakpoints)) {\n return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));\n }\n return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);\n }\n\n isMatched(breakpoint: WattBreakpointType): boolean {\n return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);\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 { WattBreakpointsObserver, WattBreakpointState } from './breakpoints-observer';\nexport { WattBreakpoint } from './breakpoints';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACA;;;;AAIG;
|
|
1
|
+
{"version":3,"file":"energinet-watt-core-breakpoints.mjs","sources":["../../../libs/watt/package/core/breakpoints/breakpoints.ts","../../../libs/watt/package/core/breakpoints/breakpoints-observer.ts","../../../libs/watt/package/core/breakpoints/index.ts","../../../libs/watt/package/core/breakpoints/energinet-watt-core-breakpoints.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\n/**\n * NOTE: Keep in sync with ./_breakpoints.scss\n * NOTE: We don't use CSS Custom Properties for our breakpoints,\n * because they can't be used in media queries and we don't want those changed on the fly\n */\nexport const WattBreakpoint = {\n XSmall: '(max-width: 599.98px)' as const,\n Small: '(min-width: 600px) and (max-width: 959.98px)' as const,\n Medium: '(min-width: 960px) and (max-width: 1279.98px)' as const,\n Large: '(min-width: 1280px) and (max-width: 1919.98px)' as const,\n XLarge: '(min-width: 1920px)' as const,\n};\n\nexport type WattBreakpointType = keyof typeof WattBreakpoint;\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 { BreakpointObserver } from '@angular/cdk/layout';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nimport { WattBreakpoint, WattBreakpointType } from './breakpoints';\n\nexport interface WattBreakpointState {\n /** Whether the breakpoint is currently matching. */\n matches: boolean;\n /**\n * A key boolean pair for each query provided to the observe method,\n * with its current matched state.\n */\n breakpoints: {\n [key: string]: boolean;\n };\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WattBreakpointsObserver {\n constructor(private breakpointObserver: BreakpointObserver) {}\n\n observe(breakpoints: WattBreakpointType | WattBreakpointType[]): Observable<WattBreakpointState> {\n if (Array.isArray(breakpoints)) {\n return this.breakpointObserver.observe(breakpoints.map((bp) => WattBreakpoint[bp]));\n }\n return this.breakpointObserver.observe(WattBreakpoint[breakpoints]);\n }\n\n isMatched(breakpoint: WattBreakpointType): boolean {\n return this.breakpointObserver.isMatched(WattBreakpoint[breakpoint]);\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 { WattBreakpointsObserver, WattBreakpointState } from './breakpoints-observer';\nexport { WattBreakpoint } from './breakpoints';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACA;;;;AAIG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,MAAM,EAAE,uBAAgC;AACxC,IAAA,KAAK,EAAE,8CAAuD;AAC9D,IAAA,MAAM,EAAE,+CAAwD;AAChE,IAAA,KAAK,EAAE,gDAAyD;AAChE,IAAA,MAAM,EAAE,qBAA8B;;;AC5BxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAoBa,uBAAuB,CAAA;AACd,IAAA,kBAAA;AAApB,IAAA,WAAA,CAAoB,kBAAsC,EAAA;QAAtC,IAAA,CAAA,kBAAkB,GAAlB,kBAAkB;;AAEtC,IAAA,OAAO,CAAC,WAAsD,EAAA;AAC5D,QAAA,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;YAC9B,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC;;QAErF,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;;AAGrE,IAAA,SAAS,CAAC,UAA8B,EAAA;QACtC,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;;uGAX3D,uBAAuB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,kBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAvB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,cADV,MAAM,EAAA,CAAA;;2FACnB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACpClC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-core-color.mjs","sources":["../../../libs/watt/package/core/color/colors.ts","../../../libs/watt/package/core/color/color-helper.service.ts","../../../libs/watt/package/core/color/index.ts","../../../libs/watt/package/core/color/energinet-watt-core-color.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\nexport const WattColor = {\n // Primary\n primary: '--watt-color-primary' as const,\n primaryLight: '--watt-color-primary-light' as const,\n primaryDark: '--watt-color-primary-dark' as const,\n primaryDarker: '--watt-color-primary-darker' as const,\n primaryUltralight: '--watt-color-primary-ultralight' as const,\n // Secondary\n secondary: '--watt-color-secondary' as const,\n secondaryLight: '--watt-color-secondary-light' as const,\n secondaryDark: '--watt-color-secondary-dark' as const,\n secondaryUltralight: '--watt-color-secondary-ultralight' as const,\n // Data Visualization\n data1: '--watt-color-data-1' as const,\n data2: '--watt-color-data-2' as const,\n data3: '--watt-color-data-3' as const,\n // Neutrals\n black: '--watt-color-neutral-black' as const,\n white: '--watt-color-neutral-white' as const,\n grey50: '--watt-color-neutral-grey-50' as const,\n grey100: '--watt-color-neutral-grey-100' as const,\n grey200: '--watt-color-neutral-grey-200' as const,\n grey300: '--watt-color-neutral-grey-300' as const,\n grey400: '--watt-color-neutral-grey-400' as const,\n grey500: '--watt-color-neutral-grey-500' as const,\n grey600: '--watt-color-neutral-grey-600' as const,\n grey700: '--watt-color-neutral-grey-700' as const,\n grey800: '--watt-color-neutral-grey-800' as const,\n grey900: '--watt-color-neutral-grey-900' as const,\n // States\n danger: '--watt-color-state-danger' as const,\n dangerLight: '--watt-color-state-danger-light' as const,\n warning: '--watt-color-state-warning' as const,\n warningLight: '--watt-color-state-warning-light' as const,\n success: '--watt-color-state-success' as const,\n successLight: '--watt-color-state-success-light' as const,\n info: '--watt-color-state-info' as const,\n infoLight: '--watt-color-state-info-light' as const,\n};\n\nexport type WattColorType = keyof typeof WattColor;\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\nimport { WattCssCustomPropertiesService } from '@energinet/watt/utils/css';\nimport { WattColor, WattColorType } from './colors';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattColorHelperService {\n private colorContrastSuffix = 'contrast';\n\n constructor(private cssCustomPropertiesService: WattCssCustomPropertiesService) {}\n\n public getColor(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);\n }\n\n public getColorContrast(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(\n `${WattColor[color]}-${this.colorContrastSuffix}`\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 { WattColor } from './colors';\nexport { WattColorHelperService } from './color-helper.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;
|
|
1
|
+
{"version":3,"file":"energinet-watt-core-color.mjs","sources":["../../../libs/watt/package/core/color/colors.ts","../../../libs/watt/package/core/color/color-helper.service.ts","../../../libs/watt/package/core/color/index.ts","../../../libs/watt/package/core/color/energinet-watt-core-color.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\nexport const WattColor = {\n // Primary\n primary: '--watt-color-primary' as const,\n primaryLight: '--watt-color-primary-light' as const,\n primaryDark: '--watt-color-primary-dark' as const,\n primaryDarker: '--watt-color-primary-darker' as const,\n primaryUltralight: '--watt-color-primary-ultralight' as const,\n // Secondary\n secondary: '--watt-color-secondary' as const,\n secondaryLight: '--watt-color-secondary-light' as const,\n secondaryDark: '--watt-color-secondary-dark' as const,\n secondaryUltralight: '--watt-color-secondary-ultralight' as const,\n // Data Visualization\n data1: '--watt-color-data-1' as const,\n data2: '--watt-color-data-2' as const,\n data3: '--watt-color-data-3' as const,\n // Neutrals\n black: '--watt-color-neutral-black' as const,\n white: '--watt-color-neutral-white' as const,\n grey50: '--watt-color-neutral-grey-50' as const,\n grey100: '--watt-color-neutral-grey-100' as const,\n grey200: '--watt-color-neutral-grey-200' as const,\n grey300: '--watt-color-neutral-grey-300' as const,\n grey400: '--watt-color-neutral-grey-400' as const,\n grey500: '--watt-color-neutral-grey-500' as const,\n grey600: '--watt-color-neutral-grey-600' as const,\n grey700: '--watt-color-neutral-grey-700' as const,\n grey800: '--watt-color-neutral-grey-800' as const,\n grey900: '--watt-color-neutral-grey-900' as const,\n // States\n danger: '--watt-color-state-danger' as const,\n dangerLight: '--watt-color-state-danger-light' as const,\n warning: '--watt-color-state-warning' as const,\n warningLight: '--watt-color-state-warning-light' as const,\n success: '--watt-color-state-success' as const,\n successLight: '--watt-color-state-success-light' as const,\n info: '--watt-color-state-info' as const,\n infoLight: '--watt-color-state-info-light' as const,\n};\n\nexport type WattColorType = keyof typeof WattColor;\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\n\nimport { WattCssCustomPropertiesService } from '@energinet/watt/utils/css';\nimport { WattColor, WattColorType } from './colors';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattColorHelperService {\n private colorContrastSuffix = 'contrast';\n\n constructor(private cssCustomPropertiesService: WattCssCustomPropertiesService) {}\n\n public getColor(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(WattColor[color]);\n }\n\n public getColorContrast(color: WattColorType): string {\n return this.cssCustomPropertiesService.getPropertyValue(\n `${WattColor[color]}-${this.colorContrastSuffix}`\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 { WattColor } from './colors';\nexport { WattColorHelperService } from './color-helper.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,SAAS,GAAG;;AAEvB,IAAA,OAAO,EAAE,sBAA+B;AACxC,IAAA,YAAY,EAAE,4BAAqC;AACnD,IAAA,WAAW,EAAE,2BAAoC;AACjD,IAAA,aAAa,EAAE,6BAAsC;AACrD,I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C,CAAC;;AAGpE,IAAA,gBAAgB,CAAC,KAAoB,EAAA;AAC1C,QAAA,OAAO,IAAI,CAAC,0BAA0B,CAAC,gBAAgB,CACrD,CAAA,EAAG,SAAS,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,IAAI,CAAC,mBAAmB,CAAA,CAAE,CAClD;;uGAZQ,sBAAsB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAtB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,cAFrB,MAAM,EAAA,CAAA;;2FAEP,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAHlC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACzBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-core-date.mjs","sources":["../../../libs/watt/package/core/date/dayjs.ts","../../../libs/watt/package/core/date/watt-date-adapter.ts","../../../libs/watt/package/core/date/watt-danish-datetime.providers.ts","../../../libs/watt/package/core/date/watt-format-date.ts","../../../libs/watt/package/core/date/watt-date.pipe.ts","../../../libs/watt/package/core/date/watt-locale.service.ts","../../../libs/watt/package/core/date/index.ts","../../../libs/watt/package/core/date/energinet-watt-core-date.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 dayjs from 'dayjs'; // eslint-disable-line no-restricted-imports\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport 'dayjs/plugin/customParseFormat';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\n// Required for the packaging process to register these modules as \"side effectful\"\nimport 'dayjs/plugin/utc';\nimport 'dayjs/plugin/timezone';\nimport 'dayjs/plugin/duration';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(duration);\ndayjs.extend(customParseFormat);\n\nexport { dayjs };\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 { NativeDateAdapter } from '@angular/material/core';\n\nexport type WattSupportedLocales = 'da' | 'en';\nconst danishLocale = 'da';\n\nexport class WattDateAdapter extends NativeDateAdapter {\n setActiveLocale(language: WattSupportedLocales): void {\n this.setLocale(language === danishLocale ? danishLocale : 'en-GB');\n }\n\n /**\n * This is necessary to remove the dots from the date (ordinals) for danish locale in the calendar view.\n * due to `Intl.DateTimeFormat`\n */\n override getDateNames(): string[] {\n const dateNames = super.getDateNames();\n\n return this.locale === danishLocale\n ? dateNames.map((dateName) => dateName.replace(/\\./g, ''))\n : dateNames;\n }\n\n /**\n * Our week starts on Monday\n * @returns 0 for Sunday, 1 for Monday, etc.\n */\n override getFirstDayOfWeek(): number {\n return 1;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_NATIVE_DATE_FORMATS,\n} from '@angular/material/core';\nimport { makeEnvironmentProviders } from '@angular/core';\n\nimport { WattDateAdapter } from './watt-date-adapter';\n\nexport const danishDatetimeProviders = makeEnvironmentProviders([\n { provide: MAT_DATE_LOCALE, useValue: 'da' },\n {\n provide: DateAdapter,\n useClass: WattDateAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n { provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS },\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 { dayjs } from './dayjs';\nimport { WattRange } from './watt-date-range';\n\nexport const formatStrings = {\n monthYear: 'MMMM YYYY',\n short: 'DD-MM-YYYY',\n shortAbbr: 'DD. MMM YYYY',\n long: 'DD-MM-YYYY HH:mm',\n longAbbr: 'DD. MMM YYYY HH:mm',\n time: 'HH:mm',\n longAbbrWithSeconds: 'DD-MMM YYYY HH:mm:ss',\n};\n\nexport function wattFormatDate(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n): string | null {\n if (!input) return null;\n\n if (input instanceof Date || typeof input === 'string') {\n return dayjs(input).tz(timeZone).format(formatStrings[format]);\n } else if (typeof input === 'number') {\n return dayjs(new Date(input)).tz(timeZone).format(formatStrings[format]);\n } else {\n return transformRange(input, format);\n }\n}\n\nfunction transformRange(\n input: WattRange<Date | string>,\n format: keyof typeof formatStrings\n): string | null {\n if (dayjs(input.start).isSame(dayjs(input.end), 'day') || input.end === null) {\n return wattFormatDate(input.start, format);\n } else {\n return `${wattFormatDate(input.start, format)} ― ${wattFormatDate(input.end, format)}`;\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 { Pipe, PipeTransform } from '@angular/core';\n\nimport { WattRange } from './watt-date-range';\nimport { formatStrings, wattFormatDate } from './watt-format-date';\n\n@Pipe({\n name: 'wattDate',\n})\nexport class WattDatePipe implements PipeTransform {\n /**\n * @param input WattDateRange or string in ISO 8601 format or unix timestamp number\n */\n transform(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n ): string | null {\n return wattFormatDate(input, format, timeZone);\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 { computed, inject, Injectable, LOCALE_ID, signal } from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nimport { dayjs } from './dayjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattLocaleService {\n locale = signal(inject<WattSupportedLocales>(LOCALE_ID));\n isDanish = computed(() => this.locale() == 'da');\n isEnglish = computed(() => this.locale() == 'en');\n\n constructor(private dateAdapter: DateAdapter<unknown>) {}\n\n async setActiveLocale(locale: WattSupportedLocales): Promise<void> {\n if (locale === 'da') {\n await import('dayjs/locale/da');\n }\n\n if (locale === 'en') {\n await import('dayjs/locale/en');\n }\n\n dayjs.locale(locale);\n (this.dateAdapter as WattDateAdapter).setActiveLocale(locale);\n this.locale.set(locale);\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 { dayjs } from './dayjs';\nexport { danishDatetimeProviders } from './watt-danish-datetime.providers';\nexport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nexport { type WattRange, type WattDateRange } from './watt-date-range';\nexport { WattDatePipe } from './watt-date.pipe';\nexport { wattFormatDate } from './watt-format-date';\nexport { WattLocaleService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,CAAC,WAA+B,CAAC,eAAe,CAAC,MAAM,CAAC;AAC7D,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;;uGAlBd,iBAAiB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAjB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,cAFhB,MAAM,EAAA,CAAA;;2FAEP,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAH7B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AC1BD;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-core-date.mjs","sources":["../../../libs/watt/package/core/date/dayjs.ts","../../../libs/watt/package/core/date/watt-date-adapter.ts","../../../libs/watt/package/core/date/watt-danish-datetime.providers.ts","../../../libs/watt/package/core/date/watt-format-date.ts","../../../libs/watt/package/core/date/watt-date.pipe.ts","../../../libs/watt/package/core/date/watt-locale.service.ts","../../../libs/watt/package/core/date/index.ts","../../../libs/watt/package/core/date/energinet-watt-core-date.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 dayjs from 'dayjs'; // eslint-disable-line no-restricted-imports\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport 'dayjs/plugin/customParseFormat';\nimport customParseFormat from 'dayjs/plugin/customParseFormat';\n\n// Required for the packaging process to register these modules as \"side effectful\"\nimport 'dayjs/plugin/utc';\nimport 'dayjs/plugin/timezone';\nimport 'dayjs/plugin/duration';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(duration);\ndayjs.extend(customParseFormat);\n\nexport { dayjs };\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 { NativeDateAdapter } from '@angular/material/core';\n\nexport type WattSupportedLocales = 'da' | 'en';\nconst danishLocale = 'da';\n\nexport class WattDateAdapter extends NativeDateAdapter {\n setActiveLocale(language: WattSupportedLocales): void {\n this.setLocale(language === danishLocale ? danishLocale : 'en-GB');\n }\n\n /**\n * This is necessary to remove the dots from the date (ordinals) for danish locale in the calendar view.\n * due to `Intl.DateTimeFormat`\n */\n override getDateNames(): string[] {\n const dateNames = super.getDateNames();\n\n return this.locale === danishLocale\n ? dateNames.map((dateName) => dateName.replace(/\\./g, ''))\n : dateNames;\n }\n\n /**\n * Our week starts on Monday\n * @returns 0 for Sunday, 1 for Monday, etc.\n */\n override getFirstDayOfWeek(): number {\n return 1;\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n DateAdapter,\n MAT_DATE_FORMATS,\n MAT_DATE_LOCALE,\n MAT_NATIVE_DATE_FORMATS,\n} from '@angular/material/core';\nimport { makeEnvironmentProviders } from '@angular/core';\n\nimport { WattDateAdapter } from './watt-date-adapter';\n\nexport const danishDatetimeProviders = makeEnvironmentProviders([\n { provide: MAT_DATE_LOCALE, useValue: 'da' },\n {\n provide: DateAdapter,\n useClass: WattDateAdapter,\n deps: [MAT_DATE_LOCALE],\n },\n { provide: MAT_DATE_FORMATS, useValue: MAT_NATIVE_DATE_FORMATS },\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 { dayjs } from './dayjs';\nimport { WattRange } from './watt-date-range';\n\nexport const formatStrings = {\n monthYear: 'MMMM YYYY',\n short: 'DD-MM-YYYY',\n shortAbbr: 'DD. MMM YYYY',\n long: 'DD-MM-YYYY HH:mm',\n longAbbr: 'DD. MMM YYYY HH:mm',\n time: 'HH:mm',\n longAbbrWithSeconds: 'DD-MMM YYYY HH:mm:ss',\n};\n\nexport function wattFormatDate(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n): string | null {\n if (!input) return null;\n\n if (input instanceof Date || typeof input === 'string') {\n return dayjs(input).tz(timeZone).format(formatStrings[format]);\n } else if (typeof input === 'number') {\n return dayjs(new Date(input)).tz(timeZone).format(formatStrings[format]);\n } else {\n return transformRange(input, format);\n }\n}\n\nfunction transformRange(\n input: WattRange<Date | string>,\n format: keyof typeof formatStrings\n): string | null {\n if (dayjs(input.start).isSame(dayjs(input.end), 'day') || input.end === null) {\n return wattFormatDate(input.start, format);\n } else {\n return `${wattFormatDate(input.start, format)} ― ${wattFormatDate(input.end, format)}`;\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 { Pipe, PipeTransform } from '@angular/core';\n\nimport { WattRange } from './watt-date-range';\nimport { formatStrings, wattFormatDate } from './watt-format-date';\n\n@Pipe({\n name: 'wattDate',\n})\nexport class WattDatePipe implements PipeTransform {\n /**\n * @param input WattDateRange or string in ISO 8601 format or unix timestamp number\n */\n transform(\n input?: WattRange<Date> | WattRange<string> | Date | string | number | null,\n format: keyof typeof formatStrings = 'short',\n timeZone = 'Europe/Copenhagen'\n ): string | null {\n return wattFormatDate(input, format, timeZone);\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 { computed, inject, Injectable, LOCALE_ID, signal } from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\n\nimport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nimport { dayjs } from './dayjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WattLocaleService {\n locale = signal(inject<WattSupportedLocales>(LOCALE_ID));\n isDanish = computed(() => this.locale() == 'da');\n isEnglish = computed(() => this.locale() == 'en');\n\n constructor(private dateAdapter: DateAdapter<unknown>) {}\n\n async setActiveLocale(locale: WattSupportedLocales): Promise<void> {\n if (locale === 'da') {\n await import('dayjs/locale/da');\n }\n\n if (locale === 'en') {\n await import('dayjs/locale/en');\n }\n\n dayjs.locale(locale);\n (this.dateAdapter as WattDateAdapter).setActiveLocale(locale);\n this.locale.set(locale);\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 { dayjs } from './dayjs';\nexport { danishDatetimeProviders } from './watt-danish-datetime.providers';\nexport { WattDateAdapter, WattSupportedLocales } from './watt-date-adapter';\nexport { type WattRange, type WattDateRange } from './watt-date-range';\nexport { WattDatePipe } from './watt-date.pipe';\nexport { wattFormatDate } from './watt-format-date';\nexport { WattLocaleService } from './watt-locale.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;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