@genesislcap/foundation-utils 14.148.1-alpha-eef6f33.0 → 14.149.2

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 +537 -537
  2. package/package.json +10 -10
@@ -204,6 +204,204 @@
204
204
  }
205
205
  ]
206
206
  },
207
+ {
208
+ "kind": "javascript-module",
209
+ "path": "src/data/inMemoryDatabase.ts",
210
+ "declarations": [
211
+ {
212
+ "kind": "class",
213
+ "description": "An in memory database of specific DatabaseRecord types.",
214
+ "name": "InMemoryDatabase",
215
+ "members": [
216
+ {
217
+ "kind": "field",
218
+ "name": "isWorking",
219
+ "type": {
220
+ "text": "boolean"
221
+ },
222
+ "privacy": "public",
223
+ "default": "false"
224
+ },
225
+ {
226
+ "kind": "field",
227
+ "name": "records",
228
+ "type": {
229
+ "text": "Record<string, T>"
230
+ },
231
+ "privacy": "private",
232
+ "default": "{}"
233
+ },
234
+ {
235
+ "kind": "field",
236
+ "name": "beforeUpdateListeners",
237
+ "privacy": "private"
238
+ },
239
+ {
240
+ "kind": "field",
241
+ "name": "afterUpdateListeners",
242
+ "privacy": "private"
243
+ },
244
+ {
245
+ "kind": "method",
246
+ "name": "create",
247
+ "privacy": "public",
248
+ "return": {
249
+ "type": {
250
+ "text": "Promise<DatabaseAccessResult.Create<T>>"
251
+ }
252
+ },
253
+ "parameters": [
254
+ {
255
+ "name": "newValue",
256
+ "type": {
257
+ "text": "Omit<T, 'id'>"
258
+ }
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ "kind": "method",
264
+ "name": "read",
265
+ "privacy": "public",
266
+ "return": {
267
+ "type": {
268
+ "text": "Promise<DatabaseAccessResult.Read<T>>"
269
+ }
270
+ },
271
+ "parameters": [
272
+ {
273
+ "name": "id",
274
+ "type": {
275
+ "text": "string"
276
+ }
277
+ }
278
+ ]
279
+ },
280
+ {
281
+ "kind": "method",
282
+ "name": "update",
283
+ "privacy": "public",
284
+ "return": {
285
+ "type": {
286
+ "text": "Promise<DatabaseAccessResult.Update<T>>"
287
+ }
288
+ },
289
+ "parameters": [
290
+ {
291
+ "name": "id",
292
+ "type": {
293
+ "text": "string"
294
+ }
295
+ },
296
+ {
297
+ "name": "newValue",
298
+ "type": {
299
+ "text": "Omit<Partial<T>, 'id'>"
300
+ }
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "kind": "method",
306
+ "name": "delete",
307
+ "privacy": "public",
308
+ "return": {
309
+ "type": {
310
+ "text": "Promise<DatabaseAccessResult.Delete>"
311
+ }
312
+ },
313
+ "parameters": [
314
+ {
315
+ "name": "id",
316
+ "type": {
317
+ "text": "string"
318
+ }
319
+ }
320
+ ]
321
+ },
322
+ {
323
+ "kind": "method",
324
+ "name": "visit",
325
+ "privacy": "public",
326
+ "return": {
327
+ "type": {
328
+ "text": "Promise<void>"
329
+ }
330
+ },
331
+ "parameters": [
332
+ {
333
+ "name": "visitor",
334
+ "type": {
335
+ "text": "(record: T) => void"
336
+ }
337
+ }
338
+ ]
339
+ },
340
+ {
341
+ "kind": "method",
342
+ "name": "onBeforeUpdate",
343
+ "privacy": "public",
344
+ "return": {
345
+ "type": {
346
+ "text": "() => void"
347
+ }
348
+ },
349
+ "parameters": [
350
+ {
351
+ "name": "listener",
352
+ "type": {
353
+ "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
354
+ }
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "kind": "method",
360
+ "name": "onAfterUpdate",
361
+ "privacy": "public",
362
+ "return": {
363
+ "type": {
364
+ "text": "() => void"
365
+ }
366
+ },
367
+ "parameters": [
368
+ {
369
+ "name": "listener",
370
+ "type": {
371
+ "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
372
+ }
373
+ }
374
+ ]
375
+ }
376
+ ]
377
+ }
378
+ ],
379
+ "exports": [
380
+ {
381
+ "kind": "js",
382
+ "name": "InMemoryDatabase",
383
+ "declaration": {
384
+ "name": "InMemoryDatabase",
385
+ "module": "src/data/inMemoryDatabase.ts"
386
+ }
387
+ }
388
+ ]
389
+ },
390
+ {
391
+ "kind": "javascript-module",
392
+ "path": "src/data/index.ts",
393
+ "declarations": [],
394
+ "exports": [
395
+ {
396
+ "kind": "js",
397
+ "name": "*",
398
+ "declaration": {
399
+ "name": "*",
400
+ "package": "./inMemoryDatabase"
401
+ }
402
+ }
403
+ ]
404
+ },
207
405
  {
208
406
  "kind": "javascript-module",
209
407
  "path": "src/design-system/design-system.ts",
@@ -279,42 +477,265 @@
279
477
  },
280
478
  {
281
479
  "kind": "javascript-module",
282
- "path": "src/error/errorMap.ts",
480
+ "path": "src/env/index.ts",
481
+ "declarations": [],
482
+ "exports": [
483
+ {
484
+ "kind": "js",
485
+ "name": "*",
486
+ "declaration": {
487
+ "name": "*",
488
+ "package": "./is-dev"
489
+ }
490
+ },
491
+ {
492
+ "kind": "js",
493
+ "name": "*",
494
+ "declaration": {
495
+ "name": "*",
496
+ "package": "./variables"
497
+ }
498
+ }
499
+ ]
500
+ },
501
+ {
502
+ "kind": "javascript-module",
503
+ "path": "src/env/is-dev.ts",
283
504
  "declarations": [
284
505
  {
285
- "kind": "class",
286
- "description": "",
287
- "name": "DefaultErrorMap",
288
- "members": [
289
- {
290
- "kind": "field",
291
- "name": "map",
292
- "privacy": "private",
293
- "default": "new Map<keyof TErrorDetailMap, Error>()"
294
- },
295
- {
296
- "kind": "field",
297
- "name": "lastError",
298
- "type": {
299
- "text": "Error"
300
- },
301
- "description": "{@inheritDoc ErrorMap.lastError}"
302
- },
303
- {
304
- "kind": "method",
305
- "name": "set",
306
- "return": {
307
- "type": {
308
- "text": "void"
309
- }
310
- },
311
- "parameters": [
312
- {
313
- "name": "key",
314
- "type": {
315
- "text": "keyof TErrorDetailMap"
316
- }
317
- },
506
+ "kind": "function",
507
+ "name": "isDev",
508
+ "description": "Determines if the current environment is a development environment.",
509
+ "privacy": "public"
510
+ }
511
+ ],
512
+ "exports": [
513
+ {
514
+ "kind": "js",
515
+ "name": "isDev",
516
+ "declaration": {
517
+ "name": "isDev",
518
+ "module": "src/env/is-dev.ts"
519
+ }
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ "kind": "javascript-module",
525
+ "path": "src/env/variables.ts",
526
+ "declarations": [
527
+ {
528
+ "kind": "variable",
529
+ "name": "SOCKET_EXT",
530
+ "type": {
531
+ "text": "string"
532
+ }
533
+ },
534
+ {
535
+ "kind": "variable",
536
+ "name": "_SOCKET_EXT",
537
+ "type": {
538
+ "text": "string"
539
+ },
540
+ "default": "'gwf'",
541
+ "description": "The sub-path used for WebSocket connections when API_HOST is not set",
542
+ "privacy": "public"
543
+ },
544
+ {
545
+ "kind": "variable",
546
+ "name": "FORCE_HTTP",
547
+ "type": {
548
+ "text": "string"
549
+ }
550
+ },
551
+ {
552
+ "kind": "variable",
553
+ "name": "_FORCE_HTTP",
554
+ "type": {
555
+ "text": "string"
556
+ },
557
+ "description": "The path to a JSON config file for the HTTP mode.",
558
+ "privacy": "public"
559
+ },
560
+ {
561
+ "kind": "variable",
562
+ "name": "API_HOST",
563
+ "type": {
564
+ "text": "string"
565
+ }
566
+ },
567
+ {
568
+ "kind": "variable",
569
+ "name": "_API_HOST",
570
+ "type": {
571
+ "text": "string"
572
+ },
573
+ "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
574
+ "description": "The Genesis Server URL (WebSocket or HTTP).",
575
+ "privacy": "public"
576
+ },
577
+ {
578
+ "kind": "variable",
579
+ "name": "HTTP_CONFIG",
580
+ "type": {
581
+ "text": "string"
582
+ }
583
+ },
584
+ {
585
+ "kind": "variable",
586
+ "name": "_HTTP_CONFIG",
587
+ "type": {
588
+ "text": "string"
589
+ },
590
+ "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
591
+ "privacy": "public"
592
+ },
593
+ {
594
+ "kind": "variable",
595
+ "name": "DEFAULT_ORGANISATION",
596
+ "type": {
597
+ "text": "string"
598
+ }
599
+ },
600
+ {
601
+ "kind": "variable",
602
+ "name": "_DEFAULT_ORGANISATION",
603
+ "type": {
604
+ "text": "string"
605
+ },
606
+ "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
607
+ "privacy": "public"
608
+ },
609
+ {
610
+ "kind": "variable",
611
+ "name": "DEFAULT_PASSWORD",
612
+ "type": {
613
+ "text": "string"
614
+ }
615
+ },
616
+ {
617
+ "kind": "variable",
618
+ "name": "_DEFAULT_PASSWORD",
619
+ "type": {
620
+ "text": "string"
621
+ },
622
+ "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
623
+ "privacy": "public"
624
+ },
625
+ {
626
+ "kind": "variable",
627
+ "name": "DEFAULT_USER",
628
+ "type": {
629
+ "text": "string"
630
+ }
631
+ },
632
+ {
633
+ "kind": "variable",
634
+ "name": "_DEFAULT_USER",
635
+ "type": {
636
+ "text": "string"
637
+ },
638
+ "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
639
+ "privacy": "public"
640
+ }
641
+ ],
642
+ "exports": [
643
+ {
644
+ "kind": "js",
645
+ "name": "SOCKET_EXT",
646
+ "declaration": {
647
+ "name": "_SOCKET_EXT",
648
+ "module": "src/env/variables.ts"
649
+ }
650
+ },
651
+ {
652
+ "kind": "js",
653
+ "name": "FORCE_HTTP",
654
+ "declaration": {
655
+ "name": "_FORCE_HTTP",
656
+ "module": "src/env/variables.ts"
657
+ }
658
+ },
659
+ {
660
+ "kind": "js",
661
+ "name": "API_HOST",
662
+ "declaration": {
663
+ "name": "_API_HOST",
664
+ "module": "src/env/variables.ts"
665
+ }
666
+ },
667
+ {
668
+ "kind": "js",
669
+ "name": "HTTP_CONFIG",
670
+ "declaration": {
671
+ "name": "_HTTP_CONFIG",
672
+ "module": "src/env/variables.ts"
673
+ }
674
+ },
675
+ {
676
+ "kind": "js",
677
+ "name": "DEFAULT_ORGANISATION",
678
+ "declaration": {
679
+ "name": "_DEFAULT_ORGANISATION",
680
+ "module": "src/env/variables.ts"
681
+ }
682
+ },
683
+ {
684
+ "kind": "js",
685
+ "name": "DEFAULT_PASSWORD",
686
+ "declaration": {
687
+ "name": "_DEFAULT_PASSWORD",
688
+ "module": "src/env/variables.ts"
689
+ }
690
+ },
691
+ {
692
+ "kind": "js",
693
+ "name": "DEFAULT_USER",
694
+ "declaration": {
695
+ "name": "_DEFAULT_USER",
696
+ "module": "src/env/variables.ts"
697
+ }
698
+ }
699
+ ]
700
+ },
701
+ {
702
+ "kind": "javascript-module",
703
+ "path": "src/error/errorMap.ts",
704
+ "declarations": [
705
+ {
706
+ "kind": "class",
707
+ "description": "",
708
+ "name": "DefaultErrorMap",
709
+ "members": [
710
+ {
711
+ "kind": "field",
712
+ "name": "map",
713
+ "privacy": "private",
714
+ "default": "new Map<keyof TErrorDetailMap, Error>()"
715
+ },
716
+ {
717
+ "kind": "field",
718
+ "name": "lastError",
719
+ "type": {
720
+ "text": "Error"
721
+ },
722
+ "description": "{@inheritDoc ErrorMap.lastError}"
723
+ },
724
+ {
725
+ "kind": "method",
726
+ "name": "set",
727
+ "return": {
728
+ "type": {
729
+ "text": "void"
730
+ }
731
+ },
732
+ "parameters": [
733
+ {
734
+ "name": "key",
735
+ "type": {
736
+ "text": "keyof TErrorDetailMap"
737
+ }
738
+ },
318
739
  {
319
740
  "name": "error",
320
741
  "type": {
@@ -512,514 +933,157 @@
512
933
  "name": "timestamp",
513
934
  "type": {
514
935
  "text": "number"
515
- }
516
- }
517
- ],
518
- "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
519
- "privacy": "public"
520
- },
521
- {
522
- "kind": "function",
523
- "name": "formatTimestamp",
524
- "return": {
525
- "type": {
526
- "text": "string"
527
- }
528
- },
529
- "parameters": [
530
- {
531
- "name": "timestamp",
532
- "type": {
533
- "text": "number"
534
- },
535
- "description": "The UNIX Timestamp."
536
- },
537
- {
538
- "name": "withTime",
539
- "type": {
540
- "text": "boolean"
541
- },
542
- "description": "The flag to determine if formatted value should contain 'time' info."
543
- }
544
- ],
545
- "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
546
- "privacy": "public"
547
- }
548
- ],
549
- "exports": [
550
- {
551
- "kind": "js",
552
- "name": "formatDateTimestamp",
553
- "declaration": {
554
- "name": "formatDateTimestamp",
555
- "module": "src/formatters/datetime.ts"
556
- }
557
- },
558
- {
559
- "kind": "js",
560
- "name": "formatDateTimeTimestamp",
561
- "declaration": {
562
- "name": "formatDateTimeTimestamp",
563
- "module": "src/formatters/datetime.ts"
564
- }
565
- },
566
- {
567
- "kind": "js",
568
- "name": "formatTimestamp",
569
- "declaration": {
570
- "name": "formatTimestamp",
571
- "module": "src/formatters/datetime.ts"
572
- }
573
- }
574
- ]
575
- },
576
- {
577
- "kind": "javascript-module",
578
- "path": "src/formatters/index.ts",
579
- "declarations": [],
580
- "exports": [
581
- {
582
- "kind": "js",
583
- "name": "*",
584
- "declaration": {
585
- "name": "*",
586
- "package": "./datetime"
587
- }
588
- },
589
- {
590
- "kind": "js",
591
- "name": "*",
592
- "declaration": {
593
- "name": "*",
594
- "package": "./localeNumberParser"
595
- }
596
- }
597
- ]
598
- },
599
- {
600
- "kind": "javascript-module",
601
- "path": "src/formatters/localeNumberParser.ts",
602
- "declarations": [
603
- {
604
- "kind": "class",
605
- "description": "",
606
- "name": "NumberParser",
607
- "members": [
608
- {
609
- "kind": "field",
610
- "name": "_decimal",
611
- "type": {
612
- "text": "RegExp"
613
- },
614
- "privacy": "private",
615
- "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
616
- },
617
- {
618
- "kind": "field",
619
- "name": "_separator",
620
- "type": {
621
- "text": "RegExp"
622
- },
623
- "privacy": "private",
624
- "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
625
- },
626
- {
627
- "kind": "field",
628
- "name": "_numeral",
629
- "type": {
630
- "text": "RegExp"
631
- },
632
- "privacy": "private",
633
- "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
634
- },
635
- {
636
- "kind": "field",
637
- "name": "_index",
638
- "type": {
639
- "text": "any"
640
- },
641
- "privacy": "private"
642
- },
643
- {
644
- "kind": "method",
645
- "name": "parse",
646
- "parameters": [
647
- {
648
- "name": "localeNumber",
649
- "type": {
650
- "text": "string"
651
- }
652
- }
653
- ]
654
- },
655
- {
656
- "kind": "method",
657
- "name": "hasSeparator",
658
- "return": {
659
- "type": {
660
- "text": "boolean"
661
- }
662
- },
663
- "parameters": [
664
- {
665
- "name": "localeNumber",
666
- "type": {
667
- "text": "string"
668
- }
669
- }
670
- ]
671
- },
672
- {
673
- "kind": "field",
674
- "name": "_group",
675
- "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
676
- }
677
- ]
678
- }
679
- ],
680
- "exports": [
681
- {
682
- "kind": "js",
683
- "name": "NumberParser",
684
- "declaration": {
685
- "name": "NumberParser",
686
- "module": "src/formatters/localeNumberParser.ts"
687
- }
688
- }
689
- ]
690
- },
691
- {
692
- "kind": "javascript-module",
693
- "path": "src/env/index.ts",
694
- "declarations": [],
695
- "exports": [
696
- {
697
- "kind": "js",
698
- "name": "*",
699
- "declaration": {
700
- "name": "*",
701
- "package": "./is-dev"
702
- }
703
- },
704
- {
705
- "kind": "js",
706
- "name": "*",
707
- "declaration": {
708
- "name": "*",
709
- "package": "./variables"
710
- }
711
- }
712
- ]
713
- },
714
- {
715
- "kind": "javascript-module",
716
- "path": "src/env/is-dev.ts",
717
- "declarations": [
718
- {
719
- "kind": "function",
720
- "name": "isDev",
721
- "description": "Determines if the current environment is a development environment.",
722
- "privacy": "public"
723
- }
724
- ],
725
- "exports": [
726
- {
727
- "kind": "js",
728
- "name": "isDev",
729
- "declaration": {
730
- "name": "isDev",
731
- "module": "src/env/is-dev.ts"
732
- }
733
- }
734
- ]
735
- },
736
- {
737
- "kind": "javascript-module",
738
- "path": "src/env/variables.ts",
739
- "declarations": [
740
- {
741
- "kind": "variable",
742
- "name": "SOCKET_EXT",
743
- "type": {
744
- "text": "string"
745
- }
746
- },
747
- {
748
- "kind": "variable",
749
- "name": "_SOCKET_EXT",
750
- "type": {
751
- "text": "string"
752
- },
753
- "default": "'gwf'",
754
- "description": "The sub-path used for WebSocket connections when API_HOST is not set",
755
- "privacy": "public"
756
- },
757
- {
758
- "kind": "variable",
759
- "name": "FORCE_HTTP",
760
- "type": {
761
- "text": "string"
762
- }
763
- },
764
- {
765
- "kind": "variable",
766
- "name": "_FORCE_HTTP",
767
- "type": {
768
- "text": "string"
769
- },
770
- "description": "The path to a JSON config file for the HTTP mode.",
771
- "privacy": "public"
772
- },
773
- {
774
- "kind": "variable",
775
- "name": "API_HOST",
776
- "type": {
777
- "text": "string"
778
- }
779
- },
780
- {
781
- "kind": "variable",
782
- "name": "_API_HOST",
783
- "type": {
784
- "text": "string"
785
- },
786
- "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
787
- "description": "The Genesis Server URL (WebSocket or HTTP).",
788
- "privacy": "public"
789
- },
790
- {
791
- "kind": "variable",
792
- "name": "HTTP_CONFIG",
793
- "type": {
794
- "text": "string"
795
- }
796
- },
797
- {
798
- "kind": "variable",
799
- "name": "_HTTP_CONFIG",
800
- "type": {
801
- "text": "string"
802
- },
803
- "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
804
- "privacy": "public"
805
- },
806
- {
807
- "kind": "variable",
808
- "name": "DEFAULT_ORGANISATION",
809
- "type": {
810
- "text": "string"
811
- }
812
- },
813
- {
814
- "kind": "variable",
815
- "name": "_DEFAULT_ORGANISATION",
816
- "type": {
817
- "text": "string"
818
- },
819
- "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
820
- "privacy": "public"
821
- },
822
- {
823
- "kind": "variable",
824
- "name": "DEFAULT_PASSWORD",
825
- "type": {
826
- "text": "string"
827
- }
828
- },
829
- {
830
- "kind": "variable",
831
- "name": "_DEFAULT_PASSWORD",
832
- "type": {
833
- "text": "string"
834
- },
835
- "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
836
- "privacy": "public"
837
- },
838
- {
839
- "kind": "variable",
840
- "name": "DEFAULT_USER",
841
- "type": {
842
- "text": "string"
843
- }
936
+ }
937
+ }
938
+ ],
939
+ "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
940
+ "privacy": "public"
844
941
  },
845
942
  {
846
- "kind": "variable",
847
- "name": "_DEFAULT_USER",
848
- "type": {
849
- "text": "string"
943
+ "kind": "function",
944
+ "name": "formatTimestamp",
945
+ "return": {
946
+ "type": {
947
+ "text": "string"
948
+ }
850
949
  },
851
- "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
950
+ "parameters": [
951
+ {
952
+ "name": "timestamp",
953
+ "type": {
954
+ "text": "number"
955
+ },
956
+ "description": "The UNIX Timestamp."
957
+ },
958
+ {
959
+ "name": "withTime",
960
+ "type": {
961
+ "text": "boolean"
962
+ },
963
+ "description": "The flag to determine if formatted value should contain 'time' info."
964
+ }
965
+ ],
966
+ "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
852
967
  "privacy": "public"
853
968
  }
854
969
  ],
855
970
  "exports": [
856
971
  {
857
972
  "kind": "js",
858
- "name": "SOCKET_EXT",
859
- "declaration": {
860
- "name": "_SOCKET_EXT",
861
- "module": "src/env/variables.ts"
862
- }
863
- },
864
- {
865
- "kind": "js",
866
- "name": "FORCE_HTTP",
867
- "declaration": {
868
- "name": "_FORCE_HTTP",
869
- "module": "src/env/variables.ts"
870
- }
871
- },
872
- {
873
- "kind": "js",
874
- "name": "API_HOST",
973
+ "name": "formatDateTimestamp",
875
974
  "declaration": {
876
- "name": "_API_HOST",
877
- "module": "src/env/variables.ts"
975
+ "name": "formatDateTimestamp",
976
+ "module": "src/formatters/datetime.ts"
878
977
  }
879
978
  },
880
979
  {
881
980
  "kind": "js",
882
- "name": "HTTP_CONFIG",
981
+ "name": "formatDateTimeTimestamp",
883
982
  "declaration": {
884
- "name": "_HTTP_CONFIG",
885
- "module": "src/env/variables.ts"
983
+ "name": "formatDateTimeTimestamp",
984
+ "module": "src/formatters/datetime.ts"
886
985
  }
887
986
  },
888
987
  {
889
988
  "kind": "js",
890
- "name": "DEFAULT_ORGANISATION",
989
+ "name": "formatTimestamp",
891
990
  "declaration": {
892
- "name": "_DEFAULT_ORGANISATION",
893
- "module": "src/env/variables.ts"
991
+ "name": "formatTimestamp",
992
+ "module": "src/formatters/datetime.ts"
894
993
  }
895
- },
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "kind": "javascript-module",
999
+ "path": "src/formatters/index.ts",
1000
+ "declarations": [],
1001
+ "exports": [
896
1002
  {
897
1003
  "kind": "js",
898
- "name": "DEFAULT_PASSWORD",
1004
+ "name": "*",
899
1005
  "declaration": {
900
- "name": "_DEFAULT_PASSWORD",
901
- "module": "src/env/variables.ts"
1006
+ "name": "*",
1007
+ "package": "./datetime"
902
1008
  }
903
1009
  },
904
1010
  {
905
1011
  "kind": "js",
906
- "name": "DEFAULT_USER",
1012
+ "name": "*",
907
1013
  "declaration": {
908
- "name": "_DEFAULT_USER",
909
- "module": "src/env/variables.ts"
1014
+ "name": "*",
1015
+ "package": "./localeNumberParser"
910
1016
  }
911
1017
  }
912
1018
  ]
913
1019
  },
914
1020
  {
915
1021
  "kind": "javascript-module",
916
- "path": "src/data/inMemoryDatabase.ts",
1022
+ "path": "src/formatters/localeNumberParser.ts",
917
1023
  "declarations": [
918
1024
  {
919
1025
  "kind": "class",
920
- "description": "An in memory database of specific DatabaseRecord types.",
921
- "name": "InMemoryDatabase",
1026
+ "description": "",
1027
+ "name": "NumberParser",
922
1028
  "members": [
923
1029
  {
924
1030
  "kind": "field",
925
- "name": "isWorking",
1031
+ "name": "_decimal",
926
1032
  "type": {
927
- "text": "boolean"
1033
+ "text": "RegExp"
928
1034
  },
929
- "privacy": "public",
930
- "default": "false"
1035
+ "privacy": "private",
1036
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
931
1037
  },
932
1038
  {
933
1039
  "kind": "field",
934
- "name": "records",
1040
+ "name": "_separator",
935
1041
  "type": {
936
- "text": "Record<string, T>"
1042
+ "text": "RegExp"
937
1043
  },
938
1044
  "privacy": "private",
939
- "default": "{}"
940
- },
941
- {
942
- "kind": "field",
943
- "name": "beforeUpdateListeners",
944
- "privacy": "private"
1045
+ "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
945
1046
  },
946
1047
  {
947
1048
  "kind": "field",
948
- "name": "afterUpdateListeners",
949
- "privacy": "private"
950
- },
951
- {
952
- "kind": "method",
953
- "name": "create",
954
- "privacy": "public",
955
- "return": {
956
- "type": {
957
- "text": "Promise<DatabaseAccessResult.Create<T>>"
958
- }
1049
+ "name": "_numeral",
1050
+ "type": {
1051
+ "text": "RegExp"
959
1052
  },
960
- "parameters": [
961
- {
962
- "name": "newValue",
963
- "type": {
964
- "text": "Omit<T, 'id'>"
965
- }
966
- }
967
- ]
1053
+ "privacy": "private",
1054
+ "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
968
1055
  },
969
1056
  {
970
- "kind": "method",
971
- "name": "read",
972
- "privacy": "public",
973
- "return": {
974
- "type": {
975
- "text": "Promise<DatabaseAccessResult.Read<T>>"
976
- }
1057
+ "kind": "field",
1058
+ "name": "_index",
1059
+ "type": {
1060
+ "text": "any"
977
1061
  },
978
- "parameters": [
979
- {
980
- "name": "id",
981
- "type": {
982
- "text": "string"
983
- }
984
- }
985
- ]
1062
+ "privacy": "private"
986
1063
  },
987
1064
  {
988
1065
  "kind": "method",
989
- "name": "update",
990
- "privacy": "public",
991
- "return": {
992
- "type": {
993
- "text": "Promise<DatabaseAccessResult.Update<T>>"
994
- }
995
- },
1066
+ "name": "parse",
996
1067
  "parameters": [
997
1068
  {
998
- "name": "id",
1069
+ "name": "localeNumber",
999
1070
  "type": {
1000
1071
  "text": "string"
1001
1072
  }
1002
- },
1003
- {
1004
- "name": "newValue",
1005
- "type": {
1006
- "text": "Omit<Partial<T>, 'id'>"
1007
- }
1008
1073
  }
1009
1074
  ]
1010
1075
  },
1011
1076
  {
1012
1077
  "kind": "method",
1013
- "name": "delete",
1014
- "privacy": "public",
1078
+ "name": "hasSeparator",
1015
1079
  "return": {
1016
1080
  "type": {
1017
- "text": "Promise<DatabaseAccessResult.Delete>"
1081
+ "text": "boolean"
1018
1082
  }
1019
1083
  },
1020
1084
  "parameters": [
1021
1085
  {
1022
- "name": "id",
1086
+ "name": "localeNumber",
1023
1087
  "type": {
1024
1088
  "text": "string"
1025
1089
  }
@@ -1027,58 +1091,9 @@
1027
1091
  ]
1028
1092
  },
1029
1093
  {
1030
- "kind": "method",
1031
- "name": "visit",
1032
- "privacy": "public",
1033
- "return": {
1034
- "type": {
1035
- "text": "Promise<void>"
1036
- }
1037
- },
1038
- "parameters": [
1039
- {
1040
- "name": "visitor",
1041
- "type": {
1042
- "text": "(record: T) => void"
1043
- }
1044
- }
1045
- ]
1046
- },
1047
- {
1048
- "kind": "method",
1049
- "name": "onBeforeUpdate",
1050
- "privacy": "public",
1051
- "return": {
1052
- "type": {
1053
- "text": "() => void"
1054
- }
1055
- },
1056
- "parameters": [
1057
- {
1058
- "name": "listener",
1059
- "type": {
1060
- "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
1061
- }
1062
- }
1063
- ]
1064
- },
1065
- {
1066
- "kind": "method",
1067
- "name": "onAfterUpdate",
1068
- "privacy": "public",
1069
- "return": {
1070
- "type": {
1071
- "text": "() => void"
1072
- }
1073
- },
1074
- "parameters": [
1075
- {
1076
- "name": "listener",
1077
- "type": {
1078
- "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
1079
- }
1080
- }
1081
- ]
1094
+ "kind": "field",
1095
+ "name": "_group",
1096
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
1082
1097
  }
1083
1098
  ]
1084
1099
  }
@@ -1086,25 +1101,10 @@
1086
1101
  "exports": [
1087
1102
  {
1088
1103
  "kind": "js",
1089
- "name": "InMemoryDatabase",
1090
- "declaration": {
1091
- "name": "InMemoryDatabase",
1092
- "module": "src/data/inMemoryDatabase.ts"
1093
- }
1094
- }
1095
- ]
1096
- },
1097
- {
1098
- "kind": "javascript-module",
1099
- "path": "src/data/index.ts",
1100
- "declarations": [],
1101
- "exports": [
1102
- {
1103
- "kind": "js",
1104
- "name": "*",
1104
+ "name": "NumberParser",
1105
1105
  "declaration": {
1106
- "name": "*",
1107
- "package": "./inMemoryDatabase"
1106
+ "name": "NumberParser",
1107
+ "module": "src/formatters/localeNumberParser.ts"
1108
1108
  }
1109
1109
  }
1110
1110
  ]
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.148.1-alpha-eef6f33.0",
4
+ "version": "14.149.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -19,17 +19,17 @@
19
19
  "test": "genx test"
20
20
  },
21
21
  "devDependencies": {
22
- "@genesislcap/foundation-testing": "14.148.1-alpha-eef6f33.0",
23
- "@genesislcap/genx": "14.148.1-alpha-eef6f33.0",
24
- "@genesislcap/rollup-builder": "14.148.1-alpha-eef6f33.0",
25
- "@genesislcap/ts-builder": "14.148.1-alpha-eef6f33.0",
26
- "@genesislcap/uvu-playwright-builder": "14.148.1-alpha-eef6f33.0",
27
- "@genesislcap/vite-builder": "14.148.1-alpha-eef6f33.0",
28
- "@genesislcap/webpack-builder": "14.148.1-alpha-eef6f33.0",
22
+ "@genesislcap/foundation-testing": "14.149.2",
23
+ "@genesislcap/genx": "14.149.2",
24
+ "@genesislcap/rollup-builder": "14.149.2",
25
+ "@genesislcap/ts-builder": "14.149.2",
26
+ "@genesislcap/uvu-playwright-builder": "14.149.2",
27
+ "@genesislcap/vite-builder": "14.149.2",
28
+ "@genesislcap/webpack-builder": "14.149.2",
29
29
  "rimraf": "^3.0.2"
30
30
  },
31
31
  "dependencies": {
32
- "@genesislcap/foundation-logger": "14.148.1-alpha-eef6f33.0",
32
+ "@genesislcap/foundation-logger": "14.149.2",
33
33
  "@microsoft/fast-components": "^2.30.6",
34
34
  "@microsoft/fast-element": "^1.12.0",
35
35
  "@microsoft/fast-foundation": "^2.49.4",
@@ -47,5 +47,5 @@
47
47
  "access": "public"
48
48
  },
49
49
  "customElements": "dist/custom-elements.json",
50
- "gitHead": "27f813cf911820761f0971b5f4639ce91efc7baa"
50
+ "gitHead": "7cd54ab7f102571fb3f611db37edc6b9e5625df1"
51
51
  }