@dereekb/dbx-form 13.6.17 → 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.
@@ -730,7 +730,7 @@ class DbxFormSourceDirective {
730
730
  subscription = dbxFormSourceObservableFromStream(guardedStream$, formSource, mode).subscribe((x) => {
731
731
  isSettingValue = true;
732
732
  this.form.setValue(x);
733
- Promise.resolve().then(() => (isSettingValue = false));
733
+ void Promise.resolve().then(() => (isSettingValue = false));
734
734
  });
735
735
  }
736
736
  this._effectSub.setSub(subscription);
@@ -1022,20 +1022,26 @@ const INVALID_PHONE_NUMBER_EXTENSION_MESSAGE = { name: 'validatePhoneNumberExten
1022
1022
  * Returns a validation message indicating the duration is below the minimum allowed.
1023
1023
  *
1024
1024
  * @param err - The validation error object containing `min` and `actual` values.
1025
- * @param field - The Formly field configuration.
1025
+ * @param err.min - The minimum allowed duration value.
1026
+ * @param err.actual - The actual duration value that failed validation.
1027
+ * @param err.unit - The duration unit label (e.g. "minutes", "hours").
1028
+ * @param _field - The Formly field configuration.
1026
1029
  * @returns A human-readable validation message string.
1027
1030
  */
1028
- function durationMinValidationMessage(err, field) {
1031
+ function durationMinValidationMessage(err, _field) {
1029
1032
  return `Duration must be at least ${err.min} ${err.unit} (currently ${err.actual} ${err.unit}).`;
1030
1033
  }
1031
1034
  /**
1032
1035
  * Returns a validation message indicating the duration exceeds the maximum allowed.
1033
1036
  *
1034
1037
  * @param err - The validation error object containing `max`, `actual`, and `unit` values.
1035
- * @param field - The Formly field configuration.
1038
+ * @param err.max - The maximum allowed duration value.
1039
+ * @param err.actual - The actual duration value that failed validation.
1040
+ * @param err.unit - The duration unit label (e.g. "minutes", "hours").
1041
+ * @param _field - The Formly field configuration.
1036
1042
  * @returns A human-readable validation message string.
1037
1043
  */
1038
- function durationMaxValidationMessage(err, field) {
1044
+ function durationMaxValidationMessage(err, _field) {
1039
1045
  return `Duration must be at most ${err.max} ${err.unit} (currently ${err.actual} ${err.unit}).`;
1040
1046
  }
1041
1047
  /**
@@ -6740,6 +6746,7 @@ class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective {
6740
6746
  * When carryOver is enabled, normalizes the data by converting to total milliseconds
6741
6747
  * and decomposing back into the picker's units (e.g., 60s becomes 1m, 7d becomes 1w).
6742
6748
  *
6749
+ * @param data - The duration data to potentially normalize.
6743
6750
  * @returns Normalized or original data
6744
6751
  */
6745
6752
  _normalizeIfCarryOver(data) {
@@ -6787,6 +6794,8 @@ class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective {
6787
6794
  }
6788
6795
  /**
6789
6796
  * Returns the current step based on whether shift is held.
6797
+ *
6798
+ * @returns 2 if shift is held, 1 otherwise.
6790
6799
  */
6791
6800
  get _currentStep() {
6792
6801
  return this._shiftHeld ? 2 : 1;
@@ -6820,7 +6829,10 @@ class DbxDurationPickerPopoverComponent extends AbstractPopoverDirective {
6820
6829
  /**
6821
6830
  * Executes an increment or decrement action if allowed.
6822
6831
  *
6823
- * @returns True if the action was performed
6832
+ * @param action - Whether to increment or decrement the value.
6833
+ * @param unit - The time unit to modify (e.g., 'h', 'min', 's').
6834
+ * @param step - The number of units to add or subtract per action.
6835
+ * @returns True if the action was performed.
6824
6836
  */
6825
6837
  _doAction(action, unit, step) {
6826
6838
  if (action === 'increment' && this.canIncrement(unit)) {
@@ -6872,6 +6884,8 @@ class DbxTimeDurationFieldComponent extends FieldType$1 {
6872
6884
  /**
6873
6885
  * Units used for decomposing/displaying duration text.
6874
6886
  * Includes 'ms' if the smallest picker unit would leave a remainder.
6887
+ *
6888
+ * @returns The list of time units used for display, always including 'ms'.
6875
6889
  */
6876
6890
  get displayUnits() {
6877
6891
  const units = [...this.pickerUnits];
@@ -6910,6 +6924,8 @@ class DbxTimeDurationFieldComponent extends FieldType$1 {
6910
6924
  }
6911
6925
  /**
6912
6926
  * Called when Enter is pressed in the text input.
6927
+ *
6928
+ * @param event - The keyboard event from pressing Enter; prevented to avoid form submission.
6913
6929
  */
6914
6930
  onTextEnter(event) {
6915
6931
  event.preventDefault();
@@ -6974,6 +6990,8 @@ class DbxTimeDurationFieldComponent extends FieldType$1 {
6974
6990
  }
6975
6991
  /**
6976
6992
  * Converts duration data to the output value and sets it on the form control.
6993
+ *
6994
+ * @param data - The decomposed duration data to convert and emit.
6977
6995
  */
6978
6996
  _syncOutputFromDurationData(data) {
6979
6997
  const ms = durationDataToMilliseconds(data);
@@ -6994,6 +7012,9 @@ class DbxTimeDurationFieldComponent extends FieldType$1 {
6994
7012
  }
6995
7013
  /**
6996
7014
  * Converts an output value (number, HoursAndMinutes, or TimeDurationData) to milliseconds.
7015
+ *
7016
+ * @param value - The output value to convert, interpreted according to the current {@link valueMode}.
7017
+ * @returns The equivalent duration in milliseconds.
6997
7018
  */
6998
7019
  _outputValueToMilliseconds(value) {
6999
7020
  if (this.valueMode === 'duration_data') {