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.
@@ -2175,7 +2175,7 @@ class CpsAutocompleteComponent {
2175
2175
  this._options = [];
2176
2176
  this._optionIds = new WeakMap();
2177
2177
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2178
- this.onChange = (event) => { };
2178
+ this.onChange = (_event) => { };
2179
2179
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2180
2180
  this.onTouched = () => { };
2181
2181
  if (this._control) {
@@ -2365,7 +2365,7 @@ class CpsAutocompleteComponent {
2365
2365
  }, 0);
2366
2366
  }
2367
2367
  // eslint-disable-next-line @typescript-eslint/no-empty-function
2368
- setDisabledState(disabled) { }
2368
+ setDisabledState(_disabled) { }
2369
2369
  onBlur() {
2370
2370
  this.isActive = false;
2371
2371
  this._confirmInput(this.inputText || '', false);
@@ -3034,7 +3034,7 @@ class CpsButtonToggleComponent {
3034
3034
  this.largestButtonWidthRem = 0;
3035
3035
  this._rootFontSizePx = 16;
3036
3036
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3037
- this.onChange = (event) => { };
3037
+ this.onChange = (_event) => { };
3038
3038
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3039
3039
  this.onTouched = () => { };
3040
3040
  if (this._control) {
@@ -3068,7 +3068,7 @@ class CpsButtonToggleComponent {
3068
3068
  }
3069
3069
  }
3070
3070
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3071
- setDisabledState(disabled) { }
3071
+ setDisabledState(_disabled) { }
3072
3072
  registerOnChange(fn) {
3073
3073
  this.onChange = fn;
3074
3074
  }
@@ -3502,7 +3502,7 @@ class CpsCheckboxComponent {
3502
3502
  this.valueChanged = new EventEmitter();
3503
3503
  this._value = false;
3504
3504
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3505
- this.onChange = (event) => { };
3505
+ this.onChange = (_event) => { };
3506
3506
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3507
3507
  this.onTouched = () => { };
3508
3508
  if (this._control) {
@@ -3538,7 +3538,7 @@ class CpsCheckboxComponent {
3538
3538
  this.valueChanged.emit(value);
3539
3539
  }
3540
3540
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3541
- setDisabledState(disabled) { }
3541
+ setDisabledState(_disabled) { }
3542
3542
  focus() {
3543
3543
  this._elementRef?.nativeElement?.querySelector('input')?.focus();
3544
3544
  }
@@ -3760,7 +3760,7 @@ class CpsInputComponent {
3760
3760
  this.cvtWidth = '';
3761
3761
  this._value = '';
3762
3762
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3763
- this.onChange = (event) => { };
3763
+ this.onChange = (_event) => { };
3764
3764
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3765
3765
  this.onTouched = () => { };
3766
3766
  if (this._control) {
@@ -3860,7 +3860,7 @@ class CpsInputComponent {
3860
3860
  this.currentType = this.currentType === 'password' ? 'text' : 'password';
3861
3861
  }
3862
3862
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3863
- setDisabledState(disabled) { }
3863
+ setDisabledState(_disabled) { }
3864
3864
  onClickPrefixIcon() {
3865
3865
  if (!this.prefixIconClickable || this.readonly || this.disabled)
3866
3866
  return;
@@ -4069,7 +4069,7 @@ class CpsDatepickerComponent {
4069
4069
  this.cvtWidth = '';
4070
4070
  this._value = null;
4071
4071
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4072
- this.onChange = (event) => { };
4072
+ this.onChange = (_event) => { };
4073
4073
  // eslint-disable-next-line @typescript-eslint/no-empty-function
4074
4074
  this.onTouched = () => { };
4075
4075
  if (this._control) {
@@ -5166,7 +5166,7 @@ class CpsSelectComponent {
5166
5166
  this.virtualScrollItemSize = 44;
5167
5167
  this.selectBoxWidth = 0;
5168
5168
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5169
- this.onChange = (event) => { };
5169
+ this.onChange = (_event) => { };
5170
5170
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5171
5171
  this.onTouched = () => { };
5172
5172
  if (this._control) {
@@ -5451,7 +5451,7 @@ class CpsSelectComponent {
5451
5451
  this._dehighlightOption();
5452
5452
  }
5453
5453
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5454
- setDisabledState(disabled) { }
5454
+ setDisabledState(_disabled) { }
5455
5455
  onBlur() {
5456
5456
  this._checkErrors();
5457
5457
  this.blurred.emit();
@@ -5906,7 +5906,7 @@ class CpsRadioGroupComponent {
5906
5906
  this._value = undefined;
5907
5907
  this.error = '';
5908
5908
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5909
- this.onChange = (event) => { };
5909
+ this.onChange = (_event) => { };
5910
5910
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5911
5911
  this.onTouched = () => { };
5912
5912
  if (this._control) {
@@ -5946,7 +5946,7 @@ class CpsRadioGroupComponent {
5946
5946
  this.valueChanged.emit(value);
5947
5947
  }
5948
5948
  // eslint-disable-next-line @typescript-eslint/no-empty-function
5949
- setDisabledState(disabled) { }
5949
+ setDisabledState(_disabled) { }
5950
5950
  onBlur() {
5951
5951
  this._checkErrors();
5952
5952
  this.blurred.emit();
@@ -6087,7 +6087,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
6087
6087
  * @see {@link https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#cron-based | AWS EventBridge Scheduler - Cron-based schedules}
6088
6088
  * @group Services
6089
6089
  */
6090
- class CronValidationService {
6090
+ class CpsCronValidationService {
6091
6091
  /**
6092
6092
  * Validates a complete 6-field cron expression.
6093
6093
  *
@@ -6107,7 +6107,7 @@ class CronValidationService {
6107
6107
  if (parts.length !== 6) {
6108
6108
  return false;
6109
6109
  }
6110
- return this.validateCronFields(parts);
6110
+ return this._validateCronFields(parts);
6111
6111
  }
6112
6112
  /**
6113
6113
  * Validates all six fields of an extended cron expression.
@@ -6132,28 +6132,28 @@ class CronValidationService {
6132
6132
  * @param parts - Array of 6 cron field strings [minutes, hours, dayOfMonth, month, dayOfWeek, year]
6133
6133
  * @returns boolean - True if all fields are valid and follow extended cron rules
6134
6134
  */
6135
- validateCronFields(parts) {
6135
+ _validateCronFields(parts) {
6136
6136
  const [minutes, hours, dayOfMonth, month, dayOfWeek, year] = parts;
6137
6137
  // Validate minutes (0-59) - use enhanced validation
6138
- if (!this.validateComplexField(minutes, 0, 59, 'minutes'))
6138
+ if (!this._validateComplexField(minutes, 0, 59, 'minutes'))
6139
6139
  return false;
6140
6140
  // Validate hours (0-23) - use enhanced validation
6141
- if (!this.validateComplexField(hours, 0, 23, 'hours'))
6141
+ if (!this._validateComplexField(hours, 0, 23, 'hours'))
6142
6142
  return false;
6143
6143
  // Validate day of month (1-31 or wildcards)
6144
- if (!this.validateDayOfMonth(dayOfMonth))
6144
+ if (!this._validateDayOfMonth(dayOfMonth))
6145
6145
  return false;
6146
6146
  // Validate month (1-12 or JAN-DEC) - use enhanced validation
6147
- if (!this.validateMonth(month))
6147
+ if (!this._validateMonth(month))
6148
6148
  return false;
6149
6149
  // Validate day of week (1-7 or SUN-SAT) - enhanced method will handle this
6150
- if (!this.validateDayOfWeek(dayOfWeek))
6150
+ if (!this._validateDayOfWeek(dayOfWeek))
6151
6151
  return false;
6152
6152
  // Validate year (1970-2199) - use enhanced validation
6153
- if (!this.validateComplexField(year, 1970, 2199, 'year'))
6153
+ if (!this._validateComplexField(year, 1970, 2199, 'year'))
6154
6154
  return false;
6155
6155
  // Validate mutual exclusivity of day-of-month and day-of-week
6156
- if (!this.validateDayMutualExclusivity(dayOfMonth, dayOfWeek))
6156
+ if (!this._validateDayMutualExclusivity(dayOfMonth, dayOfWeek))
6157
6157
  return false;
6158
6158
  return true;
6159
6159
  }
@@ -6177,7 +6177,7 @@ class CronValidationService {
6177
6177
  * @param type - The cron field type ('minutes', 'hours', 'dayOfMonth', 'month', 'dayOfWeek', 'year')
6178
6178
  * @returns boolean - True if the field is valid according to EventBridge Scheduler rules
6179
6179
  */
6180
- validateComplexField(field, min, max, type) {
6180
+ _validateComplexField(field, min, max, type) {
6181
6181
  // Handle wildcard characters
6182
6182
  // '*' means "any value" and is valid for all fields
6183
6183
  // '?' means "no specific value" and is only valid for day-of-month and day-of-week fields
@@ -6190,7 +6190,7 @@ class CronValidationService {
6190
6190
  return field.split(',').every((val) => {
6191
6191
  const trimmedVal = val.trim();
6192
6192
  // Recursively validate each part of the list
6193
- return this.validateComplexField(trimmedVal, min, max, type);
6193
+ return this._validateComplexField(trimmedVal, min, max, type);
6194
6194
  });
6195
6195
  }
6196
6196
  // Handle complex range with step patterns: "1-5/2" (every 2nd value from 1 to 5)
@@ -6198,23 +6198,23 @@ class CronValidationService {
6198
6198
  if (field.includes('-') && field.includes('/')) {
6199
6199
  const [range, step] = field.split('/');
6200
6200
  const [start, end] = range.split('-');
6201
- return this.validateRangeWithStep(start, end, step, min, max, type);
6201
+ return this._validateRangeWithStep(start, end, step, min, max, type);
6202
6202
  }
6203
6203
  // Handle simple range patterns: "1-5" (values from 1 to 5), "MON-FRI" (Monday to Friday)
6204
6204
  // Extended cron supports both numeric and named ranges for time-based scheduling
6205
6205
  if (field.includes('-')) {
6206
6206
  const [start, end] = field.split('-');
6207
- return this.validateSimpleRange(start, end, min, max, type);
6207
+ return this._validateSimpleRange(start, end, min, max, type);
6208
6208
  }
6209
6209
  // Handle step patterns from start: "5/10" (every 10th value starting from 5)
6210
6210
  // Extended cron uses this for interval-based scheduling from a specific starting point
6211
6211
  if (field.includes('/')) {
6212
6212
  const [start, step] = field.split('/');
6213
- return this.validateStepField(start, step, min, max, type);
6213
+ return this._validateStepField(start, step, min, max, type);
6214
6214
  }
6215
6215
  // Handle single values and special characters (L, W, #)
6216
6216
  // These provide advanced scheduling capabilities like "last day of month" or "3rd Tuesday"
6217
- return this.validateSingleValue(field, min, max, type);
6217
+ return this._validateSingleValue(field, min, max, type);
6218
6218
  }
6219
6219
  /**
6220
6220
  * Validates single values and extended cron special characters.
@@ -6236,7 +6236,7 @@ class CronValidationService {
6236
6236
  * @param type - The cron field type for context-specific validation
6237
6237
  * @returns boolean - True if the value is valid for EventBridge Scheduler
6238
6238
  */
6239
- validateSingleValue(value, min, max, type) {
6239
+ _validateSingleValue(value, min, max, type) {
6240
6240
  // Handle special characters for day of month field
6241
6241
  // Extended cron supports advanced day-of-month scheduling patterns
6242
6242
  if (type === 'dayOfMonth') {
@@ -6255,20 +6255,20 @@ class CronValidationService {
6255
6255
  // 'MONL' = last Monday of month (last occurrence)
6256
6256
  if (value.endsWith('L')) {
6257
6257
  const day = value.slice(0, -1);
6258
- return this.isValidDayOfWeek(day);
6258
+ return this._isValidDayOfWeek(day);
6259
6259
  }
6260
6260
  // '3#2' = 3rd Tuesday of month (3=Tuesday, 2=second occurrence)
6261
6261
  if (value.includes('#')) {
6262
6262
  const [day, week] = value.split('#');
6263
- return (this.isValidDayOfWeek(day) && Number(week) >= 1 && Number(week) <= 5);
6263
+ return (this._isValidDayOfWeek(day) && Number(week) >= 1 && Number(week) <= 5);
6264
6264
  }
6265
6265
  // Standard day names: SUN, MON, TUE, etc.
6266
- if (this.isValidDayOfWeek(value))
6266
+ if (this._isValidDayOfWeek(value))
6267
6267
  return true;
6268
6268
  }
6269
6269
  // Handle month names (JAN, FEB, MAR, etc.) for month field
6270
6270
  // Extended cron allows both numeric (1-12) and named month values
6271
- if (type === 'month' && this.isValidMonthName(value))
6271
+ if (type === 'month' && this._isValidMonthName(value))
6272
6272
  return true;
6273
6273
  // Validate numeric values within the specified range
6274
6274
  // This covers standard numeric scheduling (minutes: 0-59, hours: 0-23, etc.)
@@ -6292,23 +6292,23 @@ class CronValidationService {
6292
6292
  * @param type - Field type for context-aware validation (dayOfWeek gets special handling)
6293
6293
  * @returns boolean - True if the range-step pattern is valid for EventBridge
6294
6294
  */
6295
- validateRangeWithStep(start, end, step, min, max, type) {
6295
+ _validateRangeWithStep(start, end, step, min, max, type) {
6296
6296
  // Validate step value - must be positive integer
6297
6297
  const stepNum = Number(step);
6298
6298
  if (isNaN(stepNum) || stepNum <= 0)
6299
6299
  return false;
6300
6300
  // Special handling for day-of-week ranges (supports named days like MON-FRI)
6301
- // Extended cron allows both numeric (1-7) and named (SUN-SAT) day ranges
6301
+ // Extended cron allows both numeric (1-7) and named day ranges
6302
6302
  if (type === 'dayOfWeek') {
6303
- return this.isValidDayOfWeek(start) && this.isValidDayOfWeek(end);
6303
+ return this._isValidDayOfWeek(start) && this._isValidDayOfWeek(end);
6304
6304
  }
6305
6305
  // Special handling for month ranges (supports named months like JAN-DEC)
6306
- // Extended cron allows both numeric (1-12) and named (JAN-DEC) month ranges
6306
+ // Extended cron allows both numeric (1-12) and named month ranges
6307
6307
  if (type === 'month') {
6308
- const startValid = this.isValidMonthName(start) ||
6309
- this.validateSingleValue(start, min, max, type);
6310
- const endValid = this.isValidMonthName(end) ||
6311
- this.validateSingleValue(end, min, max, type);
6308
+ const startValid = this._isValidMonthName(start) ||
6309
+ this._validateSingleValue(start, min, max, type);
6310
+ const endValid = this._isValidMonthName(end) ||
6311
+ this._validateSingleValue(end, min, max, type);
6312
6312
  return startValid && endValid;
6313
6313
  }
6314
6314
  // Validate numeric ranges for other field types
@@ -6340,19 +6340,19 @@ class CronValidationService {
6340
6340
  * @param type - Field type for validation context (affects named value handling)
6341
6341
  * @returns boolean - True if the range pattern is valid for EventBridge
6342
6342
  */
6343
- validateSimpleRange(start, end, min, max, type) {
6343
+ _validateSimpleRange(start, end, min, max, type) {
6344
6344
  // Handle day-of-week ranges with named values (MON-FRI, SUN-SAT, etc.)
6345
6345
  // Extended cron supports both numeric (1-7) and named day ranges
6346
6346
  if (type === 'dayOfWeek') {
6347
- return this.isValidDayOfWeek(start) && this.isValidDayOfWeek(end);
6347
+ return this._isValidDayOfWeek(start) && this._isValidDayOfWeek(end);
6348
6348
  }
6349
6349
  // Handle month ranges with named values (JAN-DEC, etc.)
6350
6350
  // Extended cron allows both numeric (1-12) and named month ranges
6351
6351
  if (type === 'month') {
6352
- const startValid = this.isValidMonthName(start) ||
6353
- this.validateSingleValue(start, min, max, type);
6354
- const endValid = this.isValidMonthName(end) ||
6355
- this.validateSingleValue(end, min, max, type);
6352
+ const startValid = this._isValidMonthName(start) ||
6353
+ this._validateSingleValue(start, min, max, type);
6354
+ const endValid = this._isValidMonthName(end) ||
6355
+ this._validateSingleValue(end, min, max, type);
6356
6356
  return startValid && endValid;
6357
6357
  }
6358
6358
  // Validate numeric ranges for other field types
@@ -6384,7 +6384,7 @@ class CronValidationService {
6384
6384
  * @param type - Field type for validation context
6385
6385
  * @returns boolean - True if the step pattern is valid for EventBridge
6386
6386
  */
6387
- validateStepField(start, step, min, max, type) {
6387
+ _validateStepField(start, step, min, max, type) {
6388
6388
  // Validate step value - must be positive integer
6389
6389
  const stepNum = Number(step);
6390
6390
  if (isNaN(stepNum) || stepNum <= 0)
@@ -6396,7 +6396,7 @@ class CronValidationService {
6396
6396
  // Handle named day values for day-of-week step patterns
6397
6397
  // Extended cron supports patterns like "MON/2" (every 2nd occurrence starting Monday)
6398
6398
  if (type === 'dayOfWeek') {
6399
- return this.isValidDayOfWeek(start);
6399
+ return this._isValidDayOfWeek(start);
6400
6400
  }
6401
6401
  // Validate numeric start values - must be within field's valid range
6402
6402
  // Extended cron requires the starting point to be a valid value for the field type
@@ -6406,19 +6406,19 @@ class CronValidationService {
6406
6406
  /**
6407
6407
  * Validates day-of-month field with special characters.
6408
6408
  */
6409
- validateDayOfMonth(dayOfMonth) {
6410
- return this.validateComplexField(dayOfMonth, 1, 31, 'dayOfMonth');
6409
+ _validateDayOfMonth(dayOfMonth) {
6410
+ return this._validateComplexField(dayOfMonth, 1, 31, 'dayOfMonth');
6411
6411
  }
6412
6412
  /**
6413
6413
  * Validates month field with support for named months.
6414
6414
  */
6415
- validateMonth(month) {
6416
- return this.validateComplexField(month, 1, 12, 'month');
6415
+ _validateMonth(month) {
6416
+ return this._validateComplexField(month, 1, 12, 'month');
6417
6417
  }
6418
6418
  /**
6419
6419
  * Validates day-of-week field with support for named days and special characters.
6420
6420
  */
6421
- validateDayOfWeek(dayOfWeek) {
6421
+ _validateDayOfWeek(dayOfWeek) {
6422
6422
  // Check for multiple hash expressions in day-of-week field
6423
6423
  if (dayOfWeek.includes(',') && dayOfWeek.includes('#')) {
6424
6424
  const parts = dayOfWeek.split(',');
@@ -6428,13 +6428,13 @@ class CronValidationService {
6428
6428
  return false;
6429
6429
  }
6430
6430
  }
6431
- return this.validateComplexField(dayOfWeek, 1, 7, 'dayOfWeek');
6431
+ return this._validateComplexField(dayOfWeek, 1, 7, 'dayOfWeek');
6432
6432
  }
6433
6433
  /**
6434
6434
  * Validates mutual exclusivity rule for day-of-month and day-of-week fields.
6435
6435
  * Extended cron requires that one of these fields must be a wildcard.
6436
6436
  */
6437
- validateDayMutualExclusivity(dayOfMonth, dayOfWeek) {
6437
+ _validateDayMutualExclusivity(dayOfMonth, dayOfWeek) {
6438
6438
  // Both cannot be specific values - one must be * or ?
6439
6439
  const dayOfMonthIsWildcard = dayOfMonth === '*' || dayOfMonth === '?';
6440
6440
  const dayOfWeekIsWildcard = dayOfWeek === '*' || dayOfWeek === '?';
@@ -6443,7 +6443,7 @@ class CronValidationService {
6443
6443
  /**
6444
6444
  * Checks if a value represents a valid day of the week (numeric or named).
6445
6445
  */
6446
- isValidDayOfWeek(day) {
6446
+ _isValidDayOfWeek(day) {
6447
6447
  const validDays = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT'];
6448
6448
  if (validDays.includes(day.toUpperCase()))
6449
6449
  return true;
@@ -6453,7 +6453,7 @@ class CronValidationService {
6453
6453
  /**
6454
6454
  * Checks if a value represents a valid month name.
6455
6455
  */
6456
- isValidMonthName(month) {
6456
+ _isValidMonthName(month) {
6457
6457
  const validMonths = [
6458
6458
  'JAN',
6459
6459
  'FEB',
@@ -6470,15 +6470,40 @@ class CronValidationService {
6470
6470
  ];
6471
6471
  return validMonths.includes(month.toUpperCase());
6472
6472
  }
6473
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CronValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6474
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CronValidationService, providedIn: 'root' }); }
6473
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsCronValidationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6474
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsCronValidationService, providedIn: 'root' }); }
6475
6475
  }
6476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CronValidationService, decorators: [{
6476
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsCronValidationService, decorators: [{
6477
6477
  type: Injectable,
6478
6478
  args: [{
6479
6479
  providedIn: 'root'
6480
6480
  }]
6481
6481
  }] });
6482
+ /**
6483
+ * Injection token for `CpsCronValidationService`.
6484
+ *
6485
+ * Always inject this token instead of `CpsCronValidationService` directly.
6486
+ * This allows consumer applications to override or disable cron validation by
6487
+ * providing an alternative implementation via `providers`.
6488
+ *
6489
+ * @example
6490
+ * // Inject in a component or service
6491
+ * private readonly cronValidation = inject(CPS_CRON_VALIDATION_SERVICE);
6492
+ *
6493
+ * @example
6494
+ * // Override with a custom implementation
6495
+ * providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useClass: MyCustomCronValidationService }]
6496
+ *
6497
+ * @example
6498
+ * // Disable cron validation entirely
6499
+ * providers: [{ provide: CPS_CRON_VALIDATION_SERVICE, useValue: null }]
6500
+ *
6501
+ * @group Tokens
6502
+ */
6503
+ const CPS_CRON_VALIDATION_SERVICE = new InjectionToken('CPS_CRON_VALIDATION_SERVICE', {
6504
+ providedIn: 'root',
6505
+ factory: () => inject(CpsCronValidationService)
6506
+ });
6482
6507
 
6483
6508
  /**
6484
6509
  * CpsTimepickerComponent allows to pick a specific time from a set of available options or input it manually.
@@ -6594,7 +6619,7 @@ class CpsTimepickerComponent {
6594
6619
  this.secondsError = '';
6595
6620
  this._value = undefined;
6596
6621
  // eslint-disable-next-line @typescript-eslint/no-empty-function
6597
- this.onChange = (event) => { };
6622
+ this.onChange = (_event) => { };
6598
6623
  // eslint-disable-next-line @typescript-eslint/no-empty-function
6599
6624
  this.onTouched = () => { };
6600
6625
  if (this._control) {
@@ -6631,7 +6656,7 @@ class CpsTimepickerComponent {
6631
6656
  this.onTouched = fn;
6632
6657
  }
6633
6658
  // eslint-disable-next-line @typescript-eslint/no-empty-function
6634
- setDisabledState(disabled) { }
6659
+ setDisabledState(_disabled) { }
6635
6660
  writeValue(value) {
6636
6661
  this.value = value;
6637
6662
  }
@@ -7563,7 +7588,7 @@ class CpsSchedulerComponent {
7563
7588
  ];
7564
7589
  this._fb = inject(FormBuilder);
7565
7590
  this._cdr = inject(ChangeDetectorRef);
7566
- this._cronValidationService = inject(CronValidationService);
7591
+ this._cronValidationService = inject(CPS_CRON_VALIDATION_SERVICE);
7567
7592
  this.activeScheduleType = 'Not set';
7568
7593
  this.selectOptions = this._getSelectOptions();
7569
7594
  this.timeZoneOptions = timeZones.map((tz) => ({ label: tz, value: tz }));
@@ -7739,7 +7764,7 @@ class CpsSchedulerComponent {
7739
7764
  * @returns boolean - True if the cron expression is valid
7740
7765
  */
7741
7766
  _isValidCron(cron) {
7742
- return this._cronValidationService.isValidCron(cron, this.showNotSet);
7767
+ return (this._cronValidationService?.isValidCron(cron, this.showNotSet) ?? true);
7743
7768
  }
7744
7769
  _validateAdvancedExpr(c) {
7745
7770
  const cron = c.value;
@@ -8344,7 +8369,7 @@ class CpsSwitchComponent {
8344
8369
  this.valueChanged = new EventEmitter();
8345
8370
  this._value = false;
8346
8371
  // eslint-disable-next-line @typescript-eslint/no-empty-function
8347
- this.onChange = (event) => { };
8372
+ this.onChange = (_event) => { };
8348
8373
  // eslint-disable-next-line @typescript-eslint/no-empty-function
8349
8374
  this.onTouched = () => { };
8350
8375
  if (this._control) {
@@ -8372,7 +8397,7 @@ class CpsSwitchComponent {
8372
8397
  this.valueChanged.emit(value);
8373
8398
  }
8374
8399
  // eslint-disable-next-line @typescript-eslint/no-empty-function
8375
- setDisabledState(disabled) { }
8400
+ setDisabledState(_disabled) { }
8376
8401
  focus() {
8377
8402
  this._elementRef?.nativeElement?.querySelector('input')?.focus();
8378
8403
  }
@@ -11078,7 +11103,7 @@ class CpsTagComponent {
11078
11103
  this.classesList = [];
11079
11104
  this._value = false;
11080
11105
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11081
- this.onChange = (event) => { };
11106
+ this.onChange = (_event) => { };
11082
11107
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11083
11108
  this.onTouched = () => { };
11084
11109
  if (this._control) {
@@ -11283,7 +11308,7 @@ class CpsTextareaComponent {
11283
11308
  this._value = '';
11284
11309
  this.cvtWidth = '';
11285
11310
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11286
- this.onChange = (event) => { };
11311
+ this.onChange = (_event) => { };
11287
11312
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11288
11313
  this.onTouched = () => { };
11289
11314
  if (this._control) {
@@ -11356,7 +11381,7 @@ class CpsTextareaComponent {
11356
11381
  this._updateValue('');
11357
11382
  }
11358
11383
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11359
- setDisabledState(disabled) { }
11384
+ setDisabledState(_disabled) { }
11360
11385
  onBlur() {
11361
11386
  this._checkErrors();
11362
11387
  this.blurred.emit();
@@ -11611,7 +11636,7 @@ class CpsBaseTreeDropdownComponent {
11611
11636
  this.isAutocomplete = false;
11612
11637
  this.boxWidth = 0;
11613
11638
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11614
- this.onChange = (event) => { };
11639
+ this.onChange = (_event) => { };
11615
11640
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11616
11641
  this.onTouched = () => { };
11617
11642
  if (this.control) {
@@ -11680,7 +11705,7 @@ class CpsBaseTreeDropdownComponent {
11680
11705
  }
11681
11706
  }
11682
11707
  // eslint-disable-next-line @typescript-eslint/no-empty-function
11683
- setDisabledState(disabled) { }
11708
+ setDisabledState(_disabled) { }
11684
11709
  onBlur() {
11685
11710
  this._checkErrors();
11686
11711
  this.blurred.emit();
@@ -12290,7 +12315,7 @@ class CpsTreeAutocompleteComponent extends CpsBaseTreeDropdownComponent {
12290
12315
  return;
12291
12316
  if (this.treeSelection?.length) {
12292
12317
  if (this.backspaceClickedOnce) {
12293
- this.treeSelection = this.treeSelection.filter((v, index) => index !== this.treeSelection.length - 1);
12318
+ this.treeSelection = this.treeSelection.filter((_v, index) => index !== this.treeSelection.length - 1);
12294
12319
  this.updateValue(this.treeSelectionToValue(this.treeSelection));
12295
12320
  this.backspaceClickedOnce = false;
12296
12321
  }
@@ -15761,6 +15786,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
15761
15786
  args: [DOCUMENT]
15762
15787
  }] }] });
15763
15788
 
15789
+ /**
15790
+ * CpsRootFontSizeService tracks the application's current root font size.
15791
+ *
15792
+ * The service uses a ResizeObserver strategy to reliably detect root font-size changes:
15793
+ *
15794
+ * **Sentinel element** (`<div style="width:1rem;height:0">`) — its pixel width
15795
+ * mirrors `1rem`. Any root font-size change — caused by CSS class toggles,
15796
+ * stylesheet rules, direct JS assignment, or viewport resize (e.g.
15797
+ * `font-size: 1.5vw`) — changes the sentinel's computed width, firing the
15798
+ * observer.
15799
+ * The cached value is stored in a signal and is only updated when the actual
15800
+ * font-size value changes, preventing spurious updates.
15801
+ *
15802
+ * In microfrontend environments the sentinel element is keyed by a known DOM
15803
+ * attribute (`data-cps-root-font-size-sentinel`) and reused if already present,
15804
+ * so only one sentinel node exists per document regardless of how many
15805
+ * instances of this service are created. The sentinel is intentionally never
15806
+ * removed from the DOM — it is a lightweight, invisible element and removing it
15807
+ * could silently break any other live service instance still observing it.
15808
+ *
15809
+ * Only active in browser environments. Under SSR the `fontSize` signal is
15810
+ * initialized to `16` (the standard browser default) and no DOM observers are created.
15811
+ *
15812
+ * Prefer injecting {@link CPS_ROOT_FONT_SIZE_SERVICE} over this class directly
15813
+ * to allow consumer applications to override the behavior.
15814
+ *
15815
+ * @example
15816
+ * ```typescript
15817
+ * class MyComponent {
15818
+ * private fontSizeService = inject(CPS_ROOT_FONT_SIZE_SERVICE);
15819
+ * readonly fontSize = this.fontSizeService?.fontSize;
15820
+ * }
15821
+ * ```
15822
+ */
15823
+ class CpsRootFontSizeService {
15824
+ static { this._SENTINEL_ATTR = 'data-cps-root-font-size-sentinel'; }
15825
+ constructor() {
15826
+ this._document = inject(DOCUMENT);
15827
+ this._platformId = inject(PLATFORM_ID);
15828
+ this._fontSize = signal(isPlatformBrowser(this._platformId) ? this._readRootFontSize() : 16, ...(ngDevMode ? [{ debugName: "_fontSize" }] : /* istanbul ignore next */ []));
15829
+ this._sentinelObserver = null;
15830
+ /** Reactive signal containing the current root font size in pixels. */
15831
+ this.fontSize = this._fontSize.asReadonly();
15832
+ if (!isPlatformBrowser(this._platformId))
15833
+ return;
15834
+ this._setupObservers();
15835
+ }
15836
+ ngOnDestroy() {
15837
+ this._sentinelObserver?.disconnect();
15838
+ this._sentinelObserver = null;
15839
+ }
15840
+ _setupObservers() {
15841
+ // Reuse an existing sentinel if another service instance already created one.
15842
+ let sentinel = this._document.querySelector(`[${CpsRootFontSizeService._SENTINEL_ATTR}]`);
15843
+ if (!sentinel) {
15844
+ sentinel = this._document.createElement('div');
15845
+ sentinel.setAttribute(CpsRootFontSizeService._SENTINEL_ATTR, '');
15846
+ Object.assign(sentinel.style, {
15847
+ position: 'absolute',
15848
+ width: '1rem',
15849
+ height: '0',
15850
+ visibility: 'hidden',
15851
+ pointerEvents: 'none',
15852
+ userSelect: 'none',
15853
+ top: '0',
15854
+ left: '0'
15855
+ });
15856
+ this._document.documentElement.appendChild(sentinel);
15857
+ }
15858
+ this._sentinelObserver = new ResizeObserver(() => this._refresh());
15859
+ this._sentinelObserver.observe(sentinel);
15860
+ }
15861
+ _refresh() {
15862
+ const newSize = this._readRootFontSize();
15863
+ if (newSize !== this._fontSize()) {
15864
+ this._fontSize.set(newSize);
15865
+ }
15866
+ }
15867
+ _readRootFontSize() {
15868
+ return parseFloat(getComputedStyle(this._document.documentElement).fontSize);
15869
+ }
15870
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsRootFontSizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
15871
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsRootFontSizeService, providedIn: 'root' }); }
15872
+ }
15873
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CpsRootFontSizeService, decorators: [{
15874
+ type: Injectable,
15875
+ args: [{
15876
+ providedIn: 'root'
15877
+ }]
15878
+ }], ctorParameters: () => [] });
15879
+ /**
15880
+ * Injection token for the root font size service.
15881
+ *
15882
+ * By default it resolves to the singleton {@link CpsRootFontSizeService}.
15883
+ * Consumer applications can override it to:
15884
+ * - Supply a custom subclass
15885
+ * - Provide `null` to disable dynamic tracking entirely
15886
+ *
15887
+ * @example Disable dynamic tracking:
15888
+ * ```typescript
15889
+ * providers: [
15890
+ * { provide: CPS_ROOT_FONT_SIZE_SERVICE, useValue: null }
15891
+ * ]
15892
+ * ```
15893
+ */
15894
+ const CPS_ROOT_FONT_SIZE_SERVICE = new InjectionToken('CpsRootFontSizeService', {
15895
+ providedIn: 'root',
15896
+ factory: () => inject(CpsRootFontSizeService)
15897
+ });
15898
+
15764
15899
  /**
15765
15900
  * CpsThemeService manages application theming including dark mode support.
15766
15901
  *
@@ -15958,14 +16093,13 @@ class CpsThemeService {
15958
16093
  return 'compact';
15959
16094
  }
15960
16095
  // TODO: Use as fallback in getInitialTheme() once dark mode is fully supported across all components.
15961
- getSystemTheme() {
15962
- const win = this.document.defaultView;
15963
- if (!win?.matchMedia)
15964
- return 'light';
15965
- return win.matchMedia('(prefers-color-scheme: dark)').matches
15966
- ? 'dark'
15967
- : 'light';
15968
- }
16096
+ // private getSystemTheme(): CpsTheme {
16097
+ // const win = this.document.defaultView;
16098
+ // if (!win?.matchMedia) return 'light';
16099
+ // return win.matchMedia('(prefers-color-scheme: dark)').matches
16100
+ // ? 'dark'
16101
+ // : 'light';
16102
+ // }
15969
16103
  // TODO: Enable system preference fallback once dark mode is fully supported across all components.
15970
16104
  watchSystemTheme() {
15971
16105
  const win = this.document.defaultView;
@@ -16009,5 +16143,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
16009
16143
  * Generated bundle index. Do not edit.
16010
16144
  */
16011
16145
 
16012
- 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 };
16146
+ 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 };
16013
16147
  //# sourceMappingURL=cps-ui-kit.mjs.map