@almadar/patterns 2.17.0 → 2.17.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.
- package/dist/component-mapping.json +1 -1
- package/dist/event-contracts.json +1 -1
- package/dist/index.d.ts +98 -0
- package/dist/index.js +95 -46
- package/dist/index.js.map +1 -1
- package/dist/patterns-registry.json +93 -44
- package/dist/payloads.d.ts +16 -11
- package/dist/registry.json +93 -44
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"exportedAt": "2026-04-
|
|
3
|
+
"exportedAt": "2026-04-22T03:26:00.903Z",
|
|
4
4
|
"patterns": {
|
|
5
5
|
"entity-table": {
|
|
6
6
|
"type": "entity-table",
|
|
@@ -490,7 +490,9 @@
|
|
|
490
490
|
"types": [
|
|
491
491
|
"array"
|
|
492
492
|
],
|
|
493
|
-
"description": "Actions for each card item (schema-driven)"
|
|
493
|
+
"description": "Actions for each card item (schema-driven)",
|
|
494
|
+
"kind": "event-list",
|
|
495
|
+
"eventField": "event"
|
|
494
496
|
},
|
|
495
497
|
"showTotal": {
|
|
496
498
|
"types": [
|
|
@@ -953,13 +955,15 @@
|
|
|
953
955
|
"types": [
|
|
954
956
|
"string"
|
|
955
957
|
],
|
|
956
|
-
"description": "Event dispatch props (for trait state machine integration)"
|
|
958
|
+
"description": "Event dispatch props (for trait state machine integration)",
|
|
959
|
+
"kind": "event"
|
|
957
960
|
},
|
|
958
961
|
"cancelEvent": {
|
|
959
962
|
"types": [
|
|
960
963
|
"string"
|
|
961
964
|
],
|
|
962
|
-
"description": "Event to dispatch on cancel (defaults to 'CANCEL')"
|
|
965
|
+
"description": "Event to dispatch on cancel (defaults to 'CANCEL')",
|
|
966
|
+
"kind": "event"
|
|
963
967
|
},
|
|
964
968
|
"entityId": {
|
|
965
969
|
"types": [
|
|
@@ -1161,13 +1165,15 @@
|
|
|
1161
1165
|
"types": [
|
|
1162
1166
|
"string"
|
|
1163
1167
|
],
|
|
1164
|
-
"description": "Event dispatch props (for trait state machine integration)"
|
|
1168
|
+
"description": "Event dispatch props (for trait state machine integration)",
|
|
1169
|
+
"kind": "event"
|
|
1165
1170
|
},
|
|
1166
1171
|
"cancelEvent": {
|
|
1167
1172
|
"types": [
|
|
1168
1173
|
"string"
|
|
1169
1174
|
],
|
|
1170
|
-
"description": "Event to dispatch on cancel (defaults to 'CANCEL')"
|
|
1175
|
+
"description": "Event to dispatch on cancel (defaults to 'CANCEL')",
|
|
1176
|
+
"kind": "event"
|
|
1171
1177
|
},
|
|
1172
1178
|
"entityId": {
|
|
1173
1179
|
"types": [
|
|
@@ -2580,7 +2586,8 @@
|
|
|
2580
2586
|
"types": [
|
|
2581
2587
|
"string"
|
|
2582
2588
|
],
|
|
2583
|
-
"description": "Declarative close event — emits UI:{closeEvent} via eventBus when drawer should close"
|
|
2589
|
+
"description": "Declarative close event — emits UI:{closeEvent} via eventBus when drawer should close",
|
|
2590
|
+
"kind": "event"
|
|
2584
2591
|
}
|
|
2585
2592
|
}
|
|
2586
2593
|
},
|
|
@@ -2985,7 +2992,8 @@
|
|
|
2985
2992
|
"types": [
|
|
2986
2993
|
"string"
|
|
2987
2994
|
],
|
|
2988
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
2995
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
2996
|
+
"kind": "event"
|
|
2989
2997
|
},
|
|
2990
2998
|
"actionPayload": {
|
|
2991
2999
|
"types": [
|
|
@@ -2997,7 +3005,8 @@
|
|
|
2997
3005
|
"types": [
|
|
2998
3006
|
"string"
|
|
2999
3007
|
],
|
|
3000
|
-
"description": "Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave"
|
|
3008
|
+
"description": "Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave",
|
|
3009
|
+
"kind": "event"
|
|
3001
3010
|
},
|
|
3002
3011
|
"maxWidth": {
|
|
3003
3012
|
"types": [
|
|
@@ -3838,7 +3847,8 @@
|
|
|
3838
3847
|
"types": [
|
|
3839
3848
|
"string"
|
|
3840
3849
|
],
|
|
3841
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
3850
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
3851
|
+
"kind": "event"
|
|
3842
3852
|
},
|
|
3843
3853
|
"actionPayload": {
|
|
3844
3854
|
"types": [
|
|
@@ -4002,7 +4012,8 @@
|
|
|
4002
4012
|
"types": [
|
|
4003
4013
|
"string"
|
|
4004
4014
|
],
|
|
4005
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
4015
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
4016
|
+
"kind": "event"
|
|
4006
4017
|
},
|
|
4007
4018
|
"actionPayload": {
|
|
4008
4019
|
"types": [
|
|
@@ -4142,7 +4153,8 @@
|
|
|
4142
4153
|
"types": [
|
|
4143
4154
|
"string"
|
|
4144
4155
|
],
|
|
4145
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on card click"
|
|
4156
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on card click",
|
|
4157
|
+
"kind": "event"
|
|
4146
4158
|
},
|
|
4147
4159
|
"isSelected": {
|
|
4148
4160
|
"types": [
|
|
@@ -4344,7 +4356,8 @@
|
|
|
4344
4356
|
"types": [
|
|
4345
4357
|
"string"
|
|
4346
4358
|
],
|
|
4347
|
-
"description": "Declarative event name for trait dispatch"
|
|
4359
|
+
"description": "Declarative event name for trait dispatch",
|
|
4360
|
+
"kind": "event"
|
|
4348
4361
|
},
|
|
4349
4362
|
"inputType": {
|
|
4350
4363
|
"types": [
|
|
@@ -4450,7 +4463,8 @@
|
|
|
4450
4463
|
"types": [
|
|
4451
4464
|
"string"
|
|
4452
4465
|
],
|
|
4453
|
-
"description": "Declarative event name for trait dispatch"
|
|
4466
|
+
"description": "Declarative event name for trait dispatch",
|
|
4467
|
+
"kind": "event"
|
|
4454
4468
|
},
|
|
4455
4469
|
"error": {
|
|
4456
4470
|
"types": [
|
|
@@ -4494,7 +4508,8 @@
|
|
|
4494
4508
|
"types": [
|
|
4495
4509
|
"string"
|
|
4496
4510
|
],
|
|
4497
|
-
"description": "Declarative event name for trait dispatch"
|
|
4511
|
+
"description": "Declarative event name for trait dispatch",
|
|
4512
|
+
"kind": "event"
|
|
4498
4513
|
},
|
|
4499
4514
|
"error": {
|
|
4500
4515
|
"types": [
|
|
@@ -4561,7 +4576,8 @@
|
|
|
4561
4576
|
"types": [
|
|
4562
4577
|
"string"
|
|
4563
4578
|
],
|
|
4564
|
-
"description": "Declarative event name for trait dispatch"
|
|
4579
|
+
"description": "Declarative event name for trait dispatch",
|
|
4580
|
+
"kind": "event"
|
|
4565
4581
|
},
|
|
4566
4582
|
"label": {
|
|
4567
4583
|
"types": [
|
|
@@ -4761,7 +4777,8 @@
|
|
|
4761
4777
|
"types": [
|
|
4762
4778
|
"string"
|
|
4763
4779
|
],
|
|
4764
|
-
"description": "Declarative dismiss event — emits UI:{dismissEvent} via eventBus when alert is dismissed"
|
|
4780
|
+
"description": "Declarative dismiss event — emits UI:{dismissEvent} via eventBus when alert is dismissed",
|
|
4781
|
+
"kind": "event"
|
|
4765
4782
|
}
|
|
4766
4783
|
}
|
|
4767
4784
|
},
|
|
@@ -5385,7 +5402,8 @@
|
|
|
5385
5402
|
"types": [
|
|
5386
5403
|
"string"
|
|
5387
5404
|
],
|
|
5388
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
5405
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
5406
|
+
"kind": "event"
|
|
5389
5407
|
}
|
|
5390
5408
|
}
|
|
5391
5409
|
},
|
|
@@ -5520,7 +5538,8 @@
|
|
|
5520
5538
|
"types": [
|
|
5521
5539
|
"string"
|
|
5522
5540
|
],
|
|
5523
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
5541
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
5542
|
+
"kind": "event"
|
|
5524
5543
|
},
|
|
5525
5544
|
"actionPayload": {
|
|
5526
5545
|
"types": [
|
|
@@ -5605,13 +5624,15 @@
|
|
|
5605
5624
|
"types": [
|
|
5606
5625
|
"string"
|
|
5607
5626
|
],
|
|
5608
|
-
"description": "Declarative event name — emits UI:{action} via eventBus on click"
|
|
5627
|
+
"description": "Declarative event name — emits UI:{action} via eventBus on click",
|
|
5628
|
+
"kind": "event"
|
|
5609
5629
|
},
|
|
5610
5630
|
"hoverEvent": {
|
|
5611
5631
|
"types": [
|
|
5612
5632
|
"string"
|
|
5613
5633
|
],
|
|
5614
|
-
"description": "Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false }"
|
|
5634
|
+
"description": "Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false }",
|
|
5635
|
+
"kind": "event"
|
|
5615
5636
|
}
|
|
5616
5637
|
}
|
|
5617
5638
|
},
|
|
@@ -5858,13 +5879,15 @@
|
|
|
5858
5879
|
"types": [
|
|
5859
5880
|
"string"
|
|
5860
5881
|
],
|
|
5861
|
-
"description": "Declarative event name emitted on press via useEventBus"
|
|
5882
|
+
"description": "Declarative event name emitted on press via useEventBus",
|
|
5883
|
+
"kind": "event"
|
|
5862
5884
|
},
|
|
5863
5885
|
"releaseEvent": {
|
|
5864
5886
|
"types": [
|
|
5865
5887
|
"string"
|
|
5866
5888
|
],
|
|
5867
|
-
"description": "Declarative event name emitted on release via useEventBus"
|
|
5889
|
+
"description": "Declarative event name emitted on release via useEventBus",
|
|
5890
|
+
"kind": "event"
|
|
5868
5891
|
},
|
|
5869
5892
|
"pressed": {
|
|
5870
5893
|
"types": [
|
|
@@ -6118,7 +6141,8 @@
|
|
|
6118
6141
|
"types": [
|
|
6119
6142
|
"string"
|
|
6120
6143
|
],
|
|
6121
|
-
"description": "Declarative event name emitted on click via useEventBus"
|
|
6144
|
+
"description": "Declarative event name emitted on click via useEventBus",
|
|
6145
|
+
"kind": "event"
|
|
6122
6146
|
}
|
|
6123
6147
|
}
|
|
6124
6148
|
},
|
|
@@ -7091,7 +7115,8 @@
|
|
|
7091
7115
|
"types": [
|
|
7092
7116
|
"string"
|
|
7093
7117
|
],
|
|
7094
|
-
"description": "Event to emit on click (REQUIRED for interactive elements)"
|
|
7118
|
+
"description": "Event to emit on click (REQUIRED for interactive elements)",
|
|
7119
|
+
"kind": "event"
|
|
7095
7120
|
},
|
|
7096
7121
|
"payload": {
|
|
7097
7122
|
"types": [
|
|
@@ -8940,7 +8965,9 @@
|
|
|
8940
8965
|
"types": [
|
|
8941
8966
|
"array"
|
|
8942
8967
|
],
|
|
8943
|
-
"description": "Actions per item"
|
|
8968
|
+
"description": "Actions per item",
|
|
8969
|
+
"kind": "event-list",
|
|
8970
|
+
"eventField": "event"
|
|
8944
8971
|
}
|
|
8945
8972
|
}
|
|
8946
8973
|
},
|
|
@@ -13511,7 +13538,9 @@
|
|
|
13511
13538
|
"types": [
|
|
13512
13539
|
"array"
|
|
13513
13540
|
],
|
|
13514
|
-
"description": "Per-item action buttons"
|
|
13541
|
+
"description": "Per-item action buttons",
|
|
13542
|
+
"kind": "event-list",
|
|
13543
|
+
"eventField": "event"
|
|
13515
13544
|
},
|
|
13516
13545
|
"cols": {
|
|
13517
13546
|
"types": [
|
|
@@ -13572,7 +13601,8 @@
|
|
|
13572
13601
|
"types": [
|
|
13573
13602
|
"string"
|
|
13574
13603
|
],
|
|
13575
|
-
"description": "Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] })"
|
|
13604
|
+
"description": "Selection change event name (emits UI:{selectionEvent} with { selectedIds: string[] })",
|
|
13605
|
+
"kind": "event"
|
|
13576
13606
|
},
|
|
13577
13607
|
"infiniteScroll": {
|
|
13578
13608
|
"types": [
|
|
@@ -13584,7 +13614,8 @@
|
|
|
13584
13614
|
"types": [
|
|
13585
13615
|
"string"
|
|
13586
13616
|
],
|
|
13587
|
-
"description": "Event emitted when more items needed: UI:{loadMoreEvent}"
|
|
13617
|
+
"description": "Event emitted when more items needed: UI:{loadMoreEvent}",
|
|
13618
|
+
"kind": "event"
|
|
13588
13619
|
},
|
|
13589
13620
|
"hasMore": {
|
|
13590
13621
|
"types": [
|
|
@@ -13648,7 +13679,9 @@
|
|
|
13648
13679
|
"types": [
|
|
13649
13680
|
"array"
|
|
13650
13681
|
],
|
|
13651
|
-
"description": "Per-item action buttons"
|
|
13682
|
+
"description": "Per-item action buttons",
|
|
13683
|
+
"kind": "event-list",
|
|
13684
|
+
"eventField": "event"
|
|
13652
13685
|
},
|
|
13653
13686
|
"gap": {
|
|
13654
13687
|
"types": [
|
|
@@ -13720,13 +13753,15 @@
|
|
|
13720
13753
|
"types": [
|
|
13721
13754
|
"string"
|
|
13722
13755
|
],
|
|
13723
|
-
"description": "Event emitted on reorder: UI:{reorderEvent} with { fromIndex, toIndex }"
|
|
13756
|
+
"description": "Event emitted on reorder: UI:{reorderEvent} with { fromIndex, toIndex }",
|
|
13757
|
+
"kind": "event"
|
|
13724
13758
|
},
|
|
13725
13759
|
"swipeLeftEvent": {
|
|
13726
13760
|
"types": [
|
|
13727
13761
|
"string"
|
|
13728
13762
|
],
|
|
13729
|
-
"description": "Event emitted on left swipe: UI:{swipeLeftEvent} with { row }"
|
|
13763
|
+
"description": "Event emitted on left swipe: UI:{swipeLeftEvent} with { row }",
|
|
13764
|
+
"kind": "event"
|
|
13730
13765
|
},
|
|
13731
13766
|
"swipeLeftActions": {
|
|
13732
13767
|
"types": [
|
|
@@ -13738,7 +13773,8 @@
|
|
|
13738
13773
|
"types": [
|
|
13739
13774
|
"string"
|
|
13740
13775
|
],
|
|
13741
|
-
"description": "Event emitted on right swipe: UI:{swipeRightEvent} with { row }"
|
|
13776
|
+
"description": "Event emitted on right swipe: UI:{swipeRightEvent} with { row }",
|
|
13777
|
+
"kind": "event"
|
|
13742
13778
|
},
|
|
13743
13779
|
"swipeRightActions": {
|
|
13744
13780
|
"types": [
|
|
@@ -13750,7 +13786,8 @@
|
|
|
13750
13786
|
"types": [
|
|
13751
13787
|
"string"
|
|
13752
13788
|
],
|
|
13753
|
-
"description": "Event emitted on long press: UI:{longPressEvent} with { row }"
|
|
13789
|
+
"description": "Event emitted on long press: UI:{longPressEvent} with { row }",
|
|
13790
|
+
"kind": "event"
|
|
13754
13791
|
},
|
|
13755
13792
|
"infiniteScroll": {
|
|
13756
13793
|
"types": [
|
|
@@ -13762,7 +13799,8 @@
|
|
|
13762
13799
|
"types": [
|
|
13763
13800
|
"string"
|
|
13764
13801
|
],
|
|
13765
|
-
"description": "Event emitted when more items needed: UI:{loadMoreEvent}"
|
|
13802
|
+
"description": "Event emitted when more items needed: UI:{loadMoreEvent}",
|
|
13803
|
+
"kind": "event"
|
|
13766
13804
|
},
|
|
13767
13805
|
"hasMore": {
|
|
13768
13806
|
"types": [
|
|
@@ -14064,7 +14102,8 @@
|
|
|
14064
14102
|
"types": [
|
|
14065
14103
|
"string"
|
|
14066
14104
|
],
|
|
14067
|
-
"description": "Declarative event name for value changes"
|
|
14105
|
+
"description": "Declarative event name for value changes",
|
|
14106
|
+
"kind": "event"
|
|
14068
14107
|
},
|
|
14069
14108
|
"actionPayload": {
|
|
14070
14109
|
"types": [
|
|
@@ -14317,7 +14356,8 @@
|
|
|
14317
14356
|
"types": [
|
|
14318
14357
|
"string"
|
|
14319
14358
|
],
|
|
14320
|
-
"description": "Declarative event name for value changes"
|
|
14359
|
+
"description": "Declarative event name for value changes",
|
|
14360
|
+
"kind": "event"
|
|
14321
14361
|
},
|
|
14322
14362
|
"actionPayload": {
|
|
14323
14363
|
"types": [
|
|
@@ -14393,7 +14433,8 @@
|
|
|
14393
14433
|
"types": [
|
|
14394
14434
|
"string"
|
|
14395
14435
|
],
|
|
14396
|
-
"description": "Declarative event name for rating changes"
|
|
14436
|
+
"description": "Declarative event name for rating changes",
|
|
14437
|
+
"kind": "event"
|
|
14397
14438
|
},
|
|
14398
14439
|
"actionPayload": {
|
|
14399
14440
|
"types": [
|
|
@@ -14479,7 +14520,8 @@
|
|
|
14479
14520
|
"types": [
|
|
14480
14521
|
"string"
|
|
14481
14522
|
],
|
|
14482
|
-
"description": "Declarative event name for file selection"
|
|
14523
|
+
"description": "Declarative event name for file selection",
|
|
14524
|
+
"kind": "event"
|
|
14483
14525
|
},
|
|
14484
14526
|
"actionPayload": {
|
|
14485
14527
|
"types": [
|
|
@@ -14595,7 +14637,8 @@
|
|
|
14595
14637
|
"string"
|
|
14596
14638
|
],
|
|
14597
14639
|
"description": "Event name to emit when load-more is triggered (emitted as UI:{loadMoreEvent})",
|
|
14598
|
-
"required": true
|
|
14640
|
+
"required": true,
|
|
14641
|
+
"kind": "event"
|
|
14599
14642
|
},
|
|
14600
14643
|
"loadMorePayload": {
|
|
14601
14644
|
"types": [
|
|
@@ -14767,7 +14810,8 @@
|
|
|
14767
14810
|
"string"
|
|
14768
14811
|
],
|
|
14769
14812
|
"description": "Event name to emit on refresh (emitted as UI:{refreshEvent})",
|
|
14770
|
-
"required": true
|
|
14813
|
+
"required": true,
|
|
14814
|
+
"kind": "event"
|
|
14771
14815
|
},
|
|
14772
14816
|
"refreshPayload": {
|
|
14773
14817
|
"types": [
|
|
@@ -14826,7 +14870,8 @@
|
|
|
14826
14870
|
"string"
|
|
14827
14871
|
],
|
|
14828
14872
|
"description": "reorderEvent prop",
|
|
14829
|
-
"required": true
|
|
14873
|
+
"required": true,
|
|
14874
|
+
"kind": "event"
|
|
14830
14875
|
},
|
|
14831
14876
|
"reorderPayload": {
|
|
14832
14877
|
"types": [
|
|
@@ -14867,13 +14912,17 @@
|
|
|
14867
14912
|
"types": [
|
|
14868
14913
|
"array"
|
|
14869
14914
|
],
|
|
14870
|
-
"description": "leftActions prop"
|
|
14915
|
+
"description": "leftActions prop",
|
|
14916
|
+
"kind": "event-list",
|
|
14917
|
+
"eventField": "event"
|
|
14871
14918
|
},
|
|
14872
14919
|
"rightActions": {
|
|
14873
14920
|
"types": [
|
|
14874
14921
|
"array"
|
|
14875
14922
|
],
|
|
14876
|
-
"description": "rightActions prop"
|
|
14923
|
+
"description": "rightActions prop",
|
|
14924
|
+
"kind": "event-list",
|
|
14925
|
+
"eventField": "event"
|
|
14877
14926
|
},
|
|
14878
14927
|
"threshold": {
|
|
14879
14928
|
"types": [
|
package/dist/payloads.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* @packageDocumentation
|
|
28
28
|
*/
|
|
29
|
-
import type { EventPayloadValue, FieldValue } from '@almadar/core';
|
|
29
|
+
import type { EventPayload, EventPayloadValue, FieldValue } from '@almadar/core';
|
|
30
30
|
/**
|
|
31
31
|
* Payload dispatched by per-item action buttons in data patterns
|
|
32
32
|
* (DataGrid, DataList, Timeline, CardGrid, List, ...).
|
|
@@ -39,13 +39,17 @@ import type { EventPayloadValue, FieldValue } from '@almadar/core';
|
|
|
39
39
|
*
|
|
40
40
|
* Generic over the row shape. `DataGridItemAction` used on `CartItem[]`
|
|
41
41
|
* gives the trait `ItemActionPayload<CartItem>`, not `unknown`.
|
|
42
|
+
*
|
|
43
|
+
* Intersected with `EventPayload` so the whole thing is structurally
|
|
44
|
+
* compatible with `eventBus.emit`'s typed parameter — interfaces alone
|
|
45
|
+
* aren't assignable to `EventPayload`'s index signature in strict mode.
|
|
42
46
|
*/
|
|
43
|
-
export
|
|
47
|
+
export type ItemActionPayload<T extends EventPayloadValue = EventPayloadValue> = EventPayload & {
|
|
44
48
|
/** Row primary key. */
|
|
45
49
|
id: string | number;
|
|
46
50
|
/** Full row data at click time. */
|
|
47
51
|
row: T;
|
|
48
|
-
}
|
|
52
|
+
};
|
|
49
53
|
/**
|
|
50
54
|
* Payload dispatched when a selection-capable data pattern observes a
|
|
51
55
|
* selection change (`selectionEvent` on DataGrid / DataList / ...).
|
|
@@ -53,19 +57,20 @@ export interface ItemActionPayload<T extends EventPayloadValue = EventPayloadVal
|
|
|
53
57
|
* reconcile against its row set to recompute derived state ("bulk
|
|
54
58
|
* enabled", "3 items selected", etc.).
|
|
55
59
|
*/
|
|
56
|
-
export
|
|
57
|
-
selectedIds: string[];
|
|
58
|
-
}
|
|
60
|
+
export type SelectionChangePayload = EventPayload & {
|
|
61
|
+
selectedIds: readonly string[];
|
|
62
|
+
};
|
|
59
63
|
/**
|
|
60
64
|
* Payload dispatched when an infinite-scroll-enabled pattern's sentinel
|
|
61
65
|
* becomes visible (`loadMoreEvent` on DataGrid / DataList /
|
|
62
66
|
* InfiniteScrollSentinel).
|
|
63
67
|
*
|
|
64
68
|
* No fields required — the receiving trait knows its own cursor (last
|
|
65
|
-
* loaded page, current offset). Declared as
|
|
66
|
-
*
|
|
69
|
+
* loaded page, current offset). Declared as `EventPayload` (the empty-
|
|
70
|
+
* object bound) so consumers can pass `{}` and listeners can
|
|
71
|
+
* destructure without runtime checks.
|
|
67
72
|
*/
|
|
68
|
-
export type LoadMoreRequestPayload =
|
|
73
|
+
export type LoadMoreRequestPayload = EventPayload;
|
|
69
74
|
/**
|
|
70
75
|
* Payload dispatched by a schema-driven `Form` on successful submit
|
|
71
76
|
* (`submitEvent`). `data` holds the form's collected field values.
|
|
@@ -75,6 +80,6 @@ export type LoadMoreRequestPayload = Record<string, never>;
|
|
|
75
80
|
* handler, and a generic form falls back to the `FieldValue`-keyed
|
|
76
81
|
* default.
|
|
77
82
|
*/
|
|
78
|
-
export
|
|
83
|
+
export type FormSubmitPayload<T extends Record<string, FieldValue | undefined> = Record<string, FieldValue | undefined>> = EventPayload & {
|
|
79
84
|
data: T;
|
|
80
|
-
}
|
|
85
|
+
};
|