@genesislcap/foundation-utils 14.218.3-alpha-42754ce.0 → 14.219.1-alpha-3ab0d20.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/custom-elements.json +40 -217
- package/dist/dts/index.d.ts +0 -1
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/foundation-utils.api.json +0 -120
- package/dist/foundation-utils.d.ts +0 -34
- package/docs/api/foundation-utils.md +0 -4
- package/docs/api-report.md +0 -12
- package/package.json +10 -10
- package/dist/dts/encoding/base64/decode.d.ts +0 -16
- package/dist/dts/encoding/base64/decode.d.ts.map +0 -1
- package/dist/dts/encoding/base64/encode.d.ts +0 -16
- package/dist/dts/encoding/base64/encode.d.ts.map +0 -1
- package/dist/dts/encoding/base64/index.d.ts +0 -3
- package/dist/dts/encoding/base64/index.d.ts.map +0 -1
- package/dist/dts/encoding/index.d.ts +0 -2
- package/dist/dts/encoding/index.d.ts.map +0 -1
- package/dist/esm/encoding/base64/decode.js +0 -45
- package/dist/esm/encoding/base64/encode.js +0 -34
- package/dist/esm/encoding/base64/index.js +0 -2
- package/dist/esm/encoding/index.js +0 -1
- package/docs/api/foundation-utils.decodefrombase64.md +0 -13
- package/docs/api/foundation-utils.decodefrombase64withprefix.md +0 -18
- package/docs/api/foundation-utils.encodetobase64.md +0 -13
- package/docs/api/foundation-utils.encodetobase64withprefix.md +0 -18
@@ -45,14 +45,6 @@
|
|
45
45
|
"package": "./directives"
|
46
46
|
}
|
47
47
|
},
|
48
|
-
{
|
49
|
-
"kind": "js",
|
50
|
-
"name": "*",
|
51
|
-
"declaration": {
|
52
|
-
"name": "*",
|
53
|
-
"package": "./encoding"
|
54
|
-
}
|
55
|
-
},
|
56
48
|
{
|
57
49
|
"kind": "js",
|
58
50
|
"name": "*",
|
@@ -423,59 +415,6 @@
|
|
423
415
|
}
|
424
416
|
]
|
425
417
|
},
|
426
|
-
{
|
427
|
-
"kind": "javascript-module",
|
428
|
-
"path": "src/decorators/index.ts",
|
429
|
-
"declarations": [],
|
430
|
-
"exports": [
|
431
|
-
{
|
432
|
-
"kind": "js",
|
433
|
-
"name": "*",
|
434
|
-
"declaration": {
|
435
|
-
"name": "*",
|
436
|
-
"package": "./renderOnChange"
|
437
|
-
}
|
438
|
-
}
|
439
|
-
]
|
440
|
-
},
|
441
|
-
{
|
442
|
-
"kind": "javascript-module",
|
443
|
-
"path": "src/decorators/renderOnChange.ts",
|
444
|
-
"declarations": [
|
445
|
-
{
|
446
|
-
"kind": "function",
|
447
|
-
"name": "renderOnChange",
|
448
|
-
"parameters": [
|
449
|
-
{
|
450
|
-
"name": "target",
|
451
|
-
"type": {
|
452
|
-
"text": "FASTElement & { render(): void }"
|
453
|
-
},
|
454
|
-
"description": "The target to define the property change handler on."
|
455
|
-
},
|
456
|
-
{
|
457
|
-
"name": "name",
|
458
|
-
"type": {
|
459
|
-
"text": "string"
|
460
|
-
},
|
461
|
-
"description": "The property name."
|
462
|
-
}
|
463
|
-
],
|
464
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
465
|
-
"privacy": "public"
|
466
|
-
}
|
467
|
-
],
|
468
|
-
"exports": [
|
469
|
-
{
|
470
|
-
"kind": "js",
|
471
|
-
"name": "renderOnChange",
|
472
|
-
"declaration": {
|
473
|
-
"name": "renderOnChange",
|
474
|
-
"module": "src/decorators/renderOnChange.ts"
|
475
|
-
}
|
476
|
-
}
|
477
|
-
]
|
478
|
-
},
|
479
418
|
{
|
480
419
|
"kind": "javascript-module",
|
481
420
|
"path": "src/directives/index.ts",
|
@@ -739,7 +678,7 @@
|
|
739
678
|
},
|
740
679
|
{
|
741
680
|
"kind": "javascript-module",
|
742
|
-
"path": "src/
|
681
|
+
"path": "src/decorators/index.ts",
|
743
682
|
"declarations": [],
|
744
683
|
"exports": [
|
745
684
|
{
|
@@ -747,7 +686,45 @@
|
|
747
686
|
"name": "*",
|
748
687
|
"declaration": {
|
749
688
|
"name": "*",
|
750
|
-
"package": "./
|
689
|
+
"package": "./renderOnChange"
|
690
|
+
}
|
691
|
+
}
|
692
|
+
]
|
693
|
+
},
|
694
|
+
{
|
695
|
+
"kind": "javascript-module",
|
696
|
+
"path": "src/decorators/renderOnChange.ts",
|
697
|
+
"declarations": [
|
698
|
+
{
|
699
|
+
"kind": "function",
|
700
|
+
"name": "renderOnChange",
|
701
|
+
"parameters": [
|
702
|
+
{
|
703
|
+
"name": "target",
|
704
|
+
"type": {
|
705
|
+
"text": "FASTElement & { render(): void }"
|
706
|
+
},
|
707
|
+
"description": "The target to define the property change handler on."
|
708
|
+
},
|
709
|
+
{
|
710
|
+
"name": "name",
|
711
|
+
"type": {
|
712
|
+
"text": "string"
|
713
|
+
},
|
714
|
+
"description": "The property name."
|
715
|
+
}
|
716
|
+
],
|
717
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
718
|
+
"privacy": "public"
|
719
|
+
}
|
720
|
+
],
|
721
|
+
"exports": [
|
722
|
+
{
|
723
|
+
"kind": "js",
|
724
|
+
"name": "renderOnChange",
|
725
|
+
"declaration": {
|
726
|
+
"name": "renderOnChange",
|
727
|
+
"module": "src/decorators/renderOnChange.ts"
|
751
728
|
}
|
752
729
|
}
|
753
730
|
]
|
@@ -2393,160 +2370,6 @@
|
|
2393
2370
|
}
|
2394
2371
|
]
|
2395
2372
|
},
|
2396
|
-
{
|
2397
|
-
"kind": "javascript-module",
|
2398
|
-
"path": "src/encoding/base64/decode.ts",
|
2399
|
-
"declarations": [
|
2400
|
-
{
|
2401
|
-
"kind": "function",
|
2402
|
-
"name": "decodeFromBase64",
|
2403
|
-
"return": {
|
2404
|
-
"type": {
|
2405
|
-
"text": ""
|
2406
|
-
}
|
2407
|
-
},
|
2408
|
-
"parameters": [
|
2409
|
-
{
|
2410
|
-
"name": "base64Value",
|
2411
|
-
"type": {
|
2412
|
-
"text": "string"
|
2413
|
-
}
|
2414
|
-
},
|
2415
|
-
{
|
2416
|
-
"description": "The value to decode from base64.",
|
2417
|
-
"name": "value"
|
2418
|
-
}
|
2419
|
-
],
|
2420
|
-
"description": "Decodes a value from base64.",
|
2421
|
-
"privacy": "public"
|
2422
|
-
},
|
2423
|
-
{
|
2424
|
-
"kind": "function",
|
2425
|
-
"name": "decodeFromBase64WithPrefix",
|
2426
|
-
"return": {
|
2427
|
-
"type": {
|
2428
|
-
"text": ""
|
2429
|
-
}
|
2430
|
-
},
|
2431
|
-
"parameters": [
|
2432
|
-
{
|
2433
|
-
"name": "value",
|
2434
|
-
"type": {
|
2435
|
-
"text": "string"
|
2436
|
-
},
|
2437
|
-
"description": "The value to decode from base64."
|
2438
|
-
}
|
2439
|
-
],
|
2440
|
-
"description": "Decodes a value from base64 with a prefix.",
|
2441
|
-
"privacy": "public"
|
2442
|
-
}
|
2443
|
-
],
|
2444
|
-
"exports": [
|
2445
|
-
{
|
2446
|
-
"kind": "js",
|
2447
|
-
"name": "decodeFromBase64",
|
2448
|
-
"declaration": {
|
2449
|
-
"name": "decodeFromBase64",
|
2450
|
-
"module": "src/encoding/base64/decode.ts"
|
2451
|
-
}
|
2452
|
-
},
|
2453
|
-
{
|
2454
|
-
"kind": "js",
|
2455
|
-
"name": "decodeFromBase64WithPrefix",
|
2456
|
-
"declaration": {
|
2457
|
-
"name": "decodeFromBase64WithPrefix",
|
2458
|
-
"module": "src/encoding/base64/decode.ts"
|
2459
|
-
}
|
2460
|
-
}
|
2461
|
-
]
|
2462
|
-
},
|
2463
|
-
{
|
2464
|
-
"kind": "javascript-module",
|
2465
|
-
"path": "src/encoding/base64/encode.ts",
|
2466
|
-
"declarations": [
|
2467
|
-
{
|
2468
|
-
"kind": "function",
|
2469
|
-
"name": "encodeToBase64",
|
2470
|
-
"return": {
|
2471
|
-
"type": {
|
2472
|
-
"text": ""
|
2473
|
-
}
|
2474
|
-
},
|
2475
|
-
"parameters": [
|
2476
|
-
{
|
2477
|
-
"name": "value",
|
2478
|
-
"type": {
|
2479
|
-
"text": "string | ArrayBuffer"
|
2480
|
-
},
|
2481
|
-
"description": "The value to encode to base64."
|
2482
|
-
}
|
2483
|
-
],
|
2484
|
-
"description": "Encodes the given value to base64.",
|
2485
|
-
"privacy": "public"
|
2486
|
-
},
|
2487
|
-
{
|
2488
|
-
"kind": "function",
|
2489
|
-
"name": "encodeToBase64WithPrefix",
|
2490
|
-
"return": {
|
2491
|
-
"type": {
|
2492
|
-
"text": ""
|
2493
|
-
}
|
2494
|
-
},
|
2495
|
-
"parameters": [
|
2496
|
-
{
|
2497
|
-
"name": "value",
|
2498
|
-
"type": {
|
2499
|
-
"text": "string | ArrayBuffer"
|
2500
|
-
},
|
2501
|
-
"description": "The value to encode to base64."
|
2502
|
-
}
|
2503
|
-
],
|
2504
|
-
"description": "Encodes the given value with a prefix to base64.",
|
2505
|
-
"privacy": "public"
|
2506
|
-
}
|
2507
|
-
],
|
2508
|
-
"exports": [
|
2509
|
-
{
|
2510
|
-
"kind": "js",
|
2511
|
-
"name": "encodeToBase64",
|
2512
|
-
"declaration": {
|
2513
|
-
"name": "encodeToBase64",
|
2514
|
-
"module": "src/encoding/base64/encode.ts"
|
2515
|
-
}
|
2516
|
-
},
|
2517
|
-
{
|
2518
|
-
"kind": "js",
|
2519
|
-
"name": "encodeToBase64WithPrefix",
|
2520
|
-
"declaration": {
|
2521
|
-
"name": "encodeToBase64WithPrefix",
|
2522
|
-
"module": "src/encoding/base64/encode.ts"
|
2523
|
-
}
|
2524
|
-
}
|
2525
|
-
]
|
2526
|
-
},
|
2527
|
-
{
|
2528
|
-
"kind": "javascript-module",
|
2529
|
-
"path": "src/encoding/base64/index.ts",
|
2530
|
-
"declarations": [],
|
2531
|
-
"exports": [
|
2532
|
-
{
|
2533
|
-
"kind": "js",
|
2534
|
-
"name": "*",
|
2535
|
-
"declaration": {
|
2536
|
-
"name": "*",
|
2537
|
-
"package": "./decode"
|
2538
|
-
}
|
2539
|
-
},
|
2540
|
-
{
|
2541
|
-
"kind": "js",
|
2542
|
-
"name": "*",
|
2543
|
-
"declaration": {
|
2544
|
-
"name": "*",
|
2545
|
-
"package": "./encode"
|
2546
|
-
}
|
2547
|
-
}
|
2548
|
-
]
|
2549
|
-
},
|
2550
2373
|
{
|
2551
2374
|
"kind": "javascript-module",
|
2552
2375
|
"path": "src/mappers/dto/index.ts",
|
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,
|
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,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,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,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
|
package/dist/esm/index.js
CHANGED
@@ -1621,62 +1621,6 @@
|
|
1621
1621
|
],
|
1622
1622
|
"extendsTokenRanges": []
|
1623
1623
|
},
|
1624
|
-
{
|
1625
|
-
"kind": "Variable",
|
1626
|
-
"canonicalReference": "@genesislcap/foundation-utils!decodeFromBase64:var",
|
1627
|
-
"docComment": "/**\n * Decodes a value from base64.\n *\n * @param value - The value to decode from base64.\n *\n * @returns The decoded value.\n *\n * @public\n */\n",
|
1628
|
-
"excerptTokens": [
|
1629
|
-
{
|
1630
|
-
"kind": "Content",
|
1631
|
-
"text": "decodeFromBase64: "
|
1632
|
-
},
|
1633
|
-
{
|
1634
|
-
"kind": "Content",
|
1635
|
-
"text": "(base64Value: string) => string | "
|
1636
|
-
},
|
1637
|
-
{
|
1638
|
-
"kind": "Reference",
|
1639
|
-
"text": "ArrayBuffer",
|
1640
|
-
"canonicalReference": "!ArrayBuffer:interface"
|
1641
|
-
}
|
1642
|
-
],
|
1643
|
-
"fileUrlPath": "src/encoding/base64/decode.ts",
|
1644
|
-
"isReadonly": true,
|
1645
|
-
"releaseTag": "Public",
|
1646
|
-
"name": "decodeFromBase64",
|
1647
|
-
"variableTypeTokenRange": {
|
1648
|
-
"startIndex": 1,
|
1649
|
-
"endIndex": 3
|
1650
|
-
}
|
1651
|
-
},
|
1652
|
-
{
|
1653
|
-
"kind": "Variable",
|
1654
|
-
"canonicalReference": "@genesislcap/foundation-utils!decodeFromBase64WithPrefix:var",
|
1655
|
-
"docComment": "/**\n * Decodes a value from base64 with a prefix.\n *\n * @remarks\n *\n * Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.\n *\n * @param value - The value to decode from base64.\n *\n * @returns The decoded value.\n *\n * @public\n */\n",
|
1656
|
-
"excerptTokens": [
|
1657
|
-
{
|
1658
|
-
"kind": "Content",
|
1659
|
-
"text": "decodeFromBase64WithPrefix: "
|
1660
|
-
},
|
1661
|
-
{
|
1662
|
-
"kind": "Content",
|
1663
|
-
"text": "(value: string) => string | "
|
1664
|
-
},
|
1665
|
-
{
|
1666
|
-
"kind": "Reference",
|
1667
|
-
"text": "ArrayBuffer",
|
1668
|
-
"canonicalReference": "!ArrayBuffer:interface"
|
1669
|
-
}
|
1670
|
-
],
|
1671
|
-
"fileUrlPath": "src/encoding/base64/decode.ts",
|
1672
|
-
"isReadonly": true,
|
1673
|
-
"releaseTag": "Public",
|
1674
|
-
"name": "decodeFromBase64WithPrefix",
|
1675
|
-
"variableTypeTokenRange": {
|
1676
|
-
"startIndex": 1,
|
1677
|
-
"endIndex": 3
|
1678
|
-
}
|
1679
|
-
},
|
1680
1624
|
{
|
1681
1625
|
"kind": "Variable",
|
1682
1626
|
"canonicalReference": "@genesislcap/foundation-utils!DEFAULT_ORGANISATION:var",
|
@@ -2757,70 +2701,6 @@
|
|
2757
2701
|
],
|
2758
2702
|
"extendsTokenRanges": []
|
2759
2703
|
},
|
2760
|
-
{
|
2761
|
-
"kind": "Variable",
|
2762
|
-
"canonicalReference": "@genesislcap/foundation-utils!encodeToBase64:var",
|
2763
|
-
"docComment": "/**\n * Encodes the given value to base64.\n *\n * @param value - The value to encode to base64.\n *\n * @returns The base64 encoded value.\n *\n * @public\n */\n",
|
2764
|
-
"excerptTokens": [
|
2765
|
-
{
|
2766
|
-
"kind": "Content",
|
2767
|
-
"text": "encodeToBase64: "
|
2768
|
-
},
|
2769
|
-
{
|
2770
|
-
"kind": "Content",
|
2771
|
-
"text": "(value: string | "
|
2772
|
-
},
|
2773
|
-
{
|
2774
|
-
"kind": "Reference",
|
2775
|
-
"text": "ArrayBuffer",
|
2776
|
-
"canonicalReference": "!ArrayBuffer:interface"
|
2777
|
-
},
|
2778
|
-
{
|
2779
|
-
"kind": "Content",
|
2780
|
-
"text": ") => string"
|
2781
|
-
}
|
2782
|
-
],
|
2783
|
-
"fileUrlPath": "src/encoding/base64/encode.ts",
|
2784
|
-
"isReadonly": true,
|
2785
|
-
"releaseTag": "Public",
|
2786
|
-
"name": "encodeToBase64",
|
2787
|
-
"variableTypeTokenRange": {
|
2788
|
-
"startIndex": 1,
|
2789
|
-
"endIndex": 4
|
2790
|
-
}
|
2791
|
-
},
|
2792
|
-
{
|
2793
|
-
"kind": "Variable",
|
2794
|
-
"canonicalReference": "@genesislcap/foundation-utils!encodeToBase64WithPrefix:var",
|
2795
|
-
"docComment": "/**\n * Encodes the given value with a prefix to base64.\n *\n * @remarks\n *\n * Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.\n *\n * @param value - The value to encode to base64.\n *\n * @returns The base64 encoded value with a prefix.\n *\n * @public\n */\n",
|
2796
|
-
"excerptTokens": [
|
2797
|
-
{
|
2798
|
-
"kind": "Content",
|
2799
|
-
"text": "encodeToBase64WithPrefix: "
|
2800
|
-
},
|
2801
|
-
{
|
2802
|
-
"kind": "Content",
|
2803
|
-
"text": "(value: string | "
|
2804
|
-
},
|
2805
|
-
{
|
2806
|
-
"kind": "Reference",
|
2807
|
-
"text": "ArrayBuffer",
|
2808
|
-
"canonicalReference": "!ArrayBuffer:interface"
|
2809
|
-
},
|
2810
|
-
{
|
2811
|
-
"kind": "Content",
|
2812
|
-
"text": ") => string"
|
2813
|
-
}
|
2814
|
-
],
|
2815
|
-
"fileUrlPath": "src/encoding/base64/encode.ts",
|
2816
|
-
"isReadonly": true,
|
2817
|
-
"releaseTag": "Public",
|
2818
|
-
"name": "encodeToBase64WithPrefix",
|
2819
|
-
"variableTypeTokenRange": {
|
2820
|
-
"startIndex": 1,
|
2821
|
-
"endIndex": 4
|
2822
|
-
}
|
2823
|
-
},
|
2824
2704
|
{
|
2825
2705
|
"kind": "TypeAlias",
|
2826
2706
|
"canonicalReference": "@genesislcap/foundation-utils!ErrorDetailMap:type",
|
@@ -184,23 +184,6 @@ export declare interface DatabaseRecord {
|
|
184
184
|
id: string;
|
185
185
|
}
|
186
186
|
|
187
|
-
/**
|
188
|
-
* Decodes a value from base64.
|
189
|
-
* @public
|
190
|
-
* @param value - The value to decode from base64.
|
191
|
-
* @returns The decoded value.
|
192
|
-
*/
|
193
|
-
export declare const decodeFromBase64: (base64Value: string) => string | ArrayBuffer;
|
194
|
-
|
195
|
-
/**
|
196
|
-
* Decodes a value from base64 with a prefix.
|
197
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
198
|
-
* @public
|
199
|
-
* @param value - The value to decode from base64.
|
200
|
-
* @returns The decoded value.
|
201
|
-
*/
|
202
|
-
export declare const decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer;
|
203
|
-
|
204
187
|
/**
|
205
188
|
* The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).
|
206
189
|
* @remarks Optional.
|
@@ -351,23 +334,6 @@ export declare interface DTOMapper<TDTO, TEntity> {
|
|
351
334
|
toDTO: (entity: Partial<TEntity>) => TDTO;
|
352
335
|
}
|
353
336
|
|
354
|
-
/**
|
355
|
-
* Encodes the given value to base64.
|
356
|
-
* @public
|
357
|
-
* @param value - The value to encode to base64.
|
358
|
-
* @returns The base64 encoded value.
|
359
|
-
*/
|
360
|
-
export declare const encodeToBase64: (value: string | ArrayBuffer) => string;
|
361
|
-
|
362
|
-
/**
|
363
|
-
* Encodes the given value with a prefix to base64.
|
364
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
365
|
-
* @public
|
366
|
-
* @param value - The value to encode to base64.
|
367
|
-
* @returns The base64 encoded value with a prefix.
|
368
|
-
*/
|
369
|
-
export declare const encodeToBase64WithPrefix: (value: string | ArrayBuffer) => string;
|
370
|
-
|
371
337
|
/**
|
372
338
|
* @public
|
373
339
|
*/
|
@@ -77,16 +77,12 @@
|
|
77
77
|
| [API\_HOST](./foundation-utils.api_host.md) | The Genesis Server URL (WebSocket or HTTP). |
|
78
78
|
| [createErrorMap](./foundation-utils.createerrormap.md) | A factory to create the error map. |
|
79
79
|
| [createObserver](./foundation-utils.createobserver.md) | Creates a new event observer instance. |
|
80
|
-
| [decodeFromBase64](./foundation-utils.decodefrombase64.md) | Decodes a value from base64. |
|
81
|
-
| [decodeFromBase64WithPrefix](./foundation-utils.decodefrombase64withprefix.md) | Decodes a value from base64 with a prefix. |
|
82
80
|
| [DEFAULT\_ORGANISATION](./foundation-utils.default_organisation.md) | The default Organisation value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
|
83
81
|
| [DEFAULT\_PASSWORD](./foundation-utils.default_password.md) | The default Password value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
|
84
82
|
| [DEFAULT\_USER](./foundation-utils.default_user.md) | The default Username value, used in auth/login flow \[<code>genesislcap-foundation-login</code>\](https://link-to-docs). |
|
85
83
|
| [defaultEventMap](./foundation-utils.defaulteventmap.md) | A map that associates specific HTML element tags with their corresponding default event names. |
|
86
84
|
| [defaultJSONSerializerConfig](./foundation-utils.defaultjsonserializerconfig.md) | A Default JSONSerializer Config for serializing and deserializing functions. |
|
87
85
|
| [defaultLoggerOptions](./foundation-utils.defaultloggeroptions.md) | The default logger options. |
|
88
|
-
| [encodeToBase64](./foundation-utils.encodetobase64.md) | Encodes the given value to base64. |
|
89
|
-
| [encodeToBase64WithPrefix](./foundation-utils.encodetobase64withprefix.md) | Encodes the given value with a prefix to base64. |
|
90
86
|
| [FORCE\_HTTP](./foundation-utils.force_http.md) | The path to a JSON config file for the HTTP mode. |
|
91
87
|
| [GENESIS\_SOCKET\_URL](./foundation-utils.genesis_socket_url.md) | Genesis Socket URL |
|
92
88
|
| [getFontMixin](./foundation-utils.getfontmixin.md) | Generates a CSS mixin for the specified font family, style, and weight. |
|
package/docs/api-report.md
CHANGED
@@ -124,12 +124,6 @@ export interface DatabaseRecord {
|
|
124
124
|
id: string;
|
125
125
|
}
|
126
126
|
|
127
|
-
// @public
|
128
|
-
export const decodeFromBase64: (base64Value: string) => string | ArrayBuffer;
|
129
|
-
|
130
|
-
// @public
|
131
|
-
export const decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer;
|
132
|
-
|
133
127
|
// @public
|
134
128
|
export let DEFAULT_ORGANISATION: string;
|
135
129
|
|
@@ -197,12 +191,6 @@ export interface DTOMapper<TDTO, TEntity> {
|
|
197
191
|
toDTO: (entity: Partial<TEntity>) => TDTO;
|
198
192
|
}
|
199
193
|
|
200
|
-
// @public
|
201
|
-
export const encodeToBase64: (value: string | ArrayBuffer) => string;
|
202
|
-
|
203
|
-
// @public
|
204
|
-
export const encodeToBase64WithPrefix: (value: string | ArrayBuffer) => string;
|
205
|
-
|
206
194
|
// @public (undocumented)
|
207
195
|
export type ErrorDetailMap = Record<string, unknown>;
|
208
196
|
|
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.219.1-alpha-3ab0d20.0",
|
5
5
|
"sideEffects": false,
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
7
7
|
"main": "dist/esm/index.js",
|
@@ -27,17 +27,17 @@
|
|
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.219.1-alpha-3ab0d20.0",
|
31
|
+
"@genesislcap/genx": "14.219.1-alpha-3ab0d20.0",
|
32
|
+
"@genesislcap/rollup-builder": "14.219.1-alpha-3ab0d20.0",
|
33
|
+
"@genesislcap/ts-builder": "14.219.1-alpha-3ab0d20.0",
|
34
|
+
"@genesislcap/uvu-playwright-builder": "14.219.1-alpha-3ab0d20.0",
|
35
|
+
"@genesislcap/vite-builder": "14.219.1-alpha-3ab0d20.0",
|
36
|
+
"@genesislcap/webpack-builder": "14.219.1-alpha-3ab0d20.0",
|
37
37
|
"rimraf": "^5.0.0"
|
38
38
|
},
|
39
39
|
"dependencies": {
|
40
|
-
"@genesislcap/foundation-logger": "14.
|
40
|
+
"@genesislcap/foundation-logger": "14.219.1-alpha-3ab0d20.0",
|
41
41
|
"@microsoft/fast-components": "^2.30.6",
|
42
42
|
"@microsoft/fast-element": "^1.12.0",
|
43
43
|
"@microsoft/fast-foundation": "2.49.6",
|
@@ -55,5 +55,5 @@
|
|
55
55
|
"access": "public"
|
56
56
|
},
|
57
57
|
"customElements": "dist/custom-elements.json",
|
58
|
-
"gitHead": "
|
58
|
+
"gitHead": "0068be65ad19bec9c82711b0ae12949732ddf348"
|
59
59
|
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Decodes a value from base64.
|
3
|
-
* @public
|
4
|
-
* @param value - The value to decode from base64.
|
5
|
-
* @returns The decoded value.
|
6
|
-
*/
|
7
|
-
export declare const decodeFromBase64: (base64Value: string) => string | ArrayBuffer;
|
8
|
-
/**
|
9
|
-
* Decodes a value from base64 with a prefix.
|
10
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
11
|
-
* @public
|
12
|
-
* @param value - The value to decode from base64.
|
13
|
-
* @returns The decoded value.
|
14
|
-
*/
|
15
|
-
export declare const decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer;
|
16
|
-
//# sourceMappingURL=decode.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"decode.d.ts","sourceRoot":"","sources":["../../../../src/encoding/base64/decode.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,KAAG,MAAM,GAAG,WAY/D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,UAAW,MAAM,KAAG,MAAM,GAAG,WAqBnE,CAAC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Encodes the given value to base64.
|
3
|
-
* @public
|
4
|
-
* @param value - The value to encode to base64.
|
5
|
-
* @returns The base64 encoded value.
|
6
|
-
*/
|
7
|
-
export declare const encodeToBase64: (value: string | ArrayBuffer) => string;
|
8
|
-
/**
|
9
|
-
* Encodes the given value with a prefix to base64.
|
10
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
11
|
-
* @public
|
12
|
-
* @param value - The value to encode to base64.
|
13
|
-
* @returns The base64 encoded value with a prefix.
|
14
|
-
*/
|
15
|
-
export declare const encodeToBase64WithPrefix: (value: string | ArrayBuffer) => string;
|
16
|
-
//# sourceMappingURL=encode.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../../src/encoding/base64/encode.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,cAAc,UAAW,MAAM,GAAG,WAAW,KAAG,MAU5D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,UAAW,MAAM,GAAG,WAAW,KAAG,MAUtE,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/encoding/base64/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/encoding/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
const base64Pattern = /^(?:[A-Za-z0-9+/]{4})*?(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;
|
2
|
-
/**
|
3
|
-
* Decodes a value from base64.
|
4
|
-
* @public
|
5
|
-
* @param value - The value to decode from base64.
|
6
|
-
* @returns The decoded value.
|
7
|
-
*/
|
8
|
-
export const decodeFromBase64 = (base64Value) => {
|
9
|
-
if (base64Pattern.test(base64Value)) {
|
10
|
-
const decodedString = atob(base64Value);
|
11
|
-
const buffer = new Uint8Array(decodedString.length);
|
12
|
-
[...decodedString].forEach((_, i) => {
|
13
|
-
buffer[i] = decodedString.charCodeAt(i);
|
14
|
-
});
|
15
|
-
return buffer.buffer;
|
16
|
-
}
|
17
|
-
return base64Value;
|
18
|
-
};
|
19
|
-
/**
|
20
|
-
* Decodes a value from base64 with a prefix.
|
21
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
22
|
-
* @public
|
23
|
-
* @param value - The value to decode from base64.
|
24
|
-
* @returns The decoded value.
|
25
|
-
*/
|
26
|
-
export const decodeFromBase64WithPrefix = (value) => {
|
27
|
-
const parts = value.split(':');
|
28
|
-
let prefix;
|
29
|
-
let base64Value;
|
30
|
-
if (parts.length === 2) {
|
31
|
-
[prefix, base64Value] = parts;
|
32
|
-
}
|
33
|
-
else {
|
34
|
-
base64Value = value;
|
35
|
-
}
|
36
|
-
const decodedValue = decodeFromBase64(base64Value);
|
37
|
-
if (prefix === 'str') {
|
38
|
-
const textDecoder = new TextDecoder('utf-8');
|
39
|
-
return textDecoder.decode(decodedValue);
|
40
|
-
}
|
41
|
-
else if (prefix === 'bin') {
|
42
|
-
return decodedValue;
|
43
|
-
}
|
44
|
-
return decodedValue;
|
45
|
-
};
|
@@ -1,34 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Encodes the given value to base64.
|
3
|
-
* @public
|
4
|
-
* @param value - The value to encode to base64.
|
5
|
-
* @returns The base64 encoded value.
|
6
|
-
*/
|
7
|
-
export const encodeToBase64 = (value) => {
|
8
|
-
if (typeof value === 'string') {
|
9
|
-
return btoa(value);
|
10
|
-
}
|
11
|
-
else if (value instanceof ArrayBuffer) {
|
12
|
-
const buffer = new Uint8Array(value);
|
13
|
-
const binaryString = buffer.reduce((data, byte) => data + String.fromCharCode(byte), '');
|
14
|
-
return btoa(binaryString);
|
15
|
-
}
|
16
|
-
return '';
|
17
|
-
};
|
18
|
-
/**
|
19
|
-
* Encodes the given value with a prefix to base64.
|
20
|
-
* @remarks Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
21
|
-
* @public
|
22
|
-
* @param value - The value to encode to base64.
|
23
|
-
* @returns The base64 encoded value with a prefix.
|
24
|
-
*/
|
25
|
-
export const encodeToBase64WithPrefix = (value) => {
|
26
|
-
const base64Value = encodeToBase64(value);
|
27
|
-
if (typeof value === 'string') {
|
28
|
-
return `str:${base64Value}`;
|
29
|
-
}
|
30
|
-
else if (value instanceof ArrayBuffer) {
|
31
|
-
return `bin:${base64Value}`;
|
32
|
-
}
|
33
|
-
return '';
|
34
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './base64';
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [decodeFromBase64](./foundation-utils.decodefrombase64.md)
|
4
|
-
|
5
|
-
## decodeFromBase64 variable
|
6
|
-
|
7
|
-
Decodes a value from base64.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
decodeFromBase64: (base64Value: string) => string | ArrayBuffer
|
13
|
-
```
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [decodeFromBase64WithPrefix](./foundation-utils.decodefrombase64withprefix.md)
|
4
|
-
|
5
|
-
## decodeFromBase64WithPrefix variable
|
6
|
-
|
7
|
-
Decodes a value from base64 with a prefix.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
decodeFromBase64WithPrefix: (value: string) => string | ArrayBuffer
|
13
|
-
```
|
14
|
-
|
15
|
-
## Remarks
|
16
|
-
|
17
|
-
Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
18
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [encodeToBase64](./foundation-utils.encodetobase64.md)
|
4
|
-
|
5
|
-
## encodeToBase64 variable
|
6
|
-
|
7
|
-
Encodes the given value to base64.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
encodeToBase64: (value: string | ArrayBuffer) => string
|
13
|
-
```
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
-
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-utils](./foundation-utils.md) > [encodeToBase64WithPrefix](./foundation-utils.encodetobase64withprefix.md)
|
4
|
-
|
5
|
-
## encodeToBase64WithPrefix variable
|
6
|
-
|
7
|
-
Encodes the given value with a prefix to base64.
|
8
|
-
|
9
|
-
**Signature:**
|
10
|
-
|
11
|
-
```typescript
|
12
|
-
encodeToBase64WithPrefix: (value: string | ArrayBuffer) => string
|
13
|
-
```
|
14
|
-
|
15
|
-
## Remarks
|
16
|
-
|
17
|
-
Prefixes are: 'str:' for string and 'bin:' for ArrayBuffer.
|
18
|
-
|