@genesislcap/foundation-utils 14.370.1-alpha-d042199.0 → 14.371.0-FUI-2456.1

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.
@@ -383,6 +383,97 @@
383
383
  }
384
384
  ]
385
385
  },
386
+ {
387
+ "kind": "javascript-module",
388
+ "path": "src/decorators/index.ts",
389
+ "declarations": [],
390
+ "exports": [
391
+ {
392
+ "kind": "js",
393
+ "name": "*",
394
+ "declaration": {
395
+ "name": "*",
396
+ "package": "./renderOnChange"
397
+ }
398
+ }
399
+ ]
400
+ },
401
+ {
402
+ "kind": "javascript-module",
403
+ "path": "src/decorators/renderOnChange.ts",
404
+ "declarations": [
405
+ {
406
+ "kind": "function",
407
+ "name": "renderOnChange",
408
+ "parameters": [
409
+ {
410
+ "name": "target",
411
+ "type": {
412
+ "text": "FASTElement & { render(): void }"
413
+ },
414
+ "description": "The target to define the property change handler on."
415
+ },
416
+ {
417
+ "name": "name",
418
+ "type": {
419
+ "text": "string"
420
+ },
421
+ "description": "The property name."
422
+ }
423
+ ],
424
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
425
+ "privacy": "public"
426
+ }
427
+ ],
428
+ "exports": [
429
+ {
430
+ "kind": "js",
431
+ "name": "renderOnChange",
432
+ "declaration": {
433
+ "name": "renderOnChange",
434
+ "module": "src/decorators/renderOnChange.ts"
435
+ }
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "kind": "javascript-module",
441
+ "path": "src/directives/index.ts",
442
+ "declarations": [],
443
+ "exports": [
444
+ {
445
+ "kind": "js",
446
+ "name": "*",
447
+ "declaration": {
448
+ "name": "*",
449
+ "package": "./sync"
450
+ }
451
+ },
452
+ {
453
+ "kind": "js",
454
+ "name": "*",
455
+ "declaration": {
456
+ "name": "*",
457
+ "package": "./when-else"
458
+ }
459
+ }
460
+ ]
461
+ },
462
+ {
463
+ "kind": "javascript-module",
464
+ "path": "src/encoding/index.ts",
465
+ "declarations": [],
466
+ "exports": [
467
+ {
468
+ "kind": "js",
469
+ "name": "*",
470
+ "declaration": {
471
+ "name": "*",
472
+ "package": "./base64"
473
+ }
474
+ }
475
+ ]
476
+ },
386
477
  {
387
478
  "kind": "javascript-module",
388
479
  "path": "src/design-system/design-system.ts",
@@ -503,74 +594,6 @@
503
594
  }
504
595
  ]
505
596
  },
506
- {
507
- "kind": "javascript-module",
508
- "path": "src/decorators/index.ts",
509
- "declarations": [],
510
- "exports": [
511
- {
512
- "kind": "js",
513
- "name": "*",
514
- "declaration": {
515
- "name": "*",
516
- "package": "./renderOnChange"
517
- }
518
- }
519
- ]
520
- },
521
- {
522
- "kind": "javascript-module",
523
- "path": "src/decorators/renderOnChange.ts",
524
- "declarations": [
525
- {
526
- "kind": "function",
527
- "name": "renderOnChange",
528
- "parameters": [
529
- {
530
- "name": "target",
531
- "type": {
532
- "text": "FASTElement & { render(): void }"
533
- },
534
- "description": "The target to define the property change handler on."
535
- },
536
- {
537
- "name": "name",
538
- "type": {
539
- "text": "string"
540
- },
541
- "description": "The property name."
542
- }
543
- ],
544
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
545
- "privacy": "public"
546
- }
547
- ],
548
- "exports": [
549
- {
550
- "kind": "js",
551
- "name": "renderOnChange",
552
- "declaration": {
553
- "name": "renderOnChange",
554
- "module": "src/decorators/renderOnChange.ts"
555
- }
556
- }
557
- ]
558
- },
559
- {
560
- "kind": "javascript-module",
561
- "path": "src/encoding/index.ts",
562
- "declarations": [],
563
- "exports": [
564
- {
565
- "kind": "js",
566
- "name": "*",
567
- "declaration": {
568
- "name": "*",
569
- "package": "./base64"
570
- }
571
- }
572
- ]
573
- },
574
597
  {
575
598
  "kind": "javascript-module",
576
599
  "path": "src/env/index.ts",
@@ -1245,29 +1268,6 @@
1245
1268
  }
1246
1269
  ]
1247
1270
  },
1248
- {
1249
- "kind": "javascript-module",
1250
- "path": "src/directives/index.ts",
1251
- "declarations": [],
1252
- "exports": [
1253
- {
1254
- "kind": "js",
1255
- "name": "*",
1256
- "declaration": {
1257
- "name": "*",
1258
- "package": "./sync"
1259
- }
1260
- },
1261
- {
1262
- "kind": "js",
1263
- "name": "*",
1264
- "declaration": {
1265
- "name": "*",
1266
- "package": "./when-else"
1267
- }
1268
- }
1269
- ]
1270
- },
1271
1271
  {
1272
1272
  "kind": "javascript-module",
1273
1273
  "path": "src/formatters/datetime.ts",
@@ -3489,6 +3489,49 @@
3489
3489
  }
3490
3490
  ]
3491
3491
  },
3492
+ {
3493
+ "kind": "javascript-module",
3494
+ "path": "src/utils/deepMerge.ts",
3495
+ "declarations": [
3496
+ {
3497
+ "kind": "function",
3498
+ "name": "deepMerge",
3499
+ "return": {
3500
+ "type": {
3501
+ "text": ""
3502
+ }
3503
+ },
3504
+ "parameters": [
3505
+ {
3506
+ "name": "target",
3507
+ "type": {
3508
+ "text": "T"
3509
+ },
3510
+ "description": "The target object to merge into (defaults/base values)"
3511
+ },
3512
+ {
3513
+ "name": "source",
3514
+ "type": {
3515
+ "text": "Partial<T>"
3516
+ },
3517
+ "description": "The source object to merge from (overrides)"
3518
+ }
3519
+ ],
3520
+ "description": "Deep merges two objects, with source values taking precedence over target values.\nArrays are replaced (not merged), and null/undefined values in source are preserved.",
3521
+ "privacy": "public"
3522
+ }
3523
+ ],
3524
+ "exports": [
3525
+ {
3526
+ "kind": "js",
3527
+ "name": "deepMerge",
3528
+ "declaration": {
3529
+ "name": "deepMerge",
3530
+ "module": "src/utils/deepMerge.ts"
3531
+ }
3532
+ }
3533
+ ]
3534
+ },
3492
3535
  {
3493
3536
  "kind": "javascript-module",
3494
3537
  "path": "src/utils/delay.ts",
@@ -3623,6 +3666,14 @@
3623
3666
  "path": "src/utils/index.ts",
3624
3667
  "declarations": [],
3625
3668
  "exports": [
3669
+ {
3670
+ "kind": "js",
3671
+ "name": "*",
3672
+ "declaration": {
3673
+ "name": "*",
3674
+ "package": "./deepMerge"
3675
+ }
3676
+ },
3626
3677
  {
3627
3678
  "kind": "js",
3628
3679
  "name": "*",
@@ -3957,21 +4008,175 @@
3957
4008
  },
3958
4009
  {
3959
4010
  "kind": "javascript-module",
3960
- "path": "src/encoding/base64/decode.ts",
4011
+ "path": "src/directives/sync/index.ts",
4012
+ "declarations": [],
4013
+ "exports": [
4014
+ {
4015
+ "kind": "js",
4016
+ "name": "*",
4017
+ "declaration": {
4018
+ "name": "*",
4019
+ "package": "./sync"
4020
+ }
4021
+ }
4022
+ ]
4023
+ },
4024
+ {
4025
+ "kind": "javascript-module",
4026
+ "path": "src/directives/sync/sync.ts",
3961
4027
  "declarations": [
4028
+ {
4029
+ "kind": "variable",
4030
+ "name": "defaultEventMap",
4031
+ "type": {
4032
+ "text": "Map<string, EventName>"
4033
+ },
4034
+ "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
4035
+ "description": "A map that associates specific HTML element tags with their corresponding default event names.",
4036
+ "privacy": "public"
4037
+ },
3962
4038
  {
3963
4039
  "kind": "function",
3964
- "name": "decodeFromBase64",
4040
+ "name": "sync",
3965
4041
  "return": {
3966
4042
  "type": {
3967
- "text": ""
4043
+ "text": "CaptureType<TSource>"
3968
4044
  }
3969
4045
  },
3970
4046
  "parameters": [
3971
4047
  {
3972
- "name": "base64Value",
4048
+ "name": "binding",
3973
4049
  "type": {
3974
- "text": "string"
4050
+ "text": "Binding<TSource, TReturn>"
4051
+ }
4052
+ },
4053
+ {
4054
+ "name": "conversionType",
4055
+ "default": "'string'",
4056
+ "type": {
4057
+ "text": "ConversionType"
4058
+ }
4059
+ },
4060
+ {
4061
+ "name": "eventName",
4062
+ "default": "'default'",
4063
+ "type": {
4064
+ "text": "EventName"
4065
+ }
4066
+ },
4067
+ {
4068
+ "name": "keyAttr",
4069
+ "optional": true,
4070
+ "type": {
4071
+ "text": "string"
4072
+ }
4073
+ }
4074
+ ],
4075
+ "description": "Creates a synchronization directive that binds a data source to an HTML element,",
4076
+ "privacy": "public"
4077
+ }
4078
+ ],
4079
+ "exports": [
4080
+ {
4081
+ "kind": "js",
4082
+ "name": "defaultEventMap",
4083
+ "declaration": {
4084
+ "name": "defaultEventMap",
4085
+ "module": "src/directives/sync/sync.ts"
4086
+ }
4087
+ },
4088
+ {
4089
+ "kind": "js",
4090
+ "name": "sync",
4091
+ "declaration": {
4092
+ "name": "sync",
4093
+ "module": "src/directives/sync/sync.ts"
4094
+ }
4095
+ }
4096
+ ]
4097
+ },
4098
+ {
4099
+ "kind": "javascript-module",
4100
+ "path": "src/directives/when-else/index.ts",
4101
+ "declarations": [],
4102
+ "exports": [
4103
+ {
4104
+ "kind": "js",
4105
+ "name": "*",
4106
+ "declaration": {
4107
+ "name": "*",
4108
+ "package": "./when-else"
4109
+ }
4110
+ }
4111
+ ]
4112
+ },
4113
+ {
4114
+ "kind": "javascript-module",
4115
+ "path": "src/directives/when-else/when-else.ts",
4116
+ "declarations": [
4117
+ {
4118
+ "kind": "function",
4119
+ "name": "whenElse",
4120
+ "return": {
4121
+ "type": {
4122
+ "text": "CaptureType<TSource>"
4123
+ }
4124
+ },
4125
+ "parameters": [
4126
+ {
4127
+ "name": "binding",
4128
+ "type": {
4129
+ "text": "Binding<TSource, TReturn>"
4130
+ },
4131
+ "description": "The condition to test for rendering."
4132
+ },
4133
+ {
4134
+ "name": "trueTemplateOrTemplateBinding",
4135
+ "type": {
4136
+ "text": "WhenTemplate<TSource>"
4137
+ },
4138
+ "description": "The template or a binding that gets the template to render when the condition is true."
4139
+ },
4140
+ {
4141
+ "name": "falseTemplateOrTemplateBinding",
4142
+ "type": {
4143
+ "text": "WhenTemplate<TSource>"
4144
+ },
4145
+ "description": "The template or a binding that gets the template to render when the condition is false."
4146
+ }
4147
+ ],
4148
+ "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
4149
+ "privacy": "public"
4150
+ }
4151
+ ],
4152
+ "exports": [
4153
+ {
4154
+ "kind": "js",
4155
+ "name": "whenElse",
4156
+ "declaration": {
4157
+ "name": "whenElse",
4158
+ "module": "src/directives/when-else/when-else.ts"
4159
+ }
4160
+ }
4161
+ ]
4162
+ },
4163
+ {
4164
+ "kind": "javascript-module",
4165
+ "path": "src/encoding/base64/decode.ts",
4166
+ "declarations": [
4167
+ {
4168
+ "kind": "function",
4169
+ "name": "decodeFromBase64",
4170
+ "return": {
4171
+ "type": {
4172
+ "text": ""
4173
+ }
4174
+ },
4175
+ "parameters": [
4176
+ {
4177
+ "name": "base64Value",
4178
+ "type": {
4179
+ "text": "string"
3975
4180
  }
3976
4181
  },
3977
4182
  {
@@ -4109,160 +4314,6 @@
4109
4314
  }
4110
4315
  ]
4111
4316
  },
4112
- {
4113
- "kind": "javascript-module",
4114
- "path": "src/directives/sync/index.ts",
4115
- "declarations": [],
4116
- "exports": [
4117
- {
4118
- "kind": "js",
4119
- "name": "*",
4120
- "declaration": {
4121
- "name": "*",
4122
- "package": "./sync"
4123
- }
4124
- }
4125
- ]
4126
- },
4127
- {
4128
- "kind": "javascript-module",
4129
- "path": "src/directives/sync/sync.ts",
4130
- "declarations": [
4131
- {
4132
- "kind": "variable",
4133
- "name": "defaultEventMap",
4134
- "type": {
4135
- "text": "Map<string, EventName>"
4136
- },
4137
- "default": "new Map([\n ['FAST-TEXT-AREA', 'input'],\n ['FAST-TEXT-FIELD', 'input'],\n ['FOUNDATION-TEXT-AREA', 'input'],\n ['FOUNDATION-TEXT-FIELD', 'input'],\n ['INPUT', 'input'],\n ['ZERO-TEXT-FIELD', 'input'],\n])",
4138
- "description": "A map that associates specific HTML element tags with their corresponding default event names.",
4139
- "privacy": "public"
4140
- },
4141
- {
4142
- "kind": "function",
4143
- "name": "sync",
4144
- "return": {
4145
- "type": {
4146
- "text": "CaptureType<TSource>"
4147
- }
4148
- },
4149
- "parameters": [
4150
- {
4151
- "name": "binding",
4152
- "type": {
4153
- "text": "Binding<TSource, TReturn>"
4154
- }
4155
- },
4156
- {
4157
- "name": "conversionType",
4158
- "default": "'string'",
4159
- "type": {
4160
- "text": "ConversionType"
4161
- }
4162
- },
4163
- {
4164
- "name": "eventName",
4165
- "default": "'default'",
4166
- "type": {
4167
- "text": "EventName"
4168
- }
4169
- },
4170
- {
4171
- "name": "keyAttr",
4172
- "optional": true,
4173
- "type": {
4174
- "text": "string"
4175
- }
4176
- }
4177
- ],
4178
- "description": "Creates a synchronization directive that binds a data source to an HTML element,",
4179
- "privacy": "public"
4180
- }
4181
- ],
4182
- "exports": [
4183
- {
4184
- "kind": "js",
4185
- "name": "defaultEventMap",
4186
- "declaration": {
4187
- "name": "defaultEventMap",
4188
- "module": "src/directives/sync/sync.ts"
4189
- }
4190
- },
4191
- {
4192
- "kind": "js",
4193
- "name": "sync",
4194
- "declaration": {
4195
- "name": "sync",
4196
- "module": "src/directives/sync/sync.ts"
4197
- }
4198
- }
4199
- ]
4200
- },
4201
- {
4202
- "kind": "javascript-module",
4203
- "path": "src/directives/when-else/index.ts",
4204
- "declarations": [],
4205
- "exports": [
4206
- {
4207
- "kind": "js",
4208
- "name": "*",
4209
- "declaration": {
4210
- "name": "*",
4211
- "package": "./when-else"
4212
- }
4213
- }
4214
- ]
4215
- },
4216
- {
4217
- "kind": "javascript-module",
4218
- "path": "src/directives/when-else/when-else.ts",
4219
- "declarations": [
4220
- {
4221
- "kind": "function",
4222
- "name": "whenElse",
4223
- "return": {
4224
- "type": {
4225
- "text": "CaptureType<TSource>"
4226
- }
4227
- },
4228
- "parameters": [
4229
- {
4230
- "name": "binding",
4231
- "type": {
4232
- "text": "Binding<TSource, TReturn>"
4233
- },
4234
- "description": "The condition to test for rendering."
4235
- },
4236
- {
4237
- "name": "trueTemplateOrTemplateBinding",
4238
- "type": {
4239
- "text": "WhenTemplate<TSource>"
4240
- },
4241
- "description": "The template or a binding that gets the template to render when the condition is true."
4242
- },
4243
- {
4244
- "name": "falseTemplateOrTemplateBinding",
4245
- "type": {
4246
- "text": "WhenTemplate<TSource>"
4247
- },
4248
- "description": "The template or a binding that gets the template to render when the condition is false."
4249
- }
4250
- ],
4251
- "description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
4252
- "privacy": "public"
4253
- }
4254
- ],
4255
- "exports": [
4256
- {
4257
- "kind": "js",
4258
- "name": "whenElse",
4259
- "declaration": {
4260
- "name": "whenElse",
4261
- "module": "src/directives/when-else/when-else.ts"
4262
- }
4263
- }
4264
- ]
4265
- },
4266
4317
  {
4267
4318
  "kind": "javascript-module",
4268
4319
  "path": "src/mappers/dto/index.ts",
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Deep merges two objects, with source values taking precedence over target values.
3
+ * Arrays are replaced (not merged), and null/undefined values in source are preserved.
4
+ *
5
+ * @param target - The target object to merge into (defaults/base values)
6
+ * @param source - The source object to merge from (overrides)
7
+ * @returns A new merged object with source values taking precedence
8
+ * @public
9
+ * @example
10
+ * ```ts
11
+ * const defaults = { a: 1, b: { c: 2, d: 3 } };
12
+ * const overrides = { b: { c: 4 } };
13
+ * const merged = deepMerge(defaults, overrides);
14
+ * // Result: { a: 1, b: { c: 4, d: 3 } }
15
+ * ```
16
+ */
17
+ export declare const deepMerge: <T extends Record<string, any>>(target: T, source: Partial<T>) => T;
18
+ //# sourceMappingURL=deepMerge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../../src/utils/deepMerge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,OAAO,CAAC,CAAC,CAAC,KAAG,CAsCxF,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './deepMerge';
1
2
  export * from './delay';
2
3
  export * from './dom';
3
4
  export * from './logger';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Deep merges two objects, with source values taking precedence over target values.
3
+ * Arrays are replaced (not merged), and null/undefined values in source are preserved.
4
+ *
5
+ * @param target - The target object to merge into (defaults/base values)
6
+ * @param source - The source object to merge from (overrides)
7
+ * @returns A new merged object with source values taking precedence
8
+ * @public
9
+ * @example
10
+ * ```ts
11
+ * const defaults = { a: 1, b: { c: 2, d: 3 } };
12
+ * const overrides = { b: { c: 4 } };
13
+ * const merged = deepMerge(defaults, overrides);
14
+ * // Result: { a: 1, b: { c: 4, d: 3 } }
15
+ * ```
16
+ */
17
+ export const deepMerge = (target, source) => {
18
+ const output = structuredClone(target);
19
+ if (!source || typeof source !== 'object' || Array.isArray(source)) {
20
+ return source !== undefined ? source : output;
21
+ }
22
+ Object.keys(source).forEach((key) => {
23
+ const sourceValue = source[key];
24
+ const targetValue = output[key];
25
+ // If source value is null or undefined, skip it (preserve target value)
26
+ if (sourceValue === null || sourceValue === undefined) {
27
+ return;
28
+ }
29
+ // Type guard for Date check
30
+ const isDate = (value) => value instanceof Date;
31
+ // If both are plain objects (not arrays, dates, etc.), recursively merge
32
+ if (sourceValue &&
33
+ typeof sourceValue === 'object' &&
34
+ !Array.isArray(sourceValue) &&
35
+ !isDate(sourceValue) &&
36
+ targetValue &&
37
+ typeof targetValue === 'object' &&
38
+ !Array.isArray(targetValue) &&
39
+ !isDate(targetValue)) {
40
+ output[key] = deepMerge(targetValue, sourceValue);
41
+ }
42
+ else {
43
+ // Otherwise, source value overrides target value
44
+ output[key] = sourceValue;
45
+ }
46
+ });
47
+ return output;
48
+ };
@@ -1,3 +1,4 @@
1
+ export * from './deepMerge';
1
2
  export * from './delay';
2
3
  export * from './dom';
3
4
  export * from './logger';
@@ -1811,6 +1811,94 @@
1811
1811
  ],
1812
1812
  "name": "decodeFromBase64WithPrefix"
1813
1813
  },
1814
+ {
1815
+ "kind": "Function",
1816
+ "canonicalReference": "@genesislcap/foundation-utils!deepMerge:function(1)",
1817
+ "docComment": "/**\n * Deep merges two objects, with source values taking precedence over target values. Arrays are replaced (not merged), and null/undefined values in source are preserved.\n *\n * @param target - The target object to merge into (defaults/base values)\n *\n * @param source - The source object to merge from (overrides)\n *\n * @returns A new merged object with source values taking precedence\n *\n * @example\n * ```ts\n * const defaults = { a: 1, b: { c: 2, d: 3 } };\n * const overrides = { b: { c: 4 } };\n * const merged = deepMerge(defaults, overrides);\n * // Result: { a: 1, b: { c: 4, d: 3 } }\n * ```\n *\n * @public\n */\n",
1818
+ "excerptTokens": [
1819
+ {
1820
+ "kind": "Content",
1821
+ "text": "deepMerge: <T extends "
1822
+ },
1823
+ {
1824
+ "kind": "Reference",
1825
+ "text": "Record",
1826
+ "canonicalReference": "!Record:type"
1827
+ },
1828
+ {
1829
+ "kind": "Content",
1830
+ "text": "<string, any>"
1831
+ },
1832
+ {
1833
+ "kind": "Content",
1834
+ "text": ">(target: "
1835
+ },
1836
+ {
1837
+ "kind": "Content",
1838
+ "text": "T"
1839
+ },
1840
+ {
1841
+ "kind": "Content",
1842
+ "text": ", source: "
1843
+ },
1844
+ {
1845
+ "kind": "Reference",
1846
+ "text": "Partial",
1847
+ "canonicalReference": "!Partial:type"
1848
+ },
1849
+ {
1850
+ "kind": "Content",
1851
+ "text": "<T>"
1852
+ },
1853
+ {
1854
+ "kind": "Content",
1855
+ "text": ") => "
1856
+ },
1857
+ {
1858
+ "kind": "Content",
1859
+ "text": "T"
1860
+ }
1861
+ ],
1862
+ "fileUrlPath": "src/utils/deepMerge.ts",
1863
+ "returnTypeTokenRange": {
1864
+ "startIndex": 9,
1865
+ "endIndex": 10
1866
+ },
1867
+ "releaseTag": "Public",
1868
+ "overloadIndex": 1,
1869
+ "parameters": [
1870
+ {
1871
+ "parameterName": "target",
1872
+ "parameterTypeTokenRange": {
1873
+ "startIndex": 4,
1874
+ "endIndex": 5
1875
+ },
1876
+ "isOptional": false
1877
+ },
1878
+ {
1879
+ "parameterName": "source",
1880
+ "parameterTypeTokenRange": {
1881
+ "startIndex": 6,
1882
+ "endIndex": 8
1883
+ },
1884
+ "isOptional": false
1885
+ }
1886
+ ],
1887
+ "typeParameters": [
1888
+ {
1889
+ "typeParameterName": "T",
1890
+ "constraintTokenRange": {
1891
+ "startIndex": 1,
1892
+ "endIndex": 3
1893
+ },
1894
+ "defaultTypeTokenRange": {
1895
+ "startIndex": 0,
1896
+ "endIndex": 0
1897
+ }
1898
+ }
1899
+ ],
1900
+ "name": "deepMerge"
1901
+ },
1814
1902
  {
1815
1903
  "kind": "Variable",
1816
1904
  "canonicalReference": "@genesislcap/foundation-utils!DEFAULT_ORGANISATION:var",
@@ -225,6 +225,24 @@ export declare const decodeFromBase64: (base64Value: string) => string | ArrayBu
225
225
  */
226
226
  export declare const decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer;
227
227
 
228
+ /**
229
+ * Deep merges two objects, with source values taking precedence over target values.
230
+ * Arrays are replaced (not merged), and null/undefined values in source are preserved.
231
+ *
232
+ * @param target - The target object to merge into (defaults/base values)
233
+ * @param source - The source object to merge from (overrides)
234
+ * @returns A new merged object with source values taking precedence
235
+ * @public
236
+ * @example
237
+ * ```ts
238
+ * const defaults = { a: 1, b: { c: 2, d: 3 } };
239
+ * const overrides = { b: { c: 4 } };
240
+ * const merged = deepMerge(defaults, overrides);
241
+ * // Result: { a: 1, b: { c: 4, d: 3 } }
242
+ * ```
243
+ */
244
+ export declare const deepMerge: <T extends Record<string, any>>(target: T, source: Partial<T>) => T;
245
+
228
246
  /**
229
247
  * The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
230
248
  * @remarks Optional.
@@ -0,0 +1,82 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [@genesislcap/foundation-utils](./foundation-utils.md) &gt; [deepMerge](./foundation-utils.deepmerge.md)
4
+
5
+ ## deepMerge() function
6
+
7
+ Deep merges two objects, with source values taking precedence over target values. Arrays are replaced (not merged), and null/undefined values in source are preserved.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ deepMerge: <T extends Record<string, any>>(target: T, source: Partial<T>) => T
13
+ ```
14
+
15
+ ## Parameters
16
+
17
+ <table><thead><tr><th>
18
+
19
+ Parameter
20
+
21
+
22
+ </th><th>
23
+
24
+ Type
25
+
26
+
27
+ </th><th>
28
+
29
+ Description
30
+
31
+
32
+ </th></tr></thead>
33
+ <tbody><tr><td>
34
+
35
+ target
36
+
37
+
38
+ </td><td>
39
+
40
+ T
41
+
42
+
43
+ </td><td>
44
+
45
+ The target object to merge into (defaults/base values)
46
+
47
+
48
+ </td></tr>
49
+ <tr><td>
50
+
51
+ source
52
+
53
+
54
+ </td><td>
55
+
56
+ Partial&lt;T&gt;
57
+
58
+
59
+ </td><td>
60
+
61
+ The source object to merge from (overrides)
62
+
63
+
64
+ </td></tr>
65
+ </tbody></table>
66
+
67
+ **Returns:**
68
+
69
+ T
70
+
71
+ A new merged object with source values taking precedence
72
+
73
+ ## Example
74
+
75
+
76
+ ```ts
77
+ const defaults = { a: 1, b: { c: 2, d: 3 } };
78
+ const overrides = { b: { c: 4 } };
79
+ const merged = deepMerge(defaults, overrides);
80
+ // Result: { a: 1, b: { c: 4, d: 3 } }
81
+ ```
82
+
@@ -258,6 +258,17 @@ Decodes a value from base64.
258
258
  Decodes a value from base64 with a prefix.
259
259
 
260
260
 
261
+ </td></tr>
262
+ <tr><td>
263
+
264
+ [deepMerge(target, source)](./foundation-utils.deepmerge.md)
265
+
266
+
267
+ </td><td>
268
+
269
+ Deep merges two objects, with source values taking precedence over target values. Arrays are replaced (not merged), and null/undefined values in source are preserved.
270
+
271
+
261
272
  </td></tr>
262
273
  <tr><td>
263
274
 
@@ -143,6 +143,9 @@ export const decodeFromBase64: (base64Value: string) => string | ArrayBuffer;
143
143
  // @public
144
144
  export const decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer;
145
145
 
146
+ // @public
147
+ export const deepMerge: <T extends Record<string, any>>(target: T, source: Partial<T>) => T;
148
+
146
149
  // @public
147
150
  export let DEFAULT_ORGANISATION: string;
148
151
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-utils",
3
3
  "description": "Genesis Foundation Utils",
4
- "version": "14.370.1-alpha-d042199.0",
4
+ "version": "14.371.0-FUI-2456.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -27,18 +27,18 @@
27
27
  }
28
28
  },
29
29
  "devDependencies": {
30
- "@genesislcap/foundation-testing": "14.370.1-alpha-d042199.0",
31
- "@genesislcap/genx": "14.370.1-alpha-d042199.0",
32
- "@genesislcap/rollup-builder": "14.370.1-alpha-d042199.0",
33
- "@genesislcap/ts-builder": "14.370.1-alpha-d042199.0",
34
- "@genesislcap/uvu-playwright-builder": "14.370.1-alpha-d042199.0",
35
- "@genesislcap/vite-builder": "14.370.1-alpha-d042199.0",
36
- "@genesislcap/webpack-builder": "14.370.1-alpha-d042199.0",
30
+ "@genesislcap/foundation-testing": "14.371.0-FUI-2456.1",
31
+ "@genesislcap/genx": "14.371.0-FUI-2456.1",
32
+ "@genesislcap/rollup-builder": "14.371.0-FUI-2456.1",
33
+ "@genesislcap/ts-builder": "14.371.0-FUI-2456.1",
34
+ "@genesislcap/uvu-playwright-builder": "14.371.0-FUI-2456.1",
35
+ "@genesislcap/vite-builder": "14.371.0-FUI-2456.1",
36
+ "@genesislcap/webpack-builder": "14.371.0-FUI-2456.1",
37
37
  "@types/json-schema": "^7.0.11"
38
38
  },
39
39
  "dependencies": {
40
- "@genesislcap/expression-builder": "14.370.1-alpha-d042199.0",
41
- "@genesislcap/foundation-logger": "14.370.1-alpha-d042199.0",
40
+ "@genesislcap/expression-builder": "14.371.0-FUI-2456.1",
41
+ "@genesislcap/foundation-logger": "14.371.0-FUI-2456.1",
42
42
  "@microsoft/fast-components": "2.30.6",
43
43
  "@microsoft/fast-element": "1.14.0",
44
44
  "@microsoft/fast-foundation": "2.49.6",
@@ -56,5 +56,5 @@
56
56
  "access": "public"
57
57
  },
58
58
  "customElements": "dist/custom-elements.json",
59
- "gitHead": "a3bc56233af892cf72bfc55298039d4c0f36333b"
59
+ "gitHead": "c3c009d8ba522f9a7cc445c623973248e5e26cf2"
60
60
  }