@mintplayer/react-bootstrap 19.28.0 → 19.29.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.
Files changed (50) hide show
  1. package/accordion/index.mjs +1 -1
  2. package/calendar/index.mjs +1 -1
  3. package/carousel/index.mjs +1 -1
  4. package/charts/hierarchy/index.mjs +1 -1
  5. package/charts/sparkline/index.mjs +1 -1
  6. package/charts/trend/index.mjs +1 -1
  7. package/checkbox/index.mjs +1 -1
  8. package/chunks/{BsCheckbox-Bl9Ug6k4.mjs → BsCheckbox-BWU2Hrhf.mjs} +1 -1
  9. package/chunks/{BsDatatable.generated-JLTLAK_N.mjs → BsDatatable.generated-am6uNreO.mjs} +45 -37
  10. package/chunks/{BsDatetimePicker.generated-DI3dZWLN.mjs → BsDatetimePicker.generated-B4WBEiCo.mjs} +1 -1
  11. package/chunks/{BsRadio-C4oy_AGR.mjs → BsRadio-D1C6Aqjv.mjs} +1 -1
  12. package/chunks/{BsSplitterPanel.generated-C0d-JT2N.mjs → BsSplitterPanel.generated-C7r4Nedd.mjs} +1 -1
  13. package/chunks/{BsTreeview.generated-AIvwYLE2.mjs → BsTreeview.generated-djXBc8bl.mjs} +1 -1
  14. package/chunks/{react-props-D_6lU2Wh.mjs → react-props-C2O2_2V2.mjs} +5 -1
  15. package/code-snippet/index.mjs +1 -1
  16. package/datatable/index.mjs +1 -1
  17. package/datatable/src/generated/BsDatatable.generated.d.ts +10 -6
  18. package/datatable/src/index.d.ts +1 -1
  19. package/datepicker/index.mjs +1 -1
  20. package/datetime-picker/index.mjs +1 -1
  21. package/dock/index.mjs +2 -2
  22. package/dropdown-menu/index.mjs +1 -1
  23. package/file-manager/index.mjs +4 -4
  24. package/machine/index.mjs +61 -32
  25. package/machine/src/index.d.ts +1 -0
  26. package/machine/src/transfer-state.d.ts +31 -0
  27. package/multi-range/index.mjs +1 -1
  28. package/navbar/index.mjs +1 -1
  29. package/otp-input/index.mjs +1 -1
  30. package/package.json +2 -2
  31. package/pagination/index.mjs +1 -1
  32. package/phone-input/index.mjs +1 -1
  33. package/query-builder/index.mjs +1 -1
  34. package/radio/index.mjs +1 -1
  35. package/radio-group/index.mjs +2 -2
  36. package/ribbon/index.mjs +1 -1
  37. package/scheduler/index.mjs +2 -2
  38. package/select/index.mjs +1 -1
  39. package/shell/index.mjs +1 -1
  40. package/signature-pad/index.mjs +1 -1
  41. package/splitter/index.mjs +1 -1
  42. package/tab-control/index.mjs +1 -1
  43. package/theming/index.mjs +1 -1
  44. package/tile-manager/index.mjs +1 -1
  45. package/timeline/index.mjs +1 -1
  46. package/timepicker/index.mjs +1 -1
  47. package/toggle-button/index.mjs +1 -1
  48. package/tree-select/index.mjs +1 -1
  49. package/treeview/index.mjs +1 -1
  50. package/typeahead/index.mjs +1 -1
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import * as t from "react";
3
3
  import { createContext as n, forwardRef as r, useContext as i, useEffect as a, useId as o, useImperativeHandle as s, useRef as c } from "react";
4
4
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as t } from "../machine/index.mjs";
3
3
  import * as n from "react";
4
4
  import { forwardRef as r, useImperativeHandle as i, useRef as a } from "react";
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { Children as i, Fragment as a, forwardRef as o, isValidElement as s, useImperativeHandle as c, useRef as l } from "react";
@@ -1,4 +1,4 @@
1
- import { i as e, r as t } from "../../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "../../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { forwardRef as t, useEffect as n, useImperativeHandle as r, useRef as i, useState as a } from "react";
3
3
  import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";
4
4
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { i as e, r as t } from "../../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "../../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1 +1 @@
1
- export { t as BsCheckbox } from "../chunks/BsCheckbox-Bl9Ug6k4.mjs";
1
+ export { t as BsCheckbox } from "../chunks/BsCheckbox-BWU2Hrhf.mjs";
@@ -1,4 +1,4 @@
1
- import { r as e } from "./react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "./react-props-C2O2_2V2.mjs";
2
2
  import { forwardRef as t, useEffect as n, useId as r, useImperativeHandle as i, useRef as a, useState as o } from "react";
3
3
  import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
4
4
  import { checkboxClasses as u, connectCheckbox as d, effectiveIndeterminate as f } from "@mintplayer/ui-core/checkbox";
@@ -1,4 +1,4 @@
1
- import { i as e, n as t, r as n, t as r } from "./react-props-D_6lU2Wh.mjs";
1
+ import { i as e, n as t, r as n, t as r } from "./react-props-C2O2_2V2.mjs";
2
2
  import { useCore as i } from "../machine/index.mjs";
3
3
  import * as a from "react";
4
4
  import { forwardRef as o, useImperativeHandle as ee, useRef as s } from "react";
@@ -171,6 +171,11 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
171
171
  defaultValue: e.open.comparison.operandText
172
172
  })]
173
173
  }) }) : null,
174
+ e.open.comparison && e.open.comparison.applied ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("small", {
175
+ "data-mps": "datatable",
176
+ ...n(e.open.comparison.applied),
177
+ children: e.open.comparison.appliedText
178
+ }) }) : null,
174
179
  e.open.list ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("input", {
175
180
  "data-mps": "datatable",
176
181
  ...r(e.open.list.search),
@@ -387,11 +392,11 @@ var ne = [], h = [], g = [], _ = [
387
392
  10,
388
393
  20,
389
394
  50
390
- ], v = [], y = [], b = [], x = o(function({ columns: e = ne, data: t = h, fetch: n = null, caption: r = null, labels: a = null, inputLabel: o = null, sortColumns: l = g, page: d = 1, perPage: m = 20, perPageOptions: x = _, pagination: S = !1, autoSort: C = !0, selectionMode: w = "none", selectedIds: T = v, cutIds: E = y, focusedRowKey: D = null, rowLabel: O = null, rowKey: k = null, tree: A = !1, idKey: j = null, childCountKey: M = null, treeIndent: N = 1.25, expandedIds: P = b, selectionStrategy: F = "flat", loading: I = !1, emptyMessage: L = "No data", virtualScroll: R = !1, itemSize: re = 40, virtualBuffer: z = 10, fill: B = !1, resizableColumns: V = !0, hrefFor: H = null, distincts: U = null, onSortColumnsChange: W, onPageChange: G, onPerPageChange: K, onSelectedIdsChange: q, onExpandedIdsChange: J, onRowClick: Y, onRowDblClick: X, onRowContextMenu: ie, onSelectionChanged: ae, onRowExpand: oe, onRowCollapse: se, onLoadError: ce, onFilterChange: Z, header: le, cell: ue, row: de, filter: fe, className: pe, children: me, ...Q }, he) {
395
+ ], v = [], y = [], b = [], x = {}, S = o(function({ columns: e = ne, data: t = h, fetch: n = null, caption: r = null, labels: a = null, inputLabel: o = null, sortColumns: l = g, page: d = 1, perPage: m = 20, perPageOptions: S = _, pagination: C = !1, autoSort: w = !0, selectionMode: T = "none", selectedIds: E = v, cutIds: D = y, focusedRowKey: O = null, rowLabel: k = null, rowKey: A = null, tree: j = !1, idKey: M = null, childCountKey: N = null, treeIndent: P = 1.25, expandedIds: F = b, selectionStrategy: I = "flat", loading: L = !1, emptyMessage: R = "No data", virtualScroll: z = !1, itemSize: B = 40, virtualBuffer: V = 10, fill: H = !1, resizableColumns: re = !0, hrefFor: U = null, distincts: W = null, filters: G = x, fetchParams: K = null, stateKey: q = null, onSortColumnsChange: J, onPageChange: Y, onPerPageChange: X, onSelectedIdsChange: ie, onExpandedIdsChange: ae, onRowClick: oe, onRowDblClick: se, onRowContextMenu: ce, onSelectionChanged: le, onRowExpand: ue, onRowCollapse: de, onLoadError: fe, onFiltersChange: pe, header: me, cell: he, row: Z, filter: ge, className: _e, children: ve, ...Q }, ye) {
391
396
  c("datatable", p);
392
397
  let $ = s(null);
393
- ee(he, () => $.current);
394
- let ge = i(f, {
398
+ ee(ye, () => $.current);
399
+ let be = i(f, {
395
400
  columns: e,
396
401
  data: t,
397
402
  fetch: n,
@@ -401,51 +406,54 @@ var ne = [], h = [], g = [], _ = [
401
406
  sortColumns: l,
402
407
  page: d,
403
408
  perPage: m,
404
- perPageOptions: x,
405
- pagination: S,
406
- autoSort: C,
407
- selectionMode: w,
408
- selectedIds: T,
409
- cutIds: E,
410
- focusedRowKey: D,
411
- rowLabel: O,
412
- rowKey: k,
413
- tree: A,
414
- idKey: j,
415
- childCountKey: M,
416
- treeIndent: N,
417
- expandedIds: P,
418
- selectionStrategy: F,
419
- loading: I,
420
- emptyMessage: L,
421
- virtualScroll: R,
422
- itemSize: re,
423
- virtualBuffer: z,
424
- fill: B,
425
- resizableColumns: V,
426
- hrefFor: H,
427
- distincts: U
409
+ perPageOptions: S,
410
+ pagination: C,
411
+ autoSort: w,
412
+ selectionMode: T,
413
+ selectedIds: E,
414
+ cutIds: D,
415
+ focusedRowKey: O,
416
+ rowLabel: k,
417
+ rowKey: A,
418
+ tree: j,
419
+ idKey: M,
420
+ childCountKey: N,
421
+ treeIndent: P,
422
+ expandedIds: F,
423
+ selectionStrategy: I,
424
+ loading: L,
425
+ emptyMessage: R,
426
+ virtualScroll: z,
427
+ itemSize: B,
428
+ virtualBuffer: V,
429
+ fill: H,
430
+ resizableColumns: re,
431
+ hrefFor: U,
432
+ distincts: W,
433
+ filters: G,
434
+ fetchParams: K,
435
+ stateKey: q
428
436
  }, {
429
437
  idPrefix: "bs-datatable",
430
438
  label: Q["aria-label"],
431
439
  rootRef: $,
432
440
  emit: (e, t) => {
433
- e === "sortColumnsChange" && W?.(t), e === "pageChange" && G?.(t), e === "perPageChange" && K?.(t), e === "selectedIdsChange" && q?.(t), e === "expandedIdsChange" && J?.(t), e === "rowClick" && Y?.(t), e === "rowDblClick" && X?.(t), e === "rowContextMenu" && ie?.(t), e === "selectionChanged" && ae?.(t), e === "rowExpand" && oe?.(t), e === "rowCollapse" && se?.(t), e === "loadError" && ce?.(t), e === "filterChange" && Z?.(t);
441
+ e === "sortColumnsChange" && J?.(t), e === "pageChange" && Y?.(t), e === "perPageChange" && X?.(t), e === "selectedIdsChange" && ie?.(t), e === "expandedIdsChange" && ae?.(t), e === "rowClick" && oe?.(t), e === "rowDblClick" && se?.(t), e === "rowContextMenu" && ce?.(t), e === "selectionChanged" && le?.(t), e === "rowExpand" && ue?.(t), e === "rowCollapse" && de?.(t), e === "loadError" && fe?.(t), e === "filtersChange" && pe?.(t);
434
442
  }
435
443
  });
436
444
  return /* @__PURE__ */ u(te, {
437
- ...ge.props,
445
+ ...be.props,
438
446
  slots: {
439
- header: le,
440
- cell: ue,
441
- row: de,
442
- filter: fe
447
+ header: me,
448
+ cell: he,
449
+ row: Z,
450
+ filter: ge
443
451
  },
444
- className: pe,
452
+ className: _e,
445
453
  attrs: Q,
446
454
  rootRef: $,
447
- children: me
455
+ children: ve
448
456
  });
449
457
  });
450
458
  //#endregion
451
- export { x as t };
459
+ export { S as t };
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "./react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "./react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1,4 +1,4 @@
1
- import { r as e } from "./react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "./react-props-C2O2_2V2.mjs";
2
2
  import { createContext as t, forwardRef as n, useContext as r, useId as i, useState as a } from "react";
3
3
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
4
  import { connectRadio as l, radioClasses as u } from "@mintplayer/ui-core/radio";
@@ -1,4 +1,4 @@
1
- import { r as e } from "./react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "./react-props-C2O2_2V2.mjs";
2
2
  import { useCore as t } from "../machine/index.mjs";
3
3
  import { forwardRef as n, useImperativeHandle as r, useRef as i } from "react";
4
4
  import { installLightStyles as a } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { i as e, r as t } from "./react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "./react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -2,11 +2,15 @@
2
2
  var e = {
3
3
  autocomplete: "autoComplete",
4
4
  class: "className",
5
+ colspan: "colSpan",
5
6
  for: "htmlFor",
7
+ maxlength: "maxLength",
8
+ minlength: "minLength",
6
9
  popovertarget: "popoverTarget",
7
10
  popovertargetaction: "popoverTargetAction",
8
11
  tabindex: "tabIndex",
9
- readonly: "readOnly"
12
+ readonly: "readOnly",
13
+ rowspan: "rowSpan"
10
14
  };
11
15
  function t(t) {
12
16
  return Object.fromEntries(Object.entries(t).filter((e) => e[1] !== null).map(([t, n]) => [e[t] ?? t, n === !0 && t.includes("-") ? "" : n]));
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as t } from "../machine/index.mjs";
3
3
  import * as n from "react";
4
4
  import { forwardRef as r, useImperativeHandle as i, useRef as a } from "react";
@@ -1,3 +1,3 @@
1
- import { t as e } from "../chunks/BsDatatable.generated-JLTLAK_N.mjs";
1
+ import { t as e } from "../chunks/BsDatatable.generated-am6uNreO.mjs";
2
2
  import { DEFAULT_DATATABLE_LABELS as t, cellText as n, computeNextSort as r, sortRows as i } from "@mintplayer/ui-core/datatable";
3
3
  export { e as BsDatatable, t as DEFAULT_DATATABLE_LABELS, n as cellText, r as computeNextSort, i as sortRows };
@@ -1,7 +1,7 @@
1
- import { DatatableInputs, DatatableLoadErrorDetail, FilterChangeDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
1
+ import { DatatableFilters, DatatableInputs, DatatableLoadErrorDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
2
2
  import { DatatableTemplateProps } from './datatable.view.generated';
3
3
  import * as React from 'react';
4
- export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'columns' | 'data' | 'fetch' | 'caption' | 'labels' | 'inputLabel' | 'sortColumns' | 'page' | 'perPage' | 'perPageOptions' | 'pagination' | 'autoSort' | 'selectionMode' | 'selectedIds' | 'cutIds' | 'focusedRowKey' | 'rowLabel' | 'rowKey' | 'tree' | 'idKey' | 'childCountKey' | 'treeIndent' | 'expandedIds' | 'selectionStrategy' | 'loading' | 'emptyMessage' | 'virtualScroll' | 'itemSize' | 'virtualBuffer' | 'fill' | 'resizableColumns' | 'hrefFor' | 'distincts' | 'onSortColumnsChange' | 'onPageChange' | 'onPerPageChange' | 'onSelectedIdsChange' | 'onExpandedIdsChange' | 'onRowClick' | 'onRowDblClick' | 'onRowContextMenu' | 'onSelectionChanged' | 'onRowExpand' | 'onRowCollapse' | 'onLoadError' | 'onFilterChange' | 'header' | 'cell' | 'row' | 'filter'> {
4
+ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementTagNameMap['div']>, 'columns' | 'data' | 'fetch' | 'caption' | 'labels' | 'inputLabel' | 'sortColumns' | 'page' | 'perPage' | 'perPageOptions' | 'pagination' | 'autoSort' | 'selectionMode' | 'selectedIds' | 'cutIds' | 'focusedRowKey' | 'rowLabel' | 'rowKey' | 'tree' | 'idKey' | 'childCountKey' | 'treeIndent' | 'expandedIds' | 'selectionStrategy' | 'loading' | 'emptyMessage' | 'virtualScroll' | 'itemSize' | 'virtualBuffer' | 'fill' | 'resizableColumns' | 'hrefFor' | 'distincts' | 'filters' | 'fetchParams' | 'stateKey' | 'onSortColumnsChange' | 'onPageChange' | 'onPerPageChange' | 'onSelectedIdsChange' | 'onExpandedIdsChange' | 'onRowClick' | 'onRowDblClick' | 'onRowContextMenu' | 'onSelectionChanged' | 'onRowExpand' | 'onRowCollapse' | 'onLoadError' | 'onFiltersChange' | 'header' | 'cell' | 'row' | 'filter'> {
5
5
  columns?: DatatableInputs['columns'];
6
6
  data?: DatatableInputs['data'];
7
7
  fetch?: DatatableInputs['fetch'];
@@ -35,6 +35,9 @@ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementT
35
35
  resizableColumns?: DatatableInputs['resizableColumns'];
36
36
  hrefFor?: DatatableInputs['hrefFor'];
37
37
  distincts?: DatatableInputs['distincts'];
38
+ filters?: DatatableInputs['filters'];
39
+ fetchParams?: DatatableInputs['fetchParams'];
40
+ stateKey?: DatatableInputs['stateKey'];
38
41
  /** The sort, after the user changed it. */
39
42
  onSortColumnsChange?: (detail: SortColumn[]) => void;
40
43
  /** The page, after the user changed it. */
@@ -59,8 +62,8 @@ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementT
59
62
  onRowCollapse?: (detail: TreeRowExpandDetail) => void;
60
63
  /** A `fetch` call rejected. */
61
64
  onLoadError?: (detail: DatatableLoadErrorDetail) => void;
62
- /** A column's filter changed; the consumer decides which rows it removes. */
63
- onFilterChange?: (detail: FilterChangeDetail) => void;
65
+ /** The column filters, after the user changed them; `fetch` (or the consumer, over `data`) applies them. */
66
+ onFiltersChange?: (detail: DatatableFilters) => void;
64
67
  header?: NonNullable<DatatableTemplateProps['slots']>['header'];
65
68
  cell?: NonNullable<DatatableTemplateProps['slots']>['cell'];
66
69
  row?: NonNullable<DatatableTemplateProps['slots']>['row'];
@@ -73,7 +76,8 @@ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementT
73
76
  *
74
77
  * Columns are data (`DatatableColumnDef`). Slots: `header {column}` (a header label),
75
78
  * `cell {row, column, rowIndex}` (one cell) and `row {row, rowIndex, ctx}` (all of a
76
- * row's data cells) and `filter {column, ctx}` (the panel of a column with `filterMode: 'custom'`). Two-way: `sortColumns`, `page`, `perPage`, `selectedIds`, `expandedIds`.
77
- * An `aria-label` names the table.
79
+ * row's data cells) and `filter {column, ctx}` (the panel of a column with `filterMode: 'custom'`). Two-way: `sortColumns`, `page`, `perPage`, `selectedIds`, `expandedIds`, `filters`.
80
+ * An `aria-label` names the table. With `fetch`, filters are applied server-side; `stateKey` prefetches
81
+ * the first page during SSR and hands it to the client (#448).
78
82
  */
79
83
  export declare const BsDatatable: React.ForwardRefExoticComponent<BsDatatableProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,3 +1,3 @@
1
1
  export * from './generated';
2
2
  export { DEFAULT_DATATABLE_LABELS, cellText, computeNextSort, sortRows } from '@mintplayer/ui-core/datatable';
3
- export type { ComparisonFilterChangeDetail, DatatableColumnDef, DatatableDistincts, DatatableFetch, DatatableFetchRequest, DatatableFetchResponse, DatatableHrefFor, DatatableHrefState, DatatableLabels, DatatableLoadErrorDetail, DatatableReloadOptions, DatatableSelectionMode, DistinctValue, DistinctValues, DistinctsRequest, FilterChangeDetail, FilterContext, FilterInputType, FilterMode, FilterOperator, FilterSelection, RowEventDetail, RowKey, RowRenderContext, SelectionChangeEventDetail, SortColumn, SortDirection, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, ValuesFilterChangeDetail, } from '@mintplayer/ui-core/datatable';
3
+ export type { DatatableFilter, DatatableColumnDef, DatatableDistincts, DatatableFetch, DatatableFetchRequest, DatatableFetchResponse, DatatableHrefFor, DatatableHrefState, DatatableLabels, DatatableLoadErrorDetail, DatatableReloadOptions, DatatableSelectionMode, DistinctValue, DistinctValues, DistinctsRequest, DatatableFilters, FilterContext, FilterInputType, FilterMode, FilterOperator, FilterSelection, RowEventDetail, RowKey, RowRenderContext, SelectionChangeEventDetail, SortColumn, SortDirection, TreeIdKey, TreeRowExpandDetail, TreeSelectionStrategy, } from '@mintplayer/ui-core/datatable';
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1 +1 @@
1
- export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-DI3dZWLN.mjs";
1
+ export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-B4WBEiCo.mjs";
package/dock/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { i as e, r as t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
- import { n as r, t as i } from "../chunks/BsSplitterPanel.generated-C0d-JT2N.mjs";
3
+ import { n as r, t as i } from "../chunks/BsSplitterPanel.generated-C7r4Nedd.mjs";
4
4
  import * as a from "react";
5
5
  import { forwardRef as o, useImperativeHandle as s, useRef as c } from "react";
6
6
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import * as t from "react";
3
3
  import { forwardRef as n, useEffect as r, useImperativeHandle as i, useRef as a, useState as o } from "react";
4
4
  import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
@@ -1,8 +1,8 @@
1
- import { i as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
- import { t as i } from "../chunks/BsDatatable.generated-JLTLAK_N.mjs";
4
- import { n as a, t as o } from "../chunks/BsSplitterPanel.generated-C0d-JT2N.mjs";
5
- import { t as s } from "../chunks/BsTreeview.generated-AIvwYLE2.mjs";
3
+ import { t as i } from "../chunks/BsDatatable.generated-am6uNreO.mjs";
4
+ import { n as a, t as o } from "../chunks/BsSplitterPanel.generated-C7r4Nedd.mjs";
5
+ import { t as s } from "../chunks/BsTreeview.generated-djXBc8bl.mjs";
6
6
  import * as c from "react";
7
7
  import { forwardRef as l, useImperativeHandle as u, useRef as d } from "react";
8
8
  import { installLightStyles as f } from "@mintplayer/ui-core/scoped-styles";
package/machine/index.mjs CHANGED
@@ -1,65 +1,94 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { n as i, t as a } from "../chunks/useMachine-CpK1VckL.mjs";
3
- import { Children as o, createContext as s, isValidElement as c, useContext as l, useEffect as u, useId as d, useRef as f, useState as p } from "react";
4
- import { coreRuntime as m, sameContent as h } from "@mintplayer/ui-core/component";
3
+ import { Children as o, createContext as s, isValidElement as c, use as l, useContext as u, useEffect as d, useId as f, useRef as p, useState as m } from "react";
4
+ import { jsx as h } from "react/jsx-runtime";
5
+ import { coreRuntime as g, sameContent as _ } from "@mintplayer/ui-core/component";
6
+ import { DEFAULT_PREFETCH_TIMEOUT as v, readTransferState as y, runPrefetch as b } from "@mintplayer/ui-core/transfer-state";
7
+ //#region libs/mintplayer-react-bootstrap/machine/src/transfer-state.tsx
8
+ var x = s(null);
9
+ function S({ store: e, server: t, prefetchTimeout: n, children: r }) {
10
+ let [i] = m(() => ({
11
+ store: e ?? y(),
12
+ server: t ?? typeof window > "u",
13
+ prefetchTimeout: n ?? v,
14
+ pending: /* @__PURE__ */ new Map()
15
+ }));
16
+ return /* @__PURE__ */ h(x.Provider, {
17
+ value: i,
18
+ children: r
19
+ });
20
+ }
21
+ //#endregion
5
22
  //#region libs/mintplayer-react-bootstrap/machine/src/core.ts
6
- var g = /* @__PURE__ */ new WeakMap(), _ = s(void 0);
7
- function v(e) {
8
- let t = g.get(e);
9
- return t || (t = s(e.defaultValue), t.displayName = e.name, g.set(e, t)), t;
23
+ var C = /* @__PURE__ */ new WeakMap(), w = s(void 0);
24
+ function T(e) {
25
+ let t = C.get(e);
26
+ return t || (t = s(e.defaultValue), t.displayName = e.name, C.set(e, t)), t;
10
27
  }
11
- function y(e, t, n) {
12
- let r = `${n.idPrefix}-${d().replace(/[^a-zA-Z0-9_-]/g, "")}`, i = l(e.consume ? v(e.consume) : _), [a, o] = p(!1), [s, c] = p(() => e.state ? e.state(t) : {}), h = f({
28
+ function E(e, t, n) {
29
+ let r = `${n.idPrefix}-${f().replace(/[^a-zA-Z0-9_-]/g, "")}`, i = u(e.consume ? T(e.consume) : w), [a, o] = m(!1), s = u(x), [c] = m(() => s && e.transferKey ? e.transferKey(t) : void 0), h;
30
+ if (s && c) {
31
+ if (!s.server) h = s.store.get(c);
32
+ else if (e.prefetch) {
33
+ let n = s.pending.get(c);
34
+ n || (n = b(e, t, { timeout: s.prefetchTimeout }).then((e) => (e && s.store.set(e.key, e.seed), e)), s.pending.set(c, n)), h = l(n)?.seed;
35
+ }
36
+ }
37
+ let [_, v] = m(() => e.state ? e.state(t, h) : {});
38
+ d(() => {
39
+ s && c && !s.server && s.store.remove(c);
40
+ }, [s, c]);
41
+ let y = p({
13
42
  inputs: t,
14
- state: s,
43
+ state: _,
15
44
  emit: n.emit
16
45
  });
17
- h.current = {
46
+ y.current = {
18
47
  inputs: t,
19
- state: s,
48
+ state: _,
20
49
  emit: n.emit
21
50
  };
22
- let [g] = p(() => m(e, {
23
- inputs: () => h.current.inputs,
24
- state: () => h.current.state,
51
+ let [S] = m(() => g(e, {
52
+ inputs: () => y.current.inputs,
53
+ state: () => y.current.state,
25
54
  setState: (e) => {
26
- h.current.state = e, c(e);
55
+ y.current.state = e, v(e);
27
56
  },
28
- emit: (e, t) => h.current.emit(e, t)
29
- })), y = n.rootRef;
30
- u(() => (o(!0), y.current && g.attachTo(y.current), () => g.dispose()), [g, y]), u(() => g.inputs(t));
31
- let b = {
57
+ emit: (e, t) => y.current.emit(e, t)
58
+ })), C = n.rootRef;
59
+ d(() => (o(!0), C.current && S.attachTo(C.current), () => S.dispose()), [S, C]), d(() => S.inputs(t));
60
+ let E = {
32
61
  inputs: t,
33
- state: s,
62
+ state: _,
34
63
  id: r,
35
64
  hydrated: a,
36
65
  context: i ?? e.consume?.defaultValue,
37
66
  label: n.label ?? null,
38
- api: () => g.api
67
+ api: () => S.api
39
68
  };
40
69
  return {
41
- props: e.view(b),
42
- provided: e.provide?.(b),
43
- call: (e, t) => g.call(e, t)
70
+ props: e.view(E),
71
+ provided: e.provide?.(E),
72
+ call: (e, t) => S.call(e, t)
44
73
  };
45
74
  }
46
75
  //#endregion
47
76
  //#region libs/mintplayer-react-bootstrap/machine/src/content.ts
48
- function b(e, t, n, r) {
77
+ function D(e, t, n, r) {
49
78
  o.forEach(e, (e) => {
50
79
  if (!c(e)) return;
51
80
  let { children: i, ref: a, ...o } = e.props;
52
81
  e.type === t.type ? r.push({
53
82
  inputs: o,
54
83
  within: n
55
- }) : b(i, t, t.within !== void 0 && e.type === t.within ? o : n, r);
84
+ }) : D(i, t, t.within !== void 0 && e.type === t.within ? o : n, r);
56
85
  });
57
86
  }
58
- function x(e, t) {
87
+ function O(e, t) {
59
88
  let n = [];
60
- b(e, t, null, n);
61
- let r = f(n);
62
- return h(r.current, n) || (r.current = n), r.current;
89
+ D(e, t, null, n);
90
+ let r = p(n);
91
+ return _(r.current, n) || (r.current = n), r.current;
63
92
  }
64
93
  //#endregion
65
- export { v as reactCoreContext, r as reactFormProps, t as reactOptionProps, n as reactProps, e as reactStyle, x as useContent, y as useCore, a as useMachine, i as useSnapshot };
94
+ export { x as MpSsr, S as MpTransferStateProvider, T as reactCoreContext, r as reactFormProps, t as reactOptionProps, n as reactProps, e as reactStyle, O as useContent, E as useCore, a as useMachine, i as useSnapshot };
@@ -2,3 +2,4 @@ export * from './useMachine';
2
2
  export * from './react-props';
3
3
  export * from './core';
4
4
  export * from './content';
5
+ export * from './transfer-state';
@@ -0,0 +1,31 @@
1
+ import { ReactNode } from 'react';
2
+ import { PrefetchResult, TransferStore } from '@mintplayer/ui-core/transfer-state';
3
+ /** What `useCore` reads to prefetch on the server and seed on the client (#448). */
4
+ export interface MpSsrContext {
5
+ readonly store: TransferStore;
6
+ readonly server: boolean;
7
+ readonly prefetchTimeout: number;
8
+ /** Server only: one prefetch per key per request, shared by every render attempt of the suspended component. */
9
+ readonly pending: Map<string, Promise<PrefetchResult | null>>;
10
+ }
11
+ export declare const MpSsr: import('react').Context<MpSsrContext | null>;
12
+ export interface MpTransferStateProviderProps {
13
+ /**
14
+ * Server: a fresh store per request; after the render, write
15
+ * `serializeTransferState(store)` into the page head. Client: omit it, and
16
+ * the provider reads the server's `#mp-state` script once.
17
+ */
18
+ readonly store?: TransferStore;
19
+ /** Default: whether `window` is undefined. */
20
+ readonly server?: boolean;
21
+ /** How long the server waits for one component's prefetch, ms (#448 D6). Default 3000. */
22
+ readonly prefetchTimeout?: number;
23
+ readonly children?: ReactNode;
24
+ }
25
+ /**
26
+ * Turns on server prefetching and the hand-over to the client for the fronts
27
+ * under it (a `fetch` datatable with a `stateKey`). On the server, render with
28
+ * `renderToPipeableStream` and pipe in `onAllReady`: a prefetching front
29
+ * suspends until its data is in.
30
+ */
31
+ export declare function MpTransferStateProvider({ store, server, prefetchTimeout, children }: MpTransferStateProviderProps): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { i as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
3
  import * as i from "react";
4
4
  import { forwardRef as a, useImperativeHandle as o, useRef as s } from "react";
package/navbar/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { reactCoreContext as n, useCore as r } from "../machine/index.mjs";
3
3
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
4
4
  import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mintplayer/react-bootstrap",
3
- "version": "19.28.0",
3
+ "version": "19.29.0",
4
4
  "description": "React 19 Bootstrap components. Each sub-entry renders its own JSX over a framework-neutral core from @mintplayer/ui-core, so it server-renders real HTML and defines no custom elements.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -188,7 +188,7 @@
188
188
  }
189
189
  },
190
190
  "peerDependencies": {
191
- "@mintplayer/ui-core": "^1.2.0",
191
+ "@mintplayer/ui-core": "^1.3.0",
192
192
  "react": "^19.0.0",
193
193
  "react-dom": "^19.0.0"
194
194
  },
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { forwardRef as t, useState as n } from "react";
3
3
  import { jsx as r } from "react/jsx-runtime";
4
4
  import { connectPagination as i, isPlainClick as a } from "@mintplayer/ui-core/pagination";
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { n as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
3
  import * as i from "react";
4
4
  import { forwardRef as a, useImperativeHandle as o, useRef as s } from "react";
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { n as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
3
  import * as i from "react";
4
4
  import { forwardRef as a, useImperativeHandle as o, useRef as s } from "react";
package/radio/index.mjs CHANGED
@@ -1 +1 @@
1
- export { t as BsRadio } from "../chunks/BsRadio-C4oy_AGR.mjs";
1
+ export { t as BsRadio } from "../chunks/BsRadio-D1C6Aqjv.mjs";
@@ -1,5 +1,5 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
2
- import { n as t } from "../chunks/BsRadio-C4oy_AGR.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
+ import { n as t } from "../chunks/BsRadio-D1C6Aqjv.mjs";
3
3
  import { forwardRef as n, useId as r, useMemo as i } from "react";
4
4
  import { jsx as a } from "react/jsx-runtime";
5
5
  import { connectRadioGroup as o, radioGroupName as s } from "@mintplayer/ui-core/radio";
package/ribbon/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as e, n as t, r as n, t as r } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, n as t, r as n, t as r } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { reactCoreContext as i, useContent as a, useCore as o } from "../machine/index.mjs";
3
3
  import * as s from "react";
4
4
  import { forwardRef as c, useImperativeHandle as l, useRef as u } from "react";
@@ -1,6 +1,6 @@
1
- import { i as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
- import { t as i } from "../chunks/BsDatetimePicker.generated-DI3dZWLN.mjs";
3
+ import { t as i } from "../chunks/BsDatetimePicker.generated-B4WBEiCo.mjs";
4
4
  import * as a from "react";
5
5
  import { forwardRef as o, useImperativeHandle as s, useRef as c } from "react";
6
6
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
package/select/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { n as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
3
  import * as i from "react";
4
4
  import { forwardRef as a, useImperativeHandle as o, useRef as s } from "react";
package/shell/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { forwardRef as t, useEffect as n, useId as r, useImperativeHandle as i, useRef as a } from "react";
3
3
  import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";
4
4
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import { forwardRef as r, useImperativeHandle as i, useRef as a } from "react";
4
4
  import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";
@@ -1 +1 @@
1
- export { n as BsSplitter, t as BsSplitterPanel } from "../chunks/BsSplitterPanel.generated-C0d-JT2N.mjs";
1
+ export { n as BsSplitter, t as BsSplitterPanel } from "../chunks/BsSplitterPanel.generated-C7r4Nedd.mjs";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import * as t from "react";
3
3
  import { forwardRef as n, useEffect as r, useId as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
4
4
  import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
package/theming/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as t } from "../machine/index.mjs";
3
3
  import { forwardRef as n, useImperativeHandle as r, useMemo as i, useRef as a, useSyncExternalStore as o } from "react";
4
4
  import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { i as e, r as t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { t as n } from "../chunks/useMachine-CpK1VckL.mjs";
3
3
  import { useEffect as r, useId as i, useImperativeHandle as a, useLayoutEffect as o, useMemo as s, useRef as c } from "react";
4
4
  import { installLightStyles as l } from "@mintplayer/ui-core/scoped-styles";
@@ -1,4 +1,4 @@
1
- import { i as e, r as t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1,4 +1,4 @@
1
- import { r as e, t } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e, t } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as n } from "../machine/index.mjs";
3
3
  import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../chunks/BsCheckbox-Bl9Ug6k4.mjs";
1
+ import { t as e } from "../chunks/BsCheckbox-BWU2Hrhf.mjs";
2
2
  import { forwardRef as t } from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
4
  //#region libs/mintplayer-react-bootstrap/toggle-button/src/BsToggleButton.tsx
@@ -1,4 +1,4 @@
1
- import { i as e, r as t, t as n } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { i as e, r as t, t as n } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { useCore as r } from "../machine/index.mjs";
3
3
  import * as i from "react";
4
4
  import { forwardRef as a, useImperativeHandle as o, useRef as s } from "react";
@@ -1 +1 @@
1
- export { t as BsTreeview } from "../chunks/BsTreeview.generated-AIvwYLE2.mjs";
1
+ export { t as BsTreeview } from "../chunks/BsTreeview.generated-djXBc8bl.mjs";
@@ -1,4 +1,4 @@
1
- import { r as e } from "../chunks/react-props-D_6lU2Wh.mjs";
1
+ import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
2
  import { t } from "../chunks/useMachine-CpK1VckL.mjs";
3
3
  import { useEffect as n, useId as r, useRef as i, useState as a } from "react";
4
4
  import { installLightStyles as o } from "@mintplayer/ui-core/scoped-styles";