cps-ui-kit 21.11.0 → 21.13.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 +833 -236
- package/fesm2022/cps-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/_mixins.scss +7 -2
- package/types/cps-ui-kit.d.ts +408 -46
package/types/cps-ui-kit.d.ts
CHANGED
|
@@ -145,11 +145,11 @@ declare class CpsTooltipDirective implements OnInit, OnDestroy {
|
|
|
145
145
|
private _showTimeout?;
|
|
146
146
|
private _hideTimeout?;
|
|
147
147
|
private _ariaTarget?;
|
|
148
|
-
private readonly _tooltipId;
|
|
149
148
|
private _rootFontSizePx;
|
|
150
149
|
private window;
|
|
151
150
|
private _elementRef;
|
|
152
151
|
private _document;
|
|
152
|
+
private _platformId;
|
|
153
153
|
private _domSanitizer;
|
|
154
154
|
constructor();
|
|
155
155
|
ngOnInit(): void;
|
|
@@ -174,7 +174,6 @@ declare class CpsTooltipDirective implements OnInit, OnDestroy {
|
|
|
174
174
|
private _getCoords;
|
|
175
175
|
private _getCoordsForPosition;
|
|
176
176
|
private _focusableIn;
|
|
177
|
-
private _getNextFocusableAfterTrigger;
|
|
178
177
|
private _resolveAriaTarget;
|
|
179
178
|
private _announce;
|
|
180
179
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsTooltipDirective, never>;
|
|
@@ -189,6 +188,7 @@ type VoidListener$1 = () => void | null | undefined;
|
|
|
189
188
|
*/
|
|
190
189
|
type CpsMenuItem = {
|
|
191
190
|
title?: string;
|
|
191
|
+
ariaLabel?: string;
|
|
192
192
|
action?: (event?: any) => void;
|
|
193
193
|
icon?: string;
|
|
194
194
|
desc?: string;
|
|
@@ -207,6 +207,7 @@ declare enum CpsMenuHideReason {
|
|
|
207
207
|
CLICK_ITEM = "click-item",
|
|
208
208
|
CLICK_OUTSIDE = "click-outside",
|
|
209
209
|
KEYDOWN_ESCAPE = "keydown-escape",
|
|
210
|
+
KEYDOWN_TAB = "keydown-tab",
|
|
210
211
|
SCROLL = "scroll",
|
|
211
212
|
RESIZE = "resize",
|
|
212
213
|
TARGET_NOT_CONNECTED = "target-not-connected"
|
|
@@ -231,9 +232,16 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
231
232
|
overlayService: OverlayService;
|
|
232
233
|
/**
|
|
233
234
|
* Header title of the menu.
|
|
235
|
+
* Only applies when items are provided.
|
|
234
236
|
* @group Props
|
|
235
237
|
*/
|
|
236
238
|
header: string;
|
|
239
|
+
/**
|
|
240
|
+
* Aria label for the menu component, used for accessibility, it takes precedence over header.
|
|
241
|
+
* Only applies when items are provided.
|
|
242
|
+
* @group Props
|
|
243
|
+
*/
|
|
244
|
+
ariaLabel: string;
|
|
237
245
|
/**
|
|
238
246
|
* An array of menu items.
|
|
239
247
|
* @group Props
|
|
@@ -250,7 +258,7 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
250
258
|
*/
|
|
251
259
|
compressed: boolean;
|
|
252
260
|
/**
|
|
253
|
-
* Determines whether the menu should
|
|
261
|
+
* Determines whether the menu should move focus to its first item (or first focusable element) when opened.
|
|
254
262
|
* @group Props
|
|
255
263
|
*/
|
|
256
264
|
focusOnShow: boolean;
|
|
@@ -296,6 +304,11 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
296
304
|
* @group Emits
|
|
297
305
|
*/
|
|
298
306
|
contentClicked: EventEmitter<any>;
|
|
307
|
+
/**
|
|
308
|
+
* Callback to invoke when the mouse leaves the menu container.
|
|
309
|
+
* @group Emits
|
|
310
|
+
*/
|
|
311
|
+
containerMouseLeave: EventEmitter<MouseEvent>;
|
|
299
312
|
withIcons: boolean;
|
|
300
313
|
autoZIndex: boolean;
|
|
301
314
|
baseZIndex: number;
|
|
@@ -317,6 +330,9 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
317
330
|
resizeObserver: ResizeObserver;
|
|
318
331
|
itemsClasses: string[];
|
|
319
332
|
hideReason: CpsMenuHideReason | undefined;
|
|
333
|
+
private _openedByKeyboard;
|
|
334
|
+
private readonly _cpsFocusService;
|
|
335
|
+
private _menuArrow?;
|
|
320
336
|
private window;
|
|
321
337
|
constructor(document: Document, platformId: any, el: ElementRef, renderer: Renderer2, cd: ChangeDetectorRef, zone: NgZone, primeNG: PrimeNG, overlayService: OverlayService);
|
|
322
338
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -327,6 +343,7 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
327
343
|
hide(reason?: CpsMenuHideReason): void;
|
|
328
344
|
isVisible(): boolean;
|
|
329
345
|
onItemClick(event: any, item: CpsMenuItem): void;
|
|
346
|
+
onItemKeydown(event: KeyboardEvent, item: CpsMenuItem): void;
|
|
330
347
|
bindDocumentKeydownListener(): void;
|
|
331
348
|
unbindDocumentKeydownListener(): void;
|
|
332
349
|
bindDocumentClickListener(): void;
|
|
@@ -341,6 +358,12 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
341
358
|
onAnimationStart(event: AnimationEvent): void;
|
|
342
359
|
onAnimationEnd(event: AnimationEvent): void;
|
|
343
360
|
focus(): void;
|
|
361
|
+
private _focusTarget;
|
|
362
|
+
private _getMenuItems;
|
|
363
|
+
private _navigateItems;
|
|
364
|
+
private _focusFirstItem;
|
|
365
|
+
private _focusLastItem;
|
|
366
|
+
private _focusableIn;
|
|
344
367
|
onWindowResize(): void;
|
|
345
368
|
bindDocumentResizeListener(): void;
|
|
346
369
|
unbindDocumentResizeListener(): void;
|
|
@@ -350,7 +373,7 @@ declare class CpsMenuComponent implements AfterViewInit, OnDestroy, OnChanges {
|
|
|
350
373
|
private _destroy;
|
|
351
374
|
ngOnDestroy(): void;
|
|
352
375
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsMenuComponent, never>;
|
|
353
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsMenuComponent, "cps-menu", never, { "header": { "alias": "header"; "required": false; }; "items": { "alias": "items"; "required": false; }; "withArrow": { "alias": "withArrow"; "required": false; }; "compressed": { "alias": "compressed"; "required": false; }; "focusOnShow": { "alias": "focusOnShow"; "required": false; }; "persistent": { "alias": "persistent"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; }, { "menuShown": "menuShown"; "menuHidden": "menuHidden"; "beforeMenuHidden": "beforeMenuHidden"; "contentClicked": "contentClicked"; }, never, ["*"], true, never>;
|
|
376
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsMenuComponent, "cps-menu", never, { "header": { "alias": "header"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "items": { "alias": "items"; "required": false; }; "withArrow": { "alias": "withArrow"; "required": false; }; "compressed": { "alias": "compressed"; "required": false; }; "focusOnShow": { "alias": "focusOnShow"; "required": false; }; "persistent": { "alias": "persistent"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "showTransitionOptions": { "alias": "showTransitionOptions"; "required": false; }; "hideTransitionOptions": { "alias": "hideTransitionOptions"; "required": false; }; }, { "menuShown": "menuShown"; "menuHidden": "menuHidden"; "beforeMenuHidden": "beforeMenuHidden"; "contentClicked": "contentClicked"; "containerMouseLeave": "containerMouseLeave"; }, never, ["*"], true, never>;
|
|
354
377
|
}
|
|
355
378
|
|
|
356
379
|
/**
|
|
@@ -365,6 +388,7 @@ type CpsAutocompleteAppearanceType = 'outlined' | 'underlined' | 'borderless';
|
|
|
365
388
|
declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
366
389
|
private _control;
|
|
367
390
|
private document;
|
|
391
|
+
private platformId;
|
|
368
392
|
private cdRef;
|
|
369
393
|
private _labelByValue;
|
|
370
394
|
/**
|
|
@@ -643,7 +667,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
|
|
|
643
667
|
private _destroy$;
|
|
644
668
|
private _options;
|
|
645
669
|
private _optionIds;
|
|
646
|
-
constructor(_control: NgControl, document: Document, cdRef: ChangeDetectorRef, _labelByValue: LabelByValuePipe);
|
|
670
|
+
constructor(_control: NgControl, document: Document, platformId: object, cdRef: ChangeDetectorRef, _labelByValue: LabelByValuePipe);
|
|
647
671
|
ngOnInit(): void;
|
|
648
672
|
ngOnChanges(changes: SimpleChanges): void;
|
|
649
673
|
ngAfterViewInit(): void;
|
|
@@ -697,7 +721,7 @@ declare class CpsAutocompleteComponent implements ControlValueAccessor, OnInit,
|
|
|
697
721
|
private _confirmInput;
|
|
698
722
|
private _removeLastValue;
|
|
699
723
|
private _pxToRem;
|
|
700
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CpsAutocompleteComponent, [{ optional: true; self: true; }, null, null, null]>;
|
|
724
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsAutocompleteComponent, [{ optional: true; self: true; }, null, null, null, null]>;
|
|
701
725
|
static ɵcmp: i0.ɵɵComponentDeclaration<CpsAutocompleteComponent, "cps-autocomplete", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "returnObject": { "alias": "returnObject"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "width": { "alias": "width"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "showChevron": { "alias": "showChevron"; "required": false; }; "withOptionsAliases": { "alias": "withOptionsAliases"; "required": false; }; "useOptionsAliasesWhenNoMatch": { "alias": "useOptionsAliasesWhenNoMatch"; "required": false; }; "optionAlias": { "alias": "optionAlias"; "required": false; }; "chips": { "alias": "chips"; "required": false; }; "closableChips": { "alias": "closableChips"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "openOnClear": { "alias": "openOnClear"; "required": false; }; "keepInitialOrder": { "alias": "keepInitialOrder"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "optionInfo": { "alias": "optionInfo"; "required": false; }; "hideDetails": { "alias": "hideDetails"; "required": false; }; "persistentClear": { "alias": "persistentClear"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "prefixIconSize": { "alias": "prefixIconSize"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "loadingMessage": { "alias": "loadingMessage"; "required": false; }; "showLoadingMessage": { "alias": "showLoadingMessage"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; "showEmptyMessage": { "alias": "showEmptyMessage"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "numToleratedItems": { "alias": "numToleratedItems"; "required": false; }; "externalError": { "alias": "externalError"; "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; }; "appearance": { "alias": "appearance"; "required": false; }; "emptyOptionIndex": { "alias": "emptyOptionIndex"; "required": false; }; "inputChangeDebounceTime": { "alias": "inputChangeDebounceTime"; "required": false; }; "validating": { "alias": "validating"; "required": false; }; "_value": { "alias": "value"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, { "valueChanged": "valueChanged"; "inputChanged": "inputChanged"; "focused": "focused"; "blurred": "blurred"; }, never, never, true, never>;
|
|
702
726
|
}
|
|
703
727
|
|
|
@@ -720,6 +744,7 @@ type CpsButtonToggleOption = {
|
|
|
720
744
|
declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit, OnChanges {
|
|
721
745
|
private _control;
|
|
722
746
|
private document;
|
|
747
|
+
private platformId;
|
|
723
748
|
private renderer;
|
|
724
749
|
private cdr;
|
|
725
750
|
/**
|
|
@@ -802,7 +827,7 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
|
|
|
802
827
|
valueChanged: EventEmitter<any>;
|
|
803
828
|
largestButtonWidthRem: number;
|
|
804
829
|
private _rootFontSizePx;
|
|
805
|
-
constructor(_control: NgControl, document: Document, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
830
|
+
constructor(_control: NgControl, document: Document, platformId: object, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
806
831
|
ngOnInit(): void;
|
|
807
832
|
ngOnChanges(): void;
|
|
808
833
|
onChange: (event: any) => void;
|
|
@@ -815,7 +840,7 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
|
|
|
815
840
|
private _updateValue;
|
|
816
841
|
private _setEqualWidths;
|
|
817
842
|
private _pxToRem;
|
|
818
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null, null, null]>;
|
|
843
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsButtonToggleComponent, [{ optional: true; self: true; }, null, null, null, null]>;
|
|
819
844
|
static ɵcmp: i0.ɵɵComponentDeclaration<CpsButtonToggleComponent, "cps-button-toggle", never, { "label": { "alias": "label"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "mandatory": { "alias": "mandatory"; "required": false; }; "equalWidths": { "alias": "equalWidths"; "required": false; }; "optionTooltipPosition": { "alias": "optionTooltipPosition"; "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>;
|
|
820
845
|
}
|
|
821
846
|
|
|
@@ -2620,7 +2645,7 @@ type CpsSidebarMenuItem = {
|
|
|
2620
2645
|
* CpsSidebarMenuComponent is a vertical menu panel component displayed at the edge of the screen.
|
|
2621
2646
|
* @group Components
|
|
2622
2647
|
*/
|
|
2623
|
-
declare class CpsSidebarMenuComponent
|
|
2648
|
+
declare class CpsSidebarMenuComponent {
|
|
2624
2649
|
private _router;
|
|
2625
2650
|
/**
|
|
2626
2651
|
* An array of menu items.
|
|
@@ -2637,19 +2662,28 @@ declare class CpsSidebarMenuComponent implements OnInit {
|
|
|
2637
2662
|
* @group Props
|
|
2638
2663
|
*/
|
|
2639
2664
|
exactRoutes: boolean;
|
|
2665
|
+
/**
|
|
2666
|
+
* Aria label for the sidebar, used for accessibility.
|
|
2667
|
+
* @group Props
|
|
2668
|
+
*/
|
|
2669
|
+
ariaLabel: string;
|
|
2640
2670
|
/**
|
|
2641
2671
|
* Height of the sidebar, of type number denoting pixels or string.
|
|
2642
2672
|
* @group Props
|
|
2673
|
+
* @default 100%
|
|
2643
2674
|
*/
|
|
2644
|
-
height:
|
|
2675
|
+
height: i0.InputSignal<string | number>;
|
|
2645
2676
|
allMenus?: QueryList<CpsMenuComponent>;
|
|
2677
|
+
focusedItemWithMenu: CpsSidebarMenuItem | null;
|
|
2646
2678
|
constructor(_router: Router);
|
|
2647
|
-
|
|
2648
|
-
|
|
2679
|
+
cvtHeight: i0.Signal<string>;
|
|
2680
|
+
showMenu(event: MouseEvent | FocusEvent, menu: CpsMenuComponent, item?: CpsSidebarMenuItem): void;
|
|
2681
|
+
toggleMenu(event: MouseEvent, menu: CpsMenuComponent, item: CpsSidebarMenuItem): void;
|
|
2682
|
+
leaveMenu(event: MouseEvent | FocusEvent, menu: CpsMenuComponent): void;
|
|
2649
2683
|
isActive(item: CpsSidebarMenuItem): boolean;
|
|
2650
2684
|
toggleSidebar(): void;
|
|
2651
2685
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsSidebarMenuComponent, never>;
|
|
2652
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CpsSidebarMenuComponent, "cps-sidebar-menu", never, { "items": { "alias": "items"; "required": false; }; "isExpanded": { "alias": "isExpanded"; "required": false; }; "exactRoutes": { "alias": "exactRoutes"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
|
|
2686
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CpsSidebarMenuComponent, "cps-sidebar-menu", never, { "items": { "alias": "items"; "required": false; }; "isExpanded": { "alias": "isExpanded"; "required": false; }; "exactRoutes": { "alias": "exactRoutes"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2653
2687
|
}
|
|
2654
2688
|
|
|
2655
2689
|
/**
|
|
@@ -5216,6 +5250,13 @@ declare class CpsDialogContentDirective {
|
|
|
5216
5250
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CpsDialogContentDirective, "[cpsDialogContent]", never, {}, {}, never, never, true, never>;
|
|
5217
5251
|
}
|
|
5218
5252
|
|
|
5253
|
+
/**
|
|
5254
|
+
* Defines the auto-focus target when the dialog opens.
|
|
5255
|
+
* - 'dialog' - focuses the dialog container itself
|
|
5256
|
+
* - 'first-tabbable' - focuses the first tabbable element inside the dialog
|
|
5257
|
+
* @group Types
|
|
5258
|
+
*/
|
|
5259
|
+
type CpsDialogAutoFocusTarget = 'dialog' | 'first-tabbable';
|
|
5219
5260
|
/**
|
|
5220
5261
|
* Configuration for the dialog service.
|
|
5221
5262
|
* @group Interface
|
|
@@ -5258,33 +5299,50 @@ declare class CpsDialogConfig<T = any> {
|
|
|
5258
5299
|
*/
|
|
5259
5300
|
showHeaderBottomBorder?: boolean;
|
|
5260
5301
|
/**
|
|
5261
|
-
* Identifies the element
|
|
5302
|
+
* Identifies the element that labels the element it is applied to. Takes precedence over ariaLabel.
|
|
5262
5303
|
*/
|
|
5263
5304
|
ariaLabelledBy?: string;
|
|
5264
5305
|
/**
|
|
5265
|
-
*
|
|
5306
|
+
* Defines a string value that labels the dialog for assistive technologies when no visible title or ariaLabelledBy is present.
|
|
5307
|
+
*/
|
|
5308
|
+
ariaLabel?: string;
|
|
5309
|
+
/**
|
|
5310
|
+
* Identifies the element that describes the dialog content for assistive technologies.
|
|
5266
5311
|
*/
|
|
5267
|
-
|
|
5312
|
+
ariaDescribedBy?: string;
|
|
5268
5313
|
/**
|
|
5269
|
-
*
|
|
5314
|
+
* Defines which element receives focus when the dialog opens.
|
|
5315
|
+
* - 'dialog' - focuses the dialog container
|
|
5316
|
+
* - 'first-tabbable' / true - focuses the first tabbable element
|
|
5317
|
+
* - string (a CSS selector) - focuses the first matching element
|
|
5318
|
+
* - false - disables auto-focus
|
|
5319
|
+
* @default true
|
|
5270
5320
|
*/
|
|
5271
|
-
|
|
5321
|
+
autoFocus?: CpsDialogAutoFocusTarget | string | boolean;
|
|
5272
5322
|
/**
|
|
5273
|
-
*
|
|
5323
|
+
* Width of the dialog, a number denoting pixels or a string.
|
|
5274
5324
|
*/
|
|
5275
|
-
|
|
5325
|
+
width?: number | string;
|
|
5276
5326
|
/**
|
|
5277
|
-
*
|
|
5327
|
+
* Height of the dialog, a number denoting pixels or a string.
|
|
5278
5328
|
*/
|
|
5279
|
-
|
|
5329
|
+
height?: number | string;
|
|
5280
5330
|
/**
|
|
5281
|
-
*
|
|
5331
|
+
* Min-width of the dialog, a number denoting pixels or a string.
|
|
5282
5332
|
*/
|
|
5283
|
-
|
|
5333
|
+
minWidth?: number | string;
|
|
5334
|
+
/**
|
|
5335
|
+
* Min-height of the dialog, a number denoting pixels or a string.
|
|
5336
|
+
*/
|
|
5337
|
+
minHeight?: number | string;
|
|
5338
|
+
/**
|
|
5339
|
+
* Max-width of the dialog, a number denoting pixels or a string.
|
|
5340
|
+
*/
|
|
5341
|
+
maxWidth?: number | string;
|
|
5284
5342
|
/**
|
|
5285
|
-
* Max-height of the dialog.
|
|
5343
|
+
* Max-height of the dialog, a number denoting pixels or a string.
|
|
5286
5344
|
*/
|
|
5287
|
-
maxHeight?: string;
|
|
5345
|
+
maxHeight?: number | string;
|
|
5288
5346
|
/**
|
|
5289
5347
|
* Specifies if pressing escape key should hide the dialog.
|
|
5290
5348
|
*/
|
|
@@ -5355,12 +5413,14 @@ declare class CpsDialogConfig<T = any> {
|
|
|
5355
5413
|
keepInViewport?: boolean;
|
|
5356
5414
|
/**
|
|
5357
5415
|
* Minimum value for the left coordinate of dialog in dragging.
|
|
5416
|
+
* A number is treated as pixels, a string must use 'px' or 'rem' units (e.g. '2rem', '32px').
|
|
5358
5417
|
*/
|
|
5359
|
-
minX?: number;
|
|
5418
|
+
minX?: number | string;
|
|
5360
5419
|
/**
|
|
5361
5420
|
* Minimum value for the top coordinate of dialog in dragging.
|
|
5421
|
+
* A number is treated as pixels, a string must use 'px' or 'rem' units (e.g. '2rem', '32px').
|
|
5362
5422
|
*/
|
|
5363
|
-
minY?: number;
|
|
5423
|
+
minY?: number | string;
|
|
5364
5424
|
/**
|
|
5365
5425
|
* Determines whether the dialog can be displayed full screen.
|
|
5366
5426
|
*/
|
|
@@ -5377,7 +5437,7 @@ declare class CpsDialogConfig<T = any> {
|
|
|
5377
5437
|
|
|
5378
5438
|
type Nullable<T = void> = T | null | undefined;
|
|
5379
5439
|
type VoidListener = () => void | null | undefined;
|
|
5380
|
-
declare class CpsDialogComponent implements AfterViewInit, OnDestroy {
|
|
5440
|
+
declare class CpsDialogComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
5381
5441
|
private document;
|
|
5382
5442
|
private platformId;
|
|
5383
5443
|
private _dialogRef;
|
|
@@ -5399,6 +5459,7 @@ declare class CpsDialogComponent implements AfterViewInit, OnDestroy {
|
|
|
5399
5459
|
maskViewChild: Nullable<ElementRef>;
|
|
5400
5460
|
contentViewChild: Nullable<ElementRef>;
|
|
5401
5461
|
headerViewChild: Nullable<ElementRef>;
|
|
5462
|
+
dragHandleViewChild: Nullable<ElementRef>;
|
|
5402
5463
|
childComponentType: Nullable<Type<any>>;
|
|
5403
5464
|
container: Nullable<HTMLDivElement>;
|
|
5404
5465
|
wrapper: Nullable<HTMLElement>;
|
|
@@ -5409,12 +5470,27 @@ declare class CpsDialogComponent implements AfterViewInit, OnDestroy {
|
|
|
5409
5470
|
documentResizeEndListener: VoidListener | null;
|
|
5410
5471
|
documentDragListener: VoidListener | null;
|
|
5411
5472
|
documentDragEndListener: VoidListener | null;
|
|
5473
|
+
private _focusTrapTeardown;
|
|
5474
|
+
private _keyboardDragging;
|
|
5475
|
+
private _keyboardResizing;
|
|
5476
|
+
private _previouslyFocusedElement;
|
|
5477
|
+
private _shouldRestoreFocus;
|
|
5412
5478
|
_openStateChanged: EventEmitter<void>;
|
|
5413
|
-
_dragStarted: EventEmitter<MouseEvent>;
|
|
5414
|
-
_dragEnded: EventEmitter<MouseEvent>;
|
|
5415
|
-
_resizeStarted: EventEmitter<MouseEvent>;
|
|
5416
|
-
_resizeEnded: EventEmitter<MouseEvent>;
|
|
5479
|
+
_dragStarted: EventEmitter<KeyboardEvent | MouseEvent>;
|
|
5480
|
+
_dragEnded: EventEmitter<KeyboardEvent | MouseEvent>;
|
|
5481
|
+
_resizeStarted: EventEmitter<KeyboardEvent | MouseEvent>;
|
|
5482
|
+
_resizeEnded: EventEmitter<KeyboardEvent | MouseEvent>;
|
|
5417
5483
|
_maximizedStateChanged: EventEmitter<boolean>;
|
|
5484
|
+
private _rootFontSizePx;
|
|
5485
|
+
private _openedByKeyboard;
|
|
5486
|
+
private readonly _cpsFocusService;
|
|
5487
|
+
get ariaLabel(): string | null;
|
|
5488
|
+
get cvtWidth(): string;
|
|
5489
|
+
get cvtHeight(): string;
|
|
5490
|
+
get cvtMinWidth(): string;
|
|
5491
|
+
get cvtMinHeight(): string;
|
|
5492
|
+
get cvtMaxWidth(): string;
|
|
5493
|
+
get cvtMaxHeight(): string;
|
|
5418
5494
|
get minX(): number;
|
|
5419
5495
|
get minY(): number;
|
|
5420
5496
|
get keepInViewport(): boolean;
|
|
@@ -5425,18 +5501,25 @@ declare class CpsDialogComponent implements AfterViewInit, OnDestroy {
|
|
|
5425
5501
|
set style(value: any);
|
|
5426
5502
|
get position(): string;
|
|
5427
5503
|
get parent(): Element | undefined;
|
|
5428
|
-
constructor(document: Document, platformId:
|
|
5504
|
+
constructor(document: Document, platformId: object, _dialogRef: CpsDialogRef, _cdRef: ChangeDetectorRef, renderer: Renderer2, config: CpsDialogConfig, zone: NgZone, primeNG: PrimeNG);
|
|
5505
|
+
ngOnInit(): void;
|
|
5429
5506
|
ngAfterViewInit(): void;
|
|
5507
|
+
ngOnDestroy(): void;
|
|
5430
5508
|
loadChildComponent(componentType: Type<any>): void;
|
|
5431
5509
|
moveOnTop(): void;
|
|
5432
5510
|
onAnimationStart(event: AnimationEvent): void;
|
|
5433
5511
|
onAnimationEnd(event: AnimationEvent): void;
|
|
5434
5512
|
onContainerDestroy(): void;
|
|
5513
|
+
isCloseDisabled(): boolean;
|
|
5435
5514
|
close(): void;
|
|
5436
5515
|
hide(): void;
|
|
5437
5516
|
enableModality(): void;
|
|
5438
5517
|
disableModality(): void;
|
|
5439
|
-
focus(): void;
|
|
5518
|
+
focus(afterFocus?: () => void): void;
|
|
5519
|
+
onResizeHandleKeydown(event: KeyboardEvent): void;
|
|
5520
|
+
onResizeHandleKeyup(event: KeyboardEvent): void;
|
|
5521
|
+
onHeaderKeyup(event: KeyboardEvent): void;
|
|
5522
|
+
onHeaderKeydown(event: KeyboardEvent): void;
|
|
5440
5523
|
toggleMaximized(value?: boolean): void;
|
|
5441
5524
|
initResize(event: MouseEvent): void;
|
|
5442
5525
|
onResize(event: MouseEvent): void;
|
|
@@ -5455,8 +5538,12 @@ declare class CpsDialogComponent implements AfterViewInit, OnDestroy {
|
|
|
5455
5538
|
unbindGlobalListeners(): void;
|
|
5456
5539
|
bindDocumentEscapeListener(): void;
|
|
5457
5540
|
unbindDocumentEscapeListener(): void;
|
|
5541
|
+
bindFocusTrapListener(): void;
|
|
5542
|
+
unbindFocusTrapListener(): void;
|
|
5458
5543
|
unbindMaskClickListener(): void;
|
|
5459
|
-
|
|
5544
|
+
private _pxToRem;
|
|
5545
|
+
private _toPx;
|
|
5546
|
+
private _clampDragPos;
|
|
5460
5547
|
static ɵfac: i0.ɵɵFactoryDeclaration<CpsDialogComponent, never>;
|
|
5461
5548
|
static ɵcmp: i0.ɵɵComponentDeclaration<CpsDialogComponent, "cps-dialog", never, {}, {}, never, never, true, never>;
|
|
5462
5549
|
}
|
|
@@ -5526,31 +5613,31 @@ declare class CpsDialogRef<T = any> {
|
|
|
5526
5613
|
private readonly _onDragStart;
|
|
5527
5614
|
/**
|
|
5528
5615
|
* Event triggered on drag start.
|
|
5529
|
-
* @param {MouseEvent} event - Mouse event.
|
|
5616
|
+
* @param {MouseEvent | KeyboardEvent} event - Mouse or keyboard event.
|
|
5530
5617
|
* @group Events
|
|
5531
5618
|
*/
|
|
5532
|
-
onDragStart: Observable<MouseEvent>;
|
|
5619
|
+
onDragStart: Observable<MouseEvent | KeyboardEvent>;
|
|
5533
5620
|
private readonly _onDragEnd;
|
|
5534
5621
|
/**
|
|
5535
5622
|
* Event triggered on drag end.
|
|
5536
|
-
* @param {MouseEvent} event - Mouse event.
|
|
5623
|
+
* @param {MouseEvent | KeyboardEvent} event - Mouse or keyboard event.
|
|
5537
5624
|
* @group Events
|
|
5538
5625
|
*/
|
|
5539
|
-
onDragEnd: Observable<MouseEvent>;
|
|
5626
|
+
onDragEnd: Observable<MouseEvent | KeyboardEvent>;
|
|
5540
5627
|
private readonly _onResizeStart;
|
|
5541
5628
|
/**
|
|
5542
5629
|
* Event triggered on resize start.
|
|
5543
|
-
* @param {MouseEvent} event - Mouse event.
|
|
5630
|
+
* @param {MouseEvent | KeyboardEvent} event - Mouse or keyboard event.
|
|
5544
5631
|
* @group Events
|
|
5545
5632
|
*/
|
|
5546
|
-
onResizeStart: Observable<MouseEvent>;
|
|
5633
|
+
onResizeStart: Observable<MouseEvent | KeyboardEvent>;
|
|
5547
5634
|
private readonly _onResizeEnd;
|
|
5548
5635
|
/**
|
|
5549
5636
|
* Event triggered on resize end.
|
|
5550
|
-
* @param {MouseEvent} event - Mouse event.
|
|
5637
|
+
* @param {MouseEvent | KeyboardEvent} event - Mouse or keyboard event.
|
|
5551
5638
|
* @group Events
|
|
5552
5639
|
*/
|
|
5553
|
-
onResizeEnd: Observable<MouseEvent>;
|
|
5640
|
+
onResizeEnd: Observable<MouseEvent | KeyboardEvent>;
|
|
5554
5641
|
private readonly _onMaximize;
|
|
5555
5642
|
/**
|
|
5556
5643
|
* Event triggered on dialog maximized state changed.
|
|
@@ -5723,6 +5810,78 @@ declare class CpsNotificationService {
|
|
|
5723
5810
|
static ɵprov: i0.ɵɵInjectableDeclaration<CpsNotificationService>;
|
|
5724
5811
|
}
|
|
5725
5812
|
|
|
5813
|
+
/**
|
|
5814
|
+
* CpsFocusService manages focus-related concerns:
|
|
5815
|
+
* - Tracks the most recent user input modality (keyboard vs. pointer)
|
|
5816
|
+
* - Focuses elements with conditional focus-ring suppression
|
|
5817
|
+
* - Traps focus within a container (e.g. a modal dialog)
|
|
5818
|
+
*
|
|
5819
|
+
* Only active in browser environments; no-ops under SSR.
|
|
5820
|
+
*
|
|
5821
|
+
* @example
|
|
5822
|
+
* ```ts
|
|
5823
|
+
* readonly focusService = inject(CpsFocusService);
|
|
5824
|
+
* readonly showFocusRing = computed(() => this.focusService.isKeyboard());
|
|
5825
|
+
* ```
|
|
5826
|
+
*/
|
|
5827
|
+
declare class CpsFocusService {
|
|
5828
|
+
private readonly _platformId;
|
|
5829
|
+
private readonly _document;
|
|
5830
|
+
/**
|
|
5831
|
+
* A signal reflecting the most recently detected input modality.
|
|
5832
|
+
* - `'keyboard'` — set when a navigation key (Tab, Enter, Space, Arrow keys,
|
|
5833
|
+
* Home, End, PageUp, PageDown) is pressed.
|
|
5834
|
+
* - `'pointer'` — set on every `pointerdown` event (mouse, touch, stylus).
|
|
5835
|
+
*
|
|
5836
|
+
* Defaults to `'pointer'`.
|
|
5837
|
+
*/
|
|
5838
|
+
readonly lastInput: i0.WritableSignal<"keyboard" | "pointer">;
|
|
5839
|
+
/**
|
|
5840
|
+
* Returns `true` when the most recently detected input was keyboard.
|
|
5841
|
+
* Shorthand for `lastInput() === 'keyboard'`.
|
|
5842
|
+
*/
|
|
5843
|
+
isKeyboard(): boolean;
|
|
5844
|
+
/**
|
|
5845
|
+
* Focuses `el`, conditionally suppressing the focus-visible ring.
|
|
5846
|
+
*
|
|
5847
|
+
* When `showFocusRing` is `false`, adds the `suppress-focus-visible` CSS
|
|
5848
|
+
* class to the element before focusing and removes it on the next `blur`
|
|
5849
|
+
* event. This keeps the UI clean for pointer-initiated closes.
|
|
5850
|
+
*/
|
|
5851
|
+
focusElement(el: HTMLElement, showFocusRing: boolean): void;
|
|
5852
|
+
/**
|
|
5853
|
+
* Installs a Tab key focus trap on `container`.
|
|
5854
|
+
*
|
|
5855
|
+
* @param container - The element to trap focus within.
|
|
5856
|
+
* @param getFocusableElements - Returns the ordered list of tabbable
|
|
5857
|
+
* elements inside `container`. Defaults to a native CSS-selector-based
|
|
5858
|
+
* implementation. Pass `DomHandler.getFocusableElements` (PrimeNG) or any
|
|
5859
|
+
* custom function when richer querying is needed.
|
|
5860
|
+
* @returns A teardown function — call it to remove the trap listener.
|
|
5861
|
+
*/
|
|
5862
|
+
trapFocus(container: HTMLElement, getFocusableElements?: (el: HTMLElement) => HTMLElement[]): () => void;
|
|
5863
|
+
private readonly _navigationKeys;
|
|
5864
|
+
constructor();
|
|
5865
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsFocusService, never>;
|
|
5866
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpsFocusService>;
|
|
5867
|
+
}
|
|
5868
|
+
/**
|
|
5869
|
+
* Injection token for the focus managing service.
|
|
5870
|
+
*
|
|
5871
|
+
* By default it resolves to the singleton {@link CpsFocusService}.
|
|
5872
|
+
* Consumer applications can override it to:
|
|
5873
|
+
* - Supply a custom subclass
|
|
5874
|
+
* - Provide `null` to disable dynamic tracking entirely
|
|
5875
|
+
*
|
|
5876
|
+
* @example Disable dynamic tracking:
|
|
5877
|
+
* ```typescript
|
|
5878
|
+
* providers: [
|
|
5879
|
+
* { provide: CPS_FOCUS_SERVICE, useValue: null }
|
|
5880
|
+
* ]
|
|
5881
|
+
* ```
|
|
5882
|
+
*/
|
|
5883
|
+
declare const CPS_FOCUS_SERVICE: InjectionToken<CpsFocusService | null>;
|
|
5884
|
+
|
|
5726
5885
|
/**
|
|
5727
5886
|
* Available theme options
|
|
5728
5887
|
* @group Types
|
|
@@ -5841,6 +6000,209 @@ declare class CpsThemeService {
|
|
|
5841
6000
|
static ɵprov: i0.ɵɵInjectableDeclaration<CpsThemeService>;
|
|
5842
6001
|
}
|
|
5843
6002
|
|
|
6003
|
+
/**
|
|
6004
|
+
* Service for validating 6-field cron expressions with extended features.
|
|
6005
|
+
*
|
|
6006
|
+
* This service handles cron validation logic for extended cron expression formats
|
|
6007
|
+
* that support additional features beyond standard Unix cron for more flexible
|
|
6008
|
+
* scheduling capabilities.
|
|
6009
|
+
*
|
|
6010
|
+
* Format: minutes hours day-of-month month day-of-week year
|
|
6011
|
+
*
|
|
6012
|
+
* Key Features:
|
|
6013
|
+
* - Wildcards: asterisk (any value), question mark (any value for day fields)
|
|
6014
|
+
* - Ranges: 1-5, MON-FRI, JAN-MAR
|
|
6015
|
+
* - Steps: asterisk/15, 5/10, 1-5/2
|
|
6016
|
+
* - Lists: 1,3,5, MON,WED,FRI
|
|
6017
|
+
* - Special chars: L (last), W (weekday), hash (nth occurrence)
|
|
6018
|
+
* @see {@link https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#cron-based | AWS EventBridge Scheduler - Cron-based schedules}
|
|
6019
|
+
* @group Services
|
|
6020
|
+
*/
|
|
6021
|
+
declare class CpsCronValidationService {
|
|
6022
|
+
/**
|
|
6023
|
+
* Validates a complete 6-field cron expression.
|
|
6024
|
+
*
|
|
6025
|
+
* @param cron - The 6-field cron expression to validate
|
|
6026
|
+
* @param allowEmpty - Whether to allow empty cron expressions
|
|
6027
|
+
* @returns boolean - True if the cron expression is valid
|
|
6028
|
+
* @group Method
|
|
6029
|
+
*/
|
|
6030
|
+
isValidCron(cron: string, allowEmpty?: boolean): boolean;
|
|
6031
|
+
/**
|
|
6032
|
+
* Validates all six fields of an extended cron expression.
|
|
6033
|
+
*
|
|
6034
|
+
* Extended cron format uses 6 fields: minutes hours day-of-month month day-of-week year
|
|
6035
|
+
* This method validates each field according to extended cron syntax rules,
|
|
6036
|
+
* which build upon standard Unix cron with additional features.
|
|
6037
|
+
*
|
|
6038
|
+
* Field Ranges and Features:
|
|
6039
|
+
* - Minutes (0-59): Numeric, ranges, steps, lists
|
|
6040
|
+
* - Hours (0-23): Numeric, ranges, steps, lists
|
|
6041
|
+
* - Day-of-month (1-31): Numeric + special chars (L, W, LW)
|
|
6042
|
+
* - Month (1-12): Numeric or named (JAN-DEC), ranges, steps, lists
|
|
6043
|
+
* - Day-of-week (1-7): Numeric or named (SUN-SAT), special chars (L, #)
|
|
6044
|
+
* - Year (1970-2199): Extended range for long-term scheduling
|
|
6045
|
+
*
|
|
6046
|
+
* Key Rules:
|
|
6047
|
+
* - Day-of-month and day-of-week are mutually exclusive (one must be * or ?)
|
|
6048
|
+
* - ? is only valid for day-of-month and day-of-week fields
|
|
6049
|
+
* - Special characters provide advanced scheduling capabilities
|
|
6050
|
+
*
|
|
6051
|
+
* @param parts - Array of 6 cron field strings [minutes, hours, dayOfMonth, month, dayOfWeek, year]
|
|
6052
|
+
* @returns boolean - True if all fields are valid and follow extended cron rules
|
|
6053
|
+
*/
|
|
6054
|
+
private _validateCronFields;
|
|
6055
|
+
/**
|
|
6056
|
+
* Enhanced validation for complex cron field patterns.
|
|
6057
|
+
* Supports extended cron features including ranges, steps, lists, and special characters.
|
|
6058
|
+
*
|
|
6059
|
+
* This method handles extended cron expression syntax which builds upon
|
|
6060
|
+
* standard Unix cron format with additional features for flexible scheduling.
|
|
6061
|
+
*
|
|
6062
|
+
* Supported patterns:
|
|
6063
|
+
* - Wildcards: asterisk (any value), question mark (any value for day fields)
|
|
6064
|
+
* - Ranges: 1-5 (values 1 through 5), MON-FRI (Monday through Friday)
|
|
6065
|
+
* - Steps: asterisk/10 (every 10th value), 1-5/2 (every 2nd value from 1 to 5)
|
|
6066
|
+
* - Lists: 1,3,5 (specific values), MON,WED,FRI (specific days)
|
|
6067
|
+
* - Special chars: L (last), W (weekday), hash (nth occurrence)
|
|
6068
|
+
*
|
|
6069
|
+
* @param field - The cron field value to validate (examples: "1-5/2", "MON-FRI", "asterisk/10")
|
|
6070
|
+
* @param min - Minimum valid numeric value for this field type
|
|
6071
|
+
* @param max - Maximum valid numeric value for this field type
|
|
6072
|
+
* @param type - The cron field type ('minutes', 'hours', 'dayOfMonth', 'month', 'dayOfWeek', 'year')
|
|
6073
|
+
* @returns boolean - True if the field is valid according to EventBridge Scheduler rules
|
|
6074
|
+
*/
|
|
6075
|
+
private _validateComplexField;
|
|
6076
|
+
/**
|
|
6077
|
+
* Validates single values and extended cron special characters.
|
|
6078
|
+
*
|
|
6079
|
+
* This method handles the validation of individual field values including:
|
|
6080
|
+
* - Numeric values within specified ranges
|
|
6081
|
+
* - Special characters for advanced scheduling
|
|
6082
|
+
* - Named values like month names (JAN, FEB) and day names (SUN, MON)
|
|
6083
|
+
*
|
|
6084
|
+
* Extended Cron Special Characters:
|
|
6085
|
+
* - L: Last day of month (day-of-month) or last occurrence of weekday (day-of-week)
|
|
6086
|
+
* - W: Nearest weekday to the specified day (day-of-month only)
|
|
6087
|
+
* - LW: Last weekday of the month (day-of-month only)
|
|
6088
|
+
* - #: Nth occurrence of weekday (e.g., "3#2" = 3rd Tuesday of month)
|
|
6089
|
+
*
|
|
6090
|
+
* @param value - The single value to validate (e.g., "15", "L", "15W", "MON", "3#2")
|
|
6091
|
+
* @param min - Minimum valid numeric value for this field type
|
|
6092
|
+
* @param max - Maximum valid numeric value for this field type
|
|
6093
|
+
* @param type - The cron field type for context-specific validation
|
|
6094
|
+
* @returns boolean - True if the value is valid for EventBridge Scheduler
|
|
6095
|
+
*/
|
|
6096
|
+
private _validateSingleValue;
|
|
6097
|
+
/**
|
|
6098
|
+
* Validates range patterns with step intervals.
|
|
6099
|
+
*
|
|
6100
|
+
* This method handles complex range-step patterns like "1-5/2" which means
|
|
6101
|
+
* "every 2nd value from 1 to 5" (resulting in: 1, 3, 5).
|
|
6102
|
+
*
|
|
6103
|
+
* Extended cron uses this pattern for flexible interval scheduling within specific ranges.
|
|
6104
|
+
* For example: "9-17/2" for hours would trigger at 9:00, 11:00, 13:00, 15:00, 17:00.
|
|
6105
|
+
*
|
|
6106
|
+
* @param start - Range start value (numeric or named like "MON")
|
|
6107
|
+
* @param end - Range end value (numeric or named like "FRI")
|
|
6108
|
+
* @param step - Step interval as string (must be positive integer)
|
|
6109
|
+
* @param min - Minimum allowed value for this field type
|
|
6110
|
+
* @param max - Maximum allowed value for this field type
|
|
6111
|
+
* @param type - Field type for context-aware validation (dayOfWeek gets special handling)
|
|
6112
|
+
* @returns boolean - True if the range-step pattern is valid for EventBridge
|
|
6113
|
+
*/
|
|
6114
|
+
private _validateRangeWithStep;
|
|
6115
|
+
/**
|
|
6116
|
+
* Validates simple range patterns without step intervals.
|
|
6117
|
+
*
|
|
6118
|
+
* This method handles basic range patterns like "1-5" (values 1 through 5) or
|
|
6119
|
+
* "MON-FRI" (Monday through Friday). Extended cron supports both numeric and
|
|
6120
|
+
* named ranges for flexible scheduling.
|
|
6121
|
+
*
|
|
6122
|
+
* Examples:
|
|
6123
|
+
* - "9-17" for hours: triggers every hour from 9:00 to 17:00 (9am to 5pm)
|
|
6124
|
+
* - "MON-FRI" for day-of-week: triggers Monday through Friday
|
|
6125
|
+
* - "JAN-MAR" for months: triggers January through March
|
|
6126
|
+
*
|
|
6127
|
+
* @param start - Range start value (numeric or named)
|
|
6128
|
+
* @param end - Range end value (numeric or named)
|
|
6129
|
+
* @param min - Minimum allowed value for this field type
|
|
6130
|
+
* @param max - Maximum allowed value for this field type
|
|
6131
|
+
* @param type - Field type for validation context (affects named value handling)
|
|
6132
|
+
* @returns boolean - True if the range pattern is valid for EventBridge
|
|
6133
|
+
*/
|
|
6134
|
+
private _validateSimpleRange;
|
|
6135
|
+
/**
|
|
6136
|
+
* Validates step patterns from a starting point.
|
|
6137
|
+
*
|
|
6138
|
+
* This method handles step patterns like "5/10" (every 10th value starting from 5)
|
|
6139
|
+
* or asterisk/15 (every 15th value starting from minimum). Extended cron uses this for
|
|
6140
|
+
* interval-based scheduling from specific starting points.
|
|
6141
|
+
*
|
|
6142
|
+
* Examples:
|
|
6143
|
+
* - "0/15" for minutes: triggers at 0, 15, 30, 45 minutes past the hour
|
|
6144
|
+
* - asterisk/5 for minutes: triggers every 5 minutes (0, 5, 10, 15, ...)
|
|
6145
|
+
* - "2/3" for day-of-month: triggers every 3rd day starting from the 2nd (2, 5, 8, ...)
|
|
6146
|
+
*
|
|
6147
|
+
* @param start - Starting value (can be asterisk for wildcard start or specific value)
|
|
6148
|
+
* @param step - Step interval as string (must be positive integer)
|
|
6149
|
+
* @param min - Minimum allowed value for this field type
|
|
6150
|
+
* @param max - Maximum allowed value for this field type
|
|
6151
|
+
* @param type - Field type for validation context
|
|
6152
|
+
* @returns boolean - True if the step pattern is valid for EventBridge
|
|
6153
|
+
*/
|
|
6154
|
+
private _validateStepField;
|
|
6155
|
+
/**
|
|
6156
|
+
* Validates day-of-month field with special characters.
|
|
6157
|
+
*/
|
|
6158
|
+
private _validateDayOfMonth;
|
|
6159
|
+
/**
|
|
6160
|
+
* Validates month field with support for named months.
|
|
6161
|
+
*/
|
|
6162
|
+
private _validateMonth;
|
|
6163
|
+
/**
|
|
6164
|
+
* Validates day-of-week field with support for named days and special characters.
|
|
6165
|
+
*/
|
|
6166
|
+
private _validateDayOfWeek;
|
|
6167
|
+
/**
|
|
6168
|
+
* Validates mutual exclusivity rule for day-of-month and day-of-week fields.
|
|
6169
|
+
* Extended cron requires that one of these fields must be a wildcard.
|
|
6170
|
+
*/
|
|
6171
|
+
private _validateDayMutualExclusivity;
|
|
6172
|
+
/**
|
|
6173
|
+
* Checks if a value represents a valid day of the week (numeric or named).
|
|
6174
|
+
*/
|
|
6175
|
+
private _isValidDayOfWeek;
|
|
6176
|
+
/**
|
|
6177
|
+
* Checks if a value represents a valid month name.
|
|
6178
|
+
*/
|
|
6179
|
+
private _isValidMonthName;
|
|
6180
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsCronValidationService, never>;
|
|
6181
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpsCronValidationService>;
|
|
6182
|
+
}
|
|
6183
|
+
/**
|
|
6184
|
+
* Injection token for `CpsCronValidationService`.
|
|
6185
|
+
*
|
|
6186
|
+
* Always inject this token instead of `CpsCronValidationService` directly.
|
|
6187
|
+
* This allows consumer applications to override or disable cron validation by
|
|
6188
|
+
* providing an alternative implementation via `providers`.
|
|
6189
|
+
*
|
|
6190
|
+
* @example
|
|
6191
|
+
* // Inject in a component or service
|
|
6192
|
+
* private readonly cronValidation = inject(CPS_CRON_VALIDATION_SERVICE);
|
|
6193
|
+
*
|
|
6194
|
+
* @example
|
|
6195
|
+
* // Override with a custom implementation
|
|
6196
|
+
* providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useClass: MyCustomCronValidationService }]
|
|
6197
|
+
*
|
|
6198
|
+
* @example
|
|
6199
|
+
* // Disable cron validation entirely
|
|
6200
|
+
* providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useValue: null }]
|
|
6201
|
+
*
|
|
6202
|
+
* @group Tokens
|
|
6203
|
+
*/
|
|
6204
|
+
declare const CPS_CRON_VALIDATION_SERVICE: InjectionToken<CpsCronValidationService | null>;
|
|
6205
|
+
|
|
5844
6206
|
/**
|
|
5845
6207
|
* Collects all --cps-color-* CSS custom properties from :root rules only.
|
|
5846
6208
|
* Theme overrides (e.g. [data-theme='dark']) are excluded to avoid duplicates,
|
|
@@ -5850,5 +6212,5 @@ declare const getCpsColors: (_document: Document) => [string, string][];
|
|
|
5850
6212
|
declare const getCSSColor: (val: string, _document: Document) => string;
|
|
5851
6213
|
declare const getTextColor: (backgroundColor: string) => string;
|
|
5852
6214
|
|
|
5853
|
-
export { CPS_RADIO_GROUP, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, CpsDatepickerComponent, CpsDialogConfig, CpsDialogRef, CpsDialogService, CpsDividerComponent, CpsExpansionPanelComponent, CpsFileUploadComponent, 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 };
|
|
5854
|
-
export type { CpsAutocompleteAppearanceType, CpsBaseTheme, CpsButtonToggleOption, CpsColorTheme, CpsColumnFilterCategoryOption, CpsColumnFilterType, CpsDatepickerAppearanceType, 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 };
|
|
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 };
|
|
6216
|
+
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 };
|