@dereekb/dbx-form 13.6.16 → 13.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-form",
3
- "version": "13.6.16",
3
+ "version": "13.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "21.2.3",
6
6
  "@angular/common": "21.2.3",
@@ -10,12 +10,13 @@
10
10
  "@angular/material-date-fns-adapter": "21.2.3",
11
11
  "@angular/platform-browser": "21.2.3",
12
12
  "@bobbyquantum/ngx-editor": "21.0.0",
13
- "@dereekb/date": "13.6.16",
14
- "@dereekb/dbx-core": "13.6.16",
15
- "@dereekb/dbx-web": "13.6.16",
16
- "@dereekb/model": "13.6.16",
17
- "@dereekb/rxjs": "13.6.16",
18
- "@dereekb/util": "13.6.16",
13
+ "@dereekb/date": "13.7.0",
14
+ "@dereekb/dbx-core": "13.7.0",
15
+ "@dereekb/dbx-web": "13.7.0",
16
+ "@dereekb/model": "13.7.0",
17
+ "@dereekb/rxjs": "13.7.0",
18
+ "@dereekb/util": "13.7.0",
19
+ "@dereekb/vitest": "13.7.0",
19
20
  "@ng-web-apis/geolocation": "^5.1.0",
20
21
  "@ngbracket/ngx-layout": "^21.0.0",
21
22
  "@ngrx/component-store": "^21.0.0",
@@ -638,26 +638,32 @@ declare const INVALID_PHONE_NUMBER_EXTENSION_MESSAGE: {
638
638
  * Returns a validation message indicating the duration is below the minimum allowed.
639
639
  *
640
640
  * @param err - The validation error object containing `min` and `actual` values.
641
- * @param field - The Formly field configuration.
641
+ * @param err.min - The minimum allowed duration value.
642
+ * @param err.actual - The actual duration value that failed validation.
643
+ * @param err.unit - The duration unit label (e.g. "minutes", "hours").
644
+ * @param _field - The Formly field configuration.
642
645
  * @returns A human-readable validation message string.
643
646
  */
644
647
  declare function durationMinValidationMessage(err: {
645
648
  min: number;
646
649
  actual: number;
647
650
  unit: string;
648
- }, field: FieldTypeConfig): string;
651
+ }, _field: FieldTypeConfig): string;
649
652
  /**
650
653
  * Returns a validation message indicating the duration exceeds the maximum allowed.
651
654
  *
652
655
  * @param err - The validation error object containing `max`, `actual`, and `unit` values.
653
- * @param field - The Formly field configuration.
656
+ * @param err.max - The maximum allowed duration value.
657
+ * @param err.actual - The actual duration value that failed validation.
658
+ * @param err.unit - The duration unit label (e.g. "minutes", "hours").
659
+ * @param _field - The Formly field configuration.
654
660
  * @returns A human-readable validation message string.
655
661
  */
656
662
  declare function durationMaxValidationMessage(err: {
657
663
  max: number;
658
664
  actual: number;
659
665
  unit: string;
660
- }, field: FieldTypeConfig): string;
666
+ }, _field: FieldTypeConfig): string;
661
667
  /**
662
668
  * Validation message option for duration minimum violations.
663
669
  */
@@ -3944,6 +3950,8 @@ declare class DbxTimeDurationFieldComponent extends FieldType$1<FieldTypeConfig<
3944
3950
  /**
3945
3951
  * Units used for decomposing/displaying duration text.
3946
3952
  * Includes 'ms' if the smallest picker unit would leave a remainder.
3953
+ *
3954
+ * @returns The list of time units used for display, always including 'ms'.
3947
3955
  */
3948
3956
  get displayUnits(): TimeUnit[];
3949
3957
  ngOnInit(): void;
@@ -3953,6 +3961,8 @@ declare class DbxTimeDurationFieldComponent extends FieldType$1<FieldTypeConfig<
3953
3961
  onTextBlur(): void;
3954
3962
  /**
3955
3963
  * Called when Enter is pressed in the text input.
3964
+ *
3965
+ * @param event - The keyboard event from pressing Enter; prevented to avoid form submission.
3956
3966
  */
3957
3967
  onTextEnter(event: Event): void;
3958
3968
  /**
@@ -3966,10 +3976,15 @@ declare class DbxTimeDurationFieldComponent extends FieldType$1<FieldTypeConfig<
3966
3976
  private _parseAndSync;
3967
3977
  /**
3968
3978
  * Converts duration data to the output value and sets it on the form control.
3979
+ *
3980
+ * @param data - The decomposed duration data to convert and emit.
3969
3981
  */
3970
3982
  private _syncOutputFromDurationData;
3971
3983
  /**
3972
3984
  * Converts an output value (number, HoursAndMinutes, or TimeDurationData) to milliseconds.
3985
+ *
3986
+ * @param value - The output value to convert, interpreted according to the current {@link valueMode}.
3987
+ * @returns The equivalent duration in milliseconds.
3973
3988
  */
3974
3989
  private _outputValueToMilliseconds;
3975
3990
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxTimeDurationFieldComponent, never>;
@@ -4107,6 +4122,7 @@ declare class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective
4107
4122
  * When carryOver is enabled, normalizes the data by converting to total milliseconds
4108
4123
  * and decomposing back into the picker's units (e.g., 60s becomes 1m, 7d becomes 1w).
4109
4124
  *
4125
+ * @param data - The duration data to potentially normalize.
4110
4126
  * @returns Normalized or original data
4111
4127
  */
4112
4128
  private _normalizeIfCarryOver;
@@ -4125,6 +4141,8 @@ declare class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective
4125
4141
  onHoldStart(action: 'increment' | 'decrement', unit: TimeUnit, event: Event): void;
4126
4142
  /**
4127
4143
  * Returns the current step based on whether shift is held.
4144
+ *
4145
+ * @returns 2 if shift is held, 1 otherwise.
4128
4146
  */
4129
4147
  private get _currentStep();
4130
4148
  /**
@@ -4141,7 +4159,10 @@ declare class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective
4141
4159
  /**
4142
4160
  * Executes an increment or decrement action if allowed.
4143
4161
  *
4144
- * @returns True if the action was performed
4162
+ * @param action - Whether to increment or decrement the value.
4163
+ * @param unit - The time unit to modify (e.g., 'h', 'min', 's').
4164
+ * @param step - The number of units to add or subtract per action.
4165
+ * @returns True if the action was performed.
4145
4166
  */
4146
4167
  private _doAction;
4147
4168
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxDurationPickerPopoverComponent, never>;