@genesislcap/foundation-utils 14.496.1-GENC-1461.5 → 14.496.2-alpha-438fb6e.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.
- package/dist/custom-elements.json +240 -240
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts +11 -0
- package/dist/dts/mixins/lifecycle/lifecycle.d.ts.map +1 -1
- package/dist/esm/mixins/lifecycle/lifecycle.js +22 -2
- package/dist/foundation-utils.api.json +1 -1
- package/dist/foundation-utils.d.ts +11 -0
- package/package.json +11 -11
|
@@ -252,7 +252,7 @@
|
|
|
252
252
|
},
|
|
253
253
|
{
|
|
254
254
|
"kind": "javascript-module",
|
|
255
|
-
"path": "src/
|
|
255
|
+
"path": "src/decorators/index.ts",
|
|
256
256
|
"declarations": [],
|
|
257
257
|
"exports": [
|
|
258
258
|
{
|
|
@@ -260,15 +260,243 @@
|
|
|
260
260
|
"name": "*",
|
|
261
261
|
"declaration": {
|
|
262
262
|
"name": "*",
|
|
263
|
-
"package": "./
|
|
263
|
+
"package": "./renderOnChange"
|
|
264
264
|
}
|
|
265
|
-
}
|
|
265
|
+
}
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"kind": "javascript-module",
|
|
270
|
+
"path": "src/decorators/renderOnChange.ts",
|
|
271
|
+
"declarations": [
|
|
272
|
+
{
|
|
273
|
+
"kind": "function",
|
|
274
|
+
"name": "renderOnChange",
|
|
275
|
+
"parameters": [
|
|
276
|
+
{
|
|
277
|
+
"name": "target",
|
|
278
|
+
"type": {
|
|
279
|
+
"text": "FASTElement & { render(): void }"
|
|
280
|
+
},
|
|
281
|
+
"description": "The target to define the property change handler on."
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"name": "name",
|
|
285
|
+
"type": {
|
|
286
|
+
"text": "string"
|
|
287
|
+
},
|
|
288
|
+
"description": "The property name."
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
292
|
+
"privacy": "public"
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"exports": [
|
|
296
|
+
{
|
|
297
|
+
"kind": "js",
|
|
298
|
+
"name": "renderOnChange",
|
|
299
|
+
"declaration": {
|
|
300
|
+
"name": "renderOnChange",
|
|
301
|
+
"module": "src/decorators/renderOnChange.ts"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"kind": "javascript-module",
|
|
308
|
+
"path": "src/data/inMemoryDatabase.ts",
|
|
309
|
+
"declarations": [
|
|
310
|
+
{
|
|
311
|
+
"kind": "class",
|
|
312
|
+
"description": "An in memory database of specific DatabaseRecord types.",
|
|
313
|
+
"name": "InMemoryDatabase",
|
|
314
|
+
"members": [
|
|
315
|
+
{
|
|
316
|
+
"kind": "field",
|
|
317
|
+
"name": "isWorking",
|
|
318
|
+
"type": {
|
|
319
|
+
"text": "boolean"
|
|
320
|
+
},
|
|
321
|
+
"privacy": "public",
|
|
322
|
+
"default": "false"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"kind": "field",
|
|
326
|
+
"name": "records",
|
|
327
|
+
"type": {
|
|
328
|
+
"text": "Record<string, T>"
|
|
329
|
+
},
|
|
330
|
+
"privacy": "private",
|
|
331
|
+
"default": "{}"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"kind": "field",
|
|
335
|
+
"name": "beforeUpdateListeners",
|
|
336
|
+
"privacy": "private"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "field",
|
|
340
|
+
"name": "afterUpdateListeners",
|
|
341
|
+
"privacy": "private"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"kind": "method",
|
|
345
|
+
"name": "create",
|
|
346
|
+
"privacy": "public",
|
|
347
|
+
"return": {
|
|
348
|
+
"type": {
|
|
349
|
+
"text": "Promise<DatabaseAccessResult.Create<T>>"
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"parameters": [
|
|
353
|
+
{
|
|
354
|
+
"name": "newValue",
|
|
355
|
+
"type": {
|
|
356
|
+
"text": "Omit<T, 'id'>"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"kind": "method",
|
|
363
|
+
"name": "read",
|
|
364
|
+
"privacy": "public",
|
|
365
|
+
"return": {
|
|
366
|
+
"type": {
|
|
367
|
+
"text": "Promise<DatabaseAccessResult.Read<T>>"
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"parameters": [
|
|
371
|
+
{
|
|
372
|
+
"name": "id",
|
|
373
|
+
"type": {
|
|
374
|
+
"text": "string"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"kind": "method",
|
|
381
|
+
"name": "update",
|
|
382
|
+
"privacy": "public",
|
|
383
|
+
"return": {
|
|
384
|
+
"type": {
|
|
385
|
+
"text": "Promise<DatabaseAccessResult.Update<T>>"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"parameters": [
|
|
389
|
+
{
|
|
390
|
+
"name": "id",
|
|
391
|
+
"type": {
|
|
392
|
+
"text": "string"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"name": "newValue",
|
|
397
|
+
"type": {
|
|
398
|
+
"text": "Omit<Partial<T>, 'id'>"
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"kind": "method",
|
|
405
|
+
"name": "delete",
|
|
406
|
+
"privacy": "public",
|
|
407
|
+
"return": {
|
|
408
|
+
"type": {
|
|
409
|
+
"text": "Promise<DatabaseAccessResult.Delete>"
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
"parameters": [
|
|
413
|
+
{
|
|
414
|
+
"name": "id",
|
|
415
|
+
"type": {
|
|
416
|
+
"text": "string"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
]
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"kind": "method",
|
|
423
|
+
"name": "visit",
|
|
424
|
+
"privacy": "public",
|
|
425
|
+
"return": {
|
|
426
|
+
"type": {
|
|
427
|
+
"text": "Promise<void>"
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
"parameters": [
|
|
431
|
+
{
|
|
432
|
+
"name": "visitor",
|
|
433
|
+
"type": {
|
|
434
|
+
"text": "(record: T) => void"
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
]
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"kind": "method",
|
|
441
|
+
"name": "onBeforeUpdate",
|
|
442
|
+
"privacy": "public",
|
|
443
|
+
"return": {
|
|
444
|
+
"type": {
|
|
445
|
+
"text": "() => void"
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
"parameters": [
|
|
449
|
+
{
|
|
450
|
+
"name": "listener",
|
|
451
|
+
"type": {
|
|
452
|
+
"text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
]
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"kind": "method",
|
|
459
|
+
"name": "onAfterUpdate",
|
|
460
|
+
"privacy": "public",
|
|
461
|
+
"return": {
|
|
462
|
+
"type": {
|
|
463
|
+
"text": "() => void"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
"parameters": [
|
|
467
|
+
{
|
|
468
|
+
"name": "listener",
|
|
469
|
+
"type": {
|
|
470
|
+
"text": "Listener<DatabaseEvent.AfterUpdate<T>>"
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
],
|
|
478
|
+
"exports": [
|
|
479
|
+
{
|
|
480
|
+
"kind": "js",
|
|
481
|
+
"name": "InMemoryDatabase",
|
|
482
|
+
"declaration": {
|
|
483
|
+
"name": "InMemoryDatabase",
|
|
484
|
+
"module": "src/data/inMemoryDatabase.ts"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
]
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "javascript-module",
|
|
491
|
+
"path": "src/data/index.ts",
|
|
492
|
+
"declarations": [],
|
|
493
|
+
"exports": [
|
|
266
494
|
{
|
|
267
495
|
"kind": "js",
|
|
268
496
|
"name": "*",
|
|
269
497
|
"declaration": {
|
|
270
498
|
"name": "*",
|
|
271
|
-
"package": "./
|
|
499
|
+
"package": "./inMemoryDatabase"
|
|
272
500
|
}
|
|
273
501
|
}
|
|
274
502
|
]
|
|
@@ -477,7 +705,7 @@
|
|
|
477
705
|
},
|
|
478
706
|
{
|
|
479
707
|
"kind": "javascript-module",
|
|
480
|
-
"path": "src/
|
|
708
|
+
"path": "src/directives/index.ts",
|
|
481
709
|
"declarations": [],
|
|
482
710
|
"exports": [
|
|
483
711
|
{
|
|
@@ -485,197 +713,22 @@
|
|
|
485
713
|
"name": "*",
|
|
486
714
|
"declaration": {
|
|
487
715
|
"name": "*",
|
|
488
|
-
"package": "./
|
|
716
|
+
"package": "./sync"
|
|
489
717
|
}
|
|
490
|
-
}
|
|
491
|
-
]
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"kind": "javascript-module",
|
|
495
|
-
"path": "src/data/inMemoryDatabase.ts",
|
|
496
|
-
"declarations": [
|
|
497
|
-
{
|
|
498
|
-
"kind": "class",
|
|
499
|
-
"description": "An in memory database of specific DatabaseRecord types.",
|
|
500
|
-
"name": "InMemoryDatabase",
|
|
501
|
-
"members": [
|
|
502
|
-
{
|
|
503
|
-
"kind": "field",
|
|
504
|
-
"name": "isWorking",
|
|
505
|
-
"type": {
|
|
506
|
-
"text": "boolean"
|
|
507
|
-
},
|
|
508
|
-
"privacy": "public",
|
|
509
|
-
"default": "false"
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
"kind": "field",
|
|
513
|
-
"name": "records",
|
|
514
|
-
"type": {
|
|
515
|
-
"text": "Record<string, T>"
|
|
516
|
-
},
|
|
517
|
-
"privacy": "private",
|
|
518
|
-
"default": "{}"
|
|
519
|
-
},
|
|
520
|
-
{
|
|
521
|
-
"kind": "field",
|
|
522
|
-
"name": "beforeUpdateListeners",
|
|
523
|
-
"privacy": "private"
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
"kind": "field",
|
|
527
|
-
"name": "afterUpdateListeners",
|
|
528
|
-
"privacy": "private"
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
"kind": "method",
|
|
532
|
-
"name": "create",
|
|
533
|
-
"privacy": "public",
|
|
534
|
-
"return": {
|
|
535
|
-
"type": {
|
|
536
|
-
"text": "Promise<DatabaseAccessResult.Create<T>>"
|
|
537
|
-
}
|
|
538
|
-
},
|
|
539
|
-
"parameters": [
|
|
540
|
-
{
|
|
541
|
-
"name": "newValue",
|
|
542
|
-
"type": {
|
|
543
|
-
"text": "Omit<T, 'id'>"
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
]
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"kind": "method",
|
|
550
|
-
"name": "read",
|
|
551
|
-
"privacy": "public",
|
|
552
|
-
"return": {
|
|
553
|
-
"type": {
|
|
554
|
-
"text": "Promise<DatabaseAccessResult.Read<T>>"
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
"parameters": [
|
|
558
|
-
{
|
|
559
|
-
"name": "id",
|
|
560
|
-
"type": {
|
|
561
|
-
"text": "string"
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
]
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
"kind": "method",
|
|
568
|
-
"name": "update",
|
|
569
|
-
"privacy": "public",
|
|
570
|
-
"return": {
|
|
571
|
-
"type": {
|
|
572
|
-
"text": "Promise<DatabaseAccessResult.Update<T>>"
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
"parameters": [
|
|
576
|
-
{
|
|
577
|
-
"name": "id",
|
|
578
|
-
"type": {
|
|
579
|
-
"text": "string"
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
{
|
|
583
|
-
"name": "newValue",
|
|
584
|
-
"type": {
|
|
585
|
-
"text": "Omit<Partial<T>, 'id'>"
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
]
|
|
589
|
-
},
|
|
590
|
-
{
|
|
591
|
-
"kind": "method",
|
|
592
|
-
"name": "delete",
|
|
593
|
-
"privacy": "public",
|
|
594
|
-
"return": {
|
|
595
|
-
"type": {
|
|
596
|
-
"text": "Promise<DatabaseAccessResult.Delete>"
|
|
597
|
-
}
|
|
598
|
-
},
|
|
599
|
-
"parameters": [
|
|
600
|
-
{
|
|
601
|
-
"name": "id",
|
|
602
|
-
"type": {
|
|
603
|
-
"text": "string"
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
]
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
"kind": "method",
|
|
610
|
-
"name": "visit",
|
|
611
|
-
"privacy": "public",
|
|
612
|
-
"return": {
|
|
613
|
-
"type": {
|
|
614
|
-
"text": "Promise<void>"
|
|
615
|
-
}
|
|
616
|
-
},
|
|
617
|
-
"parameters": [
|
|
618
|
-
{
|
|
619
|
-
"name": "visitor",
|
|
620
|
-
"type": {
|
|
621
|
-
"text": "(record: T) => void"
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
]
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
"kind": "method",
|
|
628
|
-
"name": "onBeforeUpdate",
|
|
629
|
-
"privacy": "public",
|
|
630
|
-
"return": {
|
|
631
|
-
"type": {
|
|
632
|
-
"text": "() => void"
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
"parameters": [
|
|
636
|
-
{
|
|
637
|
-
"name": "listener",
|
|
638
|
-
"type": {
|
|
639
|
-
"text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
]
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
"kind": "method",
|
|
646
|
-
"name": "onAfterUpdate",
|
|
647
|
-
"privacy": "public",
|
|
648
|
-
"return": {
|
|
649
|
-
"type": {
|
|
650
|
-
"text": "() => void"
|
|
651
|
-
}
|
|
652
|
-
},
|
|
653
|
-
"parameters": [
|
|
654
|
-
{
|
|
655
|
-
"name": "listener",
|
|
656
|
-
"type": {
|
|
657
|
-
"text": "Listener<DatabaseEvent.AfterUpdate<T>>"
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
]
|
|
661
|
-
}
|
|
662
|
-
]
|
|
663
|
-
}
|
|
664
|
-
],
|
|
665
|
-
"exports": [
|
|
718
|
+
},
|
|
666
719
|
{
|
|
667
720
|
"kind": "js",
|
|
668
|
-
"name": "
|
|
721
|
+
"name": "*",
|
|
669
722
|
"declaration": {
|
|
670
|
-
"name": "
|
|
671
|
-
"
|
|
723
|
+
"name": "*",
|
|
724
|
+
"package": "./when-else"
|
|
672
725
|
}
|
|
673
726
|
}
|
|
674
727
|
]
|
|
675
728
|
},
|
|
676
729
|
{
|
|
677
730
|
"kind": "javascript-module",
|
|
678
|
-
"path": "src/
|
|
731
|
+
"path": "src/encoding/index.ts",
|
|
679
732
|
"declarations": [],
|
|
680
733
|
"exports": [
|
|
681
734
|
{
|
|
@@ -683,7 +736,7 @@
|
|
|
683
736
|
"name": "*",
|
|
684
737
|
"declaration": {
|
|
685
738
|
"name": "*",
|
|
686
|
-
"package": "./
|
|
739
|
+
"package": "./base64"
|
|
687
740
|
}
|
|
688
741
|
}
|
|
689
742
|
]
|
|
@@ -1163,59 +1216,6 @@
|
|
|
1163
1216
|
}
|
|
1164
1217
|
]
|
|
1165
1218
|
},
|
|
1166
|
-
{
|
|
1167
|
-
"kind": "javascript-module",
|
|
1168
|
-
"path": "src/decorators/index.ts",
|
|
1169
|
-
"declarations": [],
|
|
1170
|
-
"exports": [
|
|
1171
|
-
{
|
|
1172
|
-
"kind": "js",
|
|
1173
|
-
"name": "*",
|
|
1174
|
-
"declaration": {
|
|
1175
|
-
"name": "*",
|
|
1176
|
-
"package": "./renderOnChange"
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
]
|
|
1180
|
-
},
|
|
1181
|
-
{
|
|
1182
|
-
"kind": "javascript-module",
|
|
1183
|
-
"path": "src/decorators/renderOnChange.ts",
|
|
1184
|
-
"declarations": [
|
|
1185
|
-
{
|
|
1186
|
-
"kind": "function",
|
|
1187
|
-
"name": "renderOnChange",
|
|
1188
|
-
"parameters": [
|
|
1189
|
-
{
|
|
1190
|
-
"name": "target",
|
|
1191
|
-
"type": {
|
|
1192
|
-
"text": "FASTElement & { render(): void }"
|
|
1193
|
-
},
|
|
1194
|
-
"description": "The target to define the property change handler on."
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
"name": "name",
|
|
1198
|
-
"type": {
|
|
1199
|
-
"text": "string"
|
|
1200
|
-
},
|
|
1201
|
-
"description": "The property name."
|
|
1202
|
-
}
|
|
1203
|
-
],
|
|
1204
|
-
"description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
|
|
1205
|
-
"privacy": "public"
|
|
1206
|
-
}
|
|
1207
|
-
],
|
|
1208
|
-
"exports": [
|
|
1209
|
-
{
|
|
1210
|
-
"kind": "js",
|
|
1211
|
-
"name": "renderOnChange",
|
|
1212
|
-
"declaration": {
|
|
1213
|
-
"name": "renderOnChange",
|
|
1214
|
-
"module": "src/decorators/renderOnChange.ts"
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
]
|
|
1218
|
-
},
|
|
1219
1219
|
{
|
|
1220
1220
|
"kind": "javascript-module",
|
|
1221
1221
|
"path": "src/error/errorMap.ts",
|
|
@@ -70,6 +70,17 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
70
70
|
* @internal
|
|
71
71
|
**/
|
|
72
72
|
#_shouldForceLifecycle: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
|
|
75
|
+
* promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
|
|
76
|
+
* consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
|
|
77
|
+
* cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
|
|
78
|
+
* entirely. Once that window has passed we can no longer assume nothing was torn down, so the
|
|
79
|
+
* paired reconnect must not stay blocked either, or the consumer never gets a chance to
|
|
80
|
+
* re-initialize what it already destroyed.
|
|
81
|
+
* @internal
|
|
82
|
+
**/
|
|
83
|
+
#_blockedDisconnectSurvivedMicrotask: boolean;
|
|
73
84
|
/**
|
|
74
85
|
* @privateRemarks
|
|
75
86
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF,KAAK,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;AAK5D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,6BAA6B,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/mixins/lifecycle/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,aAAa,CAAC,WAAW,GAAG,WAAW,CAAC,CAAC;AAErF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC;IACxB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,yBAAyB,CAAC;CACjC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,KAAK,CAAC;CACb,CAAC;AAEF,KAAK,SAAS,GAAG,yBAAyB,GAAG,oBAAoB,GAAG,YAAY,CAAC;AAEjF,KAAK,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,CAAC;AAK5D;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,6BAA6B,EAAE,MAAM,CAAC;kBA0CtD,GAAG,EAAE;QAxC1B,iBAAiB;qBACJ,SAAS;QAEtB;;;YAGI;2BACe,MAAM;QACzB;;;YAGI;0BACc,OAAO;QACzB;;;;;;;YAOI;0BACc,MAAM,CAAC,OAAO;QAChC;;;;YAII;gCACoB,OAAO;QAC/B;;;;;;;;;YASI;8CACkC,OAAO;QAM7C;;;;;WAKG;yBACuB,OAAO,GAAG,IAAI;QAUxC;;;;;;WAMG;qBACU,IAAI;QAMjB;;;WAGG;;QAmBH;;;;;WAKG;;wDAwB6C,aAAa,GAAG,OAAO;QAyCvE;;;;;;WAMG;qCAC0B,OAAO,GAAG,SAAS;6BA4B3B,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAM1B,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,mBAAmB,eAAkC,CAAC"}
|
|
@@ -11,7 +11,7 @@ const CLEANUP_TIMEOUT_MS = 10000;
|
|
|
11
11
|
* #_ syntax is used for a javascript private method/variable
|
|
12
12
|
* we can't use private/protected from typescript in an anonymous class like this
|
|
13
13
|
*/
|
|
14
|
-
export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
14
|
+
export const LifecycleMixin = (Base) => { var _instances, __container, __latestTokenCode, __hasFirstLoaded, __cleanupTimeout, __shouldForceLifecycle, __blockedDisconnectSurvivedMicrotask, __blockLifecycleDueToTokenChange, __tryFindContainingLayout, _a; return _a = class extends Base {
|
|
15
15
|
constructor(...args) {
|
|
16
16
|
super(args);
|
|
17
17
|
_instances.add(this);
|
|
@@ -42,6 +42,17 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
42
42
|
* @internal
|
|
43
43
|
**/
|
|
44
44
|
__shouldForceLifecycle.set(this, false);
|
|
45
|
+
/**
|
|
46
|
+
* Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
|
|
47
|
+
* promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
|
|
48
|
+
* consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
|
|
49
|
+
* cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
|
|
50
|
+
* entirely. Once that window has passed we can no longer assume nothing was torn down, so the
|
|
51
|
+
* paired reconnect must not stay blocked either, or the consumer never gets a chance to
|
|
52
|
+
* re-initialize what it already destroyed.
|
|
53
|
+
* @internal
|
|
54
|
+
**/
|
|
55
|
+
__blockedDisconnectSurvivedMicrotask.set(this, false);
|
|
45
56
|
}
|
|
46
57
|
/**
|
|
47
58
|
* @privateRemarks
|
|
@@ -127,6 +138,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
127
138
|
__hasFirstLoaded = new WeakMap(),
|
|
128
139
|
__cleanupTimeout = new WeakMap(),
|
|
129
140
|
__shouldForceLifecycle = new WeakMap(),
|
|
141
|
+
__blockedDisconnectSurvivedMicrotask = new WeakMap(),
|
|
130
142
|
_instances = new WeakSet(),
|
|
131
143
|
__blockLifecycleDueToTokenChange = function __blockLifecycleDueToTokenChange(lifecycleType) {
|
|
132
144
|
var _b, _c;
|
|
@@ -146,6 +158,14 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
146
158
|
// 'reconnect' - otherwise unrelated layout changes while disconnected can block it forever.
|
|
147
159
|
__classPrivateFieldSet(this, __hasFirstLoaded, false, "f");
|
|
148
160
|
}
|
|
161
|
+
else {
|
|
162
|
+
// Blocked disconnect: track whether a microtask elapses before the paired reconnect
|
|
163
|
+
// arrives. See `#_blockedDisconnectSurvivedMicrotask` for why this matters.
|
|
164
|
+
__classPrivateFieldSet(this, __blockedDisconnectSurvivedMicrotask, false, "f");
|
|
165
|
+
queueMicrotask(() => {
|
|
166
|
+
__classPrivateFieldSet(this, __blockedDisconnectSurvivedMicrotask, true, "f");
|
|
167
|
+
});
|
|
168
|
+
}
|
|
149
169
|
__classPrivateFieldSet(this, __cleanupTimeout, setTimeout(() => {
|
|
150
170
|
__classPrivateFieldSet(this, __shouldForceLifecycle, result, "f");
|
|
151
171
|
if (__classPrivateFieldGet(this, __shouldForceLifecycle, "f")) {
|
|
@@ -154,7 +174,7 @@ export const LifecycleMixin = (Base) => { var _instances, __container, __latestT
|
|
|
154
174
|
}, CLEANUP_TIMEOUT_MS), "f");
|
|
155
175
|
}
|
|
156
176
|
else if (lifecycleType === 'reconnect') {
|
|
157
|
-
result = tokensDifferent;
|
|
177
|
+
result = tokensDifferent && !__classPrivateFieldGet(this, __blockedDisconnectSurvivedMicrotask, "f");
|
|
158
178
|
__classPrivateFieldSet(this, __latestTokenCode, (_c = __classPrivateFieldGet(this, __container, "f").lifecycleUpdateToken) !== null && _c !== void 0 ? _c : '', "f");
|
|
159
179
|
clearTimeout(__classPrivateFieldGet(this, __cleanupTimeout, "f"));
|
|
160
180
|
}
|
|
@@ -9094,7 +9094,7 @@
|
|
|
9094
9094
|
},
|
|
9095
9095
|
{
|
|
9096
9096
|
"kind": "Content",
|
|
9097
|
-
"text": ";\n #_shouldForceLifecycle: boolean;\n cloneNode(deep?: boolean): "
|
|
9097
|
+
"text": ";\n #_shouldForceLifecycle: boolean;\n #_blockedDisconnectSurvivedMicrotask: boolean;\n cloneNode(deep?: boolean): "
|
|
9098
9098
|
},
|
|
9099
9099
|
{
|
|
9100
9100
|
"kind": "Reference",
|
|
@@ -1018,6 +1018,17 @@ export declare const LifecycleMixin: <T extends ConstructableLifecycleHandler>(B
|
|
|
1018
1018
|
* @internal
|
|
1019
1019
|
**/
|
|
1020
1020
|
#_shouldForceLifecycle: boolean;
|
|
1021
|
+
/**
|
|
1022
|
+
* Set once a microtask has elapsed since a blocked ('reflow') disconnect. A blocked disconnect
|
|
1023
|
+
* promises the consumer "you'll reconnect imminently, don't tear anything down" - but some
|
|
1024
|
+
* consumers (e.g. a grid wrapper) don't fully trust that promise and run their own defensive
|
|
1025
|
+
* cleanup on a microtask if they're still disconnected by then, bypassing `shouldRunDisconnect`
|
|
1026
|
+
* entirely. Once that window has passed we can no longer assume nothing was torn down, so the
|
|
1027
|
+
* paired reconnect must not stay blocked either, or the consumer never gets a chance to
|
|
1028
|
+
* re-initialize what it already destroyed.
|
|
1029
|
+
* @internal
|
|
1030
|
+
**/
|
|
1031
|
+
#_blockedDisconnectSurvivedMicrotask: boolean;
|
|
1021
1032
|
/**
|
|
1022
1033
|
* @privateRemarks
|
|
1023
1034
|
* Rather than using the basic implementation of cloning we run a copy constructor (deepClone)
|
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.496.
|
|
4
|
+
"version": "14.496.2-alpha-438fb6e.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -29,18 +29,18 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@genesislcap/foundation-testing": "14.496.
|
|
33
|
-
"@genesislcap/genx": "14.496.
|
|
34
|
-
"@genesislcap/rollup-builder": "14.496.
|
|
35
|
-
"@genesislcap/ts-builder": "14.496.
|
|
36
|
-
"@genesislcap/uvu-playwright-builder": "14.496.
|
|
37
|
-
"@genesislcap/vite-builder": "14.496.
|
|
38
|
-
"@genesislcap/webpack-builder": "14.496.
|
|
32
|
+
"@genesislcap/foundation-testing": "14.496.2-alpha-438fb6e.0",
|
|
33
|
+
"@genesislcap/genx": "14.496.2-alpha-438fb6e.0",
|
|
34
|
+
"@genesislcap/rollup-builder": "14.496.2-alpha-438fb6e.0",
|
|
35
|
+
"@genesislcap/ts-builder": "14.496.2-alpha-438fb6e.0",
|
|
36
|
+
"@genesislcap/uvu-playwright-builder": "14.496.2-alpha-438fb6e.0",
|
|
37
|
+
"@genesislcap/vite-builder": "14.496.2-alpha-438fb6e.0",
|
|
38
|
+
"@genesislcap/webpack-builder": "14.496.2-alpha-438fb6e.0",
|
|
39
39
|
"@types/json-schema": "^7.0.11"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@genesislcap/expression-builder": "14.496.
|
|
43
|
-
"@genesislcap/foundation-logger": "14.496.
|
|
42
|
+
"@genesislcap/expression-builder": "14.496.2-alpha-438fb6e.0",
|
|
43
|
+
"@genesislcap/foundation-logger": "14.496.2-alpha-438fb6e.0",
|
|
44
44
|
"@microsoft/fast-components": "2.30.6",
|
|
45
45
|
"@microsoft/fast-element": "1.14.0",
|
|
46
46
|
"@microsoft/fast-foundation": "2.50.0",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"customElements": "dist/custom-elements.json",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "6dc7bbda02ba69207921891ffbd1f39b582ac780"
|
|
62
62
|
}
|