@dereekb/dbx-form 13.11.1 → 13.11.2
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.
|
|
3
|
+
"version": "13.11.2",
|
|
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.
|
|
18
|
-
"@dereekb/dbx-core": "13.11.
|
|
19
|
-
"@dereekb/dbx-web": "13.11.
|
|
20
|
-
"@dereekb/model": "13.11.
|
|
21
|
-
"@dereekb/rxjs": "13.11.
|
|
22
|
-
"@dereekb/util": "13.11.
|
|
23
|
-
"@dereekb/vitest": "13.11.
|
|
17
|
+
"@dereekb/date": "13.11.2",
|
|
18
|
+
"@dereekb/dbx-core": "13.11.2",
|
|
19
|
+
"@dereekb/dbx-web": "13.11.2",
|
|
20
|
+
"@dereekb/model": "13.11.2",
|
|
21
|
+
"@dereekb/rxjs": "13.11.2",
|
|
22
|
+
"@dereekb/util": "13.11.2",
|
|
23
|
+
"@dereekb/vitest": "13.11.2",
|
|
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`,
|
|
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.
|