@genesislcap/foundation-utils 14.405.0 → 14.406.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.
@@ -7,6 +7,14 @@
7
7
  "path": "src/index.ts",
8
8
  "declarations": [],
9
9
  "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "package": "./converters"
16
+ }
17
+ },
10
18
  {
11
19
  "kind": "js",
12
20
  "name": "*",
@@ -201,6 +209,47 @@
201
209
  }
202
210
  ]
203
211
  },
212
+ {
213
+ "kind": "javascript-module",
214
+ "path": "src/converters/index.ts",
215
+ "declarations": [],
216
+ "exports": [
217
+ {
218
+ "kind": "js",
219
+ "name": "*",
220
+ "declaration": {
221
+ "name": "*",
222
+ "package": "./string-array-converter"
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "kind": "javascript-module",
229
+ "path": "src/converters/string-array-converter.ts",
230
+ "declarations": [
231
+ {
232
+ "kind": "variable",
233
+ "name": "stringArrayConverter",
234
+ "type": {
235
+ "text": "ValueConverter"
236
+ },
237
+ "default": "{\n fromView(v: string): string | string[] | undefined {\n if (!v?.trim()) return undefined;\n return v.includes(',') ? v.split(',').map((s) => s.trim()) : v.trim();\n },\n toView(v: string | string[] | undefined): string {\n if (typeof v === 'string') return v;\n if (Array.isArray(v)) return v.join(',');\n return '';\n },\n}",
238
+ "description": "A @microsoft/fast-element#ValueConverter that converts between comma-separated string attributes\nand `string | string[]` properties.",
239
+ "privacy": "public"
240
+ }
241
+ ],
242
+ "exports": [
243
+ {
244
+ "kind": "js",
245
+ "name": "stringArrayConverter",
246
+ "declaration": {
247
+ "name": "stringArrayConverter",
248
+ "module": "src/converters/string-array-converter.ts"
249
+ }
250
+ }
251
+ ]
252
+ },
204
253
  {
205
254
  "kind": "javascript-module",
206
255
  "path": "src/data/inMemoryDatabase.ts",
@@ -401,30 +450,112 @@
401
450
  },
402
451
  {
403
452
  "kind": "javascript-module",
404
- "path": "src/directives/index.ts",
405
- "declarations": [],
453
+ "path": "src/design-system/design-system.ts",
454
+ "declarations": [
455
+ {
456
+ "kind": "function",
457
+ "name": "assureDesignSystem",
458
+ "return": {
459
+ "type": {
460
+ "text": "DesignSystemModule"
461
+ }
462
+ },
463
+ "parameters": [
464
+ {
465
+ "name": "module",
466
+ "type": {
467
+ "text": "DesignSystemModule"
468
+ }
469
+ }
470
+ ],
471
+ "description": "assureDesignSystem.",
472
+ "privacy": "public"
473
+ },
474
+ {
475
+ "kind": "function",
476
+ "name": "getCurrentDesignSystem",
477
+ "return": {
478
+ "type": {
479
+ "text": ""
480
+ }
481
+ },
482
+ "parameters": [
483
+ {
484
+ "name": "element",
485
+ "type": {
486
+ "text": "HTMLElement"
487
+ },
488
+ "description": "The starting HTML element"
489
+ },
490
+ {
491
+ "name": "fallbackPrefix",
492
+ "type": {
493
+ "text": "string"
494
+ },
495
+ "description": "The prefix to fallback to if the provider is not available"
496
+ }
497
+ ],
498
+ "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
499
+ "privacy": "public"
500
+ },
501
+ {
502
+ "kind": "function",
503
+ "name": "getCurrentDesignSystemPrefix",
504
+ "return": {
505
+ "type": {
506
+ "text": ""
507
+ }
508
+ },
509
+ "parameters": [
510
+ {
511
+ "name": "element",
512
+ "type": {
513
+ "text": "HTMLElement"
514
+ },
515
+ "description": "The starting HTML element"
516
+ },
517
+ {
518
+ "name": "fallbackPrefix",
519
+ "type": {
520
+ "text": "string"
521
+ },
522
+ "description": "The prefix to fallback to if the provider is not available"
523
+ }
524
+ ],
525
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
526
+ "privacy": "public"
527
+ }
528
+ ],
406
529
  "exports": [
407
530
  {
408
531
  "kind": "js",
409
- "name": "*",
532
+ "name": "assureDesignSystem",
410
533
  "declaration": {
411
- "name": "*",
412
- "package": "./sync"
534
+ "name": "assureDesignSystem",
535
+ "module": "src/design-system/design-system.ts"
413
536
  }
414
537
  },
415
538
  {
416
539
  "kind": "js",
417
- "name": "*",
540
+ "name": "getCurrentDesignSystem",
418
541
  "declaration": {
419
- "name": "*",
420
- "package": "./when-else"
542
+ "name": "getCurrentDesignSystem",
543
+ "module": "src/design-system/design-system.ts"
544
+ }
545
+ },
546
+ {
547
+ "kind": "js",
548
+ "name": "getCurrentDesignSystemPrefix",
549
+ "declaration": {
550
+ "name": "getCurrentDesignSystemPrefix",
551
+ "module": "src/design-system/design-system.ts"
421
552
  }
422
553
  }
423
554
  ]
424
555
  },
425
556
  {
426
557
  "kind": "javascript-module",
427
- "path": "src/encoding/index.ts",
558
+ "path": "src/design-system/index.ts",
428
559
  "declarations": [],
429
560
  "exports": [
430
561
  {
@@ -432,7 +563,7 @@
432
563
  "name": "*",
433
564
  "declaration": {
434
565
  "name": "*",
435
- "package": "./base64"
566
+ "package": "./design-system"
436
567
  }
437
568
  }
438
569
  ]
@@ -490,6 +621,44 @@
490
621
  }
491
622
  ]
492
623
  },
624
+ {
625
+ "kind": "javascript-module",
626
+ "path": "src/directives/index.ts",
627
+ "declarations": [],
628
+ "exports": [
629
+ {
630
+ "kind": "js",
631
+ "name": "*",
632
+ "declaration": {
633
+ "name": "*",
634
+ "package": "./sync"
635
+ }
636
+ },
637
+ {
638
+ "kind": "js",
639
+ "name": "*",
640
+ "declaration": {
641
+ "name": "*",
642
+ "package": "./when-else"
643
+ }
644
+ }
645
+ ]
646
+ },
647
+ {
648
+ "kind": "javascript-module",
649
+ "path": "src/encoding/index.ts",
650
+ "declarations": [],
651
+ "exports": [
652
+ {
653
+ "kind": "js",
654
+ "name": "*",
655
+ "declaration": {
656
+ "name": "*",
657
+ "package": "./base64"
658
+ }
659
+ }
660
+ ]
661
+ },
493
662
  {
494
663
  "kind": "javascript-module",
495
664
  "path": "src/env/index.ts",
@@ -1164,126 +1333,6 @@
1164
1333
  }
1165
1334
  ]
1166
1335
  },
1167
- {
1168
- "kind": "javascript-module",
1169
- "path": "src/design-system/design-system.ts",
1170
- "declarations": [
1171
- {
1172
- "kind": "function",
1173
- "name": "assureDesignSystem",
1174
- "return": {
1175
- "type": {
1176
- "text": "DesignSystemModule"
1177
- }
1178
- },
1179
- "parameters": [
1180
- {
1181
- "name": "module",
1182
- "type": {
1183
- "text": "DesignSystemModule"
1184
- }
1185
- }
1186
- ],
1187
- "description": "assureDesignSystem.",
1188
- "privacy": "public"
1189
- },
1190
- {
1191
- "kind": "function",
1192
- "name": "getCurrentDesignSystem",
1193
- "return": {
1194
- "type": {
1195
- "text": ""
1196
- }
1197
- },
1198
- "parameters": [
1199
- {
1200
- "name": "element",
1201
- "type": {
1202
- "text": "HTMLElement"
1203
- },
1204
- "description": "The starting HTML element"
1205
- },
1206
- {
1207
- "name": "fallbackPrefix",
1208
- "type": {
1209
- "text": "string"
1210
- },
1211
- "description": "The prefix to fallback to if the provider is not available"
1212
- }
1213
- ],
1214
- "description": "Get the current design system provider element and prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1215
- "privacy": "public"
1216
- },
1217
- {
1218
- "kind": "function",
1219
- "name": "getCurrentDesignSystemPrefix",
1220
- "return": {
1221
- "type": {
1222
- "text": ""
1223
- }
1224
- },
1225
- "parameters": [
1226
- {
1227
- "name": "element",
1228
- "type": {
1229
- "text": "HTMLElement"
1230
- },
1231
- "description": "The starting HTML element"
1232
- },
1233
- {
1234
- "name": "fallbackPrefix",
1235
- "type": {
1236
- "text": "string"
1237
- },
1238
- "description": "The prefix to fallback to if the provider is not available"
1239
- }
1240
- ],
1241
- "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1242
- "privacy": "public"
1243
- }
1244
- ],
1245
- "exports": [
1246
- {
1247
- "kind": "js",
1248
- "name": "assureDesignSystem",
1249
- "declaration": {
1250
- "name": "assureDesignSystem",
1251
- "module": "src/design-system/design-system.ts"
1252
- }
1253
- },
1254
- {
1255
- "kind": "js",
1256
- "name": "getCurrentDesignSystem",
1257
- "declaration": {
1258
- "name": "getCurrentDesignSystem",
1259
- "module": "src/design-system/design-system.ts"
1260
- }
1261
- },
1262
- {
1263
- "kind": "js",
1264
- "name": "getCurrentDesignSystemPrefix",
1265
- "declaration": {
1266
- "name": "getCurrentDesignSystemPrefix",
1267
- "module": "src/design-system/design-system.ts"
1268
- }
1269
- }
1270
- ]
1271
- },
1272
- {
1273
- "kind": "javascript-module",
1274
- "path": "src/design-system/index.ts",
1275
- "declarations": [],
1276
- "exports": [
1277
- {
1278
- "kind": "js",
1279
- "name": "*",
1280
- "declaration": {
1281
- "name": "*",
1282
- "package": "./design-system"
1283
- }
1284
- }
1285
- ]
1286
- },
1287
1336
  {
1288
1337
  "kind": "javascript-module",
1289
1338
  "path": "src/feature-flags/featureFlags.ts",
@@ -0,0 +1,2 @@
1
+ export * from './string-array-converter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/converters/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { ValueConverter } from '@microsoft/fast-element';
2
+ /**
3
+ * A {@link @microsoft/fast-element#ValueConverter} that converts between comma-separated string attributes
4
+ * and `string | string[]` properties.
5
+ *
6
+ * @remarks
7
+ * - fromView: "A,B,C" → ["A","B","C"], "A" → "A", "" → undefined
8
+ * - toView: ["A","B","C"] → "A,B,C", "A" → "A", undefined → ""
9
+ *
10
+ * @public
11
+ */
12
+ export declare const stringArrayConverter: ValueConverter;
13
+ //# sourceMappingURL=string-array-converter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string-array-converter.d.ts","sourceRoot":"","sources":["../../../src/converters/string-array-converter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAUlC,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from './converters';
1
2
  export * from './data';
2
3
  export * from './decorators';
3
4
  export * from './design-system';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './string-array-converter';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A {@link @microsoft/fast-element#ValueConverter} that converts between comma-separated string attributes
3
+ * and `string | string[]` properties.
4
+ *
5
+ * @remarks
6
+ * - fromView: "A,B,C" → ["A","B","C"], "A" → "A", "" → undefined
7
+ * - toView: ["A","B","C"] → "A,B,C", "A" → "A", undefined → ""
8
+ *
9
+ * @public
10
+ */
11
+ export const stringArrayConverter = {
12
+ fromView(v) {
13
+ if (!(v === null || v === void 0 ? void 0 : v.trim()))
14
+ return undefined;
15
+ return v.includes(',') ? v.split(',').map((s) => s.trim()) : v.trim();
16
+ },
17
+ toView(v) {
18
+ if (typeof v === 'string')
19
+ return v;
20
+ if (Array.isArray(v))
21
+ return v.join(',');
22
+ return '';
23
+ },
24
+ };
package/dist/esm/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './converters';
1
2
  export * from './data';
2
3
  export * from './decorators';
3
4
  export * from './design-system';
@@ -18938,6 +18938,30 @@
18938
18938
  "endIndex": 2
18939
18939
  }
18940
18940
  },
18941
+ {
18942
+ "kind": "Variable",
18943
+ "canonicalReference": "@genesislcap/foundation-utils!stringArrayConverter:var",
18944
+ "docComment": "/**\n * A {@link @microsoft/fast-element#ValueConverter} that converts between comma-separated string attributes and `string | string[]` properties.\n *\n * @remarks\n *\n * - fromView: \"A,B,C\" → [\"A\",\"B\",\"C\"], \"A\" → \"A\", \"\" → undefined - toView: [\"A\",\"B\",\"C\"] → \"A,B,C\", \"A\" → \"A\", undefined → \"\"\n *\n * @public\n */\n",
18945
+ "excerptTokens": [
18946
+ {
18947
+ "kind": "Content",
18948
+ "text": "stringArrayConverter: "
18949
+ },
18950
+ {
18951
+ "kind": "Reference",
18952
+ "text": "ValueConverter",
18953
+ "canonicalReference": "@microsoft/fast-element!ValueConverter:interface"
18954
+ }
18955
+ ],
18956
+ "fileUrlPath": "src/converters/string-array-converter.ts",
18957
+ "isReadonly": true,
18958
+ "releaseTag": "Public",
18959
+ "name": "stringArrayConverter",
18960
+ "variableTypeTokenRange": {
18961
+ "startIndex": 1,
18962
+ "endIndex": 2
18963
+ }
18964
+ },
18941
18965
  {
18942
18966
  "kind": "TypeAlias",
18943
18967
  "canonicalReference": "@genesislcap/foundation-utils!Subscribe:type",
@@ -16,6 +16,7 @@ import { LogLevel } from '@genesislcap/foundation-logger';
16
16
  import { Observable } from 'rxjs';
17
17
  import { SyntheticViewTemplate } from '@microsoft/fast-element';
18
18
  import { Types } from '@genesislcap/expression-builder';
19
+ import type { ValueConverter } from '@microsoft/fast-element';
19
20
 
20
21
  /**
21
22
  * @public
@@ -2349,6 +2350,18 @@ export declare let SSO_LIST_URL: string;
2349
2350
  */
2350
2351
  export declare let SSO_LOGIN_URL: string;
2351
2352
 
2353
+ /**
2354
+ * A {@link @microsoft/fast-element#ValueConverter} that converts between comma-separated string attributes
2355
+ * and `string | string[]` properties.
2356
+ *
2357
+ * @remarks
2358
+ * - fromView: "A,B,C" → ["A","B","C"], "A" → "A", "" → undefined
2359
+ * - toView: ["A","B","C"] → "A,B,C", "A" → "A", undefined → ""
2360
+ *
2361
+ * @public
2362
+ */
2363
+ export declare const stringArrayConverter: ValueConverter;
2364
+
2352
2365
  /**
2353
2366
  * Subscribes a listener function to receive events of a specific type.
2354
2367
  * @returns An unsubscribe function.
@@ -1339,6 +1339,17 @@ The sub-path used for WebSocket connections when API\_HOST is not set
1339
1339
 
1340
1340
 
1341
1341
 
1342
+ </td></tr>
1343
+ <tr><td>
1344
+
1345
+ [stringArrayConverter](./foundation-utils.stringarrayconverter.md)
1346
+
1347
+
1348
+ </td><td>
1349
+
1350
+ A that converts between comma-separated string attributes and `string | string[]` properties.
1351
+
1352
+
1342
1353
  </td></tr>
1343
1354
  <tr><td>
1344
1355
 
@@ -0,0 +1,18 @@
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; [stringArrayConverter](./foundation-utils.stringarrayconverter.md)
4
+
5
+ ## stringArrayConverter variable
6
+
7
+ A that converts between comma-separated string attributes and `string | string[]` properties.
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ stringArrayConverter: ValueConverter
13
+ ```
14
+
15
+ ## Remarks
16
+
17
+ - fromView: "A,B,C" → \["A","B","C"\], "A" → "A", "" → undefined - toView: \["A","B","C"\] → "A,B,C", "A" → "A", undefined → ""
18
+
@@ -22,6 +22,7 @@ import { LogLevel } from '@genesislcap/foundation-logger';
22
22
  import { Observable } from 'rxjs';
23
23
  import { SyntheticViewTemplate } from '@microsoft/fast-element';
24
24
  import { Types } from '@genesislcap/expression-builder';
25
+ import type { ValueConverter } from '@microsoft/fast-element';
25
26
 
26
27
  // @public (undocumented)
27
28
  export let ACCEPT_TERMS_URL: string;
@@ -1572,6 +1573,9 @@ export let SSO_LIST_URL: string;
1572
1573
  // @public (undocumented)
1573
1574
  export let SSO_LOGIN_URL: string;
1574
1575
 
1576
+ // @public
1577
+ export const stringArrayConverter: ValueConverter;
1578
+
1575
1579
  // @public
1576
1580
  export type Subscribe<EventType> = (listener: Listener<EventType>) => () => void;
1577
1581
 
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.405.0",
4
+ "version": "14.406.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,18 +29,18 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "14.405.0",
33
- "@genesislcap/genx": "14.405.0",
34
- "@genesislcap/rollup-builder": "14.405.0",
35
- "@genesislcap/ts-builder": "14.405.0",
36
- "@genesislcap/uvu-playwright-builder": "14.405.0",
37
- "@genesislcap/vite-builder": "14.405.0",
38
- "@genesislcap/webpack-builder": "14.405.0",
32
+ "@genesislcap/foundation-testing": "14.406.0",
33
+ "@genesislcap/genx": "14.406.0",
34
+ "@genesislcap/rollup-builder": "14.406.0",
35
+ "@genesislcap/ts-builder": "14.406.0",
36
+ "@genesislcap/uvu-playwright-builder": "14.406.0",
37
+ "@genesislcap/vite-builder": "14.406.0",
38
+ "@genesislcap/webpack-builder": "14.406.0",
39
39
  "@types/json-schema": "^7.0.11"
40
40
  },
41
41
  "dependencies": {
42
- "@genesislcap/expression-builder": "14.405.0",
43
- "@genesislcap/foundation-logger": "14.405.0",
42
+ "@genesislcap/expression-builder": "14.406.0",
43
+ "@genesislcap/foundation-logger": "14.406.0",
44
44
  "@microsoft/fast-components": "2.30.6",
45
45
  "@microsoft/fast-element": "1.14.0",
46
46
  "@microsoft/fast-foundation": "2.50.0",
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "90757d4adb4c7b20ee266e0add3126dd76cb6398"
61
+ "gitHead": "69e2b4662605a6e5e60efe537b8871a7e0c00f44"
62
62
  }