@mintplayer/react-bootstrap 19.1.0 → 19.2.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.
@@ -12,7 +12,11 @@ const l = e({
12
12
  onRowClick: "mp-datatable-row-click",
13
13
  onRowDblClick: "mp-datatable-row-dblclick",
14
14
  onRowContextMenu: "mp-datatable-row-contextmenu",
15
- onSelectionChange: "mp-datatable-selection-change"
15
+ onSelectionChange: "mp-datatable-selection-change",
16
+ onFetchRequest: "mp-datatable-fetch-request",
17
+ onRowExpand: "mp-datatable-row-expand",
18
+ onRowCollapse: "mp-datatable-row-collapse",
19
+ onExpandedIdsChange: "mp-datatable-expanded-ids-change"
16
20
  }
17
21
  });
18
22
  export {
@@ -1,14 +1,21 @@
1
1
  import { EventName } from '@lit/react';
2
- import { MpDatatable, RowEventDetail, SortChangeEventDetail, SelectionChangeEventDetail } from '@mintplayer/web-components/datatable';
2
+ import { MpDatatable, RowEventDetail, SortChangeEventDetail, SelectionChangeEventDetail, TreeFetchRequestDetail, TreeRowExpandDetail, TreeExpandedIdsChangeDetail } from '@mintplayer/web-components/datatable';
3
3
  /**
4
4
  * React wrapper for `<mp-datatable>`. Side-effect-registers the WC via
5
5
  * the import above. The `events` map surfaces each CustomEvent the WC
6
6
  * dispatches as an idiomatic React `on*` prop with full detail typing.
7
7
  *
8
- * Note: complex props like `columns` and `rows` are typed by the
9
- * MpDatatable class fields. Set them as JS objects via the spread/prop
10
- * APIs; @lit/react forwards them as properties (not attributes) so
11
- * arrays/functions/Maps round-trip correctly.
8
+ * Note: complex props like `columns`, `data`, `expandedIds`, `idKey`,
9
+ * and `childCountKey` are typed by the MpDatatable class fields. Set
10
+ * them as JS objects via the React props; @lit/react forwards them as
11
+ * properties (not attributes) so Sets/arrays/functions round-trip
12
+ * correctly.
13
+ *
14
+ * Tree-mode lazy fetch: the WC emits `mp-datatable-fetch-request` when
15
+ * it needs children for an expanded row (surfaced here as
16
+ * `onFetchRequest`). The consumer resolves the request and calls
17
+ * `setFetchResponse(parentId, response)` on the element ref to feed
18
+ * the children back into the WC's cache.
12
19
  */
13
20
  export declare const BsDatatable: import('@lit/react').ReactWebComponent<MpDatatable, {
14
21
  onPageChange: EventName<CustomEvent<{
@@ -22,4 +29,8 @@ export declare const BsDatatable: import('@lit/react').ReactWebComponent<MpDatat
22
29
  onRowDblClick: EventName<CustomEvent<RowEventDetail>>;
23
30
  onRowContextMenu: EventName<CustomEvent<RowEventDetail>>;
24
31
  onSelectionChange: EventName<CustomEvent<SelectionChangeEventDetail>>;
32
+ onFetchRequest: EventName<CustomEvent<TreeFetchRequestDetail>>;
33
+ onRowExpand: EventName<CustomEvent<TreeRowExpandDetail>>;
34
+ onRowCollapse: EventName<CustomEvent<TreeRowExpandDetail>>;
35
+ onExpandedIdsChange: EventName<CustomEvent<TreeExpandedIdsChangeDetail>>;
25
36
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/react-bootstrap",
3
- "version": "19.1.0",
3
+ "version": "19.2.0",
4
4
  "description": "React 19 wrappers around @mintplayer/web-components. Each sub-entry maps one-to-one with a WC sub-entry and exposes typed React components via @lit/react's createComponent.",
5
5
  "license": "MIT",
6
6
  "repository": {