@energinet/watt 3.0.31 → 3.0.33

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@energinet/watt",
4
- "version": "3.0.31",
4
+ "version": "3.0.33",
5
5
  "license": "Apache-2.0",
6
6
  "exports": {
7
7
  ".": {
@@ -1,3 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
1
17
  import { ChangeDetectorRef, ElementRef, AfterViewInit } from '@angular/core';
2
18
  import { AbstractControl, NgControl, Validator } from '@angular/forms';
3
19
  import { MatCalendarCellClassFunction, MatDateRangeInput, MatDateRangePicker, MatDatepickerInput, MatEndDate, MatStartDate } from '@angular/material/datepicker';
@@ -59,10 +75,6 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
59
75
  * @ignore
60
76
  */
61
77
  protected _placeholder: string;
62
- /**
63
- * @ignore
64
- */
65
- datePlaceholder: string;
66
78
  /**
67
79
  * @ignore
68
80
  */
@@ -83,6 +95,9 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
83
95
  * @ignore
84
96
  */
85
97
  getPlaceholderByLocale(locale: WattSupportedLocales): string;
98
+ /**
99
+ * @ignore
100
+ */
86
101
  getRangePlaceholder(): string;
87
102
  isPrevDayButtonDisabled: import("@angular/core").WritableSignal<boolean>;
88
103
  isNextDayButtonDisabled: import("@angular/core").WritableSignal<boolean>;
@@ -130,14 +145,6 @@ export declare class WattDatepickerComponent extends WattPickerBase implements V
130
145
  * @ignore
131
146
  */
132
147
  private isNextDayAfterOrEqualToMaxDate;
133
- /**
134
- * @ignore
135
- */
136
- private getInputFormat;
137
- /**
138
- * @ignore
139
- */
140
- private getPlaceholder;
141
148
  /**
142
149
  * @ignore
143
150
  */
@@ -16,9 +16,10 @@
16
16
  */
17
17
  import { SelectionModel } from '@angular/cdk/collections';
18
18
  import { KeyValue } from '@angular/common';
19
- import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
20
- import type { QueryList, Signal, TrackByFunction } from '@angular/core';
19
+ import { AfterViewInit, ElementRef, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
20
+ import type { Signal, TrackByFunction } from '@angular/core';
21
21
  import { MatSort, Sort, SortDirection } from '@angular/material/sort';
22
+ import { Subject } from 'rxjs';
22
23
  import { WattDatePipe } from '@energinet/watt/core/date';
23
24
  import { IWattTableDataSource } from './watt-table-data-source';
24
25
  import * as i0 from "@angular/core";
@@ -143,57 +144,57 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
143
144
  * The table's source of data. Property should not be changed after
144
145
  * initialization, instead update the data on the instance itself.
145
146
  */
146
- dataSource: IWattTableDataSource<T>;
147
+ dataSource: import("@angular/core").InputSignal<IWattTableDataSource<T>>;
147
148
  /**
148
149
  * Column definition record with keys representing the column identifiers
149
150
  * and values being the column configuration. The order of the columns
150
151
  * is determined by the property order, but can be overruled by the
151
152
  * `displayedColumns` input.
152
153
  */
153
- columns: WattTableColumnDef<T>;
154
+ columns: import("@angular/core").InputSignal<WattTableColumnDef<T>>;
154
155
  /**
155
156
  * Used for hiding or reordering columns defined in the `columns` input.
156
157
  */
157
- displayedColumns?: string[];
158
+ displayedColumns: import("@angular/core").InputSignal<string[] | undefined>;
158
159
  /**
159
160
  * Used for disabling the table. This will disable all user interaction
160
161
  */
161
- disabled: boolean;
162
+ disabled: import("@angular/core").InputSignal<boolean>;
162
163
  /**
163
164
  * Provide a description of the table for visually impaired users.
164
165
  */
165
- description: string;
166
+ description: import("@angular/core").InputSignal<string>;
166
167
  /**
167
168
  * If set to `true`, the table will show a loading indicator
168
169
  * when there is no data.
169
170
  */
170
- loading: boolean;
171
+ loading: import("@angular/core").InputSignal<boolean>;
171
172
  /**
172
173
  * If true the footer will be sticky
173
174
  */
174
- stickyFooter: boolean;
175
+ stickyFooter: import("@angular/core").InputSignal<boolean>;
175
176
  /**
176
177
  * Optional callback for determining header text for columns that
177
178
  * do not have a static header text set in the column definition.
178
179
  * Useful for providing translations of column headers.
179
180
  */
180
- resolveHeader?: (key: string) => string;
181
+ resolveHeader: import("@angular/core").InputSignal<((key: string) => string) | undefined>;
181
182
  /**
182
183
  * Identifier for column that should be sorted initially.
183
184
  */
184
- sortBy: string;
185
+ sortBy: import("@angular/core").InputSignal<string>;
185
186
  /**
186
187
  * The sort direction of the initially sorted column.
187
188
  */
188
- sortDirection: SortDirection;
189
+ sortDirection: import("@angular/core").InputSignal<SortDirection>;
189
190
  /**
190
191
  * Whether to allow the user to clear the sort. Defaults to `true`.
191
192
  */
192
- sortClear: boolean;
193
+ sortClear: import("@angular/core").InputSignal<boolean>;
193
194
  /**
194
195
  * Whether the table should include a checkbox column for row selection.
195
196
  */
196
- selectable: boolean;
197
+ selectable: import("@angular/core").InputSignal<boolean>;
197
198
  /**
198
199
  * Sets the initially selected rows. Only works when selectable is `true`.
199
200
  */
@@ -201,11 +202,11 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
201
202
  /**
202
203
  * Set to true to disable row hover highlight.
203
204
  */
204
- suppressRowHoverHighlight: boolean;
205
+ suppressRowHoverHighlight: import("@angular/core").InputSignal<boolean>;
205
206
  /**
206
207
  * Highlights the currently active row.
207
208
  */
208
- activeRow?: T;
209
+ activeRow: import("@angular/core").InputSignal<T | undefined>;
209
210
  /**
210
211
  * Custom comparator function to determine if two rows are equal.
211
212
  *
@@ -215,11 +216,11 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
215
216
  * as long as the instances remain the same, which may not be the case
216
217
  * if row data is recreated or rebuilt from serialization.
217
218
  */
218
- activeRowComparator?: (currentRow: T, activeRow: T) => boolean;
219
+ activeRowComparator: import("@angular/core").InputSignal<((currentRow: T, activeRow: T) => boolean) | undefined>;
219
220
  /**
220
221
  * If set to `true`, the column headers will not be shown. Default is `false`.
221
222
  */
222
- hideColumnHeaders: boolean;
223
+ hideColumnHeaders: import("@angular/core").InputSignal<boolean>;
223
224
  /**
224
225
  * Choose from a predefined set of display variants.
225
226
  */
@@ -235,23 +236,26 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
235
236
  /**
236
237
  * Emits whenever the selection updates. Only works when selectable is `true`.
237
238
  */
238
- selectionChange: EventEmitter<T[]>;
239
+ selectionChange: import("@angular/core").OutputEmitterRef<T[]>;
240
+ /**
241
+ * @ignore
242
+ * The `observed` boolean from the `Subject` is used to determine if a row is
243
+ * clickable or not. This is available on `EventEmitter`, but not on `output`,
244
+ * which is why this workaround is used.
245
+ */
246
+ protected _rowClick$: Subject<T>;
239
247
  /**
240
248
  * Emits whenever a row is clicked.
241
249
  */
242
- rowClick: EventEmitter<T>;
250
+ rowClick: import("@angular/core").OutputRef<T>;
243
251
  /**
244
252
  * Event emitted when the user changes the active sort or sort direction.
245
253
  */
246
- sortChange: EventEmitter<Sort>;
247
- /** @ignore */
248
- _cells: QueryList<WattTableCellDirective<T>>;
249
- /** @ignore */
250
- _toolbar?: WattTableToolbarDirective<T>;
251
- /** @ignore */
252
- _sort: MatSort;
253
- /** @ignore */
254
- _tableCellElements: Signal<readonly ElementRef<HTMLTableCellElement>[]>;
254
+ sortChange: import("@angular/core").OutputEmitterRef<Sort>;
255
+ protected cells: Signal<readonly WattTableCellDirective<T>[]>;
256
+ protected toolbar: Signal<WattTableToolbarDirective<any> | undefined>;
257
+ protected sort: Signal<MatSort | undefined>;
258
+ protected tableCellElements: Signal<readonly ElementRef<HTMLTableCellElement>[]>;
255
259
  /** @ignore */
256
260
  _animationEffect: import("@angular/core").AfterRenderRef;
257
261
  /** @ignore */
@@ -305,7 +309,7 @@ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
305
309
  /** @ignore */
306
310
  _onRowClick(row: T): void;
307
311
  static ɵfac: i0.ɵɵFactoryDeclaration<WattTableComponent<any>, never>;
308
- static ɵcmp: i0.ɵɵComponentDeclaration<WattTableComponent<any>, "watt-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "description": { "alias": "description"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "resolveHeader": { "alias": "resolveHeader"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortClear": { "alias": "sortClear"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "suppressRowHoverHighlight": { "alias": "suppressRowHoverHighlight"; "required": false; }; "activeRow": { "alias": "activeRow"; "required": false; }; "activeRowComparator": { "alias": "activeRowComparator"; "required": false; }; "hideColumnHeaders": { "alias": "hideColumnHeaders"; "required": false; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "selectionChange": "selectionChange"; "rowClick": "rowClick"; "sortChange": "sortChange"; }, ["_toolbar", "_cells"], never, true, never>;
312
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTableComponent<any>, "watt-table", never, { "dataSource": { "alias": "dataSource"; "required": true; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; "isSignal": true; }; "resolveHeader": { "alias": "resolveHeader"; "required": false; "isSignal": true; }; "sortBy": { "alias": "sortBy"; "required": false; "isSignal": true; }; "sortDirection": { "alias": "sortDirection"; "required": false; "isSignal": true; }; "sortClear": { "alias": "sortClear"; "required": false; "isSignal": true; }; "selectable": { "alias": "selectable"; "required": false; "isSignal": true; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "suppressRowHoverHighlight": { "alias": "suppressRowHoverHighlight"; "required": false; "isSignal": true; }; "activeRow": { "alias": "activeRow"; "required": false; "isSignal": true; }; "activeRowComparator": { "alias": "activeRowComparator"; "required": false; "isSignal": true; }; "hideColumnHeaders": { "alias": "hideColumnHeaders"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; "selectionChange": "selectionChange"; "rowClick": "rowClick"; "sortChange": "sortChange"; }, ["cells", "toolbar"], never, true, never>;
309
313
  }
310
314
  export declare class WattTableToolbarSpacerComponent {
311
315
  static ɵfac: i0.ɵɵFactoryDeclaration<WattTableToolbarSpacerComponent, never>;