@nxgt/material 3.33.0 → 3.34.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 (52) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/{async-slice-Cll-4Mvg.js → async-slice-C9q_eMJD.js} +2 -2
  4. package/dist/{button-B47lM8a5.js → button-CoAu_GuF.js} +1 -1
  5. package/dist/charts.js +3 -3
  6. package/dist/{chip-Bf80b1XT.js → chip-Ch21Qbnj.js} +1 -1
  7. package/dist/{code-editor-BLLpzmCc.js → code-editor-CEdEmolU.js} +4 -4
  8. package/dist/code-editor.js +4 -4
  9. package/dist/{code-language-items-COd99vab.js → code-language-items-BNMM7YlZ.js} +2 -2
  10. package/dist/{components-1vjs-YVY.js → components-BM9WHviO.js} +11802 -11736
  11. package/dist/components.js +15 -15
  12. package/dist/{dialog-Cp7bS5LI.js → dialog-C_U4twIJ.js} +1 -1
  13. package/dist/dnd.js +1 -1
  14. package/dist/{dropdown-menu-DJNMcPZa.js → dropdown-menu-DSgkmogX.js} +1 -1
  15. package/dist/editor.js +7 -7
  16. package/dist/{empty-state-Dv9AtrMw.js → empty-state-CJZ0sVE8.js} +1 -1
  17. package/dist/hooks.js +2 -2
  18. package/dist/{i18n-provider-BBhhsa4I.js → i18n-provider-CLq-1Qgc.js} +1 -1
  19. package/dist/i18n.js +5 -5
  20. package/dist/{icon-badge-DEk244kn.js → icon-badge-Dssl4rfn.js} +1 -1
  21. package/dist/lib/components/ui/collections/server-table/bulk-action-targets.d.ts +11 -0
  22. package/dist/lib/components/ui/collections/server-table/bulk-action.d.ts +32 -0
  23. package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +21 -0
  24. package/dist/lib/components/ui/collections/server-table/server-table.d.ts +1 -0
  25. package/dist/lib/components/ui/collections/server-table/types.d.ts +2 -1
  26. package/dist/lib/i18n/resources/en/en.d.ts +2 -0
  27. package/dist/lib/i18n/resources/en/material.json.d.ts +3 -1
  28. package/dist/lib/i18n/resources/fr/fr.d.ts +2 -0
  29. package/dist/lib/i18n/resources/fr/material.json.d.ts +3 -1
  30. package/dist/lib/i18n/resources/resources.d.ts +4 -0
  31. package/dist/lib/i18n/translator.d.ts +1 -1
  32. package/dist/lib.js +1 -1
  33. package/dist/main.js +21 -21
  34. package/dist/map.js +4 -4
  35. package/dist/pdf-reader.js +1 -1
  36. package/dist/print.js +2 -2
  37. package/dist/{public-Cvwb2tds.js → public-CX7FN97X.js} +6 -6
  38. package/dist/{rich-code-block-MItKFVB-.js → rich-code-block-cc1NZtbD.js} +4 -4
  39. package/dist/{sortable-provider-CIlK0Vuk.js → sortable-provider-D43VdFMP.js} +1 -1
  40. package/dist/{spinner-DRGPXRNW.js → spinner-wKfFAVU9.js} +1 -1
  41. package/dist/{stored-language-CkPRWAaM.js → stored-language-D73ujVW4.js} +6 -2
  42. package/dist/theme-picker.js +2 -2
  43. package/dist/{theme-toggle-CPzxOW_X.js → theme-toggle-Drab-hke.js} +1 -1
  44. package/dist/{toolbar-items-GIaifZbx.js → toolbar-items-D7R9YtYx.js} +2 -2
  45. package/dist/{translate-material-BEQGLLY7.js → translate-material-CdpLjkcD.js} +2 -2
  46. package/dist/{translator-Ec9Uj32C.js → translator-BE-yEb0p.js} +1 -1
  47. package/dist/{use-chat-composer-BEs82Xar.js → use-chat-composer-CpKh8564.js} +12 -12
  48. package/dist/{use-heading-spy-BRAPVvfh.js → use-heading-spy-DgWhvYfh.js} +1 -1
  49. package/dist/{use-material-translation-B0RHv3l7.js → use-material-translation-Da9Ponn5.js} +2 -2
  50. package/docs/components/data-table-filter-and-lists.md +29 -1
  51. package/docs/guides/i18n.md +1 -0
  52. package/package.json +1 -1
package/dist/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import { r as e } from "./i18n-provider-BBhhsa4I.js";
2
- import { t } from "./translate-material-BEQGLLY7.js";
1
+ import { r as e } from "./i18n-provider-CLq-1Qgc.js";
2
+ import { t } from "./translate-material-CdpLjkcD.js";
3
3
  import { Children as n, createContext as r, isValidElement as i, useCallback as a, useContext as o, useEffect as s, useMemo as c, useState as l } from "react";
4
4
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
5
  import { resolvePdfFileName as f } from "@nxgt/material-core/pdf-file-name";
@@ -6,18 +6,18 @@ import { c as i, i as a, l as o, n as s, o as c, s as l } from "./dist-lmHmz_bu.
6
6
  import { a as u, o as d } from "./tooltip-CkttDIab.js";
7
7
  import { i as f } from "./dist-C4wtXCjf.js";
8
8
  import { r as p, t as m } from "./in-dialog-Vwkyp-M5.js";
9
- import { C as h, D as g, E as _, O as v, S as y, T as b, _ as x, f as S, g as ee, k as te, r as ne, t as C, u as re, w } from "./dialog-Cp7bS5LI.js";
10
- import { c as T, d as ie, f as E, i as ae, l as oe, n as se, o as D, t as ce, u as O } from "./dropdown-menu-DJNMcPZa.js";
11
- import { S as le, a as k, d as A, g as ue, h as de, i as fe, m as pe, n as j, r as me, t as M, u as he, w as ge } from "./toolbar-items-GIaifZbx.js";
12
- import { t as N } from "./use-material-translation-B0RHv3l7.js";
13
- import { t as _e } from "./button-B47lM8a5.js";
9
+ import { C as h, D as g, E as _, O as v, S as y, T as b, _ as x, f as S, g as ee, k as te, r as ne, t as C, u as re, w } from "./dialog-C_U4twIJ.js";
10
+ import { c as T, d as ie, f as E, i as ae, l as oe, n as se, o as D, t as ce, u as O } from "./dropdown-menu-DSgkmogX.js";
11
+ import { S as le, a as k, d as A, g as ue, h as de, i as fe, m as pe, n as j, r as me, t as M, u as he, w as ge } from "./toolbar-items-D7R9YtYx.js";
12
+ import { t as N } from "./use-material-translation-Da9Ponn5.js";
13
+ import { t as _e } from "./button-CoAu_GuF.js";
14
14
  import { n as ve, t as ye } from "./icon-button-ifTpXt0A.js";
15
15
  import { t as be } from "./useEvent-2fKq-6w8.js";
16
16
  import { n as xe, t as Se } from "./toggle-group-BMJNcFAC.js";
17
17
  import { o as Ce } from "./escape-owner-C4W_sOAU.js";
18
18
  import { n as we } from "./use-slice-reducer-BGkeGtML.js";
19
19
  import { r as Te } from "./use-csp-nonce-ZKs9k-ov.js";
20
- import { n as Ee, t as De } from "./empty-state-Dv9AtrMw.js";
20
+ import { n as Ee, t as De } from "./empty-state-CJZ0sVE8.js";
21
21
  import { t as Oe } from "./client-only.utils-3nHNzCki.js";
22
22
  import { t as ke } from "./use-scroll-away-PQRFZkT2.js";
23
23
  import { ArrowLeft as Ae, BookOpenText as je, ChevronDown as Me, ChevronLeft as Ne, ChevronRight as Pe, ChevronUp as Fe, Download as Ie, Eraser as Le, FileText as Re, FileWarning as ze, FileX2 as Be, Highlighter as Ve, KeyRound as He, LayoutGrid as Ue, List as We, Loader2 as Ge, Maximize as Ke, MessageSquareText as qe, Minimize as Je, MoreVertical as Ye, MousePointer2 as Xe, MoveHorizontal as Ze, PanelLeft as Qe, Pen as $e, PencilLine as et, Printer as tt, RotateCw as nt, Search as rt, StickyNote as it, Type as at, Underline as ot, Undo2 as st, Volume2 as ct, X as lt, XIcon as ut, ZoomIn as dt, ZoomOut as ft } from "lucide-react";
@@ -1,7 +1,7 @@
1
1
  import { t as e } from "./tooltip-CkttDIab.js";
2
- import { c as t, n, t as r } from "./dropdown-menu-DJNMcPZa.js";
3
- import { t as i } from "./use-material-translation-B0RHv3l7.js";
4
- import { a, i as o, n as s, o as c, t as l } from "./code-language-items-COd99vab.js";
2
+ import { c as t, n, t as r } from "./dropdown-menu-DSgkmogX.js";
3
+ import { t as i } from "./use-material-translation-Da9Ponn5.js";
4
+ import { a, i as o, n as s, o as c, t as l } from "./code-language-items-BNMM7YlZ.js";
5
5
  import { i as u, n as d, r as f, s as p } from "./dist-C3GR7kJd.js";
6
6
  import { t as m } from "./code-block-spec-CGLKRhwD.js";
7
7
  import { Check as h, ChevronDown as g, Copy as _, Maximize2 as v, WrapText as y } from "lucide-react";
@@ -143,7 +143,7 @@ function M({ node: e, editor: t, updateAttributes: n, editable: r, wrap: a, onWr
143
143
  }
144
144
  //#endregion
145
145
  //#region lib/components/ui/widgets/editor/extensions/code/code-block-open.tsx
146
- var N = x(() => import("./code-editor-BLLpzmCc.js").then((e) => e.n).then((e) => ({ default: e.CodeEditor })));
146
+ var N = x(() => import("./code-editor-CEdEmolU.js").then((e) => e.n).then((e) => ({ default: e.CodeEditor })));
147
147
  function P() {
148
148
  let { t: e } = i();
149
149
  return /* @__PURE__ */ T("div", {
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { t } from "./dist-DVRQkaTK.js";
3
- import { t as n } from "./use-material-translation-B0RHv3l7.js";
3
+ import { t as n } from "./use-material-translation-Da9Ponn5.js";
4
4
  import { t as r } from "./icon-button-ifTpXt0A.js";
5
5
  import { t as i } from "./compose-refs-DZ0iIVF-.js";
6
6
  import { GripVertical as a } from "lucide-react";
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { o as t } from "./tooltip-CkttDIab.js";
3
- import { t as n } from "./use-material-translation-B0RHv3l7.js";
3
+ import { t as n } from "./use-material-translation-Da9Ponn5.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region lib/components/ui/feedback/spinner/spinner.tsx
6
6
  var i = t("transition-all duration-500", {
@@ -1932,7 +1932,9 @@ var t = {
1932
1932
  "first-page": "Back to the first page",
1933
1933
  "past-end-status": "{count, plural, =0 {No results} one {# result} other {# results}} in all, none on this page",
1934
1934
  error: "Could not load the list",
1935
- "error-hint": "Check your connection, then try again."
1935
+ "error-hint": "Check your connection, then try again.",
1936
+ "bulk-action": "{label} ({count})",
1937
+ "bulk-action-name": "{label} {count, plural, one {# row} other {# rows}}"
1936
1938
  },
1937
1939
  "list-empty": { clear: "Clear search and filters" },
1938
1940
  "data-grid": {
@@ -4599,7 +4601,9 @@ var t = {
4599
4601
  "first-page": "Retour à la première page",
4600
4602
  "past-end-status": "{count, plural, =0 {Aucun résultat} one {# résultat} other {# résultats}} au total, aucun sur cette page",
4601
4603
  error: "Impossible de charger la liste",
4602
- "error-hint": "Vérifiez votre connexion, puis réessayez."
4604
+ "error-hint": "Vérifiez votre connexion, puis réessayez.",
4605
+ "bulk-action": "{label} ({count})",
4606
+ "bulk-action-name": "{label} : {count, plural, one {# ligne} other {# lignes}}"
4603
4607
  },
4604
4608
  "list-empty": { clear: "Effacer la recherche et les filtres" },
4605
4609
  "data-grid": {
@@ -1,10 +1,10 @@
1
1
  import { t as e } from "./utils-BLfntITJ.js";
2
2
  import { a as t, i as n, n as r, o as i, r as a, t as o } from "./bubble-input-B7BVd9fX.js";
3
- import { t as s } from "./use-material-translation-B0RHv3l7.js";
3
+ import { t as s } from "./use-material-translation-Da9Ponn5.js";
4
4
  import { a as c, r as l } from "./icon-sprites-CaYXzOL4.js";
5
5
  import { t as u } from "./use-theme-DMcyJ52N.js";
6
6
  import { a as d, r as f } from "./theme-context-Cofk6vgs.js";
7
- import { t as p } from "./theme-toggle-CPzxOW_X.js";
7
+ import { t as p } from "./theme-toggle-Drab-hke.js";
8
8
  import { n as m, t as h } from "./nxgt-theme-ZS945iMP.js";
9
9
  import { Check as g } from "lucide-react";
10
10
  import { useContext as _ } from "react";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./use-material-translation-B0RHv3l7.js";
1
+ import { t as e } from "./use-material-translation-Da9Ponn5.js";
2
2
  import { i as t } from "./theme-store-CSl51uNH.js";
3
3
  import { n, t as r } from "./use-theme-DMcyJ52N.js";
4
4
  import { r as i } from "./theme-context-Cofk6vgs.js";
@@ -4,9 +4,9 @@ import { a as i, c as a, i as o, l as s, r as c, s as l } from "./dist-lmHmz_bu.
4
4
  import { b as u, c as d, d as f, f as p, l as m, t as h, u as g, x as _ } from "./tooltip-CkttDIab.js";
5
5
  import { i as v, n as y, r as b, t as x } from "./dist-C4wtXCjf.js";
6
6
  import { a as S, c as C, l as w, o as T, r as ee, s as te, t as E } from "./in-dialog-Vwkyp-M5.js";
7
- import { A as ne, M as re, N as ie, b as ae, d as oe, f as se, i as ce, j as le, l as ue, n as de, o as fe, r as pe, t as me, u as he, y as ge } from "./dropdown-menu-DJNMcPZa.js";
7
+ import { A as ne, M as re, N as ie, b as ae, d as oe, f as se, i as ce, j as le, l as ue, n as de, o as fe, r as pe, t as me, u as he, y as ge } from "./dropdown-menu-DSgkmogX.js";
8
8
  import { a as _e, n as ve, r as ye, t as be } from "./dist-B7RjY7SL.js";
9
- import { t as xe } from "./use-material-translation-B0RHv3l7.js";
9
+ import { t as xe } from "./use-material-translation-Da9Ponn5.js";
10
10
  import { t as Se } from "./warn-once-C_e47JM8.js";
11
11
  import { o as Ce } from "./escape-owner-C4W_sOAU.js";
12
12
  import { ChevronLeft as we, ChevronRightIcon as Te, MoreVertical as Ee } from "lucide-react";
@@ -1,5 +1,5 @@
1
- import "./stored-language-CkPRWAaM.js";
2
- import { a as e, r as t } from "./translator-Ec9Uj32C.js";
1
+ import "./stored-language-D73ujVW4.js";
2
+ import { a as e, r as t } from "./translator-BE-yEb0p.js";
3
3
  //#region lib/i18n/translate-material.ts
4
4
  function n(n, r, i, a) {
5
5
  if (n) for (let e of /* @__PURE__ */ new Set([n, n.split("-")[0]])) {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./is-production-GLw59WU8.js";
2
- import { a as t, i as n, r, t as i } from "./stored-language-CkPRWAaM.js";
2
+ import { a as t, i as n, r, t as i } from "./stored-language-D73ujVW4.js";
3
3
  import { t as a } from "./get-CTzJAwfc.js";
4
4
  //#region ../../node_modules/@formatjs/fast-memoize/index.js
5
5
  function o(e, t) {
@@ -7,21 +7,21 @@ import { a as o, c as s, i as c, l, n as u, o as d, r as f, s as p, t as m } fro
7
7
  import { _ as h, a as g, g as _, h as v, m as y, o as b, p as x, t as S, v as C, y as w } from "./tooltip-CkttDIab.js";
8
8
  import { a as T, i as E, n as D, r as O, t as k } from "./dist-C4wtXCjf.js";
9
9
  import { i as A, n as ee, t as j } from "./in-dialog-Vwkyp-M5.js";
10
- import { A as M, C as N, D as te, E as ne, O as P, S as re, T as ie, _ as F, b as ae, f as oe, g as se, k as I, l as ce, m as le, n as ue, o as de, r as fe, s as pe, t as me, u as he, v as ge, w as _e, x as ve, y as ye } from "./dialog-Cp7bS5LI.js";
10
+ import { A as M, C as N, D as te, E as ne, O as P, S as re, T as ie, _ as F, b as ae, f as oe, g as se, k as I, l as ce, m as le, n as ue, o as de, r as fe, s as pe, t as me, u as he, v as ge, w as _e, x as ve, y as ye } from "./dialog-C_U4twIJ.js";
11
11
  import { A as be, C as xe, D as Se, E as Ce, O as we, S as Te, T as Ee, _ as De, a as Oe, b as ke, d as Ae, f as je, g as Me, h as Ne, i as Pe, k as Fe, l as Ie, m as Le, n as Re, o as ze, p as Be, r as Ve, s as He, t as Ue, u as We, v as Ge, w as Ke, x as qe, y as Je } from "./floating-ui.dom-KkZSW8_E.js";
12
- import { D as Ye, E as Xe, N as Ze, O as Qe, c as $e, d as et, f as tt, i as nt, k as rt, m as it, n as at, o as ot, p as st, t as ct, u as lt } from "./dropdown-menu-DJNMcPZa.js";
12
+ import { D as Ye, E as Xe, N as Ze, O as Qe, c as $e, d as et, f as tt, i as nt, k as rt, m as it, n as at, o as ot, p as st, t as ct, u as lt } from "./dropdown-menu-DSgkmogX.js";
13
13
  import { a as ut, i as dt, n as ft } from "./field-blur-context-Cft9s7Hg.js";
14
- import { C as pt, S as mt, a as ht, c as gt, d as _t, l as vt, n as yt, o as bt, s as xt, u as St } from "./toolbar-items-GIaifZbx.js";
14
+ import { C as pt, S as mt, a as ht, c as gt, d as _t, l as vt, n as yt, o as bt, s as xt, u as St } from "./toolbar-items-D7R9YtYx.js";
15
15
  import { a as Ct, i as wt, n as Tt, o as Et, t as Dt } from "./bubble-input-B7BVd9fX.js";
16
16
  import { i as Ot } from "./dist-B7RjY7SL.js";
17
- import "./stored-language-CkPRWAaM.js";
18
- import { a as kt } from "./translator-Ec9Uj32C.js";
17
+ import "./stored-language-D73ujVW4.js";
18
+ import { a as kt } from "./translator-BE-yEb0p.js";
19
19
  import { h as At } from "./get-CTzJAwfc.js";
20
20
  import { t as jt } from "./isEmpty-F_g3jLf8.js";
21
- import { t as L } from "./use-material-translation-B0RHv3l7.js";
22
- import { t as Mt } from "./spinner-DRGPXRNW.js";
21
+ import { t as L } from "./use-material-translation-Da9Ponn5.js";
22
+ import { t as Mt } from "./spinner-wKfFAVU9.js";
23
23
  import { a as Nt } from "./button-tones-BwuVvAmd.js";
24
- import { a as Pt, i as Ft, n as It, r as Lt, t as Rt } from "./button-B47lM8a5.js";
24
+ import { a as Pt, i as Ft, n as It, r as Lt, t as Rt } from "./button-CoAu_GuF.js";
25
25
  import { t as R } from "./icon-button-ifTpXt0A.js";
26
26
  import { a as zt, r as Bt } from "./icon-sprites-CaYXzOL4.js";
27
27
  import { t as Vt } from "./use-ssr-media-query-C6M5m8sf.js";
@@ -35,10 +35,10 @@ import { a as tn, i as nn, o as rn } from "./escape-owner-C4W_sOAU.js";
35
35
  import { n as an } from "./use-slice-reducer-BGkeGtML.js";
36
36
  import { t as on } from "./browser-only-DQ94lWF8.js";
37
37
  import { t as sn } from "./compose-refs-DZ0iIVF-.js";
38
- import { n as cn, r as ln, t as un } from "./chip-Bf80b1XT.js";
39
- import { n as dn, t as fn } from "./icon-badge-DEk244kn.js";
38
+ import { n as cn, r as ln, t as un } from "./chip-Ch21Qbnj.js";
39
+ import { n as dn, t as fn } from "./icon-badge-Dssl4rfn.js";
40
40
  import { r as pn } from "./use-csp-nonce-ZKs9k-ov.js";
41
- import { t as mn } from "./empty-state-Dv9AtrMw.js";
41
+ import { t as mn } from "./empty-state-CJZ0sVE8.js";
42
42
  import { t as hn } from "./skeleton-DSdtr2qc.js";
43
43
  import { H as gn, V as _n, X as vn, bt as yn, it as bn, lt as xn, n as Sn, t as Cn, xt as wn, yt as Tn } from "./dist-moutbfbd.js";
44
44
  import { t as En } from "./markdown-Dw_uH7j7.js";
@@ -10782,7 +10782,7 @@ var CS = (e = {}) => Dn({
10782
10782
  let [{ default: t }, { lowlight: n }, { richCodeBlock: r }] = await Promise.all([
10783
10783
  import("./dist-CRMFGjng.js"),
10784
10784
  import("./lowlight-OtcjU2Sa.js"),
10785
- import("./rich-code-block-MItKFVB-.js")
10785
+ import("./rich-code-block-cc1NZtbD.js")
10786
10786
  ]);
10787
10787
  return [r(t, {
10788
10788
  lowlight: n,
@@ -1,4 +1,4 @@
1
- import { r as e } from "./i18n-provider-BBhhsa4I.js";
1
+ import { r as e } from "./i18n-provider-CLq-1Qgc.js";
2
2
  import { _ as t, g as n, h as r, n as i, v as a, y as o } from "./number.utils-BG_eEt5g.js";
3
3
  import { useCallback as s, useEffect as c, useMemo as l, useRef as u } from "react";
4
4
  //#region ../../node_modules/date-fns/locale/fr/_lib/formatDistance.js
@@ -1,5 +1,5 @@
1
- import { r as e } from "./i18n-provider-BBhhsa4I.js";
2
- import { t } from "./translate-material-BEQGLLY7.js";
1
+ import { r as e } from "./i18n-provider-CLq-1Qgc.js";
2
+ import { t } from "./translate-material-CdpLjkcD.js";
3
3
  import { useCallback as n } from "react";
4
4
  //#region lib/i18n/use-material-translation.ts
5
5
  function r() {
@@ -857,6 +857,34 @@ export default function Students() {
857
857
  rowSelectionDisabledReason={() => 'Already applied'}
858
858
  />
859
859
  ```
860
+ - **Bulk actions that count and run only their rows.** `bulkActions` also
861
+ takes a list of `ServerTableBulkAction<T>` (`{ id, label, icon?, appliesTo?,
862
+ onClick, variant?, color?, loading? }`). Each button reads "Label (n)", n
863
+ being the selected rows the action applies to, and is named "Label n rows"
864
+ (`material.server-table.bulk-action` and `bulk-action-name`, English and
865
+ French); `variant` (default `'tonal'`) and `color` (`'destructive'` for a
866
+ destructive one) style the button, `loading` makes it busy; the type is
867
+ exported as `ServerTableBulkAction`. It is not rendered when n is 0, so 5 rows selected with none
868
+ archived show no "Restore". `onClick(ids, selection, rows)` receives only
869
+ those ids and rows. An action without `appliesTo` applies to the whole
870
+ selection: it shows the selection's size and gets every id. **Across
871
+ pages:** `appliesTo` sees the loaded page's rows only, so a row selected on
872
+ another page is neither counted nor passed by an action that has one; an
873
+ action without it still gets every selected id.
874
+ ```tsx
875
+ <ServerTable<Item>
876
+ {...props}
877
+ bulkActions={[
878
+ {
879
+ id: 'restore',
880
+ label: 'Restore',
881
+ appliesTo: (item) => item.archived,
882
+ onClick: (ids, selection) => restore(ids).then(selection.clear),
883
+ },
884
+ { id: 'export', label: 'Export', onClick: (ids) => exportRows(ids) },
885
+ ]}
886
+ />
887
+ ```
860
888
  - **Your own controls instead.** Without `filter`, pass
861
889
  `filters={tableFilters(model)}`: whether the page is "nothing matches",
862
890
  and its "Clear search and filters" button
@@ -895,7 +923,7 @@ Its props are `ServerTableProps<T>`; `filter` is a `ServerTableFilter`,
895
923
  | `error` | `ServerTableError \| null` | — | the fetch failed: the failure and a Retry replace the rows |
896
924
  | `onRetry` | `() => unknown` | — | the error's Retry; a returned promise keeps it loading |
897
925
  | `onClearFilters` | `() => void` | focus the table | without `filter`, after "clear" |
898
- | `bulkActions` | `(ids, selection: ServerTableSelection) => ReactNode` | — | the selection's toolbar |
926
+ | `bulkActions` | `(ids, selection: ServerTableSelection) => ReactNode \| ServerTableBulkAction<T>[]` | — | the selection's toolbar: your own buttons, or a list of actions with `appliesTo` that each count and run only the rows they apply to |
899
927
  | `enableRowSelection`, `rowSelectionDisabledReason` | `boolean \| (row) => boolean`, `(row) => string \| undefined` | all rows, no reason | with `bulkActions`: which rows can be selected, and why one cannot ([DataTable](#datatable)) |
900
928
  | `pageHref` | `(params) => string` | `` `?${params}` `` | Previous / Next hrefs |
901
929
  | `pagingNames` | `{ after?, trail? }` | `after`, `trail` | the cursor's params |
@@ -403,6 +403,7 @@ fichier.") when it cannot show it, `material.file-preview.download`
403
403
  "Seuls les premiers {size} de ce fichier sont affichés.") under a text cut
404
404
  by the size cap; the text or Markdown it shows scrolls in a region named by
405
405
  `material.file-preview.content` ("Contents of {name}", "Contenu de {name}").
406
+ A `ServerTable` bulk action with a list entry reads `material.server-table.bulk-action` ("{label} ({count})", the same in French) and is named by `material.server-table.bulk-action-name` ("{label} {count, plural, one {# row} other {# rows}}"; "{label} : {count, plural, one {# ligne} other {# lignes}}").
406
407
  `ServerTable`'s own live region (without `filter`) says
407
408
  `material.server-table.results` once a new query is answered ("{count,
408
409
  plural, =0 {No results} one {# result} other {# results}}"; "{count, plural,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxgt/material",
3
- "version": "3.33.0",
3
+ "version": "3.34.0",
4
4
  "license": "MIT",
5
5
  "bugs": {
6
6
  "email": "stevegires@gmail.com"