@genesislcap/foundation-utils 14.404.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.
- package/dist/custom-elements.json +102 -53
- package/dist/dts/converters/index.d.ts +2 -0
- package/dist/dts/converters/index.d.ts.map +1 -0
- package/dist/dts/converters/string-array-converter.d.ts +13 -0
- package/dist/dts/converters/string-array-converter.d.ts.map +1 -0
- package/dist/dts/index.d.ts +1 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/converters/index.js +1 -0
- package/dist/esm/converters/string-array-converter.js +24 -0
- package/dist/esm/index.js +1 -0
- package/dist/foundation-utils.api.json +24 -0
- package/dist/foundation-utils.d.ts +13 -0
- package/docs/api/foundation-utils.md +11 -0
- package/docs/api/foundation-utils.stringarrayconverter.md +18 -0
- package/docs/api-report.md.api.md +4 -0
- package/package.json +11 -11
|
@@ -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",
|
|
@@ -399,59 +448,6 @@
|
|
|
399
448
|
}
|
|
400
449
|
]
|
|
401
450
|
},
|
|
402
|
-
{
|
|
403
|
-
"kind": "javascript-module",
|
|
404
|
-
"path": "src/decorators/index.ts",
|
|
405
|
-
"declarations": [],
|
|
406
|
-
"exports": [
|
|
407
|
-
{
|
|
408
|
-
"kind": "js",
|
|
409
|
-
"name": "*",
|
|
410
|
-
"declaration": {
|
|
411
|
-
"name": "*",
|
|
412
|
-
"package": "./renderOnChange"
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
]
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"kind": "javascript-module",
|
|
419
|
-
"path": "src/decorators/renderOnChange.ts",
|
|
420
|
-
"declarations": [
|
|
421
|
-
{
|
|
422
|
-
"kind": "function",
|
|
423
|
-
"name": "renderOnChange",
|
|
424
|
-
"parameters": [
|
|
425
|
-
{
|
|
426
|
-
"name": "target",
|
|
427
|
-
"type": {
|
|
428
|
-
"text": "FASTElement & { render(): void }"
|
|
429
|
-
},
|
|
430
|
-
"description": "The target to define the property change handler on."
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
"name": "name",
|
|
434
|
-
"type": {
|
|
435
|
-
"text": "string"
|
|
436
|
-
},
|
|
437
|
-
"description": "The property name."
|
|
438
|
-
}
|
|
439
|
-
],
|
|
440
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
441
|
-
"privacy": "public"
|
|
442
|
-
}
|
|
443
|
-
],
|
|
444
|
-
"exports": [
|
|
445
|
-
{
|
|
446
|
-
"kind": "js",
|
|
447
|
-
"name": "renderOnChange",
|
|
448
|
-
"declaration": {
|
|
449
|
-
"name": "renderOnChange",
|
|
450
|
-
"module": "src/decorators/renderOnChange.ts"
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
]
|
|
454
|
-
},
|
|
455
451
|
{
|
|
456
452
|
"kind": "javascript-module",
|
|
457
453
|
"path": "src/design-system/design-system.ts",
|
|
@@ -572,6 +568,59 @@
|
|
|
572
568
|
}
|
|
573
569
|
]
|
|
574
570
|
},
|
|
571
|
+
{
|
|
572
|
+
"kind": "javascript-module",
|
|
573
|
+
"path": "src/decorators/index.ts",
|
|
574
|
+
"declarations": [],
|
|
575
|
+
"exports": [
|
|
576
|
+
{
|
|
577
|
+
"kind": "js",
|
|
578
|
+
"name": "*",
|
|
579
|
+
"declaration": {
|
|
580
|
+
"name": "*",
|
|
581
|
+
"package": "./renderOnChange"
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
]
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"kind": "javascript-module",
|
|
588
|
+
"path": "src/decorators/renderOnChange.ts",
|
|
589
|
+
"declarations": [
|
|
590
|
+
{
|
|
591
|
+
"kind": "function",
|
|
592
|
+
"name": "renderOnChange",
|
|
593
|
+
"parameters": [
|
|
594
|
+
{
|
|
595
|
+
"name": "target",
|
|
596
|
+
"type": {
|
|
597
|
+
"text": "FASTElement & { render(): void }"
|
|
598
|
+
},
|
|
599
|
+
"description": "The target to define the property change handler on."
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
"name": "name",
|
|
603
|
+
"type": {
|
|
604
|
+
"text": "string"
|
|
605
|
+
},
|
|
606
|
+
"description": "The property name."
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
610
|
+
"privacy": "public"
|
|
611
|
+
}
|
|
612
|
+
],
|
|
613
|
+
"exports": [
|
|
614
|
+
{
|
|
615
|
+
"kind": "js",
|
|
616
|
+
"name": "renderOnChange",
|
|
617
|
+
"declaration": {
|
|
618
|
+
"name": "renderOnChange",
|
|
619
|
+
"module": "src/decorators/renderOnChange.ts"
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
]
|
|
623
|
+
},
|
|
575
624
|
{
|
|
576
625
|
"kind": "javascript-module",
|
|
577
626
|
"path": "src/directives/index.ts",
|
|
@@ -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"}
|
package/dist/dts/index.d.ts
CHANGED
package/dist/dts/index.d.ts.map
CHANGED
|
@@ -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
|
@@ -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) > [@genesislcap/foundation-utils](./foundation-utils.md) > [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.
|
|
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.
|
|
33
|
-
"@genesislcap/genx": "14.
|
|
34
|
-
"@genesislcap/rollup-builder": "14.
|
|
35
|
-
"@genesislcap/ts-builder": "14.
|
|
36
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
37
|
-
"@genesislcap/vite-builder": "14.
|
|
38
|
-
"@genesislcap/webpack-builder": "14.
|
|
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.
|
|
43
|
-
"@genesislcap/foundation-logger": "14.
|
|
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": "
|
|
61
|
+
"gitHead": "69e2b4662605a6e5e60efe537b8871a7e0c00f44"
|
|
62
62
|
}
|