@energinet/watt 4.3.2 → 4.3.4
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 +1 -1
- package/description-list/index.d.ts +3 -6
- package/fesm2022/energinet-watt-data.mjs +91 -65
- package/fesm2022/energinet-watt-data.mjs.map +1 -1
- package/fesm2022/energinet-watt-description-list.mjs +11 -21
- package/fesm2022/energinet-watt-description-list.mjs.map +1 -1
- package/fesm2022/energinet-watt-dropdown.mjs +2 -4
- package/fesm2022/energinet-watt-dropdown.mjs.map +1 -1
- package/fesm2022/energinet-watt-field.mjs +1 -1
- package/fesm2022/energinet-watt-field.mjs.map +1 -1
- package/fesm2022/energinet-watt-icon.mjs +2 -2
- package/fesm2022/energinet-watt-icon.mjs.map +1 -1
- package/fesm2022/energinet-watt-modal.mjs +3 -4
- package/fesm2022/energinet-watt-modal.mjs.map +1 -1
- package/fesm2022/energinet-watt-search.mjs +82 -1
- package/fesm2022/energinet-watt-search.mjs.map +1 -1
- package/fesm2022/energinet-watt-table.mjs +3 -4
- package/fesm2022/energinet-watt-table.mjs.map +1 -1
- package/fesm2022/energinet-watt-utils-resize-observer.mjs +5 -7
- package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -1
- package/icon/index.d.ts +1 -1
- package/package.json +1 -1
- package/search/index.d.ts +21 -1
- package/utils/resize-observer/index.d.ts +3 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-table.mjs","sources":["../../../libs/watt/package/table/watt-table-data-source.ts","../../../libs/watt/package/table/watt-table-expand-animation.ts","../../../libs/watt/package/table/watt-table.component.ts","../../../libs/watt/package/table/watt-table.component.html","../../../libs/watt/package/table/index.ts","../../../libs/watt/package/table/energinet-watt-table.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 { DataSource } from '@angular/cdk/collections';\nimport { computed, effect } from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\n\nexport interface IWattTableDataSource<T> extends DataSource<T> {\n data: T[];\n filter: string;\n filteredData: T[];\n paginator: MatPaginator | null | undefined;\n sort: MatSort | null | undefined;\n totalCount: number;\n}\n\n/**\n * @see https://material.angular.dev/components/table/api#MatTableDataSource\n */\nexport class WattTableDataSource<T>\n extends MatTableDataSource<T>\n implements IWattTableDataSource<T>\n{\n constructor(\n initialData?: T[],\n config: { disableClientSideSort: boolean } = { disableClientSideSort: false }\n ) {\n super(initialData);\n\n if (config.disableClientSideSort)\n this.sortData = (data: T[]): T[] => {\n return data;\n };\n }\n\n get totalCount() {\n return this.data.length;\n }\n}\n\n/** Convenience method for creating a data source from reactive input. */\nexport const dataSource = <T>(computation: () => T[]) => {\n const data = computed(computation);\n const dataSource = new WattTableDataSource<T>();\n effect(() => {\n dataSource.data = data();\n });\n return dataSource;\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 afterRenderEffect,\n computed,\n ElementRef,\n linkedSignal,\n Signal,\n untracked,\n} from '@angular/core';\nimport { EXPANDABLE_CLASS } from './watt-table.component';\n\nexport const animateExpandableCells = (\n elements: Signal<readonly ElementRef<HTMLTableCellElement>[]>,\n trigger: Signal<unknown>\n) => {\n const cells = computed<HTMLTableCellElement[]>(() => elements().map((c) => c.nativeElement));\n const expandable = computed(() => cells().filter((c) => c.classList.contains(EXPANDABLE_CLASS)));\n\n // Accumulate a map of the height of cells. This needs to remember previous values\n // in case the table navigates/filters or otherwise changes the cells, since cell\n // elements will be added or removed from the list dynamically.\n const heightMap = linkedSignal<Record<string, number>, Record<string, number>>({\n source: computed(() => {\n trigger(); // recalculate when cells are expanded\n return Object.fromEntries(expandable().map((cell) => [cell.dataset.key, cell.offsetHeight]));\n }),\n computation: (source, prev) => ({ ...prev?.value, ...source }),\n });\n\n // Compute the differences in height for each cell since the last `trigger`\n const deltaMap = linkedSignal<Record<string, number>, [string, number][]>({\n source: heightMap,\n computation: (source, prev) =>\n Object.entries(source).map(([key, height]) => [key, height - (prev?.source[key] ?? 0)]),\n });\n\n return afterRenderEffect({\n read: () => {\n trigger(); // run the animation in response to the `trigger` signal only\n untracked(() => {\n deltaMap()\n .filter(([, deltaY]) => deltaY !== 0)\n .forEach(([key, deltaY]) => {\n // Animate all cells below the expanding cell\n const rowIndex = cells().find((c) => c.dataset.key === key)?.dataset.rowIndex;\n if (!rowIndex) return;\n cells()\n .filter((c) => c.dataset.rowIndex && c.dataset.rowIndex > rowIndex)\n .forEach((c) => {\n c.animate(\n { transform: [`translateY(${deltaY * -1}px)`, 'translateY(0)'] },\n { duration: 300, easing: 'cubic-bezier(0.4, 0, 0.2, 1)', composite: 'add' }\n );\n });\n });\n });\n },\n });\n};\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { KeyValue, KeyValuePipe, NgClass, NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n viewChild,\n viewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { Signal, TrackByFunction } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { MatSort, MatSortModule, Sort, SortDirection } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { Subject } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { wattFormatDate } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nimport { animateExpandableCells } from './watt-table-expand-animation';\n\n/** Class name for expandable cells. */\nexport const EXPANDABLE_CLASS = 'watt-table-cell--expandable';\n\nexport interface WattTableColumn<T> {\n /**\n * The data that this column should be bound to, either as a property of `T`\n * or derived from each row of `T` using an accessor function. Use `null`\n * for columns that should not be associated with data, but note that this\n * will disable sorting and automatic cell population.\n */\n accessor: keyof T | ((row: T) => unknown) | null;\n\n /**\n * Resolve the header text to a static display value. This will prevent\n * the `resolveHeader` input function from being called for this column.\n */\n header?: string;\n\n /**\n * Callback for determining cell content when not using template. By default,\n * cell content is found using the `accessor` (unless it is `null`).\n */\n cell?: (row: T) => string;\n\n /**\n * Enable or disable sorting for this column. Defaults to `true`\n * unless `accessor` is `null`.\n */\n sort?: boolean;\n\n /**\n * Set the column size using grid sizing values. Defaults to `\"auto\"`.\n *\n * @remarks\n * Accepts all of the CSS grid track size keywords (such as `min-content`,\n * `max-content`, `minmax()`) as well as fractional (`fr`), percentage (`%`)\n * and length (`px`, `em`, etc) units.\n *\n * @see https://drafts.csswg.org/css-grid/#track-sizes\n */\n size?: string;\n\n /**\n * Horizontally align the contents of the column. Defaults to `\"left\"`.\n */\n align?: 'left' | 'right' | 'center';\n\n /**\n * Helper icon will be shown in the header cell, with an click event.\n */\n helperAction?: () => void;\n\n /**\n * CSS class to apply to the header cell element.\n */\n headerCellClass?: string;\n\n /**\n * CSS class to apply to the data cell element.\n */\n dataCellClass?: string;\n\n /**\n * Footer configuration for the column.\n */\n footer?: WattTableColumnFooter;\n\n /**\n * When set to `true`, the column remains visible when horizontally scrolling.\n */\n stickyEnd?: Signal<boolean>;\n\n /**\n * When `true`, the cell is replaced with an expandable arrow and the content is deferred.\n * Clicking on the arrow reveals the content below the current row.\n *\n * @remarks\n * It is recommended to provide a custom `trackBy` function when using `expandable`,\n * otherwise animations can be inaccurate when data is changed.\n */\n expandable?: boolean;\n\n /**\n * Tooltip text to show on hover of the header cell.\n */\n tooltip?: string;\n}\n\n/**\n * Configuration for the footer cell of a column.\n */\nexport interface WattTableColumnFooter {\n /**\n * The value that will be displayed in the footer cell.\n */\n value?: Signal<string | number>;\n\n /**\n * CSS class to apply to the footer cell.\n */\n class?: string;\n}\n\n/**\n * Record for defining columns with keys used as column identifiers.\n */\nexport type WattTableColumnDef<T> = Record<string, WattTableColumn<T>>;\n\n// Used for strongly typing the structural directive\ninterface WattTableCellContext<T> {\n $implicit: T;\n index: number;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n\n /**\n * The WattTableColumn this template applies to.\n */\n readonly column = input.required<WattTableColumn<T>>({ alias: 'wattTableCell' });\n\n /**\n * Optional header text for the column.\n */\n readonly header = input<string>(undefined, { alias: 'wattTableCellHeader' });\n\n static ngTemplateContextGuard<T>(\n _directive: WattTableCellDirective<T>,\n context: unknown\n ): context is WattTableCellContext<T> {\n return true;\n }\n}\n\n@Directive({\n selector: '[wattTableToolbar]',\n})\nexport class WattTableToolbarDirective<T> {\n templateRef = inject(TemplateRef<WattTableToolbarContext<T[]>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableToolbarDirective<T>,\n context: unknown\n ): context is WattTableToolbarContext<T[]> {\n return true;\n }\n}\n\n/**\n * Usage:\n * `import { WATT_TABLE } from '@energinet/watt/table';`\n */\n@Component({\n imports: [\n NgClass,\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattIconComponent,\n WattCheckboxComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n host: {\n '[class.watt-table-variant-zebra]': 'variant() === \"zebra\"',\n '[style.--watt-table-grid-template-columns]': 'sizing().join(\" \")',\n },\n})\nexport class WattTableComponent<T> {\n /**\n * The table's source of data. Property should not be changed after\n * initialization, instead update the data on the instance itself.\n */\n readonly dataSource = input.required<IWattTableDataSource<T>>();\n\n /**\n * Column definition record with keys representing the column identifiers\n * and values being the column configuration. The order of the columns\n * is determined by the property order, but can be overruled by the\n * `displayedColumns` input.\n */\n readonly columns = input<WattTableColumnDef<T>>({});\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n readonly displayedColumns = input<string[]>();\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n readonly disabled = input(false);\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n readonly description = input('');\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n readonly loading = input(false);\n\n /**\n * If true the footer will be sticky\n */\n readonly stickyFooter = input(false);\n\n /**\n * Optional callback for determining header text for columns that\n * do not have a static header text set in the column definition.\n * Useful for providing translations of column headers.\n */\n readonly resolveHeader = input<(key: string) => string>();\n\n /**\n * Identifier for column that should be sorted initially.\n */\n readonly sortBy = input('');\n\n /**\n * The sort direction of the initially sorted column.\n */\n readonly sortDirection = input<SortDirection>('');\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n readonly sortClear = input(true);\n\n /**\n * Optional function to determine CSS class(es) for each row.\n */\n readonly rowClass = input<(row: T) => string | string[]>();\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n readonly selectable = input(false);\n\n /**\n * Sets the selected rows. Only applicable when selectable is `true`.\n */\n readonly selection = model<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n readonly suppressRowHoverHighlight = input(false);\n\n /**\n * Highlights the currently active row.\n */\n readonly activeRow = input<T>();\n\n /**\n * Custom comparator function to determine if two rows are equal.\n *\n * @remarks\n * The default behavior for determining the active row is to compare\n * the two row objects using strict equality check. This is sufficient\n * as long as the instances remain the same, which may not be the case\n * if row data is recreated or rebuilt from serialization.\n */\n readonly activeRowComparator = input<(currentRow: T, activeRow: T) => boolean>();\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n readonly hideColumnHeaders = input(false);\n\n /**\n * Choose from a predefined set of display variants.\n */\n readonly variant = input<'zebra'>();\n\n /**\n * Array of rows that are currently expanded.\n */\n readonly expanded = model<T[]>([]);\n\n /**\n * Optional function for uniquely identifying rows.\n */\n readonly trackBy = input<TrackByFunction<T> | keyof T>();\n\n /**\n * @ignore\n * The `observed` boolean from the `Subject` is used to determine if a row is\n * clickable or not. This is available on `EventEmitter`, but not on `output`,\n * which is why this workaround is used.\n */\n protected rowClick$ = new Subject<T>();\n\n /**\n * Emits whenever a row is clicked.\n */\n readonly rowClick = outputFromObservable(this.rowClick$);\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n readonly sortChange = output<Sort>();\n\n // Queries\n protected cells = contentChildren(WattTableCellDirective<T>);\n protected toolbar = contentChild(WattTableToolbarDirective<T>);\n protected sort = viewChild(MatSort);\n\n // Enables animation for expanding/collapsing cells\n protected tableCellElements = viewChildren<ElementRef<HTMLTableCellElement>>('td');\n protected animationEffect = animateExpandableCells(this.tableCellElements, this.expanded);\n\n // Selectable\n protected filterSelectionBy = (rows: T[]) => rows.filter((row) => this.selection().includes(row));\n protected getSelectionState = () => {\n const filteredData = this.dataSource().filteredData;\n const filteredSelection = this.filterSelectionBy(filteredData);\n if (!filteredSelection.length) return false;\n return filteredSelection.length === this.dataSource().filteredData.length ? true : null;\n };\n\n // Unique names for special columns\n protected checkboxColumn = '__checkboxColumn__';\n protected expandableColumn = '__expandableColumn__';\n\n protected hasFooter = computed(() => Object.values(this.columns()).some((c) => c.footer));\n protected isExpandable = computed(() => Object.values(this.columns()).some((c) => c.expandable));\n protected renderedColumns = computed(() => {\n const columns = this.displayedColumns() ?? Object.keys(this.columns());\n return [\n ...(this.selectable() ? [this.checkboxColumn] : []),\n ...columns.filter((key) => !this.columns()[key].expandable),\n ...(this.isExpandable() ? [this.expandableColumn] : []),\n ...columns.filter((key) => this.columns()[key].expandable),\n ];\n });\n\n protected sizing = computed(() => {\n const columns = this.columns();\n return this.renderedColumns()\n .filter((key) => !columns[key]?.expandable)\n .map((key) => {\n switch (key) {\n case this.checkboxColumn:\n return 'var(--watt-space-xl)';\n case this.expandableColumn:\n return 'min-content';\n default:\n return columns[key]?.size ?? 'auto';\n }\n });\n });\n\n /** Try to get cell data for a specific `column` and `row`. */\n private getCellData = (column: WattTableColumn<T>, row: T) => {\n if (column.cell) return column.cell(row);\n return !column.accessor\n ? ''\n : typeof column.accessor === 'function'\n ? column.accessor(row)\n : row[column.accessor];\n };\n\n protected getColumnTemplate = (column: WattTableColumn<T>) =>\n this.cells().find((item) => item.column() === column)?.templateRef;\n\n protected getColumnHeader = (column: KeyValue<string, WattTableColumn<T>>) => {\n if (typeof column.value.header === 'string') return column.value.header;\n const cell = this.cells().find((item) => item.column() === column.value);\n return cell?.header() ?? this.resolveHeader()?.(column.key) ?? column.key;\n };\n\n protected getColumnCell = (column: WattTableColumn<T>, row: T) => {\n const cell = this.getCellData(column, row);\n if (cell === undefined || cell === null) return '—';\n if (cell instanceof Date) return wattFormatDate(cell);\n return cell;\n };\n\n protected getRowKey = (index: number, row: T) => {\n const trackBy = this.trackBy();\n if (typeof trackBy === 'string') return row[trackBy];\n if (typeof trackBy === 'function') return trackBy(index, row);\n return this.dataSource().data.indexOf(row);\n };\n\n protected isActiveRow = (row: T) => {\n const activeRow = this.activeRow();\n const activeRowComparator = this.activeRowComparator();\n if (!activeRow) return false;\n return activeRowComparator ? activeRowComparator(row, activeRow) : row === activeRow;\n };\n\n protected getRowClass = (row: T): string => {\n const rowClass = this.rowClass();\n if (!rowClass) return '';\n const result = rowClass(row);\n return Array.isArray(result) ? result.join(' ') : result;\n };\n\n protected onRowClick = (row: T) => {\n if (this.disabled() || window.getSelection()?.toString() !== '') return;\n if (this.isExpandable()) {\n this.expanded.update((rows) =>\n rows.includes(row) ? rows.filter((r) => r != row) : [...rows, row]\n );\n }\n\n this.rowClick$.next(row);\n };\n\n constructor() {\n effect(() => {\n const dataSource = this.dataSource();\n dataSource.sort = this.sort();\n if (!(dataSource instanceof WattTableDataSource)) return;\n dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const column = this.columns()[sortHeaderId];\n const value = this.getCellData(column, row);\n if (typeof value === 'string') return value.toLowerCase(); // case insensitive sorting\n if (value instanceof Date) return value.getTime();\n return value as number;\n };\n });\n }\n\n /**\n * Clears the selection, emitting `selectionChange` if `selection` was not empty.\n */\n clearSelection = () => this.selection.update((s) => (!s.length ? s : []));\n\n /**\n * Toggles the selection of a row.\n */\n toggleSelection = (row: T) =>\n this.selection.update((s) => (s.includes(row) ? s.filter((r) => r !== row) : s.concat(row)));\n}\n\nexport const WATT_TABLE = [WattTableComponent, WattTableCellDirective, WattTableToolbarDirective];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [ngClass]=\"{ 'watt-table-has-selection': getSelectionState() !== false }\"\n [matSortActive]=\"sortBy()\"\n [matSortDirection]=\"sortDirection()\"\n [matSortDisableClear]=\"!sortClear()\"\n [dataSource]=\"dataSource()\"\n [attr.aria-label]=\"description()\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable()) {\n <ng-container [matColumnDef]=\"checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\n\n @for (column of columns() | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ getColumnHeader(column) }}\n @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n </td>\n\n @if (hasFooter()) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }} \"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders()) {\n <tr mat-header-row *matHeaderRowDef=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(row)\"\n [ngClass]=\"{\n 'watt-table-highlight-row': !disabled() && !suppressRowHoverHighlight(),\n 'watt-table-clickable-row': !disabled() && rowClick$.observed,\n 'watt-table-active-row': isActiveRow(row),\n }\"\n ></tr>\n\n @if (toolbar()) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (hasFooter()) {\n <tr\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading()) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of renderedColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable()\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (toolbar(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\n />\n </div>\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 { IWattTableDataSource, WattTableDataSource, dataSource } from './watt-table-data-source';\nexport {\n type WattTableColumn,\n type WattTableColumnDef,\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WATT_TABLE,\n} from './watt-table.component';\n","/**\n * Generated bundle index. Do not ed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,sBAAsB,EAAE,yBAAyB;;AEpfhG;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"energinet-watt-table.mjs","sources":["../../../libs/watt/package/table/watt-table-data-source.ts","../../../libs/watt/package/table/watt-table-expand-animation.ts","../../../libs/watt/package/table/watt-table.component.ts","../../../libs/watt/package/table/watt-table.component.html","../../../libs/watt/package/table/index.ts","../../../libs/watt/package/table/energinet-watt-table.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 { DataSource } from '@angular/cdk/collections';\nimport { computed, effect } from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\n\nexport interface IWattTableDataSource<T> extends DataSource<T> {\n data: T[];\n filter: string;\n filteredData: T[];\n paginator: MatPaginator | null | undefined;\n sort: MatSort | null | undefined;\n totalCount: number;\n}\n\n/**\n * @see https://material.angular.dev/components/table/api#MatTableDataSource\n */\nexport class WattTableDataSource<T>\n extends MatTableDataSource<T>\n implements IWattTableDataSource<T>\n{\n constructor(\n initialData?: T[],\n config: { disableClientSideSort: boolean } = { disableClientSideSort: false }\n ) {\n super(initialData);\n\n if (config.disableClientSideSort)\n this.sortData = (data: T[]): T[] => {\n return data;\n };\n }\n\n get totalCount() {\n return this.data.length;\n }\n}\n\n/** Convenience method for creating a data source from reactive input. */\nexport const dataSource = <T>(computation: () => T[]) => {\n const data = computed(computation);\n const dataSource = new WattTableDataSource<T>();\n effect(() => {\n dataSource.data = data();\n });\n return dataSource;\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 afterRenderEffect,\n computed,\n ElementRef,\n linkedSignal,\n Signal,\n untracked,\n} from '@angular/core';\nimport { EXPANDABLE_CLASS } from './watt-table.component';\n\nexport const animateExpandableCells = (\n elements: Signal<readonly ElementRef<HTMLTableCellElement>[]>,\n trigger: Signal<unknown>\n) => {\n const cells = computed<HTMLTableCellElement[]>(() => elements().map((c) => c.nativeElement));\n const expandable = computed(() => cells().filter((c) => c.classList.contains(EXPANDABLE_CLASS)));\n\n // Accumulate a map of the height of cells. This needs to remember previous values\n // in case the table navigates/filters or otherwise changes the cells, since cell\n // elements will be added or removed from the list dynamically.\n const heightMap = linkedSignal<Record<string, number>, Record<string, number>>({\n source: computed(() => {\n trigger(); // recalculate when cells are expanded\n return Object.fromEntries(expandable().map((cell) => [cell.dataset.key, cell.offsetHeight]));\n }),\n computation: (source, prev) => ({ ...prev?.value, ...source }),\n });\n\n // Compute the differences in height for each cell since the last `trigger`\n const deltaMap = linkedSignal<Record<string, number>, [string, number][]>({\n source: heightMap,\n computation: (source, prev) =>\n Object.entries(source).map(([key, height]) => [key, height - (prev?.source[key] ?? 0)]),\n });\n\n return afterRenderEffect({\n read: () => {\n trigger(); // run the animation in response to the `trigger` signal only\n untracked(() => {\n deltaMap()\n .filter(([, deltaY]) => deltaY !== 0)\n .forEach(([key, deltaY]) => {\n // Animate all cells below the expanding cell\n const rowIndex = cells().find((c) => c.dataset.key === key)?.dataset.rowIndex;\n if (!rowIndex) return;\n cells()\n .filter((c) => c.dataset.rowIndex && c.dataset.rowIndex > rowIndex)\n .forEach((c) => {\n c.animate(\n { transform: [`translateY(${deltaY * -1}px)`, 'translateY(0)'] },\n { duration: 300, easing: 'cubic-bezier(0.4, 0, 0.2, 1)', composite: 'add' }\n );\n });\n });\n });\n },\n });\n};\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { KeyValue, KeyValuePipe, NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n TemplateRef,\n viewChild,\n viewChildren,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { Signal, TrackByFunction } from '@angular/core';\nimport { outputFromObservable } from '@angular/core/rxjs-interop';\nimport { FormsModule } from '@angular/forms';\nimport { MatSort, MatSortModule, Sort, SortDirection } from '@angular/material/sort';\nimport { MatTableModule } from '@angular/material/table';\nimport { Subject } from 'rxjs';\n\nimport { WattCheckboxComponent } from '@energinet/watt/checkbox';\nimport { wattFormatDate } from '@energinet/watt/core/date';\nimport { WattIconComponent } from '@energinet/watt/icon';\nimport { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';\nimport { animateExpandableCells } from './watt-table-expand-animation';\n\n/** Class name for expandable cells. */\nexport const EXPANDABLE_CLASS = 'watt-table-cell--expandable';\n\nexport interface WattTableColumn<T> {\n /**\n * The data that this column should be bound to, either as a property of `T`\n * or derived from each row of `T` using an accessor function. Use `null`\n * for columns that should not be associated with data, but note that this\n * will disable sorting and automatic cell population.\n */\n accessor: keyof T | ((row: T) => unknown) | null;\n\n /**\n * Resolve the header text to a static display value. This will prevent\n * the `resolveHeader` input function from being called for this column.\n */\n header?: string;\n\n /**\n * Callback for determining cell content when not using template. By default,\n * cell content is found using the `accessor` (unless it is `null`).\n */\n cell?: (row: T) => string;\n\n /**\n * Enable or disable sorting for this column. Defaults to `true`\n * unless `accessor` is `null`.\n */\n sort?: boolean;\n\n /**\n * Set the column size using grid sizing values. Defaults to `\"auto\"`.\n *\n * @remarks\n * Accepts all of the CSS grid track size keywords (such as `min-content`,\n * `max-content`, `minmax()`) as well as fractional (`fr`), percentage (`%`)\n * and length (`px`, `em`, etc) units.\n *\n * @see https://drafts.csswg.org/css-grid/#track-sizes\n */\n size?: string;\n\n /**\n * Horizontally align the contents of the column. Defaults to `\"left\"`.\n */\n align?: 'left' | 'right' | 'center';\n\n /**\n * Helper icon will be shown in the header cell, with an click event.\n */\n helperAction?: () => void;\n\n /**\n * CSS class to apply to the header cell element.\n */\n headerCellClass?: string;\n\n /**\n * CSS class to apply to the data cell element.\n */\n dataCellClass?: string;\n\n /**\n * Footer configuration for the column.\n */\n footer?: WattTableColumnFooter;\n\n /**\n * When set to `true`, the column remains visible when horizontally scrolling.\n */\n stickyEnd?: Signal<boolean>;\n\n /**\n * When `true`, the cell is replaced with an expandable arrow and the content is deferred.\n * Clicking on the arrow reveals the content below the current row.\n *\n * @remarks\n * It is recommended to provide a custom `trackBy` function when using `expandable`,\n * otherwise animations can be inaccurate when data is changed.\n */\n expandable?: boolean;\n\n /**\n * Tooltip text to show on hover of the header cell.\n */\n tooltip?: string;\n}\n\n/**\n * Configuration for the footer cell of a column.\n */\nexport interface WattTableColumnFooter {\n /**\n * The value that will be displayed in the footer cell.\n */\n value?: Signal<string | number>;\n\n /**\n * CSS class to apply to the footer cell.\n */\n class?: string;\n}\n\n/**\n * Record for defining columns with keys used as column identifiers.\n */\nexport type WattTableColumnDef<T> = Record<string, WattTableColumn<T>>;\n\n// Used for strongly typing the structural directive\ninterface WattTableCellContext<T> {\n $implicit: T;\n index: number;\n}\n\ninterface WattTableToolbarContext<T> {\n $implicit: T;\n}\n\n@Directive({\n selector: '[wattTableCell]',\n})\nexport class WattTableCellDirective<T> {\n templateRef = inject(TemplateRef<WattTableCellContext<T>>);\n\n /**\n * The WattTableColumn this template applies to.\n */\n readonly column = input.required<WattTableColumn<T>>({ alias: 'wattTableCell' });\n\n /**\n * Optional header text for the column.\n */\n readonly header = input<string>(undefined, { alias: 'wattTableCellHeader' });\n\n static ngTemplateContextGuard<T>(\n _directive: WattTableCellDirective<T>,\n context: unknown\n ): context is WattTableCellContext<T> {\n return true;\n }\n}\n\n@Directive({\n selector: '[wattTableToolbar]',\n})\nexport class WattTableToolbarDirective<T> {\n templateRef = inject(TemplateRef<WattTableToolbarContext<T[]>>);\n static ngTemplateContextGuard<T>(\n _directive: WattTableToolbarDirective<T>,\n context: unknown\n ): context is WattTableToolbarContext<T[]> {\n return true;\n }\n}\n\n/**\n * Usage:\n * `import { WATT_TABLE } from '@energinet/watt/table';`\n */\n@Component({\n imports: [\n NgTemplateOutlet,\n KeyValuePipe,\n FormsModule,\n MatSortModule,\n MatTableModule,\n WattIconComponent,\n WattCheckboxComponent,\n ],\n encapsulation: ViewEncapsulation.None,\n selector: 'watt-table',\n styleUrls: ['./watt-table.component.scss'],\n templateUrl: './watt-table.component.html',\n host: {\n '[class.watt-table-variant-zebra]': 'variant() === \"zebra\"',\n '[style.--watt-table-grid-template-columns]': 'sizing().join(\" \")',\n },\n})\nexport class WattTableComponent<T> {\n /**\n * The table's source of data. Property should not be changed after\n * initialization, instead update the data on the instance itself.\n */\n readonly dataSource = input.required<IWattTableDataSource<T>>();\n\n /**\n * Column definition record with keys representing the column identifiers\n * and values being the column configuration. The order of the columns\n * is determined by the property order, but can be overruled by the\n * `displayedColumns` input.\n */\n readonly columns = input<WattTableColumnDef<T>>({});\n\n /**\n * Used for hiding or reordering columns defined in the `columns` input.\n */\n readonly displayedColumns = input<string[]>();\n\n /**\n * Used for disabling the table. This will disable all user interaction\n */\n readonly disabled = input(false);\n\n /**\n * Provide a description of the table for visually impaired users.\n */\n readonly description = input('');\n\n /**\n * If set to `true`, the table will show a loading indicator\n * when there is no data.\n */\n readonly loading = input(false);\n\n /**\n * If true the footer will be sticky\n */\n readonly stickyFooter = input(false);\n\n /**\n * Optional callback for determining header text for columns that\n * do not have a static header text set in the column definition.\n * Useful for providing translations of column headers.\n */\n readonly resolveHeader = input<(key: string) => string>();\n\n /**\n * Identifier for column that should be sorted initially.\n */\n readonly sortBy = input('');\n\n /**\n * The sort direction of the initially sorted column.\n */\n readonly sortDirection = input<SortDirection>('');\n\n /**\n * Whether to allow the user to clear the sort. Defaults to `true`.\n */\n readonly sortClear = input(true);\n\n /**\n * Optional function to determine CSS class(es) for each row.\n */\n readonly rowClass = input<(row: T) => string | string[]>();\n\n /**\n * Whether the table should include a checkbox column for row selection.\n */\n readonly selectable = input(false);\n\n /**\n * Sets the selected rows. Only applicable when selectable is `true`.\n */\n readonly selection = model<T[]>([]);\n\n /**\n * Set to true to disable row hover highlight.\n */\n readonly suppressRowHoverHighlight = input(false);\n\n /**\n * Highlights the currently active row.\n */\n readonly activeRow = input<T>();\n\n /**\n * Custom comparator function to determine if two rows are equal.\n *\n * @remarks\n * The default behavior for determining the active row is to compare\n * the two row objects using strict equality check. This is sufficient\n * as long as the instances remain the same, which may not be the case\n * if row data is recreated or rebuilt from serialization.\n */\n readonly activeRowComparator = input<(currentRow: T, activeRow: T) => boolean>();\n\n /**\n * If set to `true`, the column headers will not be shown. Default is `false`.\n */\n readonly hideColumnHeaders = input(false);\n\n /**\n * Choose from a predefined set of display variants.\n */\n readonly variant = input<'zebra'>();\n\n /**\n * Array of rows that are currently expanded.\n */\n readonly expanded = model<T[]>([]);\n\n /**\n * Optional function for uniquely identifying rows.\n */\n readonly trackBy = input<TrackByFunction<T> | keyof T>();\n\n /**\n * @ignore\n * The `observed` boolean from the `Subject` is used to determine if a row is\n * clickable or not. This is available on `EventEmitter`, but not on `output`,\n * which is why this workaround is used.\n */\n protected rowClick$ = new Subject<T>();\n\n /**\n * Emits whenever a row is clicked.\n */\n readonly rowClick = outputFromObservable(this.rowClick$);\n\n /**\n * Event emitted when the user changes the active sort or sort direction.\n */\n readonly sortChange = output<Sort>();\n\n // Queries\n protected cells = contentChildren(WattTableCellDirective<T>);\n protected toolbar = contentChild(WattTableToolbarDirective<T>);\n protected sort = viewChild(MatSort);\n\n // Enables animation for expanding/collapsing cells\n protected tableCellElements = viewChildren<ElementRef<HTMLTableCellElement>>('td');\n protected animationEffect = animateExpandableCells(this.tableCellElements, this.expanded);\n\n // Selectable\n protected filterSelectionBy = (rows: T[]) => rows.filter((row) => this.selection().includes(row));\n protected getSelectionState = () => {\n const filteredData = this.dataSource().filteredData;\n const filteredSelection = this.filterSelectionBy(filteredData);\n if (!filteredSelection.length) return false;\n return filteredSelection.length === this.dataSource().filteredData.length ? true : null;\n };\n\n // Unique names for special columns\n protected checkboxColumn = '__checkboxColumn__';\n protected expandableColumn = '__expandableColumn__';\n\n protected hasFooter = computed(() => Object.values(this.columns()).some((c) => c.footer));\n protected isExpandable = computed(() => Object.values(this.columns()).some((c) => c.expandable));\n protected renderedColumns = computed(() => {\n const columns = this.displayedColumns() ?? Object.keys(this.columns());\n return [\n ...(this.selectable() ? [this.checkboxColumn] : []),\n ...columns.filter((key) => !this.columns()[key].expandable),\n ...(this.isExpandable() ? [this.expandableColumn] : []),\n ...columns.filter((key) => this.columns()[key].expandable),\n ];\n });\n\n protected sizing = computed(() => {\n const columns = this.columns();\n return this.renderedColumns()\n .filter((key) => !columns[key]?.expandable)\n .map((key) => {\n switch (key) {\n case this.checkboxColumn:\n return 'var(--watt-space-xl)';\n case this.expandableColumn:\n return 'min-content';\n default:\n return columns[key]?.size ?? 'auto';\n }\n });\n });\n\n /** Try to get cell data for a specific `column` and `row`. */\n private getCellData = (column: WattTableColumn<T>, row: T) => {\n if (column.cell) return column.cell(row);\n return !column.accessor\n ? ''\n : typeof column.accessor === 'function'\n ? column.accessor(row)\n : row[column.accessor];\n };\n\n protected getColumnTemplate = (column: WattTableColumn<T>) =>\n this.cells().find((item) => item.column() === column)?.templateRef;\n\n protected getColumnHeader = (column: KeyValue<string, WattTableColumn<T>>) => {\n if (typeof column.value.header === 'string') return column.value.header;\n const cell = this.cells().find((item) => item.column() === column.value);\n return cell?.header() ?? this.resolveHeader()?.(column.key) ?? column.key;\n };\n\n protected getColumnCell = (column: WattTableColumn<T>, row: T) => {\n const cell = this.getCellData(column, row);\n if (cell === undefined || cell === null) return '—';\n if (cell instanceof Date) return wattFormatDate(cell);\n return cell;\n };\n\n protected getRowKey = (index: number, row: T) => {\n const trackBy = this.trackBy();\n if (typeof trackBy === 'string') return row[trackBy];\n if (typeof trackBy === 'function') return trackBy(index, row);\n return this.dataSource().data.indexOf(row);\n };\n\n protected isActiveRow = (row: T) => {\n const activeRow = this.activeRow();\n const activeRowComparator = this.activeRowComparator();\n if (!activeRow) return false;\n return activeRowComparator ? activeRowComparator(row, activeRow) : row === activeRow;\n };\n\n protected getRowClass = (row: T): string => {\n const rowClass = this.rowClass();\n if (!rowClass) return '';\n const result = rowClass(row);\n return Array.isArray(result) ? result.join(' ') : result;\n };\n\n protected onRowClick = (row: T) => {\n if (this.disabled() || window.getSelection()?.toString() !== '') return;\n if (this.isExpandable()) {\n this.expanded.update((rows) =>\n rows.includes(row) ? rows.filter((r) => r != row) : [...rows, row]\n );\n }\n\n this.rowClick$.next(row);\n };\n\n constructor() {\n effect(() => {\n const dataSource = this.dataSource();\n dataSource.sort = this.sort();\n if (!(dataSource instanceof WattTableDataSource)) return;\n dataSource.sortingDataAccessor = (row: T, sortHeaderId: string) => {\n const column = this.columns()[sortHeaderId];\n const value = this.getCellData(column, row);\n if (typeof value === 'string') return value.toLowerCase(); // case insensitive sorting\n if (value instanceof Date) return value.getTime();\n return value as number;\n };\n });\n }\n\n /**\n * Clears the selection, emitting `selectionChange` if `selection` was not empty.\n */\n clearSelection = () => this.selection.update((s) => (!s.length ? s : []));\n\n /**\n * Toggles the selection of a row.\n */\n toggleSelection = (row: T) =>\n this.selection.update((s) => (s.includes(row) ? s.filter((r) => r !== row) : s.concat(row)));\n}\n\nexport const WATT_TABLE = [WattTableComponent, WattTableCellDirective, WattTableToolbarDirective];\n","<!--\n@license\nCopyright 2020 Energinet DataHub A/S\n\nLicensed under the Apache License, Version 2.0 (the \"License2\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n-->\n<table\n mat-table\n matSort\n role=\"treegrid\"\n [class]=\"{ 'watt-table-has-selection': getSelectionState() !== false }\"\n [matSortActive]=\"sortBy()\"\n [matSortDirection]=\"sortDirection()\"\n [matSortDisableClear]=\"!sortClear()\"\n [dataSource]=\"dataSource()\"\n [attr.aria-label]=\"description()\"\n (matSortChange)=\"sortChange.emit($event)\"\n>\n @if (selectable()) {\n <ng-container [matColumnDef]=\"checkboxColumn\" [sticky]=\"true\">\n <th mat-header-cell *matHeaderCellDef class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"getSelectionState()\"\n (ngModelChange)=\"$event ? selection.set(dataSource().filteredData) : clearSelection()\"\n />\n </th>\n <td mat-cell *matCellDef=\"let row\" class=\"watt-table-checkbox-cell\">\n <watt-checkbox\n [ngModel]=\"selection().includes(row)\"\n (ngModelChange)=\"toggleSelection(row)\"\n (click)=\"$event.stopPropagation()\"\n />\n </td>\n </ng-container>\n }\n\n <ng-container [matColumnDef]=\"expandableColumn\">\n <th mat-header-cell *matHeaderCellDef></th>\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n (click)=\"onRowClick(row)\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n >\n <watt-icon name=\"right\" size=\"xs\" />\n </td>\n </ng-container>\n\n @for (column of columns() | keyvalue; track column.key) {\n <ng-container [matColumnDef]=\"column.key\" [stickyEnd]=\"column.value.stickyEnd?.()\">\n <th\n mat-header-cell\n *matHeaderCellDef\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{\n column.value.headerCellClass\n }}\"\n >\n @if (column.value.helperAction; as action) {\n <watt-icon name=\"help\" (click)=\"action()\" />\n }\n\n <div\n class=\"watt-table-header-cell\"\n mat-sort-header\n [arrowPosition]=\"column.value.align === 'right' ? 'before' : 'after'\"\n [disabled]=\"!column.value.accessor || column.value.sort === false\"\n >\n {{ getColumnHeader(column) }}\n @if (column.value.tooltip; as tooltip) {\n <watt-icon [title]=\"tooltip\" name=\"info\" state=\"default\" />\n }\n </div>\n </th>\n\n <td\n #td\n mat-cell\n *matCellDef=\"let row; let index = index\"\n [attr.data-key]=\"getRowKey(index, row)\"\n [attr.data-row-index]=\"index\"\n [class.watt-table-cell--expanded]=\"expanded().includes(row)\"\n [class.watt-table-cell--expandable]=\"column.value.expandable\"\n class=\"watt-table-align-{{ column.value.align ?? 'left' }} {{ column.value.dataCellClass }}\"\n (click)=\"!column.value.expandable && onRowClick(row)\"\n >\n @if (isExpandable()) {\n @defer (when !column.value.expandable || expanded().includes(row)) {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n } @else {\n @if (getColumnTemplate(column.value); as template) {\n <div class=\"watt-table-cell-wrapper\">\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: row, index }\" />\n </div>\n } @else {\n {{ getColumnCell(column.value, row) }}\n }\n }\n </td>\n\n @if (hasFooter()) {\n <td\n mat-footer-cell\n *matFooterCellDef\n class=\"{{ column.value.footer?.class }} watt-table-align-{{\n column.value.align ?? 'left'\n }} \"\n >\n {{ column.value.footer?.value?.() }}\n </td>\n }\n </ng-container>\n }\n\n <ng-container matColumnDef=\"spacer\">\n <td class=\"watt-table-footer-spacer\" mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n @if (!hideColumnHeaders()) {\n <tr mat-header-row *matHeaderRowDef=\"renderedColumns()\"></tr>\n }\n <tr\n mat-row\n *matRowDef=\"let row; columns: renderedColumns()\"\n [attr.aria-selected]=\"row === activeRow()\"\n [class]=\"getRowClass(row)\"\n [class]=\"{\n 'watt-table-highlight-row': !disabled() && !suppressRowHoverHighlight(),\n 'watt-table-clickable-row': !disabled() && rowClick$.observed,\n 'watt-table-active-row': isActiveRow(row),\n }\"\n ></tr>\n\n @if (toolbar()) {\n <tr mat-footer-row *matFooterRowDef=\"['spacer']\"></tr>\n }\n\n @if (hasFooter()) {\n <tr\n mat-footer-row\n [class.watt-table-hide-footer]=\"loading() || dataSource().filteredData.length === 0\"\n *matFooterRowDef=\"renderedColumns(); sticky: stickyFooter()\"\n ></tr>\n }\n\n <ng-container *matNoDataRow>\n @if (loading()) {\n @for (i of [1, 2, 3]; track i) {\n <tr class=\"mat-mdc-row\">\n @for (_ of renderedColumns(); track _; let i = $index) {\n <td class=\"mat-mdc-cell\" [class.watt-table-loading-cell]=\"i > 0 || !selectable()\"></td>\n }\n </tr>\n }\n }\n </ng-container>\n</table>\n\n@if (toolbar(); as toolbar) {\n <div class=\"watt-table-toolbar\" role=\"toolbar\">\n <ng-container\n *ngTemplateOutlet=\"\n toolbar.templateRef;\n context: { $implicit: filterSelectionBy(dataSource().filteredData) }\n \"\n />\n </div>\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 { IWattTableDataSource, WattTableDataSource, dataSource } from './watt-table-data-source';\nexport {\n type WattTableColumn,\n type WattTableColumnDef,\n WattTableComponent,\n WattTableCellDirective,\n WattTableToolbarDirective,\n WATT_TABLE,\n} from './watt-table.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAiCA;;AAEG;AACG,MAAO,mBACX,SAAQ,kBAAqB,CAAA;AAG7B,IAAA,WAAA,CACE,WAAiB,EACjB,MAAA,GAA6C,EAAE,qBAAqB,EAAE,KAAK,EAAE,EAAA;QAE7E,KAAK,CAAC,WAAW,CAAC;QAElB,IAAI,MAAM,CAAC,qBAAqB;AAC9B,YAAA,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAS,KAAS;AACjC,gBAAA,OAAO,IAAI;AACb,YAAA,CAAC;IACL;AAEA,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM;IACzB;AACD;AAED;AACO,MAAM,UAAU,GAAG,CAAI,WAAsB,KAAI;AACtD,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,gDAAC;AAClC,IAAA,MAAM,UAAU,GAAG,IAAI,mBAAmB,EAAK;IAC/C,MAAM,CAAC,MAAK;AACV,QAAA,UAAU,CAAC,IAAI,GAAG,IAAI,EAAE;AAC1B,IAAA,CAAC,CAAC;AACF,IAAA,OAAO,UAAU;AACnB;;ACjEA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAWO,MAAM,sBAAsB,GAAG,CACpC,QAA6D,EAC7D,OAAwB,KAC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EAAA,CAAA,EAAA,IAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAClC,OAAO,+EAG2C,IAAI,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;AAiI5E,MAAM,UAAU,GAAG,CAAC,kBAAkB,EAAE,sBAAsB,EAAE,yBAAyB;;AEnfhG;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, NgZone, Injectable, ElementRef,
|
|
2
|
+
import { inject, NgZone, Injectable, ElementRef, output, Directive } from '@angular/core';
|
|
3
3
|
import { Subject, filter, finalize } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
//#region License
|
|
@@ -92,15 +92,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
92
92
|
* `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`
|
|
93
93
|
*/
|
|
94
94
|
class WattResizeObserverDirective {
|
|
95
|
-
|
|
95
|
+
elementRef = inject(ElementRef);
|
|
96
96
|
resizeObserverService = inject(WattResizeObserverService);
|
|
97
97
|
// The `resize` event only natively exists on `window`.
|
|
98
98
|
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
99
|
-
resize =
|
|
99
|
+
resize = output();
|
|
100
100
|
subscription;
|
|
101
101
|
constructor() {
|
|
102
102
|
this.subscription = this.resizeObserverService
|
|
103
|
-
.observe(this.
|
|
103
|
+
.observe(this.elementRef.nativeElement)
|
|
104
104
|
.subscribe((entry) => this.resize.emit(entry));
|
|
105
105
|
}
|
|
106
106
|
ngOnDestroy() {
|
|
@@ -112,9 +112,7 @@ class WattResizeObserverDirective {
|
|
|
112
112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: WattResizeObserverDirective, decorators: [{
|
|
113
113
|
type: Directive,
|
|
114
114
|
args: [{ selector: '[wattResizeObserver]' }]
|
|
115
|
-
}], ctorParameters: () => [], propDecorators: { resize: [{
|
|
116
|
-
type: Output
|
|
117
|
-
}] } });
|
|
115
|
+
}], ctorParameters: () => [], propDecorators: { resize: [{ type: i0.Output, args: ["resize"] }] } });
|
|
118
116
|
|
|
119
117
|
//#region License
|
|
120
118
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"energinet-watt-utils-resize-observer.mjs","sources":["../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts","../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts","../../../libs/watt/package/utils/resize-observer/index.ts","../../../libs/watt/package/utils/resize-observer/energinet-watt-utils-resize-observer.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable, NgZone, inject } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes to an elements size. Typically used by\n * the `WattResizeObserverDirective`, but can also be imported directly.\n *\n * Usage:\n * `import { WattResizeObserverService } from '@energinet/watt/resize-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattResizeObserverService {\n private readonly ngZone = inject(NgZone);\n\n private resizeObserver?: ResizeObserver;\n private entrySubject = new Subject<ResizeObserverEntry>();\n\n constructor() {\n if (window.ResizeObserver) {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Resize callback is running outside of Angular zone\n this.ngZone.run(() => {\n /**\n * Ensure that the function is executed only once per frame, and avoid:\n * \"Error: ResizeObserver loop limit exceeded\"\n */\n requestAnimationFrame(() => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n });\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that\n * emits whenever that element changes size. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.resizeObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.resizeObserver?.unobserve(element))\n );\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, ElementRef,
|
|
1
|
+
{"version":3,"file":"energinet-watt-utils-resize-observer.mjs","sources":["../../../libs/watt/package/utils/resize-observer/watt-resize-observer.service.ts","../../../libs/watt/package/utils/resize-observer/watt-resize-observer.directive.ts","../../../libs/watt/package/utils/resize-observer/index.ts","../../../libs/watt/package/utils/resize-observer/energinet-watt-utils-resize-observer.ts"],"sourcesContent":["//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Injectable, NgZone, inject } from '@angular/core';\nimport { filter, finalize, Subject } from 'rxjs';\n\n/**\n * Service for observing changes to an elements size. Typically used by\n * the `WattResizeObserverDirective`, but can also be imported directly.\n *\n * Usage:\n * `import { WattResizeObserverService } from '@energinet/watt/resize-observer';`\n */\n@Injectable({ providedIn: 'root' })\nexport class WattResizeObserverService {\n private readonly ngZone = inject(NgZone);\n\n private resizeObserver?: ResizeObserver;\n private entrySubject = new Subject<ResizeObserverEntry>();\n\n constructor() {\n if (window.ResizeObserver) {\n this.resizeObserver = new ResizeObserver((entries) => {\n // Resize callback is running outside of Angular zone\n this.ngZone.run(() => {\n /**\n * Ensure that the function is executed only once per frame, and avoid:\n * \"Error: ResizeObserver loop limit exceeded\"\n */\n requestAnimationFrame(() => {\n for (const entry of entries) {\n this.entrySubject.next(entry);\n }\n });\n });\n });\n }\n }\n\n /**\n * Add an element to be observed, returning an observable that\n * emits whenever that element changes size. Element will\n * automatically be unobserved when the observable is unsubscribed.\n */\n observe(element: Element) {\n this.resizeObserver?.observe(element);\n return this.entrySubject.asObservable().pipe(\n filter((entry) => entry.target === element),\n finalize(() => this.resizeObserver?.unobserve(element))\n );\n }\n}\n","//#region License\n/**\n * @license\n * Copyright 2020 Energinet DataHub A/S\n *\n * Licensed under the Apache License, Version 2.0 (the \"License2\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//#endregion\nimport { Directive, ElementRef, OnDestroy, inject, output } from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { WattResizeObserverService } from './watt-resize-observer.service';\n\n/**\n * A directive for subscribing to changes to the size of an element.\n * The `resize` event emits initially and then everytime the element is resized.\n *\n * Usage:\n * `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`\n */\n@Directive({ selector: '[wattResizeObserver]' })\nexport class WattResizeObserverDirective implements OnDestroy {\n private elementRef = inject(ElementRef);\n private resizeObserverService = inject(WattResizeObserverService);\n\n // The `resize` event only natively exists on `window`.\n // eslint-disable-next-line @angular-eslint/no-output-native\n resize = output<ResizeObserverEntry>();\n\n private subscription: Subscription;\n\n constructor() {\n this.subscription = this.resizeObserverService\n .observe(this.elementRef.nativeElement)\n .subscribe((entry) => this.resize.emit(entry));\n }\n\n public ngOnDestroy(): void {\n this.subscription.unsubscribe();\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 { WattResizeObserverDirective } from './watt-resize-observer.directive';\nexport { WattResizeObserverService } from './watt-resize-observer.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAAA;AACA;;;;;;;;;;;;;;;AAeG;AACH;AAIA;;;;;;AAMG;MAEU,yBAAyB,CAAA;AACnB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAEhC,IAAA,cAAc;AACd,IAAA,YAAY,GAAG,IAAI,OAAO,EAAuB;AAEzD,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,MAAM,CAAC,cAAc,EAAE;YACzB,IAAI,CAAC,cAAc,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAI;;AAEnD,gBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,MAAK;AACnB;;;AAGG;oBACH,qBA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G,IAAI,CAAC;AACtB,aAAA,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa;AACrC,aAAA,SAAS,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAClD;IAEO,WAAW,GAAA;AAChB,QAAA,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE;IACjC;wGAlBW,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA3B,2BAA2B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,OAAA,EAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAA3B,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBADvC,SAAS;mBAAC,EAAE,QAAQ,EAAE,sBAAsB,EAAE;;;AC9B/C;AACA;;;;;;;;;;;;;;;AAeG;AACH;;ACjBA;;AAEG;;;;"}
|
package/icon/index.d.ts
CHANGED
|
@@ -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" | "
|
|
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
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
|
-
|
|
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 };
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2020 Energinet DataHub A/S
|
|
8
|
-
*
|
|
9
|
-
* Licensed under the Apache License, Version 2.0 (the "License2");
|
|
10
|
-
* you may not use this file except in compliance with the License.
|
|
11
|
-
* You may obtain a copy of the License at
|
|
12
|
-
*
|
|
13
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
-
*
|
|
15
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
-
* See the License for the specific language governing permissions and
|
|
19
|
-
* limitations under the License.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
5
|
/**
|
|
23
6
|
* A directive for subscribing to changes to the size of an element.
|
|
24
7
|
* The `resize` event emits initially and then everytime the element is resized.
|
|
@@ -27,9 +10,9 @@ import * as rxjs from 'rxjs';
|
|
|
27
10
|
* `import { WattResizeObserverDirective } from '@energinet/watt/resize-observer';`
|
|
28
11
|
*/
|
|
29
12
|
declare class WattResizeObserverDirective implements OnDestroy {
|
|
30
|
-
private
|
|
13
|
+
private elementRef;
|
|
31
14
|
private resizeObserverService;
|
|
32
|
-
resize:
|
|
15
|
+
resize: i0.OutputEmitterRef<ResizeObserverEntry>;
|
|
33
16
|
private subscription;
|
|
34
17
|
constructor();
|
|
35
18
|
ngOnDestroy(): void;
|