@mintplayer/react-bootstrap 19.29.0 → 19.31.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 (57) hide show
  1. package/README.md +12 -11
  2. package/accordion/index.mjs +48 -46
  3. package/card/index.mjs +90 -76
  4. package/card/src/BsCard.d.ts +1 -1
  5. package/card/src/BsCardBody.d.ts +1 -1
  6. package/card/src/BsCardFooter.d.ts +1 -1
  7. package/card/src/BsCardLink.d.ts +1 -1
  8. package/card/src/BsCardSubtitle.d.ts +2 -2
  9. package/card/src/BsCardText.d.ts +1 -1
  10. package/card/src/BsCardTitle.d.ts +1 -1
  11. package/carousel/index.mjs +26 -25
  12. package/checkbox/index.mjs +1 -1
  13. package/chunks/BsCheckbox-BZkPJ13E.mjs +66 -0
  14. package/chunks/{BsDatatable.generated-am6uNreO.mjs → BsDatatable.generated-DqNW60JA.mjs} +54 -52
  15. package/chunks/{BsDatetimePicker.generated-B4WBEiCo.mjs → BsDatetimePicker.generated-CxaiRt79.mjs} +32 -31
  16. package/chunks/BsRadio-Bw_MhAOq.mjs +57 -0
  17. package/datatable/index.mjs +1 -1
  18. package/datatable/src/generated/BsDatatable.generated.d.ts +4 -2
  19. package/datepicker/index.mjs +28 -27
  20. package/datetime-picker/index.mjs +1 -1
  21. package/dropdown-menu/index.mjs +43 -38
  22. package/file-manager/index.mjs +21 -20
  23. package/input-group/index.mjs +17 -15
  24. package/machine/index.mjs +48 -39
  25. package/machine/src/index.d.ts +1 -0
  26. package/machine/src/mark-links.d.ts +8 -0
  27. package/nav/index.mjs +85 -0
  28. package/nav/src/generated/BsNav.generated.d.ts +15 -0
  29. package/nav/src/generated/BsNavItem.generated.d.ts +6 -0
  30. package/nav/src/generated/index.d.ts +2 -0
  31. package/nav/src/generated/nav-item.view.generated.d.ts +14 -0
  32. package/nav/src/generated/nav.view.generated.d.ts +14 -0
  33. package/nav/src/index.d.ts +1 -0
  34. package/nav/src/nav-item.react.d.ts +4 -0
  35. package/navbar/index.mjs +87 -77
  36. package/navbar/src/navbar-item.react.d.ts +4 -0
  37. package/otp-input/index.mjs +24 -23
  38. package/package.json +10 -2
  39. package/pagination/index.mjs +37 -27
  40. package/phone-input/index.mjs +26 -25
  41. package/query-builder/index.mjs +30 -28
  42. package/radio/index.mjs +1 -1
  43. package/radio-group/index.mjs +1 -1
  44. package/scheduler/index.mjs +42 -41
  45. package/select/index.mjs +27 -26
  46. package/signature-pad/index.mjs +23 -22
  47. package/spinner/index.mjs +50 -0
  48. package/spinner/src/generated/BsSpinner.generated.d.ts +11 -0
  49. package/spinner/src/generated/index.d.ts +1 -0
  50. package/spinner/src/generated/spinner.view.generated.d.ts +15 -0
  51. package/spinner/src/index.d.ts +1 -0
  52. package/tab-control/index.mjs +56 -54
  53. package/timepicker/index.mjs +42 -41
  54. package/toggle-button/index.mjs +1 -1
  55. package/typeahead/index.mjs +90 -87
  56. package/chunks/BsCheckbox-BWU2Hrhf.mjs +0 -57
  57. package/chunks/BsRadio-D1C6Aqjv.mjs +0 -48
@@ -4,12 +4,14 @@ import * as a from "react";
4
4
  import { forwardRef as o, useImperativeHandle as ee, useRef as s } from "react";
5
5
  import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
6
6
  import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
7
- import { datatableCore as f, datatableScopedStyles as p } from "@mintplayer/ui-core/datatable";
7
+ import { bootstrapForms as f } from "@mintplayer/ui-core/bootstrap/forms";
8
+ import { datatableCore as te, datatableScopedStyles as p } from "@mintplayer/ui-core/datatable";
9
+ import { bootstrapPagination as m } from "@mintplayer/ui-core/bootstrap/pagination";
8
10
  //#region libs/mintplayer-react-bootstrap/datatable/src/generated/datatable.view.generated.tsx
9
- function m(e, t) {
11
+ function h(e, t) {
10
12
  return typeof e == "function" ? e(t) : e;
11
13
  }
12
- function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, rootRef: f }) {
14
+ function ne({ view: i, slots: o = {}, children: ee, className: s, attrs: c, rootRef: f }) {
13
15
  return /* @__PURE__ */ u(l, { children: /* @__PURE__ */ d("div", {
14
16
  "data-mps": "datatable",
15
17
  ...n(i.root),
@@ -72,7 +74,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
72
74
  children: [/* @__PURE__ */ u("span", {
73
75
  "data-mps": "datatable",
74
76
  ...n(t.text),
75
- children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : m(o.header, { column: t.column })
77
+ children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
76
78
  }), t.sortIndex ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
77
79
  "data-mps": "datatable",
78
80
  ...n(t.sortIndex),
@@ -84,7 +86,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
84
86
  children: [/* @__PURE__ */ u("span", {
85
87
  "data-mps": "datatable",
86
88
  ...n(t.text),
87
- children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : m(o.header, { column: t.column })
89
+ children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
88
90
  }), t.sortIndex ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
89
91
  "data-mps": "datatable",
90
92
  ...n(t.sortIndex),
@@ -96,7 +98,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
96
98
  children: /* @__PURE__ */ u("span", {
97
99
  "data-mps": "datatable",
98
100
  ...n(t.text),
99
- children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : m(o.header, { column: t.column })
101
+ children: o.header === void 0 ? /* @__PURE__ */ u(l, { children: t.label }) : h(o.header, { column: t.column })
100
102
  })
101
103
  }) }), t.resize ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("span", {
102
104
  "data-mps": "datatable",
@@ -140,7 +142,7 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
140
142
  children: e.open && e.open.custom ? /* @__PURE__ */ u(l, { children: /* @__PURE__ */ u("div", {
141
143
  "data-mps": "datatable",
142
144
  ...n(e.open.body),
143
- children: o.filter === void 0 ? null : m(o.filter, {
145
+ children: o.filter === void 0 ? null : h(o.filter, {
144
146
  column: e.open.column,
145
147
  ctx: e.open.ctx
146
148
  })
@@ -282,12 +284,12 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
282
284
  }) }) : /* @__PURE__ */ u(l, { children: o.row === void 0 ? /* @__PURE__ */ u(l, { children: t.cells.map((e, r) => /* @__PURE__ */ u(a.Fragment, { children: /* @__PURE__ */ u("td", {
283
285
  "data-mps": "datatable",
284
286
  ...n(e.td),
285
- children: o.cell === void 0 ? /* @__PURE__ */ u(l, { children: e.text }) : m(o.cell, {
287
+ children: o.cell === void 0 ? /* @__PURE__ */ u(l, { children: e.text }) : h(o.cell, {
286
288
  row: t.row,
287
289
  column: e.column,
288
290
  rowIndex: t.rowIndex
289
291
  })
290
- }) }, e.key)) }) : m(o.row, {
292
+ }) }, e.key)) }) : h(o.row, {
291
293
  row: t.row,
292
294
  rowIndex: t.rowIndex,
293
295
  ctx: t.ctx
@@ -388,15 +390,15 @@ function te({ view: i, slots: o = {}, children: ee, className: s, attrs: c, root
388
390
  }
389
391
  //#endregion
390
392
  //#region libs/mintplayer-react-bootstrap/datatable/src/generated/BsDatatable.generated.tsx
391
- var ne = [], h = [], g = [], _ = [
393
+ var g = [], _ = [], v = [], y = [
392
394
  10,
393
395
  20,
394
396
  50
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) {
396
- c("datatable", p);
397
+ ], b = [], x = [], S = [], C = {}, w = o(function({ columns: e = g, data: t = _, fetch: n = null, caption: r = null, labels: a = null, inputLabel: o = null, sortColumns: l = v, page: d = 1, perPage: h = 20, perPageOptions: w = y, pagination: T = !1, autoSort: E = !0, selectionMode: D = "none", selectedIds: O = b, cutIds: k = x, focusedRowKey: A = null, rowLabel: j = null, rowKey: M = null, tree: N = !1, idKey: P = null, childCountKey: F = null, treeIndent: I = 1.25, expandedIds: L = S, selectionStrategy: R = "flat", loading: z = !1, emptyMessage: B = "No data", virtualScroll: V = !1, itemSize: H = 40, virtualBuffer: U = 10, fill: re = !1, resizableColumns: W = !0, hrefFor: G = null, distincts: K = null, filters: q = C, fetchParams: J = null, stateKey: Y = null, onSortColumnsChange: X, onPageChange: ie, onPerPageChange: ae, onSelectedIdsChange: oe, onExpandedIdsChange: se, onRowClick: ce, onRowDblClick: le, onRowContextMenu: ue, onSelectionChanged: de, onRowExpand: fe, onRowCollapse: pe, onLoadError: me, onPageLoad: he, onFiltersChange: Z, header: ge, cell: _e, row: ve, filter: ye, className: be, children: xe, ...Q }, Se) {
398
+ c(f.key, f.css, { order: f.order }), c(m.key, m.css, { order: m.order }), c("datatable", p);
397
399
  let $ = s(null);
398
- ee(ye, () => $.current);
399
- let be = i(f, {
400
+ ee(Se, () => $.current);
401
+ let Ce = i(te, {
400
402
  columns: e,
401
403
  data: t,
402
404
  fetch: n,
@@ -405,55 +407,55 @@ var ne = [], h = [], g = [], _ = [
405
407
  inputLabel: o,
406
408
  sortColumns: l,
407
409
  page: d,
408
- perPage: m,
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
410
+ perPage: h,
411
+ perPageOptions: w,
412
+ pagination: T,
413
+ autoSort: E,
414
+ selectionMode: D,
415
+ selectedIds: O,
416
+ cutIds: k,
417
+ focusedRowKey: A,
418
+ rowLabel: j,
419
+ rowKey: M,
420
+ tree: N,
421
+ idKey: P,
422
+ childCountKey: F,
423
+ treeIndent: I,
424
+ expandedIds: L,
425
+ selectionStrategy: R,
426
+ loading: z,
427
+ emptyMessage: B,
428
+ virtualScroll: V,
429
+ itemSize: H,
430
+ virtualBuffer: U,
431
+ fill: re,
432
+ resizableColumns: W,
433
+ hrefFor: G,
434
+ distincts: K,
435
+ filters: q,
436
+ fetchParams: J,
437
+ stateKey: Y
436
438
  }, {
437
439
  idPrefix: "bs-datatable",
438
440
  label: Q["aria-label"],
439
441
  rootRef: $,
440
442
  emit: (e, 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);
443
+ e === "sortColumnsChange" && X?.(t), e === "pageChange" && ie?.(t), e === "perPageChange" && ae?.(t), e === "selectedIdsChange" && oe?.(t), e === "expandedIdsChange" && se?.(t), e === "rowClick" && ce?.(t), e === "rowDblClick" && le?.(t), e === "rowContextMenu" && ue?.(t), e === "selectionChanged" && de?.(t), e === "rowExpand" && fe?.(t), e === "rowCollapse" && pe?.(t), e === "loadError" && me?.(t), e === "pageLoad" && he?.(t), e === "filtersChange" && Z?.(t);
442
444
  }
443
445
  });
444
- return /* @__PURE__ */ u(te, {
445
- ...be.props,
446
+ return /* @__PURE__ */ u(ne, {
447
+ ...Ce.props,
446
448
  slots: {
447
- header: me,
448
- cell: he,
449
- row: Z,
450
- filter: ge
449
+ header: ge,
450
+ cell: _e,
451
+ row: ve,
452
+ filter: ye
451
453
  },
452
- className: _e,
454
+ className: be,
453
455
  attrs: Q,
454
456
  rootRef: $,
455
- children: ve
457
+ children: xe
456
458
  });
457
459
  });
458
460
  //#endregion
459
- export { S as t };
461
+ export { w as t };
@@ -4,9 +4,10 @@ import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
5
5
  import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import { datetimePickerCore as d, datetimePickerScopedStyles as f } from "@mintplayer/ui-core/datetime-picker";
7
+ import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
8
+ import { datetimePickerCore as f, datetimePickerScopedStyles as p } from "@mintplayer/ui-core/datetime-picker";
8
9
  //#region libs/mintplayer-react-bootstrap/datetime-picker/src/generated/datetime-picker.view.generated.tsx
9
- function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
10
+ function m({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
10
11
  return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
11
12
  "data-mps": "datetime-picker",
12
13
  ...e(n.root),
@@ -159,48 +160,48 @@ function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRe
159
160
  }
160
161
  //#endregion
161
162
  //#region libs/mintplayer-react-bootstrap/datetime-picker/src/generated/BsDatetimePicker.generated.tsx
162
- var m = {
163
+ var h = {
163
164
  hour: 0,
164
165
  minute: 0
165
- }, h = i(function({ value: e = null, min: t = null, max: r = null, disableDateFn: i = null, firstDayOfWeek: c = 1, locale: u = null, hour12: h = "auto", step: g = 15, defaultTime: _ = m, placeholder: v = null, showClear: y = !1, disabled: b = !1, required: x = !1, invalid: S = !1, errorText: C = null, inputLabel: w = null, name: T = null, labels: E = null, calendarLabels: D = null, onValueChange: O, onOpenChange: k, className: A, children: j, ...M }, N) {
166
- s("datetime-picker", f);
167
- let P = o(null);
168
- a(N, () => P.current);
169
- let F = n(d, {
166
+ }, g = i(function({ value: e = null, min: t = null, max: r = null, disableDateFn: i = null, firstDayOfWeek: c = 1, locale: u = null, hour12: g = "auto", step: _ = 15, defaultTime: v = h, placeholder: y = null, showClear: b = !1, disabled: x = !1, required: S = !1, invalid: C = !1, errorText: w = null, inputLabel: T = null, name: E = null, labels: D = null, calendarLabels: O = null, onValueChange: k, onOpenChange: A, className: j, children: M, ...N }, P) {
167
+ s(d.key, d.css, { order: d.order }), s("datetime-picker", p);
168
+ let F = o(null);
169
+ a(P, () => F.current);
170
+ let I = n(f, {
170
171
  value: e,
171
172
  min: t,
172
173
  max: r,
173
174
  disableDateFn: i,
174
175
  firstDayOfWeek: c,
175
176
  locale: u,
176
- hour12: h,
177
- step: g,
178
- defaultTime: _,
179
- placeholder: v,
180
- showClear: y,
181
- disabled: b,
182
- required: x,
183
- invalid: S,
184
- errorText: C,
185
- inputLabel: w,
186
- name: T,
187
- labels: E,
188
- calendarLabels: D
177
+ hour12: g,
178
+ step: _,
179
+ defaultTime: v,
180
+ placeholder: y,
181
+ showClear: b,
182
+ disabled: x,
183
+ required: S,
184
+ invalid: C,
185
+ errorText: w,
186
+ inputLabel: T,
187
+ name: E,
188
+ labels: D,
189
+ calendarLabels: O
189
190
  }, {
190
191
  idPrefix: "bs-datetime-picker",
191
- label: M["aria-label"],
192
- rootRef: P,
192
+ label: N["aria-label"],
193
+ rootRef: F,
193
194
  emit: (e, t) => {
194
- e === "valueChange" && O?.(t), e === "openChange" && k?.(t);
195
+ e === "valueChange" && k?.(t), e === "openChange" && A?.(t);
195
196
  }
196
197
  });
197
- return /* @__PURE__ */ l(p, {
198
- ...F.props,
199
- className: A,
200
- attrs: M,
201
- rootRef: P,
202
- children: j
198
+ return /* @__PURE__ */ l(m, {
199
+ ...I.props,
200
+ className: j,
201
+ attrs: N,
202
+ rootRef: F,
203
+ children: M
203
204
  });
204
205
  });
205
206
  //#endregion
206
- export { h as t };
207
+ export { g as t };
@@ -0,0 +1,57 @@
1
+ import { r as e } from "./react-props-C2O2_2V2.mjs";
2
+ import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
3
+ import { createContext as n, forwardRef as r, useContext as i, useId as a, useState as o } from "react";
4
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
5
+ import { bootstrapForms as u } from "@mintplayer/ui-core/bootstrap/forms";
6
+ import { connectRadio as d, radioClasses as f } from "@mintplayer/ui-core/radio";
7
+ //#region libs/mintplayer-react-bootstrap/radio/src/BsRadio.tsx
8
+ var p = n(null), m = r(function(n, r) {
9
+ let { type: m = "radio", color: h = "secondary", value: g, checked: _, defaultChecked: v, name: y, disabled: b, required: x, invalid: S = !1, errorText: C, onCheckedChange: w, onChange: T, className: E, children: D, id: O, "aria-describedby": k, ...A } = n, j = i(p), M = `bs-radio-${a().replace(/[^a-zA-Z0-9_-]/g, "")}`, [N, P] = o(!!v), F = (j && j.value !== void 0 ? j.value !== null && j.value === g : void 0) ?? _ ?? (j ? void 0 : N), I = {
10
+ type: m,
11
+ checked: !!F,
12
+ disabled: !!b || !!j?.disabled,
13
+ required: !!x || !!j?.required,
14
+ invalid: S,
15
+ name: j?.name ?? y ?? null,
16
+ value: g ?? null,
17
+ errorText: C ?? null
18
+ }, L = d(I, M, k);
19
+ t(u);
20
+ let R = f(m, h, S), z = O ?? String(L.input.id), B = F === void 0 ? { defaultChecked: j?.defaultValue != null && j.defaultValue === g } : { checked: F }, V = /* @__PURE__ */ c("input", {
21
+ ref: r,
22
+ "data-mps": "radio",
23
+ className: [R.input, E].filter(Boolean).join(" "),
24
+ ...e(L.input),
25
+ ...A,
26
+ id: z,
27
+ type: "radio",
28
+ ...B,
29
+ onChange: (e) => {
30
+ T?.(e), j && g !== void 0 && j.select(g), !j && _ === void 0 && P(e.target.checked), w?.(e.target.checked);
31
+ }
32
+ }), H = L.feedback && /* @__PURE__ */ c("div", {
33
+ "data-mps": "radio",
34
+ ...e(L.feedback.attrs),
35
+ children: L.feedback.text
36
+ });
37
+ return R.root === null ? /* @__PURE__ */ l(s, { children: [
38
+ V,
39
+ /* @__PURE__ */ c("label", {
40
+ "data-mps": "radio",
41
+ className: R.label,
42
+ htmlFor: z,
43
+ children: D
44
+ }),
45
+ H
46
+ ] }) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ l("label", {
47
+ "data-mps": "radio",
48
+ className: R.root,
49
+ children: [V, /* @__PURE__ */ c("span", {
50
+ "data-mps": "radio",
51
+ className: R.label,
52
+ children: D
53
+ })]
54
+ }), H] });
55
+ });
56
+ //#endregion
57
+ export { p as n, m as t };
@@ -1,3 +1,3 @@
1
- import { t as e } from "../chunks/BsDatatable.generated-am6uNreO.mjs";
1
+ import { t as e } from "../chunks/BsDatatable.generated-DqNW60JA.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 { DatatableFilters, DatatableInputs, DatatableLoadErrorDetail, RowEventDetail, SelectionChangeEventDetail, SortColumn, TreeRowExpandDetail } from '@mintplayer/ui-core/datatable';
1
+ import { DatatableFilters, DatatableInputs, DatatableLoadErrorDetail, DatatablePageLoadDetail, 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' | 'filters' | 'fetchParams' | 'stateKey' | 'onSortColumnsChange' | 'onPageChange' | 'onPerPageChange' | 'onSelectedIdsChange' | 'onExpandedIdsChange' | 'onRowClick' | 'onRowDblClick' | 'onRowContextMenu' | 'onSelectionChanged' | 'onRowExpand' | 'onRowCollapse' | 'onLoadError' | 'onFiltersChange' | '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' | 'onPageLoad' | 'onFiltersChange' | 'header' | 'cell' | 'row' | 'filter'> {
5
5
  columns?: DatatableInputs['columns'];
6
6
  data?: DatatableInputs['data'];
7
7
  fetch?: DatatableInputs['fetch'];
@@ -62,6 +62,8 @@ export interface BsDatatableProps extends Omit<React.HTMLAttributes<HTMLElementT
62
62
  onRowCollapse?: (detail: TreeRowExpandDetail) => void;
63
63
  /** A `fetch` call rejected. */
64
64
  onLoadError?: (detail: DatatableLoadErrorDetail) => void;
65
+ /** A response the table applied, or the page 1 it was seeded with on the server (`seeded: true`, `fetch` not called); carries the response `extra`. */
66
+ onPageLoad?: (detail: DatatablePageLoadDetail) => void;
65
67
  /** The column filters, after the user changed them; `fetch` (or the consumer, over `data`) applies them. */
66
68
  onFiltersChange?: (detail: DatatableFilters) => void;
67
69
  header?: NonNullable<DatatableTemplateProps['slots']>['header'];
@@ -4,9 +4,10 @@ import * as r from "react";
4
4
  import { forwardRef as i, useImperativeHandle as a, useRef as o } from "react";
5
5
  import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
6
6
  import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
7
- import { datepickerCore as d, datepickerScopedStyles as f } from "@mintplayer/ui-core/datepicker";
7
+ import { bootstrapForms as d } from "@mintplayer/ui-core/bootstrap/forms";
8
+ import { datepickerCore as f, datepickerScopedStyles as p } from "@mintplayer/ui-core/datepicker";
8
9
  //#region libs/mintplayer-react-bootstrap/datepicker/src/generated/datepicker.view.generated.tsx
9
- function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
10
+ function m({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRef: d }) {
10
11
  return /* @__PURE__ */ l(c, { children: /* @__PURE__ */ u("div", {
11
12
  "data-mps": "datepicker",
12
13
  ...e(n.root),
@@ -109,42 +110,42 @@ function p({ view: n, slots: i = {}, children: a, className: o, attrs: s, rootRe
109
110
  }
110
111
  //#endregion
111
112
  //#region libs/mintplayer-react-bootstrap/datepicker/src/generated/BsDatepicker.generated.tsx
112
- var m = i(function({ selectedDate: e = null, currentMonth: t = null, min: r = null, max: i = null, disableDateFn: c = null, firstDayOfWeek: u = 1, locale: m = null, disabled: h = !1, placeholder: g = null, required: _ = !1, invalid: v = !1, errorText: y = null, inputLabel: b = null, name: x = null, labels: S = null, calendarLabels: C = null, onSelectedDateChange: w, onCurrentMonthChange: T, onOpenChange: E, className: D, children: O, ...k }, A) {
113
- s("datepicker", f);
114
- let j = o(null);
115
- a(A, () => j.current);
116
- let M = n(d, {
113
+ var h = i(function({ selectedDate: e = null, currentMonth: t = null, min: r = null, max: i = null, disableDateFn: c = null, firstDayOfWeek: u = 1, locale: h = null, disabled: g = !1, placeholder: _ = null, required: v = !1, invalid: y = !1, errorText: b = null, inputLabel: x = null, name: S = null, labels: C = null, calendarLabels: w = null, onSelectedDateChange: T, onCurrentMonthChange: E, onOpenChange: D, className: O, children: k, ...A }, j) {
114
+ s(d.key, d.css, { order: d.order }), s("datepicker", p);
115
+ let M = o(null);
116
+ a(j, () => M.current);
117
+ let N = n(f, {
117
118
  selectedDate: e,
118
119
  currentMonth: t,
119
120
  min: r,
120
121
  max: i,
121
122
  disableDateFn: c,
122
123
  firstDayOfWeek: u,
123
- locale: m,
124
- disabled: h,
125
- placeholder: g,
126
- required: _,
127
- invalid: v,
128
- errorText: y,
129
- inputLabel: b,
130
- name: x,
131
- labels: S,
132
- calendarLabels: C
124
+ locale: h,
125
+ disabled: g,
126
+ placeholder: _,
127
+ required: v,
128
+ invalid: y,
129
+ errorText: b,
130
+ inputLabel: x,
131
+ name: S,
132
+ labels: C,
133
+ calendarLabels: w
133
134
  }, {
134
135
  idPrefix: "bs-datepicker",
135
- label: k["aria-label"],
136
- rootRef: j,
136
+ label: A["aria-label"],
137
+ rootRef: M,
137
138
  emit: (e, t) => {
138
- e === "selectedDateChange" && w?.(t), e === "currentMonthChange" && T?.(t), e === "openChange" && E?.(t);
139
+ e === "selectedDateChange" && T?.(t), e === "currentMonthChange" && E?.(t), e === "openChange" && D?.(t);
139
140
  }
140
141
  });
141
- return /* @__PURE__ */ l(p, {
142
- ...M.props,
143
- className: D,
144
- attrs: k,
145
- rootRef: j,
146
- children: O
142
+ return /* @__PURE__ */ l(m, {
143
+ ...N.props,
144
+ className: O,
145
+ attrs: A,
146
+ rootRef: M,
147
+ children: k
147
148
  });
148
149
  });
149
150
  //#endregion
150
- export { m as BsDatepicker };
151
+ export { h as BsDatepicker };
@@ -1 +1 @@
1
- export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-B4WBEiCo.mjs";
1
+ export { t as BsDatetimePicker } from "../chunks/BsDatetimePicker.generated-CxaiRt79.mjs";
@@ -1,67 +1,72 @@
1
1
  import { r as e } from "../chunks/react-props-C2O2_2V2.mjs";
2
- import * as t from "react";
3
- import { forwardRef as n, useEffect as r, useImperativeHandle as i, useRef as a, useState as o } from "react";
4
- import { installLightStyles as s } from "@mintplayer/ui-core/scoped-styles";
5
- import { jsx as c } from "react/jsx-runtime";
6
- import { DROPDOWN_MENU_SCOPE as l, attachDropdownMenu as u, connectDropdownMenu as d, dropdownMenuScopedStyles as f } from "@mintplayer/ui-core/dropdown-menu";
2
+ import { installBootstrap as t } from "@mintplayer/ui-core/bootstrap";
3
+ import * as n from "react";
4
+ import { forwardRef as r, useEffect as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
5
+ import { installLightStyles as c } from "@mintplayer/ui-core/scoped-styles";
6
+ import { jsx as l } from "react/jsx-runtime";
7
+ import { bootstrapDropdown as u } from "@mintplayer/ui-core/bootstrap/dropdown";
8
+ import { DROPDOWN_MENU_SCOPE as d, attachDropdownMenu as f, connectDropdownMenu as p, dropdownMenuScopedStyles as m } from "@mintplayer/ui-core/dropdown-menu";
7
9
  //#region libs/mintplayer-react-bootstrap/dropdown-menu/src/BsDropdownMenu.tsx
8
- var p = n(function({ maxHeight: t, onSelect: n, className: p, style: m, children: h, ...g }, _) {
9
- s(l, f);
10
- let v = a(null);
11
- i(_, () => v.current);
12
- let [y, b] = o(!1), x = a(n);
13
- x.current = n, r(() => {
14
- b(!0);
15
- let e = v.current;
16
- if (e) return u(e, { onSelect: (e) => x.current?.(e) });
10
+ var h = r(function({ maxHeight: n, onSelect: r, className: h, style: g, children: _, ...v }, y) {
11
+ t(u), c(d, m);
12
+ let b = o(null);
13
+ a(y, () => b.current);
14
+ let [x, S] = s(!1), C = o(r);
15
+ C.current = r, i(() => {
16
+ S(!0);
17
+ let e = b.current;
18
+ if (e) return f(e, { onSelect: (e) => C.current?.(e) });
17
19
  }, []);
18
- let { class: S, ...C } = d({ hydrated: y });
19
- return /* @__PURE__ */ c("ul", {
20
- ref: v,
21
- "data-mps": l,
22
- ...e(C),
23
- ...g,
24
- style: t === void 0 ? m : {
25
- ...m,
26
- "--mp-dropdown-max-height": `${t}px`
20
+ let { class: w, ...T } = p({ hydrated: x });
21
+ return /* @__PURE__ */ l("ul", {
22
+ ref: b,
23
+ "data-mps": d,
24
+ ...e(T),
25
+ ...v,
26
+ style: n === void 0 ? g : {
27
+ ...g,
28
+ "--mp-dropdown-max-height": `${n}px`
27
29
  },
28
- className: [String(S), p].filter(Boolean).join(" "),
29
- children: h
30
+ className: [String(w), h].filter(Boolean).join(" "),
31
+ children: _
30
32
  });
31
- }), m = t.forwardRef(function({ active: e, disabled: n, value: r, className: i, children: a, ...o }, s) {
32
- let l = t.useRef(null);
33
- t.useImperativeHandle(s, () => l.current), t.useEffect(() => {
34
- l.current && (l.current.dropdownValue = r);
33
+ }), g = n.forwardRef(function({ active: e, disabled: t, value: r, className: i, children: a, ...o }, s) {
34
+ let c = n.useRef(null);
35
+ n.useImperativeHandle(s, () => c.current), n.useEffect(() => {
36
+ c.current && (c.current.dropdownValue = r);
35
37
  }, [r]);
36
38
  let u = [
37
39
  "dropdown-item",
38
40
  e ? "active" : "",
39
- n ? "disabled" : "",
41
+ t ? "disabled" : "",
40
42
  i ?? ""
41
43
  ].filter(Boolean).join(" ");
42
- return /* @__PURE__ */ c("li", {
43
- ref: l,
44
+ return /* @__PURE__ */ l("li", {
45
+ ref: c,
44
46
  className: u,
45
- "aria-disabled": n ? !0 : void 0,
47
+ "data-mps": d,
48
+ "aria-disabled": t ? !0 : void 0,
46
49
  ...o,
47
50
  children: a
48
51
  });
49
- }), h = t.forwardRef(function({ className: e, ...t }, n) {
52
+ }), _ = n.forwardRef(function({ className: e, ...t }, n) {
50
53
  let r = ["dropdown-divider", e ?? ""].filter(Boolean).join(" ");
51
- return /* @__PURE__ */ c("li", {
54
+ return /* @__PURE__ */ l("li", {
52
55
  ref: n,
53
56
  role: "separator",
54
57
  className: r,
58
+ "data-mps": d,
55
59
  ...t
56
60
  });
57
- }), g = t.forwardRef(function({ className: e, children: t, ...n }, r) {
61
+ }), v = n.forwardRef(function({ className: e, children: t, ...n }, r) {
58
62
  let i = ["dropdown-header", e ?? ""].filter(Boolean).join(" ");
59
- return /* @__PURE__ */ c("li", {
63
+ return /* @__PURE__ */ l("li", {
60
64
  ref: r,
61
65
  className: i,
66
+ "data-mps": d,
62
67
  ...n,
63
68
  children: t
64
69
  });
65
70
  });
66
71
  //#endregion
67
- export { h as BsDropdownDivider, g as BsDropdownHeader, m as BsDropdownItem, p as BsDropdownMenu };
72
+ export { _ as BsDropdownDivider, v as BsDropdownHeader, g as BsDropdownItem, h as BsDropdownMenu };