@mintplayer/react-bootstrap 19.18.0 → 19.20.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/README.md CHANGED
@@ -5,3 +5,18 @@ This library was generated with [Nx](https://nx.dev).
5
5
  ## Running unit tests
6
6
 
7
7
  Run `nx test mintplayer-react-bootstrap` to execute the unit tests via [Vitest](https://vitest.dev/).
8
+
9
+ ## Styling and encapsulation
10
+
11
+ Most components keep a shadow root and take your content through native slots, so your stylesheets
12
+ reach that content normally.
13
+
14
+ ``BsDatatable`, `BsTreeview`, `BsTreeSelect` and `BsQueryBuilder`` mount DOM you author (row / node templates, cell renderers,
15
+ editor factories) and therefore render in the **light DOM**, with their own CSS scoped at build time
16
+ onto a `data-mps` attribute — the same device Angular uses for `_ngcontent`. Your styles and
17
+ Bootstrap's utilities reach anything you render into them; in exchange, page CSS also reaches their
18
+ internals, exactly as emulated encapsulation behaves elsewhere. `::part()` and `::slotted()` no
19
+ longer address them.
20
+
21
+ See **Styling and encapsulation** in the [workspace README](../../README.md) for the full contract
22
+ and the migration table.
@@ -15,7 +15,10 @@ const l = e({
15
15
  onSelectionChange: "mp-datatable-selection-change",
16
16
  onRowExpand: "mp-datatable-row-expand",
17
17
  onRowCollapse: "mp-datatable-row-collapse",
18
- onExpandedIdsChange: "mp-datatable-expanded-ids-change"
18
+ onExpandedIdsChange: "mp-datatable-expanded-ids-change",
19
+ onFilterOpen: "mp-datatable-filter-open",
20
+ onFilterClose: "mp-datatable-filter-close",
21
+ onFilterChange: "mp-datatable-filter-change"
19
22
  }
20
23
  });
21
24
  export {
@@ -1,5 +1,5 @@
1
1
  import { EventName } from '@lit/react';
2
- import { MpDatatable, RowEventDetail, SortChangeEventDetail, SelectionChangeEventDetail, TreeRowExpandDetail, TreeExpandedIdsChangeDetail } from '@mintplayer/web-components/datatable';
2
+ import { MpDatatable, RowEventDetail, SortChangeEventDetail, SelectionChangeEventDetail, TreeRowExpandDetail, TreeExpandedIdsChangeDetail, FilterChangeDetail } 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
@@ -17,6 +17,14 @@ import { MpDatatable, RowEventDetail, SortChangeEventDetail, SelectionChangeEven
17
17
  * on-demand windows, tree children, pagination, sort/perPage reloads. The
18
18
  * consumer wires nothing else (no `totalRecords`, no event bridge). Selected
19
19
  * row objects arrive on `onSelectionChange`'s `detail.selectedRows`.
20
+ *
21
+ * Filtering: mark a column `filterable` and it gets the built-in panel — search,
22
+ * include/exclude, checkbox list, clear — with no wrapper code, because the
23
+ * panel lives in the web component. `distincts` supplies the value lists when
24
+ * the element does not hold every row; `onFilterChange` reports the selection,
25
+ * which the consumer applies. A column's `filterRenderer` replaces the panel
26
+ * entirely, and must return a STABLE node: it is mounted once per open, and
27
+ * repainting it is the renderer's job via `context.onChange`.
20
28
  */
21
29
  export declare const BsDatatable: import('@lit/react').ReactWebComponent<MpDatatable, {
22
30
  onPageChange: EventName<CustomEvent<{
@@ -33,4 +41,11 @@ export declare const BsDatatable: import('@lit/react').ReactWebComponent<MpDatat
33
41
  onRowExpand: EventName<CustomEvent<TreeRowExpandDetail>>;
34
42
  onRowCollapse: EventName<CustomEvent<TreeRowExpandDetail>>;
35
43
  onExpandedIdsChange: EventName<CustomEvent<TreeExpandedIdsChangeDetail>>;
44
+ onFilterOpen: EventName<CustomEvent<{
45
+ column: string;
46
+ }>>;
47
+ onFilterClose: EventName<CustomEvent<{
48
+ column: string;
49
+ }>>;
50
+ onFilterChange: EventName<CustomEvent<FilterChangeDetail>>;
36
51
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/react-bootstrap",
3
- "version": "19.18.0",
3
+ "version": "19.20.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": {