@dereekb/dbx-form 13.11.1 → 13.11.3

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.11.1",
3
+ "version": "13.11.3",
4
4
  "sideEffects": [
5
5
  "*.scss",
6
6
  "*.css"
@@ -14,13 +14,13 @@
14
14
  "@angular/material-date-fns-adapter": "21.2.9",
15
15
  "@angular/platform-browser": "21.2.11",
16
16
  "@bobbyquantum/ngx-editor": "21.0.0",
17
- "@dereekb/date": "13.11.1",
18
- "@dereekb/dbx-core": "13.11.1",
19
- "@dereekb/dbx-web": "13.11.1",
20
- "@dereekb/model": "13.11.1",
21
- "@dereekb/rxjs": "13.11.1",
22
- "@dereekb/util": "13.11.1",
23
- "@dereekb/vitest": "13.11.1",
17
+ "@dereekb/date": "13.11.3",
18
+ "@dereekb/dbx-core": "13.11.3",
19
+ "@dereekb/dbx-web": "13.11.3",
20
+ "@dereekb/model": "13.11.3",
21
+ "@dereekb/rxjs": "13.11.3",
22
+ "@dereekb/util": "13.11.3",
23
+ "@dereekb/vitest": "13.11.3",
24
24
  "@ng-forge/dynamic-forms": "0.9.0-next.6",
25
25
  "@ng-forge/dynamic-forms-material": "0.9.0-next.6",
26
26
  "@ng-web-apis/geolocation": "^5.2.0",
@@ -468,6 +468,11 @@ declare function stripForgeInternalKeys<T>(value: T): T;
468
468
  * from a form value object. Also removes keys whose values become empty objects
469
469
  * `{}` after recursive stripping.
470
470
  *
471
+ * Arrays are recursed into so that empties inside nested objects are stripped,
472
+ * but array length and item indices are preserved — primitive empty values
473
+ * (e.g. `NaN`, `''`) inside an array stay in place, since shifting indices would
474
+ * change the semantics of chip/list-style array fields.
475
+ *
471
476
  * This normalizes ng-forge output to match ngx-formly behavior, where the model
472
477
  * only includes keys that have been explicitly set by the user.
473
478
  *
@@ -478,6 +483,9 @@ declare function stripForgeInternalKeys<T>(value: T): T;
478
483
  *
479
484
  * stripEmptyForgeValues({ section: { a: "", b: "" } })
480
485
  * // → {}
486
+ *
487
+ * stripEmptyForgeValues({ items: [{ amount: NaN, name: 'a' }, { amount: 5 }] })
488
+ * // → { items: [{ name: 'a' }, { amount: 5 }] }
481
489
  * ```
482
490
  *
483
491
  * @param value - The form value object to clean
@@ -510,7 +518,7 @@ declare class DbxForgeFormContext<T = unknown> implements DbxMutableForm<T>, OnD
510
518
  */
511
519
  stripInternalKeys: boolean;
512
520
  /**
513
- * When true (default), keys whose values are empty (`null`, `undefined`, or `""`)
521
+ * When true (default), keys whose values are empty (`null`, `undefined`, `""`, or `NaN`)
514
522
  * are stripped from the form value before emission. This normalizes ng-forge output
515
523
  * to match ngx-formly behavior, where the model only includes keys that have been
516
524
  * explicitly set by the user.
@@ -1285,6 +1293,7 @@ interface DbxForgeFieldFunctionConfig<C extends DbxForgeFieldFunctionDef<any>> {
1285
1293
  * })
1286
1294
  * });
1287
1295
  * ```
1296
+ * @__NO_SIDE_EFFECTS__
1288
1297
  */
1289
1298
  declare function dbxForgeFieldFunction<C extends DbxForgeFieldFunctionDef<F>, F extends FieldDef<any> = ExtractDbxForgeFieldDef<C>>(config: DbxForgeFieldFunctionConfig<C>): DbxForgeFieldFunction<C, F>;
1290
1299
  /**
@@ -2462,6 +2471,7 @@ declare enum DbxDateTimeValueMode {
2462
2471
  * const parser = dbxDateTimeInputValueParseFactory(DbxDateTimeValueMode.DATE_STRING, timezoneInstance);
2463
2472
  * const date = parser('2024-01-15T10:00:00Z');
2464
2473
  * ```
2474
+ * @__NO_SIDE_EFFECTS__
2465
2475
  */
2466
2476
  declare function dbxDateTimeInputValueParseFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (date: Maybe<Date | string | number>) => Maybe<Date>;
2467
2477
  /**
@@ -2479,6 +2489,7 @@ declare function dbxDateTimeInputValueParseFactory(mode: DbxDateTimeValueMode, t
2479
2489
  * const formatter = dbxDateTimeOutputValueFactory(DbxDateTimeValueMode.DAY_STRING, null);
2480
2490
  * const dayString = formatter(new Date()); // e.g., '2024-01-15'
2481
2491
  * ```
2492
+ * @__NO_SIDE_EFFECTS__
2482
2493
  */
2483
2494
  declare function dbxDateTimeOutputValueFactory(mode: DbxDateTimeValueMode, timezoneInstance: Maybe<DateTimezoneUtcNormalInstance>): (date: Maybe<Date>) => Maybe<Date | string | number>;
2484
2495
  /**
@@ -2907,6 +2918,7 @@ declare function dateTimeFieldCalc(): DateTimeFieldCalc;
2907
2918
  *
2908
2919
  * @param input - The datetime calculation input containing date, time, and mode information
2909
2920
  * @returns The combined Date value, or undefined if the input is cleared or incomplete
2921
+ * @__NO_SIDE_EFFECTS__
2910
2922
  */
2911
2923
  declare function buildCombinedDateTime(input: DateTimeCalcInput): Maybe<Date>;
2912
2924
  /**
@@ -9877,6 +9889,7 @@ declare function formlyValueSelectionField<T>(config: ValueSelectionFieldConfig<
9877
9889
  *
9878
9890
  * @param label - Optional label for the clear option
9879
9891
  * @returns A function that transforms selection options by prepending a clear option
9892
+ * @__NO_SIDE_EFFECTS__
9880
9893
  */
9881
9894
  declare function formlyAddValueSelectionOptionFunction<T>(label?: string | undefined): (options: ValueSelectionOption<T>[]) => ValueSelectionOption<T>[];
9882
9895
  /**