@middag-io/react 0.23.0 → 0.25.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 (102) hide show
  1. package/README.md +51 -34
  2. package/dist-lib/DateField-CZ13qKol.js +121 -0
  3. package/dist-lib/DateRangeField-CvU7wiyr.js +663 -0
  4. package/dist-lib/DocumentField-DHcXGh45.js +221 -0
  5. package/dist-lib/FormPanelBlock-DGndU2Rh.js +1735 -0
  6. package/dist-lib/FormSection-B_uXjngJ.js +8083 -0
  7. package/dist-lib/HugeiconsIcon-CKqc2W1S.js +1321 -0
  8. package/dist-lib/{MarkdownContent-DhffsdY-.js → MarkdownContent-B1aSl1Nl.js} +1553 -4815
  9. package/dist-lib/MarkdownContent-ZobA2Gtk.js +2 -0
  10. package/dist-lib/PhoneField-Boqhwr3y.js +18584 -0
  11. package/dist-lib/app/LazyBlock.d.ts +19 -11
  12. package/dist-lib/app/LazyBlock.d.ts.map +1 -1
  13. package/dist-lib/app/providers/i18n-defaults.d.ts.map +1 -1
  14. package/dist-lib/app/providers/inertia-error-reporter.d.ts +26 -0
  15. package/dist-lib/app/providers/inertia-error-reporter.d.ts.map +1 -0
  16. package/dist-lib/app/providers/locales/pt-BR.d.ts.map +1 -1
  17. package/dist-lib/app/register-defaults.d.ts +6 -6
  18. package/dist-lib/app/register-defaults.d.ts.map +1 -1
  19. package/dist-lib/base/blocks/DenseTableBlock.d.ts.map +1 -1
  20. package/dist-lib/base/blocks/FormPanelBlock.d.ts +20 -0
  21. package/dist-lib/base/blocks/FormPanelBlock.d.ts.map +1 -0
  22. package/dist-lib/base/blocks/FormPanelBlock.lazy.d.ts +13 -0
  23. package/dist-lib/base/blocks/FormPanelBlock.lazy.d.ts.map +1 -0
  24. package/dist-lib/base/form/FormField.d.ts.map +1 -1
  25. package/dist-lib/base/form/fields/NativeSelectField.d.ts +23 -0
  26. package/dist-lib/base/form/fields/NativeSelectField.d.ts.map +1 -0
  27. package/dist-lib/base/form/fields/OtpField.d.ts +22 -0
  28. package/dist-lib/base/form/fields/OtpField.d.ts.map +1 -0
  29. package/dist-lib/base/form/fields/SliderField.d.ts +24 -0
  30. package/dist-lib/base/form/fields/SliderField.d.ts.map +1 -0
  31. package/dist-lib/base/form/fields/register-default-fields.d.ts.map +1 -1
  32. package/dist-lib/base/form/form-schema-builder.d.ts +27 -0
  33. package/dist-lib/base/form/form-schema-builder.d.ts.map +1 -0
  34. package/dist-lib/base/hooks/useLazyTabs.d.ts +6 -0
  35. package/dist-lib/base/hooks/useLazyTabs.d.ts.map +1 -1
  36. package/dist-lib/base/hooks/usePolling.d.ts +15 -6
  37. package/dist-lib/base/hooks/usePolling.d.ts.map +1 -1
  38. package/dist-lib/base/hooks/useRemember.d.ts +31 -0
  39. package/dist-lib/base/hooks/useRemember.d.ts.map +1 -0
  40. package/dist-lib/base/partials/ActionBar/index.d.ts.map +1 -1
  41. package/dist-lib/base/partials/DataTable/cell-registry.d.ts +2 -0
  42. package/dist-lib/base/partials/DataTable/cell-registry.d.ts.map +1 -1
  43. package/dist-lib/base/partials/DataTable/cell-renderers.d.ts +2 -1
  44. package/dist-lib/base/partials/DataTable/cell-renderers.d.ts.map +1 -1
  45. package/dist-lib/base/partials/DataTable/index.d.ts +1 -1
  46. package/dist-lib/base/partials/DataTable/index.d.ts.map +1 -1
  47. package/dist-lib/base/partials/DataTable/register-default-cells.d.ts.map +1 -1
  48. package/dist-lib/base/partials/DataTable/types.d.ts +12 -2
  49. package/dist-lib/base/partials/DataTable/types.d.ts.map +1 -1
  50. package/dist-lib/base/partials/EntityItem/index.d.ts +48 -0
  51. package/dist-lib/base/partials/EntityItem/index.d.ts.map +1 -0
  52. package/dist-lib/base/partials/QuickRecordSheet/index.d.ts +24 -0
  53. package/dist-lib/base/partials/QuickRecordSheet/index.d.ts.map +1 -0
  54. package/dist-lib/base/partials/ResizableSidebar/index.d.ts +27 -0
  55. package/dist-lib/base/partials/ResizableSidebar/index.d.ts.map +1 -0
  56. package/dist-lib/base/partials/TableOfContents/index.d.ts +30 -0
  57. package/dist-lib/base/partials/TableOfContents/index.d.ts.map +1 -0
  58. package/dist-lib/base/partials/TimelineList/index.d.ts.map +1 -1
  59. package/dist-lib/base/partials/index.d.ts +4 -0
  60. package/dist-lib/base/partials/index.d.ts.map +1 -1
  61. package/dist-lib/base/shell/BasicShell.d.ts +4 -4
  62. package/dist-lib/base/shell/BasicShell.d.ts.map +1 -1
  63. package/dist-lib/base/shell/ImmersiveShell.d.ts.map +1 -1
  64. package/dist-lib/base/shell/partials/PageActionButton.d.ts.map +1 -1
  65. package/dist-lib/base/utils/time.d.ts +25 -13
  66. package/dist-lib/base/utils/time.d.ts.map +1 -1
  67. package/dist-lib/button-Ba1PcsOx.js +357 -0
  68. package/dist-lib/calendar-DnlbmjNu.js +4502 -0
  69. package/dist-lib/chevron-right-Casn6MFU.js +7 -0
  70. package/dist-lib/combobox-BbYGWCFO.js +5480 -0
  71. package/dist-lib/contracts/block-data/actions.d.ts +6 -6
  72. package/dist-lib/contracts/block-data/actions.d.ts.map +1 -1
  73. package/dist-lib/contracts/block-data/data-display.d.ts +16 -1
  74. package/dist-lib/contracts/block-data/data-display.d.ts.map +1 -1
  75. package/dist-lib/contracts/block-data/form.d.ts +62 -3
  76. package/dist-lib/contracts/block-data/form.d.ts.map +1 -1
  77. package/dist-lib/contracts/block-data/interactive.d.ts +2 -2
  78. package/dist-lib/contracts/generated/contract-schema.d.ts +1 -1
  79. package/dist-lib/contracts/generated/contract-types.d.ts +4 -2
  80. package/dist-lib/contracts/generated/contract-types.d.ts.map +1 -1
  81. package/dist-lib/contracts/generated/index.d.ts +1 -1
  82. package/dist-lib/contracts/page-contract-schema.d.ts +2 -2
  83. package/dist-lib/contracts/page-contract.d.ts +3 -3
  84. package/dist-lib/dist-7c0PXlrb.js +1195 -0
  85. package/dist-lib/dist-B-MyAb3x.js +54 -0
  86. package/dist-lib/dist-CmB86BdM.js +15 -0
  87. package/dist-lib/dist-DuO9WodV.js +234 -0
  88. package/dist-lib/document-validation-YgxIqb8k.js +1249 -0
  89. package/dist-lib/floating-ui.react-dom-BnOzLaz1.js +1089 -0
  90. package/dist-lib/i18n-D362dzBp.js +336 -0
  91. package/dist-lib/index.d.ts +4 -1
  92. package/dist-lib/index.d.ts.map +1 -1
  93. package/dist-lib/input-CdUVNe54.js +14 -0
  94. package/dist-lib/middag-react.css +1 -1
  95. package/dist-lib/middag-react.js +9818 -23633
  96. package/dist-lib/popover-Bxsp1hlN.js +241 -0
  97. package/dist-lib/scroll-area-B9TZ05bl.js +556 -0
  98. package/dist-lib/skeleton-HpnbVVji.js +12 -0
  99. package/dist-lib/use-mobile-Kp3Dy8mh.js +204 -0
  100. package/dist-lib/utils-Yj2czlvU.js +1713 -0
  101. package/package.json +3 -3
  102. /package/dist-lib/{dist-CK9PErDU.js → dist-axU0pUop.js} +0 -0
@@ -1,18 +1,23 @@
1
1
  /**
2
- * LazyBlock — wrapper that auto-fetches block data via Inertia partial reload.
2
+ * LazyBlock — wrapper that loads a block's data from a separate Inertia prop
3
+ * instead of embedding it in the PageContract.
3
4
  *
4
- * When a block has `meta.lazyProp`, its data comes from a separate Inertia prop
5
- * instead of being embedded in the PageContract. This enables:
6
- * - Deferred tab content (data loads when tab is activated)
7
- * - Smaller initial payloads (only active tab data is sent)
8
- * - Partial reloads (Inertia fetches only the requested prop)
5
+ * The prop name lives in `block.meta.lazyProp`; that name is the wire token
6
+ * (the top-level page prop, i.e. the `<Deferred data>` / `only:[…]` key). The
7
+ * data is fetched with a native Inertia primitive:
9
8
  *
10
- * Usage: PHP sends blocks with `data: null` and `meta: { lazyProp: "invoices" }`.
11
- * The Inertia page also has a top-level `invoices` prop (initially null).
12
- * When the block mounts, it calls `router.reload({ only: ["invoices"] })`.
13
- * PHP handles the partial reload and returns the invoices data.
9
+ * - `block.meta.whenVisible === true` → `<WhenVisible>`: fetched when the block
10
+ * scrolls into the viewport (optional `meta.buffer` in px). Best for
11
+ * below-the-fold blocks.
12
+ * - otherwise → `<Deferred>`: Inertia auto-fetches the deferred prop right after
13
+ * the page mounts (the backend marks it with `Inertia::defer()`, which the
14
+ * contract surfaces as `block.deferred`).
15
+ *
16
+ * Both strategies read the resolved data back from `usePage().props[lazyProp]`.
17
+ * If the prop is already present on first load, the primitive renders the block
18
+ * immediately without an extra request.
14
19
  */
15
- import { type ComponentType, type ReactElement } from "react";
20
+ import type { ComponentType, ReactElement } from "react";
16
21
  import type { BlockProps } from "../app/registries";
17
22
  import type { BlockDescriptor } from "../contracts/page-contract";
18
23
  interface LazyBlockProps {
@@ -22,6 +27,9 @@ interface LazyBlockProps {
22
27
  export declare function LazyBlock({ block, Component }: LazyBlockProps): ReactElement;
23
28
  /**
24
29
  * Check if a block descriptor uses lazy loading.
30
+ *
31
+ * Keyed on `meta.lazyProp` (the wire token / prop name) — `deferred` and
32
+ * `whenVisible` only select the loading strategy and are inert without it.
25
33
  */
26
34
  export declare function isLazyBlock(block: BlockDescriptor): boolean;
27
35
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"LazyBlock.d.ts","sourceRoot":"","sources":["../../src/app/LazyBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAqB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/D;AAED,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,YAAY,CAmC5E;AAED;;GAEG;AAEH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE3D"}
1
+ {"version":3,"file":"LazyBlock.d.ts","sourceRoot":"","sources":["../../src/app/LazyBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,UAAU,cAAc;IACtB,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/D;AA2BD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,cAAc,GAAG,YAAY,CAwB5E;AAED;;;;;GAKG;AAEH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAE3D"}
@@ -1 +1 @@
1
- {"version":3,"file":"i18n-defaults.d.ts","sourceRoot":"","sources":["../../../src/app/providers/i18n-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAoUlD,CAAC"}
1
+ {"version":3,"file":"i18n-defaults.d.ts","sourceRoot":"","sources":["../../../src/app/providers/i18n-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4UlD,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * InertiaErrorReporter — routes Inertia transport failures to telemetry + UX.
3
+ *
4
+ * Inertia v3 emits `httpException` (the server returned an error response) and
5
+ * `networkError` (the request never completed). With no handler wired, both
6
+ * vanish silently. This headless, pass-through component forwards them to the
7
+ * injected {@link ErrorReporter} (telemetry) and surfaces a toast so the user
8
+ * sees the failure.
9
+ *
10
+ * Mount it inside `ErrorReporterProvider` + `I18nProvider`, alongside the
11
+ * `Toaster`. It owns no context — it only subscribes to router events.
12
+ *
13
+ * @example
14
+ * <ErrorReporterProvider reporter={sentryReporter}>
15
+ * <I18nProvider>
16
+ * <InertiaErrorReporter>
17
+ * <App />
18
+ * </InertiaErrorReporter>
19
+ * </I18nProvider>
20
+ * </ErrorReporterProvider>
21
+ */
22
+ import { type ReactNode } from "react";
23
+ export declare function InertiaErrorReporter({ children }: {
24
+ children: ReactNode;
25
+ }): import("react/jsx-runtime").JSX.Element;
26
+ //# sourceMappingURL=inertia-error-reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inertia-error-reporter.d.ts","sourceRoot":"","sources":["../../../src/app/providers/inertia-error-reporter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlD,wBAAgB,oBAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA8BzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../../src/app/providers/locales/pt-BR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA8LvC,CAAC"}
1
+ {"version":3,"file":"pt-BR.d.ts","sourceRoot":"","sources":["../../../../src/app/providers/locales/pt-BR.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAiMvC,CAAC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * register-defaults — populates the registries with core shells,
3
- * layouts and the 12 standard block types available out-of-the-box.
3
+ * layouts and the 13 standard block types available out-of-the-box.
4
4
  *
5
- * The 7 heavy/interactive blocks (chart_panel, form_panel, flow_editor,
6
- * condition_tree, sentence_builder, form_builder, kanban_board) and the rich
7
- * ProductShell + chrome are premium: they register via @middag-io/react-pro's
8
- * registerProDefaults() (which overrides the `product` shell fallback). The
9
- * free engine ships the ImmersiveShell + 12 standard blocks only.
5
+ * The 6 heavy/interactive blocks (chart_panel, flow_editor, condition_tree,
6
+ * sentence_builder, form_builder, kanban_board) and the rich ProductShell +
7
+ * chrome are Pro: they register via @middag-io/react-pro's registerProDefaults()
8
+ * (which overrides the `product` shell fallback). The Community engine ships the
9
+ * ImmersiveShell + 13 standard blocks (form_panel included — heavy deps lazy).
10
10
  *
11
11
  * IIFE consumers (WordPress) should NOT call this function. Instead, import
12
12
  * individual blocks from the barrel and call registerBlock() selectively to
@@ -1 +1 @@
1
- {"version":3,"file":"register-defaults.d.ts","sourceRoot":"","sources":["../../src/app/register-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA2BH,wBAAgB,gBAAgB,IAAI,IAAI,CAsCvC"}
1
+ {"version":3,"file":"register-defaults.d.ts","sourceRoot":"","sources":["../../src/app/register-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AA4BH,wBAAgB,gBAAgB,IAAI,IAAI,CAyCvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DenseTableBlock.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/DenseTableBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAItF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAwRxF"}
1
+ {"version":3,"file":"DenseTableBlock.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/DenseTableBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,OAAO,KAAK,EAAsB,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAItF,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,mBAAmB,CAAC,GAAG,YAAY,CA6RxF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * FormPanelBlock — schema-driven form rendering with react-hook-form + Zod validation.
3
+ *
4
+ * Receives form schema from server, renders fields via FormField router,
5
+ * validates client-side via Zod (generated from schema), and submits via Inertia.
6
+ *
7
+ * Validation modes (meta.validation):
8
+ * - 'both' (default): client + server validation
9
+ * - 'client': client-only (no Inertia error handling)
10
+ * - 'server': server-only (legacy, no Zod schema)
11
+ *
12
+ * Heavy deps (react-hook-form + zod) are isolated to this module so the engine
13
+ * only loads them when a page actually renders a form_panel — see the lazy
14
+ * wrapper in FormPanelBlock.lazy.tsx, which is what register-defaults registers.
15
+ */
16
+ import { type ReactElement } from "react";
17
+ import type { BlockProps } from "../../app/registries";
18
+ import type { FormPanelBlockData } from "../../contracts/block-data";
19
+ export declare function FormPanelBlock({ block }: BlockProps<FormPanelBlockData>): ReactElement;
20
+ //# sourceMappingURL=FormPanelBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormPanelBlock.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/FormPanelBlock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAqD,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAO7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAgBnD,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,wBAAwB,CAAC;AAuFjF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAsNtF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * FormPanelBlock.lazy — Suspense wrapper that code-splits the heavy form_panel block.
3
+ *
4
+ * react-hook-form + zod (+ @hookform/resolvers) load only when a page actually
5
+ * renders a form_panel. register-defaults registers THIS wrapper, not the heavy
6
+ * module, keeping the engine's base bundle lean (mirrors the field lazies in
7
+ * FormField.tsx).
8
+ */
9
+ import { type ReactElement } from "react";
10
+ import type { BlockProps } from "../../app/registries";
11
+ import type { FormPanelBlockData } from "../../contracts/block-data";
12
+ export declare function FormPanelBlockLazy(props: BlockProps<FormPanelBlockData>): ReactElement;
13
+ //# sourceMappingURL=FormPanelBlock.lazy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FormPanelBlock.lazy.d.ts","sourceRoot":"","sources":["../../../src/base/blocks/FormPanelBlock.lazy.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAkBjE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAAG,YAAY,CAMtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/base/form/FormField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAC;AAgDjF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,wBAAwB,EAAE,aAAa,CAAC;AAsC7E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,cAAc,GAAG,YAAY,CA8DzF"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/base/form/FormField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAyB,KAAK,YAAY,EAAkB,MAAM,OAAO,CAAC;AAmDjF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,wBAAwB,EAAE,aAAa,CAAC;AAyC7E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,cAAc,GAAG,YAAY,CA8DzF"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * NativeSelectField -- single-value select using the native HTML <select>.
3
+ *
4
+ * Fallback for contexts where the styled (Radix portal) Select misbehaves —
5
+ * notably inside Moodle iframes. Wraps the ReUI NativeSelect primitive with
6
+ * form-field aria plumbing. Mirrors SelectField's option contract.
7
+ */
8
+ import type { ReactElement } from "react";
9
+ import type { SelectOption } from "../../../base/form/fields/SelectField";
10
+ export interface NativeSelectFieldProps {
11
+ id: string;
12
+ value: string;
13
+ onChange: (value: string) => void;
14
+ options: SelectOption[];
15
+ placeholder?: string;
16
+ disabled?: boolean;
17
+ required?: boolean;
18
+ error?: string;
19
+ helpTextId?: string;
20
+ errorId?: string;
21
+ }
22
+ export declare function NativeSelectField({ id, value, onChange, options, placeholder, disabled, required, error, helpTextId, errorId, }: NativeSelectFieldProps): ReactElement;
23
+ //# sourceMappingURL=NativeSelectField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeSelectField.d.ts","sourceRoot":"","sources":["../../../../src/base/form/fields/NativeSelectField.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAe,YAAY,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAGnE,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,EAAE,EACF,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,UAAU,EACV,OAAO,GACR,EAAE,sBAAsB,GAAG,YAAY,CA2BvC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * OtpField -- one-time-password / verification code input (segmented slots).
3
+ *
4
+ * Wraps the ReUI InputOTP (input-otp) primitive. Slots are split into groups
5
+ * separated by a divider when `groupSize` is set (e.g. 6 slots, group 3 → "•••-•••").
6
+ */
7
+ import { type ReactElement } from "react";
8
+ export interface OtpFieldProps {
9
+ id: string;
10
+ value: string;
11
+ onChange: (value: string) => void;
12
+ maxLength?: number;
13
+ pattern?: "digits" | "alphanumeric";
14
+ groupSize?: number;
15
+ disabled?: boolean;
16
+ required?: boolean;
17
+ error?: string;
18
+ helpTextId?: string;
19
+ errorId?: string;
20
+ }
21
+ export declare function OtpField({ id, value, onChange, maxLength, pattern, groupSize, disabled, required, error, helpTextId, errorId, }: OtpFieldProps): ReactElement;
22
+ //# sourceMappingURL=OtpField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OtpField.d.ts","sourceRoot":"","sources":["../../../../src/base/form/fields/OtpField.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAUpD,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAgBD,wBAAgB,QAAQ,CAAC,EACvB,EAAE,EACF,KAAK,EACL,QAAQ,EACR,SAAa,EACb,OAAkB,EAClB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,UAAU,EACV,OAAO,GACR,EAAE,aAAa,GAAG,YAAY,CA8B9B"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * SliderField -- numeric range input (single value or two-thumb range).
3
+ *
4
+ * Wraps the ReUI Slider (Radix) primitive with form-field aria plumbing.
5
+ * Radix works in arrays internally; this field accepts/returns a scalar for
6
+ * single mode and a [from, to] tuple when `multiple` is set.
7
+ */
8
+ import type { ReactElement } from "react";
9
+ export interface SliderFieldProps {
10
+ id: string;
11
+ value: number | number[] | null;
12
+ onChange: (value: number | number[]) => void;
13
+ min?: number;
14
+ max?: number;
15
+ step?: number;
16
+ multiple?: boolean;
17
+ disabled?: boolean;
18
+ required?: boolean;
19
+ error?: string;
20
+ helpTextId?: string;
21
+ errorId?: string;
22
+ }
23
+ export declare function SliderField({ id, value, onChange, min, max, step, multiple, disabled, required, error, helpTextId, errorId, }: SliderFieldProps): ReactElement;
24
+ //# sourceMappingURL=SliderField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SliderField.d.ts","sourceRoot":"","sources":["../../../../src/base/form/fields/SliderField.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAC;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAC1B,EAAE,EACF,KAAK,EACL,QAAQ,EACR,GAAO,EACP,GAAS,EACT,IAAQ,EACR,QAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,UAAU,EACV,OAAO,GACR,EAAE,gBAAgB,GAAG,YAAY,CAoCjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-default-fields.d.ts","sourceRoot":"","sources":["../../../../src/base/form/fields/register-default-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA2BH,wBAAgB,qBAAqB,IAAI,IAAI,CA0C5C"}
1
+ {"version":3,"file":"register-default-fields.d.ts","sourceRoot":"","sources":["../../../../src/base/form/fields/register-default-fields.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA8BH,wBAAgB,qBAAqB,IAAI,IAAI,CA6C5C"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * form-schema-builder — generates a Zod validation schema from a FormSchemaNode tree.
3
+ *
4
+ * Walks the server-sent schema, extracts visible fields, and builds Zod validators
5
+ * from field type + validation props. Used by FormPanelBlock with zodResolver for
6
+ * react-hook-form client-side validation.
7
+ *
8
+ * The same form is always re-validated server-side via Inertia — this is an additive
9
+ * UX improvement, not a replacement for server validation.
10
+ */
11
+ import { z, type ZodTypeAny } from "zod";
12
+ import type { FormSchemaNode } from "../../contracts/block-data";
13
+ type TranslateFn = (key: string, params?: Record<string, string | number>) => string;
14
+ /**
15
+ * Build a complete Zod schema from a FormSchemaNode tree.
16
+ *
17
+ * Only visible fields are included in the schema — hidden fields are not validated.
18
+ * Call this function whenever form values change to rebuild the schema with updated
19
+ * visibility conditions.
20
+ *
21
+ * @param schema - The server-sent form schema tree
22
+ * @param values - Current form values (used for conditional visibility evaluation)
23
+ * @param t - Translation function for error messages
24
+ */
25
+ export declare function buildFormSchema(schema: FormSchemaNode[], values: Record<string, unknown>, t: TranslateFn): z.ZodObject<Record<string, ZodTypeAny>>;
26
+ export {};
27
+ //# sourceMappingURL=form-schema-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-schema-builder.d.ts","sourceRoot":"","sources":["../../../src/base/form/form-schema-builder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,KAAK,UAAU,EAAE,MAAM,KAAK,CAAC;AAQzC,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE5E,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAgIrF;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EAAE,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,CAAC,EAAE,WAAW,GACb,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAoBzC"}
@@ -18,6 +18,12 @@
18
18
  * </Tab>
19
19
  * </TabbedPanel>
20
20
  * ```
21
+ *
22
+ * Imperative escape hatch: for simple per-tab loading without retry/error
23
+ * tracking, prefer the declarative `<WhenVisible data={tab}>` (loads when the
24
+ * tab panel scrolls into view) or `<Deferred data={tab}>` from
25
+ * `@inertiajs/react`. This hook stays for cases that need explicit
26
+ * loading/error state and a `retryTab` affordance the primitives don't expose.
21
27
  */
22
28
  export interface UseLazyTabsReturn {
23
29
  /** Call on every tab switch — triggers partial reload for unloaded tabs. */
@@ -1 +1 @@
1
- {"version":3,"file":"useLazyTabs.d.ts","sourceRoot":"","sources":["../../../src/base/hooks/useLazyTabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,oCAAoC;IACpC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACnC,wCAAwC;IACxC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAuDjE"}
1
+ {"version":3,"file":"useLazyTabs.d.ts","sourceRoot":"","sources":["../../../src/base/hooks/useLazyTabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKH,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,eAAe,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACpC,oCAAoC;IACpC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACnC,wCAAwC;IACxC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,CAuDjE"}
@@ -1,11 +1,20 @@
1
1
  /**
2
- * usePolling — Inertia-native polling hook for contract-driven pages.
2
+ * usePolling — Inertia v3 contract-driven polling for blocks.
3
3
  *
4
- * Reads polling configuration from block meta and schedules periodic
5
- * Inertia reloads. The server controls whether polling is active via
6
- * the `enabled` flag — no client-side stop conditions needed.
4
+ * Consumes the canonical `PollConfig` (`BlockDescriptor.poll`, generated from
5
+ * `Middag\Ui`): the server owns whether and how a block polls.
7
6
  *
8
- * @see Page Builder v2 spec §Gap 1
7
+ * - intervalMs → poll interval in ms (0 / absent ⇒ no polling)
8
+ * - pauseWhenHidden → throttle while the tab is hidden (maps to keepAlive: false)
9
+ * - stopAfterMs → stop polling after this elapsed time (optional)
10
+ * - endpoint → server-side hint; the same-page reload refreshes the contract
11
+ *
12
+ * Uses Inertia v3 `router.poll` (mode "cancel" for overlap-guard, visibility-aware
13
+ * via keepAlive) instead of a hand-rolled setInterval: automatic cleanup,
14
+ * pause-on-hidden, and overlap protection come for free. The effect re-arms when
15
+ * the poll config changes, so the server can start/stop/retune polling by sending
16
+ * a new contract.
9
17
  */
10
- export declare function usePolling(meta: Record<string, unknown> | undefined): void;
18
+ import type { PollConfig } from "../../contracts/generated";
19
+ export declare function usePolling(poll: PollConfig | undefined): void;
11
20
  //# sourceMappingURL=usePolling.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../src/base/hooks/usePolling.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,IAAI,CA2B1E"}
1
+ {"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../src/base/hooks/usePolling.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,wBAAgB,UAAU,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAmB7D"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * useRemember — useState that survives Inertia history navigation when opted in.
3
+ *
4
+ * Wraps Inertia v3's `useRemember` so a block's client-only UI state (column
5
+ * visibility, density, draft selections — state that is NOT round-tripped to
6
+ * the server) is restored on browser back/forward within the SPA. Gated by the
7
+ * `remember` flag the backend sets on `BlockDescriptor`: when off, it behaves
8
+ * as a plain `useState`, so non-opted-in blocks pay nothing and keep the same
9
+ * wire shape.
10
+ *
11
+ * Drop-in for `useState`: same `[state, setState]` tuple, same lazy-initializer
12
+ * support. The `key` scopes Inertia's history slot — keep it stable and unique
13
+ * per block (use `block.key`).
14
+ *
15
+ * IMPORTANT: `enabled` must be stable for the lifetime of the component. It is
16
+ * derived from the contract (`block.remember`), which does not change across
17
+ * renders of a mounted block. A flipping `enabled` would swap which underlying
18
+ * state backs the tuple and desync the value.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * const [visibility, setVisibility] = useRemember(
23
+ * () => buildInitialVisibility(columns),
24
+ * `${block.key}:columns`,
25
+ * block.remember ?? false,
26
+ * );
27
+ * ```
28
+ */
29
+ import { type Dispatch, type SetStateAction } from "react";
30
+ export declare function useRemember<T>(initialState: T | (() => T), key: string, enabled: boolean): [T, Dispatch<SetStateAction<T>>];
31
+ //# sourceMappingURL=useRemember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRemember.d.ts","sourceRoot":"","sources":["../../../src/base/hooks/useRemember.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAY,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAGrE,wBAAgB,WAAW,CAAC,CAAC,EAC3B,YAAY,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAC3B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,GACf,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAqBlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/ActionBar/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAMpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,GACV,EAAE,cAAc,GAAG,YAAY,CAyF/B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/ActionBar/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAKpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAG/D,MAAM,WAAW,cAAc;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,UAAU,EACV,OAAO,EACP,QAAQ,EACR,WAAW,EACX,SAAS,GACV,EAAE,cAAc,GAAG,YAAY,CAsF/B"}
@@ -7,6 +7,7 @@
7
7
  * Default cell renderers are registered by registerDefaultCells().
8
8
  */
9
9
  import type { ComponentType } from "react";
10
+ import type { TimestampFormat } from "../../../contracts/block-data";
10
11
  /**
11
12
  * Props that every registered cell renderer receives.
12
13
  *
@@ -22,6 +23,7 @@ export interface CellRendererProps {
22
23
  entityType?: string;
23
24
  entityIdField?: string;
24
25
  statusMap?: Record<string, string>;
26
+ timestampFormat?: TimestampFormat;
25
27
  };
26
28
  }
27
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cell-registry.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/cell-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC,CAAC;CACH;AAID;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAC1C,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAE9F"}
1
+ {"version":3,"file":"cell-registry.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/cell-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7B,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACnC,eAAe,CAAC,EAAE,eAAe,CAAC;KACnC,CAAC;CACH;AAID;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,aAAa,CAAC,iBAAiB,CAAC,GAC1C,IAAI,CAEN;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,iBAAiB,CAAC,GAAG,SAAS,CAE9F"}
@@ -11,10 +11,11 @@ import type { ReactElement } from "react";
11
11
  import type { CellRendererProps } from "./cell-registry";
12
12
  export declare function StatusCell({ value, column }: CellRendererProps): ReactElement;
13
13
  export declare function BooleanCell({ value }: CellRendererProps): ReactElement;
14
- export declare function TimestampCell({ value }: CellRendererProps): ReactElement;
14
+ export declare function TimestampCell({ value, column }: CellRendererProps): ReactElement;
15
15
  export declare function LinkCell({ value, row, column }: CellRendererProps): ReactElement;
16
16
  export declare function RichStatusCell({ value }: CellRendererProps): ReactElement;
17
17
  export declare function HtmlCell({ value }: CellRendererProps): ReactElement;
18
18
  export declare function LinkGroupCell({ value }: CellRendererProps): ReactElement;
19
19
  export declare function AnnotatedCell({ value }: CellRendererProps): ReactElement;
20
+ export declare function ProgressCell({ value }: CellRendererProps): ReactElement;
20
21
  //# sourceMappingURL=cell-renderers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-renderers.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/cell-renderers.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAY1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAo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,GAAG,YAAY,CAkChF;AAcD,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,YAAY,CAiBzE;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,YAAY,CAMnE;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,YAAY,CA8BxE;AAUD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,YAAY,CAiCxE;AAUD,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,YAAY,CA+CvE"}
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import { type ReactElement } from "react";
10
10
  import type { DataTableProps } from "./types";
11
- export declare function DataTable<TData extends object>({ columns, rows, rowKey: rowKeyProp, pagination, sort, filters, appliedFilters, rowActions, actionsAlwaysVisible, bulkActions, isLoading, searchPlaceholder: _searchPlaceholder, searchValue: controlledSearch, emptyStateIcon, emptyStateTitle: _emptyStateTitle, emptyStateDescription, emptyStateCTA, onParamChange, onBulkAction, onRowClick, selectedRowKey, clientSide, }: DataTableProps<TData> & {
11
+ export declare function DataTable<TData extends object>({ columns, rows, rowKey: rowKeyProp, pagination, sort, filters, appliedFilters, rowActions, actionsAlwaysVisible, bulkActions, isLoading, searchPlaceholder: _searchPlaceholder, searchValue: controlledSearch, emptyStateIcon, emptyStateTitle: _emptyStateTitle, emptyStateDescription, emptyStateCTA, onParamChange, onBulkAction, onRowClick, selectedRowKey, remember, rememberKey, clientSide, }: DataTableProps<TData> & {
12
12
  clientSide?: boolean;
13
13
  }): ReactElement;
14
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAiCf,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AAoXjB,wBAAgB,SAAS,CAAC,KAAK,SAAS,MAAM,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,MAAM,EAAE,UAAU,EAClB,UAAU,EACV,IAAI,EACJ,OAAO,EACP,cAAmB,EACnB,UAAU,EACV,oBAA4B,EAC5B,WAAW,EACX,SAAiB,EACjB,iBAAiB,EAAE,kBAAkB,EACrC,WAAW,EAAE,gBAAqB,EAClC,cAAc,EACd,eAAe,EAAE,gBAAgB,EACjC,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAkB,GACnB,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,CAkoBjE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAML,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAqCf,OAAO,KAAK,EAGV,cAAc,EAEf,MAAM,SAAS,CAAC;AAqXjB,wBAAgB,SAAS,CAAC,KAAK,SAAS,MAAM,EAAE,EAC9C,OAAO,EACP,IAAI,EACJ,MAAM,EAAE,UAAU,EAClB,UAAU,EACV,IAAI,EACJ,OAAO,EACP,cAAmB,EACnB,UAAU,EACV,oBAA4B,EAC5B,WAAW,EACX,SAAiB,EACjB,iBAAiB,EAAE,kBAAkB,EACrC,WAAW,EAAE,gBAAqB,EAClC,cAAc,EACd,eAAe,EAAE,gBAAgB,EACjC,qBAAqB,EACrB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,QAAgB,EAChB,WAAW,EACX,UAAkB,GACnB,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,YAAY,CAqrBjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"register-default-cells.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/register-default-cells.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAgBH,wBAAgB,oBAAoB,IAAI,IAAI,CAY3C"}
1
+ {"version":3,"file":"register-default-cells.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/register-default-cells.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiBH,wBAAgB,oBAAoB,IAAI,IAAI,CAa3C"}
@@ -6,8 +6,8 @@
6
6
  import type { ReactNode } from "react";
7
7
  import type { EmptyPlaceholderCTA } from "../../../base/partials/EmptyPlaceholder";
8
8
  import type { AppliedFilters, FilterDef } from "../../../base/partials/FilterBar";
9
- import type { ExecutableAction } from "../../../contracts/block-data";
10
- export type DataTableCellType = "text" | "status" | "boolean" | "timestamp" | "link" | "custom" | "rich_status" | "html" | "link_group" | "annotated";
9
+ import type { ExecutableAction, TimestampFormat } from "../../../contracts/block-data";
10
+ export type DataTableCellType = "text" | "status" | "boolean" | "timestamp" | "link" | "custom" | "rich_status" | "html" | "link_group" | "annotated" | "progress";
11
11
  export interface DataTableColumn<TData> {
12
12
  /** Unique column key, must match a property of TData (or use `render` for computed). */
13
13
  key: string;
@@ -15,6 +15,8 @@ export interface DataTableColumn<TData> {
15
15
  label: string;
16
16
  /** Cell type — controls default rendering. Defaults to "text". */
17
17
  type?: DataTableCellType;
18
+ /** Display format for type="timestamp" columns. Defaults to "relative". */
19
+ timestampFormat?: TimestampFormat;
18
20
  /** Whether the column is sortable. Defaults to false. */
19
21
  sortable?: boolean;
20
22
  /** Whether the column can be hidden via column visibility. Defaults to true. */
@@ -131,5 +133,13 @@ export interface DataTableProps<TData> {
131
133
  onRowClick?: (row: TData) => void;
132
134
  /** Key of the currently selected row (for visual highlight). */
133
135
  selectedRowKey?: string;
136
+ /**
137
+ * Persist client-only view state (column visibility, density) across Inertia
138
+ * history navigation. Driven by `BlockDescriptor.remember` from the backend.
139
+ * When false (default), state is plain `useState` (lost on back/forward).
140
+ */
141
+ remember?: boolean;
142
+ /** Stable, unique key scoping the remembered state (use `block.key`). */
143
+ rememberKey?: string;
134
144
  }
135
145
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/DataTable/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM/D,MAAM,MAAM,iBAAiB,GACzB,MAAM,GACN,QAAQ,GACR,SAAS,GACT,WAAW,GACX,MAAM,GACN,QAAQ,GACR,aAAa,GACb,MAAM,GACN,YAAY,GACZ,WAAW,CAAC;AAEhB,MAAM,WAAW,eAAe,CAAC,KAAK;IACpC,wFAAwF;IACxF,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iGAAiG;IACjG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDA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EAAE,KAAK,IAAI,CAAC;IAElE,+DAA+D;IAC/D,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;IAClC,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * EntityItem — data-driven renderable entity row (avatar/icon + title + description + actions).
3
+ *
4
+ * Composes the ReUI Item primitive with Avatar. Used by selection surfaces, list
5
+ * regions, and inspector headers. All visible text is caller-supplied (already
6
+ * translated), matching the EmptyPlaceholder/StatRow convention.
7
+ *
8
+ * Interaction is scoped to the title (Link or button) and to explicit actions —
9
+ * the whole row is never made interactive, so action buttons never nest inside a
10
+ * link/button (avoids the nested-interactive a11y trap).
11
+ */
12
+ import { type ReactElement, type ReactNode } from "react";
13
+ export interface EntityItemAvatar {
14
+ /** Image URL. Falls back to `fallback` (typically initials) when missing or it fails to load. */
15
+ src?: string;
16
+ /** Fallback content, typically initials. */
17
+ fallback?: string;
18
+ /** Accessible label for the avatar image. */
19
+ alt?: string;
20
+ }
21
+ export interface EntityItemAction {
22
+ id: string;
23
+ label: string;
24
+ /** Icon registry key. */
25
+ icon?: string;
26
+ href?: string;
27
+ onClick?: () => void;
28
+ intent?: "primary" | "secondary";
29
+ disabled?: boolean;
30
+ }
31
+ export interface EntityItemProps {
32
+ title: ReactNode;
33
+ description?: ReactNode;
34
+ /** Avatar media. Takes precedence over `icon`. */
35
+ avatar?: EntityItemAvatar;
36
+ /** Icon registry key for icon media. Ignored when `avatar` is set. */
37
+ icon?: string;
38
+ actions?: EntityItemAction[];
39
+ variant?: "default" | "outline" | "muted";
40
+ size?: "default" | "sm";
41
+ /** Makes the title a navigation link. */
42
+ href?: string;
43
+ /** Makes the title an action button. Ignored when `href` is set. */
44
+ onClick?: () => void;
45
+ className?: string;
46
+ }
47
+ export declare function EntityItem({ title, description, avatar, icon, actions, variant, size, href, onClick, className, }: EntityItemProps): ReactElement;
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/partials/EntityItem/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgB1D,MAAM,WAAW,gBAAgB;IAC/B,iGAAiG;IACjG,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,kDAAkD;IAClD,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;IAC1C,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,MAAM,EACN,IAAI,EACJ,OAAO,EACP,OAAmB,EACnB,IAAgB,EAChB,IAAI,EACJ,OAAO,EACP,SAAS,GACV,EAAE,eAAe,GAAG,YAAY,CA6EhC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * QuickRecordSheet — slide-over panel for quick record create/edit.
3
+ *
4
+ * Community partial built on the ReUI Sheet (Radix Dialog) primitive. Controlled
5
+ * via `open`/`onOpenChange`; the caller supplies the form body (children) and the
6
+ * action footer. Holds no data and fetches nothing.
7
+ */
8
+ import { type ReactElement, type ReactNode } from "react";
9
+ export interface QuickRecordSheetProps {
10
+ open: boolean;
11
+ onOpenChange: (open: boolean) => void;
12
+ title: string;
13
+ description?: string;
14
+ /** Form body. */
15
+ children: ReactNode;
16
+ /** Action footer (e.g. save / cancel buttons). */
17
+ footer?: ReactNode;
18
+ /** Which edge the sheet slides in from. Default "right". */
19
+ side?: "top" | "right" | "bottom" | "left";
20
+ /** Optional trigger element rendered inline (uses asChild). */
21
+ trigger?: ReactNode;
22
+ }
23
+ export declare function QuickRecordSheet({ open, onOpenChange, title, description, children, footer, side, trigger, }: QuickRecordSheetProps): ReactElement;
24
+ //# sourceMappingURL=index.d.ts.map