@anguless/angulux 22.6.4 → 22.6.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.
- package/fesm2022/anguless-angulux-button.mjs +4 -1
- package/fesm2022/anguless-angulux-button.mjs.map +1 -1
- package/fesm2022/anguless-angulux-datepicker.mjs +17 -3
- package/fesm2022/anguless-angulux-datepicker.mjs.map +1 -1
- package/fesm2022/anguless-angulux-dom.mjs +9 -1
- package/fesm2022/anguless-angulux-dom.mjs.map +1 -1
- package/fesm2022/anguless-angulux-drawer.mjs +5 -1
- package/fesm2022/anguless-angulux-drawer.mjs.map +1 -1
- package/fesm2022/anguless-angulux-menu.mjs +4 -1
- package/fesm2022/anguless-angulux-menu.mjs.map +1 -1
- package/fesm2022/anguless-angulux-message.mjs +5 -2
- package/fesm2022/anguless-angulux-message.mjs.map +1 -1
- package/fesm2022/anguless-angulux-multiselect.mjs +8 -5
- package/fesm2022/anguless-angulux-multiselect.mjs.map +1 -1
- package/fesm2022/anguless-angulux-overlay.mjs +11 -1
- package/fesm2022/anguless-angulux-overlay.mjs.map +1 -1
- package/fesm2022/anguless-angulux-paginator.mjs +6 -6
- package/fesm2022/anguless-angulux-paginator.mjs.map +1 -1
- package/fesm2022/anguless-angulux-select.mjs +169 -37
- package/fesm2022/anguless-angulux-select.mjs.map +1 -1
- package/fesm2022/anguless-angulux-selectbutton.mjs +2 -2
- package/fesm2022/anguless-angulux-selectbutton.mjs.map +1 -1
- package/fesm2022/anguless-angulux-table.mjs +120 -20
- package/fesm2022/anguless-angulux-table.mjs.map +1 -1
- package/fesm2022/anguless-angulux-tabs.mjs +7 -1
- package/fesm2022/anguless-angulux-tabs.mjs.map +1 -1
- package/fesm2022/anguless-angulux-tooltip.mjs +231 -46
- package/fesm2022/anguless-angulux-tooltip.mjs.map +1 -1
- package/fesm2022/anguless-angulux-treetable.mjs +4 -4
- package/fesm2022/anguless-angulux-treetable.mjs.map +1 -1
- package/package.json +1 -1
- package/types/anguless-angulux-select.d.ts +28 -3
- package/types/anguless-angulux-table.d.ts +10 -0
- package/types/anguless-angulux-tooltip.d.ts +74 -18
|
@@ -301,7 +301,7 @@ class SelectButton extends BaseEditableHolder {
|
|
|
301
301
|
<agl-togglebutton
|
|
302
302
|
[autofocus]="autofocus"
|
|
303
303
|
[styleClass]="styleClass"
|
|
304
|
-
[ngModel]="isSelected(option)"
|
|
304
|
+
[ngModel]="isSelected(option)" [ngModelOptions]="{ standalone: true }"
|
|
305
305
|
[onLabel]="this.getOptionLabel(option)"
|
|
306
306
|
[offLabel]="this.getOptionLabel(option)"
|
|
307
307
|
[disabled]="$disabled() || isOptionDisabled(option)"
|
|
@@ -332,7 +332,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
332
332
|
<agl-togglebutton
|
|
333
333
|
[autofocus]="autofocus"
|
|
334
334
|
[styleClass]="styleClass"
|
|
335
|
-
[ngModel]="isSelected(option)"
|
|
335
|
+
[ngModel]="isSelected(option)" [ngModelOptions]="{ standalone: true }"
|
|
336
336
|
[onLabel]="this.getOptionLabel(option)"
|
|
337
337
|
[offLabel]="this.getOptionLabel(option)"
|
|
338
338
|
[disabled]="$disabled() || isOptionDisabled(option)"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anguless-angulux-selectbutton.mjs","sources":["../../src/selectbutton/style/selectbuttonstyle.ts","../../src/selectbutton/selectbutton.ts","../../src/selectbutton/anguless-angulux-selectbutton.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as selectbutton_style } from '@anguless/angulux-styles/selectbutton';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${selectbutton_style}\n\n /* For AnguluxConfig */\n .p-selectbutton.ng-invalid.ng-dirty {\n outline: 1px solid dt('selectbutton.invalid.border.color');\n outline-offset: 0;\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-selectbutton p-component',\n {\n 'p-invalid': instance.$invalid(),\n 'p-selectbutton-fluid': instance.fluid()\n }\n ]\n};\n\n@Injectable()\nexport class SelectButtonStyle extends BaseStyle {\n name = 'selectbutton';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * SelectButton is used to choose single or multiple items from a list using buttons.\n *\n * @module selectbuttonstyle\n *\n */\nexport enum SelectButtonClasses {\n /**\n * Class name of the root element\n */\n root = 'p-selectbutton'\n}\n\nexport interface SelectButtonStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n contentChild, EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n input,\n Input,\n NgModule,\n numberAttribute,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { equals, resolveFieldData } from '@anguless/angulux-utils';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { ToggleButton } from '@anguless/angulux/togglebutton';\nimport { SelectButtonChangeEvent, SelectButtonItemTemplateContext, SelectButtonOptionClickEvent, SelectButtonPassThrough } from '@anguless/angulux/types/selectbutton';\nimport { SelectButtonStyle } from './style/selectbuttonstyle';\n\nconst SELECTBUTTON_INSTANCE = new InjectionToken<SelectButton>('SELECTBUTTON_INSTANCE');\n\nexport const SELECTBUTTON_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButton),\n multi: true\n};\n/**\n * SelectButton is used to choose single or multiple items from a list using buttons.\n * @group Components\n */\n@Component({\n selector: 'agl-selectButton, agl-selectbutton, agl-select-button',\n standalone: true,\n imports: [ToggleButton, FormsModule, CommonModule, SharedModule, BindModule],\n template: `\n @for (option of options; track getOptionLabel(option); let i = $index) {\n <agl-togglebutton\n [autofocus]=\"autofocus\"\n [styleClass]=\"styleClass\"\n [ngModel]=\"isSelected(option)\"\n [onLabel]=\"this.getOptionLabel(option)\"\n [offLabel]=\"this.getOptionLabel(option)\"\n [disabled]=\"$disabled() || isOptionDisabled(option)\"\n (onChange)=\"onOptionSelect($event, option, i)\"\n [allowEmpty]=\"getAllowEmpty()\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n [pt]=\"ptm('pcToggleButton')\"\n [unstyled]=\"unstyled()\"\n >\n @if (itemTemplate()) {\n <ng-template #content>\n <ng-container *ngTemplateOutlet=\"itemTemplate(); context: { $implicit: option, index: i }\"></ng-container>\n </ng-template>\n }\n </agl-togglebutton>\n }\n `,\n providers: [SELECTBUTTON_VALUE_ACCESSOR, SelectButtonStyle, { provide: SELECTBUTTON_INSTANCE, useExisting: SelectButton }, { provide: PARENT_INSTANCE, useExisting: SelectButton }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[attr.role]': '\"group\"',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n '[attr.aria-invalid]': '$invalid() || undefined',\n '[attr.data-p]': 'dataP'\n },\n hostDirectives: [Bind]\n})\nexport class SelectButton extends BaseEditableHolder<SelectButtonPassThrough> implements AfterViewChecked {\n componentName = 'SelectButton';\n /**\n * An array of selectitems to display as the available options.\n * @group Props\n */\n @Input() options: any[] | undefined;\n /**\n * Name of the label field of an option.\n * @group Props\n */\n @Input() optionLabel: string | undefined;\n /**\n * Name of the value field of an option.\n * @group Props\n */\n @Input() optionValue: string | undefined;\n /**\n * Name of the disabled field of an option.\n * @group Props\n */\n @Input() optionDisabled: string | undefined;\n /**\n * Whether selection can be cleared.\n * @group Props\n */\n get unselectable(): boolean {\n return this._unselectable;\n }\n private _unselectable: boolean = false;\n\n @Input({ transform: booleanAttribute })\n set unselectable(value: boolean) {\n this._unselectable = value;\n this.allowEmpty = !value;\n }\n\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number = 0;\n /**\n * When specified, allows selecting multiple values.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) multiple: boolean | undefined;\n /**\n * Whether selection can not be cleared.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) allowEmpty: boolean = true;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * A property to uniquely identify a value in options.\n * @group Props\n */\n @Input() dataKey: string | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Callback to invoke on input click.\n * @param {SelectButtonOptionClickEvent} event - Custom click event.\n * @group Emits\n */\n @Output() onOptionClick: EventEmitter<SelectButtonOptionClickEvent> = new EventEmitter<SelectButtonOptionClickEvent>();\n /**\n * Callback to invoke on selection change.\n * @param {SelectButtonChangeEvent} event - Custom change event.\n * @group Emits\n */\n @Output() onChange: EventEmitter<SelectButtonChangeEvent> = new EventEmitter<SelectButtonChangeEvent>();\n /**\n * Custom item template.\n * @param {SelectButtonItemTemplateContext} context - item context.\n * @see {@link SelectButtonItemTemplateContext}\n * @group Templates\n */\n itemTemplate = contentChild<TemplateRef<SelectButtonItemTemplateContext>>('item', { descendants: false });\n\n get equalityKey() {\n return this.optionValue ? null : this.dataKey;\n }\n\n value: any;\n\n focusedIndex: number = 0;\n\n _componentStyle = inject(SelectButtonStyle);\n\n $pcSelectButton: SelectButton | undefined = inject(SELECTBUTTON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n getAllowEmpty() {\n if (this.multiple) {\n return this.allowEmpty || this.value?.length !== 1;\n }\n return this.allowEmpty;\n }\n\n getOptionLabel(option: any) {\n return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option.label != undefined ? option.label : option;\n }\n\n getOptionValue(option: any) {\n return this.optionValue ? resolveFieldData(option, this.optionValue) : this.optionLabel || option.value === undefined ? option : option.value;\n }\n\n isOptionDisabled(option: any) {\n return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : option.disabled !== undefined ? option.disabled : false;\n }\n\n onOptionSelect(event, option, index) {\n if (this.$disabled() || this.isOptionDisabled(option)) {\n return;\n }\n\n let selected = this.isSelected(option);\n\n if (selected && this.unselectable) {\n return;\n }\n\n let optionValue = this.getOptionValue(option);\n let newValue;\n\n if (this.multiple) {\n if (selected) newValue = this.value.filter((val) => !equals(val, optionValue, this.equalityKey || undefined));\n else newValue = this.value ? [...this.value, optionValue] : [optionValue];\n } else {\n if (selected && !this.allowEmpty) {\n return;\n }\n newValue = selected ? null : optionValue;\n }\n\n this.focusedIndex = index;\n this.value = newValue;\n this.writeModelValue(this.value);\n this.onModelChange(this.value);\n\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n\n this.onOptionClick.emit({\n originalEvent: event,\n option: option,\n index: index\n });\n }\n\n changeTabIndexes(event, direction) {\n let firstTabableChild, index;\n\n for (let i = 0; i <= this.el.nativeElement.children.length - 1; i++) {\n if (this.el.nativeElement.children[i].getAttribute('tabindex') === '0') firstTabableChild = { elem: this.el.nativeElement.children[i], index: i };\n }\n\n if (direction === 'prev') {\n if (firstTabableChild.index === 0) index = this.el.nativeElement.children.length - 1;\n else index = firstTabableChild.index - 1;\n } else {\n if (firstTabableChild.index === this.el.nativeElement.children.length - 1) index = 0;\n else index = firstTabableChild.index + 1;\n }\n\n this.focusedIndex = index;\n this.el.nativeElement.children[index].focus();\n }\n\n onFocus(event: Event, index: number) {\n this.focusedIndex = index;\n }\n\n onBlur() {\n this.onModelTouched();\n }\n\n removeOption(option: any): void {\n this.value = this.value.filter((val: any) => !equals(val, this.getOptionValue(option), this.dataKey));\n }\n\n isSelected(option: any) {\n let selected = false;\n const optionValue = this.getOptionValue(option);\n\n if (this.multiple) {\n if (this.value && Array.isArray(this.value)) {\n for (let val of this.value) {\n if (equals(val, optionValue, this.dataKey)) {\n selected = true;\n break;\n }\n }\n }\n } else {\n selected = equals(this.getOptionValue(option), this.value, this.equalityKey || undefined);\n }\n\n return selected;\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n this.value = value;\n setModelValue(this.value);\n this.cd.markForCheck();\n }\n\n get dataP() {\n return this.cn({\n invalid: this.$invalid()\n });\n }\n}\n\n@NgModule({\n imports: [SelectButton, SharedModule],\n exports: [SelectButton, SharedModule]\n})\nexport class SelectButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["selectbutton_style"],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAkB;;;;;;;CAOvB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,4BAA4B;AAC5B,QAAA;AACI,YAAA,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;AAChC,YAAA,sBAAsB,EAAE,QAAQ,CAAC,KAAK;AACzC;AACJ;CACJ;AAGK,MAAO,iBAAkB,SAAQ,SAAS,CAAA;IAC5C,IAAI,GAAG,cAAc;IAErB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,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AAA,OAAA,EAAA,CA7P3B,YAAY,EA8PG,YAAY,CAAA,EAAA,CAAA;AAE3B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,OAAA,EAAA,CAHjB,YAAY,EAAE,YAAY,EACZ,YAAY,CAAA,EAAA,CAAA;;2FAE3B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACvC,iBAAA;;;AC/UD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"anguless-angulux-selectbutton.mjs","sources":["../../src/selectbutton/style/selectbuttonstyle.ts","../../src/selectbutton/selectbutton.ts","../../src/selectbutton/anguless-angulux-selectbutton.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { style as selectbutton_style } from '@anguless/angulux-styles/selectbutton';\nimport { BaseStyle } from '@anguless/angulux/base';\n\nconst style = /*css*/ `\n ${selectbutton_style}\n\n /* For AnguluxConfig */\n .p-selectbutton.ng-invalid.ng-dirty {\n outline: 1px solid dt('selectbutton.invalid.border.color');\n outline-offset: 0;\n }\n`;\n\nconst classes = {\n root: ({ instance }) => [\n 'p-selectbutton p-component',\n {\n 'p-invalid': instance.$invalid(),\n 'p-selectbutton-fluid': instance.fluid()\n }\n ]\n};\n\n@Injectable()\nexport class SelectButtonStyle extends BaseStyle {\n name = 'selectbutton';\n\n style = style;\n\n classes = classes;\n}\n\n/**\n *\n * SelectButton is used to choose single or multiple items from a list using buttons.\n *\n * @module selectbuttonstyle\n *\n */\nexport enum SelectButtonClasses {\n /**\n * Class name of the root element\n */\n root = 'p-selectbutton'\n}\n\nexport interface SelectButtonStyle extends BaseStyle {}\n","import { CommonModule } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewChecked,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n contentChild, EventEmitter,\n forwardRef,\n inject,\n InjectionToken,\n input,\n Input,\n NgModule,\n numberAttribute,\n Output,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { equals, resolveFieldData } from '@anguless/angulux-utils';\nimport { SharedModule } from '@anguless/angulux/api';\nimport { PARENT_INSTANCE } from '@anguless/angulux/basecomponent';\nimport { BaseEditableHolder } from '@anguless/angulux/baseeditableholder';\nimport { Bind, BindModule } from '@anguless/angulux/bind';\nimport { ToggleButton } from '@anguless/angulux/togglebutton';\nimport { SelectButtonChangeEvent, SelectButtonItemTemplateContext, SelectButtonOptionClickEvent, SelectButtonPassThrough } from '@anguless/angulux/types/selectbutton';\nimport { SelectButtonStyle } from './style/selectbuttonstyle';\n\nconst SELECTBUTTON_INSTANCE = new InjectionToken<SelectButton>('SELECTBUTTON_INSTANCE');\n\nexport const SELECTBUTTON_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectButton),\n multi: true\n};\n/**\n * SelectButton is used to choose single or multiple items from a list using buttons.\n * @group Components\n */\n@Component({\n selector: 'agl-selectButton, agl-selectbutton, agl-select-button',\n standalone: true,\n imports: [ToggleButton, FormsModule, CommonModule, SharedModule, BindModule],\n template: `\n @for (option of options; track getOptionLabel(option); let i = $index) {\n <agl-togglebutton\n [autofocus]=\"autofocus\"\n [styleClass]=\"styleClass\"\n [ngModel]=\"isSelected(option)\" [ngModelOptions]=\"{ standalone: true }\"\n [onLabel]=\"this.getOptionLabel(option)\"\n [offLabel]=\"this.getOptionLabel(option)\"\n [disabled]=\"$disabled() || isOptionDisabled(option)\"\n (onChange)=\"onOptionSelect($event, option, i)\"\n [allowEmpty]=\"getAllowEmpty()\"\n [size]=\"size()\"\n [fluid]=\"fluid()\"\n [pt]=\"ptm('pcToggleButton')\"\n [unstyled]=\"unstyled()\"\n >\n @if (itemTemplate()) {\n <ng-template #content>\n <ng-container *ngTemplateOutlet=\"itemTemplate(); context: { $implicit: option, index: i }\"></ng-container>\n </ng-template>\n }\n </agl-togglebutton>\n }\n `,\n providers: [SELECTBUTTON_VALUE_ACCESSOR, SelectButtonStyle, { provide: SELECTBUTTON_INSTANCE, useExisting: SelectButton }, { provide: PARENT_INSTANCE, useExisting: SelectButton }],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': \"cx('root')\",\n '[attr.role]': '\"group\"',\n '[attr.aria-labelledby]': 'ariaLabelledBy',\n '[attr.aria-invalid]': '$invalid() || undefined',\n '[attr.data-p]': 'dataP'\n },\n hostDirectives: [Bind]\n})\nexport class SelectButton extends BaseEditableHolder<SelectButtonPassThrough> implements AfterViewChecked {\n componentName = 'SelectButton';\n /**\n * An array of selectitems to display as the available options.\n * @group Props\n */\n @Input() options: any[] | undefined;\n /**\n * Name of the label field of an option.\n * @group Props\n */\n @Input() optionLabel: string | undefined;\n /**\n * Name of the value field of an option.\n * @group Props\n */\n @Input() optionValue: string | undefined;\n /**\n * Name of the disabled field of an option.\n * @group Props\n */\n @Input() optionDisabled: string | undefined;\n /**\n * Whether selection can be cleared.\n * @group Props\n */\n get unselectable(): boolean {\n return this._unselectable;\n }\n private _unselectable: boolean = false;\n\n @Input({ transform: booleanAttribute })\n set unselectable(value: boolean) {\n this._unselectable = value;\n this.allowEmpty = !value;\n }\n\n /**\n * Index of the element in tabbing order.\n * @group Props\n */\n @Input({ transform: numberAttribute }) tabindex: number = 0;\n /**\n * When specified, allows selecting multiple values.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) multiple: boolean | undefined;\n /**\n * Whether selection can not be cleared.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) allowEmpty: boolean = true;\n /**\n * Style class of the component.\n * @group Props\n */\n @Input() styleClass: string | undefined;\n /**\n * Establishes relationships between the component and label(s) where its value should be one or more element IDs.\n * @group Props\n */\n @Input() ariaLabelledBy: string | undefined;\n /**\n * A property to uniquely identify a value in options.\n * @group Props\n */\n @Input() dataKey: string | undefined;\n /**\n * When present, it specifies that the component should automatically get focus on load.\n * @group Props\n */\n @Input({ transform: booleanAttribute }) autofocus: boolean | undefined;\n /**\n * Specifies the size of the component.\n * @defaultValue undefined\n * @group Props\n */\n size = input<'large' | 'small' | undefined>();\n /**\n * Spans 100% width of the container when enabled.\n * @defaultValue undefined\n * @group Props\n */\n fluid = input(undefined, { transform: booleanAttribute });\n /**\n * Callback to invoke on input click.\n * @param {SelectButtonOptionClickEvent} event - Custom click event.\n * @group Emits\n */\n @Output() onOptionClick: EventEmitter<SelectButtonOptionClickEvent> = new EventEmitter<SelectButtonOptionClickEvent>();\n /**\n * Callback to invoke on selection change.\n * @param {SelectButtonChangeEvent} event - Custom change event.\n * @group Emits\n */\n @Output() onChange: EventEmitter<SelectButtonChangeEvent> = new EventEmitter<SelectButtonChangeEvent>();\n /**\n * Custom item template.\n * @param {SelectButtonItemTemplateContext} context - item context.\n * @see {@link SelectButtonItemTemplateContext}\n * @group Templates\n */\n itemTemplate = contentChild<TemplateRef<SelectButtonItemTemplateContext>>('item', { descendants: false });\n\n get equalityKey() {\n return this.optionValue ? null : this.dataKey;\n }\n\n value: any;\n\n focusedIndex: number = 0;\n\n _componentStyle = inject(SelectButtonStyle);\n\n $pcSelectButton: SelectButton | undefined = inject(SELECTBUTTON_INSTANCE, { optional: true, skipSelf: true }) ?? undefined;\n\n bindDirectiveInstance = inject(Bind, { self: true });\n\n onAfterViewChecked(): void {\n this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));\n }\n\n getAllowEmpty() {\n if (this.multiple) {\n return this.allowEmpty || this.value?.length !== 1;\n }\n return this.allowEmpty;\n }\n\n getOptionLabel(option: any) {\n return this.optionLabel ? resolveFieldData(option, this.optionLabel) : option.label != undefined ? option.label : option;\n }\n\n getOptionValue(option: any) {\n return this.optionValue ? resolveFieldData(option, this.optionValue) : this.optionLabel || option.value === undefined ? option : option.value;\n }\n\n isOptionDisabled(option: any) {\n return this.optionDisabled ? resolveFieldData(option, this.optionDisabled) : option.disabled !== undefined ? option.disabled : false;\n }\n\n onOptionSelect(event, option, index) {\n if (this.$disabled() || this.isOptionDisabled(option)) {\n return;\n }\n\n let selected = this.isSelected(option);\n\n if (selected && this.unselectable) {\n return;\n }\n\n let optionValue = this.getOptionValue(option);\n let newValue;\n\n if (this.multiple) {\n if (selected) newValue = this.value.filter((val) => !equals(val, optionValue, this.equalityKey || undefined));\n else newValue = this.value ? [...this.value, optionValue] : [optionValue];\n } else {\n if (selected && !this.allowEmpty) {\n return;\n }\n newValue = selected ? null : optionValue;\n }\n\n this.focusedIndex = index;\n this.value = newValue;\n this.writeModelValue(this.value);\n this.onModelChange(this.value);\n\n this.onChange.emit({\n originalEvent: event,\n value: this.value\n });\n\n this.onOptionClick.emit({\n originalEvent: event,\n option: option,\n index: index\n });\n }\n\n changeTabIndexes(event, direction) {\n let firstTabableChild, index;\n\n for (let i = 0; i <= this.el.nativeElement.children.length - 1; i++) {\n if (this.el.nativeElement.children[i].getAttribute('tabindex') === '0') firstTabableChild = { elem: this.el.nativeElement.children[i], index: i };\n }\n\n if (direction === 'prev') {\n if (firstTabableChild.index === 0) index = this.el.nativeElement.children.length - 1;\n else index = firstTabableChild.index - 1;\n } else {\n if (firstTabableChild.index === this.el.nativeElement.children.length - 1) index = 0;\n else index = firstTabableChild.index + 1;\n }\n\n this.focusedIndex = index;\n this.el.nativeElement.children[index].focus();\n }\n\n onFocus(event: Event, index: number) {\n this.focusedIndex = index;\n }\n\n onBlur() {\n this.onModelTouched();\n }\n\n removeOption(option: any): void {\n this.value = this.value.filter((val: any) => !equals(val, this.getOptionValue(option), this.dataKey));\n }\n\n isSelected(option: any) {\n let selected = false;\n const optionValue = this.getOptionValue(option);\n\n if (this.multiple) {\n if (this.value && Array.isArray(this.value)) {\n for (let val of this.value) {\n if (equals(val, optionValue, this.dataKey)) {\n selected = true;\n break;\n }\n }\n }\n } else {\n selected = equals(this.getOptionValue(option), this.value, this.equalityKey || undefined);\n }\n\n return selected;\n }\n\n /**\n * @override\n *\n * @see {@link BaseEditableHolder.writeControlValue}\n * Writes the value to the control.\n */\n writeControlValue(value: any, setModelValue: (value: any) => void): void {\n this.value = value;\n setModelValue(this.value);\n this.cd.markForCheck();\n }\n\n get dataP() {\n return this.cn({\n invalid: this.$invalid()\n });\n }\n}\n\n@NgModule({\n imports: [SelectButton, SharedModule],\n exports: [SelectButton, SharedModule]\n})\nexport class SelectButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["selectbutton_style"],"mappings":";;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,WAAW;MAChBA,OAAkB;;;;;;;CAOvB;AAED,MAAM,OAAO,GAAG;AACZ,IAAA,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,KAAK;QACpB,4BAA4B;AAC5B,QAAA;AACI,YAAA,WAAW,EAAE,QAAQ,CAAC,QAAQ,EAAE;AAChC,YAAA,sBAAsB,EAAE,QAAQ,CAAC,KAAK;AACzC;AACJ;CACJ;AAGK,MAAO,iBAAkB,SAAQ,SAAS,CAAA;IAC5C,IAAI,GAAG,cAAc;IAErB,KAAK,GAAG,KAAK;IAEb,OAAO,GAAG,OAAO;uGALR,iBAAiB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAjB,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B;;AASD;;;;;;AAMG;IACS;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC3B;;AAEG;AACH,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,gBAAuB;AAC3B,CAAC,EALW,mBAAmB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ACZ,YAAY,CAAA,EAAA,CAAA;;2FAE3B,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC;AACrC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,YAAY;AACvC,iBAAA;;;AC/UD;;AAEG;;;;"}
|
|
@@ -50,8 +50,22 @@ import { SelectButtonModule } from '@anguless/angulux/selectbutton';
|
|
|
50
50
|
import { UniqueComponentId, ObjectUtils, ZIndexUtils } from '@anguless/angulux/utils';
|
|
51
51
|
import { Subject } from 'rxjs';
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* The rule that drew the line above a selected row from the row before it, with a sibling :has().
|
|
55
|
+
* Chrome re-evaluates such a selector for every row inserted beside it, so rendering a long table
|
|
56
|
+
* grew with the square of its rows. It is replaced in place, so the cascade order stays as it was,
|
|
57
|
+
* by a rule on `p-datatable-row-before-selected`, the class Table puts on that row
|
|
58
|
+
* (markRowsBeforeSelected in table.ts). Same property, same colour: the same border is drawn.
|
|
59
|
+
*
|
|
60
|
+
* Done here rather than in @anguless/angulux-styles, so this release works with any version of that
|
|
61
|
+
* package: one without the rule leaves the replace with nothing to do.
|
|
62
|
+
*/
|
|
63
|
+
const SIBLING_HAS_RULE = /\.p-datatable-tbody\s*>\s*tr:has\(\+\s*\.p-datatable-row-selected\)\s*>\s*td\s*\{[^}]*\}/;
|
|
64
|
+
const ROW_BEFORE_SELECTED_RULE = `.p-datatable-tbody > tr.p-datatable-row-before-selected > td {
|
|
65
|
+
border-block-end-color: dt('datatable.body.cell.selected.border.color');
|
|
66
|
+
}`;
|
|
53
67
|
const style = /*css*/ `
|
|
54
|
-
${style$1}
|
|
68
|
+
${String(style$1).replace(SIBLING_HAS_RULE, ROW_BEFORE_SELECTED_RULE)}
|
|
55
69
|
|
|
56
70
|
/* For AnguluxConfig */
|
|
57
71
|
.p-datatable-scrollable-table > .p-datatable-thead {
|
|
@@ -564,6 +578,70 @@ class TableService {
|
|
|
564
578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: TableService, decorators: [{
|
|
565
579
|
type: Injectable
|
|
566
580
|
}] });
|
|
581
|
+
const ROW_SELECTED = 'p-datatable-row-selected';
|
|
582
|
+
const ROW_BEFORE_SELECTED = 'p-datatable-row-before-selected';
|
|
583
|
+
const rowsBeforeSelected = new WeakMap();
|
|
584
|
+
/**
|
|
585
|
+
* Mark the row right before each selected row of a table with `p-datatable-row-before-selected`,
|
|
586
|
+
* which the stylesheet gives the selected border colour: the line above a selected row.
|
|
587
|
+
*
|
|
588
|
+
* The stylesheet used to find that row itself, with `tr:has(+ .p-datatable-row-selected)`. Chrome
|
|
589
|
+
* re-evaluates a sibling :has() for every row inserted beside it, so rendering a long table grew
|
|
590
|
+
* with the square of its rows: 16,000 rows took 1,176 ms, 190 ms with the class (upstream 22.1.3,
|
|
591
|
+
* measured 2026-11-18). The class draws the same border, so nothing on screen changes.
|
|
592
|
+
*
|
|
593
|
+
* Called after the table and after its body are checked: in a zoneless app a change to the rows can
|
|
594
|
+
* refresh the body alone. When the same rows are selected, each after the same element, and the
|
|
595
|
+
* marks are all there, it changes nothing and returns. Module-level, so Table's API is unchanged.
|
|
596
|
+
*/
|
|
597
|
+
function markRowsBeforeSelected(host) {
|
|
598
|
+
const last = rowsBeforeSelected.get(host);
|
|
599
|
+
// Live collections: the browser keeps their contents until the DOM under the host changes.
|
|
600
|
+
const selected = host.getElementsByClassName(ROW_SELECTED);
|
|
601
|
+
if (!selected.length && !last)
|
|
602
|
+
return;
|
|
603
|
+
if (last && last.selected.length === selected.length && host.getElementsByClassName(ROW_BEFORE_SELECTED).length === last.marks.size) {
|
|
604
|
+
let i = 0;
|
|
605
|
+
for (; i < selected.length; i++) {
|
|
606
|
+
const row = selected[i];
|
|
607
|
+
if (row !== last.selected[i] || row.previousElementSibling !== last.previous[i])
|
|
608
|
+
break;
|
|
609
|
+
}
|
|
610
|
+
if (i === selected.length)
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
const rows = [];
|
|
614
|
+
const previous = [];
|
|
615
|
+
const marks = new Set();
|
|
616
|
+
// A row of a table nested in this one belongs to that table. Rows come in document order, so the
|
|
617
|
+
// rows of one tbody are consecutive: ask once per tbody, not once per row.
|
|
618
|
+
let parent = null;
|
|
619
|
+
let own = false;
|
|
620
|
+
for (let i = 0; i < selected.length; i++) {
|
|
621
|
+
const row = selected[i];
|
|
622
|
+
const before = row.previousElementSibling;
|
|
623
|
+
rows.push(row);
|
|
624
|
+
previous.push(before);
|
|
625
|
+
if (row.parentElement !== parent) {
|
|
626
|
+
parent = row.parentElement;
|
|
627
|
+
own = parent?.closest(host.localName) === host;
|
|
628
|
+
}
|
|
629
|
+
if (own && before?.tagName === 'TR')
|
|
630
|
+
marks.add(before);
|
|
631
|
+
}
|
|
632
|
+
if (last)
|
|
633
|
+
for (const row of last.marks)
|
|
634
|
+
if (!marks.has(row))
|
|
635
|
+
row.classList.remove(ROW_BEFORE_SELECTED);
|
|
636
|
+
// Checked one by one, not taken from the last set: a [className] binding can drop a class it does not know.
|
|
637
|
+
for (const row of marks)
|
|
638
|
+
if (!row.classList.contains(ROW_BEFORE_SELECTED))
|
|
639
|
+
row.classList.add(ROW_BEFORE_SELECTED);
|
|
640
|
+
if (rows.length)
|
|
641
|
+
rowsBeforeSelected.set(host, { selected: rows, previous, marks });
|
|
642
|
+
else
|
|
643
|
+
rowsBeforeSelected.delete(host);
|
|
644
|
+
}
|
|
567
645
|
/**
|
|
568
646
|
* Table displays data in tabular format.
|
|
569
647
|
* @group Components
|
|
@@ -1283,6 +1361,7 @@ class Table extends BaseComponent {
|
|
|
1283
1361
|
bindDirectiveInstance = inject(Bind, { self: true });
|
|
1284
1362
|
onAfterViewChecked() {
|
|
1285
1363
|
this.bindDirectiveInstance.setAttrs(this.ptms(['host', 'root']));
|
|
1364
|
+
isPlatformBrowser(this.platformId) && markRowsBeforeSelected(this.el.nativeElement);
|
|
1286
1365
|
}
|
|
1287
1366
|
onInit() {
|
|
1288
1367
|
if (this.lazy && this.lazyLoadOnInit) {
|
|
@@ -1557,7 +1636,7 @@ class Table extends BaseComponent {
|
|
|
1557
1636
|
this._value = [...this.value];
|
|
1558
1637
|
}
|
|
1559
1638
|
if (this.hasFilter()) {
|
|
1560
|
-
this.
|
|
1639
|
+
this.filterAfterSort();
|
|
1561
1640
|
}
|
|
1562
1641
|
}
|
|
1563
1642
|
let sortMeta = {
|
|
@@ -1594,7 +1673,7 @@ class Table extends BaseComponent {
|
|
|
1594
1673
|
this._value = [...this.value];
|
|
1595
1674
|
}
|
|
1596
1675
|
if (this.hasFilter()) {
|
|
1597
|
-
this.
|
|
1676
|
+
this.filterAfterSort();
|
|
1598
1677
|
}
|
|
1599
1678
|
}
|
|
1600
1679
|
this.onSort.emit({
|
|
@@ -2086,8 +2165,25 @@ class Table extends BaseComponent {
|
|
|
2086
2165
|
}
|
|
2087
2166
|
return true;
|
|
2088
2167
|
}
|
|
2168
|
+
/**
|
|
2169
|
+
* Filter again after a sort, keeping the page when resetPageOnSort is false. A sort leaves the
|
|
2170
|
+
* set of matching rows as it was; only the order changes. A column filter registers an empty
|
|
2171
|
+
* constraint when it starts, so hasFilter() is true from then on, and _filter() sent the table
|
|
2172
|
+
* back to page 1 without reading resetPageOnSort (upstream 22.1.4, held under P3.a, fixed under
|
|
2173
|
+
* P3.c on 2026-11-17).
|
|
2174
|
+
*/
|
|
2175
|
+
filterAfterSort() {
|
|
2176
|
+
this.keepPageOnFilter = !this.resetPageOnSort;
|
|
2177
|
+
try {
|
|
2178
|
+
this._filter();
|
|
2179
|
+
}
|
|
2180
|
+
finally {
|
|
2181
|
+
this.keepPageOnFilter = false;
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
keepPageOnFilter = false;
|
|
2089
2185
|
_filter() {
|
|
2090
|
-
if (!this.restoringFilter) {
|
|
2186
|
+
if (!this.restoringFilter && !this.keepPageOnFilter) {
|
|
2091
2187
|
this.first = 0;
|
|
2092
2188
|
this.firstChange.emit(this.first);
|
|
2093
2189
|
}
|
|
@@ -3743,6 +3839,10 @@ class TableBody extends BaseComponent {
|
|
|
3743
3839
|
this.updateFrozenRowGroupHeaderStickyPosition();
|
|
3744
3840
|
}
|
|
3745
3841
|
}
|
|
3842
|
+
onAfterViewChecked() {
|
|
3843
|
+
// The rows are this view's: a change to them can refresh it without its table.
|
|
3844
|
+
isPlatformBrowser(this.platformId) && markRowsBeforeSelected(this.dataTable.el.nativeElement);
|
|
3845
|
+
}
|
|
3746
3846
|
constructor(dataTable, tableService) {
|
|
3747
3847
|
super();
|
|
3748
3848
|
this.dataTable = dataTable;
|
|
@@ -5694,14 +5794,14 @@ class TableRadioButton extends BaseComponent {
|
|
|
5694
5794
|
}
|
|
5695
5795
|
}
|
|
5696
5796
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: TableRadioButton, deps: [{ token: Table }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5697
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.2", type: TableRadioButton, isStandalone: false, selector: "agl-tableRadioButton", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputViewChild", first: true, predicate: ["rb"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<agl-radioButton #rb [(ngModel)]="checked" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" [unstyled]="unstyled()" /> `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.RadioButton, selector: "agl-radioButton, agl-radiobutton, agl-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5797
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.2", type: TableRadioButton, isStandalone: false, selector: "agl-tableRadioButton", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "inputViewChild", first: true, predicate: ["rb"], descendants: true }], usesInheritance: true, ngImport: i0, template: `<agl-radioButton #rb [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" [unstyled]="unstyled()" /> `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i6.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i7.RadioButton, selector: "agl-radioButton, agl-radiobutton, agl-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5698
5798
|
}
|
|
5699
5799
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: TableRadioButton, decorators: [{
|
|
5700
5800
|
type: Component,
|
|
5701
5801
|
args: [{
|
|
5702
5802
|
selector: 'agl-tableRadioButton',
|
|
5703
5803
|
standalone: false,
|
|
5704
|
-
template: `<agl-radioButton #rb [(ngModel)]="checked" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" [unstyled]="unstyled()" /> `,
|
|
5804
|
+
template: `<agl-radioButton #rb [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [binary]="true" [value]="value" (onClick)="onClick($event)" [unstyled]="unstyled()" /> `,
|
|
5705
5805
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5706
5806
|
encapsulation: ViewEncapsulation.None
|
|
5707
5807
|
}]
|
|
@@ -5756,7 +5856,7 @@ class TableCheckbox extends BaseComponent {
|
|
|
5756
5856
|
}
|
|
5757
5857
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: TableCheckbox, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5758
5858
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: TableCheckbox, isStandalone: false, selector: "agl-tableCheckbox", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, ngImport: i0, template: `
|
|
5759
|
-
<agl-checkbox [(ngModel)]="checked" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5859
|
+
<agl-checkbox [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5760
5860
|
@if (dataTable._checkboxIconTemplate(); as template) {
|
|
5761
5861
|
<ng-template #icon >
|
|
5762
5862
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
@@ -5771,7 +5871,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
5771
5871
|
selector: 'agl-tableCheckbox',
|
|
5772
5872
|
standalone: false,
|
|
5773
5873
|
template: `
|
|
5774
|
-
<agl-checkbox [(ngModel)]="checked" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5874
|
+
<agl-checkbox [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" [binary]="true" (onChange)="onClick($event)" [required]="required()" [disabled]="disabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5775
5875
|
@if (dataTable._checkboxIconTemplate(); as template) {
|
|
5776
5876
|
<ng-template #icon >
|
|
5777
5877
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
@@ -5852,7 +5952,7 @@ class TableHeaderCheckbox extends BaseComponent {
|
|
|
5852
5952
|
}
|
|
5853
5953
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.2", ngImport: i0, type: TableHeaderCheckbox, deps: [{ token: Table }, { token: TableService }], target: i0.ɵɵFactoryTarget.Component });
|
|
5854
5954
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.2", type: TableHeaderCheckbox, isStandalone: false, selector: "agl-tableHeaderCheckbox", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: false, isRequired: false, transformFunction: null } }, usesInheritance: true, hostDirectives: [{ directive: i1.Bind }], ngImport: i0, template: `
|
|
5855
|
-
<agl-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5955
|
+
<agl-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5856
5956
|
@if (dataTable._headerCheckboxIconTemplate(); as template) {
|
|
5857
5957
|
<ng-template #icon >
|
|
5858
5958
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
@@ -5867,7 +5967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
5867
5967
|
selector: 'agl-tableHeaderCheckbox',
|
|
5868
5968
|
standalone: false,
|
|
5869
5969
|
template: `
|
|
5870
|
-
<agl-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5970
|
+
<agl-checkbox [pt]="ptm('pcCheckbox')" [(ngModel)]="checked" [ngModelOptions]="{ standalone: true }" (onChange)="onClick($event)" [binary]="true" [disabled]="isDisabled()" [inputId]="inputId()" [name]="name()" [ariaLabel]="ariaLabel" [unstyled]="unstyled()">
|
|
5871
5971
|
@if (dataTable._headerCheckboxIconTemplate(); as template) {
|
|
5872
5972
|
<ng-template #icon >
|
|
5873
5973
|
<ng-template *ngTemplateOutlet="template; context: { $implicit: checked }" />
|
|
@@ -6752,14 +6852,14 @@ class ColumnFilter extends BaseComponent {
|
|
|
6752
6852
|
</ul>
|
|
6753
6853
|
<ng-template #menu>
|
|
6754
6854
|
<div [class]="cx('filterOperator')" [aglBind]="ptm('filterOperator')" *ngIf="isShowOperator">
|
|
6755
|
-
<agl-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')" [unstyled]="unstyled()"></agl-select>
|
|
6855
|
+
<agl-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" [ngModelOptions]="{ standalone: true }" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')" [unstyled]="unstyled()"></agl-select>
|
|
6756
6856
|
</div>
|
|
6757
6857
|
<div [class]="cx('filterRuleList')" [aglBind]="ptm('filterRuleList')">
|
|
6758
6858
|
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [aglBind]="ptm('filterRule')">
|
|
6759
6859
|
<agl-select
|
|
6760
6860
|
*ngIf="showMatchModes && matchModes"
|
|
6761
6861
|
[options]="matchModes"
|
|
6762
|
-
[ngModel]="fieldConstraint.matchMode"
|
|
6862
|
+
[ngModel]="fieldConstraint.matchMode" [ngModelOptions]="{ standalone: true }"
|
|
6763
6863
|
(ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
|
|
6764
6864
|
[styleClass]="cx('pcFilterConstraintDropdown')"
|
|
6765
6865
|
[pt]="ptm('pcFilterConstraintDropdown')"
|
|
@@ -6947,14 +7047,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
6947
7047
|
</ul>
|
|
6948
7048
|
<ng-template #menu>
|
|
6949
7049
|
<div [class]="cx('filterOperator')" [aglBind]="ptm('filterOperator')" *ngIf="isShowOperator">
|
|
6950
|
-
<agl-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')" [unstyled]="unstyled()"></agl-select>
|
|
7050
|
+
<agl-select [options]="operatorOptions" [pt]="ptm('pcFilterOperatorDropdown')" [ngModel]="operator" [ngModelOptions]="{ standalone: true }" (ngModelChange)="onOperatorChange($event)" [styleClass]="cx('pcFilterOperatorDropdown')" [unstyled]="unstyled()"></agl-select>
|
|
6951
7051
|
</div>
|
|
6952
7052
|
<div [class]="cx('filterRuleList')" [aglBind]="ptm('filterRuleList')">
|
|
6953
7053
|
<div *ngFor="let fieldConstraint of fieldConstraints; let i = index" [ngClass]="cx('filterRule')" [aglBind]="ptm('filterRule')">
|
|
6954
7054
|
<agl-select
|
|
6955
7055
|
*ngIf="showMatchModes && matchModes"
|
|
6956
7056
|
[options]="matchModes"
|
|
6957
|
-
[ngModel]="fieldConstraint.matchMode"
|
|
7057
|
+
[ngModel]="fieldConstraint.matchMode" [ngModelOptions]="{ standalone: true }"
|
|
6958
7058
|
(ngModelChange)="onMenuMatchModeChange($event, fieldConstraint)"
|
|
6959
7059
|
[styleClass]="cx('pcFilterConstraintDropdown')"
|
|
6960
7060
|
[pt]="ptm('pcFilterConstraintDropdown')"
|
|
@@ -7231,7 +7331,7 @@ class ColumnFilterFormElement extends BaseComponent {
|
|
|
7231
7331
|
/>
|
|
7232
7332
|
<agl-inputNumber
|
|
7233
7333
|
*ngSwitchCase="'numeric'"
|
|
7234
|
-
[ngModel]="filterConstraint?.value"
|
|
7334
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7235
7335
|
(ngModelChange)="onModelChange($event)"
|
|
7236
7336
|
(onKeyDown)="onNumericInputKeyDown($event)"
|
|
7237
7337
|
[showButtons]="showButtons"
|
|
@@ -7255,7 +7355,7 @@ class ColumnFilterFormElement extends BaseComponent {
|
|
|
7255
7355
|
[indeterminate]="filterConstraint?.value === null"
|
|
7256
7356
|
[binary]="true"
|
|
7257
7357
|
*ngSwitchCase="'boolean'"
|
|
7258
|
-
[ngModel]="filterConstraint?.value"
|
|
7358
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7259
7359
|
(ngModelChange)="onModelChange($event)"
|
|
7260
7360
|
[unstyled]="unstyled()"
|
|
7261
7361
|
/>
|
|
@@ -7265,7 +7365,7 @@ class ColumnFilterFormElement extends BaseComponent {
|
|
|
7265
7365
|
[ariaLabel]="ariaLabel"
|
|
7266
7366
|
*ngSwitchCase="'date'"
|
|
7267
7367
|
[placeholder]="placeholder"
|
|
7268
|
-
[ngModel]="filterConstraint?.value"
|
|
7368
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7269
7369
|
(ngModelChange)="onModelChange($event)"
|
|
7270
7370
|
appendTo="body"
|
|
7271
7371
|
[unstyled]="unstyled()"
|
|
@@ -7322,7 +7422,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
7322
7422
|
/>
|
|
7323
7423
|
<agl-inputNumber
|
|
7324
7424
|
*ngSwitchCase="'numeric'"
|
|
7325
|
-
[ngModel]="filterConstraint?.value"
|
|
7425
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7326
7426
|
(ngModelChange)="onModelChange($event)"
|
|
7327
7427
|
(onKeyDown)="onNumericInputKeyDown($event)"
|
|
7328
7428
|
[showButtons]="showButtons"
|
|
@@ -7346,7 +7446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
7346
7446
|
[indeterminate]="filterConstraint?.value === null"
|
|
7347
7447
|
[binary]="true"
|
|
7348
7448
|
*ngSwitchCase="'boolean'"
|
|
7349
|
-
[ngModel]="filterConstraint?.value"
|
|
7449
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7350
7450
|
(ngModelChange)="onModelChange($event)"
|
|
7351
7451
|
[unstyled]="unstyled()"
|
|
7352
7452
|
/>
|
|
@@ -7356,7 +7456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.2", ngImpor
|
|
|
7356
7456
|
[ariaLabel]="ariaLabel"
|
|
7357
7457
|
*ngSwitchCase="'date'"
|
|
7358
7458
|
[placeholder]="placeholder"
|
|
7359
|
-
[ngModel]="filterConstraint?.value"
|
|
7459
|
+
[ngModel]="filterConstraint?.value" [ngModelOptions]="{ standalone: true }"
|
|
7360
7460
|
(ngModelChange)="onModelChange($event)"
|
|
7361
7461
|
appendTo="body"
|
|
7362
7462
|
[unstyled]="unstyled()"
|