cps-ui-kit 21.12.0 → 21.14.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 +217 -83
- package/fesm2022/cps-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cps-ui-kit.d.ts +294 -25
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;
|
|
@@ -830,9 +830,9 @@ declare class CpsButtonToggleComponent implements ControlValueAccessor, OnInit,
|
|
|
830
830
|
constructor(_control: NgControl, document: Document, platformId: object, renderer: Renderer2, cdr: ChangeDetectorRef);
|
|
831
831
|
ngOnInit(): void;
|
|
832
832
|
ngOnChanges(): void;
|
|
833
|
-
onChange: (
|
|
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;
|
|
@@ -1015,14 +1015,14 @@ declare class CpsCheckboxComponent implements OnInit, OnChanges, ControlValueAcc
|
|
|
1015
1015
|
constructor(_control: NgControl, document: Document, _elementRef: ElementRef<HTMLElement>);
|
|
1016
1016
|
ngOnInit(): void;
|
|
1017
1017
|
ngOnChanges(): void;
|
|
1018
|
-
onChange: (
|
|
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;
|
|
@@ -2016,14 +2016,14 @@ declare class CpsRadioGroupComponent implements ControlValueAccessor, OnInit, On
|
|
|
2016
2016
|
ngOnInit(): void;
|
|
2017
2017
|
ngOnChanges(): 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>;
|
|
@@ -3979,7 +3979,7 @@ declare class CpsTagComponent implements ControlValueAccessor, OnChanges {
|
|
|
3979
3979
|
constructor(_control: NgControl, document: Document);
|
|
3980
3980
|
ngOnChanges(): void;
|
|
3981
3981
|
setClasses(): void;
|
|
3982
|
-
onChange: (
|
|
3982
|
+
onChange: (_event: any) => void;
|
|
3983
3983
|
onTouched: () => void;
|
|
3984
3984
|
registerOnChange(fn: any): void;
|
|
3985
3985
|
registerOnTouched(fn: any): void;
|
|
@@ -4125,7 +4125,7 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
|
|
|
4125
4125
|
ngOnInit(): void;
|
|
4126
4126
|
ngOnDestroy(): void;
|
|
4127
4127
|
private _checkErrors;
|
|
4128
|
-
onChange: (
|
|
4128
|
+
onChange: (_event: any) => void;
|
|
4129
4129
|
onTouched: () => void;
|
|
4130
4130
|
registerOnChange(fn: any): void;
|
|
4131
4131
|
registerOnTouched(fn: any): void;
|
|
@@ -4133,7 +4133,7 @@ declare class CpsTextareaComponent implements ControlValueAccessor, OnInit, OnDe
|
|
|
4133
4133
|
updateValueEvent(event: any): void;
|
|
4134
4134
|
private _updateValue;
|
|
4135
4135
|
clear(): void;
|
|
4136
|
-
setDisabledState(
|
|
4136
|
+
setDisabledState(_disabled: boolean): void;
|
|
4137
4137
|
onBlur(): void;
|
|
4138
4138
|
onFocus(): void;
|
|
4139
4139
|
focus(): void;
|
|
@@ -4334,12 +4334,12 @@ declare class CpsBaseTreeDropdownComponent implements ControlValueAccessor, OnIn
|
|
|
4334
4334
|
ngOnDestroy(): void;
|
|
4335
4335
|
expandAll(): void;
|
|
4336
4336
|
collapseAll(): void;
|
|
4337
|
-
onChange: (
|
|
4337
|
+
onChange: (_event: any) => void;
|
|
4338
4338
|
onTouched: () => void;
|
|
4339
4339
|
registerOnChange(fn: any): void;
|
|
4340
4340
|
registerOnTouched(fn: any): void;
|
|
4341
4341
|
writeValue(value: any, internal?: boolean): void;
|
|
4342
|
-
setDisabledState(
|
|
4342
|
+
setDisabledState(_disabled: boolean): void;
|
|
4343
4343
|
onBlur(): void;
|
|
4344
4344
|
onFocus(): void;
|
|
4345
4345
|
focus(): void;
|
|
@@ -5810,6 +5810,73 @@ declare class CpsNotificationService {
|
|
|
5810
5810
|
static ɵprov: i0.ɵɵInjectableDeclaration<CpsNotificationService>;
|
|
5811
5811
|
}
|
|
5812
5812
|
|
|
5813
|
+
/**
|
|
5814
|
+
* CpsRootFontSizeService tracks the application's current root font size.
|
|
5815
|
+
*
|
|
5816
|
+
* The service uses a ResizeObserver strategy to reliably detect root font-size changes:
|
|
5817
|
+
*
|
|
5818
|
+
* **Sentinel element** (`<div style="width:1rem;height:0">`) — its pixel width
|
|
5819
|
+
* mirrors `1rem`. Any root font-size change — caused by CSS class toggles,
|
|
5820
|
+
* stylesheet rules, direct JS assignment, or viewport resize (e.g.
|
|
5821
|
+
* `font-size: 1.5vw`) — changes the sentinel's computed width, firing the
|
|
5822
|
+
* observer.
|
|
5823
|
+
* The cached value is stored in a signal and is only updated when the actual
|
|
5824
|
+
* font-size value changes, preventing spurious updates.
|
|
5825
|
+
*
|
|
5826
|
+
* In microfrontend environments the sentinel element is keyed by a known DOM
|
|
5827
|
+
* attribute (`data-cps-root-font-size-sentinel`) and reused if already present,
|
|
5828
|
+
* so only one sentinel node exists per document regardless of how many
|
|
5829
|
+
* instances of this service are created. The sentinel is intentionally never
|
|
5830
|
+
* removed from the DOM — it is a lightweight, invisible element and removing it
|
|
5831
|
+
* could silently break any other live service instance still observing it.
|
|
5832
|
+
*
|
|
5833
|
+
* Only active in browser environments. Under SSR the `fontSize` signal is
|
|
5834
|
+
* initialized to `16` (the standard browser default) and no DOM observers are created.
|
|
5835
|
+
*
|
|
5836
|
+
* Prefer injecting {@link CPS_ROOT_FONT_SIZE_SERVICE} over this class directly
|
|
5837
|
+
* to allow consumer applications to override the behavior.
|
|
5838
|
+
*
|
|
5839
|
+
* @example
|
|
5840
|
+
* ```typescript
|
|
5841
|
+
* class MyComponent {
|
|
5842
|
+
* private fontSizeService = inject(CPS_ROOT_FONT_SIZE_SERVICE);
|
|
5843
|
+
* readonly fontSize = this.fontSizeService?.fontSize;
|
|
5844
|
+
* }
|
|
5845
|
+
* ```
|
|
5846
|
+
*/
|
|
5847
|
+
declare class CpsRootFontSizeService implements OnDestroy {
|
|
5848
|
+
private readonly _document;
|
|
5849
|
+
private readonly _platformId;
|
|
5850
|
+
private static readonly _SENTINEL_ATTR;
|
|
5851
|
+
private readonly _fontSize;
|
|
5852
|
+
private _sentinelObserver;
|
|
5853
|
+
/** Reactive signal containing the current root font size in pixels. */
|
|
5854
|
+
readonly fontSize: Signal<number>;
|
|
5855
|
+
constructor();
|
|
5856
|
+
ngOnDestroy(): void;
|
|
5857
|
+
private _setupObservers;
|
|
5858
|
+
private _refresh;
|
|
5859
|
+
private _readRootFontSize;
|
|
5860
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsRootFontSizeService, never>;
|
|
5861
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpsRootFontSizeService>;
|
|
5862
|
+
}
|
|
5863
|
+
/**
|
|
5864
|
+
* Injection token for the root font size service.
|
|
5865
|
+
*
|
|
5866
|
+
* By default it resolves to the singleton {@link CpsRootFontSizeService}.
|
|
5867
|
+
* Consumer applications can override it to:
|
|
5868
|
+
* - Supply a custom subclass
|
|
5869
|
+
* - Provide `null` to disable dynamic tracking entirely
|
|
5870
|
+
*
|
|
5871
|
+
* @example Disable dynamic tracking:
|
|
5872
|
+
* ```typescript
|
|
5873
|
+
* providers: [
|
|
5874
|
+
* { provide: CPS_ROOT_FONT_SIZE_SERVICE, useValue: null }
|
|
5875
|
+
* ]
|
|
5876
|
+
* ```
|
|
5877
|
+
*/
|
|
5878
|
+
declare const CPS_ROOT_FONT_SIZE_SERVICE: InjectionToken<CpsRootFontSizeService | null>;
|
|
5879
|
+
|
|
5813
5880
|
/**
|
|
5814
5881
|
* CpsFocusService manages focus-related concerns:
|
|
5815
5882
|
* - Tracks the most recent user input modality (keyboard vs. pointer)
|
|
@@ -5990,7 +6057,6 @@ declare class CpsThemeService {
|
|
|
5990
6057
|
private getInitialColorTheme;
|
|
5991
6058
|
private getInitialBaseTheme;
|
|
5992
6059
|
private getInitialRadiusTheme;
|
|
5993
|
-
private getSystemTheme;
|
|
5994
6060
|
private watchSystemTheme;
|
|
5995
6061
|
private saveThemePreference;
|
|
5996
6062
|
private saveColorThemePreference;
|
|
@@ -6000,6 +6066,209 @@ declare class CpsThemeService {
|
|
|
6000
6066
|
static ɵprov: i0.ɵɵInjectableDeclaration<CpsThemeService>;
|
|
6001
6067
|
}
|
|
6002
6068
|
|
|
6069
|
+
/**
|
|
6070
|
+
* Service for validating 6-field cron expressions with extended features.
|
|
6071
|
+
*
|
|
6072
|
+
* This service handles cron validation logic for extended cron expression formats
|
|
6073
|
+
* that support additional features beyond standard Unix cron for more flexible
|
|
6074
|
+
* scheduling capabilities.
|
|
6075
|
+
*
|
|
6076
|
+
* Format: minutes hours day-of-month month day-of-week year
|
|
6077
|
+
*
|
|
6078
|
+
* Key Features:
|
|
6079
|
+
* - Wildcards: asterisk (any value), question mark (any value for day fields)
|
|
6080
|
+
* - Ranges: 1-5, MON-FRI, JAN-MAR
|
|
6081
|
+
* - Steps: asterisk/15, 5/10, 1-5/2
|
|
6082
|
+
* - Lists: 1,3,5, MON,WED,FRI
|
|
6083
|
+
* - Special chars: L (last), W (weekday), hash (nth occurrence)
|
|
6084
|
+
* @see {@link https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#cron-based | AWS EventBridge Scheduler - Cron-based schedules}
|
|
6085
|
+
* @group Services
|
|
6086
|
+
*/
|
|
6087
|
+
declare class CpsCronValidationService {
|
|
6088
|
+
/**
|
|
6089
|
+
* Validates a complete 6-field cron expression.
|
|
6090
|
+
*
|
|
6091
|
+
* @param cron - The 6-field cron expression to validate
|
|
6092
|
+
* @param allowEmpty - Whether to allow empty cron expressions
|
|
6093
|
+
* @returns boolean - True if the cron expression is valid
|
|
6094
|
+
* @group Method
|
|
6095
|
+
*/
|
|
6096
|
+
isValidCron(cron: string, allowEmpty?: boolean): boolean;
|
|
6097
|
+
/**
|
|
6098
|
+
* Validates all six fields of an extended cron expression.
|
|
6099
|
+
*
|
|
6100
|
+
* Extended cron format uses 6 fields: minutes hours day-of-month month day-of-week year
|
|
6101
|
+
* This method validates each field according to extended cron syntax rules,
|
|
6102
|
+
* which build upon standard Unix cron with additional features.
|
|
6103
|
+
*
|
|
6104
|
+
* Field Ranges and Features:
|
|
6105
|
+
* - Minutes (0-59): Numeric, ranges, steps, lists
|
|
6106
|
+
* - Hours (0-23): Numeric, ranges, steps, lists
|
|
6107
|
+
* - Day-of-month (1-31): Numeric + special chars (L, W, LW)
|
|
6108
|
+
* - Month (1-12): Numeric or named (JAN-DEC), ranges, steps, lists
|
|
6109
|
+
* - Day-of-week (1-7): Numeric or named (SUN-SAT), special chars (L, #)
|
|
6110
|
+
* - Year (1970-2199): Extended range for long-term scheduling
|
|
6111
|
+
*
|
|
6112
|
+
* Key Rules:
|
|
6113
|
+
* - Day-of-month and day-of-week are mutually exclusive (one must be * or ?)
|
|
6114
|
+
* - ? is only valid for day-of-month and day-of-week fields
|
|
6115
|
+
* - Special characters provide advanced scheduling capabilities
|
|
6116
|
+
*
|
|
6117
|
+
* @param parts - Array of 6 cron field strings [minutes, hours, dayOfMonth, month, dayOfWeek, year]
|
|
6118
|
+
* @returns boolean - True if all fields are valid and follow extended cron rules
|
|
6119
|
+
*/
|
|
6120
|
+
private _validateCronFields;
|
|
6121
|
+
/**
|
|
6122
|
+
* Enhanced validation for complex cron field patterns.
|
|
6123
|
+
* Supports extended cron features including ranges, steps, lists, and special characters.
|
|
6124
|
+
*
|
|
6125
|
+
* This method handles extended cron expression syntax which builds upon
|
|
6126
|
+
* standard Unix cron format with additional features for flexible scheduling.
|
|
6127
|
+
*
|
|
6128
|
+
* Supported patterns:
|
|
6129
|
+
* - Wildcards: asterisk (any value), question mark (any value for day fields)
|
|
6130
|
+
* - Ranges: 1-5 (values 1 through 5), MON-FRI (Monday through Friday)
|
|
6131
|
+
* - Steps: asterisk/10 (every 10th value), 1-5/2 (every 2nd value from 1 to 5)
|
|
6132
|
+
* - Lists: 1,3,5 (specific values), MON,WED,FRI (specific days)
|
|
6133
|
+
* - Special chars: L (last), W (weekday), hash (nth occurrence)
|
|
6134
|
+
*
|
|
6135
|
+
* @param field - The cron field value to validate (examples: "1-5/2", "MON-FRI", "asterisk/10")
|
|
6136
|
+
* @param min - Minimum valid numeric value for this field type
|
|
6137
|
+
* @param max - Maximum valid numeric value for this field type
|
|
6138
|
+
* @param type - The cron field type ('minutes', 'hours', 'dayOfMonth', 'month', 'dayOfWeek', 'year')
|
|
6139
|
+
* @returns boolean - True if the field is valid according to EventBridge Scheduler rules
|
|
6140
|
+
*/
|
|
6141
|
+
private _validateComplexField;
|
|
6142
|
+
/**
|
|
6143
|
+
* Validates single values and extended cron special characters.
|
|
6144
|
+
*
|
|
6145
|
+
* This method handles the validation of individual field values including:
|
|
6146
|
+
* - Numeric values within specified ranges
|
|
6147
|
+
* - Special characters for advanced scheduling
|
|
6148
|
+
* - Named values like month names (JAN, FEB) and day names (SUN, MON)
|
|
6149
|
+
*
|
|
6150
|
+
* Extended Cron Special Characters:
|
|
6151
|
+
* - L: Last day of month (day-of-month) or last occurrence of weekday (day-of-week)
|
|
6152
|
+
* - W: Nearest weekday to the specified day (day-of-month only)
|
|
6153
|
+
* - LW: Last weekday of the month (day-of-month only)
|
|
6154
|
+
* - #: Nth occurrence of weekday (e.g., "3#2" = 3rd Tuesday of month)
|
|
6155
|
+
*
|
|
6156
|
+
* @param value - The single value to validate (e.g., "15", "L", "15W", "MON", "3#2")
|
|
6157
|
+
* @param min - Minimum valid numeric value for this field type
|
|
6158
|
+
* @param max - Maximum valid numeric value for this field type
|
|
6159
|
+
* @param type - The cron field type for context-specific validation
|
|
6160
|
+
* @returns boolean - True if the value is valid for EventBridge Scheduler
|
|
6161
|
+
*/
|
|
6162
|
+
private _validateSingleValue;
|
|
6163
|
+
/**
|
|
6164
|
+
* Validates range patterns with step intervals.
|
|
6165
|
+
*
|
|
6166
|
+
* This method handles complex range-step patterns like "1-5/2" which means
|
|
6167
|
+
* "every 2nd value from 1 to 5" (resulting in: 1, 3, 5).
|
|
6168
|
+
*
|
|
6169
|
+
* Extended cron uses this pattern for flexible interval scheduling within specific ranges.
|
|
6170
|
+
* For example: "9-17/2" for hours would trigger at 9:00, 11:00, 13:00, 15:00, 17:00.
|
|
6171
|
+
*
|
|
6172
|
+
* @param start - Range start value (numeric or named like "MON")
|
|
6173
|
+
* @param end - Range end value (numeric or named like "FRI")
|
|
6174
|
+
* @param step - Step interval as string (must be positive integer)
|
|
6175
|
+
* @param min - Minimum allowed value for this field type
|
|
6176
|
+
* @param max - Maximum allowed value for this field type
|
|
6177
|
+
* @param type - Field type for context-aware validation (dayOfWeek gets special handling)
|
|
6178
|
+
* @returns boolean - True if the range-step pattern is valid for EventBridge
|
|
6179
|
+
*/
|
|
6180
|
+
private _validateRangeWithStep;
|
|
6181
|
+
/**
|
|
6182
|
+
* Validates simple range patterns without step intervals.
|
|
6183
|
+
*
|
|
6184
|
+
* This method handles basic range patterns like "1-5" (values 1 through 5) or
|
|
6185
|
+
* "MON-FRI" (Monday through Friday). Extended cron supports both numeric and
|
|
6186
|
+
* named ranges for flexible scheduling.
|
|
6187
|
+
*
|
|
6188
|
+
* Examples:
|
|
6189
|
+
* - "9-17" for hours: triggers every hour from 9:00 to 17:00 (9am to 5pm)
|
|
6190
|
+
* - "MON-FRI" for day-of-week: triggers Monday through Friday
|
|
6191
|
+
* - "JAN-MAR" for months: triggers January through March
|
|
6192
|
+
*
|
|
6193
|
+
* @param start - Range start value (numeric or named)
|
|
6194
|
+
* @param end - Range end value (numeric or named)
|
|
6195
|
+
* @param min - Minimum allowed value for this field type
|
|
6196
|
+
* @param max - Maximum allowed value for this field type
|
|
6197
|
+
* @param type - Field type for validation context (affects named value handling)
|
|
6198
|
+
* @returns boolean - True if the range pattern is valid for EventBridge
|
|
6199
|
+
*/
|
|
6200
|
+
private _validateSimpleRange;
|
|
6201
|
+
/**
|
|
6202
|
+
* Validates step patterns from a starting point.
|
|
6203
|
+
*
|
|
6204
|
+
* This method handles step patterns like "5/10" (every 10th value starting from 5)
|
|
6205
|
+
* or asterisk/15 (every 15th value starting from minimum). Extended cron uses this for
|
|
6206
|
+
* interval-based scheduling from specific starting points.
|
|
6207
|
+
*
|
|
6208
|
+
* Examples:
|
|
6209
|
+
* - "0/15" for minutes: triggers at 0, 15, 30, 45 minutes past the hour
|
|
6210
|
+
* - asterisk/5 for minutes: triggers every 5 minutes (0, 5, 10, 15, ...)
|
|
6211
|
+
* - "2/3" for day-of-month: triggers every 3rd day starting from the 2nd (2, 5, 8, ...)
|
|
6212
|
+
*
|
|
6213
|
+
* @param start - Starting value (can be asterisk for wildcard start or specific value)
|
|
6214
|
+
* @param step - Step interval as string (must be positive integer)
|
|
6215
|
+
* @param min - Minimum allowed value for this field type
|
|
6216
|
+
* @param max - Maximum allowed value for this field type
|
|
6217
|
+
* @param type - Field type for validation context
|
|
6218
|
+
* @returns boolean - True if the step pattern is valid for EventBridge
|
|
6219
|
+
*/
|
|
6220
|
+
private _validateStepField;
|
|
6221
|
+
/**
|
|
6222
|
+
* Validates day-of-month field with special characters.
|
|
6223
|
+
*/
|
|
6224
|
+
private _validateDayOfMonth;
|
|
6225
|
+
/**
|
|
6226
|
+
* Validates month field with support for named months.
|
|
6227
|
+
*/
|
|
6228
|
+
private _validateMonth;
|
|
6229
|
+
/**
|
|
6230
|
+
* Validates day-of-week field with support for named days and special characters.
|
|
6231
|
+
*/
|
|
6232
|
+
private _validateDayOfWeek;
|
|
6233
|
+
/**
|
|
6234
|
+
* Validates mutual exclusivity rule for day-of-month and day-of-week fields.
|
|
6235
|
+
* Extended cron requires that one of these fields must be a wildcard.
|
|
6236
|
+
*/
|
|
6237
|
+
private _validateDayMutualExclusivity;
|
|
6238
|
+
/**
|
|
6239
|
+
* Checks if a value represents a valid day of the week (numeric or named).
|
|
6240
|
+
*/
|
|
6241
|
+
private _isValidDayOfWeek;
|
|
6242
|
+
/**
|
|
6243
|
+
* Checks if a value represents a valid month name.
|
|
6244
|
+
*/
|
|
6245
|
+
private _isValidMonthName;
|
|
6246
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CpsCronValidationService, never>;
|
|
6247
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CpsCronValidationService>;
|
|
6248
|
+
}
|
|
6249
|
+
/**
|
|
6250
|
+
* Injection token for `CpsCronValidationService`.
|
|
6251
|
+
*
|
|
6252
|
+
* Always inject this token instead of `CpsCronValidationService` directly.
|
|
6253
|
+
* This allows consumer applications to override or disable cron validation by
|
|
6254
|
+
* providing an alternative implementation via `providers`.
|
|
6255
|
+
*
|
|
6256
|
+
* @example
|
|
6257
|
+
* // Inject in a component or service
|
|
6258
|
+
* private readonly cronValidation = inject(CPS_CRON_VALIDATION_SERVICE);
|
|
6259
|
+
*
|
|
6260
|
+
* @example
|
|
6261
|
+
* // Override with a custom implementation
|
|
6262
|
+
* providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useClass: MyCustomCronValidationService }]
|
|
6263
|
+
*
|
|
6264
|
+
* @example
|
|
6265
|
+
* // Disable cron validation entirely
|
|
6266
|
+
* providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useValue: null }]
|
|
6267
|
+
*
|
|
6268
|
+
* @group Tokens
|
|
6269
|
+
*/
|
|
6270
|
+
declare const CPS_CRON_VALIDATION_SERVICE: InjectionToken<CpsCronValidationService | null>;
|
|
6271
|
+
|
|
6003
6272
|
/**
|
|
6004
6273
|
* Collects all --cps-color-* CSS custom properties from :root rules only.
|
|
6005
6274
|
* Theme overrides (e.g. [data-theme='dark']) are excluded to avoid duplicates,
|
|
@@ -6009,5 +6278,5 @@ declare const getCpsColors: (_document: Document) => [string, string][];
|
|
|
6009
6278
|
declare const getCSSColor: (val: string, _document: Document) => string;
|
|
6010
6279
|
declare const getTextColor: (backgroundColor: string) => string;
|
|
6011
6280
|
|
|
6012
|
-
export { CPS_FOCUS_SERVICE, CPS_RADIO_GROUP, CpsAutocompleteComponent, CpsButtonComponent, CpsButtonToggleComponent, CpsCheckboxComponent, CpsChipComponent, CpsColumnFilterMatchMode, 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 };
|
|
6281
|
+
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 };
|
|
6013
6282
|
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 };
|