@genesislcap/foundation-utils 14.416.1 → 14.417.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.
Files changed (2) hide show
  1. package/dist/custom-elements.json +345 -345
  2. package/package.json +11 -11
@@ -209,6 +209,47 @@
209
209
  }
210
210
  ]
211
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
+ },
212
253
  {
213
254
  "kind": "javascript-module",
214
255
  "path": "src/decorators/index.ts",
@@ -264,30 +305,190 @@
264
305
  },
265
306
  {
266
307
  "kind": "javascript-module",
267
- "path": "src/directives/index.ts",
268
- "declarations": [],
269
- "exports": [
308
+ "path": "src/data/inMemoryDatabase.ts",
309
+ "declarations": [
270
310
  {
271
- "kind": "js",
272
- "name": "*",
273
- "declaration": {
274
- "name": "*",
275
- "package": "./sync"
276
- }
277
- },
311
+ "kind": "class",
312
+ "description": "An in memory database of specific DatabaseRecord types.",
313
+ "name": "InMemoryDatabase",
314
+ "members": [
315
+ {
316
+ "kind": "field",
317
+ "name": "isWorking",
318
+ "type": {
319
+ "text": "boolean"
320
+ },
321
+ "privacy": "public",
322
+ "default": "false"
323
+ },
324
+ {
325
+ "kind": "field",
326
+ "name": "records",
327
+ "type": {
328
+ "text": "Record<string, T>"
329
+ },
330
+ "privacy": "private",
331
+ "default": "{}"
332
+ },
333
+ {
334
+ "kind": "field",
335
+ "name": "beforeUpdateListeners",
336
+ "privacy": "private"
337
+ },
338
+ {
339
+ "kind": "field",
340
+ "name": "afterUpdateListeners",
341
+ "privacy": "private"
342
+ },
343
+ {
344
+ "kind": "method",
345
+ "name": "create",
346
+ "privacy": "public",
347
+ "return": {
348
+ "type": {
349
+ "text": "Promise<DatabaseAccessResult.Create<T>>"
350
+ }
351
+ },
352
+ "parameters": [
353
+ {
354
+ "name": "newValue",
355
+ "type": {
356
+ "text": "Omit<T, 'id'>"
357
+ }
358
+ }
359
+ ]
360
+ },
361
+ {
362
+ "kind": "method",
363
+ "name": "read",
364
+ "privacy": "public",
365
+ "return": {
366
+ "type": {
367
+ "text": "Promise<DatabaseAccessResult.Read<T>>"
368
+ }
369
+ },
370
+ "parameters": [
371
+ {
372
+ "name": "id",
373
+ "type": {
374
+ "text": "string"
375
+ }
376
+ }
377
+ ]
378
+ },
379
+ {
380
+ "kind": "method",
381
+ "name": "update",
382
+ "privacy": "public",
383
+ "return": {
384
+ "type": {
385
+ "text": "Promise<DatabaseAccessResult.Update<T>>"
386
+ }
387
+ },
388
+ "parameters": [
389
+ {
390
+ "name": "id",
391
+ "type": {
392
+ "text": "string"
393
+ }
394
+ },
395
+ {
396
+ "name": "newValue",
397
+ "type": {
398
+ "text": "Omit<Partial<T>, 'id'>"
399
+ }
400
+ }
401
+ ]
402
+ },
403
+ {
404
+ "kind": "method",
405
+ "name": "delete",
406
+ "privacy": "public",
407
+ "return": {
408
+ "type": {
409
+ "text": "Promise<DatabaseAccessResult.Delete>"
410
+ }
411
+ },
412
+ "parameters": [
413
+ {
414
+ "name": "id",
415
+ "type": {
416
+ "text": "string"
417
+ }
418
+ }
419
+ ]
420
+ },
421
+ {
422
+ "kind": "method",
423
+ "name": "visit",
424
+ "privacy": "public",
425
+ "return": {
426
+ "type": {
427
+ "text": "Promise<void>"
428
+ }
429
+ },
430
+ "parameters": [
431
+ {
432
+ "name": "visitor",
433
+ "type": {
434
+ "text": "(record: T) => void"
435
+ }
436
+ }
437
+ ]
438
+ },
439
+ {
440
+ "kind": "method",
441
+ "name": "onBeforeUpdate",
442
+ "privacy": "public",
443
+ "return": {
444
+ "type": {
445
+ "text": "() => void"
446
+ }
447
+ },
448
+ "parameters": [
449
+ {
450
+ "name": "listener",
451
+ "type": {
452
+ "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
453
+ }
454
+ }
455
+ ]
456
+ },
457
+ {
458
+ "kind": "method",
459
+ "name": "onAfterUpdate",
460
+ "privacy": "public",
461
+ "return": {
462
+ "type": {
463
+ "text": "() => void"
464
+ }
465
+ },
466
+ "parameters": [
467
+ {
468
+ "name": "listener",
469
+ "type": {
470
+ "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
471
+ }
472
+ }
473
+ ]
474
+ }
475
+ ]
476
+ }
477
+ ],
478
+ "exports": [
278
479
  {
279
480
  "kind": "js",
280
- "name": "*",
481
+ "name": "InMemoryDatabase",
281
482
  "declaration": {
282
- "name": "*",
283
- "package": "./when-else"
483
+ "name": "InMemoryDatabase",
484
+ "module": "src/data/inMemoryDatabase.ts"
284
485
  }
285
486
  }
286
487
  ]
287
488
  },
288
489
  {
289
490
  "kind": "javascript-module",
290
- "path": "src/converters/index.ts",
491
+ "path": "src/data/index.ts",
291
492
  "declarations": [],
292
493
  "exports": [
293
494
  {
@@ -295,33 +496,150 @@
295
496
  "name": "*",
296
497
  "declaration": {
297
498
  "name": "*",
298
- "package": "./string-array-converter"
499
+ "package": "./inMemoryDatabase"
299
500
  }
300
501
  }
301
502
  ]
302
503
  },
303
504
  {
304
505
  "kind": "javascript-module",
305
- "path": "src/converters/string-array-converter.ts",
506
+ "path": "src/design-system/design-system.ts",
306
507
  "declarations": [
307
508
  {
308
- "kind": "variable",
309
- "name": "stringArrayConverter",
310
- "type": {
311
- "text": "ValueConverter"
509
+ "kind": "function",
510
+ "name": "assureDesignSystem",
511
+ "return": {
512
+ "type": {
513
+ "text": "DesignSystemModule"
514
+ }
312
515
  },
313
- "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}",
314
- "description": "A @microsoft/fast-element#ValueConverter that converts between comma-separated string attributes\nand `string | string[]` properties.",
516
+ "parameters": [
517
+ {
518
+ "name": "module",
519
+ "type": {
520
+ "text": "DesignSystemModule"
521
+ }
522
+ }
523
+ ],
524
+ "description": "assureDesignSystem.",
315
525
  "privacy": "public"
316
- }
317
- ],
526
+ },
527
+ {
528
+ "kind": "function",
529
+ "name": "getCurrentDesignSystem",
530
+ "return": {
531
+ "type": {
532
+ "text": ""
533
+ }
534
+ },
535
+ "parameters": [
536
+ {
537
+ "name": "element",
538
+ "type": {
539
+ "text": "HTMLElement"
540
+ },
541
+ "description": "The starting HTML element"
542
+ },
543
+ {
544
+ "name": "fallbackPrefix",
545
+ "type": {
546
+ "text": "string"
547
+ },
548
+ "description": "The prefix to fallback to if the provider is not available"
549
+ }
550
+ ],
551
+ "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.",
552
+ "privacy": "public"
553
+ },
554
+ {
555
+ "kind": "function",
556
+ "name": "getCurrentDesignSystemPrefix",
557
+ "return": {
558
+ "type": {
559
+ "text": ""
560
+ }
561
+ },
562
+ "parameters": [
563
+ {
564
+ "name": "element",
565
+ "type": {
566
+ "text": "HTMLElement"
567
+ },
568
+ "description": "The starting HTML element"
569
+ },
570
+ {
571
+ "name": "fallbackPrefix",
572
+ "type": {
573
+ "text": "string"
574
+ },
575
+ "description": "The prefix to fallback to if the provider is not available"
576
+ }
577
+ ],
578
+ "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
579
+ "privacy": "public"
580
+ }
581
+ ],
318
582
  "exports": [
319
583
  {
320
584
  "kind": "js",
321
- "name": "stringArrayConverter",
585
+ "name": "assureDesignSystem",
322
586
  "declaration": {
323
- "name": "stringArrayConverter",
324
- "module": "src/converters/string-array-converter.ts"
587
+ "name": "assureDesignSystem",
588
+ "module": "src/design-system/design-system.ts"
589
+ }
590
+ },
591
+ {
592
+ "kind": "js",
593
+ "name": "getCurrentDesignSystem",
594
+ "declaration": {
595
+ "name": "getCurrentDesignSystem",
596
+ "module": "src/design-system/design-system.ts"
597
+ }
598
+ },
599
+ {
600
+ "kind": "js",
601
+ "name": "getCurrentDesignSystemPrefix",
602
+ "declaration": {
603
+ "name": "getCurrentDesignSystemPrefix",
604
+ "module": "src/design-system/design-system.ts"
605
+ }
606
+ }
607
+ ]
608
+ },
609
+ {
610
+ "kind": "javascript-module",
611
+ "path": "src/design-system/index.ts",
612
+ "declarations": [],
613
+ "exports": [
614
+ {
615
+ "kind": "js",
616
+ "name": "*",
617
+ "declaration": {
618
+ "name": "*",
619
+ "package": "./design-system"
620
+ }
621
+ }
622
+ ]
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"
325
643
  }
326
644
  }
327
645
  ]
@@ -816,324 +1134,6 @@
816
1134
  }
817
1135
  ]
818
1136
  },
819
- {
820
- "kind": "javascript-module",
821
- "path": "src/data/inMemoryDatabase.ts",
822
- "declarations": [
823
- {
824
- "kind": "class",
825
- "description": "An in memory database of specific DatabaseRecord types.",
826
- "name": "InMemoryDatabase",
827
- "members": [
828
- {
829
- "kind": "field",
830
- "name": "isWorking",
831
- "type": {
832
- "text": "boolean"
833
- },
834
- "privacy": "public",
835
- "default": "false"
836
- },
837
- {
838
- "kind": "field",
839
- "name": "records",
840
- "type": {
841
- "text": "Record<string, T>"
842
- },
843
- "privacy": "private",
844
- "default": "{}"
845
- },
846
- {
847
- "kind": "field",
848
- "name": "beforeUpdateListeners",
849
- "privacy": "private"
850
- },
851
- {
852
- "kind": "field",
853
- "name": "afterUpdateListeners",
854
- "privacy": "private"
855
- },
856
- {
857
- "kind": "method",
858
- "name": "create",
859
- "privacy": "public",
860
- "return": {
861
- "type": {
862
- "text": "Promise<DatabaseAccessResult.Create<T>>"
863
- }
864
- },
865
- "parameters": [
866
- {
867
- "name": "newValue",
868
- "type": {
869
- "text": "Omit<T, 'id'>"
870
- }
871
- }
872
- ]
873
- },
874
- {
875
- "kind": "method",
876
- "name": "read",
877
- "privacy": "public",
878
- "return": {
879
- "type": {
880
- "text": "Promise<DatabaseAccessResult.Read<T>>"
881
- }
882
- },
883
- "parameters": [
884
- {
885
- "name": "id",
886
- "type": {
887
- "text": "string"
888
- }
889
- }
890
- ]
891
- },
892
- {
893
- "kind": "method",
894
- "name": "update",
895
- "privacy": "public",
896
- "return": {
897
- "type": {
898
- "text": "Promise<DatabaseAccessResult.Update<T>>"
899
- }
900
- },
901
- "parameters": [
902
- {
903
- "name": "id",
904
- "type": {
905
- "text": "string"
906
- }
907
- },
908
- {
909
- "name": "newValue",
910
- "type": {
911
- "text": "Omit<Partial<T>, 'id'>"
912
- }
913
- }
914
- ]
915
- },
916
- {
917
- "kind": "method",
918
- "name": "delete",
919
- "privacy": "public",
920
- "return": {
921
- "type": {
922
- "text": "Promise<DatabaseAccessResult.Delete>"
923
- }
924
- },
925
- "parameters": [
926
- {
927
- "name": "id",
928
- "type": {
929
- "text": "string"
930
- }
931
- }
932
- ]
933
- },
934
- {
935
- "kind": "method",
936
- "name": "visit",
937
- "privacy": "public",
938
- "return": {
939
- "type": {
940
- "text": "Promise<void>"
941
- }
942
- },
943
- "parameters": [
944
- {
945
- "name": "visitor",
946
- "type": {
947
- "text": "(record: T) => void"
948
- }
949
- }
950
- ]
951
- },
952
- {
953
- "kind": "method",
954
- "name": "onBeforeUpdate",
955
- "privacy": "public",
956
- "return": {
957
- "type": {
958
- "text": "() => void"
959
- }
960
- },
961
- "parameters": [
962
- {
963
- "name": "listener",
964
- "type": {
965
- "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
966
- }
967
- }
968
- ]
969
- },
970
- {
971
- "kind": "method",
972
- "name": "onAfterUpdate",
973
- "privacy": "public",
974
- "return": {
975
- "type": {
976
- "text": "() => void"
977
- }
978
- },
979
- "parameters": [
980
- {
981
- "name": "listener",
982
- "type": {
983
- "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
984
- }
985
- }
986
- ]
987
- }
988
- ]
989
- }
990
- ],
991
- "exports": [
992
- {
993
- "kind": "js",
994
- "name": "InMemoryDatabase",
995
- "declaration": {
996
- "name": "InMemoryDatabase",
997
- "module": "src/data/inMemoryDatabase.ts"
998
- }
999
- }
1000
- ]
1001
- },
1002
- {
1003
- "kind": "javascript-module",
1004
- "path": "src/data/index.ts",
1005
- "declarations": [],
1006
- "exports": [
1007
- {
1008
- "kind": "js",
1009
- "name": "*",
1010
- "declaration": {
1011
- "name": "*",
1012
- "package": "./inMemoryDatabase"
1013
- }
1014
- }
1015
- ]
1016
- },
1017
- {
1018
- "kind": "javascript-module",
1019
- "path": "src/design-system/design-system.ts",
1020
- "declarations": [
1021
- {
1022
- "kind": "function",
1023
- "name": "assureDesignSystem",
1024
- "return": {
1025
- "type": {
1026
- "text": "DesignSystemModule"
1027
- }
1028
- },
1029
- "parameters": [
1030
- {
1031
- "name": "module",
1032
- "type": {
1033
- "text": "DesignSystemModule"
1034
- }
1035
- }
1036
- ],
1037
- "description": "assureDesignSystem.",
1038
- "privacy": "public"
1039
- },
1040
- {
1041
- "kind": "function",
1042
- "name": "getCurrentDesignSystem",
1043
- "return": {
1044
- "type": {
1045
- "text": ""
1046
- }
1047
- },
1048
- "parameters": [
1049
- {
1050
- "name": "element",
1051
- "type": {
1052
- "text": "HTMLElement"
1053
- },
1054
- "description": "The starting HTML element"
1055
- },
1056
- {
1057
- "name": "fallbackPrefix",
1058
- "type": {
1059
- "text": "string"
1060
- },
1061
- "description": "The prefix to fallback to if the provider is not available"
1062
- }
1063
- ],
1064
- "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.",
1065
- "privacy": "public"
1066
- },
1067
- {
1068
- "kind": "function",
1069
- "name": "getCurrentDesignSystemPrefix",
1070
- "return": {
1071
- "type": {
1072
- "text": ""
1073
- }
1074
- },
1075
- "parameters": [
1076
- {
1077
- "name": "element",
1078
- "type": {
1079
- "text": "HTMLElement"
1080
- },
1081
- "description": "The starting HTML element"
1082
- },
1083
- {
1084
- "name": "fallbackPrefix",
1085
- "type": {
1086
- "text": "string"
1087
- },
1088
- "description": "The prefix to fallback to if the provider is not available"
1089
- }
1090
- ],
1091
- "description": "Get the current design system prefix by checking available providers.\nIf no provider is found, falls back to the provided prefix.",
1092
- "privacy": "public"
1093
- }
1094
- ],
1095
- "exports": [
1096
- {
1097
- "kind": "js",
1098
- "name": "assureDesignSystem",
1099
- "declaration": {
1100
- "name": "assureDesignSystem",
1101
- "module": "src/design-system/design-system.ts"
1102
- }
1103
- },
1104
- {
1105
- "kind": "js",
1106
- "name": "getCurrentDesignSystem",
1107
- "declaration": {
1108
- "name": "getCurrentDesignSystem",
1109
- "module": "src/design-system/design-system.ts"
1110
- }
1111
- },
1112
- {
1113
- "kind": "js",
1114
- "name": "getCurrentDesignSystemPrefix",
1115
- "declaration": {
1116
- "name": "getCurrentDesignSystemPrefix",
1117
- "module": "src/design-system/design-system.ts"
1118
- }
1119
- }
1120
- ]
1121
- },
1122
- {
1123
- "kind": "javascript-module",
1124
- "path": "src/design-system/index.ts",
1125
- "declarations": [],
1126
- "exports": [
1127
- {
1128
- "kind": "js",
1129
- "name": "*",
1130
- "declaration": {
1131
- "name": "*",
1132
- "package": "./design-system"
1133
- }
1134
- }
1135
- ]
1136
- },
1137
1137
  {
1138
1138
  "kind": "javascript-module",
1139
1139
  "path": "src/error/errorMap.ts",
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.416.1",
4
+ "version": "14.417.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.416.1",
33
- "@genesislcap/genx": "14.416.1",
34
- "@genesislcap/rollup-builder": "14.416.1",
35
- "@genesislcap/ts-builder": "14.416.1",
36
- "@genesislcap/uvu-playwright-builder": "14.416.1",
37
- "@genesislcap/vite-builder": "14.416.1",
38
- "@genesislcap/webpack-builder": "14.416.1",
32
+ "@genesislcap/foundation-testing": "14.417.0",
33
+ "@genesislcap/genx": "14.417.0",
34
+ "@genesislcap/rollup-builder": "14.417.0",
35
+ "@genesislcap/ts-builder": "14.417.0",
36
+ "@genesislcap/uvu-playwright-builder": "14.417.0",
37
+ "@genesislcap/vite-builder": "14.417.0",
38
+ "@genesislcap/webpack-builder": "14.417.0",
39
39
  "@types/json-schema": "^7.0.11"
40
40
  },
41
41
  "dependencies": {
42
- "@genesislcap/expression-builder": "14.416.1",
43
- "@genesislcap/foundation-logger": "14.416.1",
42
+ "@genesislcap/expression-builder": "14.417.0",
43
+ "@genesislcap/foundation-logger": "14.417.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": "dd39f2bffbd92a41d51853efc09425731aab4d12"
61
+ "gitHead": "1a4b13faca04aa12b0a8bd6032a798369fe7eb33"
62
62
  }