@sebgroup/green-angular 6.0.4 → 6.1.0
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/esm2022/src/v-angular/drag-drop/drag-drop.component.mjs +1 -1
- package/esm2022/src/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +63 -7
- package/esm2022/src/v-angular/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/src/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +4 -4
- package/esm2022/src/v-angular/i18n/i18n.json +1 -0
- package/esm2022/src/v-angular/input/input.component.mjs +2 -2
- package/esm2022/src/v-angular/modal/dialog/dialog.component.mjs +9 -3
- package/esm2022/src/v-angular/modal/fold-out/fold-out.component.mjs +7 -3
- package/esm2022/src/v-angular/modal/modal.types.mjs +1 -1
- package/esm2022/src/v-angular/table/table.component.mjs +16 -3
- package/esm2022/src/v-angular/textarea/textarea.component.mjs +2 -2
- package/esm2022/src/v-angular/toast/toast.component.mjs +3 -3
- package/esm2022/v-angular/drag-drop/drag-drop.component.mjs +1 -1
- package/esm2022/v-angular/dropdown/dropdown-list/dropdown-list.component.mjs +63 -7
- package/esm2022/v-angular/dropdown/dropdown.component.mjs +3 -3
- package/esm2022/v-angular/dropdown/typeahead/typeahead-dropdown-list/typeahead-dropdown-list.component.mjs +4 -4
- package/esm2022/v-angular/i18n/i18n.json +1 -0
- package/esm2022/v-angular/input/input.component.mjs +2 -2
- package/esm2022/v-angular/modal/dialog/dialog.component.mjs +9 -3
- package/esm2022/v-angular/modal/fold-out/fold-out.component.mjs +7 -3
- package/esm2022/v-angular/modal/modal.types.mjs +1 -1
- package/esm2022/v-angular/table/table.component.mjs +16 -3
- package/esm2022/v-angular/textarea/textarea.component.mjs +2 -2
- package/esm2022/v-angular/toast/toast.component.mjs +3 -3
- package/fesm2022/sebgroup-green-angular-src-v-angular-drag-drop.mjs +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-drag-drop.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs +66 -10
- package/fesm2022/sebgroup-green-angular-src-v-angular-dropdown.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs +2 -0
- package/fesm2022/sebgroup-green-angular-src-v-angular-i18n.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-input.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs +14 -4
- package/fesm2022/sebgroup-green-angular-src-v-angular-modal.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs +15 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-table.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-textarea.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-src-v-angular-toast.mjs +2 -2
- package/fesm2022/sebgroup-green-angular-src-v-angular-toast.mjs.map +1 -1
- package/fesm2022/sebgroup-green-angular-v-angular.mjs +104 -23
- package/fesm2022/sebgroup-green-angular-v-angular.mjs.map +1 -1
- package/package.json +8 -8
- package/src/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +19 -4
- package/src/v-angular/modal/dialog/dialog.component.d.ts +2 -1
- package/src/v-angular/modal/fold-out/fold-out.component.d.ts +3 -1
- package/src/v-angular/modal/modal.types.d.ts +1 -0
- package/src/v-angular/table/table.component.d.ts +6 -1
- package/v-angular/dropdown/dropdown-list/dropdown-list.component.d.ts +19 -4
- package/v-angular/modal/dialog/dialog.component.d.ts +2 -1
- package/v-angular/modal/fold-out/fold-out.component.d.ts +3 -1
- package/v-angular/modal/modal.types.d.ts +1 -0
- package/v-angular/table/table.component.d.ts +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-table.mjs","sources":["../../../../libs/angular/src/v-angular/table/table.directive.ts","../../../../libs/angular/src/v-angular/table/table.tools.ts","../../../../libs/angular/src/v-angular/table/tr-thook.pipe.ts","../../../../libs/angular/src/v-angular/table/table.component.ts","../../../../libs/angular/src/v-angular/table/table.component.html","../../../../libs/angular/src/v-angular/table/table.module.ts","../../../../libs/angular/src/v-angular/table/index.ts","../../../../libs/angular/src/v-angular/table/sebgroup-green-angular-src-v-angular-table.ts"],"sourcesContent":["import { Directive, HostBinding, Input, TemplateRef } from '@angular/core'\n\nconst enum ColumnCSSClass {\n Primary = 'gds-table__primary-col',\n Sortable = 'gds-table__sortable-col',\n Numeric = 'gds-table__numeric-col',\n Negative = 'gds-table__negative-col',\n Ascending = 'gds-table__sortable-col--asc',\n Descending = 'gds-table__sortable-col--desc',\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[columnType]',\n})\nexport class TableDirective {\n @Input() columnType: 'numeric' | 'text' | undefined = 'text'\n @Input() sortable?: boolean\n @Input() sortOrder?: 'desc' | 'asc'\n @Input() value: any\n\n @HostBinding('attr.data-thook') @Input() thook: string | null | undefined =\n 'table'\n\n @HostBinding('class.' + ColumnCSSClass.Numeric) get numericColumn(): boolean {\n return this.columnType === 'numeric'\n }\n\n @HostBinding('class.' + ColumnCSSClass.Sortable) get isSortable(): boolean {\n return !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Ascending)\n get orderAscending(): boolean {\n return this.sortOrder === 'asc' && !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Descending)\n get orderDescending(): boolean {\n return this.sortOrder === 'desc' && !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Negative)\n get negativeValue(): boolean {\n if (!isNaN(this.value)) return +this.value < 0\n return false\n }\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableColumn]',\n})\nexport class TableTemplateDirective<K = string> {\n @Input() tableColumn!: K\n @Input() tableColumnTarget?: 'th' | 'td' | 'both' = 'both'\n\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableFooter]',\n})\nexport class TableFooterTemplateDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableAppendableRows]',\n})\nexport class TableAppendableRowsTemplateDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n","const getKeyValue = <T, K extends keyof T>(obj: T, key: K): T[K] => obj[key]\n\nexport const pick = (\n propertyArray: Array<string>,\n object: { [key: string]: unknown },\n): object => {\n if (object instanceof Object) {\n return propertyArray.reduce(\n (acc: object, curr: string) => ({\n ...acc,\n [curr]: getKeyValue(object, curr),\n }),\n {},\n )\n }\n throw Error('The value for argument \"object\" must be an object')\n}\n\nexport const orderByDescending = <T>(\n property: keyof T | string,\n): ((a: any, b: any) => number) => {\n return (a: any, b: any) => {\n if (a[property] > b[property]) return -1\n if (a[property] < b[property]) return 1\n return 0\n }\n}\n\nexport const orderByAscending = <T>(\n property: keyof T | string,\n): ((a: any, b: any) => number) => {\n return (a: any, b: any) => {\n if (a[property] < b[property]) return -1\n if (a[property] > b[property]) return 1\n return 0\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\n@Pipe({\n name: 'trThook',\n standalone: true,\n})\nexport class TrThookPipe implements PipeTransform {\n transform<V>(\n value: V,\n index: number,\n thookFn?: (rowData: V) => string,\n ): string {\n // call thook fn to set thook for active row\n if (thookFn != null) {\n return thookFn(value)\n }\n\n // default thook\n return `table-row-${index}`\n }\n}\n","import {\n AfterContentInit,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n} from '@angular/core'\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms'\nimport { Subscription } from 'rxjs'\nimport { debounceTime, map } from 'rxjs/operators'\n\nimport {\n TableAppendableRowsTemplateDirective,\n TableFooterTemplateDirective,\n TableTemplateDirective,\n} from './table.directive'\nimport {\n ariaLabelsOrderBy,\n OrderBy,\n TableColumn,\n TableRow,\n} from './table.models'\nimport { orderByAscending, orderByDescending, pick } from './table.tools'\n\nlet staticInitId = 0\n\nfunction objectFromEntries(entryMap: Map<any, any>): { [key: string]: any } {\n const fromEntries: { [key: string]: any } = {}\n for (const [key, value] of entryMap) {\n fromEntries[key] = value\n }\n return fromEntries\n}\n\n/**\n * A table component with built-in sorting and selecting functionality.\n * By default, table cells (i.e. `<td>` elements) and table headers (i.e. `<th>` elements) are populated with text only values.\n *\n * To customize the contents of either the `<td>` or `<th>` elements (like adding color, icons, form fields, extra padding etc.), provide\n * the customized content within a `<ng-template>`-tag, and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableColumn`-attribute to the `<ng-template>`-element, and set the value to the specific column property.\n * Set `tableColumnTarget` to either `th`, `td` or `both` (default) depending on target element type.\n * The entire row from the `@Input() tableData` is available from the context `$implicit` variable.\n *\n * @example\n * <!-- for table cells i.e. td-elements -->\n * <ng-template tableColumn=\"status\" tableColumnTarget=\"td\" let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <!-- my custom status element -->\n * </ng-template>\n *\n * @example\n * <!-- for table headers i.e. th-elements -->\n * <ng-template tableColumn=\"status\" tableColumnTarget=\"th\" let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <!-- my custom status element -->\n * </ng-template>\n *\n * It is possible to add custom rows that are appended below data row. Use `<ng-template>`-tag and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableAppendableRows`-attribute to the `<ng-template>`-element. Any `tr` elements that exist within `<ng-template tableAppendableRows>` and `</ng-template>` tags will be put below data row's `tr` element in the table.\n *\n * @example\n * <!-- custom appended rows -->\n * <ng-template tableAppendableRows let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <tr>\n * <!-- first row's columns -->\n * </tr>\n * <!-- more rows if needed -->\n * </ng-template>\n *\n * If custom styling is needed for data row that has appended rows, you can use data attribute `data-hasrowspan` to distinguish it from data row without appended rows.\n * You can pass your own custom method with conditional logic to define what value will be passed to data-hasrowspan.\n * In addition, hasRowSpan function accepts item from `@Input() tableData` as argument which is of the same type as value passed to context `$implicit` variable.\n * IMPORTANT: use arrow function style for defining function inside component, i.e. `hasRowSpan = (value) => output;`. If regular function will be defined, i.e. `hasRowSpan(value) { return output; }`, binding will not work.\n *\n * @example\n * <!-- inside component\n * class CustomComponent {\n * customHasRowSpanFunction = (item: CustomDataType) => item.appendedRowsData.length > 0 ? true : false;\n * }\n * -->\n * <!-- inside stylesheets\n * [data-hasrowspan=\"true\"] {\n * color: blue;\n * }\n * .appended-row {\n * color: blue;\n * }\n * -->\n * <nggv-table [hasRowSpan]=\"customHasRowSpanFunction\">\n * <!-- custom appended rows -->\n * <ng-template tableAppendableRows let-appendedRowsData=\"$implicit.appendedRowsData\">\n * <tr *ngFor=\"let appendedRowItem of appendedRowsData\" class=\"appended-row\">\n * <td>{{ appendedRowItem }}</td>\n * <!-- other row's columns -->\n * </tr>\n * </ng-template>\n * </nggv-table>\n *\n * In addition, it is possible to add footer for the table. Similarly to adding custom columns, use `<ng-template>`-tag and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableFooter`-attribute to the `<ng-template>`-element. Any elements that exist within `<ng-template tableFooter>` and `</ng-template>` tags will be put to tfoot element inside the table.\n *\n * @example\n * <!-- for table footer i.e. tfoot-element -->\n * <ng-template tableFooter>\n * <tr>\n * <!-- first row's columns -->\n * </tr>\n * <!-- more rows if needed -->\n * </ng-template>\n *\n */\n@Component({\n selector: 'nggv-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n})\nexport class TableComponent<T extends TableRow>\n implements OnInit, OnChanges, AfterContentInit, OnDestroy {\n /**\n * @internal\n * Custom templates defined in the html.\n */\n @ContentChildren(TableTemplateDirective, { descendants: true })\n customTemplates!: QueryList<TableTemplateDirective<keyof T>>\n\n /**\n * @internal\n * Custom appended rows template defined in the html.\n */\n @ContentChild(TableAppendableRowsTemplateDirective)\n appendedRowsTemplate!: TableAppendableRowsTemplateDirective\n\n /**\n * @internal\n * Custom footer template defined in the html.\n */\n @ContentChild(TableFooterTemplateDirective)\n customFooterTemplate!: TableFooterTemplateDirective\n\n /** Emits the table row that was clicked. Works on all columns if not preventDefaultEmit is set for that column. */\n @Output() ngvRowClick = new EventEmitter<T | any>()\n\n /**\n * Emits currently selected and deselected items in the table as key-value pairs.\n * Uses each item`s itemId as key, and a boolean value to describe selected status.\n */\n @Output() ngvRowSelect = new EventEmitter<string[]>()\n\n /**\n * Emits event to signal that the table should be reordered.\n */\n @Output() ngvOrderBy = new EventEmitter<OrderBy<T>>()\n\n /**\n * An array of items describing how the table header should be rendered,\n * together with instructions for how each row should be displayed in that column.\n */\n @Input() tableColumns!: TableColumn<T>[]\n\n /** Data array to display data in the table. Each item <T> in the array represents a row in the table. */\n @Input() tableData!: T[]\n\n /**\n * Property name used to uniquely describe each item (i.e. row) in the data table.\n * Defaults to \\'id\\'.\n * Is required if selectable is true.\n */\n @Input() rowId = 'id'\n\n /**\n * Function's return value is used for data attribute \\'data-hasrowspan\\'.\n * If custom hasRowSpan function is not passed to the table,\n * then this function returns undefined value by default which results in \\'data-hasrowspan\\' attribute being omitted in html\n * (angular omits attributes that contain null or undefined value).\n * IMPORTANT: use arrow function style for defining function inside component, i.e. `hasRowSpan = (value) => output;`. If regular function will be defined, i.e. `hasRowSpan(value) { return output; }`, binding will not work.\n */\n @Input() hasRowSpan: (item: T) => any = (_) => undefined\n\n /**\n * Used to enable/disable the left-side checkbox column.\n * Defaults to true.\n */\n @Input() selectable = true\n\n /**\n * Used to enable/disable expandable rows.\n * Defaults to false.\n */\n @Input() expandable = false\n\n /**\n * Property name used to describe the subItems in the data table.\n */\n @Input() subItemsProp = 'subItems'\n\n /**\n * Allow nggv-table to attempt sorting the data in the table. Not recommended if only a subset is loaded or if the dataset is very large.\n * Disabled by default.\n */\n @Input() allowLocalSort = false\n\n /** Special property used for selecting DOM elements during automated UI testing. */\n @Input() thook = 'table-select-all'\n\n /** Function to overwrite generated thook for each row. */\n @Input() trThookFn?: (item: T) => string\n\n /** Aria label for the checkbox in the table header */\n @Input() ariaLabelCheckboxTh?: string\n\n /** Aria label for the checkbox in the table header */\n @Input() ariaLabelCheckboxTr?: string\n\n /** Aria labels for sorting in the table header */\n @Input() ariaLabelsOrderBy?: ariaLabelsOrderBy\n\n /**\n * @internal\n * Internal data structure used to keep track of added content templates used in td elements.\n */\n customRowTemplates = new Map<keyof T, TemplateRef<any>>()\n\n /**\n * @internal\n * Internal data structure used to keep track of added content templates used in th elements.\n */\n customHeaderTemplates = new Map<keyof T, TemplateRef<any>>()\n\n /**\n * @internal\n * Internal data structure used to hold custom appended rows i.e. tr elements (rows).\n */\n appendedRowsTemplateRef!: TemplateRef<any>\n\n /**\n * @internal\n * Internal data structure used to hold tfoot element children i.e. tr elements (rows).\n */\n customFooterTemplateRef!: TemplateRef<any>\n\n /**\n * @internal\n * Incremental id.\n */\n initId!: number\n\n /**\n * @internal\n * FormGroup containing all row id\\'s as controls, and whether these are selected or not as values.\n */\n rowSelectors: UntypedFormGroup = new UntypedFormGroup({})\n\n /**\n * @internal\n * Master selector for selecting or deselecting all row selectors.\n */\n groupSelector: UntypedFormControl = new UntypedFormControl(false)\n\n private selected: string[] = []\n private subs: Subscription[] = []\n\n ngOnChanges(changes: SimpleChanges) {\n // Update selectable or expandable rows if table data or settings change\n if (\n (this.selectable || this.expandable) && changes.tableData?.currentValue ||\n (changes.selectable?.currentValue || changes.expandable?.currentValue) && this.tableData\n ) {\n const wasChanged = this.registerSelectableRows(\n changes.tableData.currentValue,\n )\n if (wasChanged && !this.subs.length) {\n // first time this is run\n const groupSelectorSub = this.groupValueSubscription\n const rowSelectorSub = this.rowValueSubscription\n this.subs.push(groupSelectorSub, rowSelectorSub)\n } else if (wasChanged) {\n this.rowSelectors.updateValueAndValidity()\n }\n }\n\n // sort any incoming data\n if (\n this.allowLocalSort &&\n (changes.tableData?.currentValue || changes.tableColumns?.currentValue)\n ) {\n const orderedByColumn: TableColumn<T> | undefined =\n this.tableColumns?.find((el) => el.order !== undefined)\n if (orderedByColumn) this.sortItemsBy(orderedByColumn)\n }\n }\n\n ngOnInit(): void {\n this.initId = staticInitId++\n }\n\n ngAfterContentInit() {\n // if any custom templates were defined in the template\n if (this.customTemplates.length) {\n // for each template found\n this.customTemplates.map((tableTemplate) => {\n // if target is either 'td' or 'both'\n if (\n ['td', 'both'].includes(tableTemplate.tableColumnTarget as string)\n ) {\n // add to custom row templates\n this.customRowTemplates.set(\n tableTemplate.tableColumn,\n tableTemplate.templateRef,\n )\n }\n // if target is either 'th' or 'both'\n if (\n ['th', 'both'].includes(tableTemplate.tableColumnTarget as string)\n ) {\n // add to custom header templates\n this.customHeaderTemplates.set(\n tableTemplate.tableColumn,\n tableTemplate.templateRef,\n )\n }\n })\n }\n\n // if appended rows' template is defined in the template\n if (this.appendedRowsTemplate) {\n // set templateRef of appended rows' template to variable\n this.appendedRowsTemplateRef = this.appendedRowsTemplate.templateRef\n }\n\n // if custom footer template is defined in the template\n if (this.customFooterTemplate) {\n // set templateRef of table footer to variable\n this.customFooterTemplateRef = this.customFooterTemplate.templateRef\n }\n }\n\n ngOnDestroy() {\n this.subs.forEach((sub) => sub.unsubscribe())\n }\n\n /**\n * @internal\n * Returns a subscription to the master selector control that either selects or deselects all row controls.\n */\n get groupValueSubscription(): Subscription {\n return this.groupSelector.valueChanges.subscribe({\n next: (value: boolean) => {\n const selectMap = new Map(Object.entries(this.rowSelectorsValue))\n selectMap.forEach((_, key) => selectMap.set(key, value))\n const patchValue = objectFromEntries(selectMap)\n this.rowSelectors.patchValue(patchValue)\n },\n })\n }\n\n /**\n * @internal\n * Returns a subscription to all individual row selectors and update the master selector if all are selected.\n */\n get rowValueSubscription(): Subscription {\n return this.rowSelectors.valueChanges\n .pipe(\n debounceTime(0), // to limit the number of events and to wait for all sub controls to update\n map((val: { [key: string]: boolean }) => {\n // get a filtered array of keys for all rows that are selected\n const selected = Object.keys(val).filter((key) => {\n return val[key] === true && this.rowSelectors.get(key)?.enabled\n })\n // returns an object containing only the filtered keys\n return pick(selected, val)\n }),\n )\n .subscribe({\n next: (value: object) => {\n // the number of selected keys compared to the total number of keys available\n const numberOfSelected = Object.keys(value).length\n const allSelected: boolean =\n numberOfSelected > 0\n ? numberOfSelected === Object.keys(this.rowSelectorsValue).length\n : false\n // update the master selector control\n this.groupSelector.setValue(allSelected, { emitEvent: false })\n // update the array of currently selected id's\n this.selected = Object.keys(value)\n // and emit the updated value\n this.ngvRowSelect.emit(this.selected)\n },\n })\n }\n\n /**\n * @internal\n * Registers or disables row controls for new or removed rows.\n */\n registerSelectableRows(tableData: any[]): boolean {\n if (!tableData) return false\n // Array containing only the id's for each row\n const dataRowIds: string[] = tableData.map((data: any) => data[this.rowId])\n\n // Array containing the id's that have registered controls\n const currentIds: string[] = Object.keys(this.rowSelectorsValue)\n\n // Array containing all ids that lacks a corresponding control (i.e. new rows)\n const newIds: string[] = dataRowIds.filter(\n (id) => currentIds.indexOf(id) === -1,\n )\n\n // Array containing all ids that has a control but is no longer in the data set (i.e. removed rows)\n const removedIds: string[] = currentIds.filter(\n (id) => dataRowIds.indexOf(id) === -1,\n )\n\n // Register new controls for added rows\n if (newIds.length) {\n newIds.forEach((id) => {\n const ctrl = this.rowSelectors.registerControl(\n id,\n new UntypedFormControl(false),\n )\n if (ctrl.disabled) ctrl.enable()\n })\n }\n\n // Set already registered controls to disabled for removed rows\n if (removedIds.length)\n removedIds.forEach((id) => this.rowSelectors.get(id)?.disable())\n\n return newIds.length > 0 || removedIds.length > 0\n }\n\n /**\n * @internal\n * Returns all enabled values unless all rows are disabled.\n */\n get rowSelectorsValue(): any {\n return this.rowSelectors.enabled ? this.rowSelectors.value : {}\n }\n\n toggleSortOrderWithSpace(event: any, column: TableColumn<T>) {\n if (column.sortable) {\n event.preventDefault()\n this.toggleSortOrder(column)\n }\n }\n\n /**\n * @internal\n * Switches sorting order between ascending and descending order for a column.\n * @param column the column to sort rows after.\n */\n toggleSortOrder(column: TableColumn<T>) {\n // check if the table is already sorted by another column than the one provided\n const currentlyOrderedBy = this.tableColumns?.find(\n (el) => el !== column && el.order !== undefined,\n )\n if (currentlyOrderedBy) delete currentlyOrderedBy.order\n column.order = column.order === 'desc' ? 'asc' : 'desc'\n this.sortItemsBy(column)\n }\n\n /** If sortable, reorders the table data using the specified column as ordering attribute. */\n sortItemsBy(column: TableColumn<T>): TableRow[] | undefined {\n if (!column.sortable) return\n // emit re-order event\n this.ngvOrderBy.emit({ property: column.property, order: column.order })\n // if local sort is allowed, reorder data\n if (!this.allowLocalSort || !this.tableData) return\n return this.tableData.sort(\n column.order === 'desc'\n ? orderByDescending(column.property)\n : orderByAscending(column.property),\n )\n }\n\n /**\n * @internal\n * Emits row data for what row was clicked if defaultEmit is allowed.\n */\n propagateItemClick(item: any, preventDefaultEmit?: boolean) {\n if (!preventDefaultEmit) this.ngvRowClick.emit(item);\n\n if (this.expandable && item[this.subItemsProp]) {\n this.toggleRowToExpand(item[this.rowId]);\n }\n }\n\n getAriaLabel(column: TableColumn<T>): string | undefined {\n const sortOrder =\n column.order === 'asc'\n ? this.ariaLabelsOrderBy?.desc\n : this.ariaLabelsOrderBy?.asc\n if (!sortOrder) return // no aria labels defined\n return column.ariaLabelSortable?.replace('{{sortOrder}}', sortOrder)\n }\n\n private toggleRowToExpand(id: string): void {\n const row = this.rowSelectors.get(id)\n row?.setValue(!row.value)\n }\n}\n","<ng-template #sortableThTemplate let-column>\n <button class=\"sg-table-sort\" *transloco=\"let t\">\n <ng-template #thButtonTemplate>\n {{ t(column.label ?? '') }}\n </ng-template>\n <ng-container\n *ngIf=\"\n customHeaderTemplates.get(column.property) as thTemplate;\n else thButtonTemplate\n \"\n >\n <ng-template\n *ngTemplateOutlet=\"thTemplate || null; context: { $implicit: column }\"\n >\n </ng-template>\n </ng-container>\n </button>\n</ng-template>\n\n<ng-template #notSortableThTemplate let-column>\n <ng-template #defaultThTemplate>\n <ng-container *transloco=\"let t\">\n {{ t(column.label ?? '') }}\n </ng-container>\n </ng-template>\n <ng-container\n *ngIf=\"\n customHeaderTemplates.get(column.property) as thTemplate;\n else defaultThTemplate\n \"\n >\n <ng-template\n *ngTemplateOutlet=\"thTemplate || null; context: { $implicit: column }\"\n >\n </ng-template>\n </ng-container>\n</ng-template>\n<table class=\"gds-table\" *transloco=\"let t\">\n <!-- Table header -->\n <thead>\n <tr>\n <!-- Checkbox column for header -->\n <th *ngIf=\"selectable\" class=\"column__check\">\n <div class=\"gds-field-checkbox-wrap\">\n <label\n [attr.for]=\"'cb_header__' + initId\"\n class=\"form-control\"\n id=\"thead-checkbox\"\n >\n <input\n type=\"checkbox\"\n [formControl]=\"groupSelector\"\n [attr.aria-label]=\"ariaLabelCheckboxTh\"\n [attr.id]=\"'cb_header__' + initId\"\n [attr.data-thook]=\"thook\"\n />\n <i></i>\n </label>\n </div>\n </th>\n\n <!-- Other columns -->\n <th\n *ngFor=\"let column of tableColumns\"\n [columnType]=\"column.valueType\"\n [sortable]=\"column.sortable\"\n [sortOrder]=\"column.order\"\n [thook]=\"'column-header-' + !!column.property\"\n (click)=\"toggleSortOrder(column)\"\n (keydown.space)=\"toggleSortOrderWithSpace($event, column)\"\n [attr.aria-label]=\"getAriaLabel(column)\"\n [attr.aria-sort]=\"column.order + 'ending'\"\n >\n <ng-container *ngIf=\"column.sortable\">\n <ng-container\n *ngTemplateOutlet=\"\n sortableThTemplate;\n context: { $implicit: column, column: column }\n \"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <ng-container\n *ngTemplateOutlet=\"\n notSortableThTemplate;\n context: { $implicit: column, column: column }\n \"\n >\n </ng-container>\n </ng-container>\n </th>\n </tr>\n </thead>\n\n <!-- Table body -->\n <tbody [formGroup]=\"rowSelectors\">\n <ng-container *ngFor=\"let item of tableData; let i = index\">\n <tr\n [class.row__expand]=\"expandable\"\n [attr.data-thook]=\"item | trThook: i : trThookFn\"\n [attr.data-hasrowspan]=\"hasRowSpan(item)\"\n >\n <!-- Checkbox column for row -->\n <td *ngIf=\"selectable\" class=\"column__check\">\n <div class=\"gds-field-checkbox-wrap\">\n <label\n [attr.for]=\"'cb_row__' + initId + '_' + i\"\n class=\"form-control\"\n >\n <input\n *ngIf=\"rowSelectors.get(item[rowId])\"\n type=\"checkbox\"\n [formControlName]=\"item[rowId]\"\n [attr.aria-label]=\"ariaLabelCheckboxTr\"\n [attr.id]=\"'cb_row__' + initId + '_' + i\"\n [attr.data-thook]=\"'row-select-' + i\"\n />\n <i></i>\n </label>\n </div>\n </td>\n\n <!-- Other columns -->\n <td\n *ngFor=\"let column of tableColumns; let i = index\"\n [columnType]=\"column.valueType\"\n [value]=\"item[column.property]\"\n (click)=\"propagateItemClick(item, column.preventDefaultClickEvent)\"\n >\n <ng-container *ngIf=\"expandable && i === 0; else nonExpandableTemplate\">\n <div\n class=\"gds-item-field-wrap\"\n [ngClass]=\"{ 'no-sub-items': item.subItems.length === 0 }\"\n >\n <span\n *ngIf=\"item.subItems.length > 0\"\n role=\"button\"\n tabindex=\"0\"\n class=\"chevron-field\"\n [attr.aria-expanded]=\"rowSelectors.get(item[rowId])?.value\"\n >\n <svg\n width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20 9L12 17L4 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n {{ item[column.property] }} ({{ item.subItems.length }})\n </div>\n </ng-container>\n\n <ng-template #nonExpandableTemplate>\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: item }\">\n </ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ item[column.property] }}\n </ng-template>\n </ng-template>\n </td>\n </tr>\n\n <!-- Expanded Sub Items -->\n <ng-container *ngIf=\"expandable && rowSelectors.get(item[rowId])?.value\">\n <tr *ngFor=\"let subItem of item[subItemsProp]\">\n <td\n *ngFor=\"let column of tableColumns\"\n class=\"web-view\"\n [columnType]=\"column.valueType\"\n [value]=\"subItem[column.property]\"\n (click)=\"propagateItemClick(subItem, column.preventDefaultClickEvent)\"\n >\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: subItem }\">\n </ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ subItem[column.property] }}\n </ng-template>\n </td>\n\n <td\n class=\"mobile-view\"\n [attr.colspan]=\"tableColumns.length\"\n (click)=\"propagateItemClick(subItem)\"\n >\n <dl class=\"mobile-view-field-wrap\">\n <ng-container *ngFor=\"let column of tableColumns\">\n <div\n *ngIf=\"!column.hidePropertyOnMobile\"\n class=\"mobile-view-field\"\n [columnType]=\"column.valueType\"\n [value]=\"subItem[column.property]\"\n >\n <dt *ngIf=\"!column.hideLabelOnMobile\">\n <ng-container *transloco=\"let t\">\n {{ t(column.label ?? '') }}\n </ng-container>\n </dt>\n <dd [ngStyle]=\"column.boldTextOnMobile ? { 'font-weight': '500' } : {'font-weight': '400'}\">\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: subItem }\"></ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ subItem[column.property] }}\n </ng-template>\n </dd>\n <ng-content></ng-content>\n </div>\n </ng-container>\n </dl>\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"nav-chevron-field\"\n [attr.aria-expanded]=\"rowSelectors.get(item[rowId])?.value\"\n >\n <svg\n width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20 9L12 17L4 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n </td>\n </tr>\n </ng-container>\n\n <!-- Custom appended rows -->\n <ng-container *ngIf=\"appendedRowsTemplateRef as trTemplate\">\n <!-- Cannot infer trTemplate as TemplateRef therefore null -->\n <ng-container\n *ngTemplateOutlet=\"trTemplate || null; context: { $implicit: item }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n\n <!-- Table footer -->\n <tfoot *ngIf=\"customFooterTemplateRef as trTemplate\">\n <!-- Cannot infer trTemplate as TemplateRef therefore null -->\n <ng-container *ngTemplateOutlet=\"trTemplate || null\"> </ng-container>\n </tfoot>\n</table>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\nimport { TranslocoModule } from '@jsverse/transloco'\n\nimport { TableComponent } from './table.component'\nimport {\n TableAppendableRowsTemplateDirective,\n TableDirective,\n TableFooterTemplateDirective,\n TableTemplateDirective,\n} from './table.directive'\nimport { TrThookPipe } from './tr-thook.pipe'\n\n@NgModule({\n declarations: [\n TableComponent,\n TableDirective,\n TableTemplateDirective,\n TableFooterTemplateDirective,\n TableAppendableRowsTemplateDirective,\n ],\n imports: [CommonModule, ReactiveFormsModule, TranslocoModule, TrThookPipe],\n exports: [\n TableComponent,\n TableTemplateDirective,\n TableFooterTemplateDirective,\n TableAppendableRowsTemplateDirective,\n ],\n})\nexport class NggvTableModule {}\n","/*\n * Public API Surface of table\n */\n\nexport * from './table.component'\nexport * from './table.directive'\nexport * from './tr-thook.pipe'\nexport * from './table.models'\nexport * from './table.module'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"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AoC,CAAA,EAAA,CAAA,CAAA,EAAA;AAG3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EARhB,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAQjD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,cAAc;wBACd,cAAc;wBACd,sBAAsB;wBACtB,4BAA4B;wBAC5B,oCAAoC;AACrC,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,CAAC;AAC1E,oBAAA,OAAO,EAAE;wBACP,cAAc;wBACd,sBAAsB;wBACtB,4BAA4B;wBAC5B,oCAAoC;AACrC,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-table.mjs","sources":["../../../../libs/angular/src/v-angular/table/table.directive.ts","../../../../libs/angular/src/v-angular/table/table.tools.ts","../../../../libs/angular/src/v-angular/table/tr-thook.pipe.ts","../../../../libs/angular/src/v-angular/table/table.component.ts","../../../../libs/angular/src/v-angular/table/table.component.html","../../../../libs/angular/src/v-angular/table/table.module.ts","../../../../libs/angular/src/v-angular/table/index.ts","../../../../libs/angular/src/v-angular/table/sebgroup-green-angular-src-v-angular-table.ts"],"sourcesContent":["import { Directive, HostBinding, Input, TemplateRef } from '@angular/core'\n\nconst enum ColumnCSSClass {\n Primary = 'gds-table__primary-col',\n Sortable = 'gds-table__sortable-col',\n Numeric = 'gds-table__numeric-col',\n Negative = 'gds-table__negative-col',\n Ascending = 'gds-table__sortable-col--asc',\n Descending = 'gds-table__sortable-col--desc',\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[columnType]',\n})\nexport class TableDirective {\n @Input() columnType: 'numeric' | 'text' | undefined = 'text'\n @Input() sortable?: boolean\n @Input() sortOrder?: 'desc' | 'asc'\n @Input() value: any\n\n @HostBinding('attr.data-thook') @Input() thook: string | null | undefined =\n 'table'\n\n @HostBinding('class.' + ColumnCSSClass.Numeric) get numericColumn(): boolean {\n return this.columnType === 'numeric'\n }\n\n @HostBinding('class.' + ColumnCSSClass.Sortable) get isSortable(): boolean {\n return !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Ascending)\n get orderAscending(): boolean {\n return this.sortOrder === 'asc' && !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Descending)\n get orderDescending(): boolean {\n return this.sortOrder === 'desc' && !!this.sortable\n }\n\n @HostBinding('class.' + ColumnCSSClass.Negative)\n get negativeValue(): boolean {\n if (!isNaN(this.value)) return +this.value < 0\n return false\n }\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableColumn]',\n})\nexport class TableTemplateDirective<K = string> {\n @Input() tableColumn!: K\n @Input() tableColumnTarget?: 'th' | 'td' | 'both' = 'both'\n\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableFooter]',\n})\nexport class TableFooterTemplateDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[tableAppendableRows]',\n})\nexport class TableAppendableRowsTemplateDirective {\n constructor(public templateRef: TemplateRef<any>) {}\n}\n","const getKeyValue = <T, K extends keyof T>(obj: T, key: K): T[K] => obj[key]\n\nexport const pick = (\n propertyArray: Array<string>,\n object: { [key: string]: unknown },\n): object => {\n if (object instanceof Object) {\n return propertyArray.reduce(\n (acc: object, curr: string) => ({\n ...acc,\n [curr]: getKeyValue(object, curr),\n }),\n {},\n )\n }\n throw Error('The value for argument \"object\" must be an object')\n}\n\nexport const orderByDescending = <T>(\n property: keyof T | string,\n): ((a: any, b: any) => number) => {\n return (a: any, b: any) => {\n if (a[property] > b[property]) return -1\n if (a[property] < b[property]) return 1\n return 0\n }\n}\n\nexport const orderByAscending = <T>(\n property: keyof T | string,\n): ((a: any, b: any) => number) => {\n return (a: any, b: any) => {\n if (a[property] < b[property]) return -1\n if (a[property] > b[property]) return 1\n return 0\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core'\n\n@Pipe({\n name: 'trThook',\n standalone: true,\n})\nexport class TrThookPipe implements PipeTransform {\n transform<V>(\n value: V,\n index: number,\n thookFn?: (rowData: V) => string,\n ): string {\n // call thook fn to set thook for active row\n if (thookFn != null) {\n return thookFn(value)\n }\n\n // default thook\n return `table-row-${index}`\n }\n}\n","import {\n AfterContentInit,\n Component,\n ContentChild,\n ContentChildren,\n EventEmitter,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n QueryList,\n SimpleChanges,\n TemplateRef,\n} from '@angular/core'\nimport { UntypedFormControl, UntypedFormGroup } from '@angular/forms'\nimport { Subscription } from 'rxjs'\nimport { debounceTime, map } from 'rxjs/operators'\n\nimport {\n TableAppendableRowsTemplateDirective,\n TableFooterTemplateDirective,\n TableTemplateDirective,\n} from './table.directive'\nimport {\n ariaLabelsOrderBy,\n OrderBy,\n TableColumn,\n TableRow,\n} from './table.models'\nimport { orderByAscending, orderByDescending, pick } from './table.tools'\n\nlet staticInitId = 0\n\nfunction objectFromEntries(entryMap: Map<any, any>): { [key: string]: any } {\n const fromEntries: { [key: string]: any } = {}\n for (const [key, value] of entryMap) {\n fromEntries[key] = value\n }\n return fromEntries\n}\n\n/**\n * A table component with built-in sorting and selecting functionality.\n * By default, table cells (i.e. `<td>` elements) and table headers (i.e. `<th>` elements) are populated with text only values.\n *\n * To customize the contents of either the `<td>` or `<th>` elements (like adding color, icons, form fields, extra padding etc.), provide\n * the customized content within a `<ng-template>`-tag, and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableColumn`-attribute to the `<ng-template>`-element, and set the value to the specific column property.\n * Set `tableColumnTarget` to either `th`, `td` or `both` (default) depending on target element type.\n * The entire row from the `@Input() tableData` is available from the context `$implicit` variable.\n *\n * @example\n * <!-- for table cells i.e. td-elements -->\n * <ng-template tableColumn=\"status\" tableColumnTarget=\"td\" let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <!-- my custom status element -->\n * </ng-template>\n *\n * @example\n * <!-- for table headers i.e. th-elements -->\n * <ng-template tableColumn=\"status\" tableColumnTarget=\"th\" let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <!-- my custom status element -->\n * </ng-template>\n *\n * It is possible to add custom rows that are appended below data row. Use `<ng-template>`-tag and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableAppendableRows`-attribute to the `<ng-template>`-element. Any `tr` elements that exist within `<ng-template tableAppendableRows>` and `</ng-template>` tags will be put below data row's `tr` element in the table.\n *\n * @example\n * <!-- custom appended rows -->\n * <ng-template tableAppendableRows let-myDataVar=\"$implicit\" let-status=\"$implicit.status\">\n * <tr>\n * <!-- first row's columns -->\n * </tr>\n * <!-- more rows if needed -->\n * </ng-template>\n *\n * If custom styling is needed for data row that has appended rows, you can use data attribute `data-hasrowspan` to distinguish it from data row without appended rows.\n * You can pass your own custom method with conditional logic to define what value will be passed to data-hasrowspan.\n * In addition, hasRowSpan function accepts item from `@Input() tableData` as argument which is of the same type as value passed to context `$implicit` variable.\n * IMPORTANT: use arrow function style for defining function inside component, i.e. `hasRowSpan = (value) => output;`. If regular function will be defined, i.e. `hasRowSpan(value) { return output; }`, binding will not work.\n *\n * @example\n * <!-- inside component\n * class CustomComponent {\n * customHasRowSpanFunction = (item: CustomDataType) => item.appendedRowsData.length > 0 ? true : false;\n * }\n * -->\n * <!-- inside stylesheets\n * [data-hasrowspan=\"true\"] {\n * color: blue;\n * }\n * .appended-row {\n * color: blue;\n * }\n * -->\n * <nggv-table [hasRowSpan]=\"customHasRowSpanFunction\">\n * <!-- custom appended rows -->\n * <ng-template tableAppendableRows let-appendedRowsData=\"$implicit.appendedRowsData\">\n * <tr *ngFor=\"let appendedRowItem of appendedRowsData\" class=\"appended-row\">\n * <td>{{ appendedRowItem }}</td>\n * <!-- other row's columns -->\n * </tr>\n * </ng-template>\n * </nggv-table>\n *\n * In addition, it is possible to add footer for the table. Similarly to adding custom columns, use `<ng-template>`-tag and place the ng-template in the html between the start and ending tag of\n * the `<nggv-table>`. Add a `tableFooter`-attribute to the `<ng-template>`-element. Any elements that exist within `<ng-template tableFooter>` and `</ng-template>` tags will be put to tfoot element inside the table.\n *\n * @example\n * <!-- for table footer i.e. tfoot-element -->\n * <ng-template tableFooter>\n * <tr>\n * <!-- first row's columns -->\n * </tr>\n * <!-- more rows if needed -->\n * </ng-template>\n *\n */\n@Component({\n selector: 'nggv-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss'],\n})\nexport class TableComponent<T extends TableRow>\n implements OnInit, OnChanges, AfterContentInit, OnDestroy {\n /**\n * @internal\n * Custom templates defined in the html.\n */\n @ContentChildren(TableTemplateDirective, { descendants: true })\n customTemplates!: QueryList<TableTemplateDirective<keyof T>>\n\n /**\n * @internal\n * Custom appended rows template defined in the html.\n */\n @ContentChild(TableAppendableRowsTemplateDirective)\n appendedRowsTemplate!: TableAppendableRowsTemplateDirective\n\n /**\n * @internal\n * Custom footer template defined in the html.\n */\n @ContentChild(TableFooterTemplateDirective)\n customFooterTemplate!: TableFooterTemplateDirective\n\n /** Emits the table row that was clicked. Works on all columns if not preventDefaultEmit is set for that column. */\n @Output() ngvRowClick = new EventEmitter<T | any>()\n\n /**\n * Emits currently selected and deselected items in the table as key-value pairs.\n * Uses each item`s itemId as key, and a boolean value to describe selected status.\n */\n @Output() ngvRowSelect = new EventEmitter<string[]>()\n\n /**\n * Emits event to signal that the table should be reordered.\n */\n @Output() ngvOrderBy = new EventEmitter<OrderBy<T>>()\n\n /**\n * An array of items describing how the table header should be rendered,\n * together with instructions for how each row should be displayed in that column.\n */\n @Input() tableColumns!: TableColumn<T>[]\n\n /** Data array to display data in the table. Each item <T> in the array represents a row in the table. */\n @Input() tableData!: T[]\n\n /**\n * Property name used to uniquely describe each item (i.e. row) in the data table.\n * Defaults to \\'id\\'.\n * Is required if selectable is true.\n */\n @Input() rowId = 'id'\n\n /**\n * Function's return value is used for data attribute \\'data-hasrowspan\\'.\n * If custom hasRowSpan function is not passed to the table,\n * then this function returns undefined value by default which results in \\'data-hasrowspan\\' attribute being omitted in html\n * (angular omits attributes that contain null or undefined value).\n * IMPORTANT: use arrow function style for defining function inside component, i.e. `hasRowSpan = (value) => output;`. If regular function will be defined, i.e. `hasRowSpan(value) { return output; }`, binding will not work.\n */\n @Input() hasRowSpan: (item: T) => any = (_) => undefined\n\n /**\n * Used to enable/disable the left-side checkbox column.\n * Defaults to true.\n */\n @Input() selectable = true\n\n /**\n * Used to enable/disable expandable rows.\n * Defaults to false.\n */\n @Input() expandable = false\n\n /**\n * Used to enable/disable the right-side expand icon column.\n * Defaults to true.\n */\n @Input() expandedByDefault = true\n\n /**\n * Property name used to describe the subItems in the data table.\n */\n @Input() subItemsProp = 'subItems'\n\n /**\n * Allow nggv-table to attempt sorting the data in the table. Not recommended if only a subset is loaded or if the dataset is very large.\n * Disabled by default.\n */\n @Input() allowLocalSort = false\n\n /** Special property used for selecting DOM elements during automated UI testing. */\n @Input() thook = 'table-select-all'\n\n /** Function to overwrite generated thook for each row. */\n @Input() trThookFn?: (item: T) => string\n\n /** Aria label for the checkbox in the table header */\n @Input() ariaLabelCheckboxTh?: string\n\n /** Aria label for the checkbox in the table header */\n @Input() ariaLabelCheckboxTr?: string\n\n /** Aria labels for sorting in the table header */\n @Input() ariaLabelsOrderBy?: ariaLabelsOrderBy\n\n /**\n * @internal\n * Internal data structure used to keep track of added content templates used in td elements.\n */\n customRowTemplates = new Map<keyof T, TemplateRef<any>>()\n\n /**\n * @internal\n * Internal data structure used to keep track of added content templates used in th elements.\n */\n customHeaderTemplates = new Map<keyof T, TemplateRef<any>>()\n\n /**\n * @internal\n * Internal data structure used to hold custom appended rows i.e. tr elements (rows).\n */\n appendedRowsTemplateRef!: TemplateRef<any>\n\n /**\n * @internal\n * Internal data structure used to hold tfoot element children i.e. tr elements (rows).\n */\n customFooterTemplateRef!: TemplateRef<any>\n\n /**\n * @internal\n * Incremental id.\n */\n initId!: number\n\n /**\n * @internal\n * FormGroup containing all row id\\'s as controls, and whether these are selected or not as values.\n */\n rowSelectors: UntypedFormGroup = new UntypedFormGroup({})\n\n /**\n * @internal\n * Master selector for selecting or deselecting all row selectors.\n */\n groupSelector: UntypedFormControl = new UntypedFormControl(false)\n\n private selected: string[] = []\n private subs: Subscription[] = []\n\n ngOnChanges(changes: SimpleChanges) {\n // Update selectable or expandable rows if table data or settings change\n if (\n (this.selectable || this.expandable) && changes.tableData?.currentValue ||\n (changes.selectable?.currentValue || changes.expandable?.currentValue) && this.tableData\n ) {\n const wasChanged = this.registerSelectableRows(\n changes.tableData.currentValue,\n )\n if (wasChanged && !this.subs.length) {\n // first time this is run\n const groupSelectorSub = this.groupValueSubscription\n const rowSelectorSub = this.rowValueSubscription\n this.subs.push(groupSelectorSub, rowSelectorSub)\n } else if (wasChanged) {\n this.rowSelectors.updateValueAndValidity()\n }\n }\n\n // sort any incoming data\n if (\n this.allowLocalSort &&\n (changes.tableData?.currentValue || changes.tableColumns?.currentValue)\n ) {\n const orderedByColumn: TableColumn<T> | undefined =\n this.tableColumns?.find((el) => el.order !== undefined)\n if (orderedByColumn) this.sortItemsBy(orderedByColumn)\n }\n }\n\n ngOnInit(): void {\n this.initId = staticInitId++\n }\n\n ngAfterContentInit() {\n // if any custom templates were defined in the template\n if (this.customTemplates.length) {\n // for each template found\n this.customTemplates.map((tableTemplate) => {\n // if target is either 'td' or 'both'\n if (\n ['td', 'both'].includes(tableTemplate.tableColumnTarget as string)\n ) {\n // add to custom row templates\n this.customRowTemplates.set(\n tableTemplate.tableColumn,\n tableTemplate.templateRef,\n )\n }\n // if target is either 'th' or 'both'\n if (\n ['th', 'both'].includes(tableTemplate.tableColumnTarget as string)\n ) {\n // add to custom header templates\n this.customHeaderTemplates.set(\n tableTemplate.tableColumn,\n tableTemplate.templateRef,\n )\n }\n })\n }\n\n // if appended rows' template is defined in the template\n if (this.appendedRowsTemplate) {\n // set templateRef of appended rows' template to variable\n this.appendedRowsTemplateRef = this.appendedRowsTemplate.templateRef\n }\n\n // if custom footer template is defined in the template\n if (this.customFooterTemplate) {\n // set templateRef of table footer to variable\n this.customFooterTemplateRef = this.customFooterTemplate.templateRef\n }\n\n // if expandedByDefault is true, then expand all rows\n if (this.expandedByDefault && this.expandable && this.tableData) {\n this.tableData.forEach((item) => {\n this.toggleRowToExpand(item[this.rowId])\n })\n }\n }\n\n ngOnDestroy() {\n this.subs.forEach((sub) => sub.unsubscribe())\n }\n\n /**\n * @internal\n * Returns a subscription to the master selector control that either selects or deselects all row controls.\n */\n get groupValueSubscription(): Subscription {\n return this.groupSelector.valueChanges.subscribe({\n next: (value: boolean) => {\n const selectMap = new Map(Object.entries(this.rowSelectorsValue))\n selectMap.forEach((_, key) => selectMap.set(key, value))\n const patchValue = objectFromEntries(selectMap)\n this.rowSelectors.patchValue(patchValue)\n },\n })\n }\n\n /**\n * @internal\n * Returns a subscription to all individual row selectors and update the master selector if all are selected.\n */\n get rowValueSubscription(): Subscription {\n return this.rowSelectors.valueChanges\n .pipe(\n debounceTime(0), // to limit the number of events and to wait for all sub controls to update\n map((val: { [key: string]: boolean }) => {\n // get a filtered array of keys for all rows that are selected\n const selected = Object.keys(val).filter((key) => {\n return val[key] === true && this.rowSelectors.get(key)?.enabled\n })\n // returns an object containing only the filtered keys\n return pick(selected, val)\n }),\n )\n .subscribe({\n next: (value: object) => {\n // the number of selected keys compared to the total number of keys available\n const numberOfSelected = Object.keys(value).length\n const allSelected: boolean =\n numberOfSelected > 0\n ? numberOfSelected === Object.keys(this.rowSelectorsValue).length\n : false\n // update the master selector control\n this.groupSelector.setValue(allSelected, { emitEvent: false })\n // update the array of currently selected id's\n this.selected = Object.keys(value)\n // and emit the updated value\n this.ngvRowSelect.emit(this.selected)\n },\n })\n }\n\n /**\n * @internal\n * Registers or disables row controls for new or removed rows.\n */\n registerSelectableRows(tableData: any[]): boolean {\n if (!tableData) return false\n // Array containing only the id's for each row\n const dataRowIds: string[] = tableData.map((data: any) => data[this.rowId])\n\n // Array containing the id's that have registered controls\n const currentIds: string[] = Object.keys(this.rowSelectorsValue)\n\n // Array containing all ids that lacks a corresponding control (i.e. new rows)\n const newIds: string[] = dataRowIds.filter(\n (id) => currentIds.indexOf(id) === -1,\n )\n\n // Array containing all ids that has a control but is no longer in the data set (i.e. removed rows)\n const removedIds: string[] = currentIds.filter(\n (id) => dataRowIds.indexOf(id) === -1,\n )\n\n // Register new controls for added rows\n if (newIds.length) {\n newIds.forEach((id) => {\n const ctrl = this.rowSelectors.registerControl(\n id,\n new UntypedFormControl(false),\n )\n if (ctrl.disabled) ctrl.enable()\n })\n }\n\n // Set already registered controls to disabled for removed rows\n if (removedIds.length)\n removedIds.forEach((id) => this.rowSelectors.get(id)?.disable())\n\n return newIds.length > 0 || removedIds.length > 0\n }\n\n /**\n * @internal\n * Returns all enabled values unless all rows are disabled.\n */\n get rowSelectorsValue(): any {\n return this.rowSelectors.enabled ? this.rowSelectors.value : {}\n }\n\n toggleSortOrderWithSpace(event: any, column: TableColumn<T>) {\n if (column.sortable) {\n event.preventDefault()\n this.toggleSortOrder(column)\n }\n }\n\n /**\n * @internal\n * Switches sorting order between ascending and descending order for a column.\n * @param column the column to sort rows after.\n */\n toggleSortOrder(column: TableColumn<T>) {\n // check if the table is already sorted by another column than the one provided\n const currentlyOrderedBy = this.tableColumns?.find(\n (el) => el !== column && el.order !== undefined,\n )\n if (currentlyOrderedBy) delete currentlyOrderedBy.order\n column.order = column.order === 'desc' ? 'asc' : 'desc'\n this.sortItemsBy(column)\n }\n\n /** If sortable, reorders the table data using the specified column as ordering attribute. */\n sortItemsBy(column: TableColumn<T>): TableRow[] | undefined {\n if (!column.sortable) return\n // emit re-order event\n this.ngvOrderBy.emit({ property: column.property, order: column.order })\n // if local sort is allowed, reorder data\n if (!this.allowLocalSort || !this.tableData) return\n return this.tableData.sort(\n column.order === 'desc'\n ? orderByDescending(column.property)\n : orderByAscending(column.property),\n )\n }\n\n /**\n * @internal\n * Emits row data for what row was clicked if defaultEmit is allowed.\n */\n propagateItemClick(item: any, preventDefaultEmit?: boolean) {\n if (!preventDefaultEmit) this.ngvRowClick.emit(item);\n\n if (this.expandable && item[this.subItemsProp]) {\n this.toggleRowToExpand(item[this.rowId]);\n }\n }\n\n getAriaLabel(column: TableColumn<T>): string | undefined {\n const sortOrder =\n column.order === 'asc'\n ? this.ariaLabelsOrderBy?.desc\n : this.ariaLabelsOrderBy?.asc\n if (!sortOrder) return // no aria labels defined\n return column.ariaLabelSortable?.replace('{{sortOrder}}', sortOrder)\n }\n\n private toggleRowToExpand(id: string): void {\n const row = this.rowSelectors.get(id)\n row?.setValue(!row.value)\n }\n}\n","<ng-template #sortableThTemplate let-column>\n <button class=\"sg-table-sort\" *transloco=\"let t\">\n <ng-template #thButtonTemplate>\n {{ t(column.label ?? '') }}\n </ng-template>\n <ng-container\n *ngIf=\"\n customHeaderTemplates.get(column.property) as thTemplate;\n else thButtonTemplate\n \"\n >\n <ng-template\n *ngTemplateOutlet=\"thTemplate || null; context: { $implicit: column }\"\n >\n </ng-template>\n </ng-container>\n </button>\n</ng-template>\n\n<ng-template #notSortableThTemplate let-column>\n <ng-template #defaultThTemplate>\n <ng-container *transloco=\"let t\">\n {{ t(column.label ?? '') }}\n </ng-container>\n </ng-template>\n <ng-container\n *ngIf=\"\n customHeaderTemplates.get(column.property) as thTemplate;\n else defaultThTemplate\n \"\n >\n <ng-template\n *ngTemplateOutlet=\"thTemplate || null; context: { $implicit: column }\"\n >\n </ng-template>\n </ng-container>\n</ng-template>\n<table class=\"gds-table\" *transloco=\"let t\">\n <!-- Table header -->\n <thead>\n <tr>\n <!-- Checkbox column for header -->\n <th *ngIf=\"selectable\" class=\"column__check\">\n <div class=\"gds-field-checkbox-wrap\">\n <label\n [attr.for]=\"'cb_header__' + initId\"\n class=\"form-control\"\n id=\"thead-checkbox\"\n >\n <input\n type=\"checkbox\"\n [formControl]=\"groupSelector\"\n [attr.aria-label]=\"ariaLabelCheckboxTh\"\n [attr.id]=\"'cb_header__' + initId\"\n [attr.data-thook]=\"thook\"\n />\n <i></i>\n </label>\n </div>\n </th>\n\n <!-- Other columns -->\n <th\n *ngFor=\"let column of tableColumns\"\n [columnType]=\"column.valueType\"\n [sortable]=\"column.sortable\"\n [sortOrder]=\"column.order\"\n [thook]=\"'column-header-' + !!column.property\"\n (click)=\"toggleSortOrder(column)\"\n (keydown.space)=\"toggleSortOrderWithSpace($event, column)\"\n [attr.aria-label]=\"getAriaLabel(column)\"\n [attr.aria-sort]=\"column.order + 'ending'\"\n >\n <ng-container *ngIf=\"column.sortable\">\n <ng-container\n *ngTemplateOutlet=\"\n sortableThTemplate;\n context: { $implicit: column, column: column }\n \"\n >\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"!column.sortable\">\n <ng-container\n *ngTemplateOutlet=\"\n notSortableThTemplate;\n context: { $implicit: column, column: column }\n \"\n >\n </ng-container>\n </ng-container>\n </th>\n </tr>\n </thead>\n\n <!-- Table body -->\n <tbody [formGroup]=\"rowSelectors\">\n <ng-container *ngFor=\"let item of tableData; let i = index\">\n <tr\n [class.row__expand]=\"expandable\"\n [attr.data-thook]=\"item | trThook: i : trThookFn\"\n [attr.data-hasrowspan]=\"hasRowSpan(item)\"\n >\n <!-- Checkbox column for row -->\n <td *ngIf=\"selectable\" class=\"column__check\">\n <div class=\"gds-field-checkbox-wrap\">\n <label\n [attr.for]=\"'cb_row__' + initId + '_' + i\"\n class=\"form-control\"\n >\n <input\n *ngIf=\"rowSelectors.get(item[rowId])\"\n type=\"checkbox\"\n [formControlName]=\"item[rowId]\"\n [attr.aria-label]=\"ariaLabelCheckboxTr\"\n [attr.id]=\"'cb_row__' + initId + '_' + i\"\n [attr.data-thook]=\"'row-select-' + i\"\n />\n <i></i>\n </label>\n </div>\n </td>\n\n <!-- Other columns -->\n <td\n *ngFor=\"let column of tableColumns; let i = index\"\n [columnType]=\"column.valueType\"\n [value]=\"item[column.property]\"\n (click)=\"propagateItemClick(item, column.preventDefaultClickEvent)\"\n >\n <ng-container *ngIf=\"expandable && i === 0; else nonExpandableTemplate\">\n <div\n class=\"gds-item-field-wrap\"\n [ngClass]=\"{ 'no-sub-items': item.subItems.length === 0 }\"\n >\n <span\n *ngIf=\"item.subItems.length > 0\"\n role=\"button\"\n tabindex=\"0\"\n class=\"chevron-field\"\n [attr.aria-expanded]=\"rowSelectors.get(item[rowId])?.value\"\n >\n <svg\n width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20 9L12 17L4 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n {{ item[column.property] }} ({{ item.subItems.length }})\n </div>\n </ng-container>\n\n <ng-template #nonExpandableTemplate>\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: item }\">\n </ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ item[column.property] }}\n </ng-template>\n </ng-template>\n </td>\n </tr>\n\n <!-- Expanded Sub Items -->\n <ng-container *ngIf=\"expandable && rowSelectors.get(item[rowId])?.value\">\n <tr *ngFor=\"let subItem of item[subItemsProp]\">\n <td\n *ngFor=\"let column of tableColumns\"\n class=\"web-view\"\n [columnType]=\"column.valueType\"\n [value]=\"subItem[column.property]\"\n (click)=\"propagateItemClick(subItem, column.preventDefaultClickEvent)\"\n >\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: subItem }\">\n </ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ subItem[column.property] }}\n </ng-template>\n </td>\n\n <td\n class=\"mobile-view\"\n [attr.colspan]=\"tableColumns.length\"\n (click)=\"propagateItemClick(subItem)\"\n >\n <dl class=\"mobile-view-field-wrap\">\n <ng-container *ngFor=\"let column of tableColumns\">\n <div\n *ngIf=\"!column.hidePropertyOnMobile\"\n class=\"mobile-view-field\"\n [columnType]=\"column.valueType\"\n [value]=\"subItem[column.property]\"\n >\n <dt *ngIf=\"!column.hideLabelOnMobile\">\n <ng-container *transloco=\"let t\">\n {{ t(column.label ?? '') }}\n </ng-container>\n </dt>\n <dd [ngStyle]=\"column.boldTextOnMobile ? { 'font-weight': '500' } : {'font-weight': '400'}\">\n <ng-container *ngIf=\"customRowTemplates.get(column.property) as tdTemplate; else defaultTdTemplate\">\n <ng-template *ngTemplateOutlet=\"tdTemplate; context: { $implicit: subItem }\"></ng-template>\n </ng-container>\n <ng-template #defaultTdTemplate>\n {{ subItem[column.property] }}\n </ng-template>\n </dd>\n <ng-content></ng-content>\n </div>\n </ng-container>\n </dl>\n <span\n role=\"button\"\n tabindex=\"0\"\n class=\"nav-chevron-field\"\n [attr.aria-expanded]=\"rowSelectors.get(item[rowId])?.value\"\n >\n <svg\n width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M20 9L12 17L4 9\"\n stroke=\"currentColor\"\n stroke-width=\"1.6\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </span>\n </td>\n </tr>\n </ng-container>\n\n <!-- Custom appended rows -->\n <ng-container *ngIf=\"appendedRowsTemplateRef as trTemplate\">\n <!-- Cannot infer trTemplate as TemplateRef therefore null -->\n <ng-container\n *ngTemplateOutlet=\"trTemplate || null; context: { $implicit: item }\"\n >\n </ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n\n <!-- Table footer -->\n <tfoot *ngIf=\"customFooterTemplateRef as trTemplate\">\n <!-- Cannot infer trTemplate as TemplateRef therefore null -->\n <ng-container *ngTemplateOutlet=\"trTemplate || null\"> </ng-container>\n </tfoot>\n</table>\n","import { CommonModule } from '@angular/common'\nimport { NgModule } from '@angular/core'\nimport { ReactiveFormsModule } from '@angular/forms'\nimport { TranslocoModule } from '@jsverse/transloco'\n\nimport { TableComponent } from './table.component'\nimport {\n TableAppendableRowsTemplateDirective,\n TableDirective,\n TableFooterTemplateDirective,\n TableTemplateDirective,\n} from './table.directive'\nimport { TrThookPipe } from './tr-thook.pipe'\n\n@NgModule({\n declarations: [\n TableComponent,\n TableDirective,\n TableTemplateDirective,\n TableFooterTemplateDirective,\n TableAppendableRowsTemplateDirective,\n ],\n imports: [CommonModule, ReactiveFormsModule, TranslocoModule, TrThookPipe],\n exports: [\n TableComponent,\n TableTemplateDirective,\n TableFooterTemplateDirective,\n TableAppendableRowsTemplateDirective,\n ],\n})\nexport class NggvTableModule {}\n","/*\n * Public API Surface of table\n */\n\nexport * from './table.component'\nexport * from './table.directive'\nexport * from './tr-thook.pipe'\nexport * from './table.models'\nexport * from './table.module'\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4.TableDirective","i5.TrThookPipe"],"mappings":";;;;;;;;;;MAea,cAAc,CAAA;AAJ3B,IAAA,WAAA,GAAA;QAKW,IAAU,CAAA,UAAA,GAAmC,MAAM,CAAA;QAKnB,IAAK,CAAA,KAAA,GAC5C,OAAO,CAAA;AAyBV,KAAA;AAvBC,IAAA,IAAoD,aAAa,GAAA;AAC/D,QAAA,OAAO,IAAI,CAAC,UAAU,KAAK,SAAS,CAAA;KACrC;AAED,IAAA,IAAqD,UAAU,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EAAA,CAEvE,cAAc;YACd,sBAAsB;YACtB,4BAA4B;YAC5B,oCAAoC,CAAA,EAAA,CAAA,CAAA,EAAA;AAG3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EARhB,OAAA,EAAA,CAAA,YAAY,EAAE,mBAAmB,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAQjD,eAAe,EAAA,UAAA,EAAA,CAAA;kBAhB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,cAAc;wBACd,cAAc;wBACd,sBAAsB;wBACtB,4BAA4B;wBAC5B,oCAAoC;AACrC,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,WAAW,CAAC;AAC1E,oBAAA,OAAO,EAAE;wBACP,cAAc;wBACd,sBAAsB;wBACtB,4BAA4B;wBAC5B,oCAAoC;AACrC,qBAAA;AACF,iBAAA,CAAA;;;AC7BD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -88,11 +88,11 @@ class NggvTextareaComponent extends NggvBaseControlValueAccessorComponent {
|
|
|
88
88
|
this.onChange(this.state);
|
|
89
89
|
}
|
|
90
90
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NggvTextareaComponent, deps: [{ token: i1.NgControl, optional: true, self: true }, { token: TRANSLOCO_SCOPE, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
91
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NggvTextareaComponent, selector: "nggv-textarea", inputs: { thook: "thook", placeholder: "placeholder", readonly: "readonly", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", rows: "rows", size: "size" }, host: { properties: { "attr.data-thook": "this.thook", "class.small": "this.isSmall", "class.large": "this.isLarge" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host textarea{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);align-items:center;background-color:var(--sg-form-control-bg);color:var(--text-primary-color);display:flex;justify-content:center;resize:vertical}:host textarea:focus:not(:focus-visible){box-shadow:none;outline:0}:host textarea:focus,:host textarea:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media screen and (-ms-high-contrast: active){:host textarea{border:2px solid currentcolor}}:host textarea:hover{background-color:var(--gds-ref-pallet-base100)}:host textarea:disabled,:host textarea.disabled,:host textarea[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host textarea:disabled::placeholder,:host textarea.disabled::placeholder,:host textarea[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host label:not(.gds-field-notice):is(label){margin-bottom:0}:host label:not(.gds-field-notice).form-control{width:fit-content}@supports (-moz-appearance: none){:host label:not(.gds-field-notice).form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label:not(.gds-field-notice).form-control:focus,:host label:not(.gds-field-notice).form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.gds-field-notice):not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label:not(.gds-field-notice)+input,:host label:not(.gds-field-notice)+textarea,fieldset :host label:not(.gds-field-notice)+div,:host label:not(.gds-field-notice)+button,:host label:not(.gds-field-notice)+.group-stepper,:host label:not(.gds-field-notice)+.stepper-wrapper,:host label:not(.gds-field-notice)+.group{margin-top:.5rem}:host label:not(.gds-field-notice)+.form-info{margin-bottom:.5rem}:host label+.gds-field,:host label+.nggv-field--locked{margin-top:.5rem}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label--optional{font-weight:400}:host textarea{width:100%;max-width:100%;box-sizing:border-box;font-family:inherit;font-size:1rem}:host textarea.nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .description{margin-bottom:.5rem}:host .error-wrapper{margin-top:.5rem;display:flex}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .gds-form-item__footer>.form-info--countdown{font-weight:400}:host .no-resize{resize:none}:host .no-resize::-webkit-scrollbar{-webkit-appearance:none}:host .no-resize::-webkit-scrollbar-thumb{border-radius:.5rem}:host.small label:not(.gds-field-notice):not(.form-control){font-size:.875rem;line-height:1rem}:host.small label+textarea{margin-top:.25rem}:host.small textarea{padding:.38rem .5rem;font-size:.875rem}:host.small .error-wrapper,:host.small .form-info{margin-top:.25rem;font-size:.875rem;line-height:1rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "directive", type: i5.NggCoreElementDirective, selector: "[nggCoreElement]" }] }); }
|
|
91
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: NggvTextareaComponent, selector: "nggv-textarea", inputs: { thook: "thook", placeholder: "placeholder", readonly: "readonly", minLength: "minLength", minlength: "minlength", maxLength: "maxLength", maxlength: "maxlength", rows: "rows", size: "size" }, host: { properties: { "attr.data-thook": "this.thook", "class.small": "this.isSmall", "class.large": "this.isLarge" } }, usesInheritance: true, ngImport: i0, template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host textarea{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);align-items:center;background-color:var(--sg-form-control-bg);color:var(--text-primary-color);display:flex;justify-content:center;resize:vertical}:host textarea:focus:not(:focus-visible){box-shadow:none;outline:0}:host textarea:focus,:host textarea:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media screen and (-ms-high-contrast: active){:host textarea{border:2px solid currentcolor}}:host textarea:hover{background-color:var(--gds-ref-pallet-base100)}:host textarea:disabled,:host textarea.disabled,:host textarea[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host textarea:disabled::placeholder,:host textarea.disabled::placeholder,:host textarea[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host label:not(.gds-field-notice):is(label){margin-bottom:0}:host label:not(.gds-field-notice).form-control{width:fit-content}@supports (-moz-appearance: none){:host label:not(.gds-field-notice).form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label:not(.gds-field-notice).form-control:focus,:host label:not(.gds-field-notice).form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.gds-field-notice):not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label:not(.gds-field-notice)+input,:host label:not(.gds-field-notice)+textarea,fieldset :host label:not(.gds-field-notice)+div,:host label:not(.gds-field-notice)+button,:host label:not(.gds-field-notice)+.group-stepper,:host label:not(.gds-field-notice)+.stepper-wrapper,:host label:not(.gds-field-notice)+.group{margin-top:.5rem}:host label:not(.gds-field-notice)+.form-info{margin-bottom:.5rem}:host label+.gds-field,:host label+.nggv-field--locked{margin-top:.5rem}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label--optional{font-weight:400}:host textarea{width:100%;max-width:100%;box-sizing:border-box;font-family:inherit;font-size:1rem}:host textarea.nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .description{margin-bottom:.5rem}:host .error-wrapper{margin-top:.5rem;display:flex}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .gds-form-item__footer>.form-info--countdown{font-weight:400}:host .no-resize{resize:none}:host .no-resize::-webkit-scrollbar{-webkit-appearance:none}:host .no-resize::-webkit-scrollbar-thumb{border-radius:.5rem}:host.small label:not(.gds-field-notice):not(.form-control){font-size:.875rem;line-height:1rem}:host.small label+textarea{margin-top:.25rem}:host.small textarea{padding:.38rem .5rem;font-size:.875rem}:host.small .error-wrapper,:host.small .form-info{margin-top:.25rem;font-size:.875rem;line-height:1rem}:host.small .gds-form-item__footer:not(:empty){margin-top:0rem}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.CharacterCountdownDirective, selector: "[nggvCharacterCountdown]", inputs: ["nggvCharacterCountdown", "nggvCharacterCountdownCurrentLength"] }, { kind: "directive", type: i5.NggCoreElementDirective, selector: "[nggCoreElement]" }] }); }
|
|
92
92
|
}
|
|
93
93
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: NggvTextareaComponent, decorators: [{
|
|
94
94
|
type: Component,
|
|
95
|
-
args: [{ selector: 'nggv-textarea', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host textarea{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);align-items:center;background-color:var(--sg-form-control-bg);color:var(--text-primary-color);display:flex;justify-content:center;resize:vertical}:host textarea:focus:not(:focus-visible){box-shadow:none;outline:0}:host textarea:focus,:host textarea:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media screen and (-ms-high-contrast: active){:host textarea{border:2px solid currentcolor}}:host textarea:hover{background-color:var(--gds-ref-pallet-base100)}:host textarea:disabled,:host textarea.disabled,:host textarea[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host textarea:disabled::placeholder,:host textarea.disabled::placeholder,:host textarea[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host label:not(.gds-field-notice):is(label){margin-bottom:0}:host label:not(.gds-field-notice).form-control{width:fit-content}@supports (-moz-appearance: none){:host label:not(.gds-field-notice).form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label:not(.gds-field-notice).form-control:focus,:host label:not(.gds-field-notice).form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.gds-field-notice):not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label:not(.gds-field-notice)+input,:host label:not(.gds-field-notice)+textarea,fieldset :host label:not(.gds-field-notice)+div,:host label:not(.gds-field-notice)+button,:host label:not(.gds-field-notice)+.group-stepper,:host label:not(.gds-field-notice)+.stepper-wrapper,:host label:not(.gds-field-notice)+.group{margin-top:.5rem}:host label:not(.gds-field-notice)+.form-info{margin-bottom:.5rem}:host label+.gds-field,:host label+.nggv-field--locked{margin-top:.5rem}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label--optional{font-weight:400}:host textarea{width:100%;max-width:100%;box-sizing:border-box;font-family:inherit;font-size:1rem}:host textarea.nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .description{margin-bottom:.5rem}:host .error-wrapper{margin-top:.5rem;display:flex}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .gds-form-item__footer>.form-info--countdown{font-weight:400}:host .no-resize{resize:none}:host .no-resize::-webkit-scrollbar{-webkit-appearance:none}:host .no-resize::-webkit-scrollbar-thumb{border-radius:.5rem}:host.small label:not(.gds-field-notice):not(.form-control){font-size:.875rem;line-height:1rem}:host.small label+textarea{margin-top:.25rem}:host.small textarea{padding:.38rem .5rem;font-size:.875rem}:host.small .error-wrapper,:host.small .form-info{margin-top:.25rem;font-size:.875rem;line-height:1rem}\n"] }]
|
|
95
|
+
args: [{ selector: 'nggv-textarea', template: "<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n", styles: [":host{--sg-text-primary: #333;--sg-form-control-bg: #fff;--gds-ref-pallet-base100: hsl(0, 0%, 97%);--sg-border-radius: 4px;--sg-border-width: 1px;--sg-border-color: #868686}:host textarea{padding:.75rem 1rem;border-radius:var(--sg-border-radius);border:solid var(--sg-border-width) var(--sg-border-color);--border-color: var(--sg-border-color);align-items:center;background-color:var(--sg-form-control-bg);color:var(--text-primary-color);display:flex;justify-content:center;resize:vertical}:host textarea:focus:not(:focus-visible){box-shadow:none;outline:0}:host textarea:focus,:host textarea:focus-visible{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}@media screen and (-ms-high-contrast: active){:host textarea{border:2px solid currentcolor}}:host textarea:hover{background-color:var(--gds-ref-pallet-base100)}:host textarea:disabled,:host textarea.disabled,:host textarea[aria-disabled=true]{background:var(--sg-form-control-bg-disabled)!important;color:var(--text-disabled-color)!important;border-color:var(--border-disabled-color)!important;cursor:not-allowed}:host textarea:disabled::placeholder,:host textarea.disabled::placeholder,:host textarea[aria-disabled=true]::placeholder{color:var(--text-disabled-color)}:host label:not(.gds-field-notice):is(label){margin-bottom:0}:host label:not(.gds-field-notice).form-control{width:fit-content}@supports (-moz-appearance: none){:host label:not(.gds-field-notice).form-control:focus:not(:focus-visible){box-shadow:none;outline:0}:host label:not(.gds-field-notice).form-control:focus,:host label:not(.gds-field-notice).form-control:focus-within{outline-color:var(--gds-sys-color-focus-outline);outline-style:solid;outline-width:.125rem;outline-offset:.125rem}}:host label:not(.gds-field-notice):not(.form-control){font-weight:500;width:100%;line-height:1.25rem}:host label:not(.gds-field-notice)+input,:host label:not(.gds-field-notice)+textarea,fieldset :host label:not(.gds-field-notice)+div,:host label:not(.gds-field-notice)+button,:host label:not(.gds-field-notice)+.group-stepper,:host label:not(.gds-field-notice)+.stepper-wrapper,:host label:not(.gds-field-notice)+.group{margin-top:.5rem}:host label:not(.gds-field-notice)+.form-info{margin-bottom:.5rem}:host label+.gds-field,:host label+.nggv-field--locked{margin-top:.5rem}:host .hide-if-empty:empty{display:none}:host .unset-state{padding-left:.5rem}:host .gds-field-label--optional{font-weight:400}:host textarea{width:100%;max-width:100%;box-sizing:border-box;font-family:inherit;font-size:1rem}:host textarea.nggv-field--error{border-bottom:.125rem solid #9f000a!important}:host .description{margin-bottom:.5rem}:host .error-wrapper{margin-top:.5rem;display:flex}:host .form-info{font-size:.875rem;line-height:1.25rem;width:100%}:host .gds-form-item__footer .form-info{font-weight:500}:host .gds-form-item__footer .form-info--error{display:flex;align-items:flex-start;gap:.5em;color:#9f000a}:host .gds-form-item__footer .form-info--error .error-icon{margin-top:.128rem;align-items:center}:host .gds-form-item__footer>.form-info--countdown{font-weight:400}:host .no-resize{resize:none}:host .no-resize::-webkit-scrollbar{-webkit-appearance:none}:host .no-resize::-webkit-scrollbar-thumb{border-radius:.5rem}:host.small label:not(.gds-field-notice):not(.form-control){font-size:.875rem;line-height:1rem}:host.small label+textarea{margin-top:.25rem}:host.small textarea{padding:.38rem .5rem;font-size:.875rem}:host.small .error-wrapper,:host.small .form-info{margin-top:.25rem;font-size:.875rem;line-height:1rem}:host.small .gds-form-item__footer:not(:empty){margin-top:0rem}\n"] }]
|
|
96
96
|
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
97
97
|
type: Self
|
|
98
98
|
}, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sebgroup-green-angular-src-v-angular-textarea.mjs","sources":["../../../../libs/angular/src/v-angular/textarea/textarea.component.ts","../../../../libs/angular/src/v-angular/textarea/textarea.component.html","../../../../libs/angular/src/v-angular/textarea/textarea.module.ts","../../../../libs/angular/src/v-angular/textarea/sebgroup-green-angular-src-v-angular-textarea.ts"],"sourcesContent":["import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js'\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core'\nimport { NgControl } from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@jsverse/transloco'\n\nimport { NggvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor'\n\n/** Textarea fields allow users to add and edit longer or multiple line text. */\n@Component({\n selector: 'nggv-textarea',\n templateUrl: './textarea.component.html',\n styleUrls: ['./textarea.component.scss'],\n})\nexport class NggvTextareaComponent extends NggvBaseControlValueAccessorComponent {\n /** Special property used for selecting DOM elements during automated UI testing. */\n @HostBinding('attr.data-thook') @Input() thook: string | null | undefined =\n 'textarea'\n\n /**\n * Sets the small class based on the size input.\n */\n @HostBinding('class.small') get isSmall(): boolean {\n return this.size === 'small'\n }\n\n /**\n * Sets the large class based on the size input.\n */\n @HostBinding('class.large') get isLarge(): boolean {\n return this.size === 'large'\n }\n\n /** Text shown before input has a written value. */\n @Input() placeholder?: string\n /** If set to true, the value will not be editable. */\n @Input() readonly = false\n /** Minimum length (number of characters) of value. */\n @Input() set minLength(length: number) {\n this._minlength = length\n this.cdr.detectChanges()\n }\n get minlength(): number {\n return this._minlength\n }\n\n /**\n * Minimum length (number of characters) of value.\n * @deprecated minlength triggers angular-template-validation. Use @Input() minLength instead.\n */\n @Input() set minlength(length: number) {\n this._minlength = length\n this.cdr.detectChanges()\n }\n /** Maximum length (number of characters) of value. */\n @Input() set maxLength(length: number) {\n this._maxlength = length\n this.cdr.detectChanges()\n }\n get maxlength(): number {\n return this._maxlength\n }\n /**\n * Maximum length (number of characters) of value.\n * @deprecated maxlength triggers angular-template-validation. Use @Input() maxLength instead.\n */\n @Input() set maxlength(length: number) {\n this._maxlength = length\n this.cdr.detectChanges()\n }\n\n /** Returns if maxlength is used */\n get hasMaxLength(): boolean {\n return !!this.maxlength && this.maxlength !== Number.MAX_SAFE_INTEGER\n }\n\n private _maxlength = Number.MAX_SAFE_INTEGER\n\n private _minlength = 0\n\n /** Sets the height of the textarea and disables resize. A scrollbar will appear if necessary. */\n @Input() rows?: number\n\n /**\n * Sets the displayed size of the textarea.\n */\n @Input() size: 'small' | 'large' = 'large'\n\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n super(ngControl, translocoScope, cdr)\n }\n\n /** @internal */\n onInput(event: Event) {\n event.stopPropagation()\n if (this.disabled) return\n this.state = (event.target as HTMLTextAreaElement).value\n this.onChange(this.state)\n }\n}\n","<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n","import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js'\n\nimport { CommonModule } from '@angular/common'\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'\n\nimport { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared'\nimport { NggvCharacterCountdownDirectiveModule } from '@sebgroup/green-angular/src/v-angular/character-countdown'\nimport { NggvI18nModule } from '@sebgroup/green-angular/src/v-angular/i18n'\nimport { NggvTextareaComponent } from './textarea.component'\n\n@NgModule({\n declarations: [NggvTextareaComponent],\n imports: [\n CommonModule,\n NggvI18nModule,\n NggvCharacterCountdownDirectiveModule,\n NggCoreWrapperModule,\n ],\n exports: [NggvTextareaComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NggvTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA;AAMM,MAAO,qBAAsB,SAAQ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oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"sebgroup-green-angular-src-v-angular-textarea.mjs","sources":["../../../../libs/angular/src/v-angular/textarea/textarea.component.ts","../../../../libs/angular/src/v-angular/textarea/textarea.component.html","../../../../libs/angular/src/v-angular/textarea/textarea.module.ts","../../../../libs/angular/src/v-angular/textarea/sebgroup-green-angular-src-v-angular-textarea.ts"],"sourcesContent":["import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js'\n\nimport {\n ChangeDetectorRef,\n Component,\n HostBinding,\n Inject,\n Input,\n Optional,\n Self,\n} from '@angular/core'\nimport { NgControl } from '@angular/forms'\nimport { TRANSLOCO_SCOPE, TranslocoScope } from '@jsverse/transloco'\n\nimport { NggvBaseControlValueAccessorComponent } from '@sebgroup/green-angular/src/v-angular/base-control-value-accessor'\n\n/** Textarea fields allow users to add and edit longer or multiple line text. */\n@Component({\n selector: 'nggv-textarea',\n templateUrl: './textarea.component.html',\n styleUrls: ['./textarea.component.scss'],\n})\nexport class NggvTextareaComponent extends NggvBaseControlValueAccessorComponent {\n /** Special property used for selecting DOM elements during automated UI testing. */\n @HostBinding('attr.data-thook') @Input() thook: string | null | undefined =\n 'textarea'\n\n /**\n * Sets the small class based on the size input.\n */\n @HostBinding('class.small') get isSmall(): boolean {\n return this.size === 'small'\n }\n\n /**\n * Sets the large class based on the size input.\n */\n @HostBinding('class.large') get isLarge(): boolean {\n return this.size === 'large'\n }\n\n /** Text shown before input has a written value. */\n @Input() placeholder?: string\n /** If set to true, the value will not be editable. */\n @Input() readonly = false\n /** Minimum length (number of characters) of value. */\n @Input() set minLength(length: number) {\n this._minlength = length\n this.cdr.detectChanges()\n }\n get minlength(): number {\n return this._minlength\n }\n\n /**\n * Minimum length (number of characters) of value.\n * @deprecated minlength triggers angular-template-validation. Use @Input() minLength instead.\n */\n @Input() set minlength(length: number) {\n this._minlength = length\n this.cdr.detectChanges()\n }\n /** Maximum length (number of characters) of value. */\n @Input() set maxLength(length: number) {\n this._maxlength = length\n this.cdr.detectChanges()\n }\n get maxlength(): number {\n return this._maxlength\n }\n /**\n * Maximum length (number of characters) of value.\n * @deprecated maxlength triggers angular-template-validation. Use @Input() maxLength instead.\n */\n @Input() set maxlength(length: number) {\n this._maxlength = length\n this.cdr.detectChanges()\n }\n\n /** Returns if maxlength is used */\n get hasMaxLength(): boolean {\n return !!this.maxlength && this.maxlength !== Number.MAX_SAFE_INTEGER\n }\n\n private _maxlength = Number.MAX_SAFE_INTEGER\n\n private _minlength = 0\n\n /** Sets the height of the textarea and disables resize. A scrollbar will appear if necessary. */\n @Input() rows?: number\n\n /**\n * Sets the displayed size of the textarea.\n */\n @Input() size: 'small' | 'large' = 'large'\n\n constructor(\n @Self() @Optional() public ngControl: NgControl,\n @Optional()\n @Inject(TRANSLOCO_SCOPE)\n protected translocoScope: TranslocoScope,\n protected cdr: ChangeDetectorRef,\n ) {\n super(ngControl, translocoScope, cdr)\n }\n\n /** @internal */\n onInput(event: Event) {\n event.stopPropagation()\n if (this.disabled) return\n this.state = (event.target as HTMLTextAreaElement).value\n this.onChange(this.state)\n }\n}\n","<!-- LABEL -->\n<label\n [id]=\"id + '-label'\"\n class=\"gds-field-label hide-if-empty\"\n [attr.for]=\"id + '-textarea'\"\n *transloco=\"let t; read: scope\"\n>\n <ng-template\n *ngTemplateOutlet=\"labelContentTpl || basicLabelContentTpl\"\n ></ng-template>\n <ng-template #basicLabelContentTpl>\n <!-- to trigger css:empty if no label was added -->\n <ng-container *ngIf=\"label\">\n {{ label }}\n <span\n *ngIf=\"optional === true || (required !== true && optional !== false)\"\n class=\"gds-field-label--optional\"\n >\n ({{ t('label.optional') }})\n </span>\n </ng-container>\n </ng-template>\n</label>\n\n<!-- DESCRIPTION -->\n<div class=\"form-info description hide-if-empty\" *ngIf=\"description && descriptionIsVisible\">\n {{ description }}\n</div>\n\n<!-- LOCKED INPUT -->\n<ng-container *ngIf=\"locked\">\n <ng-template\n *ngTemplateOutlet=\"\n lockedTpl || defaultLockedTpl;\n context: { $implicit: state }\n \"\n ></ng-template>\n <ng-template #defaultLockedTpl>\n <div\n [id]=\"id + '-textarea'\"\n class=\"nggv-field--locked\"\n [attr.name]=\"name\"\n [attr.value]=\"state\"\n [attr.role]=\"role\"\n >\n <span *ngIf=\"!state\" class=\"unset-state\">-</span>\n <ng-container *ngIf=\"state\">\n {{ state }}\n </ng-container>\n </div>\n </ng-template>\n</ng-container>\n\n<!-- INPUT FIELD -->\n<ng-container *ngIf=\"!locked\">\n <textarea\n #input\n [id]=\"id + '-textarea'\"\n class=\"gds-field\"\n [ngClass]=\"{ 'no-resize': !!rows }\"\n [class.nggv-field--error]=\"invalid\"\n [attr.name]=\"name\"\n [attr.required]=\"required || null\"\n [disabled]=\"disabled\"\n [autofocus]=\"autofocus\"\n [readOnly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [attr.role]=\"role\"\n [attr.rows]=\"rows\"\n [attr.placeholder]=\"placeholder\"\n [attr.aria-label]=\"description\"\n [value]=\"state\"\n title=\"\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n ></textarea>\n\n <!-- ERRORS -->\n <div\n class=\"gds-form-item__footer error-wrapper\"\n *transloco=\"let t; read: scope\"\n >\n <span\n class=\"form-info form-info--error\"\n [attr.for]=\"id + '-textarea'\"\n *ngIf=\"invalid && (error || ngControl?.invalid)\"\n >\n <span class=\"error-icon\">\n <gds-icon-triangle-exclamation\n width=\"16\"\n height=\"16\"\n solid=\"true\"\n *nggCoreElement\n ></gds-icon-triangle-exclamation>\n </span>\n\n <span\n *ngIf=\"error; else errorsRef\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >{{ error }}</span\n >\n <ng-template #errorsRef>\n <span\n *ngIf=\"firstError as error\"\n [attr.data-thook]=\"thook + '-errorlabel'\"\n >\n {{ t('error.field' + error?.code, error?.params) }}\n </span>\n </ng-template>\n </span>\n\n <ng-container *ngIf=\"hasMaxLength\">\n <span\n *nggvCharacterCountdown=\"\n maxlength;\n currentLength: (inputRef?.nativeElement?.value ?? '').length;\n charactersLeft as charactersLeft\n \"\n class=\"form-info form-info--countdown\"\n style=\"text-align: right\"\n >\n {{ charactersLeft }} {{ t('label.maxlength') }}\n </span>\n </ng-container>\n </div>\n\n <!-- CHILDREN -->\n <ng-content></ng-content>\n</ng-container>\n","import '@sebgroup/green-core/components/icon/icons/triangle-exclamation.js'\n\nimport { CommonModule } from '@angular/common'\nimport { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'\n\nimport { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared'\nimport { NggvCharacterCountdownDirectiveModule } from '@sebgroup/green-angular/src/v-angular/character-countdown'\nimport { NggvI18nModule } from '@sebgroup/green-angular/src/v-angular/i18n'\nimport { NggvTextareaComponent } from './textarea.component'\n\n@NgModule({\n declarations: [NggvTextareaComponent],\n imports: [\n CommonModule,\n NggvI18nModule,\n NggvCharacterCountdownDirectiveModule,\n NggCoreWrapperModule,\n ],\n exports: [NggvTextareaComponent],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n})\nexport class NggvTextareaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAgBA;AAMM,MAAO,qBAAsB,SAAQ,qCAAqC,CAAA;AAK9E;;AAEG;AACH,IAAA,IAAgC,OAAO,GAAA;AACrC,QAAA,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,CAAA;KAC7B;AAED;;AAEG;AACH,IAAA,IAAgC,OAAO,GAAA;AACrC,QAAA,OAAO,IAAI,CAAC,IAAI,KAAK,OAAO,CAAA;KAC7B;;IAOD,IAAa,SAAS,CAAC,MAAc,EAAA;AACnC,QAAA,IAAI,CAA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B,KAAK;gBAKO,SAAS,EAAA,CAAA;sBAArB,KAAK;gBAWO,SAAS,EAAA,CAAA;sBAArB,KAAK;gBAeG,IAAI,EAAA,CAAA;sBAAZ,KAAK;gBAKG,IAAI,EAAA,CAAA;sBAAZ,KAAK;;;MEzEK,kBAAkB,CAAA;+GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;gHAAlB,kBAAkB,EAAA,YAAA,EAAA,CAVd,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAElC,YAAY;YACZ,cAAc;YACd,qCAAqC;AACrC,YAAA,oBAAoB,aAEZ,qBAAqB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAR3B,YAAY;YACZ,cAAc;YACd,qCAAqC;YACrC,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAKX,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAX9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;AACrC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,cAAc;wBACd,qCAAqC;wBACrC,oBAAoB;AACrB,qBAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;oBAChC,OAAO,EAAE,CAAC,sBAAsB,CAAC;AAClC,iBAAA,CAAA;;;ACpBD;;AAEG;;;;"}
|
|
@@ -124,7 +124,7 @@ class ToastComponent {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ToastComponent, deps: [{ token: ToastMessageService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
127
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ToastComponent, selector: "nggv-toast", inputs: { closeButtonAriaLabel: "closeButtonAriaLabel" }, ngImport: i0, template: "<output class=\"messages-container\" aria-live=\"polite\">\n <div\n class=\"message\"\n *ngFor=\"let message of messages; trackBy: trackByMessageIndex\"\n [ngClass]=\"message.type\"\n @toastAnimation\n (mouseenter)=\"onMouseEnter(message)\"\n (mouseleave)=\"onMouseLeave(message)\"\n >\n <div class=\"content\" *transloco=\"let t; read: message.translocoScope\">\n <div class=\"message-type-icon-wrapper\">\n <ng-container *ngIf=\"message.type === 'success'\">\n <i>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.6203 6.60836L9.40014 14.8285L6.37976 11.8081C6.23332 11.6617 5.99588 11.6617 5.84942 11.8081L4.96554 12.692C4.8191 12.8384 4.8191 13.0759 4.96554 13.2223L9.13495 17.3917C9.28138 17.5382 9.51882 17.5382 9.66529 17.3917L19.0344 8.02258C19.1809 7.87614 19.1809 7.63871 19.0344 7.49224L18.1506 6.60836C18.0041 6.46193 17.7667 6.46193 17.6203 6.60836Z\"\n fill=\"white\"\n ></path>\n </svg>\n </i>\n </ng-container>\n <ng-container\n *ngIf=\"message.type === 'error' || message.type === 'warning'\"\n >\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM10.8682 7.42857H13.1318C13.3777 7.42857 13.5731 7.635 13.5597 7.8805L13.2948 12.7376C13.2824 12.9649 13.0945 13.1429 12.8669 13.1429H11.1331C10.9055 13.1429 10.7176 12.9649 10.7052 12.7376L10.4402 7.8805C10.4269 7.635 10.6223 7.42857 10.8682 7.42857ZM12 17.0714C11.0927 17.0714 10.3571 16.3359 10.3571 15.4286C10.3571 14.5213 11.0927 13.7857 12 13.7857C12.9073 13.7857 13.6429 14.5213 13.6429 15.4286C13.6429 16.3359 12.9073 17.0714 12 17.0714Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n <ng-container *ngIf=\"message.type === 'information'\">\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM12 7.07143C12.8284 7.07143 13.5 7.743 13.5 8.57143C13.5 9.39986 12.8284 10.0714 12 10.0714C11.1716 10.0714 10.5 9.39986 10.5 8.57143C10.5 7.743 11.1716 7.07143 12 7.07143ZM14 16.1429C14 16.3795 13.8081 16.5714 13.5714 16.5714H10.4286C10.1919 16.5714 10 16.3795 10 16.1429V15.2857C10 15.049 10.1919 14.8571 10.4286 14.8571H10.8571V12.5714H10.4286C10.1919 12.5714 10 12.3795 10 12.1429V11.2857C10 11.049 10.1919 10.8571 10.4286 10.8571H12.7143C12.951 10.8571 13.1429 11.049 13.1429 11.2857V14.8571H13.5714C13.8081 14.8571 14 15.049 14 15.2857V16.1429Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n </div>\n <div class=\"text-content\">\n @if (message.template) {\n <ng-template\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"{ $implicit: message.templateContext }\"\n ></ng-template>\n } @else {\n @if (message.titleText) {\n <div>{{ t(message.titleText) }}</div>\n }\n @if (message.bodyText) {\n <div class=\"text-body-content\">\n {{ t(message.bodyText) }}\n </div>\n }\n }\n </div>\n <button\n class=\"close-icon-button\"\n [ngClass]=\"{ information: message.type === 'information' }\"\n (click)=\"removeMessage(message)\"\n [attr.aria-label]=\"closeButtonAriaLabel\"\n >\n <gds-icon-cross-small\n class=\"close-icon\"\n *nggCoreElement\n ></gds-icon-cross-small>\n </button>\n </div>\n </div>\n</output>\n", styles: [":host .messages-container{position:fixed;bottom:1rem;right:1rem;z-index:9999}:host .message{position:relative;font-size:1rem;max-width:22rem;min-width:22rem;min-height:3rem;box-shadow:0 2px 6px #00000026;margin-top:1rem}:host .content{display:flex;height:100%;padding:0;justify-content:space-between}:host .text-content{margin-top:1rem;margin-bottom:1rem;width:100%}:host .text-body-content{padding-top:1.5rem}:host .message-type-icon-wrapper{padding:1rem}:host .message-type-icon-wrapper i{display:block;width:1.25rem;height:1.25rem}:host .close-icon-button{box-sizing:border-box;display:grid;place-content:center;width:2rem;height:2rem;flex-shrink:0;font-size:1rem;line-height:1.5rem;margin:.5rem;background:transparent;border:none;color:inherit;padding:0;cursor:pointer;min-height:32px}:host .close-icon-button:hover{color:#333;border-radius:100%}:host .close-icon-button:not(.information):hover{background-color:#fff}:host .close-icon-button.information:hover{background-color:#dedede}:host .success{background-color:#308800;color:#fff}:host .error{background-color:#d81a1a;color:#fff}:host .warning{background-color:#ffc500;color:#333}:host .information{background-color:#333;color:#e9e9e9}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggCoreElementDirective, selector: "[nggCoreElement]" }], animations: [
|
|
127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ToastComponent, selector: "nggv-toast", inputs: { closeButtonAriaLabel: "closeButtonAriaLabel" }, ngImport: i0, template: "<output class=\"messages-container\" aria-live=\"polite\">\n <div\n class=\"message\"\n *ngFor=\"let message of messages; trackBy: trackByMessageIndex\"\n [ngClass]=\"message.type\"\n @toastAnimation\n (mouseenter)=\"onMouseEnter(message)\"\n (mouseleave)=\"onMouseLeave(message)\"\n >\n <div class=\"content\" *transloco=\"let t; read: message.translocoScope\">\n <div class=\"message-type-icon-wrapper\">\n <ng-container *ngIf=\"message.type === 'success'\">\n <i>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.6203 6.60836L9.40014 14.8285L6.37976 11.8081C6.23332 11.6617 5.99588 11.6617 5.84942 11.8081L4.96554 12.692C4.8191 12.8384 4.8191 13.0759 4.96554 13.2223L9.13495 17.3917C9.28138 17.5382 9.51882 17.5382 9.66529 17.3917L19.0344 8.02258C19.1809 7.87614 19.1809 7.63871 19.0344 7.49224L18.1506 6.60836C18.0041 6.46193 17.7667 6.46193 17.6203 6.60836Z\"\n fill=\"white\"\n ></path>\n </svg>\n </i>\n </ng-container>\n <ng-container\n *ngIf=\"message.type === 'error' || message.type === 'warning'\"\n >\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM10.8682 7.42857H13.1318C13.3777 7.42857 13.5731 7.635 13.5597 7.8805L13.2948 12.7376C13.2824 12.9649 13.0945 13.1429 12.8669 13.1429H11.1331C10.9055 13.1429 10.7176 12.9649 10.7052 12.7376L10.4402 7.8805C10.4269 7.635 10.6223 7.42857 10.8682 7.42857ZM12 17.0714C11.0927 17.0714 10.3571 16.3359 10.3571 15.4286C10.3571 14.5213 11.0927 13.7857 12 13.7857C12.9073 13.7857 13.6429 14.5213 13.6429 15.4286C13.6429 16.3359 12.9073 17.0714 12 17.0714Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n <ng-container *ngIf=\"message.type === 'information'\">\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM12 7.07143C12.8284 7.07143 13.5 7.743 13.5 8.57143C13.5 9.39986 12.8284 10.0714 12 10.0714C11.1716 10.0714 10.5 9.39986 10.5 8.57143C10.5 7.743 11.1716 7.07143 12 7.07143ZM14 16.1429C14 16.3795 13.8081 16.5714 13.5714 16.5714H10.4286C10.1919 16.5714 10 16.3795 10 16.1429V15.2857C10 15.049 10.1919 14.8571 10.4286 14.8571H10.8571V12.5714H10.4286C10.1919 12.5714 10 12.3795 10 12.1429V11.2857C10 11.049 10.1919 10.8571 10.4286 10.8571H12.7143C12.951 10.8571 13.1429 11.049 13.1429 11.2857V14.8571H13.5714C13.8081 14.8571 14 15.049 14 15.2857V16.1429Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n </div>\n <div class=\"text-content\">\n @if (message.template) {\n <ng-template\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"{ $implicit: message.templateContext }\"\n ></ng-template>\n } @else {\n @if (message.titleText) {\n <div>{{ t(message.titleText) }}</div>\n }\n @if (message.bodyText) {\n <div class=\"text-body-content\">\n {{ t(message.bodyText) }}\n </div>\n }\n }\n </div>\n <button\n class=\"close-icon-button\"\n [ngClass]=\"{ information: message.type === 'information' }\"\n (click)=\"removeMessage(message)\"\n [attr.aria-label]=\"closeButtonAriaLabel\"\n >\n <gds-icon-cross-small\n class=\"close-icon\"\n *nggCoreElement\n ></gds-icon-cross-small>\n </button>\n </div>\n </div>\n</output>\n", styles: [":host .messages-container{position:fixed;bottom:1rem;right:1rem;z-index:9999}:host .message{position:relative;font-size:1rem;max-width:22rem;min-width:22rem;min-height:3rem;box-shadow:0 2px 6px #00000026;margin-top:1rem}@media (max-width: 35.98em){:host .message{max-width:calc(100vw - 2rem);min-width:calc(100vw - 2rem)}}:host .content{display:flex;height:100%;padding:0;justify-content:space-between}:host .text-content{margin-top:1rem;margin-bottom:1rem;width:100%}:host .text-body-content{padding-top:1.5rem}:host .message-type-icon-wrapper{padding:1rem}:host .message-type-icon-wrapper i{display:block;width:1.25rem;height:1.25rem}:host .close-icon-button{box-sizing:border-box;display:grid;place-content:center;width:2rem;height:2rem;flex-shrink:0;font-size:1rem;line-height:1.5rem;margin:.5rem;background:transparent;border:none;color:inherit;padding:0;cursor:pointer;min-height:32px}:host .close-icon-button:hover{color:#333;border-radius:100%}:host .close-icon-button:not(.information):hover{background-color:#fff}:host .close-icon-button.information:hover{background-color:#dedede}@media (max-width: 35.98em){:host .close-icon-button{min-width:auto}}:host .success{background-color:#308800;color:#fff}:host .error{background-color:#d81a1a;color:#fff}:host .warning{background-color:#ffc500;color:#333}:host .information{background-color:#333;color:#e9e9e9}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "directive", type: i4.NggCoreElementDirective, selector: "[nggCoreElement]" }], animations: [
|
|
128
128
|
trigger('toastAnimation', [
|
|
129
129
|
transition(':enter', [
|
|
130
130
|
style({ opacity: 0, transform: 'translateY(100%)' }),
|
|
@@ -148,7 +148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
148
148
|
animate('300ms ease-out', style({ opacity: 0, transform: 'translateY(100%)' })),
|
|
149
149
|
]),
|
|
150
150
|
]),
|
|
151
|
-
], template: "<output class=\"messages-container\" aria-live=\"polite\">\n <div\n class=\"message\"\n *ngFor=\"let message of messages; trackBy: trackByMessageIndex\"\n [ngClass]=\"message.type\"\n @toastAnimation\n (mouseenter)=\"onMouseEnter(message)\"\n (mouseleave)=\"onMouseLeave(message)\"\n >\n <div class=\"content\" *transloco=\"let t; read: message.translocoScope\">\n <div class=\"message-type-icon-wrapper\">\n <ng-container *ngIf=\"message.type === 'success'\">\n <i>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.6203 6.60836L9.40014 14.8285L6.37976 11.8081C6.23332 11.6617 5.99588 11.6617 5.84942 11.8081L4.96554 12.692C4.8191 12.8384 4.8191 13.0759 4.96554 13.2223L9.13495 17.3917C9.28138 17.5382 9.51882 17.5382 9.66529 17.3917L19.0344 8.02258C19.1809 7.87614 19.1809 7.63871 19.0344 7.49224L18.1506 6.60836C18.0041 6.46193 17.7667 6.46193 17.6203 6.60836Z\"\n fill=\"white\"\n ></path>\n </svg>\n </i>\n </ng-container>\n <ng-container\n *ngIf=\"message.type === 'error' || message.type === 'warning'\"\n >\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM10.8682 7.42857H13.1318C13.3777 7.42857 13.5731 7.635 13.5597 7.8805L13.2948 12.7376C13.2824 12.9649 13.0945 13.1429 12.8669 13.1429H11.1331C10.9055 13.1429 10.7176 12.9649 10.7052 12.7376L10.4402 7.8805C10.4269 7.635 10.6223 7.42857 10.8682 7.42857ZM12 17.0714C11.0927 17.0714 10.3571 16.3359 10.3571 15.4286C10.3571 14.5213 11.0927 13.7857 12 13.7857C12.9073 13.7857 13.6429 14.5213 13.6429 15.4286C13.6429 16.3359 12.9073 17.0714 12 17.0714Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n <ng-container *ngIf=\"message.type === 'information'\">\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM12 7.07143C12.8284 7.07143 13.5 7.743 13.5 8.57143C13.5 9.39986 12.8284 10.0714 12 10.0714C11.1716 10.0714 10.5 9.39986 10.5 8.57143C10.5 7.743 11.1716 7.07143 12 7.07143ZM14 16.1429C14 16.3795 13.8081 16.5714 13.5714 16.5714H10.4286C10.1919 16.5714 10 16.3795 10 16.1429V15.2857C10 15.049 10.1919 14.8571 10.4286 14.8571H10.8571V12.5714H10.4286C10.1919 12.5714 10 12.3795 10 12.1429V11.2857C10 11.049 10.1919 10.8571 10.4286 10.8571H12.7143C12.951 10.8571 13.1429 11.049 13.1429 11.2857V14.8571H13.5714C13.8081 14.8571 14 15.049 14 15.2857V16.1429Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n </div>\n <div class=\"text-content\">\n @if (message.template) {\n <ng-template\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"{ $implicit: message.templateContext }\"\n ></ng-template>\n } @else {\n @if (message.titleText) {\n <div>{{ t(message.titleText) }}</div>\n }\n @if (message.bodyText) {\n <div class=\"text-body-content\">\n {{ t(message.bodyText) }}\n </div>\n }\n }\n </div>\n <button\n class=\"close-icon-button\"\n [ngClass]=\"{ information: message.type === 'information' }\"\n (click)=\"removeMessage(message)\"\n [attr.aria-label]=\"closeButtonAriaLabel\"\n >\n <gds-icon-cross-small\n class=\"close-icon\"\n *nggCoreElement\n ></gds-icon-cross-small>\n </button>\n </div>\n </div>\n</output>\n", styles: [":host .messages-container{position:fixed;bottom:1rem;right:1rem;z-index:9999}:host .message{position:relative;font-size:1rem;max-width:22rem;min-width:22rem;min-height:3rem;box-shadow:0 2px 6px #00000026;margin-top:1rem}:host .content{display:flex;height:100%;padding:0;justify-content:space-between}:host .text-content{margin-top:1rem;margin-bottom:1rem;width:100%}:host .text-body-content{padding-top:1.5rem}:host .message-type-icon-wrapper{padding:1rem}:host .message-type-icon-wrapper i{display:block;width:1.25rem;height:1.25rem}:host .close-icon-button{box-sizing:border-box;display:grid;place-content:center;width:2rem;height:2rem;flex-shrink:0;font-size:1rem;line-height:1.5rem;margin:.5rem;background:transparent;border:none;color:inherit;padding:0;cursor:pointer;min-height:32px}:host .close-icon-button:hover{color:#333;border-radius:100%}:host .close-icon-button:not(.information):hover{background-color:#fff}:host .close-icon-button.information:hover{background-color:#dedede}:host .success{background-color:#308800;color:#fff}:host .error{background-color:#d81a1a;color:#fff}:host .warning{background-color:#ffc500;color:#333}:host .information{background-color:#333;color:#e9e9e9}\n"] }]
|
|
151
|
+
], template: "<output class=\"messages-container\" aria-live=\"polite\">\n <div\n class=\"message\"\n *ngFor=\"let message of messages; trackBy: trackByMessageIndex\"\n [ngClass]=\"message.type\"\n @toastAnimation\n (mouseenter)=\"onMouseEnter(message)\"\n (mouseleave)=\"onMouseLeave(message)\"\n >\n <div class=\"content\" *transloco=\"let t; read: message.translocoScope\">\n <div class=\"message-type-icon-wrapper\">\n <ng-container *ngIf=\"message.type === 'success'\">\n <i>\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17.6203 6.60836L9.40014 14.8285L6.37976 11.8081C6.23332 11.6617 5.99588 11.6617 5.84942 11.8081L4.96554 12.692C4.8191 12.8384 4.8191 13.0759 4.96554 13.2223L9.13495 17.3917C9.28138 17.5382 9.51882 17.5382 9.66529 17.3917L19.0344 8.02258C19.1809 7.87614 19.1809 7.63871 19.0344 7.49224L18.1506 6.60836C18.0041 6.46193 17.7667 6.46193 17.6203 6.60836Z\"\n fill=\"white\"\n ></path>\n </svg>\n </i>\n </ng-container>\n <ng-container\n *ngIf=\"message.type === 'error' || message.type === 'warning'\"\n >\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM10.8682 7.42857H13.1318C13.3777 7.42857 13.5731 7.635 13.5597 7.8805L13.2948 12.7376C13.2824 12.9649 13.0945 13.1429 12.8669 13.1429H11.1331C10.9055 13.1429 10.7176 12.9649 10.7052 12.7376L10.4402 7.8805C10.4269 7.635 10.6223 7.42857 10.8682 7.42857ZM12 17.0714C11.0927 17.0714 10.3571 16.3359 10.3571 15.4286C10.3571 14.5213 11.0927 13.7857 12 13.7857C12.9073 13.7857 13.6429 14.5213 13.6429 15.4286C13.6429 16.3359 12.9073 17.0714 12 17.0714Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n <ng-container *ngIf=\"message.type === 'information'\">\n <i>\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.2857 4H5.71429C4.7675 4 4 4.7675 4 5.71429V18.2857C4 19.2325 4.7675 20 5.71429 20H18.2857C19.2325 20 20 19.2325 20 18.2857V5.71429C20 4.7675 19.2325 4 18.2857 4ZM12 7.07143C12.8284 7.07143 13.5 7.743 13.5 8.57143C13.5 9.39986 12.8284 10.0714 12 10.0714C11.1716 10.0714 10.5 9.39986 10.5 8.57143C10.5 7.743 11.1716 7.07143 12 7.07143ZM14 16.1429C14 16.3795 13.8081 16.5714 13.5714 16.5714H10.4286C10.1919 16.5714 10 16.3795 10 16.1429V15.2857C10 15.049 10.1919 14.8571 10.4286 14.8571H10.8571V12.5714H10.4286C10.1919 12.5714 10 12.3795 10 12.1429V11.2857C10 11.049 10.1919 10.8571 10.4286 10.8571H12.7143C12.951 10.8571 13.1429 11.049 13.1429 11.2857V14.8571H13.5714C13.8081 14.8571 14 15.049 14 15.2857V16.1429Z\"\n fill=\"currentColor\"\n />\n </svg>\n </i>\n </ng-container>\n </div>\n <div class=\"text-content\">\n @if (message.template) {\n <ng-template\n [ngTemplateOutlet]=\"message.template\"\n [ngTemplateOutletContext]=\"{ $implicit: message.templateContext }\"\n ></ng-template>\n } @else {\n @if (message.titleText) {\n <div>{{ t(message.titleText) }}</div>\n }\n @if (message.bodyText) {\n <div class=\"text-body-content\">\n {{ t(message.bodyText) }}\n </div>\n }\n }\n </div>\n <button\n class=\"close-icon-button\"\n [ngClass]=\"{ information: message.type === 'information' }\"\n (click)=\"removeMessage(message)\"\n [attr.aria-label]=\"closeButtonAriaLabel\"\n >\n <gds-icon-cross-small\n class=\"close-icon\"\n *nggCoreElement\n ></gds-icon-cross-small>\n </button>\n </div>\n </div>\n</output>\n", styles: [":host .messages-container{position:fixed;bottom:1rem;right:1rem;z-index:9999}:host .message{position:relative;font-size:1rem;max-width:22rem;min-width:22rem;min-height:3rem;box-shadow:0 2px 6px #00000026;margin-top:1rem}@media (max-width: 35.98em){:host .message{max-width:calc(100vw - 2rem);min-width:calc(100vw - 2rem)}}:host .content{display:flex;height:100%;padding:0;justify-content:space-between}:host .text-content{margin-top:1rem;margin-bottom:1rem;width:100%}:host .text-body-content{padding-top:1.5rem}:host .message-type-icon-wrapper{padding:1rem}:host .message-type-icon-wrapper i{display:block;width:1.25rem;height:1.25rem}:host .close-icon-button{box-sizing:border-box;display:grid;place-content:center;width:2rem;height:2rem;flex-shrink:0;font-size:1rem;line-height:1.5rem;margin:.5rem;background:transparent;border:none;color:inherit;padding:0;cursor:pointer;min-height:32px}:host .close-icon-button:hover{color:#333;border-radius:100%}:host .close-icon-button:not(.information):hover{background-color:#fff}:host .close-icon-button.information:hover{background-color:#dedede}@media (max-width: 35.98em){:host .close-icon-button{min-width:auto}}:host .success{background-color:#308800;color:#fff}:host .error{background-color:#d81a1a;color:#fff}:host .warning{background-color:#ffc500;color:#333}:host .information{background-color:#333;color:#e9e9e9}\n"] }]
|
|
152
152
|
}], ctorParameters: () => [{ type: ToastMessageService }], propDecorators: { closeButtonAriaLabel: [{
|
|
153
153
|
type: Input
|
|
154
154
|
}] } });
|