@i-cell/ids-angular 0.1.4 → 0.1.6

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.
Files changed (62) hide show
  1. package/avatar/avatar.component.d.ts +1 -1
  2. package/button/button.component.d.ts +3 -3
  3. package/checkbox/checkbox.component.d.ts +7 -5
  4. package/checkbox/types/checkbox-group-child.d.ts +2 -1
  5. package/dialog/dialog.component.d.ts +3 -3
  6. package/fesm2022/i-cell-ids-angular-avatar.mjs +4 -4
  7. package/fesm2022/i-cell-ids-angular-avatar.mjs.map +1 -1
  8. package/fesm2022/i-cell-ids-angular-button.mjs +4 -4
  9. package/fesm2022/i-cell-ids-angular-button.mjs.map +1 -1
  10. package/fesm2022/i-cell-ids-angular-checkbox.mjs +21 -20
  11. package/fesm2022/i-cell-ids-angular-checkbox.mjs.map +1 -1
  12. package/fesm2022/i-cell-ids-angular-dialog.mjs +5 -5
  13. package/fesm2022/i-cell-ids-angular-dialog.mjs.map +1 -1
  14. package/fesm2022/i-cell-ids-angular-forms.mjs +62 -57
  15. package/fesm2022/i-cell-ids-angular-forms.mjs.map +1 -1
  16. package/fesm2022/i-cell-ids-angular-icon-button.mjs +3 -3
  17. package/fesm2022/i-cell-ids-angular-icon-button.mjs.map +1 -1
  18. package/fesm2022/i-cell-ids-angular-icon.mjs +12 -2
  19. package/fesm2022/i-cell-ids-angular-icon.mjs.map +1 -1
  20. package/fesm2022/i-cell-ids-angular-menu.mjs +6 -6
  21. package/fesm2022/i-cell-ids-angular-menu.mjs.map +1 -1
  22. package/fesm2022/i-cell-ids-angular-notification.mjs +3 -3
  23. package/fesm2022/i-cell-ids-angular-notification.mjs.map +1 -1
  24. package/fesm2022/i-cell-ids-angular-paginator.mjs +11 -11
  25. package/fesm2022/i-cell-ids-angular-paginator.mjs.map +1 -1
  26. package/fesm2022/i-cell-ids-angular-radio.mjs +11 -11
  27. package/fesm2022/i-cell-ids-angular-radio.mjs.map +1 -1
  28. package/fesm2022/i-cell-ids-angular-select.mjs +59 -19
  29. package/fesm2022/i-cell-ids-angular-select.mjs.map +1 -1
  30. package/fesm2022/i-cell-ids-angular-snackbar.mjs +8 -8
  31. package/fesm2022/i-cell-ids-angular-snackbar.mjs.map +1 -1
  32. package/fesm2022/i-cell-ids-angular-spinner.mjs +67 -0
  33. package/fesm2022/i-cell-ids-angular-spinner.mjs.map +1 -0
  34. package/fesm2022/i-cell-ids-angular-switch.mjs +15 -15
  35. package/fesm2022/i-cell-ids-angular-switch.mjs.map +1 -1
  36. package/fesm2022/i-cell-ids-angular-tab.mjs +7 -6
  37. package/fesm2022/i-cell-ids-angular-tab.mjs.map +1 -1
  38. package/fesm2022/i-cell-ids-angular-table.mjs +4 -7
  39. package/fesm2022/i-cell-ids-angular-table.mjs.map +1 -1
  40. package/fesm2022/i-cell-ids-angular-tag.mjs +4 -4
  41. package/fesm2022/i-cell-ids-angular-tag.mjs.map +1 -1
  42. package/forms/components/form-field/form-field-control.d.ts +1 -1
  43. package/forms/components/form-field/form-field.component.d.ts +12 -13
  44. package/forms/components/input/input.directive.d.ts +15 -10
  45. package/icon/icon-defaults.d.ts +1 -0
  46. package/icon/icon.component.d.ts +1 -0
  47. package/icon-button/icon-button.component.d.ts +2 -2
  48. package/menu/menu-item/menu-item.component.d.ts +4 -4
  49. package/notification/notification.component.d.ts +1 -1
  50. package/package.json +13 -9
  51. package/paginator/paginator.component.d.ts +7 -7
  52. package/radio/radio.component.d.ts +6 -6
  53. package/select/select.component.d.ts +19 -7
  54. package/snackbar/snackbar.component.d.ts +5 -5
  55. package/spinner/index.d.ts +5 -0
  56. package/spinner/public-api.d.ts +3 -0
  57. package/spinner/spinner-defaults.d.ts +11 -0
  58. package/spinner/spinner.component.d.ts +17 -0
  59. package/spinner/types/spinner-variant.type.d.ts +11 -0
  60. package/switch/switch.component.d.ts +3 -3
  61. package/tab/tab-group.component.d.ts +3 -2
  62. package/tag/tag.component.d.ts +3 -3
@@ -73,7 +73,7 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
73
73
  this._defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);
74
74
  this._switchGroup = inject(IdsSwitchGroupComponent, { optional: true });
75
75
  this._switchElement = viewChild('switch');
76
- this.isChecked = signal(false);
76
+ this._isChecked = signal(false);
77
77
  this.label = input();
78
78
  this.name = input();
79
79
  this.readonly = input(false, { transform: coerceBooleanAttribute });
@@ -83,7 +83,7 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
83
83
  this.hasIcon = input(this._defaultConfig.hasIcon);
84
84
  this.iconPosition = input(this._defaultConfig.iconPosition);
85
85
  this.labelPosition = input(this._defaultConfig.labelPosition);
86
- this.isDisabled = signal(false);
86
+ this._isDisabled = signal(false);
87
87
  this.ariaLabel = input(null, { alias: 'aria-label' });
88
88
  this.ariaLabelledBy = input(null, { alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) });
89
89
  this.ariaDescribedBy = input(null, { alias: 'aria-describedby' });
@@ -93,12 +93,12 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
93
93
  this._parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition());
94
94
  this._hasHandleIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE);
95
95
  this._hasTrackIcon = computed(() => this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK);
96
- this._isFocusable = computed(() => !this.isDisabled() && !this.readonly());
96
+ this._isFocusable = computed(() => !this._isDisabled() && !this.readonly());
97
97
  this._hostClasses = computed(() => this._getHostClasses([
98
98
  this._parentOrSelfSize(),
99
99
  this.variant(),
100
- this.isDisabled() ? 'disabled' : null,
101
- this.isChecked() ? 'on' : null,
100
+ this._isDisabled() ? 'disabled' : null,
101
+ this._isChecked() ? 'on' : null,
102
102
  [
103
103
  'label',
104
104
  this._parentOrSelfLabelPosition(),
@@ -112,7 +112,7 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
112
112
  }
113
113
  set disabled(value) {
114
114
  if (value !== this.disabled) {
115
- this.isDisabled.set(value);
115
+ this._isDisabled.set(value);
116
116
  }
117
117
  }
118
118
  focus() {
@@ -121,7 +121,7 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
121
121
  }
122
122
  }
123
123
  writeValue(value) {
124
- this.isChecked.set(Boolean(value));
124
+ this._isChecked.set(Boolean(value));
125
125
  }
126
126
  registerOnChange(fn) {
127
127
  this._onChange = fn;
@@ -130,17 +130,17 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
130
130
  this._onTouched = fn;
131
131
  }
132
132
  setDisabledState(isDisabled) {
133
- this.isDisabled.set(isDisabled);
133
+ this._isDisabled.set(isDisabled);
134
134
  }
135
135
  toggle() {
136
- if (!this.isDisabled() && !this.readonly()) {
137
- this.isChecked.update((checked) => !checked);
138
- this._onChange(this.isChecked());
136
+ if (!this._isDisabled() && !this.readonly()) {
137
+ this._isChecked.update((checked) => !checked);
138
+ this._onChange(this._isChecked());
139
139
  this._onTouched();
140
140
  }
141
141
  }
142
- handleClick() {
143
- if (!this.isDisabled()) {
142
+ _handleClick() {
143
+ if (!this._isDisabled()) {
144
144
  this.toggle();
145
145
  }
146
146
  }
@@ -151,7 +151,7 @@ class IdsSwitchComponent extends ComponentBaseWithDefaults {
151
151
  useExisting: IdsSwitchComponent,
152
152
  multi: true,
153
153
  },
154
- ], viewQueries: [{ propertyName: "_switchElement", first: true, predicate: ["switch"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], animations: [switchAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
154
+ ], viewQueries: [{ propertyName: "_switchElement", first: true, predicate: ["switch"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"_isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"_isChecked()\"\n [@switchAnimation]=\"_isChecked() ? 'on' : 'off'\"\n (click)=\"_handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], animations: [switchAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
155
155
  }
156
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsSwitchComponent, decorators: [{
157
157
  type: Component,
@@ -167,7 +167,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
167
167
  '[aria-label]': 'ariaLabel()',
168
168
  '[aria-labelledby]': 'ariaLabelledBy()',
169
169
  '[aria-describedby]': 'ariaDescribedBy()',
170
- }, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n" }]
170
+ }, template: "<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"_isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"_isChecked()\"\n [@switchAnimation]=\"_isChecked() ? 'on' : 'off'\"\n (click)=\"_handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n" }]
171
171
  }], propDecorators: { disabled: [{
172
172
  type: Input,
173
173
  args: [{ transform: coerceBooleanAttribute }]
@@ -1 +1 @@
1
- {"version":3,"file":"i-cell-ids-angular-switch.mjs","sources":["../../../projects/widgets/switch/types/switch-positions.type.ts","../../../projects/widgets/switch/types/switch-variant.type.ts","../../../projects/widgets/switch/switch-defaults.ts","../../../projects/widgets/switch/switch-group.component.ts","../../../projects/widgets/switch/switch-group.component.html","../../../projects/widgets/switch/switch-animations.ts","../../../projects/widgets/switch/switch.component.ts","../../../projects/widgets/switch/switch.component.html","../../../projects/widgets/switch/i-cell-ids-angular-switch.ts"],"sourcesContent":["export const IdsSwitchIconPosition = {\n ONHANDLE: 'onhandle',\n ONTRACK: 'ontrack',\n} as const;\n\nexport type IdsSwitchIconPositionType = (typeof IdsSwitchIconPosition)[keyof typeof IdsSwitchIconPosition];\n\nexport const IdsSwitchLabelPosition = {\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsSwitchLabelPositionType = (typeof IdsSwitchLabelPosition)[keyof typeof IdsSwitchLabelPosition];\n","export const IdsSwitchVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsSwitchVariantType = (typeof IdsSwitchVariant)[keyof typeof IdsSwitchVariant];\n","import { IdsSwitchIconPosition, IdsSwitchIconPositionType, IdsSwitchLabelPosition, IdsSwitchLabelPositionType } from './types/switch-positions.type';\nimport { IdsSwitchVariant, IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsSwitchDefaultConfig {\n size?: IdsSizeType\n variant?: IdsSwitchVariantType\n hasIcon?: boolean\n iconPosition: IdsSwitchIconPositionType\n labelPosition: IdsSwitchLabelPositionType\n}\n\nexport const IDS_SWITCH_DEFAULT_CONFIG = new InjectionToken<IdsSwitchDefaultConfig>(\n 'IDS_SWITCH_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_SWITCH_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_SWITCH_DEFAULT_CONFIG_FACTORY(): Required<IdsSwitchDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsSwitchVariant.SURFACE,\n hasIcon: false,\n iconPosition: IdsSwitchIconPosition.ONHANDLE,\n labelPosition: IdsSwitchLabelPosition.RIGHT,\n };\n}\n","import { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\n\nimport { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { IdsSizeType, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-switch-group',\n imports: [],\n templateUrl: './switch-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsSwitchGroupComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n public size = input<IdsSizeType | null>(this._defaultConfig.size);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n\n protected _hostClasses = computed(() => this._getHostClasses([this.size()]));\n}\n","<ng-content select=\"ids-switch\" />\n","import { animate, AnimationTriggerMetadata, query, style, transition, trigger } from '@angular/animations';\n\nexport const switchAnimation: AnimationTriggerMetadata = trigger('switchAnimation', [\n transition('off <=> on', [\n query('.ids-icon:enter', [\n style({ opacity: 0 }),\n animate('0.1s ease-in', style({ opacity: 1 })),\n ], { optional: true }),\n query('.ids-icon:leave', [animate('0.1s ease-out', style({ opacity: 0 }))], { optional: true }),\n ]),\n]);\n","import { switchAnimation } from './switch-animations';\nimport { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\nimport { IdsSwitchGroupComponent } from './switch-group.component';\nimport { IdsSwitchIconPosition } from './types/switch-positions.type';\nimport { IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, Input, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { coerceBooleanAttribute, IdsSizeType, fallbackValue, coerceNumberAttribute, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: `ids-switch[ngModel]:not([formControl]):not([formControlName]),\n ids-switch[formControl]:not([ngModel]):not([formControlName]),\n ids-switch[formControlName]:not([ngModel]):not([formControl])`,\n imports: [IdsIconComponent],\n templateUrl: './switch.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IdsSwitchComponent,\n multi: true,\n },\n ],\n animations: [switchAnimation],\n host: {\n '[aria-label]': 'ariaLabel()',\n '[aria-labelledby]': 'ariaLabelledBy()',\n '[aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class IdsSwitchComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n private _switchGroup = inject(IdsSwitchGroupComponent, { optional: true });\n\n private _switchElement = viewChild<ElementRef<HTMLInputElement>>('switch');\n\n public isChecked = signal(false);\n\n public label = input<string>();\n public name = input<string | null>();\n public readonly = input(false, { transform: coerceBooleanAttribute });\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public tabIndex = input(0, { transform: coerceNumberAttribute });\n public variant = input<IdsSwitchVariantType>(this._defaultConfig.variant);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n public isDisabled = signal(false);\n public ariaLabel = input<string| null>(null, { alias: 'aria-label' });\n public ariaLabelledBy = input<string | null, string>(null,\n { alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) },\n );\n\n public ariaDescribedBy = input<string | null>(null, { alias: 'aria-describedby' });\n\n protected _parentOrSelfSize = computed(() => this._switchGroup?.size() ?? this.size());\n protected _parentOrSelfHasIcon = computed(() => this._switchGroup?.hasIcon() ?? this.hasIcon());\n protected _parentOrSelfIconPosition = computed(() => this._switchGroup?.iconPosition() ?? this.iconPosition());\n protected _parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition());\n protected _hasHandleIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE,\n );\n\n protected _hasTrackIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK,\n );\n\n private _isFocusable = computed(() => !this.isDisabled() && !this.readonly());\n protected _hostClasses = computed(() => this._getHostClasses([\n this._parentOrSelfSize(),\n this.variant(),\n this.isDisabled() ? 'disabled' : null,\n this.isChecked() ? 'on' : null,\n [\n 'label',\n this._parentOrSelfLabelPosition(),\n ],\n ]),\n );\n\n private _onChange: (value: unknown) => void = () => { };\n private _onTouched: () => unknown = () => { };\n\n @Input({ transform: coerceBooleanAttribute })\n set disabled(value: boolean) {\n if (value !== this.disabled) {\n this.isDisabled.set(value);\n }\n }\n\n public focus(): void {\n if (this._isFocusable()) {\n this._switchElement()?.nativeElement.focus();\n }\n }\n\n public writeValue(value: boolean | undefined): void {\n this.isChecked.set(Boolean(value));\n }\n\n public registerOnChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => unknown): void {\n this._onTouched = fn;\n }\n\n public setDisabledState?(isDisabled: boolean): void {\n this.isDisabled.set(isDisabled);\n }\n\n public toggle(): void {\n if (!this.isDisabled() && !this.readonly()) {\n this.isChecked.update((checked) => !checked);\n this._onChange(this.isChecked());\n this._onTouched();\n }\n }\n\n public handleClick(): void {\n if (!this.isDisabled()) {\n this.toggle();\n }\n }\n}\n","<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"isChecked()\"\n [@switchAnimation]=\"isChecked() ? 'on' : 'off'\"\n (click)=\"handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"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AAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACW,UAAA,EAAA,CAAC,eAAe,CAAC,EACvB,IAAA,EAAA;AACJ,wBAAA,cAAc,EAAE,aAAa;AAC7B,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,oBAAoB,EAAE,mBAAmB;AAC1C,qBAAA,EAAA,QAAA,EAAA,0zCAAA,EAAA;8BA6DG,QAAQ,EAAA,CAAA;sBADX,KAAK;uBAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE;;;AE7F9C;;AAEG;;;;"}
1
+ {"version":3,"file":"i-cell-ids-angular-switch.mjs","sources":["../../../projects/widgets/switch/types/switch-positions.type.ts","../../../projects/widgets/switch/types/switch-variant.type.ts","../../../projects/widgets/switch/switch-defaults.ts","../../../projects/widgets/switch/switch-group.component.ts","../../../projects/widgets/switch/switch-group.component.html","../../../projects/widgets/switch/switch-animations.ts","../../../projects/widgets/switch/switch.component.ts","../../../projects/widgets/switch/switch.component.html","../../../projects/widgets/switch/i-cell-ids-angular-switch.ts"],"sourcesContent":["export const IdsSwitchIconPosition = {\n ONHANDLE: 'onhandle',\n ONTRACK: 'ontrack',\n} as const;\n\nexport type IdsSwitchIconPositionType = (typeof IdsSwitchIconPosition)[keyof typeof IdsSwitchIconPosition];\n\nexport const IdsSwitchLabelPosition = {\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsSwitchLabelPositionType = (typeof IdsSwitchLabelPosition)[keyof typeof IdsSwitchLabelPosition];\n","export const IdsSwitchVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsSwitchVariantType = (typeof IdsSwitchVariant)[keyof typeof IdsSwitchVariant];\n","import { IdsSwitchIconPosition, IdsSwitchIconPositionType, IdsSwitchLabelPosition, IdsSwitchLabelPositionType } from './types/switch-positions.type';\nimport { IdsSwitchVariant, IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsSwitchDefaultConfig {\n size?: IdsSizeType\n variant?: IdsSwitchVariantType\n hasIcon?: boolean\n iconPosition: IdsSwitchIconPositionType\n labelPosition: IdsSwitchLabelPositionType\n}\n\nexport const IDS_SWITCH_DEFAULT_CONFIG = new InjectionToken<IdsSwitchDefaultConfig>(\n 'IDS_SWITCH_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_SWITCH_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_SWITCH_DEFAULT_CONFIG_FACTORY(): Required<IdsSwitchDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsSwitchVariant.SURFACE,\n hasIcon: false,\n iconPosition: IdsSwitchIconPosition.ONHANDLE,\n labelPosition: IdsSwitchLabelPosition.RIGHT,\n };\n}\n","import { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\n\nimport { ChangeDetectionStrategy, Component, computed, input, ViewEncapsulation } from '@angular/core';\nimport { IdsSizeType, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-switch-group',\n imports: [],\n templateUrl: './switch-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsSwitchGroupComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n public size = input<IdsSizeType | null>(this._defaultConfig.size);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n\n protected _hostClasses = computed(() => this._getHostClasses([this.size()]));\n}\n","<ng-content select=\"ids-switch\" />\n","import { animate, AnimationTriggerMetadata, query, style, transition, trigger } from '@angular/animations';\n\nexport const switchAnimation: AnimationTriggerMetadata = trigger('switchAnimation', [\n transition('off <=> on', [\n query('.ids-icon:enter', [\n style({ opacity: 0 }),\n animate('0.1s ease-in', style({ opacity: 1 })),\n ], { optional: true }),\n query('.ids-icon:leave', [animate('0.1s ease-out', style({ opacity: 0 }))], { optional: true }),\n ]),\n]);\n","import { switchAnimation } from './switch-animations';\nimport { IDS_SWITCH_DEFAULT_CONFIG, IDS_SWITCH_DEFAULT_CONFIG_FACTORY, IdsSwitchDefaultConfig } from './switch-defaults';\nimport { IdsSwitchGroupComponent } from './switch-group.component';\nimport { IdsSwitchIconPosition } from './types/switch-positions.type';\nimport { IdsSwitchVariantType } from './types/switch-variant.type';\n\nimport { ChangeDetectionStrategy, Component, computed, ElementRef, inject, Input, input, signal, viewChild, ViewEncapsulation } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { coerceBooleanAttribute, IdsSizeType, fallbackValue, coerceNumberAttribute, ComponentBaseWithDefaults } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_SWITCH_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: `ids-switch[ngModel]:not([formControl]):not([formControlName]),\n ids-switch[formControl]:not([ngModel]):not([formControlName]),\n ids-switch[formControlName]:not([ngModel]):not([formControl])`,\n imports: [IdsIconComponent],\n templateUrl: './switch.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: IdsSwitchComponent,\n multi: true,\n },\n ],\n animations: [switchAnimation],\n host: {\n '[aria-label]': 'ariaLabel()',\n '[aria-labelledby]': 'ariaLabelledBy()',\n '[aria-describedby]': 'ariaDescribedBy()',\n },\n})\nexport class IdsSwitchComponent extends ComponentBaseWithDefaults<IdsSwitchDefaultConfig> {\n protected override get _hostName(): string {\n return 'switch';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_SWITCH_DEFAULT_CONFIG);\n\n private _switchGroup = inject(IdsSwitchGroupComponent, { optional: true });\n\n private _switchElement = viewChild<ElementRef<HTMLInputElement>>('switch');\n\n protected _isChecked = signal(false);\n\n public label = input<string>();\n public name = input<string | null>();\n public readonly = input(false, { transform: coerceBooleanAttribute });\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public tabIndex = input(0, { transform: coerceNumberAttribute });\n public variant = input<IdsSwitchVariantType>(this._defaultConfig.variant);\n public hasIcon = input(this._defaultConfig.hasIcon);\n public iconPosition = input(this._defaultConfig.iconPosition);\n public labelPosition = input(this._defaultConfig.labelPosition);\n protected _isDisabled = signal(false);\n public ariaLabel = input<string| null>(null, { alias: 'aria-label' });\n public ariaLabelledBy = input<string | null, string>(null,\n { alias: 'aria-labelledby', transform: (val) => fallbackValue(val, this.id()) },\n );\n\n public ariaDescribedBy = input<string | null>(null, { alias: 'aria-describedby' });\n\n protected _parentOrSelfSize = computed(() => this._switchGroup?.size() ?? this.size());\n protected _parentOrSelfHasIcon = computed(() => this._switchGroup?.hasIcon() ?? this.hasIcon());\n protected _parentOrSelfIconPosition = computed(() => this._switchGroup?.iconPosition() ?? this.iconPosition());\n protected _parentOrSelfLabelPosition = computed(() => this._switchGroup?.labelPosition() ?? this.labelPosition());\n protected _hasHandleIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONHANDLE,\n );\n\n protected _hasTrackIcon = computed(() =>\n this._parentOrSelfHasIcon() && this._parentOrSelfIconPosition() === IdsSwitchIconPosition.ONTRACK,\n );\n\n private _isFocusable = computed(() => !this._isDisabled() && !this.readonly());\n protected _hostClasses = computed(() => this._getHostClasses([\n this._parentOrSelfSize(),\n this.variant(),\n this._isDisabled() ? 'disabled' : null,\n this._isChecked() ? 'on' : null,\n [\n 'label',\n this._parentOrSelfLabelPosition(),\n ],\n ]),\n );\n\n private _onChange: (value: unknown) => void = () => { };\n private _onTouched: () => unknown = () => { };\n\n @Input({ transform: coerceBooleanAttribute })\n set disabled(value: boolean) {\n if (value !== this.disabled) {\n this._isDisabled.set(value);\n }\n }\n\n public focus(): void {\n if (this._isFocusable()) {\n this._switchElement()?.nativeElement.focus();\n }\n }\n\n public writeValue(value: boolean | undefined): void {\n this._isChecked.set(Boolean(value));\n }\n\n public registerOnChange(fn: () => void): void {\n this._onChange = fn;\n }\n\n public registerOnTouched(fn: () => unknown): void {\n this._onTouched = fn;\n }\n\n public setDisabledState?(isDisabled: boolean): void {\n this._isDisabled.set(isDisabled);\n }\n\n public toggle(): void {\n if (!this._isDisabled() && !this.readonly()) {\n this._isChecked.update((checked) => !checked);\n this._onChange(this._isChecked());\n this._onTouched();\n }\n }\n\n protected _handleClick(): void {\n if (!this._isDisabled()) {\n this.toggle();\n }\n }\n}\n","<button\n #switch\n role=\"switch\"\n type=\"button\"\n class=\"ids-switch__button\"\n [tabIndex]=\"_isDisabled() ? -1 : tabIndex()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"id()\"\n [name]=\"name()\"\n [attr.aria-label]=\"ariaLabel()\"\n [attr.aria-labelledby]=\"ariaLabelledBy()\"\n [attr.aria-describedby]=\"ariaDescribedBy()\"\n [attr.aria-checked]=\"_isChecked()\"\n [@switchAnimation]=\"_isChecked() ? 'on' : 'off'\"\n (click)=\"_handleClick()\"\n>\n <div class=\"ids-switch__track\">\n @if (_hasTrackIcon()) {\n <div class=\"ids-switch__track-icon\">\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n }\n </div>\n <div class=\"ids-switch__track-icon\">\n @if (!_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n </div>\n }\n <div class=\"ids-switch__handle\">\n @if (_hasHandleIcon()) {\n <!-- needs to be here duplicate ids-icon because of animation :enter and :leave -->\n @if (_isChecked()) {\n <ids-icon aria-hidden=\"true\" fontIcon=\"check\" />\n } @else {\n <ids-icon aria-hidden=\"true\" fontIcon=\"close\" />\n }\n }\n </div>\n </div>\n</button>\n\n<label class=\"ids-switch__label\" [for]=\"id()\">{{ label() }}</label>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["defaultConfig"],"mappings":";;;;;;;AAAa,MAAA,qBAAqB,GAAG;AACnC,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,OAAO,EAAE,SAAS;;AAKP,MAAA,sBAAsB,GAAG;AACpC,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;;;ACTH,MAAA,gBAAgB,GAAG;AAC9B,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;MCWH,yBAAyB,GAAG,IAAI,cAAc,CACzD,2BAA2B,EAC3B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,iCAAiC;AAC3C,CAAA;SAGa,iCAAiC,GAAA;IAC/C,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,gBAAgB,CAAC,OAAO;AACjC,QAAA,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,qBAAqB,CAAC,QAAQ;QAC5C,aAAa,EAAE,sBAAsB,CAAC,KAAK;KAC5C;AACH;;ACzBA,MAAMA,eAAa,GAAG,iCAAiC,EAAE;AASnD,MAAO,uBAAwB,SAAQ,yBAAiD,CAAA;AAP9F,IAAA,WAAA,GAAA;;QAYqB,IAAc,CAAA,cAAA,GAAG,IAAI,CAAC,iBAAiB,CAACA,eAAa,EAAE,yBAAyB,CAAC;QAE7F,IAAI,CAAA,IAAA,GAAG,KAAK,CAAqB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;QAC1D,IAAO,CAAA,OAAA,GAAG,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AAA;;2EAE+D,EAChE,OAAA,EAAA,CAAC,gBAAgB,CAAC,EAEZ,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAoB,kBAAA;AAC/B,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;qBACF,EACW,UAAA,EAAA,CAAC,eAAe,CAAC,EACvB,IAAA,EAAA;AACJ,wBAAA,cAAc,EAAE,aAAa;AAC7B,wBAAA,mBAAmB,EAAE,kBAAkB;AACvC,wBAAA,oBAAoB,EAAE,mBAAmB;AAC1C,qBAAA,EAAA,QAAA,EAAA,k0CAAA,EAAA;8BA6DG,QAAQ,EAAA,CAAA;sBADX,KAAK;uBAAC,EAAE,SAAS,EAAE,sBAAsB,EAAE;;;AE7F9C;;AAEG;;;;"}
@@ -80,7 +80,8 @@ class IdsTabGroupComponent extends ComponentBaseWithDefaults {
80
80
  this.tabPosition = input(this._defaultConfig.tabPosition);
81
81
  this.indicatorPosition = input();
82
82
  this.disabled = input(false, { transform: coerceBooleanAttribute });
83
- this.selectedTabIndex = signal(0);
83
+ this._selectedTabIndex = signal(0);
84
+ this.selectedTabIndex = this._selectedTabIndex.asReadonly();
84
85
  this._hostClasses = computed(() => this._getHostClasses([
85
86
  this.size(),
86
87
  this.variant(),
@@ -88,9 +89,9 @@ class IdsTabGroupComponent extends ComponentBaseWithDefaults {
88
89
  this.disabled() ? 'disabled' : null,
89
90
  this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,
90
91
  this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,
91
- `indicator-${this.indicatorPosition() ?? this.calculatedIndicatorPosition()}`,
92
+ `indicator-${this.indicatorPosition() ?? this._calculatedIndicatorPosition()}`,
92
93
  ]));
93
- this.calculatedIndicatorPosition = computed(() => (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT));
94
+ this._calculatedIndicatorPosition = computed(() => (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT));
94
95
  }
95
96
  get _hostName() {
96
97
  return 'tab-group';
@@ -114,7 +115,7 @@ class IdsTabGroupComponent extends ComponentBaseWithDefaults {
114
115
  this.selectTab(0);
115
116
  }
116
117
  selectTab(index) {
117
- this.selectedTabIndex.set(index);
118
+ this._selectedTabIndex.set(index);
118
119
  const selectedItem = this._items().at(index);
119
120
  const selectedPortal = new TemplatePortal(selectedItem.content(), this._viewContainerRef);
120
121
  if (this._portalOutlet().hasAttached()) {
@@ -123,14 +124,14 @@ class IdsTabGroupComponent extends ComponentBaseWithDefaults {
123
124
  this._portalOutlet().attach(selectedPortal);
124
125
  }
125
126
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
126
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsTabGroupComponent, isStandalone: true, selector: "ids-tab-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, stretchTabs: { classPropertyName: "stretchTabs", publicName: "stretchTabs", isSignal: true, isRequired: false, transformFunction: null }, tabPosition: { classPropertyName: "tabPosition", publicName: "tabPosition", isSignal: true, isRequired: false, transformFunction: null }, indicatorPosition: { classPropertyName: "indicatorPosition", publicName: "indicatorPosition", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_items", predicate: IdsTabComponent, isSignal: true }], viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n", dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsTabGroupComponent, isStandalone: true, selector: "ids-tab-group", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, stretchTabs: { classPropertyName: "stretchTabs", publicName: "stretchTabs", isSignal: true, isRequired: false, transformFunction: null }, tabPosition: { classPropertyName: "tabPosition", publicName: "tabPosition", isSignal: true, isRequired: false, transformFunction: null }, indicatorPosition: { classPropertyName: "indicatorPosition", publicName: "indicatorPosition", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "_items", predicate: IdsTabComponent, isSignal: true }], viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"_selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"_selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n", dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
127
128
  }
128
129
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTabGroupComponent, decorators: [{
129
130
  type: Component,
130
131
  args: [{ selector: 'ids-tab-group', imports: [
131
132
  PortalModule,
132
133
  IdsIconComponent,
133
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n" }]
134
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"_selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"_selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n" }]
134
135
  }] });
135
136
 
136
137
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"i-cell-ids-angular-tab.mjs","sources":["../../../projects/widgets/tab/types/tab-group-position.type.ts","../../../projects/widgets/tab/types/tab-group-variant.type.ts","../../../projects/widgets/tab/types/tab-indicator-position.type.ts","../../../projects/widgets/tab/tab-group-defaults.ts","../../../projects/widgets/tab/tab.component.ts","../../../projects/widgets/tab/tab.component.html","../../../projects/widgets/tab/tab-group.component.ts","../../../projects/widgets/tab/tab-group.component.html","../../../projects/widgets/tab/i-cell-ids-angular-tab.ts"],"sourcesContent":["export const IdsTabGroupPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n\nexport type IdsTabGroupPositionType = (typeof IdsTabGroupPosition)[keyof typeof IdsTabGroupPosition];\n","export const IdsTabGroupVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsTabGroupVariantType = (typeof IdsTabGroupVariant)[keyof typeof IdsTabGroupVariant];\n","export const IdsTabIndicatorPosition = {\n TOP: 'top',\n BOTTOM: 'bottom',\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsTabIndicatorPositionType = (typeof IdsTabIndicatorPosition)[keyof typeof IdsTabIndicatorPosition];\n","import { IdsTabGroupPosition, IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariant, IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsOrientation, IdsOrientationType, IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsTabGroupDefaultConfig {\n size?: IdsSizeType,\n variant?: IdsTabGroupVariantType,\n orientation?: IdsOrientationType,\n stretchTabs?: boolean,\n tabPosition?: IdsTabGroupPositionType,\n indicatorPosition?: IdsTabIndicatorPositionType,\n}\n\nexport const IDS_TAB_GROUP_DEFAULT_CONFIG = new InjectionToken<IdsTabGroupDefaultConfig>(\n 'IDS_TAB_GROUP_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY(): Required<IdsTabGroupDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsTabGroupVariant.PRIMARY,\n orientation: IdsOrientation.HORIZONTAL,\n stretchTabs: true,\n tabPosition: IdsTabGroupPosition.START,\n indicatorPosition: IdsTabIndicatorPosition.BOTTOM,\n };\n}\n","import { IdsTabGroupComponent } from './tab-group.component';\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal, TemplateRef, viewChild, ViewEncapsulation } from '@angular/core';\nimport { coerceStringAttribute, ComponentBase } from '@i-cell/ids-angular/core';\n\n@Component({\n selector: 'ids-tab',\n imports: [],\n templateUrl: './tab.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabComponent extends ComponentBase {\n protected override get _hostName(): string {\n return 'tab';\n };\n\n private _tabGroup = inject(IdsTabGroupComponent, { skipSelf: true });\n\n public label = input<string>();\n public disabled = input<boolean>(false);\n public leadingIcon = input('', { transform: coerceStringAttribute });\n public trailingIcon = input('', { transform: coerceStringAttribute });\n public content = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n public panelId = `${this.id()}-panel`;\n\n public parentOrSelfDisabled = computed(() => this._tabGroup.disabled() || this.disabled());\n\n protected _hostClasses = signal(this._getHostClasses([]));\n\n public hostTabClasses = computed(() => this._getHostClasses(\n [this.parentOrSelfDisabled() ? 'disabled' : null],\n ));\n}\n","<ng-template>\n <div class=\"ids-tab-body-content\" [attr.role]=\"'tabpanel'\" [id]=\"panelId\">\n <ng-content />\n </div>\n</ng-template>\n","import { IDS_TAB_GROUP_DEFAULT_CONFIG, IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY, IdsTabGroupDefaultConfig } from './tab-group-defaults';\nimport { IdsTabComponent } from './tab.component';\nimport { IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { CdkPortalOutlet, PortalModule, TemplatePortal } from '@angular/cdk/portal';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, computed, contentChildren, inject, input, isDevMode, signal, viewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanAttribute, ComponentBaseWithDefaults, IdsOrientation, IdsOrientationType, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-tab-group',\n imports: [\n PortalModule,\n IdsIconComponent,\n ],\n templateUrl: './tab-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabGroupComponent extends ComponentBaseWithDefaults<IdsTabGroupDefaultConfig> implements AfterContentInit {\n protected override get _hostName(): string {\n return 'tab-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_TAB_GROUP_DEFAULT_CONFIG);\n\n protected _items = contentChildren<IdsTabComponent>(IdsTabComponent);\n private _portalOutlet = viewChild.required<CdkPortalOutlet>(CdkPortalOutlet);\n private _viewContainerRef = inject(ViewContainerRef);\n\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public variant = input<IdsTabGroupVariantType>(this._defaultConfig.variant);\n public orientation = input<IdsOrientationType>(this._defaultConfig.orientation);\n public stretchTabs = input(this._defaultConfig.stretchTabs, { transform: coerceBooleanAttribute });\n public tabPosition = input<IdsTabGroupPositionType>(this._defaultConfig.tabPosition);\n public indicatorPosition = input<IdsTabIndicatorPositionType>();\n public disabled = input(false, { transform: coerceBooleanAttribute });\n\n public selectedTabIndex = signal<number>(0);\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.variant(),\n this.orientation(),\n this.disabled() ? 'disabled' : null,\n this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,\n this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,\n `indicator-${this.indicatorPosition() ?? this.calculatedIndicatorPosition()}`,\n ]));\n\n public calculatedIndicatorPosition = computed(() =>\n (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT),\n );\n\n public ngAfterContentInit(): void {\n const items = this._items();\n const orientation = this.orientation();\n const indicatorPosition = this.indicatorPosition();\n const minItemCount = 2;\n\n if (isDevMode() && (items.length < minItemCount)) {\n throw this._createHostError(`Invalid count of tab items. Minimum item count is ${minItemCount}.`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.HORIZONTAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.LEFT || indicatorPosition === IdsTabIndicatorPosition.RIGHT)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Horizontal mode`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.VERTICAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.BOTTOM || indicatorPosition === IdsTabIndicatorPosition.TOP)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Vertical mode`);\n }\n\n this.selectTab(0);\n }\n\n public selectTab(index: number): void {\n this.selectedTabIndex.set(index);\n const selectedItem = this._items().at(index);\n const selectedPortal = new TemplatePortal(selectedItem!.content(), this._viewContainerRef);\n\n if (this._portalOutlet().hasAttached()) {\n this._portalOutlet().detach();\n }\n\n this._portalOutlet().attach(selectedPortal);\n }\n}\n","<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAa,MAAA,mBAAmB,GAAG;AACjC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACHC,MAAA,kBAAkB,GAAG;AAChC,IAAA,OAAO,EAAE,SAAS;AAClB,IA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projects/widgets/tab/types/tab-group-position.type.ts","../../../projects/widgets/tab/types/tab-group-variant.type.ts","../../../projects/widgets/tab/types/tab-indicator-position.type.ts","../../../projects/widgets/tab/tab-group-defaults.ts","../../../projects/widgets/tab/tab.component.ts","../../../projects/widgets/tab/tab.component.html","../../../projects/widgets/tab/tab-group.component.ts","../../../projects/widgets/tab/tab-group.component.html","../../../projects/widgets/tab/i-cell-ids-angular-tab.ts"],"sourcesContent":["export const IdsTabGroupPosition = {\n START: 'start',\n CENTER: 'center',\n END: 'end',\n} as const;\n\nexport type IdsTabGroupPositionType = (typeof IdsTabGroupPosition)[keyof typeof IdsTabGroupPosition];\n","export const IdsTabGroupVariant = {\n PRIMARY: 'primary',\n SURFACE: 'surface',\n LIGHT: 'light',\n} as const;\n\nexport type IdsTabGroupVariantType = (typeof IdsTabGroupVariant)[keyof typeof IdsTabGroupVariant];\n","export const IdsTabIndicatorPosition = {\n TOP: 'top',\n BOTTOM: 'bottom',\n LEFT: 'left',\n RIGHT: 'right',\n} as const;\n\nexport type IdsTabIndicatorPositionType = (typeof IdsTabIndicatorPosition)[keyof typeof IdsTabIndicatorPosition];\n","import { IdsTabGroupPosition, IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariant, IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { InjectionToken } from '@angular/core';\nimport { IdsOrientation, IdsOrientationType, IdsSize, IdsSizeType } from '@i-cell/ids-angular/core';\n\nexport interface IdsTabGroupDefaultConfig {\n size?: IdsSizeType,\n variant?: IdsTabGroupVariantType,\n orientation?: IdsOrientationType,\n stretchTabs?: boolean,\n tabPosition?: IdsTabGroupPositionType,\n indicatorPosition?: IdsTabIndicatorPositionType,\n}\n\nexport const IDS_TAB_GROUP_DEFAULT_CONFIG = new InjectionToken<IdsTabGroupDefaultConfig>(\n 'IDS_TAB_GROUP_DEFAULT_CONFIG',\n {\n providedIn: 'root',\n factory: IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY,\n },\n);\n\nexport function IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY(): Required<IdsTabGroupDefaultConfig> {\n return {\n size: IdsSize.COMPACT,\n variant: IdsTabGroupVariant.PRIMARY,\n orientation: IdsOrientation.HORIZONTAL,\n stretchTabs: true,\n tabPosition: IdsTabGroupPosition.START,\n indicatorPosition: IdsTabIndicatorPosition.BOTTOM,\n };\n}\n","import { IdsTabGroupComponent } from './tab-group.component';\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input, signal, TemplateRef, viewChild, ViewEncapsulation } from '@angular/core';\nimport { coerceStringAttribute, ComponentBase } from '@i-cell/ids-angular/core';\n\n@Component({\n selector: 'ids-tab',\n imports: [],\n templateUrl: './tab.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabComponent extends ComponentBase {\n protected override get _hostName(): string {\n return 'tab';\n };\n\n private _tabGroup = inject(IdsTabGroupComponent, { skipSelf: true });\n\n public label = input<string>();\n public disabled = input<boolean>(false);\n public leadingIcon = input('', { transform: coerceStringAttribute });\n public trailingIcon = input('', { transform: coerceStringAttribute });\n public content = viewChild.required<TemplateRef<unknown>>(TemplateRef);\n public panelId = `${this.id()}-panel`;\n\n public parentOrSelfDisabled = computed(() => this._tabGroup.disabled() || this.disabled());\n\n protected _hostClasses = signal(this._getHostClasses([]));\n\n public hostTabClasses = computed(() => this._getHostClasses(\n [this.parentOrSelfDisabled() ? 'disabled' : null],\n ));\n}\n","<ng-template>\n <div class=\"ids-tab-body-content\" [attr.role]=\"'tabpanel'\" [id]=\"panelId\">\n <ng-content />\n </div>\n</ng-template>\n","import { IDS_TAB_GROUP_DEFAULT_CONFIG, IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY, IdsTabGroupDefaultConfig } from './tab-group-defaults';\nimport { IdsTabComponent } from './tab.component';\nimport { IdsTabGroupPositionType } from './types/tab-group-position.type';\nimport { IdsTabGroupVariantType } from './types/tab-group-variant.type';\nimport { IdsTabIndicatorPosition, IdsTabIndicatorPositionType } from './types/tab-indicator-position.type';\n\nimport { CdkPortalOutlet, PortalModule, TemplatePortal } from '@angular/cdk/portal';\nimport { AfterContentInit, ChangeDetectionStrategy, Component, computed, contentChildren, inject, input, isDevMode, signal, viewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';\nimport { coerceBooleanAttribute, ComponentBaseWithDefaults, IdsOrientation, IdsOrientationType, IdsSizeType } from '@i-cell/ids-angular/core';\nimport { IdsIconComponent } from '@i-cell/ids-angular/icon';\n\nconst defaultConfig = IDS_TAB_GROUP_DEFAULT_CONFIG_FACTORY();\n\n@Component({\n selector: 'ids-tab-group',\n imports: [\n PortalModule,\n IdsIconComponent,\n ],\n templateUrl: './tab-group.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IdsTabGroupComponent extends ComponentBaseWithDefaults<IdsTabGroupDefaultConfig> implements AfterContentInit {\n protected override get _hostName(): string {\n return 'tab-group';\n }\n\n protected readonly _defaultConfig = this._getDefaultConfig(defaultConfig, IDS_TAB_GROUP_DEFAULT_CONFIG);\n\n protected _items = contentChildren<IdsTabComponent>(IdsTabComponent);\n private _portalOutlet = viewChild.required<CdkPortalOutlet>(CdkPortalOutlet);\n private _viewContainerRef = inject(ViewContainerRef);\n\n public size = input<IdsSizeType>(this._defaultConfig.size);\n public variant = input<IdsTabGroupVariantType>(this._defaultConfig.variant);\n public orientation = input<IdsOrientationType>(this._defaultConfig.orientation);\n public stretchTabs = input(this._defaultConfig.stretchTabs, { transform: coerceBooleanAttribute });\n public tabPosition = input<IdsTabGroupPositionType>(this._defaultConfig.tabPosition);\n public indicatorPosition = input<IdsTabIndicatorPositionType>();\n public disabled = input(false, { transform: coerceBooleanAttribute });\n\n protected _selectedTabIndex = signal<number>(0);\n public selectedTabIndex = this._selectedTabIndex.asReadonly();\n\n protected _hostClasses = computed(() => this._getHostClasses([\n this.size(),\n this.variant(),\n this.orientation(),\n this.disabled() ? 'disabled' : null,\n this.stretchTabs() && this.orientation() === IdsOrientation.HORIZONTAL ? 'stretch-tabs' : null,\n this.tabPosition() && !this.stretchTabs() ? this.tabPosition() : null,\n `indicator-${this.indicatorPosition() ?? this._calculatedIndicatorPosition()}`,\n ]));\n\n private _calculatedIndicatorPosition = computed(() =>\n (this.orientation() === IdsOrientation.HORIZONTAL ? IdsTabIndicatorPosition.BOTTOM : IdsTabIndicatorPosition.LEFT),\n );\n\n public ngAfterContentInit(): void {\n const items = this._items();\n const orientation = this.orientation();\n const indicatorPosition = this.indicatorPosition();\n const minItemCount = 2;\n\n if (isDevMode() && (items.length < minItemCount)) {\n throw this._createHostError(`Invalid count of tab items. Minimum item count is ${minItemCount}.`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.HORIZONTAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.LEFT || indicatorPosition === IdsTabIndicatorPosition.RIGHT)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Horizontal mode`);\n }\n\n if (isDevMode() && (orientation === IdsOrientation.VERTICAL &&\n (indicatorPosition && (indicatorPosition === IdsTabIndicatorPosition.BOTTOM || indicatorPosition === IdsTabIndicatorPosition.TOP)))) {\n throw this._createHostError(`Can not use ${indicatorPosition} indicator position with Vertical mode`);\n }\n\n this.selectTab(0);\n }\n\n public selectTab(index: number): void {\n this._selectedTabIndex.set(index);\n const selectedItem = this._items().at(index);\n const selectedPortal = new TemplatePortal(selectedItem!.content(), this._viewContainerRef);\n\n if (this._portalOutlet().hasAttached()) {\n this._portalOutlet().detach();\n }\n\n this._portalOutlet().attach(selectedPortal);\n }\n}\n","<div class=\"ids-tab-group__container\">\n <ul class=\"ids-tab-group__header\" role=\"tablist\">\n @for (item of _items(); track $index; let i = $index) {\n <li\n role=\"tab\"\n [class]=\"item.hostTabClasses()\"\n [class.ids-tab--active]=\"_selectedTabIndex() === i\"\n [attr.tabindex]=\"item.parentOrSelfDisabled() ? -1 : 0\"\n [attr.aria-selected]=\"_selectedTabIndex() === i ? 'true' : 'false'\"\n [attr.aria-controls]=\"item.panelId\"\n (click)=\"selectTab(i)\"\n >\n @let tabLeadingIcon = item.leadingIcon();\n @let tabTrailingIcon = item.trailingIcon();\n @if (tabLeadingIcon) {\n <ids-icon [fontIcon]=\"tabLeadingIcon\" />\n }\n <span class=\"ids-tab__label\">{{ item.label() }}</span>\n @if (tabTrailingIcon) {\n <ids-icon [fontIcon]=\"tabTrailingIcon\" />\n }\n <span class=\"ids-tab__indicator\">\n <span class=\"ids-tab__line\"></span>\n </span>\n </li>\n }\n </ul>\n</div>\n<ng-template cdkPortalOutlet />\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAa,MAAA,mBAAmB,GAAG;AACjC,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,GAAG,EAAE,KAAK;;;ACHC,MAAA,kBAAkB,GAAG;AAChC,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,OAAO;;;ACHH,MAAA,uBAAuB,GAAG;AACrC,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,MAAM,EAAE,QAAQ;AAChB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,KAAK,EAAE,OAAO;;;MCYH,4BAA4B,GAAG,IAAI,cAAc,CAC5D,8BAA8B,EAC9B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,oCAAoC;AAC9C,CAAA;SAGa,oCAAoC,GAAA;IAClD,OAAO;QACL,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,OAAO,EAAE,kBAAkB,CAAC,OAAO;QACnC,WAAW,EAAE,cAAc,CAAC,UAAU;AACtC,QAAA,WAAW,EAAE,IAAI;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eAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACZ,gBAAgB,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAMP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAVhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,EAChB,OAAA,EAAA;wBACP,YAAY;wBACZ,gBAAgB;AACjB,qBAAA,EAAA,aAAA,EAEc,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2jCAAA,EAAA;;;AErBjD;;AAEG;;;;"}
@@ -277,7 +277,6 @@ class IdsCellContentComponent extends IdsTableCellRenderer {
277
277
  // Forces recalculation of this computed signal
278
278
  this._updateCellContent();
279
279
  if (this._isHeader) {
280
- // FIXME: Header label IdsTableIntl-ből kénem, h jöjjön
281
280
  return this.colDef().label ?? '';
282
281
  }
283
282
  const rowData = this.rowData();
@@ -317,7 +316,7 @@ class IdsCellContentComponent extends IdsTableCellRenderer {
317
316
  this._updateCellContent.set(!this._updateCellContent());
318
317
  }
319
318
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsCellContentComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
320
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsCellContentComponent, isStandalone: true, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: { externalCellTemplates: { classPropertyName: "externalCellTemplates", publicName: "externalCellTemplates", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<!-- TODO: sortable oszlopok display: flex bekavar!!! -->\r\n\r\n<ng-content select=\"[colStart]\" />\r\n\r\n@if (_cellRendererComp()) {\r\n <ng-container *ngComponentOutlet=\"_cellRendererComp(); inputs: { rowData: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n} @else {\r\n @switch (_cellTemplateName()) {\r\n @case ('strong') {\r\n <strong class=\"ids-cell-content ids-cell-content__strong\">{{ _cellValue() }}</strong>\r\n }\r\n @case ('numeric') {\r\n <div class=\"ids-cell-content ids-cell-content__numeric\">{{ _numericCellValue() }}</div>\r\n }\r\n @case ('icon') {\r\n <ids-icon\r\n class=\"ids-cell-content ids-cell-content__icon\"\r\n [fontIcon]=\"_stringCellValue()\"\r\n [aria-hidden]=\"true\"\r\n />\r\n }\r\n <!-- TODO: label-description template (needs further discussion) -->\r\n @default {\r\n @let template = _cellTemplate();\r\n @if (template) {\r\n <!-- external template ref -->\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n } @else {\r\n <!-- default basic cell content -->\r\n <div class=\"ids-cell-content ids-cell-content__default\">{{ _cellValue() }}</div>\r\n }\r\n }\r\n }\r\n}\r\n\r\n<ng-content select=\"[colEnd]\" />\r\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
319
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsCellContentComponent, isStandalone: true, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: { externalCellTemplates: { classPropertyName: "externalCellTemplates", publicName: "externalCellTemplates", isSignal: true, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: "<ng-content select=\"[colStart]\" />\r\n\r\n@if (_cellRendererComp()) {\r\n <ng-container *ngComponentOutlet=\"_cellRendererComp(); inputs: { rowData: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n} @else {\r\n @switch (_cellTemplateName()) {\r\n @case ('strong') {\r\n <strong class=\"ids-cell-content ids-cell-content__strong\">{{ _cellValue() }}</strong>\r\n }\r\n @case ('numeric') {\r\n <div class=\"ids-cell-content ids-cell-content__numeric\">{{ _numericCellValue() }}</div>\r\n }\r\n @case ('icon') {\r\n <ids-icon\r\n class=\"ids-cell-content ids-cell-content__icon\"\r\n [fontIcon]=\"_stringCellValue()\"\r\n [aria-hidden]=\"true\"\r\n />\r\n }\r\n <!-- TODO: label-description template (needs further discussion) -->\r\n @default {\r\n @let template = _cellTemplate();\r\n @if (template) {\r\n <!-- external template ref -->\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n } @else {\r\n <!-- default basic cell content -->\r\n <div class=\"ids-cell-content ids-cell-content__default\">{{ _cellValue() }}</div>\r\n }\r\n }\r\n }\r\n}\r\n\r\n<ng-content select=\"[colEnd]\" />\r\n", dependencies: [{ kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
321
320
  }
322
321
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsCellContentComponent, decorators: [{
323
322
  type: Component,
@@ -325,7 +324,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
325
324
  IdsIconComponent,
326
325
  NgComponentOutlet,
327
326
  NgTemplateOutlet,
328
- ], template: "<!-- TODO: sortable oszlopok display: flex bekavar!!! -->\r\n\r\n<ng-content select=\"[colStart]\" />\r\n\r\n@if (_cellRendererComp()) {\r\n <ng-container *ngComponentOutlet=\"_cellRendererComp(); inputs: { rowData: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n} @else {\r\n @switch (_cellTemplateName()) {\r\n @case ('strong') {\r\n <strong class=\"ids-cell-content ids-cell-content__strong\">{{ _cellValue() }}</strong>\r\n }\r\n @case ('numeric') {\r\n <div class=\"ids-cell-content ids-cell-content__numeric\">{{ _numericCellValue() }}</div>\r\n }\r\n @case ('icon') {\r\n <ids-icon\r\n class=\"ids-cell-content ids-cell-content__icon\"\r\n [fontIcon]=\"_stringCellValue()\"\r\n [aria-hidden]=\"true\"\r\n />\r\n }\r\n <!-- TODO: label-description template (needs further discussion) -->\r\n @default {\r\n @let template = _cellTemplate();\r\n @if (template) {\r\n <!-- external template ref -->\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n } @else {\r\n <!-- default basic cell content -->\r\n <div class=\"ids-cell-content ids-cell-content__default\">{{ _cellValue() }}</div>\r\n }\r\n }\r\n }\r\n}\r\n\r\n<ng-content select=\"[colEnd]\" />\r\n" }]
327
+ ], template: "<ng-content select=\"[colStart]\" />\r\n\r\n@if (_cellRendererComp()) {\r\n <ng-container *ngComponentOutlet=\"_cellRendererComp(); inputs: { rowData: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n} @else {\r\n @switch (_cellTemplateName()) {\r\n @case ('strong') {\r\n <strong class=\"ids-cell-content ids-cell-content__strong\">{{ _cellValue() }}</strong>\r\n }\r\n @case ('numeric') {\r\n <div class=\"ids-cell-content ids-cell-content__numeric\">{{ _numericCellValue() }}</div>\r\n }\r\n @case ('icon') {\r\n <ids-icon\r\n class=\"ids-cell-content ids-cell-content__icon\"\r\n [fontIcon]=\"_stringCellValue()\"\r\n [aria-hidden]=\"true\"\r\n />\r\n }\r\n <!-- TODO: label-description template (needs further discussion) -->\r\n @default {\r\n @let template = _cellTemplate();\r\n @if (template) {\r\n <!-- external template ref -->\r\n <ng-container *ngTemplateOutlet=\"template; context: { $implicit: rowData(), colDef: colDef(), cellValue: _cellValue() }\" />\r\n } @else {\r\n <!-- default basic cell content -->\r\n <div class=\"ids-cell-content ids-cell-content__default\">{{ _cellValue() }}</div>\r\n }\r\n }\r\n }\r\n}\r\n\r\n<ng-content select=\"[colEnd]\" />\r\n" }]
329
328
  }] });
330
329
 
331
330
  class RowInfoHolderDirective {
@@ -371,7 +370,6 @@ class IdsTableComponent extends ComponentBaseWithDefaults {
371
370
  /** Enable master-detail rows */
372
371
  this.masterDetail = input(this._defaultConfig.masterDetail, { transform: coerceBooleanAttribute });
373
372
  /** Name of the detail row renderer template */
374
- // TODO: component?
375
373
  this.detailTemplateName = input(this._defaultConfig.detailTemplateName);
376
374
  /** If true the detail cell will not span sticky and stickyEnd columns. If false the detail cell will span the table's full width */
377
375
  this.detailStickyColumns = input(this._defaultConfig.detailStickyColumns, { transform: coerceBooleanAttribute });
@@ -380,7 +378,6 @@ class IdsTableComponent extends ComponentBaseWithDefaults {
380
378
  /** Predicate function to decide whether a data row has details or not */
381
379
  this.hasDetailRow = input(() => false);
382
380
  /** Enable row selection feature */
383
- // TODO: legyen `multiSelect` a prop neve
384
381
  this.enableRowSelection = input(this._defaultConfig.enableRowSelection, { transform: coerceBooleanAttribute });
385
382
  /** Clear row selection if the table's content changes */
386
383
  this.clearSelectionOnChange = input(this._defaultConfig.clearSelectionOnChange, { transform: coerceBooleanAttribute });
@@ -619,7 +616,7 @@ class IdsTableComponent extends ComponentBaseWithDefaults {
619
616
  this.rowSelection.select(...data);
620
617
  }
621
618
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: IdsTableComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
622
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsTableComponent, isStandalone: true, selector: "ids-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, fixedHeader: { classPropertyName: "fixedHeader", publicName: "fixedHeader", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, detailTemplateName: { classPropertyName: "detailTemplateName", publicName: "detailTemplateName", isSignal: true, isRequired: false, transformFunction: null }, detailStickyColumns: { classPropertyName: "detailStickyColumns", publicName: "detailStickyColumns", isSignal: true, isRequired: false, transformFunction: null }, showDetailHeader: { classPropertyName: "showDetailHeader", publicName: "showDetailHeader", isSignal: true, isRequired: false, transformFunction: null }, hasDetailRow: { classPropertyName: "hasDetailRow", publicName: "hasDetailRow", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, clearSelectionOnChange: { classPropertyName: "clearSelectionOnChange", publicName: "clearSelectionOnChange", isSignal: true, isRequired: false, transformFunction: null }, isRowSelectable: { classPropertyName: "isRowSelectable", publicName: "isRowSelectable", isSignal: true, isRequired: false, transformFunction: null }, noRowsToShowOverlayBelow: { classPropertyName: "noRowsToShowOverlayBelow", publicName: "noRowsToShowOverlayBelow", isSignal: true, isRequired: false, transformFunction: null }, withBorder: { classPropertyName: "withBorder", publicName: "withBorder", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", cellClick: "cellClick", rowClick: "rowClick", rowKeydown: "rowKeydown", contentChanged: "contentChanged" }, providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], queries: [{ propertyName: "_contentCellTemplates", predicate: IdsTableCellTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_viewCellTemplates", predicate: IdsTableCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "_rowDataHolders", predicate: (RowInfoHolderDirective), descendants: true, isSignal: true }, { propertyName: "_selectorCheckboxes", predicate: IdsCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "_cellContentRenderers", predicate: (IdsCellContentComponent), descendants: true, isSignal: true }], exportAs: ["idsTable"], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row ids-table__row--surface\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: IdsTableComponent, selector: "ids-table", inputs: ["columnDefs", "dataSource", "fixedHeader", "enableSorting", "masterDetail", "detailTemplateName", "detailStickyColumns", "showDetailHeader", "hasDetailRow", "enableRowSelection", "clearSelectionOnChange", "isRowSelectable", "noRowsToShowOverlayBelow", "withBorder", "appearance", "size", "variant"], outputs: ["sortChange", "cellClick", "rowClick", "rowKeydown", "contentChanged"], exportAs: ["idsTable"] }, { kind: "component", type: IdsCellContentComponent, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: ["externalCellTemplates"] }, { kind: "component", type: IdsCheckboxComponent, selector: "ids-checkbox", inputs: ["name", "required", "readonly", "size", "tabIndex", "value", "variant", "checked", "indeterminate", "aria-label", "aria-labelledby", "aria-describedby", "disabled"], outputs: ["disabledChange", "change", "indeterminateChange"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "directive", type: IdsTableCellTemplateDirective, selector: "[idsCellTemplate]", inputs: ["idsCellTemplate"] }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "directive", type: CdkNoDataRow, selector: "ng-template[cdkNoDataRow]" }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RowInfoHolderDirective, selector: "[rowInfo]", inputs: ["rowInfo"] }], animations: [
619
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.1.2", type: IdsTableComponent, isStandalone: true, selector: "ids-table", inputs: { columnDefs: { classPropertyName: "columnDefs", publicName: "columnDefs", isSignal: true, isRequired: true, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: true, transformFunction: null }, fixedHeader: { classPropertyName: "fixedHeader", publicName: "fixedHeader", isSignal: true, isRequired: false, transformFunction: null }, enableSorting: { classPropertyName: "enableSorting", publicName: "enableSorting", isSignal: true, isRequired: false, transformFunction: null }, masterDetail: { classPropertyName: "masterDetail", publicName: "masterDetail", isSignal: true, isRequired: false, transformFunction: null }, detailTemplateName: { classPropertyName: "detailTemplateName", publicName: "detailTemplateName", isSignal: true, isRequired: false, transformFunction: null }, detailStickyColumns: { classPropertyName: "detailStickyColumns", publicName: "detailStickyColumns", isSignal: true, isRequired: false, transformFunction: null }, showDetailHeader: { classPropertyName: "showDetailHeader", publicName: "showDetailHeader", isSignal: true, isRequired: false, transformFunction: null }, hasDetailRow: { classPropertyName: "hasDetailRow", publicName: "hasDetailRow", isSignal: true, isRequired: false, transformFunction: null }, enableRowSelection: { classPropertyName: "enableRowSelection", publicName: "enableRowSelection", isSignal: true, isRequired: false, transformFunction: null }, clearSelectionOnChange: { classPropertyName: "clearSelectionOnChange", publicName: "clearSelectionOnChange", isSignal: true, isRequired: false, transformFunction: null }, isRowSelectable: { classPropertyName: "isRowSelectable", publicName: "isRowSelectable", isSignal: true, isRequired: false, transformFunction: null }, noRowsToShowOverlayBelow: { classPropertyName: "noRowsToShowOverlayBelow", publicName: "noRowsToShowOverlayBelow", isSignal: true, isRequired: false, transformFunction: null }, withBorder: { classPropertyName: "withBorder", publicName: "withBorder", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sortChange: "sortChange", cellClick: "cellClick", rowClick: "rowClick", rowKeydown: "rowKeydown", contentChanged: "contentChanged" }, providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], queries: [{ propertyName: "_contentCellTemplates", predicate: IdsTableCellTemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_viewCellTemplates", predicate: IdsTableCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "_rowDataHolders", predicate: (RowInfoHolderDirective), descendants: true, isSignal: true }, { propertyName: "_selectorCheckboxes", predicate: IdsCheckboxComponent, descendants: true, isSignal: true }, { propertyName: "_cellContentRenderers", predicate: (IdsCellContentComponent), descendants: true, isSignal: true }], exportAs: ["idsTable"], usesInheritance: true, ngImport: i0, template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n", dependencies: [{ kind: "component", type: IdsTableComponent, selector: "ids-table", inputs: ["columnDefs", "dataSource", "fixedHeader", "enableSorting", "masterDetail", "detailTemplateName", "detailStickyColumns", "showDetailHeader", "hasDetailRow", "enableRowSelection", "clearSelectionOnChange", "isRowSelectable", "noRowsToShowOverlayBelow", "withBorder", "appearance", "size", "variant"], outputs: ["sortChange", "cellClick", "rowClick", "rowKeydown", "contentChanged"], exportAs: ["idsTable"] }, { kind: "component", type: IdsCellContentComponent, selector: "th[idsCellContent],td[idsCellContent],th[idsHeaderCellContent],td[idsHeaderCellContent]", inputs: ["externalCellTemplates"] }, { kind: "component", type: IdsCheckboxComponent, selector: "ids-checkbox", inputs: ["name", "required", "readonly", "size", "tabIndex", "value", "variant", "checked", "indeterminate", "aria-label", "aria-labelledby", "aria-describedby", "disabled"], outputs: ["disabledChange", "change", "indeterminateChange"] }, { kind: "component", type: IdsIconComponent, selector: "ids-icon", inputs: ["size", "sizeCollection", "variant", "fontIcon", "svgIcon", "aria-hidden"] }, { kind: "component", type: IdsIconButtonComponent, selector: "button[idsIconButton]", inputs: ["appearance", "size", "variant", "disabled"] }, { kind: "directive", type: IdsTableCellTemplateDirective, selector: "[idsCellTemplate]", inputs: ["idsCellTemplate"] }, { kind: "directive", type: CdkCell, selector: "cdk-cell, td[cdk-cell]" }, { kind: "directive", type: CdkCellDef, selector: "[cdkCellDef]" }, { kind: "directive", type: CdkColumnDef, selector: "[cdkColumnDef]", inputs: ["cdkColumnDef", "sticky", "stickyEnd"] }, { kind: "directive", type: CdkHeaderCell, selector: "cdk-header-cell, th[cdk-header-cell]" }, { kind: "directive", type: CdkHeaderCellDef, selector: "[cdkHeaderCellDef]" }, { kind: "component", type: CdkHeaderRow, selector: "cdk-header-row, tr[cdk-header-row]" }, { kind: "directive", type: CdkHeaderRowDef, selector: "[cdkHeaderRowDef]", inputs: ["cdkHeaderRowDef", "cdkHeaderRowDefSticky"] }, { kind: "directive", type: CdkNoDataRow, selector: "ng-template[cdkNoDataRow]" }, { kind: "component", type: CdkRow, selector: "cdk-row, tr[cdk-row]" }, { kind: "directive", type: CdkRowDef, selector: "[cdkRowDef]", inputs: ["cdkRowDefColumns", "cdkRowDefWhen"] }, { kind: "component", type: CdkTable, selector: "cdk-table, table[cdk-table]", inputs: ["trackBy", "dataSource", "multiTemplateDataRows", "fixedLayout"], outputs: ["contentChanged"], exportAs: ["cdkTable"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RowInfoHolderDirective, selector: "[rowInfo]", inputs: ["rowInfo"] }], animations: [
623
620
  trigger('detailExpand', [
624
621
  state('collapsed', style({ height: '0px', minHeight: '0', visibility: 'hidden' })),
625
622
  state('expanded', style({ height: '*', visibility: 'visible' })),
@@ -655,7 +652,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.2", ngImpor
655
652
  state('expanded', style({ height: '*', visibility: 'visible' })),
656
653
  transition('expanded <=> collapsed', animate('200ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
657
654
  ]),
658
- ], providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], exportAs: 'idsTable', template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row ids-table__row--surface\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n" }]
655
+ ], providers: [{ provide: IDS_ICON_BUTTON_PARENT, useExisting: IdsTableComponent }], exportAs: 'idsTable', template: "<!-- eslint-disable @angular-eslint/template/prefer-self-closing-tags -->\n\n<!-- Empty table message template -->\n<ng-template #noRowsToShow>\n <div class=\"ids-table__no-rows-to-show\">\n <ng-content select=\"[idsNoRowsToShow]\">No rows to show</ng-content>\n </div>\n</ng-template>\n\n<!-- Default detail cell template (a table showing the non-visible columns) -->\n<ng-template #defaultDetail let-row let-cols=\"cols\" [idsCellTemplate]=\"_defaultMasterDetailTemplateName\">\n <ids-table appearance=\"zebra\" [dataSource]=\"[row]\" [columnDefs]=\"cols\"></ids-table>\n</ng-template>\n\n<!-- TODO: Loading spinner -->\n\n<div class=\"ids-table__horizontal-scroll\">\n <table\n cdk-table\n cdkDropListGroup\n multiTemplateDataRows\n [id]=\"id()\"\n [dataSource]=\"dataSource()\"\n (contentChanged)=\"_tableContentChanged()\"\n >\n <caption><ng-content select=\"[idsTableCaption]\"></ng-content></caption>\n\n <!-- Column and row definitions for row selection -->\n <ng-container cdkColumnDef=\"$selectBoxes\" sticky>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n role=\"cell\"\n class=\"ids-table__header-cell ids-table__header-cell--select-all-rows\"\n >\n @let isRowSelected = rowSelection.hasValue();\n @let isTableVariantPrimary = variant() === 'primary';\n <ids-checkbox\n [indeterminate]=\"isRowSelected && !_isAllSelected()\"\n [checked]=\"isRowSelected && _isAllSelected()\"\n [disabled]=\"_isSelectAllDisabled()\"\n [aria-label]=\"_intl.headerSelectorAriaLabel\"\n [variant]=\"isTableVariantPrimary && isRowSelected ? 'light' : 'surface'\"\n (change)=\"$event ? _masterToggle() : null\"\n >\n </ids-checkbox>\n </th>\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--row-select\"\n >\n <ids-checkbox\n class=\"ids-table__checkbox--row-selector\"\n [disabled]=\"_unselectableRows().has(row)\"\n [checked]=\"rowSelection.isSelected(row)\"\n [value]=\"row\"\n [aria-label]=\"_intl.rowSelectorAriaLabel\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"$event ? rowSelection.toggle(row) : null\"\n >\n </ids-checkbox>\n </td>\n </ng-container>\n\n <!-- Column and row definitions for the master-detail toggle feature -->\n <ng-container cdkColumnDef=\"$masterDetail\" stickyEnd>\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n scope=\"col\"\n class=\"ids-table__header-cell ids-table__header-cell--master-detail-toggle\"\n [class.ids-table__header-cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @if (showDetailHeader()) {\n <span>{{ _intl.detailHeaderLabel }}</span>\n }\n </th>\n <td\n *cdkCellDef=\"let row; let idx = $index\"\n cdk-cell\n class=\"ids-table__cell ids-table__cell--master-detail-toggle\"\n [class.ids-table__cell--master-detail-toggle-expand]=\"showDetailHeader()\"\n >\n @let hasDetail = hasDetailRow()(idx, row);\n @let rowExpanded = _expandedRows.has(row);\n @if (hasDetail) {\n <button\n type=\"button\"\n idsIconButton\n class=\"ids-table__button--master-detail\"\n [attr.aria-expanded]=\"rowExpanded || false\"\n [attr.aria-label]=\"_intl.getDetailExpandButtonAriaLabel(row) || null\"\n (click)=\"_handleMasterDetailClick(row)\"\n >\n <ids-icon aria-hidden=\"true\" alt=\"\" [fontIcon]=\"rowExpanded ? 'chevron-up' : 'chevron-down'\" />\n </button>\n }\n </td>\n </ng-container>\n <!-- Column definition for the detail cells -->\n <ng-container cdkColumnDef=\"$expandedDetail\">\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell ids-table__detail-cell\" [attr.colspan]=\"_detailColSpan()\">\n <div class=\"ids-table__detail-cell--content-wrapper\" [@detailExpand]=\"_expandedRows.has(row) ? 'expanded' : 'collapsed'\">\n @let isDefaultTemplate = _detailTemplate() === _defaulDetailTemplate();\n @let context = isDefaultTemplate ? { $implicit: row, cols: _hiddenColumns() } : { $implicit: row };\n <ng-container *ngTemplateOutlet=\"_detailTemplate() ?? defaultDetail; context: context\"></ng-container>\n </div>\n </td>\n </ng-container>\n\n <!-- Column definitions for sticky empty cells -->\n <ng-container cdkColumnDef=\"$empty\" sticky>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n <ng-container cdkColumnDef=\"$emptyEnd\" stickyEnd>\n <td *cdkCellDef=\"let row; let idx = index\" cdk-cell class=\"ids-table__cell\"></td>\n </ng-container>\n\n <!-- Column and row definitions for the actual data -->\n @for (col of columnDefs(); track col.id; let colIndex = $index; let isLast = $last ) {\n <ng-container\n [cdkColumnDef]=\"col.id\"\n [sticky]=\"col.sticky && !col.stickyEnd\"\n [stickyEnd]=\"col.stickyEnd && !col.sticky\"\n >\n @let colSortable = col.sortable && enableSorting();\n @let colNumeric = col.cellRenderer === 'numeric';\n @let orderName = col.orderName || col.field || col.id;\n @let sortDirection = colSortable && _sortState()?.sortBy === orderName ? _sortState()?.direction : null;\n @let nextSortDirection = _getNextSortDirectionFor(orderName);\n <th\n *cdkHeaderCellDef\n cdk-header-cell\n class=\"ids-table__header-cell\"\n idsHeaderCellContent\n scope=\"col\"\n [class.ids-table__header-cell--sortable]=\"colSortable\"\n [class.ids-table__header-cell--numeric]=\"colNumeric\"\n [class]=\"col.columnClasses || ''\"\n [colDef]=\"col\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n [id]=\"id() + '-header-' + col.id\"\n >\n @if (colSortable) {\n <button\n type=\"button\"\n idsIconButton\n colEnd\n class=\"ids-table__header-cell--sort-button\"\n [attr.aria-label]=\"_intl.getSortButtonAriaLabel(col, nextSortDirection)\"\n (click)=\"_handleSortClick(orderName)\"\n >\n @switch (sortDirection) {\n @case ('asc') {\n <ids-icon [fontIcon]=\"'chevron-up'\"></ids-icon>\n }\n @case ('desc') {\n <ids-icon [fontIcon]=\"'chevron-down'\"></ids-icon>\n }\n @default {\n <ids-icon [fontIcon]=\"'adjustments-horizontal'\"></ids-icon>\n }\n }\n </button>\n }\n </th>\n\n @if (col.identifier) {\n <th\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n idsCellContent\n class=\"ids-table__cell ids-table__cell--identifier\"\n role=\"gridcell\"\n scope=\"row\"\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></th>\n } @else {\n <td\n *cdkCellDef=\"let row; let idx = index\"\n cdk-cell\n class=\"ids-table__cell\"\n idsCellContent\n [class]=\"col.cellClasses || ''\"\n [colDef]=\"col\"\n [rowData]=\"row\"\n [externalCellTemplates]=\"_cellTemplatesByName()\"\n (click)=\"_handleCellClick($event, row, col)\"\n ></td>\n }\n </ng-container>\n }\n\n <!-- Header row render definition -->\n <tr *cdkHeaderRowDef=\"_actualColumns(); sticky: fixedHeader()\" cdk-header-row class=\"ids-table__header-row\"></tr>\n\n <!-- Row render definition -->\n <tr\n *cdkRowDef=\"let row; columns: _actualColumns(); let idx = dataIndex\"\n cdk-row\n class=\"ids-table__row\"\n [rowInfo]=\"{ rowData: row, index: idx }\"\n [ngClass]=\"(appearance() !== _appearanceZebra || idx % 2 === 0) ? 'ids-table__row--surface' : 'ids-table__row--secondary'\"\n (click)=\"_handleRowClick($event, row)\"\n (keydown)=\"_handleRowKeyDown($event, row)\"\n ></tr>\n\n <!-- Detail row render definition -->\n @if (masterDetail()) {\n <tr\n *cdkRowDef=\"let row; columns: _detailRowTemplates(); when: hasDetailRow()\"\n cdk-row\n class=\"ids-table__detail-row ids-table__row--surface\"\n [class.ids-table__detail-row--expanded]=\"_expandedRows.has(row) || _allRowsExpanded()\"\n ></tr>\n }\n\n <!-- Empty table message (inside the table) -->\n @if (!noRowsToShowOverlayBelow()) {\n <tr *cdkNoDataRow class=\"ids-table__row\">\n <td class=\"ids-table__cell\" [attr.colspan]=\"_actualColumns().length\">\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n </td>\n </tr>\n }\n </table>\n</div>\n<!-- Empty table message (outside the table) -->\n@if (noRowsToShowOverlayBelow() && _hasNoRows()) {\n <ng-container [ngTemplateOutlet]=\"noRowsToShow\"></ng-container>\n}\n" }]
659
656
  }] });
660
657
 
661
658
  /**