@genesislcap/foundation-utils 14.387.2 → 14.388.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/dist/custom-elements.json +295 -219
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/noop.d.ts +23 -0
- package/dist/dts/utils/noop.d.ts.map +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/noop.js +31 -0
- package/dist/foundation-utils.api.json +82 -0
- package/dist/foundation-utils.d.ts +24 -0
- package/docs/api/foundation-utils.avoidtreeshaking.md +56 -0
- package/docs/api/foundation-utils.md +26 -0
- package/docs/api/foundation-utils.noop.md +56 -0
- package/docs/api-report.md.api.md +6 -0
- package/package.json +11 -11
|
@@ -193,6 +193,59 @@
|
|
|
193
193
|
}
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "javascript-module",
|
|
198
|
+
"path": "src/decorators/index.ts",
|
|
199
|
+
"declarations": [],
|
|
200
|
+
"exports": [
|
|
201
|
+
{
|
|
202
|
+
"kind": "js",
|
|
203
|
+
"name": "*",
|
|
204
|
+
"declaration": {
|
|
205
|
+
"name": "*",
|
|
206
|
+
"package": "./renderOnChange"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"kind": "javascript-module",
|
|
213
|
+
"path": "src/decorators/renderOnChange.ts",
|
|
214
|
+
"declarations": [
|
|
215
|
+
{
|
|
216
|
+
"kind": "function",
|
|
217
|
+
"name": "renderOnChange",
|
|
218
|
+
"parameters": [
|
|
219
|
+
{
|
|
220
|
+
"name": "target",
|
|
221
|
+
"type": {
|
|
222
|
+
"text": "FASTElement & { render(): void }"
|
|
223
|
+
},
|
|
224
|
+
"description": "The target to define the property change handler on."
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"name": "name",
|
|
228
|
+
"type": {
|
|
229
|
+
"text": "string"
|
|
230
|
+
},
|
|
231
|
+
"description": "The property name."
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
235
|
+
"privacy": "public"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"exports": [
|
|
239
|
+
{
|
|
240
|
+
"kind": "js",
|
|
241
|
+
"name": "renderOnChange",
|
|
242
|
+
"declaration": {
|
|
243
|
+
"name": "renderOnChange",
|
|
244
|
+
"module": "src/decorators/renderOnChange.ts"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
]
|
|
248
|
+
},
|
|
196
249
|
{
|
|
197
250
|
"kind": "javascript-module",
|
|
198
251
|
"path": "src/data/inMemoryDatabase.ts",
|
|
@@ -513,30 +566,7 @@
|
|
|
513
566
|
},
|
|
514
567
|
{
|
|
515
568
|
"kind": "javascript-module",
|
|
516
|
-
"path": "src/
|
|
517
|
-
"declarations": [],
|
|
518
|
-
"exports": [
|
|
519
|
-
{
|
|
520
|
-
"kind": "js",
|
|
521
|
-
"name": "*",
|
|
522
|
-
"declaration": {
|
|
523
|
-
"name": "*",
|
|
524
|
-
"package": "./sync"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"kind": "js",
|
|
529
|
-
"name": "*",
|
|
530
|
-
"declaration": {
|
|
531
|
-
"name": "*",
|
|
532
|
-
"package": "./when-else"
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
]
|
|
536
|
-
},
|
|
537
|
-
{
|
|
538
|
-
"kind": "javascript-module",
|
|
539
|
-
"path": "src/decorators/index.ts",
|
|
569
|
+
"path": "src/encoding/index.ts",
|
|
540
570
|
"declarations": [],
|
|
541
571
|
"exports": [
|
|
542
572
|
{
|
|
@@ -544,45 +574,7 @@
|
|
|
544
574
|
"name": "*",
|
|
545
575
|
"declaration": {
|
|
546
576
|
"name": "*",
|
|
547
|
-
"package": "./
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
|
-
]
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
"kind": "javascript-module",
|
|
554
|
-
"path": "src/decorators/renderOnChange.ts",
|
|
555
|
-
"declarations": [
|
|
556
|
-
{
|
|
557
|
-
"kind": "function",
|
|
558
|
-
"name": "renderOnChange",
|
|
559
|
-
"parameters": [
|
|
560
|
-
{
|
|
561
|
-
"name": "target",
|
|
562
|
-
"type": {
|
|
563
|
-
"text": "FASTElement & { render(): void }"
|
|
564
|
-
},
|
|
565
|
-
"description": "The target to define the property change handler on."
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
"name": "name",
|
|
569
|
-
"type": {
|
|
570
|
-
"text": "string"
|
|
571
|
-
},
|
|
572
|
-
"description": "The property name."
|
|
573
|
-
}
|
|
574
|
-
],
|
|
575
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
576
|
-
"privacy": "public"
|
|
577
|
-
}
|
|
578
|
-
],
|
|
579
|
-
"exports": [
|
|
580
|
-
{
|
|
581
|
-
"kind": "js",
|
|
582
|
-
"name": "renderOnChange",
|
|
583
|
-
"declaration": {
|
|
584
|
-
"name": "renderOnChange",
|
|
585
|
-
"module": "src/decorators/renderOnChange.ts"
|
|
577
|
+
"package": "./base64"
|
|
586
578
|
}
|
|
587
579
|
}
|
|
588
580
|
]
|
|
@@ -1263,7 +1255,7 @@
|
|
|
1263
1255
|
},
|
|
1264
1256
|
{
|
|
1265
1257
|
"kind": "javascript-module",
|
|
1266
|
-
"path": "src/
|
|
1258
|
+
"path": "src/directives/index.ts",
|
|
1267
1259
|
"declarations": [],
|
|
1268
1260
|
"exports": [
|
|
1269
1261
|
{
|
|
@@ -1271,7 +1263,15 @@
|
|
|
1271
1263
|
"name": "*",
|
|
1272
1264
|
"declaration": {
|
|
1273
1265
|
"name": "*",
|
|
1274
|
-
"package": "./
|
|
1266
|
+
"package": "./sync"
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
"kind": "js",
|
|
1271
|
+
"name": "*",
|
|
1272
|
+
"declaration": {
|
|
1273
|
+
"name": "*",
|
|
1274
|
+
"package": "./when-else"
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
1277
|
]
|
|
@@ -3753,6 +3753,14 @@
|
|
|
3753
3753
|
"name": "*",
|
|
3754
3754
|
"package": "./logger"
|
|
3755
3755
|
}
|
|
3756
|
+
},
|
|
3757
|
+
{
|
|
3758
|
+
"kind": "js",
|
|
3759
|
+
"name": "*",
|
|
3760
|
+
"declaration": {
|
|
3761
|
+
"name": "*",
|
|
3762
|
+
"package": "./noop"
|
|
3763
|
+
}
|
|
3756
3764
|
}
|
|
3757
3765
|
]
|
|
3758
3766
|
},
|
|
@@ -3778,6 +3786,74 @@
|
|
|
3778
3786
|
}
|
|
3779
3787
|
]
|
|
3780
3788
|
},
|
|
3789
|
+
{
|
|
3790
|
+
"kind": "javascript-module",
|
|
3791
|
+
"path": "src/utils/noop.ts",
|
|
3792
|
+
"declarations": [
|
|
3793
|
+
{
|
|
3794
|
+
"kind": "function",
|
|
3795
|
+
"name": "noop",
|
|
3796
|
+
"return": {
|
|
3797
|
+
"type": {
|
|
3798
|
+
"text": "void"
|
|
3799
|
+
}
|
|
3800
|
+
},
|
|
3801
|
+
"parameters": [
|
|
3802
|
+
{
|
|
3803
|
+
"name": "fn",
|
|
3804
|
+
"optional": true,
|
|
3805
|
+
"type": {
|
|
3806
|
+
"text": "() => void"
|
|
3807
|
+
}
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
"description": "An optional function to execute for its side effects.",
|
|
3811
|
+
"name": "callback"
|
|
3812
|
+
}
|
|
3813
|
+
],
|
|
3814
|
+
"description": "A no-operation function that executes an optional callback.\n\nThis is a lower-level utility function. For preventing tree-shaking of custom elements,\nprefer using avoidTreeShaking which provides a more explicit API.",
|
|
3815
|
+
"privacy": "public"
|
|
3816
|
+
},
|
|
3817
|
+
{
|
|
3818
|
+
"kind": "function",
|
|
3819
|
+
"name": "avoidTreeShaking",
|
|
3820
|
+
"return": {
|
|
3821
|
+
"type": {
|
|
3822
|
+
"text": "void"
|
|
3823
|
+
}
|
|
3824
|
+
},
|
|
3825
|
+
"parameters": [
|
|
3826
|
+
{
|
|
3827
|
+
"name": "classes",
|
|
3828
|
+
"type": {
|
|
3829
|
+
"text": "unknown[]"
|
|
3830
|
+
},
|
|
3831
|
+
"description": "One or more custom element classes that should not be tree-shaken."
|
|
3832
|
+
}
|
|
3833
|
+
],
|
|
3834
|
+
"description": "Explicitly prevents tree-shaking of custom element classes by referencing them.\n\nBundlers may incorrectly remove code that it thinks has no side effects,\nsuch as custom element definitions that are only referenced in templates.\nBy passing these classes to `avoidTreeShaking`, we create a side effect\nthat signals to the bundler to preserve the code.",
|
|
3835
|
+
"privacy": "public"
|
|
3836
|
+
}
|
|
3837
|
+
],
|
|
3838
|
+
"exports": [
|
|
3839
|
+
{
|
|
3840
|
+
"kind": "js",
|
|
3841
|
+
"name": "noop",
|
|
3842
|
+
"declaration": {
|
|
3843
|
+
"name": "noop",
|
|
3844
|
+
"module": "src/utils/noop.ts"
|
|
3845
|
+
}
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
"kind": "js",
|
|
3849
|
+
"name": "avoidTreeShaking",
|
|
3850
|
+
"declaration": {
|
|
3851
|
+
"name": "avoidTreeShaking",
|
|
3852
|
+
"module": "src/utils/noop.ts"
|
|
3853
|
+
}
|
|
3854
|
+
}
|
|
3855
|
+
]
|
|
3856
|
+
},
|
|
3781
3857
|
{
|
|
3782
3858
|
"kind": "javascript-module",
|
|
3783
3859
|
"path": "src/utils/os-platform.ts",
|
|
@@ -4062,160 +4138,6 @@
|
|
|
4062
4138
|
}
|
|
4063
4139
|
]
|
|
4064
4140
|
},
|
|
4065
|
-
{
|
|
4066
|
-
"kind": "javascript-module",
|
|
4067
|
-
"path": "src/directives/sync/index.ts",
|
|
4068
|
-
"declarations": [],
|
|
4069
|
-
"exports": [
|
|
4070
|
-
{
|
|
4071
|
-
"kind": "js",
|
|
4072
|
-
"name": "*",
|
|
4073
|
-
"declaration": {
|
|
4074
|
-
"name": "*",
|
|
4075
|
-
"package": "./sync"
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
]
|
|
4079
|
-
},
|
|
4080
|
-
{
|
|
4081
|
-
"kind": "javascript-module",
|
|
4082
|
-
"path": "src/directives/sync/sync.ts",
|
|
4083
|
-
"declarations": [
|
|
4084
|
-
{
|
|
4085
|
-
"kind": "variable",
|
|
4086
|
-
"name": "defaultEventMap",
|
|
4087
|
-
"type": {
|
|
4088
|
-
"text": "Map<string, EventName>"
|
|
4089
|
-
},
|
|
4090
|
-
"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])",
|
|
4091
|
-
"description": "A map that associates specific HTML element tags with their corresponding default event names.",
|
|
4092
|
-
"privacy": "public"
|
|
4093
|
-
},
|
|
4094
|
-
{
|
|
4095
|
-
"kind": "function",
|
|
4096
|
-
"name": "sync",
|
|
4097
|
-
"return": {
|
|
4098
|
-
"type": {
|
|
4099
|
-
"text": "CaptureType<TSource>"
|
|
4100
|
-
}
|
|
4101
|
-
},
|
|
4102
|
-
"parameters": [
|
|
4103
|
-
{
|
|
4104
|
-
"name": "binding",
|
|
4105
|
-
"type": {
|
|
4106
|
-
"text": "Binding<TSource, TReturn>"
|
|
4107
|
-
}
|
|
4108
|
-
},
|
|
4109
|
-
{
|
|
4110
|
-
"name": "conversionType",
|
|
4111
|
-
"default": "'string'",
|
|
4112
|
-
"type": {
|
|
4113
|
-
"text": "ConversionType"
|
|
4114
|
-
}
|
|
4115
|
-
},
|
|
4116
|
-
{
|
|
4117
|
-
"name": "eventName",
|
|
4118
|
-
"default": "'default'",
|
|
4119
|
-
"type": {
|
|
4120
|
-
"text": "EventName"
|
|
4121
|
-
}
|
|
4122
|
-
},
|
|
4123
|
-
{
|
|
4124
|
-
"name": "keyAttr",
|
|
4125
|
-
"optional": true,
|
|
4126
|
-
"type": {
|
|
4127
|
-
"text": "string"
|
|
4128
|
-
}
|
|
4129
|
-
}
|
|
4130
|
-
],
|
|
4131
|
-
"description": "Creates a synchronization directive that binds a data source to an HTML element,",
|
|
4132
|
-
"privacy": "public"
|
|
4133
|
-
}
|
|
4134
|
-
],
|
|
4135
|
-
"exports": [
|
|
4136
|
-
{
|
|
4137
|
-
"kind": "js",
|
|
4138
|
-
"name": "defaultEventMap",
|
|
4139
|
-
"declaration": {
|
|
4140
|
-
"name": "defaultEventMap",
|
|
4141
|
-
"module": "src/directives/sync/sync.ts"
|
|
4142
|
-
}
|
|
4143
|
-
},
|
|
4144
|
-
{
|
|
4145
|
-
"kind": "js",
|
|
4146
|
-
"name": "sync",
|
|
4147
|
-
"declaration": {
|
|
4148
|
-
"name": "sync",
|
|
4149
|
-
"module": "src/directives/sync/sync.ts"
|
|
4150
|
-
}
|
|
4151
|
-
}
|
|
4152
|
-
]
|
|
4153
|
-
},
|
|
4154
|
-
{
|
|
4155
|
-
"kind": "javascript-module",
|
|
4156
|
-
"path": "src/directives/when-else/index.ts",
|
|
4157
|
-
"declarations": [],
|
|
4158
|
-
"exports": [
|
|
4159
|
-
{
|
|
4160
|
-
"kind": "js",
|
|
4161
|
-
"name": "*",
|
|
4162
|
-
"declaration": {
|
|
4163
|
-
"name": "*",
|
|
4164
|
-
"package": "./when-else"
|
|
4165
|
-
}
|
|
4166
|
-
}
|
|
4167
|
-
]
|
|
4168
|
-
},
|
|
4169
|
-
{
|
|
4170
|
-
"kind": "javascript-module",
|
|
4171
|
-
"path": "src/directives/when-else/when-else.ts",
|
|
4172
|
-
"declarations": [
|
|
4173
|
-
{
|
|
4174
|
-
"kind": "function",
|
|
4175
|
-
"name": "whenElse",
|
|
4176
|
-
"return": {
|
|
4177
|
-
"type": {
|
|
4178
|
-
"text": "CaptureType<TSource>"
|
|
4179
|
-
}
|
|
4180
|
-
},
|
|
4181
|
-
"parameters": [
|
|
4182
|
-
{
|
|
4183
|
-
"name": "binding",
|
|
4184
|
-
"type": {
|
|
4185
|
-
"text": "Binding<TSource, TReturn>"
|
|
4186
|
-
},
|
|
4187
|
-
"description": "The condition to test for rendering."
|
|
4188
|
-
},
|
|
4189
|
-
{
|
|
4190
|
-
"name": "trueTemplateOrTemplateBinding",
|
|
4191
|
-
"type": {
|
|
4192
|
-
"text": "WhenTemplate<TSource>"
|
|
4193
|
-
},
|
|
4194
|
-
"description": "The template or a binding that gets the template to render when the condition is true."
|
|
4195
|
-
},
|
|
4196
|
-
{
|
|
4197
|
-
"name": "falseTemplateOrTemplateBinding",
|
|
4198
|
-
"type": {
|
|
4199
|
-
"text": "WhenTemplate<TSource>"
|
|
4200
|
-
},
|
|
4201
|
-
"description": "The template or a binding that gets the template to render when the condition is false."
|
|
4202
|
-
}
|
|
4203
|
-
],
|
|
4204
|
-
"description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
|
|
4205
|
-
"privacy": "public"
|
|
4206
|
-
}
|
|
4207
|
-
],
|
|
4208
|
-
"exports": [
|
|
4209
|
-
{
|
|
4210
|
-
"kind": "js",
|
|
4211
|
-
"name": "whenElse",
|
|
4212
|
-
"declaration": {
|
|
4213
|
-
"name": "whenElse",
|
|
4214
|
-
"module": "src/directives/when-else/when-else.ts"
|
|
4215
|
-
}
|
|
4216
|
-
}
|
|
4217
|
-
]
|
|
4218
|
-
},
|
|
4219
4141
|
{
|
|
4220
4142
|
"kind": "javascript-module",
|
|
4221
4143
|
"path": "src/encoding/base64/decode.ts",
|
|
@@ -4370,6 +4292,160 @@
|
|
|
4370
4292
|
}
|
|
4371
4293
|
]
|
|
4372
4294
|
},
|
|
4295
|
+
{
|
|
4296
|
+
"kind": "javascript-module",
|
|
4297
|
+
"path": "src/directives/sync/index.ts",
|
|
4298
|
+
"declarations": [],
|
|
4299
|
+
"exports": [
|
|
4300
|
+
{
|
|
4301
|
+
"kind": "js",
|
|
4302
|
+
"name": "*",
|
|
4303
|
+
"declaration": {
|
|
4304
|
+
"name": "*",
|
|
4305
|
+
"package": "./sync"
|
|
4306
|
+
}
|
|
4307
|
+
}
|
|
4308
|
+
]
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
"kind": "javascript-module",
|
|
4312
|
+
"path": "src/directives/sync/sync.ts",
|
|
4313
|
+
"declarations": [
|
|
4314
|
+
{
|
|
4315
|
+
"kind": "variable",
|
|
4316
|
+
"name": "defaultEventMap",
|
|
4317
|
+
"type": {
|
|
4318
|
+
"text": "Map<string, EventName>"
|
|
4319
|
+
},
|
|
4320
|
+
"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])",
|
|
4321
|
+
"description": "A map that associates specific HTML element tags with their corresponding default event names.",
|
|
4322
|
+
"privacy": "public"
|
|
4323
|
+
},
|
|
4324
|
+
{
|
|
4325
|
+
"kind": "function",
|
|
4326
|
+
"name": "sync",
|
|
4327
|
+
"return": {
|
|
4328
|
+
"type": {
|
|
4329
|
+
"text": "CaptureType<TSource>"
|
|
4330
|
+
}
|
|
4331
|
+
},
|
|
4332
|
+
"parameters": [
|
|
4333
|
+
{
|
|
4334
|
+
"name": "binding",
|
|
4335
|
+
"type": {
|
|
4336
|
+
"text": "Binding<TSource, TReturn>"
|
|
4337
|
+
}
|
|
4338
|
+
},
|
|
4339
|
+
{
|
|
4340
|
+
"name": "conversionType",
|
|
4341
|
+
"default": "'string'",
|
|
4342
|
+
"type": {
|
|
4343
|
+
"text": "ConversionType"
|
|
4344
|
+
}
|
|
4345
|
+
},
|
|
4346
|
+
{
|
|
4347
|
+
"name": "eventName",
|
|
4348
|
+
"default": "'default'",
|
|
4349
|
+
"type": {
|
|
4350
|
+
"text": "EventName"
|
|
4351
|
+
}
|
|
4352
|
+
},
|
|
4353
|
+
{
|
|
4354
|
+
"name": "keyAttr",
|
|
4355
|
+
"optional": true,
|
|
4356
|
+
"type": {
|
|
4357
|
+
"text": "string"
|
|
4358
|
+
}
|
|
4359
|
+
}
|
|
4360
|
+
],
|
|
4361
|
+
"description": "Creates a synchronization directive that binds a data source to an HTML element,",
|
|
4362
|
+
"privacy": "public"
|
|
4363
|
+
}
|
|
4364
|
+
],
|
|
4365
|
+
"exports": [
|
|
4366
|
+
{
|
|
4367
|
+
"kind": "js",
|
|
4368
|
+
"name": "defaultEventMap",
|
|
4369
|
+
"declaration": {
|
|
4370
|
+
"name": "defaultEventMap",
|
|
4371
|
+
"module": "src/directives/sync/sync.ts"
|
|
4372
|
+
}
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
"kind": "js",
|
|
4376
|
+
"name": "sync",
|
|
4377
|
+
"declaration": {
|
|
4378
|
+
"name": "sync",
|
|
4379
|
+
"module": "src/directives/sync/sync.ts"
|
|
4380
|
+
}
|
|
4381
|
+
}
|
|
4382
|
+
]
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
"kind": "javascript-module",
|
|
4386
|
+
"path": "src/directives/when-else/index.ts",
|
|
4387
|
+
"declarations": [],
|
|
4388
|
+
"exports": [
|
|
4389
|
+
{
|
|
4390
|
+
"kind": "js",
|
|
4391
|
+
"name": "*",
|
|
4392
|
+
"declaration": {
|
|
4393
|
+
"name": "*",
|
|
4394
|
+
"package": "./when-else"
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
]
|
|
4398
|
+
},
|
|
4399
|
+
{
|
|
4400
|
+
"kind": "javascript-module",
|
|
4401
|
+
"path": "src/directives/when-else/when-else.ts",
|
|
4402
|
+
"declarations": [
|
|
4403
|
+
{
|
|
4404
|
+
"kind": "function",
|
|
4405
|
+
"name": "whenElse",
|
|
4406
|
+
"return": {
|
|
4407
|
+
"type": {
|
|
4408
|
+
"text": "CaptureType<TSource>"
|
|
4409
|
+
}
|
|
4410
|
+
},
|
|
4411
|
+
"parameters": [
|
|
4412
|
+
{
|
|
4413
|
+
"name": "binding",
|
|
4414
|
+
"type": {
|
|
4415
|
+
"text": "Binding<TSource, TReturn>"
|
|
4416
|
+
},
|
|
4417
|
+
"description": "The condition to test for rendering."
|
|
4418
|
+
},
|
|
4419
|
+
{
|
|
4420
|
+
"name": "trueTemplateOrTemplateBinding",
|
|
4421
|
+
"type": {
|
|
4422
|
+
"text": "WhenTemplate<TSource>"
|
|
4423
|
+
},
|
|
4424
|
+
"description": "The template or a binding that gets the template to render when the condition is true."
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
"name": "falseTemplateOrTemplateBinding",
|
|
4428
|
+
"type": {
|
|
4429
|
+
"text": "WhenTemplate<TSource>"
|
|
4430
|
+
},
|
|
4431
|
+
"description": "The template or a binding that gets the template to render when the condition is false."
|
|
4432
|
+
}
|
|
4433
|
+
],
|
|
4434
|
+
"description": "Directive that allows supplying an \"else\" template to the traditional https://www.fast.design/docs/api/fast-element.when/#when-function directive",
|
|
4435
|
+
"privacy": "public"
|
|
4436
|
+
}
|
|
4437
|
+
],
|
|
4438
|
+
"exports": [
|
|
4439
|
+
{
|
|
4440
|
+
"kind": "js",
|
|
4441
|
+
"name": "whenElse",
|
|
4442
|
+
"declaration": {
|
|
4443
|
+
"name": "whenElse",
|
|
4444
|
+
"module": "src/directives/when-else/when-else.ts"
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4447
|
+
]
|
|
4448
|
+
},
|
|
4373
4449
|
{
|
|
4374
4450
|
"kind": "javascript-module",
|
|
4375
4451
|
"path": "src/mappers/dto/index.ts",
|
|
@@ -1 +1 @@
|
|
|
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"}
|
|
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;AACzB,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A no-operation function that executes an optional callback.
|
|
3
|
+
*
|
|
4
|
+
* This is a lower-level utility function. For preventing tree-shaking of custom elements,
|
|
5
|
+
* prefer using {@link avoidTreeShaking} which provides a more explicit API.
|
|
6
|
+
*
|
|
7
|
+
* @param callback - An optional function to execute for its side effects.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export declare const noop: (fn?: () => void) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Explicitly prevents tree-shaking of custom element classes by referencing them.
|
|
13
|
+
*
|
|
14
|
+
* Bundlers may incorrectly remove code that it thinks has no side effects,
|
|
15
|
+
* such as custom element definitions that are only referenced in templates.
|
|
16
|
+
* By passing these classes to `avoidTreeShaking`, we create a side effect
|
|
17
|
+
* that signals to the bundler to preserve the code.
|
|
18
|
+
*
|
|
19
|
+
* @param classes - One or more custom element classes that should not be tree-shaken.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare const avoidTreeShaking: (...classes: unknown[]) => void;
|
|
23
|
+
//# sourceMappingURL=noop.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noop.d.ts","sourceRoot":"","sources":["../../../src/utils/noop.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,GAAI,KAAK,MAAM,IAAI,KAAG,IAEtC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,GAAI,GAAG,SAAS,OAAO,EAAE,KAAG,IAOxD,CAAC"}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A no-operation function that executes an optional callback.
|
|
3
|
+
*
|
|
4
|
+
* This is a lower-level utility function. For preventing tree-shaking of custom elements,
|
|
5
|
+
* prefer using {@link avoidTreeShaking} which provides a more explicit API.
|
|
6
|
+
*
|
|
7
|
+
* @param callback - An optional function to execute for its side effects.
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
export const noop = (fn) => {
|
|
11
|
+
fn === null || fn === void 0 ? void 0 : fn();
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Explicitly prevents tree-shaking of custom element classes by referencing them.
|
|
15
|
+
*
|
|
16
|
+
* Bundlers may incorrectly remove code that it thinks has no side effects,
|
|
17
|
+
* such as custom element definitions that are only referenced in templates.
|
|
18
|
+
* By passing these classes to `avoidTreeShaking`, we create a side effect
|
|
19
|
+
* that signals to the bundler to preserve the code.
|
|
20
|
+
*
|
|
21
|
+
* @param classes - One or more custom element classes that should not be tree-shaken.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export const avoidTreeShaking = (...classes) => {
|
|
25
|
+
noop(() => {
|
|
26
|
+
// Reference each class to prevent tree-shaking
|
|
27
|
+
classes.forEach((cls) => {
|
|
28
|
+
void cls;
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
};
|
|
@@ -297,6 +297,47 @@
|
|
|
297
297
|
],
|
|
298
298
|
"name": "assureDesignSystem"
|
|
299
299
|
},
|
|
300
|
+
{
|
|
301
|
+
"kind": "Function",
|
|
302
|
+
"canonicalReference": "@genesislcap/foundation-utils!avoidTreeShaking:function(1)",
|
|
303
|
+
"docComment": "/**\n * Explicitly prevents tree-shaking of custom element classes by referencing them.\n *\n * Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`, we create a side effect that signals to the bundler to preserve the code.\n *\n * @param classes - One or more custom element classes that should not be tree-shaken.\n *\n * @public\n */\n",
|
|
304
|
+
"excerptTokens": [
|
|
305
|
+
{
|
|
306
|
+
"kind": "Content",
|
|
307
|
+
"text": "avoidTreeShaking: (...classes: "
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"kind": "Content",
|
|
311
|
+
"text": "unknown[]"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
"kind": "Content",
|
|
315
|
+
"text": ") => "
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"kind": "Content",
|
|
319
|
+
"text": "void"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"fileUrlPath": "src/utils/noop.ts",
|
|
323
|
+
"returnTypeTokenRange": {
|
|
324
|
+
"startIndex": 3,
|
|
325
|
+
"endIndex": 4
|
|
326
|
+
},
|
|
327
|
+
"releaseTag": "Public",
|
|
328
|
+
"overloadIndex": 1,
|
|
329
|
+
"parameters": [
|
|
330
|
+
{
|
|
331
|
+
"parameterName": "classes",
|
|
332
|
+
"parameterTypeTokenRange": {
|
|
333
|
+
"startIndex": 1,
|
|
334
|
+
"endIndex": 2
|
|
335
|
+
},
|
|
336
|
+
"isOptional": false
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"name": "avoidTreeShaking"
|
|
340
|
+
},
|
|
300
341
|
{
|
|
301
342
|
"kind": "Variable",
|
|
302
343
|
"canonicalReference": "@genesislcap/foundation-utils!BUILDER:var",
|
|
@@ -12257,6 +12298,47 @@
|
|
|
12257
12298
|
],
|
|
12258
12299
|
"name": "mapJsonSchemaFieldToExprBuilderField"
|
|
12259
12300
|
},
|
|
12301
|
+
{
|
|
12302
|
+
"kind": "Function",
|
|
12303
|
+
"canonicalReference": "@genesislcap/foundation-utils!noop:function(1)",
|
|
12304
|
+
"docComment": "/**\n * A no-operation function that executes an optional callback.\n *\n * This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using {@link avoidTreeShaking} which provides a more explicit API.\n *\n * @param callback - An optional function to execute for its side effects.\n *\n * @public\n */\n",
|
|
12305
|
+
"excerptTokens": [
|
|
12306
|
+
{
|
|
12307
|
+
"kind": "Content",
|
|
12308
|
+
"text": "noop: (fn?: "
|
|
12309
|
+
},
|
|
12310
|
+
{
|
|
12311
|
+
"kind": "Content",
|
|
12312
|
+
"text": "() => void"
|
|
12313
|
+
},
|
|
12314
|
+
{
|
|
12315
|
+
"kind": "Content",
|
|
12316
|
+
"text": ") => "
|
|
12317
|
+
},
|
|
12318
|
+
{
|
|
12319
|
+
"kind": "Content",
|
|
12320
|
+
"text": "void"
|
|
12321
|
+
}
|
|
12322
|
+
],
|
|
12323
|
+
"fileUrlPath": "src/utils/noop.ts",
|
|
12324
|
+
"returnTypeTokenRange": {
|
|
12325
|
+
"startIndex": 3,
|
|
12326
|
+
"endIndex": 4
|
|
12327
|
+
},
|
|
12328
|
+
"releaseTag": "Public",
|
|
12329
|
+
"overloadIndex": 1,
|
|
12330
|
+
"parameters": [
|
|
12331
|
+
{
|
|
12332
|
+
"parameterName": "fn",
|
|
12333
|
+
"parameterTypeTokenRange": {
|
|
12334
|
+
"startIndex": 1,
|
|
12335
|
+
"endIndex": 2
|
|
12336
|
+
},
|
|
12337
|
+
"isOptional": true
|
|
12338
|
+
}
|
|
12339
|
+
],
|
|
12340
|
+
"name": "noop"
|
|
12341
|
+
},
|
|
12260
12342
|
{
|
|
12261
12343
|
"kind": "Class",
|
|
12262
12344
|
"canonicalReference": "@genesislcap/foundation-utils!NumberParser:class",
|
|
@@ -77,6 +77,19 @@ export declare let API_HOST: string;
|
|
|
77
77
|
*/
|
|
78
78
|
export declare function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Explicitly prevents tree-shaking of custom element classes by referencing them.
|
|
82
|
+
*
|
|
83
|
+
* Bundlers may incorrectly remove code that it thinks has no side effects,
|
|
84
|
+
* such as custom element definitions that are only referenced in templates.
|
|
85
|
+
* By passing these classes to `avoidTreeShaking`, we create a side effect
|
|
86
|
+
* that signals to the bundler to preserve the code.
|
|
87
|
+
*
|
|
88
|
+
* @param classes - One or more custom element classes that should not be tree-shaken.
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export declare const avoidTreeShaking: (...classes: unknown[]) => void;
|
|
92
|
+
|
|
80
93
|
/**
|
|
81
94
|
* @internal
|
|
82
95
|
*/
|
|
@@ -1479,6 +1492,17 @@ string,
|
|
|
1479
1492
|
Genesis.FieldJsonSchema
|
|
1480
1493
|
]): Types.Field | null;
|
|
1481
1494
|
|
|
1495
|
+
/**
|
|
1496
|
+
* A no-operation function that executes an optional callback.
|
|
1497
|
+
*
|
|
1498
|
+
* This is a lower-level utility function. For preventing tree-shaking of custom elements,
|
|
1499
|
+
* prefer using {@link avoidTreeShaking} which provides a more explicit API.
|
|
1500
|
+
*
|
|
1501
|
+
* @param callback - An optional function to execute for its side effects.
|
|
1502
|
+
* @public
|
|
1503
|
+
*/
|
|
1504
|
+
export declare const noop: (fn?: () => void) => void;
|
|
1505
|
+
|
|
1482
1506
|
/**
|
|
1483
1507
|
* @public
|
|
1484
1508
|
*/
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [avoidTreeShaking](./foundation-utils.avoidtreeshaking.md)
|
|
4
|
+
|
|
5
|
+
## avoidTreeShaking() function
|
|
6
|
+
|
|
7
|
+
Explicitly prevents tree-shaking of custom element classes by referencing them.
|
|
8
|
+
|
|
9
|
+
Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`<!-- -->, we create a side effect that signals to the bundler to preserve the code.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
avoidTreeShaking: (...classes: unknown[]) => void
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
<table><thead><tr><th>
|
|
20
|
+
|
|
21
|
+
Parameter
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Type
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</th><th>
|
|
30
|
+
|
|
31
|
+
Description
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</th></tr></thead>
|
|
35
|
+
<tbody><tr><td>
|
|
36
|
+
|
|
37
|
+
classes
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
</td><td>
|
|
41
|
+
|
|
42
|
+
unknown\[\]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
One or more custom element classes that should not be tree-shaken.
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
</tbody></table>
|
|
52
|
+
|
|
53
|
+
**Returns:**
|
|
54
|
+
|
|
55
|
+
void
|
|
56
|
+
|
|
@@ -192,6 +192,19 @@ Description
|
|
|
192
192
|
assureDesignSystem.
|
|
193
193
|
|
|
194
194
|
|
|
195
|
+
</td></tr>
|
|
196
|
+
<tr><td>
|
|
197
|
+
|
|
198
|
+
[avoidTreeShaking(classes)](./foundation-utils.avoidtreeshaking.md)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
</td><td>
|
|
202
|
+
|
|
203
|
+
Explicitly prevents tree-shaking of custom element classes by referencing them.
|
|
204
|
+
|
|
205
|
+
Bundlers may incorrectly remove code that it thinks has no side effects, such as custom element definitions that are only referenced in templates. By passing these classes to `avoidTreeShaking`<!-- -->, we create a side effect that signals to the bundler to preserve the code.
|
|
206
|
+
|
|
207
|
+
|
|
195
208
|
</td></tr>
|
|
196
209
|
<tr><td>
|
|
197
210
|
|
|
@@ -542,6 +555,19 @@ Maps fields contained in a JSON schema block enhanced with genesisType metadata
|
|
|
542
555
|
Only sets the properties that are \*required\*. Optional properties, such as `defaultValue`<!-- -->, must be explicitly set by the user separately.
|
|
543
556
|
|
|
544
557
|
|
|
558
|
+
</td></tr>
|
|
559
|
+
<tr><td>
|
|
560
|
+
|
|
561
|
+
[noop(fn)](./foundation-utils.noop.md)
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
</td><td>
|
|
565
|
+
|
|
566
|
+
A no-operation function that executes an optional callback.
|
|
567
|
+
|
|
568
|
+
This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using [avoidTreeShaking()](./foundation-utils.avoidtreeshaking.md) which provides a more explicit API.
|
|
569
|
+
|
|
570
|
+
|
|
545
571
|
</td></tr>
|
|
546
572
|
<tr><td>
|
|
547
573
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [noop](./foundation-utils.noop.md)
|
|
4
|
+
|
|
5
|
+
## noop() function
|
|
6
|
+
|
|
7
|
+
A no-operation function that executes an optional callback.
|
|
8
|
+
|
|
9
|
+
This is a lower-level utility function. For preventing tree-shaking of custom elements, prefer using [avoidTreeShaking()](./foundation-utils.avoidtreeshaking.md) which provides a more explicit API.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
noop: (fn?: () => void) => void
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Parameters
|
|
18
|
+
|
|
19
|
+
<table><thead><tr><th>
|
|
20
|
+
|
|
21
|
+
Parameter
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
</th><th>
|
|
25
|
+
|
|
26
|
+
Type
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
</th><th>
|
|
30
|
+
|
|
31
|
+
Description
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
</th></tr></thead>
|
|
35
|
+
<tbody><tr><td>
|
|
36
|
+
|
|
37
|
+
fn
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
</td><td>
|
|
41
|
+
|
|
42
|
+
() => void
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
</td><td>
|
|
46
|
+
|
|
47
|
+
_(Optional)_
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
</td></tr>
|
|
51
|
+
</tbody></table>
|
|
52
|
+
|
|
53
|
+
**Returns:**
|
|
54
|
+
|
|
55
|
+
void
|
|
56
|
+
|
|
@@ -35,6 +35,9 @@ export let API_HOST: string;
|
|
|
35
35
|
// @public
|
|
36
36
|
export function assureDesignSystem(module: DesignSystemModule): DesignSystemModule;
|
|
37
37
|
|
|
38
|
+
// @public
|
|
39
|
+
export const avoidTreeShaking: (...classes: unknown[]) => void;
|
|
40
|
+
|
|
38
41
|
// Warning: (ae-internal-missing-underscore) The name "BIG_INT_64_BITS" should be prefixed with an underscore because the declaration is marked as @internal
|
|
39
42
|
//
|
|
40
43
|
// @internal (undocumented)
|
|
@@ -973,6 +976,9 @@ string,
|
|
|
973
976
|
Genesis.FieldJsonSchema
|
|
974
977
|
]): Types.Field | null;
|
|
975
978
|
|
|
979
|
+
// @public
|
|
980
|
+
export const noop: (fn?: () => void) => void;
|
|
981
|
+
|
|
976
982
|
// @public (undocumented)
|
|
977
983
|
export class NumberParser {
|
|
978
984
|
constructor(locale: string);
|
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.
|
|
4
|
+
"version": "14.388.0",
|
|
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.
|
|
31
|
-
"@genesislcap/genx": "14.
|
|
32
|
-
"@genesislcap/rollup-builder": "14.
|
|
33
|
-
"@genesislcap/ts-builder": "14.
|
|
34
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
35
|
-
"@genesislcap/vite-builder": "14.
|
|
36
|
-
"@genesislcap/webpack-builder": "14.
|
|
30
|
+
"@genesislcap/foundation-testing": "14.388.0",
|
|
31
|
+
"@genesislcap/genx": "14.388.0",
|
|
32
|
+
"@genesislcap/rollup-builder": "14.388.0",
|
|
33
|
+
"@genesislcap/ts-builder": "14.388.0",
|
|
34
|
+
"@genesislcap/uvu-playwright-builder": "14.388.0",
|
|
35
|
+
"@genesislcap/vite-builder": "14.388.0",
|
|
36
|
+
"@genesislcap/webpack-builder": "14.388.0",
|
|
37
37
|
"@types/json-schema": "^7.0.11"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@genesislcap/expression-builder": "14.
|
|
41
|
-
"@genesislcap/foundation-logger": "14.
|
|
40
|
+
"@genesislcap/expression-builder": "14.388.0",
|
|
41
|
+
"@genesislcap/foundation-logger": "14.388.0",
|
|
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": "
|
|
59
|
+
"gitHead": "f89254b450f163535a403149dd4c0631641115d3"
|
|
60
60
|
}
|