cps-ui-kit 21.13.0 → 21.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cps-ui-kit.mjs +354 -66
- package/fesm2022/cps-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cps-ui-kit.d.ts +131 -32
package/package.json
CHANGED
package/types/cps-ui-kit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnChanges, InjectionToken, PipeTransform, OnInit, OnDestroy, AfterViewInit, ElementRef, Renderer2, ChangeDetectorRef, EventEmitter, NgZone, SimpleChanges, QueryList, TemplateRef, AfterContentInit, AfterViewChecked, ComponentRef, ViewContainerRef, Type, ApplicationRef, EnvironmentInjector, Injector } from '@angular/core';
|
|
2
|
+
import { OnChanges, InjectionToken, PipeTransform, OnInit, OnDestroy, AfterViewInit, ElementRef, Renderer2, ChangeDetectorRef, EventEmitter, NgZone, SimpleChanges, QueryList, TemplateRef, AfterContentInit, AfterViewChecked, ComponentRef, ViewContainerRef, Type, ApplicationRef, EnvironmentInjector, Injector, Signal } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl, FormGroup } from '@angular/forms';
|
|
4
4
|
import { AnimationEvent, AnimationBuilder } from '@angular/animations';
|
|
5
5
|
import { OverlayService, SortEvent, FilterMetadata, SelectItem, TreeNode } from 'primeng/api';
|
|
@@ -675,14 +675,14 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
|
|
|
675
675
|
select(option: any, byValue: boolean, needClearInput?: boolean, needFocusInput?: boolean): void;
|
|
676
676
|
onOptionClick(option: any): void;
|
|
677
677
|
toggleAll(): void;
|
|
678
|
-
onChange: (
|
|
678
|
+
onChange: (_event: any) => void;
|
|
679
679
|
onTouched: () => void;
|
|
680
680
|
registerOnChange(fn: any): void;
|
|
681
681
|
registerOnTouched(fn: any): void;
|
|
682
682
|
filterOptions(event: any): void;
|
|
683
683
|
writeValue(value: any): void;
|
|
684
684
|
clear(event?: any): void;
|
|
685
|
-
setDisabledState(
|
|
685
|
+
setDisabledState(_disabled: boolean): void;
|
|
686
686
|
onBlur(): void;
|
|
687
687
|
onFocus(): void;
|
|
688
688
|
onBeforeOptionsHidden(reason: CpsMenuHideReason): void;
|
|
@@ -829,10 +829,10 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
|
|
|
829
829
|
private _rootFontSizePx;
|
|
830
830
|
constructor(_control: NgControl, document: Document, platformId: object, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
831
831
|
ngOnInit(): void;
|
|
832
|
-
ngOnChanges(): void;
|
|
833
|
-
onChange: (
|
|
832
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
833
|
+
onChange: (_event: any) => void;
|
|
834
834
|
onTouched: () => void;
|
|
835
|
-
setDisabledState(
|
|
835
|
+
setDisabledState(_disabled: boolean): void;
|
|
836
836
|
registerOnChange(fn: any): void;
|
|
837
837
|
registerOnTouched(fn: any): void;
|
|
838
838
|
writeValue(value: any): void;
|
|
@@ -930,7 +930,7 @@ declare class CpsButtonComponent implements OnChanges {
|
|
|
930
930
|
classesList: string[];
|
|
931
931
|
enterActive: boolean;
|
|
932
932
|
constructor(document: Document);
|
|
933
|
-
ngOnChanges(): void;
|
|
933
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
934
934
|
setClasses(): void;
|
|
935
935
|
onClick(event: Event): void;
|
|
936
936
|
onEnterKeydown(): void;
|
|
@@ -1014,15 +1014,15 @@ declare class CpsCheckboxComponent implements OnInit, OnChanges, ControlValueAcc
|
|
|
1014
1014
|
private _value;
|
|
1015
1015
|
constructor(_control: NgControl, document: Document, _elementRef: ElementRef<HTMLElement>);
|
|
1016
1016
|
ngOnInit(): void;
|
|
1017
|
-
ngOnChanges(): void;
|
|
1018
|
-
onChange: (
|
|
1017
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1018
|
+
onChange: (_event: any) => void;
|
|
1019
1019
|
onTouched: () => void;
|
|
1020
1020
|
registerOnChange(fn: any): void;
|
|
1021
1021
|
registerOnTouched(fn: any): void;
|
|
1022
1022
|
writeValue(value: boolean): void;
|
|
1023
1023
|
updateValueEvent(event: any): void;
|
|
1024
1024
|
private _updateValue;
|
|
1025
|
-
setDisabledState(
|
|
1025
|
+
setDisabledState(_disabled: boolean): void;
|
|
1026
1026
|
focus(): void;
|
|
1027
1027
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsCheckboxComponent, [{ optional: true; self: true; }, null, null]>;
|
|
1028
1028
|
static ɵcmp: i0.ɵɵComponentDeclaration<CpsCheckboxComponent, "cps-checkbox", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconColor": { "alias": "iconColor"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
@@ -1264,7 +1264,7 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
|
|
|
1264
1264
|
ngAfterViewInit(): void;
|
|
1265
1265
|
ngOnDestroy(): void;
|
|
1266
1266
|
private _checkErrors;
|
|
1267
|
-
onChange: (
|
|
1267
|
+
onChange: (_event: any) => void;
|
|
1268
1268
|
onTouched: () => void;
|
|
1269
1269
|
onInputEnterKeyDown(): void;
|
|
1270
1270
|
registerOnChange(fn: any): void;
|
|
@@ -1275,7 +1275,7 @@ declare class CpsInputComponent implements ControlValueAccessor, OnInit, AfterVi
|
|
|
1275
1275
|
onClear(): void;
|
|
1276
1276
|
clear(): void;
|
|
1277
1277
|
togglePassword(): void;
|
|
1278
|
-
setDisabledState(
|
|
1278
|
+
setDisabledState(_disabled: boolean): void;
|
|
1279
1279
|
onClickPrefixIcon(): void;
|
|
1280
1280
|
onBlur(): void;
|
|
1281
1281
|
onFocus(): void;
|
|
@@ -1409,7 +1409,7 @@ declare class CpsDatepickerComponent implements ControlValueAccessor, OnInit, On
|
|
|
1409
1409
|
constructor(_control: NgControl);
|
|
1410
1410
|
ngOnInit(): void;
|
|
1411
1411
|
ngOnDestroy(): void;
|
|
1412
|
-
onChange: (
|
|
1412
|
+
onChange: (_event: any) => void;
|
|
1413
1413
|
onTouched: () => void;
|
|
1414
1414
|
registerOnChange(fn: any): void;
|
|
1415
1415
|
registerOnTouched(fn: any): void;
|
|
@@ -2014,16 +2014,16 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
|
|
|
2014
2014
|
error: string;
|
|
2015
2015
|
constructor(_control: NgControl);
|
|
2016
2016
|
ngOnInit(): void;
|
|
2017
|
-
ngOnChanges(): void;
|
|
2017
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2018
2018
|
ngOnDestroy(): void;
|
|
2019
|
-
onChange: (
|
|
2019
|
+
onChange: (_event: any) => void;
|
|
2020
2020
|
onTouched: () => void;
|
|
2021
2021
|
registerOnChange(fn: any): void;
|
|
2022
2022
|
registerOnTouched(fn: any): void;
|
|
2023
2023
|
writeValue(value: any): void;
|
|
2024
2024
|
updateValueEvent(value: any): void;
|
|
2025
2025
|
private _updateValue;
|
|
2026
|
-
setDisabledState(
|
|
2026
|
+
setDisabledState(_disabled: boolean): void;
|
|
2027
2027
|
onBlur(): void;
|
|
2028
2028
|
onFocus(): void;
|
|
2029
2029
|
get isRequired(): boolean;
|
|
@@ -2178,11 +2178,11 @@ declare class CpsTimepickerComponent implements OnInit, AfterViewInit, OnDestroy
|
|
|
2178
2178
|
ngOnInit(): void;
|
|
2179
2179
|
ngAfterViewInit(): void;
|
|
2180
2180
|
ngOnDestroy(): void;
|
|
2181
|
-
onChange: (
|
|
2181
|
+
onChange: (_event: any) => void;
|
|
2182
2182
|
onTouched: () => void;
|
|
2183
2183
|
registerOnChange(fn: any): void;
|
|
2184
2184
|
registerOnTouched(fn: any): void;
|
|
2185
|
-
setDisabledState(
|
|
2185
|
+
setDisabledState(_disabled: boolean): void;
|
|
2186
2186
|
writeValue(value: CpsTime | undefined): void;
|
|
2187
2187
|
onFieldBlur(): void;
|
|
2188
2188
|
onFieldFocus(): void;
|
|
@@ -2613,14 +2613,14 @@ declare class CpsSelectComponent implements ControlValueAccessor, OnInit, AfterV
|
|
|
2613
2613
|
onKeyDown(event: any): void;
|
|
2614
2614
|
toggleAll(): void;
|
|
2615
2615
|
private _checkErrors;
|
|
2616
|
-
onChange: (
|
|
2616
|
+
onChange: (_event: any) => void;
|
|
2617
2617
|
onTouched: () => void;
|
|
2618
2618
|
registerOnChange(fn: any): void;
|
|
2619
2619
|
registerOnTouched(fn: any): void;
|
|
2620
2620
|
writeValue(value: any): void;
|
|
2621
2621
|
private updateValue;
|
|
2622
2622
|
clear(event?: any): void;
|
|
2623
|
-
setDisabledState(
|
|
2623
|
+
setDisabledState(_disabled: boolean): void;
|
|
2624
2624
|
onBlur(): void;
|
|
2625
2625
|
onFocus(): void;
|
|
2626
2626
|
focus(): void;
|
|
@@ -2743,14 +2743,14 @@ declare class CpsSwitchComponent implements ControlValueAccessor {
|
|
|
2743
2743
|
valueChanged: EventEmitter<boolean>;
|
|
2744
2744
|
private _value;
|
|
2745
2745
|
constructor(_control: NgControl, _elementRef: ElementRef<HTMLElement>);
|
|
2746
|
-
onChange: (
|
|
2746
|
+
onChange: (_event: any) => void;
|
|
2747
2747
|
onTouched: () => void;
|
|
2748
2748
|
registerOnChange(fn: any): void;
|
|
2749
2749
|
registerOnTouched(fn: any): void;
|
|
2750
2750
|
writeValue(value: boolean): void;
|
|
2751
2751
|
updateValueEvent(event: any): void;
|
|
2752
2752
|
private _updateValue;
|
|
2753
|
-
setDisabledState(
|
|
2753
|
+
setDisabledState(_disabled: boolean): void;
|
|
2754
2754
|
focus(): void;
|
|
2755
2755
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsSwitchComponent, [{ optional: true; self: true; }, null]>;
|
|
2756
2756
|
static ɵcmp: i0.ɵɵComponentDeclaration<CpsSwitchComponent, "cps-switch", never, { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "infoTooltip": { "alias": "infoTooltip"; "required": false; }; "infoTooltipClass": { "alias": "infoTooltipClass"; "required": false; }; "infoTooltipMaxWidth": { "alias": "infoTooltipMaxWidth"; "required": false; }; "infoTooltipPersistent": { "alias": "infoTooltipPersistent"; "required": false; }; "infoTooltipPosition": { "alias": "infoTooltipPosition"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChanged": "valueChanged"; }, never, never, true, never>;
|
|
@@ -2760,12 +2760,17 @@ declare class CpsSwitchComponent implements ControlValueAccessor {
|
|
|
2760
2760
|
* CpsTabComponent is a tab within a tab-group.
|
|
2761
2761
|
* @group Components
|
|
2762
2762
|
*/
|
|
2763
|
-
declare class CpsTabComponent {
|
|
2763
|
+
declare class CpsTabComponent implements OnChanges {
|
|
2764
2764
|
/**
|
|
2765
2765
|
* Label of the tab.
|
|
2766
2766
|
* @group Props
|
|
2767
2767
|
*/
|
|
2768
2768
|
label: string;
|
|
2769
|
+
/**
|
|
2770
|
+
* Aria label for the tab component, used for accessibility, it takes precedence over label.
|
|
2771
|
+
* @group Props
|
|
2772
|
+
*/
|
|
2773
|
+
ariaLabel: string;
|
|
2769
2774
|
/**
|
|
2770
2775
|
* Icon before the label.
|
|
2771
2776
|
* @group Props
|
|
@@ -2808,8 +2813,9 @@ declare class CpsTabComponent {
|
|
|
2808
2813
|
badgeTooltip: string;
|
|
2809
2814
|
content: TemplateRef<any>;
|
|
2810
2815
|
active: boolean;
|
|
2816
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
2811
2817
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsTabComponent, never>;
|
|
2812
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabComponent, "cps-tab", never, { "label": { "alias": "label"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltipText": { "alias": "tooltipText"; "required": false; }; "tooltipContentClass": { "alias": "tooltipContentClass"; "required": false; }; "tooltipMaxWidth": { "alias": "tooltipMaxWidth"; "required": false; }; "tooltipPersistent": { "alias": "tooltipPersistent"; "required": false; }; "badgeValue": { "alias": "badgeValue"; "required": false; }; "badgeTooltip": { "alias": "badgeTooltip"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
2818
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabComponent, "cps-tab", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "tooltipText": { "alias": "tooltipText"; "required": false; }; "tooltipContentClass": { "alias": "tooltipContentClass"; "required": false; }; "tooltipMaxWidth": { "alias": "tooltipMaxWidth"; "required": false; }; "tooltipPersistent": { "alias": "tooltipPersistent"; "required": false; }; "badgeValue": { "alias": "badgeValue"; "required": false; }; "badgeTooltip": { "alias": "badgeTooltip"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
2813
2819
|
}
|
|
2814
2820
|
|
|
2815
2821
|
/**
|
|
@@ -2860,6 +2866,12 @@ declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterVie
|
|
|
2860
2866
|
* @group Props
|
|
2861
2867
|
*/
|
|
2862
2868
|
alignment: CpsTabsAlignmentType;
|
|
2869
|
+
/**
|
|
2870
|
+
* When true, tabs activate automatically as focus moves between them via arrow keys.
|
|
2871
|
+
* When false, arrow keys only move focus; press Enter or Space to activate the focused tab.
|
|
2872
|
+
* @group Props
|
|
2873
|
+
*/
|
|
2874
|
+
autoActivation: boolean;
|
|
2863
2875
|
/**
|
|
2864
2876
|
* Class to apply to the tab content wrapper.
|
|
2865
2877
|
* @group Props
|
|
@@ -2909,10 +2921,14 @@ declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterVie
|
|
|
2909
2921
|
backBtnVisible: boolean;
|
|
2910
2922
|
forwardBtnVisible: boolean;
|
|
2911
2923
|
animationState: 'slideLeft' | 'slideRight' | 'fadeIn' | 'fadeOut';
|
|
2924
|
+
readonly tabGroupId: string;
|
|
2912
2925
|
windowResize$: Subscription;
|
|
2913
2926
|
listScroll$: Subscription;
|
|
2927
|
+
private readonly _tabPanelEls;
|
|
2928
|
+
readonly panelTabindex: i0.WritableSignal<number>;
|
|
2914
2929
|
private _currentTabIndex;
|
|
2915
2930
|
private _previousTabIndex;
|
|
2931
|
+
private readonly _focusService;
|
|
2916
2932
|
constructor(cdRef: ChangeDetectorRef, document: Document);
|
|
2917
2933
|
ngOnInit(): void;
|
|
2918
2934
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -2920,7 +2936,16 @@ declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterVie
|
|
|
2920
2936
|
ngAfterViewInit(): void;
|
|
2921
2937
|
ngOnDestroy(): void;
|
|
2922
2938
|
get selectedTab(): CpsTabComponent | undefined;
|
|
2939
|
+
getTabId(index: number): string;
|
|
2940
|
+
getPanelId(index: number): string;
|
|
2941
|
+
getTabFocusOrderTabIndex(tabIndex: number): 0 | -1;
|
|
2942
|
+
getTabAriaLabel(tab: CpsTabComponent): string | null;
|
|
2923
2943
|
onTabClick(index: number): void;
|
|
2944
|
+
onMouseDown(event: MouseEvent): void;
|
|
2945
|
+
onTabKeydown(event: KeyboardEvent, index: number): void;
|
|
2946
|
+
private _scrollTabIntoView;
|
|
2947
|
+
private _hasFocusableIn;
|
|
2948
|
+
private _nextEnabledTab;
|
|
2924
2949
|
selectTab(silent?: boolean): void;
|
|
2925
2950
|
onScroll(event: any): void;
|
|
2926
2951
|
onResize(): void;
|
|
@@ -2930,7 +2955,7 @@ declare class CpsTabGroupComponent implements OnInit, AfterContentInit, AfterVie
|
|
|
2930
2955
|
private _getVisibleButtonWidths;
|
|
2931
2956
|
private _getWidth;
|
|
2932
2957
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsTabGroupComponent, never>;
|
|
2933
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabGroupComponent, "cps-tab-group", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "isSubTabs": { "alias": "isSubTabs"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "contentWrapClass": { "alias": "contentWrapClass"; "required": false; }; "headerClass": { "alias": "headerClass"; "required": false; }; "stretched": { "alias": "stretched"; "required": false; }; "animationType": { "alias": "animationType"; "required": false; }; "navButtonsBackground": { "alias": "navButtonsBackground"; "required": false; }; "tabsBackground": { "alias": "tabsBackground"; "required": false; }; }, { "beforeTabChanged": "beforeTabChanged"; "afterTabChanged": "afterTabChanged"; }, ["tabs"], never, true, never>;
|
|
2958
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsTabGroupComponent, "cps-tab-group", never, { "selectedIndex": { "alias": "selectedIndex"; "required": false; }; "isSubTabs": { "alias": "isSubTabs"; "required": false; }; "alignment": { "alias": "alignment"; "required": false; }; "autoActivation": { "alias": "autoActivation"; "required": false; }; "contentWrapClass": { "alias": "contentWrapClass"; "required": false; }; "headerClass": { "alias": "headerClass"; "required": false; }; "stretched": { "alias": "stretched"; "required": false; }; "animationType": { "alias": "animationType"; "required": false; }; "navButtonsBackground": { "alias": "navButtonsBackground"; "required": false; }; "tabsBackground": { "alias": "tabsBackground"; "required": false; }; }, { "beforeTabChanged": "beforeTabChanged"; "afterTabChanged": "afterTabChanged"; }, ["tabs"], never, true, never>;
|
|
2934
2959
|
}
|
|
2935
2960
|
|
|
2936
2961
|
/**
|
|
@@ -3979,7 +4004,7 @@ declare class CpsTagComponent implements ControlValueAccessor, OnChanges {
|
|
|
3979
4004
|
constructor(_control: NgControl, document: Document);
|
|
3980
4005
|
ngOnChanges(): void;
|
|
3981
4006
|
setClasses(): void;
|
|
3982
|
-
onChange: (
|
|
4007
|
+
onChange: (_event: any) => void;
|
|
3983
4008
|
onTouched: () => void;
|
|
3984
4009
|
registerOnChange(fn: any): void;
|
|
3985
4010
|
registerOnTouched(fn: any): void;
|
|
@@ -4125,7 +4150,7 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
|
|
|
4125
4150
|
ngOnInit(): void;
|
|
4126
4151
|
ngOnDestroy(): void;
|
|
4127
4152
|
private _checkErrors;
|
|
4128
|
-
onChange: (
|
|
4153
|
+
onChange: (_event: any) => void;
|
|
4129
4154
|
onTouched: () => void;
|
|
4130
4155
|
registerOnChange(fn: any): void;
|
|
4131
4156
|
registerOnTouched(fn: any): void;
|
|
@@ -4133,7 +4158,7 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
|
|
|
4133
4158
|
updateValueEvent(event: any): void;
|
|
4134
4159
|
private _updateValue;
|
|
4135
4160
|
clear(): void;
|
|
4136
|
-
setDisabledState(
|
|
4161
|
+
setDisabledState(_disabled: boolean): void;
|
|
4137
4162
|
onBlur(): void;
|
|
4138
4163
|
onFocus(): void;
|
|
4139
4164
|
focus(): void;
|
|
@@ -4334,12 +4359,12 @@ declare class CpsBaseTreeDropdownComponent implements ControlValueAccessor, OnIn
|
|
|
4334
4359
|
ngOnDestroy(): void;
|
|
4335
4360
|
expandAll(): void;
|
|
4336
4361
|
collapseAll(): void;
|
|
4337
|
-
onChange: (
|
|
4362
|
+
onChange: (_event: any) => void;
|
|
4338
4363
|
onTouched: () => void;
|
|
4339
4364
|
registerOnChange(fn: any): void;
|
|
4340
4365
|
registerOnTouched(fn: any): void;
|
|
4341
4366
|
writeValue(value: any, internal?: boolean): void;
|
|
4342
|
-
setDisabledState(
|
|
4367
|
+
setDisabledState(_disabled: boolean): void;
|
|
4343
4368
|
onBlur(): void;
|
|
4344
4369
|
onFocus(): void;
|
|
4345
4370
|
focus(): void;
|
|
@@ -5810,6 +5835,73 @@ declare class CpsNotificationService {
|
|
|
5810
5835
|
static ɵprov: i0.ɵɵInjectableDeclaration<CpsNotificationService>;
|
|
5811
5836
|
}
|
|
5812
5837
|
|
|
5838
|
+
/**
|
|
5839
|
+
* CpsRootFontSizeService tracks the application's current root font size.
|
|
5840
|
+
*
|
|
5841
|
+
* The service uses a ResizeObserver strategy to reliably detect root font-size changes:
|
|
5842
|
+
*
|
|
5843
|
+
* **Sentinel element** (`<div style="width:1rem;height:0">`) — its pixel width
|
|
5844
|
+
* mirrors `1rem`. Any root font-size change — caused by CSS class toggles,
|
|
5845
|
+
* stylesheet rules, direct JS assignment, or viewport resize (e.g.
|
|
5846
|
+
* `font-size: 1.5vw`) — changes the sentinel's computed width, firing the
|
|
5847
|
+
* observer.
|
|
5848
|
+
* The cached value is stored in a signal and is only updated when the actual
|
|
5849
|
+
* font-size value changes, preventing spurious updates.
|
|
5850
|
+
*
|
|
5851
|
+
* In microfrontend environments the sentinel element is keyed by a known DOM
|
|
5852
|
+
* attribute (`data-cps-root-font-size-sentinel`) and reused if already present,
|
|
5853
|
+
* so only one sentinel node exists per document regardless of how many
|
|
5854
|
+
* instances of this service are created. The sentinel is intentionally never
|
|
5855
|
+
* removed from the DOM — it is a lightweight, invisible element and removing it
|
|
5856
|
+
* could silently break any other live service instance still observing it.
|
|
5857
|
+
*
|
|
5858
|
+
* Only active in browser environments. Under SSR the `fontSize` signal is
|
|
5859
|
+
* initialized to `16` (the standard browser default) and no DOM observers are created.
|
|
5860
|
+
*
|
|
5861
|
+
* Prefer injecting {@link CPS_ROOT_FONT_SIZE_SERVICE} over this class directly
|
|
5862
|
+
* to allow consumer applications to override the behavior.
|
|
5863
|
+
*
|
|
5864
|
+
* @example
|
|
5865
|
+
* ```typescript
|
|
5866
|
+
* class MyComponent {
|
|
5867
|
+
* private fontSizeService = inject(CPS_ROOT_FONT_SIZE_SERVICE);
|
|
5868
|
+
* readonly fontSize = this.fontSizeService?.fontSize;
|
|
5869
|
+
* }
|
|
5870
|
+
* ```
|
|
5871
|
+
*/
|
|
5872
|
+
declare class CpsRootFontSizeService implements OnDestroy {
|
|
5873
|
+
private readonly _document;
|
|
5874
|
+
private readonly _platformId;
|
|
5875
|
+
private static readonly _SENTINEL_ATTR;
|
|
5876
|
+
private readonly _fontSize;
|
|
5877
|
+
private _sentinelObserver;
|
|
5878
|
+
/** Reactive signal containing the current root font size in pixels. */
|
|
5879
|
+
readonly fontSize: Signal<number>;
|
|
5880
|
+
constructor();
|
|
5881
|
+
ngOnDestroy(): void;
|
|
5882
|
+
private _setupObservers;
|
|
5883
|
+
private _refresh;
|
|
5884
|
+
private _readRootFontSize;
|
|
5885
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsRootFontSizeService, never>;
|
|
5886
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpsRootFontSizeService>;
|
|
5887
|
+
}
|
|
5888
|
+
/**
|
|
5889
|
+
* Injection token for the root font size service.
|
|
5890
|
+
*
|
|
5891
|
+
* By default it resolves to the singleton {@link CpsRootFontSizeService}.
|
|
5892
|
+
* Consumer applications can override it to:
|
|
5893
|
+
* - Supply a custom subclass
|
|
5894
|
+
* - Provide `null` to disable dynamic tracking entirely
|
|
5895
|
+
*
|
|
5896
|
+
* @example Disable dynamic tracking:
|
|
5897
|
+
* ```typescript
|
|
5898
|
+
* providers: [
|
|
5899
|
+
* { provide: CPS_ROOT_FONT_SIZE_SERVICE, useValue: null }
|
|
5900
|
+
* ]
|
|
5901
|
+
* ```
|
|
5902
|
+
*/
|
|
5903
|
+
declare const CPS_ROOT_FONT_SIZE_SERVICE: InjectionToken<CpsRootFontSizeService | null>;
|
|
5904
|
+
|
|
5813
5905
|
/**
|
|
5814
5906
|
* CpsFocusService manages focus-related concerns:
|
|
5815
5907
|
* - Tracks the most recent user input modality (keyboard vs. pointer)
|
|
@@ -5841,6 +5933,14 @@ declare class CpsFocusService {
|
|
|
5841
5933
|
* Shorthand for `lastInput() === 'keyboard'`.
|
|
5842
5934
|
*/
|
|
5843
5935
|
isKeyboard(): boolean;
|
|
5936
|
+
/**
|
|
5937
|
+
* Suppresses the focus-visible ring on `el` for its next focus event.
|
|
5938
|
+
*
|
|
5939
|
+
* Adds `suppress-focus-visible` to the element and removes it automatically
|
|
5940
|
+
* on the next `blur`. Call from a `mousedown` handler to prevent the ring
|
|
5941
|
+
* from appearing when the browser moves focus to the element via pointer.
|
|
5942
|
+
*/
|
|
5943
|
+
suppressNextFocusRing(el: HTMLElement): void;
|
|
5844
5944
|
/**
|
|
5845
5945
|
* Focuses `el`, conditionally suppressing the focus-visible ring.
|
|
5846
5946
|
*
|
|
@@ -5990,7 +6090,6 @@ declare class CpsThemeService {
|
|
|
5990
6090
|
private getInitialColorTheme;
|
|
5991
6091
|
private getInitialBaseTheme;
|
|
5992
6092
|
private getInitialRadiusTheme;
|
|
5993
|
-
private getSystemTheme;
|
|
5994
6093
|
private watchSystemTheme;
|
|
5995
6094
|
private saveThemePreference;
|
|
5996
6095
|
private saveColorThemePreference;
|
|
@@ -6212,5 +6311,5 @@ declare const getCpsColors: (_document: Document) => [string, string][];
|
|
|
6212
6311
|
declare const getCSSColor: (val: string, _document: Document) => string;
|
|
6213
6312
|
declare const getTextColor: (backgroundColor: string) => string;
|
|
6214
6313
|
|
|
6215
|
-
export { CPS_CRON_VALIDATION_SERVICE, CPS_FOCUS_SERVICE, CPS_RADIO_GROUP, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, CpsCronValidationService, CpsDatepickerComponent, CpsDialogConfig, CpsDialogRef, CpsDialogService, CpsDividerComponent, CpsExpansionPanelComponent, CpsFileUploadComponent, CpsFocusService, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsMenuHideReason, CpsNotificationAppearance, CpsNotificationPosition, CpsNotificationService, CpsPaginatePipe, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsRadioGroupComponent, CpsSchedulerComponent, CpsSelectComponent, CpsSidebarMenuComponent, CpsSwitchComponent, CpsTabComponent, CpsTabGroupComponent, CpsTableColumnFilterDirective, CpsTableColumnResizableDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTableDetectFilterTypePipe, CpsTableHeaderSelectableDirective, CpsTableRowSelectableDirective, CpsTagComponent, CpsTextareaComponent, CpsThemeService, CpsTimepickerComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, CpsTreeTableColumnFilterDirective, CpsTreeTableColumnResizableDirective, CpsTreeTableColumnSortableDirective, CpsTreeTableComponent, CpsTreeTableDetectFilterTypePipe, CpsTreeTableHeaderSelectableDirective, CpsTreeTableRowSelectableDirective, CpsTreetableRowTogglerDirective, ICONS_PATH, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory, treeTableFactory };
|
|
6314
|
+
export { CPS_CRON_VALIDATION_SERVICE, CPS_FOCUS_SERVICE, CPS_RADIO_GROUP, CPS_ROOT_FONT_SIZE_SERVICE, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, CpsCronValidationService, CpsDatepickerComponent, CpsDialogConfig, CpsDialogRef, CpsDialogService, CpsDividerComponent, CpsExpansionPanelComponent, CpsFileUploadComponent, CpsFocusService, CpsIconComponent, CpsInfoCircleComponent, CpsInputComponent, CpsLoaderComponent, CpsMenuComponent, CpsMenuHideReason, CpsNotificationAppearance, CpsNotificationPosition, CpsNotificationService, CpsPaginatePipe, CpsPaginatorComponent, CpsProgressCircularComponent, CpsProgressLinearComponent, CpsRadioComponent, CpsRadioGroupComponent, CpsRootFontSizeService, CpsSchedulerComponent, CpsSelectComponent, CpsSidebarMenuComponent, CpsSwitchComponent, CpsTabComponent, CpsTabGroupComponent, CpsTableColumnFilterDirective, CpsTableColumnResizableDirective, CpsTableColumnSortableDirective, CpsTableComponent, CpsTableDetectFilterTypePipe, CpsTableHeaderSelectableDirective, CpsTableRowSelectableDirective, CpsTagComponent, CpsTextareaComponent, CpsThemeService, CpsTimepickerComponent, CpsTooltipDirective, CpsTreeAutocompleteComponent, CpsTreeSelectComponent, CpsTreeTableColumnFilterDirective, CpsTreeTableColumnResizableDirective, CpsTreeTableColumnSortableDirective, CpsTreeTableComponent, CpsTreeTableDetectFilterTypePipe, CpsTreeTableHeaderSelectableDirective, CpsTreeTableRowSelectableDirective, CpsTreetableRowTogglerDirective, ICONS_PATH, getCSSColor, getCpsColors, getTextColor, iconNames, tableFactory, treeTableFactory };
|
|
6216
6315
|
export type { CpsAutocompleteAppearanceType, CpsBaseTheme, CpsButtonToggleOption, CpsColorTheme, CpsColumnFilterCategoryOption, CpsColumnFilterType, CpsDatepickerAppearanceType, CpsDialogAutoFocusTarget, CpsDividerType, CpsInputAppearanceType, CpsMenuAttachPosition, CpsMenuItem, CpsNotificationConfig, CpsRadioOption, CpsRadiusTheme, CpsSelectAppearanceType, CpsSidebarMenuItem, CpsTabChangeEvent, CpsTableExportFormat, CpsTableSize, CpsTableSortMode, CpsTableToolbarSize, CpsTabsAlignmentType, CpsTabsAnimationType, CpsTheme, CpsTime, CpsTooltipOpenOn, CpsTooltipPosition, CpsTreeAutocompleteAppearanceType, CpsTreeSelectAppearanceType, CpsTreeTableSize, CpsTreeTableSortMode, CpsTreeTableToolbarSize, IconType, iconSizeType };
|