@genesislcap/foundation-utils 14.215.0 → 14.215.1-alpha-886b8d5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/dist/custom-elements.json +600 -600
  2. package/package.json +10 -10
@@ -367,7 +367,7 @@
367
367
  },
368
368
  {
369
369
  "kind": "javascript-module",
370
- "path": "src/decorators/index.ts",
370
+ "path": "src/directives/index.ts",
371
371
  "declarations": [],
372
372
  "exports": [
373
373
  {
@@ -375,45 +375,15 @@
375
375
  "name": "*",
376
376
  "declaration": {
377
377
  "name": "*",
378
- "package": "./renderOnChange"
378
+ "package": "./sync"
379
379
  }
380
- }
381
- ]
382
- },
383
- {
384
- "kind": "javascript-module",
385
- "path": "src/decorators/renderOnChange.ts",
386
- "declarations": [
387
- {
388
- "kind": "function",
389
- "name": "renderOnChange",
390
- "parameters": [
391
- {
392
- "name": "target",
393
- "type": {
394
- "text": "FASTElement & { render(): void }"
395
- },
396
- "description": "The target to define the property change handler on."
397
- },
398
- {
399
- "name": "name",
400
- "type": {
401
- "text": "string"
402
- },
403
- "description": "The property name."
404
- }
405
- ],
406
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
407
- "privacy": "public"
408
- }
409
- ],
410
- "exports": [
380
+ },
411
381
  {
412
382
  "kind": "js",
413
- "name": "renderOnChange",
383
+ "name": "*",
414
384
  "declaration": {
415
- "name": "renderOnChange",
416
- "module": "src/decorators/renderOnChange.ts"
385
+ "name": "*",
386
+ "package": "./when-else"
417
387
  }
418
388
  }
419
389
  ]
@@ -470,745 +440,775 @@
470
440
  },
471
441
  {
472
442
  "kind": "javascript-module",
473
- "path": "src/error/errorMap.ts",
474
- "declarations": [
475
- {
476
- "kind": "class",
477
- "description": "",
478
- "name": "DefaultErrorMap",
479
- "members": [
480
- {
481
- "kind": "field",
482
- "name": "map",
483
- "privacy": "private",
484
- "default": "new Map<keyof TErrorDetailMap, Error>()"
485
- },
486
- {
487
- "kind": "field",
488
- "name": "lastError",
489
- "type": {
490
- "text": "Error"
491
- },
492
- "description": "{@inheritDoc ErrorMap.lastError}"
493
- },
494
- {
495
- "kind": "method",
496
- "name": "set",
497
- "return": {
498
- "type": {
499
- "text": "void"
500
- }
501
- },
502
- "parameters": [
503
- {
504
- "name": "key",
505
- "type": {
506
- "text": "keyof TErrorDetailMap"
507
- }
508
- },
509
- {
510
- "name": "error",
511
- "type": {
512
- "text": "Error"
513
- }
514
- }
515
- ],
516
- "description": "{@inheritDoc ErrorMap.set}"
517
- },
518
- {
519
- "kind": "method",
520
- "name": "get",
521
- "return": {
522
- "type": {
523
- "text": ""
524
- }
525
- },
526
- "parameters": [
527
- {
528
- "name": "key",
529
- "type": {
530
- "text": "keyof TErrorDetailMap"
531
- },
532
- "description": "The key."
533
- }
534
- ],
535
- "description": "Get an error by key.",
536
- "privacy": "public"
537
- },
538
- {
539
- "kind": "method",
540
- "name": "has",
541
- "return": {
542
- "type": {
543
- "text": ""
544
- }
545
- },
546
- "parameters": [
547
- {
548
- "name": "key",
549
- "type": {
550
- "text": "keyof TErrorDetailMap"
551
- },
552
- "description": "The key."
553
- }
554
- ],
555
- "description": "Has an error for key.",
556
- "privacy": "public"
557
- },
558
- {
559
- "kind": "method",
560
- "name": "delete",
561
- "return": {
562
- "type": {
563
- "text": ""
564
- }
565
- },
566
- "parameters": [
567
- {
568
- "name": "key",
569
- "type": {
570
- "text": "keyof TErrorDetailMap"
571
- },
572
- "description": "The key."
573
- }
574
- ],
575
- "description": "Delete an error.",
576
- "privacy": "public"
577
- },
578
- {
579
- "kind": "method",
580
- "name": "clear",
581
- "description": "Clear errors.",
582
- "privacy": "public"
583
- },
584
- {
585
- "kind": "field",
586
- "name": "size",
587
- "type": {
588
- "text": "number"
589
- },
590
- "description": "The size of the error map.",
591
- "return": {
592
- "type": {
593
- "text": ""
594
- }
595
- },
596
- "privacy": "public",
597
- "readonly": true
598
- },
599
- {
600
- "kind": "method",
601
- "name": "values",
602
- "privacy": "public"
603
- },
604
- {
605
- "kind": "field",
606
- "name": "messages",
607
- "type": {
608
- "text": "string"
609
- },
610
- "description": "{@inheritDoc ErrorMap.messages}",
611
- "readonly": true
612
- }
613
- ]
614
- },
615
- {
616
- "kind": "function",
617
- "name": "createErrorMap",
618
- "return": {
619
- "type": {
620
- "text": ""
621
- }
622
- },
623
- "parameters": [
624
- {
625
- "name": "logger",
626
- "type": {
627
- "text": "ErrorMapLogger"
628
- },
629
- "description": "A logger error method reference."
630
- }
631
- ],
632
- "description": "A factory to create the error map.",
633
- "privacy": "public"
634
- }
635
- ],
443
+ "path": "src/env/index.ts",
444
+ "declarations": [],
636
445
  "exports": [
637
446
  {
638
447
  "kind": "js",
639
- "name": "DefaultErrorMap",
448
+ "name": "*",
640
449
  "declaration": {
641
- "name": "DefaultErrorMap",
642
- "module": "src/error/errorMap.ts"
450
+ "name": "*",
451
+ "package": "./is-dev"
643
452
  }
644
453
  },
645
454
  {
646
455
  "kind": "js",
647
- "name": "createErrorMap",
456
+ "name": "*",
648
457
  "declaration": {
649
- "name": "createErrorMap",
650
- "module": "src/error/errorMap.ts"
458
+ "name": "*",
459
+ "package": "./variables"
651
460
  }
652
461
  }
653
462
  ]
654
463
  },
655
464
  {
656
465
  "kind": "javascript-module",
657
- "path": "src/error/index.ts",
658
- "declarations": [],
466
+ "path": "src/env/is-dev.ts",
467
+ "declarations": [
468
+ {
469
+ "kind": "function",
470
+ "name": "isDev",
471
+ "description": "Determines if the current environment is a development environment.",
472
+ "privacy": "public"
473
+ }
474
+ ],
659
475
  "exports": [
660
476
  {
661
477
  "kind": "js",
662
- "name": "*",
478
+ "name": "isDev",
663
479
  "declaration": {
664
- "name": "*",
665
- "package": "./errorMap"
480
+ "name": "isDev",
481
+ "module": "src/env/is-dev.ts"
666
482
  }
667
483
  }
668
484
  ]
669
485
  },
670
486
  {
671
487
  "kind": "javascript-module",
672
- "path": "src/formatters/datetime.ts",
488
+ "path": "src/env/variables.ts",
673
489
  "declarations": [
674
490
  {
675
- "kind": "function",
676
- "name": "formatDateTimestamp",
677
- "return": {
678
- "type": {
679
- "text": "string"
680
- }
491
+ "kind": "variable",
492
+ "name": "SOCKET_EXT",
493
+ "type": {
494
+ "text": "string"
495
+ }
496
+ },
497
+ {
498
+ "kind": "variable",
499
+ "name": "_SOCKET_EXT",
500
+ "type": {
501
+ "text": "string"
681
502
  },
682
- "parameters": [
683
- {
684
- "name": "timestamp",
685
- "type": {
686
- "text": "number"
687
- }
688
- }
689
- ],
690
- "description": "Formats [DATE] UNIX Timestamps (without time) to readable strings",
503
+ "default": "'gwf'",
504
+ "description": "The sub-path used for WebSocket connections when API_HOST is not set",
691
505
  "privacy": "public"
692
506
  },
693
507
  {
694
- "kind": "function",
695
- "name": "formatDateTimeTimestamp",
696
- "return": {
697
- "type": {
698
- "text": "string"
699
- }
508
+ "kind": "variable",
509
+ "name": "FORCE_HTTP",
510
+ "type": {
511
+ "text": "string"
512
+ }
513
+ },
514
+ {
515
+ "kind": "variable",
516
+ "name": "_FORCE_HTTP",
517
+ "type": {
518
+ "text": "string"
700
519
  },
701
- "parameters": [
702
- {
703
- "name": "timestamp",
704
- "type": {
705
- "text": "number"
706
- }
707
- }
708
- ],
709
- "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
520
+ "description": "The path to a JSON config file for the HTTP mode.",
710
521
  "privacy": "public"
711
522
  },
712
523
  {
713
- "kind": "function",
714
- "name": "formatTimestamp",
715
- "return": {
716
- "type": {
717
- "text": "string"
718
- }
524
+ "kind": "variable",
525
+ "name": "GENESIS_SOCKET_URL",
526
+ "default": "`${location.protocol.replace('http', 'ws')}//${location.host}/${_SOCKET_EXT}/`",
527
+ "description": "Genesis Socket URL",
528
+ "privacy": "public"
529
+ },
530
+ {
531
+ "kind": "variable",
532
+ "name": "API_HOST",
533
+ "type": {
534
+ "text": "string"
535
+ }
536
+ },
537
+ {
538
+ "kind": "variable",
539
+ "name": "_API_HOST",
540
+ "type": {
541
+ "text": "string"
719
542
  },
720
- "parameters": [
721
- {
722
- "name": "timestamp",
723
- "type": {
724
- "text": "number"
725
- },
726
- "description": "The UNIX Timestamp."
727
- },
728
- {
729
- "name": "withTime",
730
- "type": {
731
- "text": "boolean"
732
- },
733
- "description": "The flag to determine if formatted value should contain 'time' info."
734
- }
735
- ],
736
- "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
543
+ "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
544
+ "description": "The Genesis Server URL (WebSocket or HTTP).",
737
545
  "privacy": "public"
738
546
  },
739
547
  {
740
- "kind": "function",
741
- "name": "getDateFormatter",
742
- "parameters": [
743
- {
744
- "name": "locale",
745
- "default": "'en-GB'",
746
- "type": {
747
- "text": "string"
748
- }
749
- },
750
- {
751
- "name": "options",
752
- "default": "defaultDateOptions",
753
- "type": {
754
- "text": "Intl.DateTimeFormatOptions"
755
- }
756
- }
757
- ],
548
+ "kind": "variable",
549
+ "name": "HTTP_CONFIG",
550
+ "type": {
551
+ "text": "string"
552
+ }
553
+ },
554
+ {
555
+ "kind": "variable",
556
+ "name": "_HTTP_CONFIG",
557
+ "type": {
558
+ "text": "string"
559
+ },
560
+ "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
561
+ "privacy": "public"
562
+ },
563
+ {
564
+ "kind": "variable",
565
+ "name": "DEFAULT_ORGANISATION",
566
+ "type": {
567
+ "text": "string"
568
+ }
569
+ },
570
+ {
571
+ "kind": "variable",
572
+ "name": "_DEFAULT_ORGANISATION",
573
+ "type": {
574
+ "text": "string"
575
+ },
576
+ "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
577
+ "privacy": "public"
578
+ },
579
+ {
580
+ "kind": "variable",
581
+ "name": "DEFAULT_PASSWORD",
582
+ "type": {
583
+ "text": "string"
584
+ }
585
+ },
586
+ {
587
+ "kind": "variable",
588
+ "name": "_DEFAULT_PASSWORD",
589
+ "type": {
590
+ "text": "string"
591
+ },
592
+ "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
593
+ "privacy": "public"
594
+ },
595
+ {
596
+ "kind": "variable",
597
+ "name": "DEFAULT_USER",
598
+ "type": {
599
+ "text": "string"
600
+ }
601
+ },
602
+ {
603
+ "kind": "variable",
604
+ "name": "_DEFAULT_USER",
605
+ "type": {
606
+ "text": "string"
607
+ },
608
+ "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
758
609
  "privacy": "public"
759
610
  }
760
611
  ],
761
612
  "exports": [
762
613
  {
763
614
  "kind": "js",
764
- "name": "formatDateTimestamp",
615
+ "name": "SOCKET_EXT",
765
616
  "declaration": {
766
- "name": "formatDateTimestamp",
767
- "module": "src/formatters/datetime.ts"
617
+ "name": "_SOCKET_EXT",
618
+ "module": "src/env/variables.ts"
768
619
  }
769
620
  },
770
621
  {
771
622
  "kind": "js",
772
- "name": "formatDateTimeTimestamp",
623
+ "name": "FORCE_HTTP",
773
624
  "declaration": {
774
- "name": "formatDateTimeTimestamp",
775
- "module": "src/formatters/datetime.ts"
625
+ "name": "_FORCE_HTTP",
626
+ "module": "src/env/variables.ts"
776
627
  }
777
628
  },
778
629
  {
779
630
  "kind": "js",
780
- "name": "formatTimestamp",
631
+ "name": "GENESIS_SOCKET_URL",
781
632
  "declaration": {
782
- "name": "formatTimestamp",
783
- "module": "src/formatters/datetime.ts"
633
+ "name": "GENESIS_SOCKET_URL",
634
+ "module": "src/env/variables.ts"
784
635
  }
785
636
  },
786
637
  {
787
638
  "kind": "js",
788
- "name": "getDateFormatter",
639
+ "name": "API_HOST",
789
640
  "declaration": {
790
- "name": "getDateFormatter",
791
- "module": "src/formatters/datetime.ts"
641
+ "name": "_API_HOST",
642
+ "module": "src/env/variables.ts"
792
643
  }
793
- }
794
- ]
795
- },
796
- {
797
- "kind": "javascript-module",
798
- "path": "src/formatters/index.ts",
799
- "declarations": [],
800
- "exports": [
644
+ },
801
645
  {
802
646
  "kind": "js",
803
- "name": "*",
647
+ "name": "HTTP_CONFIG",
804
648
  "declaration": {
805
- "name": "*",
806
- "package": "./datetime"
649
+ "name": "_HTTP_CONFIG",
650
+ "module": "src/env/variables.ts"
807
651
  }
808
652
  },
809
653
  {
810
654
  "kind": "js",
811
- "name": "*",
655
+ "name": "DEFAULT_ORGANISATION",
812
656
  "declaration": {
813
- "name": "*",
814
- "package": "./localeNumberParser"
657
+ "name": "_DEFAULT_ORGANISATION",
658
+ "module": "src/env/variables.ts"
659
+ }
660
+ },
661
+ {
662
+ "kind": "js",
663
+ "name": "DEFAULT_PASSWORD",
664
+ "declaration": {
665
+ "name": "_DEFAULT_PASSWORD",
666
+ "module": "src/env/variables.ts"
815
667
  }
816
668
  },
669
+ {
670
+ "kind": "js",
671
+ "name": "DEFAULT_USER",
672
+ "declaration": {
673
+ "name": "_DEFAULT_USER",
674
+ "module": "src/env/variables.ts"
675
+ }
676
+ }
677
+ ]
678
+ },
679
+ {
680
+ "kind": "javascript-module",
681
+ "path": "src/decorators/index.ts",
682
+ "declarations": [],
683
+ "exports": [
817
684
  {
818
685
  "kind": "js",
819
686
  "name": "*",
820
687
  "declaration": {
821
688
  "name": "*",
822
- "package": "./number"
689
+ "package": "./renderOnChange"
823
690
  }
824
691
  }
825
692
  ]
826
693
  },
827
694
  {
828
695
  "kind": "javascript-module",
829
- "path": "src/formatters/localeNumberParser.ts",
696
+ "path": "src/decorators/renderOnChange.ts",
830
697
  "declarations": [
831
698
  {
832
- "kind": "class",
833
- "description": "",
834
- "name": "NumberParser",
835
- "members": [
699
+ "kind": "function",
700
+ "name": "renderOnChange",
701
+ "parameters": [
836
702
  {
837
- "kind": "field",
838
- "name": "_decimal",
703
+ "name": "target",
839
704
  "type": {
840
- "text": "RegExp"
705
+ "text": "FASTElement & { render(): void }"
841
706
  },
842
- "privacy": "private",
843
- "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
707
+ "description": "The target to define the property change handler on."
844
708
  },
845
709
  {
846
- "kind": "field",
847
- "name": "_separator",
710
+ "name": "name",
848
711
  "type": {
849
- "text": "RegExp"
850
- },
851
- "privacy": "private",
852
- "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
853
- },
854
- {
855
- "kind": "field",
856
- "name": "_numeral",
857
- "type": {
858
- "text": "RegExp"
712
+ "text": "string"
859
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"
728
+ }
729
+ }
730
+ ]
731
+ },
732
+ {
733
+ "kind": "javascript-module",
734
+ "path": "src/error/errorMap.ts",
735
+ "declarations": [
736
+ {
737
+ "kind": "class",
738
+ "description": "",
739
+ "name": "DefaultErrorMap",
740
+ "members": [
741
+ {
742
+ "kind": "field",
743
+ "name": "map",
860
744
  "privacy": "private",
861
- "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
745
+ "default": "new Map<keyof TErrorDetailMap, Error>()"
862
746
  },
863
747
  {
864
748
  "kind": "field",
865
- "name": "_index",
749
+ "name": "lastError",
866
750
  "type": {
867
- "text": "any"
751
+ "text": "Error"
868
752
  },
869
- "privacy": "private"
753
+ "description": "{@inheritDoc ErrorMap.lastError}"
870
754
  },
871
755
  {
872
756
  "kind": "method",
873
- "name": "parse",
757
+ "name": "set",
758
+ "return": {
759
+ "type": {
760
+ "text": "void"
761
+ }
762
+ },
874
763
  "parameters": [
875
764
  {
876
- "name": "localeNumber",
765
+ "name": "key",
877
766
  "type": {
878
- "text": "string"
767
+ "text": "keyof TErrorDetailMap"
768
+ }
769
+ },
770
+ {
771
+ "name": "error",
772
+ "type": {
773
+ "text": "Error"
879
774
  }
880
775
  }
881
- ]
776
+ ],
777
+ "description": "{@inheritDoc ErrorMap.set}"
882
778
  },
883
779
  {
884
780
  "kind": "method",
885
- "name": "hasSeparator",
781
+ "name": "get",
886
782
  "return": {
887
783
  "type": {
888
- "text": "boolean"
784
+ "text": ""
889
785
  }
890
786
  },
891
787
  "parameters": [
892
788
  {
893
- "name": "localeNumber",
789
+ "name": "key",
894
790
  "type": {
895
- "text": "string"
896
- }
791
+ "text": "keyof TErrorDetailMap"
792
+ },
793
+ "description": "The key."
897
794
  }
898
- ]
795
+ ],
796
+ "description": "Get an error by key.",
797
+ "privacy": "public"
798
+ },
799
+ {
800
+ "kind": "method",
801
+ "name": "has",
802
+ "return": {
803
+ "type": {
804
+ "text": ""
805
+ }
806
+ },
807
+ "parameters": [
808
+ {
809
+ "name": "key",
810
+ "type": {
811
+ "text": "keyof TErrorDetailMap"
812
+ },
813
+ "description": "The key."
814
+ }
815
+ ],
816
+ "description": "Has an error for key.",
817
+ "privacy": "public"
818
+ },
819
+ {
820
+ "kind": "method",
821
+ "name": "delete",
822
+ "return": {
823
+ "type": {
824
+ "text": ""
825
+ }
826
+ },
827
+ "parameters": [
828
+ {
829
+ "name": "key",
830
+ "type": {
831
+ "text": "keyof TErrorDetailMap"
832
+ },
833
+ "description": "The key."
834
+ }
835
+ ],
836
+ "description": "Delete an error.",
837
+ "privacy": "public"
838
+ },
839
+ {
840
+ "kind": "method",
841
+ "name": "clear",
842
+ "description": "Clear errors.",
843
+ "privacy": "public"
899
844
  },
900
845
  {
901
846
  "kind": "field",
902
- "name": "_group",
903
- "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
847
+ "name": "size",
848
+ "type": {
849
+ "text": "number"
850
+ },
851
+ "description": "The size of the error map.",
852
+ "return": {
853
+ "type": {
854
+ "text": ""
855
+ }
856
+ },
857
+ "privacy": "public",
858
+ "readonly": true
859
+ },
860
+ {
861
+ "kind": "method",
862
+ "name": "values",
863
+ "privacy": "public"
864
+ },
865
+ {
866
+ "kind": "field",
867
+ "name": "messages",
868
+ "type": {
869
+ "text": "string"
870
+ },
871
+ "description": "{@inheritDoc ErrorMap.messages}",
872
+ "readonly": true
904
873
  }
905
874
  ]
906
- }
907
- ],
908
- "exports": [
909
- {
910
- "kind": "js",
911
- "name": "NumberParser",
912
- "declaration": {
913
- "name": "NumberParser",
914
- "module": "src/formatters/localeNumberParser.ts"
915
- }
916
- }
917
- ]
918
- },
919
- {
920
- "kind": "javascript-module",
921
- "path": "src/formatters/number.ts",
922
- "declarations": [
875
+ },
923
876
  {
924
877
  "kind": "function",
925
- "name": "getNumberFormatter",
878
+ "name": "createErrorMap",
879
+ "return": {
880
+ "type": {
881
+ "text": ""
882
+ }
883
+ },
926
884
  "parameters": [
927
885
  {
928
- "name": "format",
929
- "type": {
930
- "text": "string"
931
- }
932
- },
933
- {
934
- "name": "locale",
935
- "optional": true,
886
+ "name": "logger",
936
887
  "type": {
937
- "text": "string | null"
938
- }
888
+ "text": "ErrorMapLogger"
889
+ },
890
+ "description": "A logger error method reference."
939
891
  }
940
892
  ],
893
+ "description": "A factory to create the error map.",
941
894
  "privacy": "public"
942
895
  }
943
896
  ],
944
897
  "exports": [
945
898
  {
946
899
  "kind": "js",
947
- "name": "getNumberFormatter",
948
- "declaration": {
949
- "name": "getNumberFormatter",
950
- "module": "src/formatters/number.ts"
951
- }
952
- }
953
- ]
954
- },
955
- {
956
- "kind": "javascript-module",
957
- "path": "src/env/index.ts",
958
- "declarations": [],
959
- "exports": [
960
- {
961
- "kind": "js",
962
- "name": "*",
900
+ "name": "DefaultErrorMap",
963
901
  "declaration": {
964
- "name": "*",
965
- "package": "./is-dev"
902
+ "name": "DefaultErrorMap",
903
+ "module": "src/error/errorMap.ts"
966
904
  }
967
905
  },
968
906
  {
969
907
  "kind": "js",
970
- "name": "*",
908
+ "name": "createErrorMap",
971
909
  "declaration": {
972
- "name": "*",
973
- "package": "./variables"
910
+ "name": "createErrorMap",
911
+ "module": "src/error/errorMap.ts"
974
912
  }
975
913
  }
976
914
  ]
977
915
  },
978
916
  {
979
917
  "kind": "javascript-module",
980
- "path": "src/env/is-dev.ts",
981
- "declarations": [
982
- {
983
- "kind": "function",
984
- "name": "isDev",
985
- "description": "Determines if the current environment is a development environment.",
986
- "privacy": "public"
987
- }
988
- ],
918
+ "path": "src/error/index.ts",
919
+ "declarations": [],
989
920
  "exports": [
990
921
  {
991
922
  "kind": "js",
992
- "name": "isDev",
923
+ "name": "*",
993
924
  "declaration": {
994
- "name": "isDev",
995
- "module": "src/env/is-dev.ts"
925
+ "name": "*",
926
+ "package": "./errorMap"
996
927
  }
997
928
  }
998
929
  ]
999
930
  },
1000
931
  {
1001
932
  "kind": "javascript-module",
1002
- "path": "src/env/variables.ts",
933
+ "path": "src/formatters/datetime.ts",
1003
934
  "declarations": [
1004
935
  {
1005
- "kind": "variable",
1006
- "name": "SOCKET_EXT",
1007
- "type": {
1008
- "text": "string"
1009
- }
1010
- },
1011
- {
1012
- "kind": "variable",
1013
- "name": "_SOCKET_EXT",
1014
- "type": {
1015
- "text": "string"
1016
- },
1017
- "default": "'gwf'",
1018
- "description": "The sub-path used for WebSocket connections when API_HOST is not set",
1019
- "privacy": "public"
1020
- },
1021
- {
1022
- "kind": "variable",
1023
- "name": "FORCE_HTTP",
1024
- "type": {
1025
- "text": "string"
1026
- }
1027
- },
1028
- {
1029
- "kind": "variable",
1030
- "name": "_FORCE_HTTP",
1031
- "type": {
1032
- "text": "string"
1033
- },
1034
- "description": "The path to a JSON config file for the HTTP mode.",
1035
- "privacy": "public"
1036
- },
1037
- {
1038
- "kind": "variable",
1039
- "name": "GENESIS_SOCKET_URL",
1040
- "default": "`${location.protocol.replace('http', 'ws')}//${location.host}/${_SOCKET_EXT}/`",
1041
- "description": "Genesis Socket URL",
1042
- "privacy": "public"
1043
- },
1044
- {
1045
- "kind": "variable",
1046
- "name": "API_HOST",
1047
- "type": {
1048
- "text": "string"
1049
- }
1050
- },
1051
- {
1052
- "kind": "variable",
1053
- "name": "_API_HOST",
1054
- "type": {
1055
- "text": "string"
1056
- },
1057
- "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
1058
- "description": "The Genesis Server URL (WebSocket or HTTP).",
1059
- "privacy": "public"
1060
- },
1061
- {
1062
- "kind": "variable",
1063
- "name": "HTTP_CONFIG",
1064
- "type": {
1065
- "text": "string"
1066
- }
1067
- },
1068
- {
1069
- "kind": "variable",
1070
- "name": "_HTTP_CONFIG",
1071
- "type": {
1072
- "text": "string"
936
+ "kind": "function",
937
+ "name": "formatDateTimestamp",
938
+ "return": {
939
+ "type": {
940
+ "text": "string"
941
+ }
1073
942
  },
1074
- "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
943
+ "parameters": [
944
+ {
945
+ "name": "timestamp",
946
+ "type": {
947
+ "text": "number"
948
+ }
949
+ }
950
+ ],
951
+ "description": "Formats [DATE] UNIX Timestamps (without time) to readable strings",
1075
952
  "privacy": "public"
1076
953
  },
1077
954
  {
1078
- "kind": "variable",
1079
- "name": "DEFAULT_ORGANISATION",
1080
- "type": {
1081
- "text": "string"
1082
- }
1083
- },
1084
- {
1085
- "kind": "variable",
1086
- "name": "_DEFAULT_ORGANISATION",
1087
- "type": {
1088
- "text": "string"
955
+ "kind": "function",
956
+ "name": "formatDateTimeTimestamp",
957
+ "return": {
958
+ "type": {
959
+ "text": "string"
960
+ }
1089
961
  },
1090
- "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
962
+ "parameters": [
963
+ {
964
+ "name": "timestamp",
965
+ "type": {
966
+ "text": "number"
967
+ }
968
+ }
969
+ ],
970
+ "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
1091
971
  "privacy": "public"
1092
972
  },
1093
973
  {
1094
- "kind": "variable",
1095
- "name": "DEFAULT_PASSWORD",
1096
- "type": {
1097
- "text": "string"
1098
- }
1099
- },
1100
- {
1101
- "kind": "variable",
1102
- "name": "_DEFAULT_PASSWORD",
1103
- "type": {
1104
- "text": "string"
974
+ "kind": "function",
975
+ "name": "formatTimestamp",
976
+ "return": {
977
+ "type": {
978
+ "text": "string"
979
+ }
1105
980
  },
1106
- "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
981
+ "parameters": [
982
+ {
983
+ "name": "timestamp",
984
+ "type": {
985
+ "text": "number"
986
+ },
987
+ "description": "The UNIX Timestamp."
988
+ },
989
+ {
990
+ "name": "withTime",
991
+ "type": {
992
+ "text": "boolean"
993
+ },
994
+ "description": "The flag to determine if formatted value should contain 'time' info."
995
+ }
996
+ ],
997
+ "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
1107
998
  "privacy": "public"
1108
999
  },
1109
1000
  {
1110
- "kind": "variable",
1111
- "name": "DEFAULT_USER",
1112
- "type": {
1113
- "text": "string"
1114
- }
1115
- },
1116
- {
1117
- "kind": "variable",
1118
- "name": "_DEFAULT_USER",
1119
- "type": {
1120
- "text": "string"
1121
- },
1122
- "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
1001
+ "kind": "function",
1002
+ "name": "getDateFormatter",
1003
+ "parameters": [
1004
+ {
1005
+ "name": "locale",
1006
+ "default": "'en-GB'",
1007
+ "type": {
1008
+ "text": "string"
1009
+ }
1010
+ },
1011
+ {
1012
+ "name": "options",
1013
+ "default": "defaultDateOptions",
1014
+ "type": {
1015
+ "text": "Intl.DateTimeFormatOptions"
1016
+ }
1017
+ }
1018
+ ],
1123
1019
  "privacy": "public"
1124
1020
  }
1125
1021
  ],
1126
1022
  "exports": [
1127
1023
  {
1128
1024
  "kind": "js",
1129
- "name": "SOCKET_EXT",
1130
- "declaration": {
1131
- "name": "_SOCKET_EXT",
1132
- "module": "src/env/variables.ts"
1133
- }
1134
- },
1135
- {
1136
- "kind": "js",
1137
- "name": "FORCE_HTTP",
1025
+ "name": "formatDateTimestamp",
1138
1026
  "declaration": {
1139
- "name": "_FORCE_HTTP",
1140
- "module": "src/env/variables.ts"
1027
+ "name": "formatDateTimestamp",
1028
+ "module": "src/formatters/datetime.ts"
1141
1029
  }
1142
1030
  },
1143
1031
  {
1144
1032
  "kind": "js",
1145
- "name": "GENESIS_SOCKET_URL",
1033
+ "name": "formatDateTimeTimestamp",
1146
1034
  "declaration": {
1147
- "name": "GENESIS_SOCKET_URL",
1148
- "module": "src/env/variables.ts"
1035
+ "name": "formatDateTimeTimestamp",
1036
+ "module": "src/formatters/datetime.ts"
1149
1037
  }
1150
1038
  },
1151
1039
  {
1152
1040
  "kind": "js",
1153
- "name": "API_HOST",
1041
+ "name": "formatTimestamp",
1154
1042
  "declaration": {
1155
- "name": "_API_HOST",
1156
- "module": "src/env/variables.ts"
1043
+ "name": "formatTimestamp",
1044
+ "module": "src/formatters/datetime.ts"
1157
1045
  }
1158
1046
  },
1159
1047
  {
1160
1048
  "kind": "js",
1161
- "name": "HTTP_CONFIG",
1049
+ "name": "getDateFormatter",
1162
1050
  "declaration": {
1163
- "name": "_HTTP_CONFIG",
1164
- "module": "src/env/variables.ts"
1051
+ "name": "getDateFormatter",
1052
+ "module": "src/formatters/datetime.ts"
1165
1053
  }
1166
- },
1054
+ }
1055
+ ]
1056
+ },
1057
+ {
1058
+ "kind": "javascript-module",
1059
+ "path": "src/formatters/index.ts",
1060
+ "declarations": [],
1061
+ "exports": [
1167
1062
  {
1168
1063
  "kind": "js",
1169
- "name": "DEFAULT_ORGANISATION",
1064
+ "name": "*",
1170
1065
  "declaration": {
1171
- "name": "_DEFAULT_ORGANISATION",
1172
- "module": "src/env/variables.ts"
1066
+ "name": "*",
1067
+ "package": "./datetime"
1173
1068
  }
1174
1069
  },
1175
1070
  {
1176
1071
  "kind": "js",
1177
- "name": "DEFAULT_PASSWORD",
1072
+ "name": "*",
1178
1073
  "declaration": {
1179
- "name": "_DEFAULT_PASSWORD",
1180
- "module": "src/env/variables.ts"
1074
+ "name": "*",
1075
+ "package": "./localeNumberParser"
1181
1076
  }
1182
1077
  },
1183
1078
  {
1184
1079
  "kind": "js",
1185
- "name": "DEFAULT_USER",
1080
+ "name": "*",
1186
1081
  "declaration": {
1187
- "name": "_DEFAULT_USER",
1188
- "module": "src/env/variables.ts"
1082
+ "name": "*",
1083
+ "package": "./number"
1189
1084
  }
1190
1085
  }
1191
1086
  ]
1192
1087
  },
1193
1088
  {
1194
1089
  "kind": "javascript-module",
1195
- "path": "src/directives/index.ts",
1196
- "declarations": [],
1090
+ "path": "src/formatters/localeNumberParser.ts",
1091
+ "declarations": [
1092
+ {
1093
+ "kind": "class",
1094
+ "description": "",
1095
+ "name": "NumberParser",
1096
+ "members": [
1097
+ {
1098
+ "kind": "field",
1099
+ "name": "_decimal",
1100
+ "type": {
1101
+ "text": "RegExp"
1102
+ },
1103
+ "privacy": "private",
1104
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
1105
+ },
1106
+ {
1107
+ "kind": "field",
1108
+ "name": "_separator",
1109
+ "type": {
1110
+ "text": "RegExp"
1111
+ },
1112
+ "privacy": "private",
1113
+ "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
1114
+ },
1115
+ {
1116
+ "kind": "field",
1117
+ "name": "_numeral",
1118
+ "type": {
1119
+ "text": "RegExp"
1120
+ },
1121
+ "privacy": "private",
1122
+ "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
1123
+ },
1124
+ {
1125
+ "kind": "field",
1126
+ "name": "_index",
1127
+ "type": {
1128
+ "text": "any"
1129
+ },
1130
+ "privacy": "private"
1131
+ },
1132
+ {
1133
+ "kind": "method",
1134
+ "name": "parse",
1135
+ "parameters": [
1136
+ {
1137
+ "name": "localeNumber",
1138
+ "type": {
1139
+ "text": "string"
1140
+ }
1141
+ }
1142
+ ]
1143
+ },
1144
+ {
1145
+ "kind": "method",
1146
+ "name": "hasSeparator",
1147
+ "return": {
1148
+ "type": {
1149
+ "text": "boolean"
1150
+ }
1151
+ },
1152
+ "parameters": [
1153
+ {
1154
+ "name": "localeNumber",
1155
+ "type": {
1156
+ "text": "string"
1157
+ }
1158
+ }
1159
+ ]
1160
+ },
1161
+ {
1162
+ "kind": "field",
1163
+ "name": "_group",
1164
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
1165
+ }
1166
+ ]
1167
+ }
1168
+ ],
1197
1169
  "exports": [
1198
1170
  {
1199
1171
  "kind": "js",
1200
- "name": "*",
1172
+ "name": "NumberParser",
1201
1173
  "declaration": {
1202
- "name": "*",
1203
- "package": "./sync"
1174
+ "name": "NumberParser",
1175
+ "module": "src/formatters/localeNumberParser.ts"
1204
1176
  }
1205
- },
1177
+ }
1178
+ ]
1179
+ },
1180
+ {
1181
+ "kind": "javascript-module",
1182
+ "path": "src/formatters/number.ts",
1183
+ "declarations": [
1184
+ {
1185
+ "kind": "function",
1186
+ "name": "getNumberFormatter",
1187
+ "parameters": [
1188
+ {
1189
+ "name": "format",
1190
+ "type": {
1191
+ "text": "string"
1192
+ }
1193
+ },
1194
+ {
1195
+ "name": "locale",
1196
+ "optional": true,
1197
+ "type": {
1198
+ "text": "string | null"
1199
+ }
1200
+ }
1201
+ ],
1202
+ "privacy": "public"
1203
+ }
1204
+ ],
1205
+ "exports": [
1206
1206
  {
1207
1207
  "kind": "js",
1208
- "name": "*",
1208
+ "name": "getNumberFormatter",
1209
1209
  "declaration": {
1210
- "name": "*",
1211
- "package": "./when-else"
1210
+ "name": "getNumberFormatter",
1211
+ "module": "src/formatters/number.ts"
1212
1212
  }
1213
1213
  }
1214
1214
  ]
@@ -1339,7 +1339,7 @@
1339
1339
  },
1340
1340
  {
1341
1341
  "kind": "javascript-module",
1342
- "path": "src/promise/index.ts",
1342
+ "path": "src/observer/index.ts",
1343
1343
  "declarations": [],
1344
1344
  "exports": [
1345
1345
  {
@@ -1347,55 +1347,71 @@
1347
1347
  "name": "*",
1348
1348
  "declaration": {
1349
1349
  "name": "*",
1350
- "package": "./resolveAfter"
1350
+ "package": "./observer"
1351
1351
  }
1352
1352
  }
1353
1353
  ]
1354
1354
  },
1355
1355
  {
1356
1356
  "kind": "javascript-module",
1357
- "path": "src/promise/resolveAfter.ts",
1357
+ "path": "src/observer/observer.ts",
1358
1358
  "declarations": [
1359
1359
  {
1360
1360
  "kind": "function",
1361
- "name": "resolveAfter",
1361
+ "name": "createObserver",
1362
1362
  "return": {
1363
1363
  "type": {
1364
- "text": "Promise<T>"
1364
+ "text": "Observer<EventType>"
1365
1365
  }
1366
1366
  },
1367
+ "description": "Creates a new event observer instance.",
1368
+ "privacy": "public"
1369
+ },
1370
+ {
1371
+ "kind": "function",
1372
+ "name": "respondToVisibility",
1367
1373
  "parameters": [
1368
1374
  {
1369
- "name": "ms",
1375
+ "name": "element",
1370
1376
  "type": {
1371
- "text": "number"
1372
- }
1377
+ "text": "HTMLElement"
1378
+ },
1379
+ "description": "HTMLElement to observe"
1373
1380
  },
1374
1381
  {
1375
- "name": "valueCreator",
1382
+ "name": "callback",
1376
1383
  "type": {
1377
- "text": "() => T"
1378
- }
1384
+ "text": "(arg0: boolean) => any"
1385
+ },
1386
+ "description": "any function called when the visibility changes"
1379
1387
  }
1380
1388
  ],
1381
- "description": "Resolve a promise after a timeout.",
1389
+ "description": "Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen",
1382
1390
  "privacy": "public"
1383
1391
  }
1384
1392
  ],
1385
1393
  "exports": [
1386
1394
  {
1387
1395
  "kind": "js",
1388
- "name": "resolveAfter",
1396
+ "name": "createObserver",
1389
1397
  "declaration": {
1390
- "name": "resolveAfter",
1391
- "module": "src/promise/resolveAfter.ts"
1398
+ "name": "createObserver",
1399
+ "module": "src/observer/observer.ts"
1400
+ }
1401
+ },
1402
+ {
1403
+ "kind": "js",
1404
+ "name": "respondToVisibility",
1405
+ "declaration": {
1406
+ "name": "respondToVisibility",
1407
+ "module": "src/observer/observer.ts"
1392
1408
  }
1393
1409
  }
1394
1410
  ]
1395
1411
  },
1396
1412
  {
1397
1413
  "kind": "javascript-module",
1398
- "path": "src/observer/index.ts",
1414
+ "path": "src/promise/index.ts",
1399
1415
  "declarations": [],
1400
1416
  "exports": [
1401
1417
  {
@@ -1403,64 +1419,48 @@
1403
1419
  "name": "*",
1404
1420
  "declaration": {
1405
1421
  "name": "*",
1406
- "package": "./observer"
1422
+ "package": "./resolveAfter"
1407
1423
  }
1408
1424
  }
1409
1425
  ]
1410
1426
  },
1411
1427
  {
1412
1428
  "kind": "javascript-module",
1413
- "path": "src/observer/observer.ts",
1429
+ "path": "src/promise/resolveAfter.ts",
1414
1430
  "declarations": [
1415
1431
  {
1416
1432
  "kind": "function",
1417
- "name": "createObserver",
1433
+ "name": "resolveAfter",
1418
1434
  "return": {
1419
1435
  "type": {
1420
- "text": "Observer<EventType>"
1436
+ "text": "Promise<T>"
1421
1437
  }
1422
1438
  },
1423
- "description": "Creates a new event observer instance.",
1424
- "privacy": "public"
1425
- },
1426
- {
1427
- "kind": "function",
1428
- "name": "respondToVisibility",
1429
1439
  "parameters": [
1430
1440
  {
1431
- "name": "element",
1441
+ "name": "ms",
1432
1442
  "type": {
1433
- "text": "HTMLElement"
1434
- },
1435
- "description": "HTMLElement to observe"
1443
+ "text": "number"
1444
+ }
1436
1445
  },
1437
1446
  {
1438
- "name": "callback",
1447
+ "name": "valueCreator",
1439
1448
  "type": {
1440
- "text": "(arg0: boolean) => any"
1441
- },
1442
- "description": "any function called when the visibility changes"
1449
+ "text": "() => T"
1450
+ }
1443
1451
  }
1444
1452
  ],
1445
- "description": "Setup an `IntersectionObserver` which will activate a callback function when an element becomes visible on screen",
1453
+ "description": "Resolve a promise after a timeout.",
1446
1454
  "privacy": "public"
1447
1455
  }
1448
1456
  ],
1449
1457
  "exports": [
1450
1458
  {
1451
1459
  "kind": "js",
1452
- "name": "createObserver",
1453
- "declaration": {
1454
- "name": "createObserver",
1455
- "module": "src/observer/observer.ts"
1456
- }
1457
- },
1458
- {
1459
- "kind": "js",
1460
- "name": "respondToVisibility",
1460
+ "name": "resolveAfter",
1461
1461
  "declaration": {
1462
- "name": "respondToVisibility",
1463
- "module": "src/observer/observer.ts"
1462
+ "name": "resolveAfter",
1463
+ "module": "src/promise/resolveAfter.ts"
1464
1464
  }
1465
1465
  }
1466
1466
  ]