@energinet/watt 4.3.3 → 4.3.5

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/data/index.d.ts CHANGED
@@ -55,7 +55,7 @@ declare class WattDataTableComponent {
55
55
  reset: () => void | undefined;
56
56
  onSearch(value: string): void;
57
57
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WattDataTableComponent, never>;
58
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattDataTableComponent, "watt-data-table", never, { "error": { "alias": "error"; "required": false; "isSignal": true; }; "ready": { "alias": "ready"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "trimSearch": { "alias": "trimSearch"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "enableRetry": { "alias": "enableRetry"; "required": false; "isSignal": true; }; "enableCount": { "alias": "enableCount"; "required": false; "isSignal": true; }; "enableEmptyState": { "alias": "enableEmptyState"; "required": false; "isSignal": true; }; "queryTime": { "alias": "queryTime"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "enablePaginator": { "alias": "enablePaginator"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "autoSize": { "alias": "autoSize"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "emptyStateIcon": { "alias": "emptyStateIcon"; "required": false; "isSignal": true; }; }, { "clear": "clear"; "pageChanged": "pageChanged"; "retry": "retry"; }, ["table"], ["h3", "h4", "*", "watt-data-actions", "watt-button", "watt-data-filters", "watt-table"], true, never>;
58
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattDataTableComponent, "watt-data-table", never, { "error": { "alias": "error"; "required": false; "isSignal": true; }; "ready": { "alias": "ready"; "required": false; "isSignal": true; }; "enableSearch": { "alias": "enableSearch"; "required": false; "isSignal": true; }; "trimSearch": { "alias": "trimSearch"; "required": false; "isSignal": true; }; "header": { "alias": "header"; "required": false; "isSignal": true; }; "enableRetry": { "alias": "enableRetry"; "required": false; "isSignal": true; }; "enableCount": { "alias": "enableCount"; "required": false; "isSignal": true; }; "enableEmptyState": { "alias": "enableEmptyState"; "required": false; "isSignal": true; }; "queryTime": { "alias": "queryTime"; "required": false; "isSignal": true; }; "searchLabel": { "alias": "searchLabel"; "required": false; "isSignal": true; }; "enablePaginator": { "alias": "enablePaginator"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "autoSize": { "alias": "autoSize"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "emptyStateIcon": { "alias": "emptyStateIcon"; "required": false; "isSignal": true; }; }, { "clear": "clear"; "pageChanged": "pageChanged"; "retry": "retry"; }, ["table"], ["h3", "h4", "*", "watt-button", "watt-data-actions", "watt-data-filters", "watt-table"], true, never>;
59
59
  }
60
60
 
61
61
  export { WattDataActionsComponent, WattDataFiltersComponent, WattDataIntlService, WattDataTableComponent };
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, Injectable, inject, input, output, contentChild, viewChild, ViewEncapsulation } from '@angular/core';
3
3
  import { Subject } from 'rxjs';
4
- import { VaterFlexComponent, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective } from '@energinet/watt/vater';
4
+ import { VaterFlexComponent, VaterStackComponent, VaterUtilityDirective } from '@energinet/watt/vater';
5
5
  import { WattCardComponent } from '@energinet/watt/card';
6
6
  import { WattButtonComponent } from '@energinet/watt/button';
7
7
  import { WattEmptyStateComponent } from '@energinet/watt/empty-state';
8
8
  import { WattPaginatorComponent } from '@energinet/watt/paginator';
9
- import { WattSearchComponent } from '@energinet/watt/search';
9
+ import { WattSearchComponent, WattSimpleSearchComponent } from '@energinet/watt/search';
10
10
  import { WattTableComponent } from '@energinet/watt/table';
11
11
 
12
12
  //#region License
@@ -29,14 +29,11 @@ import { WattTableComponent } from '@energinet/watt/table';
29
29
  //#endregion
30
30
  class WattDataFiltersComponent {
31
31
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataFiltersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
32
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WattDataFiltersComponent, isStandalone: true, selector: "watt-data-filters", ngImport: i0, template: `<ng-content />`, isInline: true });
32
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: WattDataFiltersComponent, isStandalone: true, selector: "watt-data-filters", ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{width:100%}\n"] });
33
33
  }
34
34
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataFiltersComponent, decorators: [{
35
35
  type: Component,
36
- args: [{
37
- selector: 'watt-data-filters',
38
- template: `<ng-content />`,
39
- }]
36
+ args: [{ selector: 'watt-data-filters', template: `<ng-content />`, styles: [":host{width:100%}\n"] }]
40
37
  }] });
41
38
 
42
39
  //#region License
@@ -157,32 +154,46 @@ class WattDataTableComponent {
157
154
  <watt-card vater fill="vertical" [variant]="variant()">
158
155
  <vater-flex autoSize fill="vertical" gap="m">
159
156
  @if (header()) {
160
- <vater-stack direction="row" gap="m">
161
- <vater-stack direction="row" gap="s">
162
- <ng-content select="h3" />
163
- <ng-content select="h4" />
164
- @if (enableCount()) {
165
- <span class="watt-chip-label">
166
- {{ count() ?? table().dataSource().totalCount }}
167
- </span>
168
- }
169
- @if (queryTime()) {
170
- <span class="watt-label">in {{ queryTime() }} ms</span>
171
- }
157
+ <vater-stack direction="column" fill="horizontal" align="start">
158
+ <!-- Header, count, queryTime and custom area -->
159
+ <vater-stack
160
+ direction="row"
161
+ gap="m"
162
+ justify="space-between"
163
+ fill="horizontal"
164
+ align="start"
165
+ wrap
166
+ >
167
+ <vater-stack align="start">
168
+ <vater-stack direction="row" gap="m">
169
+ <ng-content select="h3" />
170
+ <ng-content select="h4" />
171
+ @if (enableCount()) {
172
+ <span class="watt-chip-label">
173
+ {{ count() ?? table().dataSource().totalCount }}
174
+ </span>
175
+ }
176
+ @if (queryTime()) {
177
+ <span class="watt-label">in {{ queryTime() }} ms</span>
178
+ }
179
+ <ng-content />
180
+ <ng-content select="watt-button" />
181
+ </vater-stack>
182
+ <!-- Searchbar -->
183
+ @if (enableSearch()) {
184
+ <watt-simple-search
185
+ [label]="searchLabel() ?? intl.search"
186
+ [trim]="trimSearch()"
187
+ (search)="onSearch($event)"
188
+ class="watt-space-stack-m"
189
+ />
190
+ }
191
+ </vater-stack>
192
+ <ng-content select="watt-data-actions" />
172
193
  </vater-stack>
173
- <ng-content />
174
- <vater-spacer />
175
- @if (enableSearch()) {
176
- <watt-search
177
- [label]="searchLabel() ?? intl.search"
178
- [trim]="trimSearch()"
179
- (search)="onSearch($event)"
180
- />
181
- }
182
- <ng-content select="watt-data-actions" />
183
- <ng-content select="watt-button" />
184
194
  </vater-stack>
185
195
  }
196
+ <!-- Filters -->
186
197
  <ng-content select="watt-data-filters" />
187
198
  <vater-flex [autoSize]="autoSize()" fill="vertical">
188
199
  <ng-content select="watt-table" />
@@ -201,9 +212,9 @@ class WattDataTableComponent {
201
212
  [message]="error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText"
202
213
  >
203
214
  @if (enableRetry()) {
204
- <watt-button variant="secondary" (click)="retry.emit()">{{
205
- intl.emptyRetry
206
- }}</watt-button>
215
+ <watt-button variant="secondary" (click)="retry.emit()"
216
+ >{{ intl.emptyRetry }}
217
+ </watt-button>
207
218
  }
208
219
  </watt-empty-state>
209
220
  </vater-stack>
@@ -220,50 +231,63 @@ class WattDataTableComponent {
220
231
  }
221
232
  </vater-flex>
222
233
  </watt-card>
223
- `, isInline: true, styles: ["watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m))}watt-data-table watt-empty-state{margin:var(--watt-space-xl) 0}\n"], dependencies: [{ kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }, { kind: "component", type: VaterSpacerComponent, selector: "vater-spacer, [vater-spacer]" }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["center", "fill", "inset", "scrollable"] }, { kind: "component", type: WattCardComponent, selector: "watt-card", inputs: ["variant", "loading"] }, { kind: "component", type: WattEmptyStateComponent, selector: "watt-empty-state", inputs: ["icon", "size", "title", "message", "useHTML"] }, { kind: "component", type: WattPaginatorComponent, selector: "watt-paginator", inputs: ["length", "pageSizeOptions", "pageSize", "pageIndex", "for"], outputs: ["changed"] }, { kind: "component", type: WattSearchComponent, selector: "watt-search", inputs: ["label", "debounceTime", "trim", "size"], outputs: ["search"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }], encapsulation: i0.ViewEncapsulation.None });
234
+ `, isInline: true, styles: ["watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m))}watt-data-table watt-empty-state{margin:var(--watt-space-xl) 0}watt-simple-search{width:400px}\n"], dependencies: [{ kind: "component", type: VaterFlexComponent, selector: "vater-flex, [vater-flex]", inputs: ["autoSize"] }, { kind: "component", type: VaterStackComponent, selector: "vater-stack, [vater-stack]" }, { kind: "directive", type: VaterUtilityDirective, selector: "[vater]", inputs: ["center", "fill", "inset", "scrollable"] }, { kind: "component", type: WattCardComponent, selector: "watt-card", inputs: ["variant", "loading"] }, { kind: "component", type: WattEmptyStateComponent, selector: "watt-empty-state", inputs: ["icon", "size", "title", "message", "useHTML"] }, { kind: "component", type: WattPaginatorComponent, selector: "watt-paginator", inputs: ["length", "pageSizeOptions", "pageSize", "pageIndex", "for"], outputs: ["changed"] }, { kind: "component", type: WattButtonComponent, selector: "watt-button", inputs: ["icon", "variant", "size", "type", "formId", "disabled", "loading"] }, { kind: "component", type: WattSimpleSearchComponent, selector: "watt-simple-search", inputs: ["label", "debounceTime", "trim", "size"], outputs: ["search"] }], encapsulation: i0.ViewEncapsulation.None });
224
235
  }
225
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattDataTableComponent, decorators: [{
226
237
  type: Component,
227
238
  args: [{ selector: 'watt-data-table', imports: [
228
239
  VaterFlexComponent,
229
- VaterSpacerComponent,
230
240
  VaterStackComponent,
231
241
  VaterUtilityDirective,
232
242
  WattCardComponent,
233
243
  WattEmptyStateComponent,
234
244
  WattPaginatorComponent,
235
- WattSearchComponent,
236
245
  WattButtonComponent,
246
+ WattSimpleSearchComponent,
237
247
  ], encapsulation: ViewEncapsulation.None, template: `
238
248
  <watt-card vater fill="vertical" [variant]="variant()">
239
249
  <vater-flex autoSize fill="vertical" gap="m">
240
250
  @if (header()) {
241
- <vater-stack direction="row" gap="m">
242
- <vater-stack direction="row" gap="s">
243
- <ng-content select="h3" />
244
- <ng-content select="h4" />
245
- @if (enableCount()) {
246
- <span class="watt-chip-label">
247
- {{ count() ?? table().dataSource().totalCount }}
248
- </span>
249
- }
250
- @if (queryTime()) {
251
- <span class="watt-label">in {{ queryTime() }} ms</span>
252
- }
251
+ <vater-stack direction="column" fill="horizontal" align="start">
252
+ <!-- Header, count, queryTime and custom area -->
253
+ <vater-stack
254
+ direction="row"
255
+ gap="m"
256
+ justify="space-between"
257
+ fill="horizontal"
258
+ align="start"
259
+ wrap
260
+ >
261
+ <vater-stack align="start">
262
+ <vater-stack direction="row" gap="m">
263
+ <ng-content select="h3" />
264
+ <ng-content select="h4" />
265
+ @if (enableCount()) {
266
+ <span class="watt-chip-label">
267
+ {{ count() ?? table().dataSource().totalCount }}
268
+ </span>
269
+ }
270
+ @if (queryTime()) {
271
+ <span class="watt-label">in {{ queryTime() }} ms</span>
272
+ }
273
+ <ng-content />
274
+ <ng-content select="watt-button" />
275
+ </vater-stack>
276
+ <!-- Searchbar -->
277
+ @if (enableSearch()) {
278
+ <watt-simple-search
279
+ [label]="searchLabel() ?? intl.search"
280
+ [trim]="trimSearch()"
281
+ (search)="onSearch($event)"
282
+ class="watt-space-stack-m"
283
+ />
284
+ }
285
+ </vater-stack>
286
+ <ng-content select="watt-data-actions" />
253
287
  </vater-stack>
254
- <ng-content />
255
- <vater-spacer />
256
- @if (enableSearch()) {
257
- <watt-search
258
- [label]="searchLabel() ?? intl.search"
259
- [trim]="trimSearch()"
260
- (search)="onSearch($event)"
261
- />
262
- }
263
- <ng-content select="watt-data-actions" />
264
- <ng-content select="watt-button" />
265
288
  </vater-stack>
266
289
  }
290
+ <!-- Filters -->
267
291
  <ng-content select="watt-data-filters" />
268
292
  <vater-flex [autoSize]="autoSize()" fill="vertical">
269
293
  <ng-content select="watt-table" />
@@ -282,9 +306,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
282
306
  [message]="error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText"
283
307
  >
284
308
  @if (enableRetry()) {
285
- <watt-button variant="secondary" (click)="retry.emit()">{{
286
- intl.emptyRetry
287
- }}</watt-button>
309
+ <watt-button variant="secondary" (click)="retry.emit()"
310
+ >{{ intl.emptyRetry }}
311
+ </watt-button>
288
312
  }
289
313
  </watt-empty-state>
290
314
  </vater-stack>
@@ -301,7 +325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
301
325
  }
302
326
  </vater-flex>
303
327
  </watt-card>
304
- `, styles: ["watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m))}watt-data-table watt-empty-state{margin:var(--watt-space-xl) 0}\n"] }]
328
+ `, styles: ["watt-data-table h3,watt-data-table h4{line-height:44px;min-height:44px;margin:0}watt-data-table watt-paginator{display:block;margin:calc(-1 * var(--watt-space-m))}watt-data-table watt-empty-state{margin:var(--watt-space-xl) 0}watt-simple-search{width:400px}\n"] }]
305
329
  }], propDecorators: { error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], ready: [{ type: i0.Input, args: [{ isSignal: true, alias: "ready", required: false }] }], enableSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableSearch", required: false }] }], trimSearch: [{ type: i0.Input, args: [{ isSignal: true, alias: "trimSearch", required: false }] }], header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], enableRetry: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableRetry", required: false }] }], enableCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCount", required: false }] }], enableEmptyState: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableEmptyState", required: false }] }], queryTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryTime", required: false }] }], searchLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchLabel", required: false }] }], enablePaginator: [{ type: i0.Input, args: [{ isSignal: true, alias: "enablePaginator", required: false }] }], pageSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageSize", required: false }] }], count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], autoSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSize", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], emptyStateIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyStateIcon", required: false }] }], clear: [{ type: i0.Output, args: ["clear"] }], pageChanged: [{ type: i0.Output, args: ["pageChanged"] }], retry: [{ type: i0.Output, args: ["retry"] }], table: [{ type: i0.ContentChild, args: [i0.forwardRef(() => WattTableComponent), { ...{ descendants: true }, isSignal: true }] }], search: [{ type: i0.ViewChild, args: [i0.forwardRef(() => WattSearchComponent), { isSignal: true }] }] } });
306
330
 
307
331
  //#region License
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterSpacerComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattSearchComponent,\n WattButtonComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m));\n }\n\n watt-data-table watt-empty-state {\n margin: var(--watt-space-xl) 0;\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex autoSize fill=\"vertical\" gap=\"m\">\n @if (header()) {\n <vater-stack direction=\"row\" gap=\"m\">\n <vater-stack direction=\"row\" gap=\"s\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">\n {{ count() ?? table().dataSource().totalCount }}\n </span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n </vater-stack>\n <ng-content />\n <vater-spacer />\n @if (enableSearch()) {\n <watt-search\n [label]=\"searchLabel() ?? intl.search\"\n [trim]=\"trimSearch()\"\n (search)=\"onSearch($event)\"\n />\n }\n <ng-content select=\"watt-data-actions\" />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n }\n <ng-content select=\"watt-data-filters\" />\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() &&\n !table().loading() &&\n table().dataSource().filteredData.length === 0\n ) {\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <vater-stack scrollable justify=\"center\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"\n error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\n \"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\">{{\n intl.emptyRetry\n }}</watt-button>\n }\n </watt-empty-state>\n </vater-stack>\n </vater-flex>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource()\"\n [length]=\"count() ?? 0\"\n [pageSize]=\"pageSize()\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n trimSearch = input(true);\n header = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n pageSize = input<number>(50);\n count = input<number>();\n autoSize = input(false);\n variant = input<WATT_CARD_VARIANT>('solid');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource().filter = value;\n if (!value) this.clear.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,EAAE,CAAA,cAAA,CAAgB;AAC3B,iBAAA;;;ACvBD;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAA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,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,kBAA2B,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,kFAE7D,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/KxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-data.mjs","sources":["../../../libs/watt/package/data/watt-data-filters.component.ts","../../../libs/watt/package/data/watt-data-actions.component.ts","../../../libs/watt/package/data/watt-data-intl.service.ts","../../../libs/watt/package/data/watt-data-table.component.ts","../../../libs/watt/package/data/index.ts","../../../libs/watt/package/data/energinet-watt-data.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-filters',\n styles: `\n :host {\n width: 100%;\n }\n `,\n template: `<ng-content />`,\n})\nexport class WattDataFiltersComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Component } from '@angular/core';\n\n@Component({\n selector: 'watt-data-actions',\n template: `<ng-content />`,\n})\nexport class WattDataActionsComponent {}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class WattDataIntlService {\n readonly changes: Subject<void> = new Subject<void>();\n search = 'Search';\n emptyTitle = 'No results found';\n emptyText = 'Try changing the search criteria.';\n emptyRetry = 'Retry';\n errorTitle = 'An unexpected error occured';\n errorText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n defaultTitle = 'An unexpected error occured';\n defaultText = 'Unfortunately, an error occurred while retrieving the necessary information.';\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport {\n Component,\n ViewEncapsulation,\n contentChild,\n inject,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { PageEvent } from '@angular/material/paginator';\n\nimport {\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n} from '@energinet/watt/vater';\nimport { WATT_CARD_VARIANT, WattCardComponent } from '@energinet/watt/card';\nimport { WattButtonComponent } from '@energinet/watt/button';\nimport { WattEmptyStateComponent } from '@energinet/watt/empty-state';\nimport { WattPaginatorComponent } from '@energinet/watt/paginator';\nimport { WattSearchComponent, WattSimpleSearchComponent } from '@energinet/watt/search';\nimport { WattTableComponent } from '@energinet/watt/table';\nimport { WattIcon } from '@energinet/watt/icon';\n\nimport { WattDataIntlService } from './watt-data-intl.service';\n\n@Component({\n selector: 'watt-data-table',\n imports: [\n VaterFlexComponent,\n VaterStackComponent,\n VaterUtilityDirective,\n WattCardComponent,\n WattEmptyStateComponent,\n WattPaginatorComponent,\n WattButtonComponent,\n WattSimpleSearchComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n styles: [\n `\n watt-data-table h3,\n watt-data-table h4 {\n line-height: 44px;\n min-height: 44px;\n margin: 0;\n }\n\n watt-data-table watt-paginator {\n display: block;\n margin: calc(-1 * var(--watt-space-m));\n }\n\n watt-data-table watt-empty-state {\n margin: var(--watt-space-xl) 0;\n }\n\n watt-simple-search {\n width: 400px; /* Magix UX number (replace with variable) */\n }\n `,\n ],\n template: `\n <watt-card vater fill=\"vertical\" [variant]=\"variant()\">\n <vater-flex autoSize fill=\"vertical\" gap=\"m\">\n @if (header()) {\n <vater-stack direction=\"column\" fill=\"horizontal\" align=\"start\">\n <!-- Header, count, queryTime and custom area -->\n <vater-stack\n direction=\"row\"\n gap=\"m\"\n justify=\"space-between\"\n fill=\"horizontal\"\n align=\"start\"\n wrap\n >\n <vater-stack align=\"start\">\n <vater-stack direction=\"row\" gap=\"m\">\n <ng-content select=\"h3\" />\n <ng-content select=\"h4\" />\n @if (enableCount()) {\n <span class=\"watt-chip-label\">\n {{ count() ?? table().dataSource().totalCount }}\n </span>\n }\n @if (queryTime()) {\n <span class=\"watt-label\">in {{ queryTime() }} ms</span>\n }\n <ng-content />\n <ng-content select=\"watt-button\" />\n </vater-stack>\n <!-- Searchbar -->\n @if (enableSearch()) {\n <watt-simple-search\n [label]=\"searchLabel() ?? intl.search\"\n [trim]=\"trimSearch()\"\n (search)=\"onSearch($event)\"\n class=\"watt-space-stack-m\"\n />\n }\n </vater-stack>\n <ng-content select=\"watt-data-actions\" />\n </vater-stack>\n </vater-stack>\n }\n <!-- Filters -->\n <ng-content select=\"watt-data-filters\" />\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <ng-content select=\"watt-table\" />\n @if (\n enableEmptyState() &&\n !table().loading() &&\n table().dataSource().filteredData.length === 0\n ) {\n <vater-flex [autoSize]=\"autoSize()\" fill=\"vertical\">\n <vater-stack scrollable justify=\"center\">\n <watt-empty-state\n [icon]=\"error() ? 'custom-power' : ready() ? emptyStateIcon() : 'custom-explore'\"\n [title]=\"\n error() ? intl.errorTitle : ready() ? intl.emptyTitle : intl.defaultTitle\n \"\n [message]=\"error() ? intl.errorText : ready() ? intl.emptyText : intl.defaultText\"\n >\n @if (enableRetry()) {\n <watt-button variant=\"secondary\" (click)=\"retry.emit()\"\n >{{ intl.emptyRetry }}\n </watt-button>\n }\n </watt-empty-state>\n </vater-stack>\n </vater-flex>\n }\n </vater-flex>\n @if (enablePaginator()) {\n <watt-paginator\n [for]=\"table().dataSource()\"\n [length]=\"count() ?? 0\"\n [pageSize]=\"pageSize()\"\n (changed)=\"pageChanged.emit($event)\"\n />\n }\n </vater-flex>\n </watt-card>\n `,\n})\nexport class WattDataTableComponent {\n intl = inject(WattDataIntlService);\n\n error = input<unknown>();\n ready = input(true);\n enableSearch = input(true);\n trimSearch = input(true);\n header = input(true);\n enableRetry = input(false);\n enableCount = input(true);\n enableEmptyState = input(true);\n queryTime = input<number>();\n searchLabel = input<string>();\n enablePaginator = input(true);\n pageSize = input<number>(50);\n count = input<number>();\n autoSize = input(false);\n variant = input<WATT_CARD_VARIANT>('solid');\n emptyStateIcon = input<WattIcon | 'custom-power' | 'custom-explore' | 'custom-no-results'>(\n 'cancel'\n );\n\n clear = output();\n pageChanged = output<PageEvent>();\n retry = output();\n\n table = contentChild.required(WattTableComponent<unknown>, { descendants: true });\n\n search = viewChild(WattSearchComponent);\n reset = () => this.search()?.clear();\n\n onSearch(value: string) {\n this.table().dataSource().filter = value;\n if (!value) this.clear.emit();\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nexport { WattDataFiltersComponent } from './watt-data-filters.component';\nexport { WattDataActionsComponent } from './watt-data-actions.component';\nexport { WattDataIntlService } from './watt-data-intl.service';\nexport { WattDataTableComponent } from './watt-data-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAYa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,YAMnB,CAAA,cAAA,CAAgB,EAAA,MAAA,EAAA,CAAA,qBAAA,CAAA,EAAA;;;AC3B5B;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAOa,wBAAwB,CAAA;wGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,6EAFzB,CAAA,cAAA,CAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA;;4FAEf,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,QAAQ,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CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,SAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,OAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,kBAA2B,QAAE,EAAE,WAAW,EAAE,IAAI,EAAE,kFAE7D,mBAAmB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/LxC;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -75,8 +75,8 @@ const WattIconMap = {
75
75
  feedback: 'feedback',
76
76
  // Files
77
77
  save: 'save_alt',
78
- upload: 'cloud_upload',
79
- download: 'cloud_download',
78
+ upload: 'upload',
79
+ download: 'save_alt',
80
80
  fileDownload: 'download',
81
81
  fileUpload: 'upload',
82
82
  print: 'print',
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-icon.mjs","sources":["../../../libs/watt/package/icon/icons.ts","../../../libs/watt/package/icon/icon.component.ts","../../../libs/watt/package/icon/index.ts","../../../libs/watt/package/icon/energinet-watt-icon.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 WattIconMap = {\n search: 'search',\n filter: 'filter_list',\n plus: 'add',\n minus: 'remove',\n edit: 'edit',\n redo: 'redo',\n undo: 'undo',\n remove: 'delete',\n removeForever: 'delete_forever',\n close: 'close',\n cancel: 'cancel',\n checkmark: 'check',\n user: 'account_circle',\n settings: 'settings',\n contentCopy: 'content_copy',\n date: 'calendar_today',\n time: 'schedule',\n email: 'email',\n markEmailUnread: 'mark_email_unread',\n link: 'link',\n openInNew: 'open_in_new',\n monetization: 'monetization_on',\n payments: 'payments',\n forwardMessage: 'forward_to_inbox',\n forward: 'forward',\n menu: 'menu',\n moreVertical: 'more_vert',\n logout: 'logout',\n login: 'lock_open',\n help: 'help',\n alternateEmail: 'alternate_email',\n refresh: 'refresh',\n language: 'language',\n pendingActions: 'pending_actions',\n toggleOn: 'toggle_on',\n toggleOff: 'toggle_off',\n personCheck: 'person_check',\n send: 'send',\n // Navigation\n left: 'navigate_before',\n right: 'navigate_next',\n up: 'expand_less',\n down: 'expand_more',\n arrowDropDown: 'arrow_drop_down',\n arrowRightAlt: 'arrow_right_alt',\n arrowLeftAlt: 'arrow_left_alt',\n // Alerts\n danger: 'dangerous',\n warning: 'report_problem',\n success: 'check_circle',\n info: 'info',\n feedback: 'feedback',\n // Files\n save: 'save_alt',\n upload: 'cloud_upload',\n download: 'cloud_download',\n fileDownload: 'download',\n fileUpload: 'upload',\n print: 'print',\n preview: 'preview',\n attachFile: 'attach_file',\n // Other\n power: 'power',\n location: 'location_on',\n smartDisplay: 'smart_display',\n windmill: 'energy',\n solarPower: 'solar_power',\n priorityHigh: 'priority_high',\n notifications: 'notifications',\n notificationsUnread: 'notifications_unread',\n horizontalRule: 'horizontal_rule',\n wrongLocation: 'wrong_location',\n heatPump: 'heat_pump',\n inventory: 'inventory',\n globe: 'globe',\n calculate: 'calculate',\n bar_chart_4_bars: 'bar_chart_4_bars',\n view_list: 'view_list',\n view_stream: 'view_stream',\n construction: 'construction',\n factory: 'factory',\n nest_eco_leaf: 'nest_eco_leaf',\n flash_on: 'flash_on',\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 ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { WattIconMap } from './icons';\n\nexport type WattIcon = keyof typeof WattIconMap;\nexport type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\nexport type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classNames()' },\n imports: [MatIcon],\n selector: 'watt-icon',\n styleUrls: ['./icon.component.scss'],\n template: `\n @if (icon()) {\n <mat-icon aria-hidden=\"false\" [attr.aria-label]=\"label()\" fontSet=\"material-symbols-sharp\">\n {{ icon() }}\n </mat-icon>\n } @else {\n <div class=\"watt-custom-icon\">\n <ng-content />\n </div>\n }\n `,\n})\nexport class WattIconComponent {\n /** Name of an icon within the font set. */\n name = input<WattIcon>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\n\n /** Color the icon to match a chosen state. */\n state = input<WattIconState>();\n\n icon = computed(() => {\n const name = this.name();\n if (!name) return null;\n return WattIconMap[name];\n });\n\n computedState = computed(() => {\n const name = this.name();\n const state = this.state();\n if (state) return state;\n switch (name) {\n case 'success':\n case 'danger':\n case 'warning':\n case 'info':\n return name;\n default:\n return 'default';\n }\n });\n\n classNames = computed(() => `icon-size-${this.size()} icon-state-${this.computedState()}`);\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 { WattIconComponent, WattIcon, WattIconSize, WattIconState } from './icon.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,WAAW,GAAG;AACzB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,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BAAiB,EAAA,UAAA,EAAA,CAAA;kBAnB7B,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,cAAc,EAAE,EAAA,OAAA,EAC1B,CAAC,OAAO,CAAC,EAAA,QAAA,EACR,WAAW,EAAA,QAAA,EAEX;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,gpFAAA,CAAA,EAAA;;;ACjDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-icon.mjs","sources":["../../../libs/watt/package/icon/icons.ts","../../../libs/watt/package/icon/icon.component.ts","../../../libs/watt/package/icon/index.ts","../../../libs/watt/package/icon/energinet-watt-icon.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 WattIconMap = {\n search: 'search',\n filter: 'filter_list',\n plus: 'add',\n minus: 'remove',\n edit: 'edit',\n redo: 'redo',\n undo: 'undo',\n remove: 'delete',\n removeForever: 'delete_forever',\n close: 'close',\n cancel: 'cancel',\n checkmark: 'check',\n user: 'account_circle',\n settings: 'settings',\n contentCopy: 'content_copy',\n date: 'calendar_today',\n time: 'schedule',\n email: 'email',\n markEmailUnread: 'mark_email_unread',\n link: 'link',\n openInNew: 'open_in_new',\n monetization: 'monetization_on',\n payments: 'payments',\n forwardMessage: 'forward_to_inbox',\n forward: 'forward',\n menu: 'menu',\n moreVertical: 'more_vert',\n logout: 'logout',\n login: 'lock_open',\n help: 'help',\n alternateEmail: 'alternate_email',\n refresh: 'refresh',\n language: 'language',\n pendingActions: 'pending_actions',\n toggleOn: 'toggle_on',\n toggleOff: 'toggle_off',\n personCheck: 'person_check',\n send: 'send',\n // Navigation\n left: 'navigate_before',\n right: 'navigate_next',\n up: 'expand_less',\n down: 'expand_more',\n arrowDropDown: 'arrow_drop_down',\n arrowRightAlt: 'arrow_right_alt',\n arrowLeftAlt: 'arrow_left_alt',\n // Alerts\n danger: 'dangerous',\n warning: 'report_problem',\n success: 'check_circle',\n info: 'info',\n feedback: 'feedback',\n // Files\n save: 'save_alt',\n upload: 'upload',\n download: 'save_alt',\n fileDownload: 'download',\n fileUpload: 'upload',\n print: 'print',\n preview: 'preview',\n attachFile: 'attach_file',\n // Other\n power: 'power',\n location: 'location_on',\n smartDisplay: 'smart_display',\n windmill: 'energy',\n solarPower: 'solar_power',\n priorityHigh: 'priority_high',\n notifications: 'notifications',\n notificationsUnread: 'notifications_unread',\n horizontalRule: 'horizontal_rule',\n wrongLocation: 'wrong_location',\n heatPump: 'heat_pump',\n inventory: 'inventory',\n globe: 'globe',\n calculate: 'calculate',\n bar_chart_4_bars: 'bar_chart_4_bars',\n view_list: 'view_list',\n view_stream: 'view_stream',\n construction: 'construction',\n factory: 'factory',\n nest_eco_leaf: 'nest_eco_leaf',\n flash_on: 'flash_on',\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 ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n computed,\n input,\n} from '@angular/core';\nimport { MatIcon } from '@angular/material/icon';\nimport { WattIconMap } from './icons';\n\nexport type WattIcon = keyof typeof WattIconMap;\nexport type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';\nexport type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { '[class]': 'classNames()' },\n imports: [MatIcon],\n selector: 'watt-icon',\n styleUrls: ['./icon.component.scss'],\n template: `\n @if (icon()) {\n <mat-icon aria-hidden=\"false\" [attr.aria-label]=\"label()\" fontSet=\"material-symbols-sharp\">\n {{ icon() }}\n </mat-icon>\n } @else {\n <div class=\"watt-custom-icon\">\n <ng-content />\n </div>\n }\n `,\n})\nexport class WattIconComponent {\n /** Name of an icon within the font set. */\n name = input<WattIcon>();\n\n /** Accessible label for the icon. */\n label = input<string>();\n\n /** Size of the icon. */\n size = input<WattIconSize>('m');\n\n /** Color the icon to match a chosen state. */\n state = input<WattIconState>();\n\n icon = computed(() => {\n const name = this.name();\n if (!name) return null;\n return WattIconMap[name];\n });\n\n computedState = computed(() => {\n const name = this.name();\n const state = this.state();\n if (state) return state;\n switch (name) {\n case 'success':\n case 'danger':\n case 'warning':\n case 'info':\n return name;\n default:\n return 'default';\n }\n });\n\n classNames = computed(() => `icon-size-${this.size()} icon-state-${this.computedState()}`);\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 { WattIconComponent, WattIcon, WattIconSize, WattIconState } from './icon.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AACO,MAAM,WAAW,GAAG;AACzB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,MAAM,EAAE,aAAa;AACrB,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,aAAa,EAAE,gBAAgB;AAC/B,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,WAAW,EAAE,cAAc;AAC3B,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,IAAI,EAAE,UAAU;AAChB,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,eAAe,EAAE,mBAAmB;AACpC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,SAAS,EAAE,aAAa;AACxB,IAAA,YAAY,EAAE,iBAAiB;AAC/B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,cAAc,EAAE,kBAAkB;AAClC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,YAAY,EAAE,WAAW;AACzB,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,KAAK,EAAE,WAAW;AAClB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,cAAc,EAAE,iBAAiB;AACjC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,cAAc,EAAE,iBAAiB;AACjC,IAAA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AA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,gpFAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAbS,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;4FAeN,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAnB7B,SAAS;AACS,YAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,QAC/B,EAAE,SAAS,EAAE,cAAc,EAAE,EAAA,OAAA,EAC1B,CAAC,OAAO,CAAC,EAAA,QAAA,EACR,WAAW,EAAA,QAAA,EAEX;;;;;;;;;;AAUT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,gpFAAA,CAAA,EAAA;;;ACjDH;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
@@ -3,6 +3,8 @@ import * as i0 from '@angular/core';
3
3
  import { viewChild, input, Component } from '@angular/core';
4
4
  import { BehaviorSubject, skip, debounceTime } from 'rxjs';
5
5
  import { WattIconComponent } from '@energinet/watt/icon';
6
+ import { WattFieldComponent } from '@energinet/watt/field';
7
+ import { WattButtonComponent } from '@energinet/watt/button';
6
8
 
7
9
  //#region License
8
10
  /**
@@ -114,6 +116,85 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
114
116
  `, styles: [":host{height:44px}label{display:inline-block;width:100%;position:relative;text-transform:none;overflow:hidden;pointer-events:none}input{font-size:.875rem;line-height:1.25rem;font-weight:400;text-transform:none;letter-spacing:0;font-family:inherit;width:100%;height:44px;padding-left:var(--watt-space-l);padding-right:12px;border:1px solid var(--watt-on-light-low-emphasis);border-radius:4px;outline:0;opacity:0;transition-property:opacity}.wrapper{display:inline-flex;position:absolute;left:100%;width:100%;height:100%;transition-property:transform}.button{display:inline-flex;gap:var(--watt-space-xs);align-items:center;height:44px;padding:0 16px;color:var(--watt-color-primary);transform:translate(-100%);transition-property:transform;pointer-events:auto;cursor:pointer}.button:hover{color:var(--watt-color-primary-dark)}.text{opacity:1;transition-property:opacity}.clear{position:absolute;top:50%;right:var(--watt-space-s);padding:var(--watt-space-xs);border:none;border-radius:4px;background:none;color:var(--watt-color-primary);transform:translateY(-50%);cursor:pointer;pointer-events:auto}.clear:focus-visible{outline:2px solid var(--watt-color-primary)}input:placeholder-shown~.clear{display:none}input,.wrapper,.button,.text{transition-duration:.3s;transition-timing-function:cubic-bezier(.75,0,.25,1)}input{transition-timing-function:cubic-bezier(0,.5,0,1)}input:focus{border:1px solid var(--watt-color-primary)}input:not(:placeholder-shown),input:focus{pointer-events:auto;opacity:1;transition-timing-function:cubic-bezier(1,0,.5,0)}input:not(:placeholder-shown)+.wrapper,input:focus+.wrapper{transform:translate(-100%)}input:not(:placeholder-shown)+.wrapper .button,input:focus+.wrapper .button{pointer-events:none;transform:translate(-6px)}input:not(:placeholder-shown)+.wrapper .text,input:focus+.wrapper .text{opacity:0}\n"] }]
115
117
  }], propDecorators: { input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], trim: [{ type: i0.Input, args: [{ isSignal: true, alias: "trim", required: false }] }], search: [{ type: i0.Output, args: ["search"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
116
118
 
119
+ //#region License
120
+ /**
121
+ * @license
122
+ * Copyright 2020 Energinet DataHub A/S
123
+ *
124
+ * Licensed under the Apache License, Version 2.0 (the "License2");
125
+ * you may not use this file except in compliance with the License.
126
+ * You may obtain a copy of the License at
127
+ *
128
+ * http://www.apache.org/licenses/LICENSE-2.0
129
+ *
130
+ * Unless required by applicable law or agreed to in writing, software
131
+ * distributed under the License is distributed on an "AS IS" BASIS,
132
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133
+ * See the License for the specific language governing permissions and
134
+ * limitations under the License.
135
+ */
136
+ //#endregion
137
+ class WattSimpleSearchComponent {
138
+ input = viewChild.required('input');
139
+ label = input('', ...(ngDevMode ? [{ debugName: "label" }] : []));
140
+ debounceTime = input(300, ...(ngDevMode ? [{ debugName: "debounceTime" }] : []));
141
+ /**
142
+ * If true, trims whitespace from the search value before emitting.
143
+ */
144
+ trim = input(true, ...(ngDevMode ? [{ debugName: "trim" }] : []));
145
+ search$ = new BehaviorSubject('');
146
+ search = outputFromObservable(this.search$.pipe(skip(1), debounceTime(this.debounceTime())));
147
+ size = input('s', ...(ngDevMode ? [{ debugName: "size" }] : []));
148
+ /**
149
+ * Handles input event, optionally trimming the value.
150
+ */
151
+ onInput(value) {
152
+ const processed = this.trim() ? value.trim() : value;
153
+ this.search$.next(processed);
154
+ }
155
+ clear() {
156
+ const element = this.input().nativeElement;
157
+ if (element.value === '')
158
+ return;
159
+ element.value = '';
160
+ this.onInput(element.value);
161
+ }
162
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattSimpleSearchComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
163
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: WattSimpleSearchComponent, isStandalone: true, selector: "watt-simple-search", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, debounceTime: { classPropertyName: "debounceTime", publicName: "debounceTime", isSignal: true, isRequired: false, transformFunction: null }, trim: { classPropertyName: "trim", publicName: "trim", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { search: "search" }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: `
164
+ <watt-field>
165
+ <watt-icon name="search" [size]="size()" />
166
+ <input
167
+ #input
168
+ type="text"
169
+ role="searchbox"
170
+ [placeholder]="label()"
171
+ (input)="onInput(input.value)"
172
+ />
173
+ <button class="clear" (click)="clear()">
174
+ <watt-icon name="close" [size]="size()" />
175
+ </button>
176
+ </watt-field>
177
+ `, isInline: true, styles: [":host{height:44px;min-height:44px}.clear{position:absolute;top:50%;right:var(--watt-space-s);padding:var(--watt-space-xs);border:none;border-radius:4px;background:none;color:var(--watt-color-primary);transform:translateY(-50%);cursor:pointer;pointer-events:auto}.clear:focus-visible{outline:2px solid var(--watt-color-primary)}input:placeholder-shown~.clear{display:none}\n"], dependencies: [{ kind: "component", type: WattIconComponent, selector: "watt-icon", inputs: ["name", "label", "size", "state"] }, { kind: "component", type: WattFieldComponent, selector: "watt-field", inputs: ["control", "label", "id", "chipMode", "tooltip", "placeholder", "anchorName", "displayMode", "autoFocus", "showErrors"] }] });
178
+ }
179
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattSimpleSearchComponent, decorators: [{
180
+ type: Component,
181
+ args: [{ imports: [WattIconComponent, WattFieldComponent, WattButtonComponent], selector: 'watt-simple-search', template: `
182
+ <watt-field>
183
+ <watt-icon name="search" [size]="size()" />
184
+ <input
185
+ #input
186
+ type="text"
187
+ role="searchbox"
188
+ [placeholder]="label()"
189
+ (input)="onInput(input.value)"
190
+ />
191
+ <button class="clear" (click)="clear()">
192
+ <watt-icon name="close" [size]="size()" />
193
+ </button>
194
+ </watt-field>
195
+ `, styles: [":host{height:44px;min-height:44px}.clear{position:absolute;top:50%;right:var(--watt-space-s);padding:var(--watt-space-xs);border:none;border-radius:4px;background:none;color:var(--watt-color-primary);transform:translateY(-50%);cursor:pointer;pointer-events:auto}.clear:focus-visible{outline:2px solid var(--watt-color-primary)}input:placeholder-shown~.clear{display:none}\n"] }]
196
+ }], propDecorators: { input: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], debounceTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceTime", required: false }] }], trim: [{ type: i0.Input, args: [{ isSignal: true, alias: "trim", required: false }] }], search: [{ type: i0.Output, args: ["search"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
197
+
117
198
  //#region License
118
199
  /**
119
200
  * @license
@@ -137,5 +218,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
137
218
  * Generated bundle index. Do not edit.
138
219
  */
139
220
 
140
- export { WattSearchComponent };
221
+ export { WattSearchComponent, WattSimpleSearchComponent };
141
222
  //# sourceMappingURL=energinet-watt-search.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"energinet-watt-search.mjs","sources":["../../../libs/watt/package/search/watt-search.component.ts","../../../libs/watt/package/search/index.ts","../../../libs/watt/package/search/energinet-watt-search.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 { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { Component, ElementRef, input, viewChild } from '@angular/core';\n\nimport { BehaviorSubject, debounceTime, skip } from 'rxjs';\n\nimport { WattIconComponent, WattIconSize } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n selector: 'watt-search',\n styleUrls: ['./watt-search.component.scss'],\n template: `\n <label>\n <input\n #input\n type=\"text\"\n role=\"searchbox\"\n [placeholder]=\"label()\"\n (input)=\"onInput(input.value)\"\n />\n <span class=\"wrapper\">\n <span class=\"button\">\n <watt-icon name=\"search\" [size]=\"size()\" aria-hidden=\"true\" />\n <span class=\"text\">{{ label() }}</span>\n </span>\n </span>\n <button class=\"clear\" (click)=\"clear()\">\n <watt-icon name=\"close\" [size]=\"size()\" />\n </button>\n </label>\n `,\n})\nexport class WattSearchComponent {\n /**\n * @ignore\n */\n input = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n /**\n * @ignore\n */\n label = input<string>('');\n\n /**\n * @ignore\n */\n debounceTime = input<number>(300);\n\n /**\n * If true, trims whitespace from the search value before emitting.\n */\n trim = input(true);\n\n /**\n * @ignore\n */\n search$ = new BehaviorSubject<string>('');\n\n /**\n * @ignore\n */\n search = outputFromObservable(this.search$.pipe(skip(1), debounceTime(this.debounceTime())));\n\n /**\n * @ignore\n */\n size = input<WattIconSize>('s');\n\n /**\n * Handles input event, optionally trimming the value.\n */\n onInput(value: string): void {\n const processed = this.trim() ? value.trim() : value;\n this.search$.next(processed);\n }\n\n /**\n * @ignore\n */\n clear(): void {\n const element = this.input().nativeElement;\n if (element.value === '') return;\n\n element.value = '';\n this.onInput(element.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\nexport { WattSearchCompon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,EAAA,KAAA,EAAA,MAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACtDlE;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
1
+ {"version":3,"file":"energinet-watt-search.mjs","sources":["../../../libs/watt/package/search/watt-search.component.ts","../../../libs/watt/package/search/watt-simple-search.component.ts","../../../libs/watt/package/search/index.ts","../../../libs/watt/package/search/energinet-watt-search.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 { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { Component, ElementRef, input, viewChild } from '@angular/core';\n\nimport { BehaviorSubject, debounceTime, skip } from 'rxjs';\n\nimport { WattIconComponent, WattIconSize } from '@energinet/watt/icon';\n\n@Component({\n imports: [WattIconComponent],\n selector: 'watt-search',\n styleUrls: ['./watt-search.component.scss'],\n template: `\n <label>\n <input\n #input\n type=\"text\"\n role=\"searchbox\"\n [placeholder]=\"label()\"\n (input)=\"onInput(input.value)\"\n />\n <span class=\"wrapper\">\n <span class=\"button\">\n <watt-icon name=\"search\" [size]=\"size()\" aria-hidden=\"true\" />\n <span class=\"text\">{{ label() }}</span>\n </span>\n </span>\n <button class=\"clear\" (click)=\"clear()\">\n <watt-icon name=\"close\" [size]=\"size()\" />\n </button>\n </label>\n `,\n})\nexport class WattSearchComponent {\n /**\n * @ignore\n */\n input = viewChild.required<ElementRef<HTMLInputElement>>('input');\n\n /**\n * @ignore\n */\n label = input<string>('');\n\n /**\n * @ignore\n */\n debounceTime = input<number>(300);\n\n /**\n * If true, trims whitespace from the search value before emitting.\n */\n trim = input(true);\n\n /**\n * @ignore\n */\n search$ = new BehaviorSubject<string>('');\n\n /**\n * @ignore\n */\n search = outputFromObservable(this.search$.pipe(skip(1), debounceTime(this.debounceTime())));\n\n /**\n * @ignore\n */\n size = input<WattIconSize>('s');\n\n /**\n * Handles input event, optionally trimming the value.\n */\n onInput(value: string): void {\n const processed = this.trim() ? value.trim() : value;\n this.search$.next(processed);\n }\n\n /**\n * @ignore\n */\n clear(): void {\n const element = this.input().nativeElement;\n if (element.value === '') return;\n\n element.value = '';\n this.onInput(element.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 { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { Component, ElementRef, input, viewChild } from '@angular/core';\n\nimport { BehaviorSubject, debounceTime, skip } from 'rxjs';\n\nimport { WattIconComponent, WattIconSize } from '@energinet/watt/icon';\nimport { WattFieldComponent } from '@energinet/watt/field';\nimport { WattButtonComponent } from '@energinet/watt/button';\n\n@Component({\n imports: [WattIconComponent, WattFieldComponent, WattButtonComponent],\n selector: 'watt-simple-search',\n styles: `\n :host {\n height: 44px; /* Magix UX number (replace with variable) */\n min-height: 44px; /* Magix UX number (replace with variable) */\n }\n\n .clear {\n position: absolute;\n top: 50%;\n right: var(--watt-space-s);\n padding: var(--watt-space-xs);\n border: none;\n border-radius: 4px;\n background: none;\n color: var(--watt-color-primary);\n transform: translateY(-50%);\n cursor: pointer;\n pointer-events: auto;\n }\n\n .clear:focus-visible {\n outline: 2px solid var(--watt-color-primary);\n }\n\n input:placeholder-shown ~ .clear {\n display: none;\n }\n `,\n template: `\n <watt-field>\n <watt-icon name=\"search\" [size]=\"size()\" />\n <input\n #input\n type=\"text\"\n role=\"searchbox\"\n [placeholder]=\"label()\"\n (input)=\"onInput(input.value)\"\n />\n <button class=\"clear\" (click)=\"clear()\">\n <watt-icon name=\"close\" [size]=\"size()\" />\n </button>\n </watt-field>\n `,\n})\nexport class WattSimpleSearchComponent {\n input = viewChild.required<ElementRef<HTMLInputElement>>('input');\n label = input<string>('');\n debounceTime = input<number>(300);\n\n /**\n * If true, trims whitespace from the search value before emitting.\n */\n trim = input(true);\n search$ = new BehaviorSubject<string>('');\n search = outputFromObservable(this.search$.pipe(skip(1), debounceTime(this.debounceTime())));\n size = input<WattIconSize>('s');\n\n /**\n * Handles input event, optionally trimming the value.\n */\n onInput(value: string): void {\n const processed = this.trim() ? value.trim() : value;\n this.search$.next(processed);\n }\n\n clear(): void {\n const element = this.input().nativeElement;\n if (element.value === '') return;\n\n element.value = '';\n this.onInput(element.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\nexport { WattSearchComponent } from './watt-search.component';\nexport { WattSimpleSearchComponent } from './watt-simple-search.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;MAiCa,mBAAmB,CAAA;AAC9B;;AAEG;AACH,IAA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103,7 +103,7 @@ type WattIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
103
103
  type WattIconState = 'default' | 'success' | 'danger' | 'warning' | 'info';
104
104
  declare class WattIconComponent {
105
105
  /** Name of an icon within the font set. */
106
- name: _angular_core.InputSignal<"search" | "remove" | "edit" | "redo" | "undo" | "close" | "cancel" | "settings" | "email" | "link" | "payments" | "forward" | "menu" | "logout" | "help" | "refresh" | "language" | "send" | "info" | "feedback" | "download" | "upload" | "print" | "preview" | "power" | "notifications" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | "view_stream" | "construction" | "factory" | "nest_eco_leaf" | "flash_on" | "success" | "danger" | "warning" | "filter" | "plus" | "minus" | "removeForever" | "checkmark" | "user" | "contentCopy" | "date" | "time" | "markEmailUnread" | "openInNew" | "monetization" | "forwardMessage" | "moreVertical" | "login" | "alternateEmail" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "save" | "fileDownload" | "fileUpload" | "attachFile" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
106
+ name: _angular_core.InputSignal<"search" | "remove" | "edit" | "redo" | "undo" | "close" | "cancel" | "settings" | "email" | "link" | "payments" | "forward" | "menu" | "logout" | "help" | "refresh" | "language" | "send" | "info" | "feedback" | "upload" | "download" | "print" | "preview" | "power" | "notifications" | "inventory" | "globe" | "calculate" | "bar_chart_4_bars" | "view_list" | "view_stream" | "construction" | "factory" | "nest_eco_leaf" | "flash_on" | "success" | "danger" | "warning" | "filter" | "plus" | "minus" | "removeForever" | "checkmark" | "user" | "contentCopy" | "date" | "time" | "markEmailUnread" | "openInNew" | "monetization" | "forwardMessage" | "moreVertical" | "login" | "alternateEmail" | "pendingActions" | "toggleOn" | "toggleOff" | "personCheck" | "left" | "right" | "up" | "down" | "arrowDropDown" | "arrowRightAlt" | "arrowLeftAlt" | "save" | "fileDownload" | "fileUpload" | "attachFile" | "location" | "smartDisplay" | "windmill" | "solarPower" | "priorityHigh" | "notificationsUnread" | "horizontalRule" | "wrongLocation" | "heatPump" | undefined>;
107
107
  /** Accessible label for the icon. */
108
108
  label: _angular_core.InputSignal<string | undefined>;
109
109
  /** Size of the icon. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@energinet/watt",
4
- "version": "4.3.3",
4
+ "version": "4.3.5",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
7
7
  ".": {
package/search/index.d.ts CHANGED
@@ -44,4 +44,24 @@ declare class WattSearchComponent {
44
44
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattSearchComponent, "watt-search", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; "trim": { "alias": "trim"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "search": "search"; }, never, never, true, never>;
45
45
  }
46
46
 
47
- export { WattSearchComponent };
47
+ declare class WattSimpleSearchComponent {
48
+ input: _angular_core.Signal<ElementRef<HTMLInputElement>>;
49
+ label: _angular_core.InputSignal<string>;
50
+ debounceTime: _angular_core.InputSignal<number>;
51
+ /**
52
+ * If true, trims whitespace from the search value before emitting.
53
+ */
54
+ trim: _angular_core.InputSignal<boolean>;
55
+ search$: BehaviorSubject<string>;
56
+ search: _angular_core.OutputRef<string>;
57
+ size: _angular_core.InputSignal<WattIconSize>;
58
+ /**
59
+ * Handles input event, optionally trimming the value.
60
+ */
61
+ onInput(value: string): void;
62
+ clear(): void;
63
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WattSimpleSearchComponent, never>;
64
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WattSimpleSearchComponent, "watt-simple-search", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; "trim": { "alias": "trim"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, { "search": "search"; }, never, never, true, never>;
65
+ }
66
+
67
+ export { WattSearchComponent, WattSimpleSearchComponent };