@genesislcap/foundation-utils 14.167.3-alpha-b40d1e5.0 → 14.167.3-alpha-69ba23f.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.
@@ -101,14 +101,6 @@
101
101
  "package": "./observer"
102
102
  }
103
103
  },
104
- {
105
- "kind": "js",
106
- "name": "*",
107
- "declaration": {
108
- "name": "*",
109
- "package": "./promise"
110
- }
111
- },
112
104
  {
113
105
  "kind": "js",
114
106
  "name": "*",
@@ -159,6 +151,257 @@
159
151
  }
160
152
  ]
161
153
  },
154
+ {
155
+ "kind": "javascript-module",
156
+ "path": "src/data/inMemoryDatabase.ts",
157
+ "declarations": [
158
+ {
159
+ "kind": "class",
160
+ "description": "An in memory database of specific DatabaseRecord types.",
161
+ "name": "InMemoryDatabase",
162
+ "members": [
163
+ {
164
+ "kind": "field",
165
+ "name": "isWorking",
166
+ "type": {
167
+ "text": "boolean"
168
+ },
169
+ "privacy": "public",
170
+ "default": "false"
171
+ },
172
+ {
173
+ "kind": "field",
174
+ "name": "records",
175
+ "type": {
176
+ "text": "Record<string, T>"
177
+ },
178
+ "privacy": "private",
179
+ "default": "{}"
180
+ },
181
+ {
182
+ "kind": "field",
183
+ "name": "beforeUpdateListeners",
184
+ "privacy": "private"
185
+ },
186
+ {
187
+ "kind": "field",
188
+ "name": "afterUpdateListeners",
189
+ "privacy": "private"
190
+ },
191
+ {
192
+ "kind": "method",
193
+ "name": "create",
194
+ "privacy": "public",
195
+ "return": {
196
+ "type": {
197
+ "text": "Promise<DatabaseAccessResult.Create<T>>"
198
+ }
199
+ },
200
+ "parameters": [
201
+ {
202
+ "name": "newValue",
203
+ "type": {
204
+ "text": "Omit<T, 'id'>"
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "kind": "method",
211
+ "name": "read",
212
+ "privacy": "public",
213
+ "return": {
214
+ "type": {
215
+ "text": "Promise<DatabaseAccessResult.Read<T>>"
216
+ }
217
+ },
218
+ "parameters": [
219
+ {
220
+ "name": "id",
221
+ "type": {
222
+ "text": "string"
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "kind": "method",
229
+ "name": "update",
230
+ "privacy": "public",
231
+ "return": {
232
+ "type": {
233
+ "text": "Promise<DatabaseAccessResult.Update<T>>"
234
+ }
235
+ },
236
+ "parameters": [
237
+ {
238
+ "name": "id",
239
+ "type": {
240
+ "text": "string"
241
+ }
242
+ },
243
+ {
244
+ "name": "newValue",
245
+ "type": {
246
+ "text": "Omit<Partial<T>, 'id'>"
247
+ }
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "kind": "method",
253
+ "name": "delete",
254
+ "privacy": "public",
255
+ "return": {
256
+ "type": {
257
+ "text": "Promise<DatabaseAccessResult.Delete>"
258
+ }
259
+ },
260
+ "parameters": [
261
+ {
262
+ "name": "id",
263
+ "type": {
264
+ "text": "string"
265
+ }
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "kind": "method",
271
+ "name": "visit",
272
+ "privacy": "public",
273
+ "return": {
274
+ "type": {
275
+ "text": "Promise<void>"
276
+ }
277
+ },
278
+ "parameters": [
279
+ {
280
+ "name": "visitor",
281
+ "type": {
282
+ "text": "(record: T) => void"
283
+ }
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ "kind": "method",
289
+ "name": "onBeforeUpdate",
290
+ "privacy": "public",
291
+ "return": {
292
+ "type": {
293
+ "text": "() => void"
294
+ }
295
+ },
296
+ "parameters": [
297
+ {
298
+ "name": "listener",
299
+ "type": {
300
+ "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
301
+ }
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "kind": "method",
307
+ "name": "onAfterUpdate",
308
+ "privacy": "public",
309
+ "return": {
310
+ "type": {
311
+ "text": "() => void"
312
+ }
313
+ },
314
+ "parameters": [
315
+ {
316
+ "name": "listener",
317
+ "type": {
318
+ "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
319
+ }
320
+ }
321
+ ]
322
+ }
323
+ ]
324
+ }
325
+ ],
326
+ "exports": [
327
+ {
328
+ "kind": "js",
329
+ "name": "InMemoryDatabase",
330
+ "declaration": {
331
+ "name": "InMemoryDatabase",
332
+ "module": "src/data/inMemoryDatabase.ts"
333
+ }
334
+ }
335
+ ]
336
+ },
337
+ {
338
+ "kind": "javascript-module",
339
+ "path": "src/data/index.ts",
340
+ "declarations": [],
341
+ "exports": [
342
+ {
343
+ "kind": "js",
344
+ "name": "*",
345
+ "declaration": {
346
+ "name": "*",
347
+ "package": "./inMemoryDatabase"
348
+ }
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "kind": "javascript-module",
354
+ "path": "src/decorators/index.ts",
355
+ "declarations": [],
356
+ "exports": [
357
+ {
358
+ "kind": "js",
359
+ "name": "*",
360
+ "declaration": {
361
+ "name": "*",
362
+ "package": "./renderOnChange"
363
+ }
364
+ }
365
+ ]
366
+ },
367
+ {
368
+ "kind": "javascript-module",
369
+ "path": "src/decorators/renderOnChange.ts",
370
+ "declarations": [
371
+ {
372
+ "kind": "function",
373
+ "name": "renderOnChange",
374
+ "parameters": [
375
+ {
376
+ "name": "target",
377
+ "type": {
378
+ "text": "FASTElement & { render(): void }"
379
+ },
380
+ "description": "The target to define the property change handler on."
381
+ },
382
+ {
383
+ "name": "name",
384
+ "type": {
385
+ "text": "string"
386
+ },
387
+ "description": "The property name."
388
+ }
389
+ ],
390
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
391
+ "privacy": "public"
392
+ }
393
+ ],
394
+ "exports": [
395
+ {
396
+ "kind": "js",
397
+ "name": "renderOnChange",
398
+ "declaration": {
399
+ "name": "renderOnChange",
400
+ "module": "src/decorators/renderOnChange.ts"
401
+ }
402
+ }
403
+ ]
404
+ },
162
405
  {
163
406
  "kind": "javascript-module",
164
407
  "path": "src/directives/index.ts",
@@ -177,7 +420,57 @@
177
420
  "name": "*",
178
421
  "declaration": {
179
422
  "name": "*",
180
- "package": "./when-else"
423
+ "package": "./when-else"
424
+ }
425
+ }
426
+ ]
427
+ },
428
+ {
429
+ "kind": "javascript-module",
430
+ "path": "src/design-system/design-system.ts",
431
+ "declarations": [
432
+ {
433
+ "kind": "function",
434
+ "name": "assureDesignSystem",
435
+ "return": {
436
+ "type": {
437
+ "text": "DesignSystemModule"
438
+ }
439
+ },
440
+ "parameters": [
441
+ {
442
+ "name": "module",
443
+ "type": {
444
+ "text": "DesignSystemModule"
445
+ }
446
+ }
447
+ ],
448
+ "description": "assureDesignSystem.",
449
+ "privacy": "public"
450
+ }
451
+ ],
452
+ "exports": [
453
+ {
454
+ "kind": "js",
455
+ "name": "assureDesignSystem",
456
+ "declaration": {
457
+ "name": "assureDesignSystem",
458
+ "module": "src/design-system/design-system.ts"
459
+ }
460
+ }
461
+ ]
462
+ },
463
+ {
464
+ "kind": "javascript-module",
465
+ "path": "src/design-system/index.ts",
466
+ "declarations": [],
467
+ "exports": [
468
+ {
469
+ "kind": "js",
470
+ "name": "*",
471
+ "declaration": {
472
+ "name": "*",
473
+ "package": "./design-system"
181
474
  }
182
475
  }
183
476
  ]
@@ -425,474 +718,173 @@
425
718
  "name": "lastError",
426
719
  "type": {
427
720
  "text": "Error"
428
- },
429
- "description": "{@inheritDoc ErrorMap.lastError}"
430
- },
431
- {
432
- "kind": "method",
433
- "name": "set",
434
- "return": {
435
- "type": {
436
- "text": "void"
437
- }
438
- },
439
- "parameters": [
440
- {
441
- "name": "key",
442
- "type": {
443
- "text": "keyof TErrorDetailMap"
444
- }
445
- },
446
- {
447
- "name": "error",
448
- "type": {
449
- "text": "Error"
450
- }
451
- }
452
- ],
453
- "description": "{@inheritDoc ErrorMap.set}"
454
- },
455
- {
456
- "kind": "method",
457
- "name": "get",
458
- "return": {
459
- "type": {
460
- "text": ""
461
- }
462
- },
463
- "parameters": [
464
- {
465
- "name": "key",
466
- "type": {
467
- "text": "keyof TErrorDetailMap"
468
- },
469
- "description": "The key."
470
- }
471
- ],
472
- "description": "Get an error by key.",
473
- "privacy": "public"
474
- },
475
- {
476
- "kind": "method",
477
- "name": "has",
478
- "return": {
479
- "type": {
480
- "text": ""
481
- }
482
- },
483
- "parameters": [
484
- {
485
- "name": "key",
486
- "type": {
487
- "text": "keyof TErrorDetailMap"
488
- },
489
- "description": "The key."
490
- }
491
- ],
492
- "description": "Has an error for key.",
493
- "privacy": "public"
494
- },
495
- {
496
- "kind": "method",
497
- "name": "delete",
498
- "return": {
499
- "type": {
500
- "text": ""
501
- }
502
- },
503
- "parameters": [
504
- {
505
- "name": "key",
506
- "type": {
507
- "text": "keyof TErrorDetailMap"
508
- },
509
- "description": "The key."
510
- }
511
- ],
512
- "description": "Delete an error.",
513
- "privacy": "public"
514
- },
515
- {
516
- "kind": "method",
517
- "name": "clear",
518
- "description": "Clear errors.",
519
- "privacy": "public"
520
- },
521
- {
522
- "kind": "field",
523
- "name": "size",
524
- "type": {
525
- "text": "number"
526
- },
527
- "description": "The size of the error map.",
528
- "return": {
529
- "type": {
530
- "text": ""
531
- }
532
- },
533
- "privacy": "public",
534
- "readonly": true
535
- },
536
- {
537
- "kind": "method",
538
- "name": "values",
539
- "privacy": "public"
540
- },
541
- {
542
- "kind": "field",
543
- "name": "messages",
544
- "type": {
545
- "text": "string"
546
- },
547
- "description": "{@inheritDoc ErrorMap.messages}",
548
- "readonly": true
549
- }
550
- ]
551
- },
552
- {
553
- "kind": "function",
554
- "name": "createErrorMap",
555
- "return": {
556
- "type": {
557
- "text": ""
558
- }
559
- },
560
- "parameters": [
561
- {
562
- "name": "logger",
563
- "type": {
564
- "text": "ErrorMapLogger"
565
- },
566
- "description": "A logger error method reference."
567
- }
568
- ],
569
- "description": "A factory to create the error map.",
570
- "privacy": "public"
571
- }
572
- ],
573
- "exports": [
574
- {
575
- "kind": "js",
576
- "name": "DefaultErrorMap",
577
- "declaration": {
578
- "name": "DefaultErrorMap",
579
- "module": "src/error/errorMap.ts"
580
- }
581
- },
582
- {
583
- "kind": "js",
584
- "name": "createErrorMap",
585
- "declaration": {
586
- "name": "createErrorMap",
587
- "module": "src/error/errorMap.ts"
588
- }
589
- }
590
- ]
591
- },
592
- {
593
- "kind": "javascript-module",
594
- "path": "src/error/index.ts",
595
- "declarations": [],
596
- "exports": [
597
- {
598
- "kind": "js",
599
- "name": "*",
600
- "declaration": {
601
- "name": "*",
602
- "package": "./errorMap"
603
- }
604
- }
605
- ]
606
- },
607
- {
608
- "kind": "javascript-module",
609
- "path": "src/data/inMemoryDatabase.ts",
610
- "declarations": [
611
- {
612
- "kind": "class",
613
- "description": "An in memory database of specific DatabaseRecord types.",
614
- "name": "InMemoryDatabase",
615
- "members": [
616
- {
617
- "kind": "field",
618
- "name": "isWorking",
619
- "type": {
620
- "text": "boolean"
621
- },
622
- "privacy": "public",
623
- "default": "false"
624
- },
625
- {
626
- "kind": "field",
627
- "name": "records",
628
- "type": {
629
- "text": "Record<string, T>"
630
- },
631
- "privacy": "private",
632
- "default": "{}"
633
- },
634
- {
635
- "kind": "field",
636
- "name": "beforeUpdateListeners",
637
- "privacy": "private"
638
- },
639
- {
640
- "kind": "field",
641
- "name": "afterUpdateListeners",
642
- "privacy": "private"
643
- },
644
- {
645
- "kind": "method",
646
- "name": "create",
647
- "privacy": "public",
648
- "return": {
649
- "type": {
650
- "text": "Promise<DatabaseAccessResult.Create<T>>"
651
- }
652
- },
653
- "parameters": [
654
- {
655
- "name": "newValue",
656
- "type": {
657
- "text": "Omit<T, 'id'>"
658
- }
659
- }
660
- ]
661
- },
662
- {
663
- "kind": "method",
664
- "name": "read",
665
- "privacy": "public",
666
- "return": {
667
- "type": {
668
- "text": "Promise<DatabaseAccessResult.Read<T>>"
669
- }
670
- },
671
- "parameters": [
672
- {
673
- "name": "id",
674
- "type": {
675
- "text": "string"
676
- }
677
- }
678
- ]
721
+ },
722
+ "description": "{@inheritDoc ErrorMap.lastError}"
679
723
  },
680
724
  {
681
725
  "kind": "method",
682
- "name": "update",
683
- "privacy": "public",
726
+ "name": "set",
684
727
  "return": {
685
728
  "type": {
686
- "text": "Promise<DatabaseAccessResult.Update<T>>"
729
+ "text": "void"
687
730
  }
688
731
  },
689
732
  "parameters": [
690
733
  {
691
- "name": "id",
734
+ "name": "key",
692
735
  "type": {
693
- "text": "string"
736
+ "text": "keyof TErrorDetailMap"
694
737
  }
695
738
  },
696
739
  {
697
- "name": "newValue",
740
+ "name": "error",
698
741
  "type": {
699
- "text": "Omit<Partial<T>, 'id'>"
742
+ "text": "Error"
700
743
  }
701
744
  }
702
- ]
745
+ ],
746
+ "description": "{@inheritDoc ErrorMap.set}"
703
747
  },
704
748
  {
705
749
  "kind": "method",
706
- "name": "delete",
707
- "privacy": "public",
750
+ "name": "get",
708
751
  "return": {
709
752
  "type": {
710
- "text": "Promise<DatabaseAccessResult.Delete>"
753
+ "text": ""
711
754
  }
712
755
  },
713
756
  "parameters": [
714
757
  {
715
- "name": "id",
758
+ "name": "key",
716
759
  "type": {
717
- "text": "string"
718
- }
760
+ "text": "keyof TErrorDetailMap"
761
+ },
762
+ "description": "The key."
719
763
  }
720
- ]
764
+ ],
765
+ "description": "Get an error by key.",
766
+ "privacy": "public"
721
767
  },
722
768
  {
723
769
  "kind": "method",
724
- "name": "visit",
725
- "privacy": "public",
770
+ "name": "has",
726
771
  "return": {
727
772
  "type": {
728
- "text": "Promise<void>"
773
+ "text": ""
729
774
  }
730
775
  },
731
776
  "parameters": [
732
777
  {
733
- "name": "visitor",
778
+ "name": "key",
734
779
  "type": {
735
- "text": "(record: T) => void"
736
- }
780
+ "text": "keyof TErrorDetailMap"
781
+ },
782
+ "description": "The key."
737
783
  }
738
- ]
784
+ ],
785
+ "description": "Has an error for key.",
786
+ "privacy": "public"
739
787
  },
740
788
  {
741
789
  "kind": "method",
742
- "name": "onBeforeUpdate",
743
- "privacy": "public",
790
+ "name": "delete",
744
791
  "return": {
745
792
  "type": {
746
- "text": "() => void"
793
+ "text": ""
747
794
  }
748
795
  },
749
796
  "parameters": [
750
797
  {
751
- "name": "listener",
798
+ "name": "key",
752
799
  "type": {
753
- "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
754
- }
800
+ "text": "keyof TErrorDetailMap"
801
+ },
802
+ "description": "The key."
755
803
  }
756
- ]
804
+ ],
805
+ "description": "Delete an error.",
806
+ "privacy": "public"
757
807
  },
758
808
  {
759
809
  "kind": "method",
760
- "name": "onAfterUpdate",
761
- "privacy": "public",
810
+ "name": "clear",
811
+ "description": "Clear errors.",
812
+ "privacy": "public"
813
+ },
814
+ {
815
+ "kind": "field",
816
+ "name": "size",
817
+ "type": {
818
+ "text": "number"
819
+ },
820
+ "description": "The size of the error map.",
762
821
  "return": {
763
822
  "type": {
764
- "text": "() => void"
823
+ "text": ""
765
824
  }
766
825
  },
767
- "parameters": [
768
- {
769
- "name": "listener",
770
- "type": {
771
- "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
772
- }
773
- }
774
- ]
775
- }
776
- ]
777
- }
778
- ],
779
- "exports": [
780
- {
781
- "kind": "js",
782
- "name": "InMemoryDatabase",
783
- "declaration": {
784
- "name": "InMemoryDatabase",
785
- "module": "src/data/inMemoryDatabase.ts"
786
- }
787
- }
788
- ]
789
- },
790
- {
791
- "kind": "javascript-module",
792
- "path": "src/data/index.ts",
793
- "declarations": [],
794
- "exports": [
795
- {
796
- "kind": "js",
797
- "name": "*",
798
- "declaration": {
799
- "name": "*",
800
- "package": "./inMemoryDatabase"
801
- }
802
- }
803
- ]
804
- },
805
- {
806
- "kind": "javascript-module",
807
- "path": "src/decorators/index.ts",
808
- "declarations": [],
809
- "exports": [
810
- {
811
- "kind": "js",
812
- "name": "*",
813
- "declaration": {
814
- "name": "*",
815
- "package": "./renderOnChange"
816
- }
817
- }
818
- ]
819
- },
820
- {
821
- "kind": "javascript-module",
822
- "path": "src/decorators/renderOnChange.ts",
823
- "declarations": [
824
- {
825
- "kind": "function",
826
- "name": "renderOnChange",
827
- "parameters": [
826
+ "privacy": "public",
827
+ "readonly": true
828
+ },
828
829
  {
829
- "name": "target",
830
- "type": {
831
- "text": "FASTElement & { render(): void }"
832
- },
833
- "description": "The target to define the property change handler on."
830
+ "kind": "method",
831
+ "name": "values",
832
+ "privacy": "public"
834
833
  },
835
834
  {
836
- "name": "name",
835
+ "kind": "field",
836
+ "name": "messages",
837
837
  "type": {
838
838
  "text": "string"
839
839
  },
840
- "description": "The property name."
840
+ "description": "{@inheritDoc ErrorMap.messages}",
841
+ "readonly": true
841
842
  }
842
- ],
843
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
844
- "privacy": "public"
845
- }
846
- ],
847
- "exports": [
848
- {
849
- "kind": "js",
850
- "name": "renderOnChange",
851
- "declaration": {
852
- "name": "renderOnChange",
853
- "module": "src/decorators/renderOnChange.ts"
854
- }
855
- }
856
- ]
857
- },
858
- {
859
- "kind": "javascript-module",
860
- "path": "src/design-system/design-system.ts",
861
- "declarations": [
843
+ ]
844
+ },
862
845
  {
863
846
  "kind": "function",
864
- "name": "assureDesignSystem",
847
+ "name": "createErrorMap",
865
848
  "return": {
866
849
  "type": {
867
- "text": "DesignSystemModule"
850
+ "text": ""
868
851
  }
869
852
  },
870
853
  "parameters": [
871
854
  {
872
- "name": "module",
855
+ "name": "logger",
873
856
  "type": {
874
- "text": "DesignSystemModule"
875
- }
857
+ "text": "ErrorMapLogger"
858
+ },
859
+ "description": "A logger error method reference."
876
860
  }
877
861
  ],
878
- "description": "assureDesignSystem.",
862
+ "description": "A factory to create the error map.",
879
863
  "privacy": "public"
880
864
  }
881
865
  ],
882
866
  "exports": [
883
867
  {
884
868
  "kind": "js",
885
- "name": "assureDesignSystem",
869
+ "name": "DefaultErrorMap",
886
870
  "declaration": {
887
- "name": "assureDesignSystem",
888
- "module": "src/design-system/design-system.ts"
871
+ "name": "DefaultErrorMap",
872
+ "module": "src/error/errorMap.ts"
873
+ }
874
+ },
875
+ {
876
+ "kind": "js",
877
+ "name": "createErrorMap",
878
+ "declaration": {
879
+ "name": "createErrorMap",
880
+ "module": "src/error/errorMap.ts"
889
881
  }
890
882
  }
891
883
  ]
892
884
  },
893
885
  {
894
886
  "kind": "javascript-module",
895
- "path": "src/design-system/index.ts",
887
+ "path": "src/error/index.ts",
896
888
  "declarations": [],
897
889
  "exports": [
898
890
  {
@@ -900,7 +892,7 @@
900
892
  "name": "*",
901
893
  "declaration": {
902
894
  "name": "*",
903
- "package": "./design-system"
895
+ "package": "./errorMap"
904
896
  }
905
897
  }
906
898
  ]
@@ -1313,62 +1305,6 @@
1313
1305
  }
1314
1306
  ]
1315
1307
  },
1316
- {
1317
- "kind": "javascript-module",
1318
- "path": "src/promise/index.ts",
1319
- "declarations": [],
1320
- "exports": [
1321
- {
1322
- "kind": "js",
1323
- "name": "*",
1324
- "declaration": {
1325
- "name": "*",
1326
- "package": "./resolveAfter"
1327
- }
1328
- }
1329
- ]
1330
- },
1331
- {
1332
- "kind": "javascript-module",
1333
- "path": "src/promise/resolveAfter.ts",
1334
- "declarations": [
1335
- {
1336
- "kind": "function",
1337
- "name": "resolveAfter",
1338
- "return": {
1339
- "type": {
1340
- "text": "Promise<T>"
1341
- }
1342
- },
1343
- "parameters": [
1344
- {
1345
- "name": "ms",
1346
- "type": {
1347
- "text": "number"
1348
- }
1349
- },
1350
- {
1351
- "name": "valueCreator",
1352
- "type": {
1353
- "text": "() => T"
1354
- }
1355
- }
1356
- ],
1357
- "description": "Resolve a promise after a timeout.",
1358
- "privacy": "public"
1359
- }
1360
- ],
1361
- "exports": [
1362
- {
1363
- "kind": "js",
1364
- "name": "resolveAfter",
1365
- "declaration": {
1366
- "name": "resolveAfter",
1367
- "module": "src/promise/resolveAfter.ts"
1368
- }
1369
- }
1370
- ]
1371
- },
1372
1308
  {
1373
1309
  "kind": "javascript-module",
1374
1310
  "path": "src/resource/index.ts",
@@ -9,7 +9,6 @@ export * from './logger';
9
9
  export * from './mappers';
10
10
  export * from './mixins';
11
11
  export * from './observer';
12
- export * from './promise';
13
12
  export * from './resource';
14
13
  export * from './serializers';
15
14
  export * from './state';
@@ -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,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,QAAQ,CAAC;AACvB,cAAc,UAAU,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,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC"}
package/dist/esm/index.js CHANGED
@@ -9,7 +9,6 @@ export * from './logger';
9
9
  export * from './mappers';
10
10
  export * from './mixins';
11
11
  export * from './observer';
12
- export * from './promise';
13
12
  export * from './resource';
14
13
  export * from './serializers';
15
14
  export * from './state';
@@ -11811,38 +11811,6 @@
11811
11811
  ],
11812
11812
  "name": "renderOnChange"
11813
11813
  },
11814
- {
11815
- "kind": "Variable",
11816
- "canonicalReference": "@genesislcap/foundation-utils!resolveAfter:var",
11817
- "docComment": "/**\n * Resolve a promise after a timeout.\n *\n * @example\n * ```ts\n * const result = await Promise.race([\n * resourceChecks(sourceRef, resource),\n * resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({\n * isConnected: false,\n * lastUpdated: Date.now(),\n * })),\n * ]);\n * ```\n *\n * @public\n */\n",
11818
- "excerptTokens": [
11819
- {
11820
- "kind": "Content",
11821
- "text": "resolveAfter: "
11822
- },
11823
- {
11824
- "kind": "Content",
11825
- "text": "<T = any>(ms: number, valueCreator: () => T) => "
11826
- },
11827
- {
11828
- "kind": "Reference",
11829
- "text": "Promise",
11830
- "canonicalReference": "!Promise:interface"
11831
- },
11832
- {
11833
- "kind": "Content",
11834
- "text": "<T>"
11835
- }
11836
- ],
11837
- "fileUrlPath": "src/promise/resolveAfter.ts",
11838
- "isReadonly": true,
11839
- "releaseTag": "Public",
11840
- "name": "resolveAfter",
11841
- "variableTypeTokenRange": {
11842
- "startIndex": 1,
11843
- "endIndex": 4
11844
- }
11845
- },
11846
11814
  {
11847
11815
  "kind": "TypeAlias",
11848
11816
  "canonicalReference": "@genesislcap/foundation-utils!ResourceType:type",
@@ -1616,24 +1616,6 @@ export declare function renderOnChange(target: FASTElement & {
1616
1616
  render(): void;
1617
1617
  }, name: string): void;
1618
1618
 
1619
- /**
1620
- * Resolve a promise after a timeout.
1621
- *
1622
- * @example
1623
- * ```ts
1624
- * const result = await Promise.race([
1625
- * resourceChecks(sourceRef, resource),
1626
- * resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({
1627
- * isConnected: false,
1628
- * lastUpdated: Date.now(),
1629
- * })),
1630
- * ]);
1631
- * ```
1632
- *
1633
- * @public
1634
- */
1635
- export declare const resolveAfter: <T = any>(ms: number, valueCreator: () => T) => Promise<T>;
1636
-
1637
1619
  /**
1638
1620
  * An object that defines two resource types: "local" and "remote".
1639
1621
  * @public
@@ -97,7 +97,6 @@
97
97
  | [PendingState](./foundation-utils.pendingstate.md) | The <code>PendingState</code> mixin. |
98
98
  | [POPUP\_DEFAULT\_HEIGHT](./foundation-utils.popup_default_height.md) | The default height (in pixels) for pop-up windows. |
99
99
  | [POPUP\_DEFAULT\_WIDTH](./foundation-utils.popup_default_width.md) | The default width (in pixels) for pop-up windows. |
100
- | [resolveAfter](./foundation-utils.resolveafter.md) | Resolve a promise after a timeout. |
101
100
  | [ResourceType](./foundation-utils.resourcetype.md) | An object that defines two resource types: "local" and "remote". |
102
101
  | [respondToVisibility](./foundation-utils.respondtovisibility.md) | Setup an <code>IntersectionObserver</code> which will activate a callback function when an element becomes visible on screen |
103
102
  | [ServerRowDTOMapper](./foundation-utils.serverrowdtomapper.md) | A DI token used to obtain a <code>ServerRowDTOMapper</code> instance. |
@@ -1078,9 +1078,6 @@ export function renderOnChange(target: FASTElement & {
1078
1078
  render(): void;
1079
1079
  }, name: string): void;
1080
1080
 
1081
- // @public
1082
- export const resolveAfter: <T = any>(ms: number, valueCreator: () => T) => Promise<T>;
1083
-
1084
1081
  // @public
1085
1082
  export const ResourceType: {
1086
1083
  readonly local: "local";
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.167.3-alpha-b40d1e5.0",
4
+ "version": "14.167.3-alpha-69ba23f.0",
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.167.3-alpha-b40d1e5.0",
23
- "@genesislcap/genx": "14.167.3-alpha-b40d1e5.0",
24
- "@genesislcap/rollup-builder": "14.167.3-alpha-b40d1e5.0",
25
- "@genesislcap/ts-builder": "14.167.3-alpha-b40d1e5.0",
26
- "@genesislcap/uvu-playwright-builder": "14.167.3-alpha-b40d1e5.0",
27
- "@genesislcap/vite-builder": "14.167.3-alpha-b40d1e5.0",
28
- "@genesislcap/webpack-builder": "14.167.3-alpha-b40d1e5.0",
22
+ "@genesislcap/foundation-testing": "14.167.3-alpha-69ba23f.0",
23
+ "@genesislcap/genx": "14.167.3-alpha-69ba23f.0",
24
+ "@genesislcap/rollup-builder": "14.167.3-alpha-69ba23f.0",
25
+ "@genesislcap/ts-builder": "14.167.3-alpha-69ba23f.0",
26
+ "@genesislcap/uvu-playwright-builder": "14.167.3-alpha-69ba23f.0",
27
+ "@genesislcap/vite-builder": "14.167.3-alpha-69ba23f.0",
28
+ "@genesislcap/webpack-builder": "14.167.3-alpha-69ba23f.0",
29
29
  "rimraf": "^3.0.2"
30
30
  },
31
31
  "dependencies": {
32
- "@genesislcap/foundation-logger": "14.167.3-alpha-b40d1e5.0",
32
+ "@genesislcap/foundation-logger": "14.167.3-alpha-69ba23f.0",
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": "806560f0199c3a212a734ecf090d18484b7627bf"
50
+ "gitHead": "181f6eb8a074dea1a432c628141688c39163fbfd"
51
51
  }
@@ -1,2 +0,0 @@
1
- export * from './resolveAfter';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/promise/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Resolve a promise after a timeout.
3
- *
4
- * @example
5
- * ```ts
6
- * const result = await Promise.race([
7
- * resourceChecks(sourceRef, resource),
8
- * resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({
9
- * isConnected: false,
10
- * lastUpdated: Date.now(),
11
- * })),
12
- * ]);
13
- * ```
14
- *
15
- * @public
16
- */
17
- export declare const resolveAfter: <T = any>(ms: number, valueCreator: () => T) => Promise<T>;
18
- //# sourceMappingURL=resolveAfter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolveAfter.d.ts","sourceRoot":"","sources":["../../../src/promise/resolveAfter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,gBAAiB,MAAM,sCAM/C,CAAC"}
@@ -1 +0,0 @@
1
- export * from './resolveAfter';
@@ -1,23 +0,0 @@
1
- /**
2
- * Resolve a promise after a timeout.
3
- *
4
- * @example
5
- * ```ts
6
- * const result = await Promise.race([
7
- * resourceChecks(sourceRef, resource),
8
- * resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({
9
- * isConnected: false,
10
- * lastUpdated: Date.now(),
11
- * })),
12
- * ]);
13
- * ```
14
- *
15
- * @public
16
- */
17
- export const resolveAfter = (ms, valueCreator) => {
18
- return new Promise((resolve) => {
19
- setTimeout(() => {
20
- resolve(valueCreator());
21
- }, ms);
22
- });
23
- };
@@ -1,27 +0,0 @@
1
- <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
-
3
- [Home](./index.md) &gt; [@genesislcap/foundation-utils](./foundation-utils.md) &gt; [resolveAfter](./foundation-utils.resolveafter.md)
4
-
5
- ## resolveAfter variable
6
-
7
- Resolve a promise after a timeout.
8
-
9
- **Signature:**
10
-
11
- ```typescript
12
- resolveAfter: <T = any>(ms: number, valueCreator: () => T) => Promise<T>
13
- ```
14
-
15
- ## Example
16
-
17
-
18
- ```ts
19
- const result = await Promise.race([
20
- resourceChecks(sourceRef, resource),
21
- resolveAfter<MonitoredResourceChecksResult>(this.config.checkTimeout, () => ({
22
- isConnected: false,
23
- lastUpdated: Date.now(),
24
- })),
25
- ]);
26
- ```
27
-