fastapi-rtk 2.7.0 → 2.8.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 (103) hide show
  1. package/dist/.bundled/jsonforms/cjs/_virtual/index10.cjs +2 -2
  2. package/dist/.bundled/jsonforms/cjs/_virtual/index3.cjs +2 -2
  3. package/dist/.bundled/jsonforms/cjs/_virtual/index4.cjs +2 -2
  4. package/dist/.bundled/jsonforms/cjs/_virtual/index5.cjs +2 -2
  5. package/dist/.bundled/jsonforms/cjs/_virtual/index6.cjs +2 -2
  6. package/dist/.bundled/jsonforms/cjs/_virtual/index7.cjs +2 -2
  7. package/dist/.bundled/jsonforms/cjs/_virtual/index8.cjs +2 -2
  8. package/dist/.bundled/jsonforms/cjs/_virtual/index9.cjs +2 -2
  9. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineFileInput.cjs +13 -4
  10. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/MantineInputs/MantineObjectInput.cjs +23 -12
  11. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineArrayControl/DeleteDialog.cjs +38 -7
  12. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineArrayControl/MantineArrayControl.cjs +16 -11
  13. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +117 -23
  14. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/TableToolbar.cjs +30 -4
  15. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useContextProps.cjs +5 -7
  16. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useNavigationComponent.cjs +48 -13
  17. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useToolbarComponent.cjs +31 -11
  18. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/labels/MantineLabelRenderer.cjs +9 -1
  19. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ArrayToolbar.cjs +15 -4
  20. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.cjs +83 -18
  21. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +76 -43
  22. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
  23. package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
  24. package/dist/.bundled/jsonforms/esm/_virtual/index10.mjs +2 -2
  25. package/dist/.bundled/jsonforms/esm/_virtual/index3.mjs +2 -2
  26. package/dist/.bundled/jsonforms/esm/_virtual/index4.mjs +2 -2
  27. package/dist/.bundled/jsonforms/esm/_virtual/index5.mjs +2 -2
  28. package/dist/.bundled/jsonforms/esm/_virtual/index6.mjs +2 -2
  29. package/dist/.bundled/jsonforms/esm/_virtual/index7.mjs +2 -2
  30. package/dist/.bundled/jsonforms/esm/_virtual/index8.mjs +2 -2
  31. package/dist/.bundled/jsonforms/esm/_virtual/index9.mjs +2 -2
  32. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineFileInput.mjs +16 -7
  33. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/MantineInputs/MantineObjectInput.mjs +23 -12
  34. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineArrayControl/DeleteDialog.mjs +40 -9
  35. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineArrayControl/MantineArrayControl.mjs +17 -12
  36. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +118 -24
  37. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/TableToolbar.mjs +31 -5
  38. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useContextProps.mjs +5 -7
  39. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useNavigationComponent.mjs +49 -14
  40. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useToolbarComponent.mjs +32 -12
  41. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/labels/MantineLabelRenderer.mjs +9 -1
  42. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ArrayToolbar.mjs +16 -5
  43. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.mjs +85 -20
  44. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +79 -46
  45. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineHotizontalLayoutRenderer.mjs +2 -2
  46. package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineVerticalLayoutRenderer.mjs +2 -2
  47. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/codegen/index.cjs +1 -1
  48. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/index.cjs +1 -1
  49. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/compile/validate/index.cjs +1 -1
  50. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.cjs +1 -1
  51. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/core/index.cjs +1 -1
  52. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/discriminator/index.cjs +1 -1
  53. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/format/index.cjs +1 -1
  54. package/dist/.external/cjs/ajv@8.17.1/ajv/dist/vocabularies/validation/index.cjs +1 -1
  55. package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/codegen/index.mjs +1 -1
  56. package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/index.mjs +1 -1
  57. package/dist/.external/esm/ajv@8.17.1/ajv/dist/compile/validate/index.mjs +1 -1
  58. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/applicator/index.mjs +1 -1
  59. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/core/index.mjs +1 -1
  60. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/discriminator/index.mjs +1 -1
  61. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/format/index.mjs +1 -1
  62. package/dist/.external/esm/ajv@8.17.1/ajv/dist/vocabularies/validation/index.mjs +1 -1
  63. package/dist/jsonforms/cjs/MantineInputs/MantineFileInput.cjs +13 -4
  64. package/dist/jsonforms/cjs/MantineInputs/MantineObjectInput.cjs +23 -12
  65. package/dist/jsonforms/cjs/complex/MantineArrayControl/DeleteDialog.cjs +38 -7
  66. package/dist/jsonforms/cjs/complex/MantineArrayControl/MantineArrayControl.cjs +16 -11
  67. package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +117 -23
  68. package/dist/jsonforms/cjs/complex/MantineTableControl/TableToolbar.cjs +30 -4
  69. package/dist/jsonforms/cjs/hooks/useContextProps.cjs +5 -7
  70. package/dist/jsonforms/cjs/hooks/useNavigationComponent.cjs +48 -13
  71. package/dist/jsonforms/cjs/hooks/useToolbarComponent.cjs +31 -11
  72. package/dist/jsonforms/cjs/labels/MantineLabelRenderer.cjs +9 -1
  73. package/dist/jsonforms/cjs/layouts/Array/ArrayToolbar.cjs +15 -4
  74. package/dist/jsonforms/cjs/layouts/Array/ExpandPanelRenderer.cjs +83 -18
  75. package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +76 -43
  76. package/dist/jsonforms/cjs/layouts/MantineHotizontalLayoutRenderer.cjs +2 -2
  77. package/dist/jsonforms/cjs/layouts/MantineVerticalLayoutRenderer.cjs +2 -2
  78. package/dist/jsonforms/esm/MantineInputs/MantineFileInput.mjs +16 -7
  79. package/dist/jsonforms/esm/MantineInputs/MantineObjectInput.mjs +23 -12
  80. package/dist/jsonforms/esm/complex/MantineArrayControl/DeleteDialog.mjs +40 -9
  81. package/dist/jsonforms/esm/complex/MantineArrayControl/MantineArrayControl.mjs +17 -12
  82. package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +118 -24
  83. package/dist/jsonforms/esm/complex/MantineTableControl/TableToolbar.mjs +31 -5
  84. package/dist/jsonforms/esm/hooks/useContextProps.mjs +5 -7
  85. package/dist/jsonforms/esm/hooks/useNavigationComponent.mjs +49 -14
  86. package/dist/jsonforms/esm/hooks/useToolbarComponent.mjs +32 -12
  87. package/dist/jsonforms/esm/labels/MantineLabelRenderer.mjs +9 -1
  88. package/dist/jsonforms/esm/layouts/Array/ArrayToolbar.mjs +16 -5
  89. package/dist/jsonforms/esm/layouts/Array/ExpandPanelRenderer.mjs +85 -20
  90. package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +79 -46
  91. package/dist/jsonforms/esm/layouts/MantineHotizontalLayoutRenderer.mjs +2 -2
  92. package/dist/jsonforms/esm/layouts/MantineVerticalLayoutRenderer.mjs +2 -2
  93. package/dist/jsonforms/lib/MantineInputs/MantineObjectInput.d.ts +1 -1
  94. package/dist/jsonforms/lib/complex/MantineTableControl/MantineTableControl.customizer.test.d.ts +1 -0
  95. package/dist/jsonforms/lib/complex/MantineTableControl/types.d.ts +1 -0
  96. package/dist/jsonforms/lib/hooks/useContextProps.d.ts +3 -1
  97. package/dist/jsonforms/lib/hooks/useNavigationComponent.d.ts +1 -1
  98. package/dist/jsonforms/lib/layouts/Array/ExpandPanelRenderer.d.ts +1 -1
  99. package/dist/jsonforms/lib/layouts/Array/MantineArrayLayout.d.ts +1 -1
  100. package/dist/utils/cjs/deepMerge/deepMerge.cjs +1 -1
  101. package/dist/utils/esm/deepMerge/deepMerge.mjs +1 -1
  102. package/dist/utils/lib/deepMerge/deepMerge.d.ts +2 -0
  103. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { deepMerge } from "fastapi-rtk/utils";
3
3
  import { encode, Resolve, Paths, formatErrorMessage, errorsAt } from "../../../../../../../../.external/esm/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.mjs";
4
4
  import { DispatchCell, useJsonForms } from "../../../../../../../../.external/esm/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.3/@jsonforms/react/lib/jsonforms-react.esm.mjs";
@@ -66,8 +66,18 @@ const getValidColumnProps = (scopedSchema) => {
66
66
  return [""];
67
67
  };
68
68
  const EmptyTable = (props) => {
69
- const { numColumns, translations } = props;
70
- return /* @__PURE__ */ jsx(Table.Tr, { children: /* @__PURE__ */ jsx(NoBorderTableCell, { colSpan: numColumns, children: /* @__PURE__ */ jsx(Text, { ta: "center", children: translations.noDataMessage }) }) });
69
+ const { numColumns, translations, path } = props;
70
+ const [EmptyComponent, _emptyProps] = useContextProps(
71
+ "Table.Empty",
72
+ `${path}.Empty`,
73
+ {
74
+ colSpan: numColumns,
75
+ children: /* @__PURE__ */ jsx(NoBorderTableCell, { colSpan: numColumns, children: /* @__PURE__ */ jsx(Text, { ta: "center", children: translations.noDataMessage }) })
76
+ },
77
+ props,
78
+ { withAllProps: false }
79
+ );
80
+ return EmptyComponent === void 0 ? /* @__PURE__ */ jsx(Table.Tr, { ..._emptyProps }) : EmptyComponent;
71
81
  };
72
82
  const TableHeaderCell = React.memo(function TableHeaderCell2(props) {
73
83
  const { title, rowPath, propName, index } = props;
@@ -119,24 +129,57 @@ const NonEmptyCellComponent = React.memo(function NonEmptyCellComponent2(props)
119
129
  [path, propName]
120
130
  );
121
131
  const index = useMemo(() => path.split(".").slice(-1)[0], [path]);
132
+ const rowIndex = useMemo(() => path.split(".")[originalPath.split(".").length], [path, originalPath]);
122
133
  const generalRowProps = useProps("Table.Row", {}, {});
123
134
  const arrayRowProps = useProps(originalPath, {}, {});
124
135
  const indexedRowProps = useProps(`Table.Row.${index}`, {}, {});
136
+ const propRowProps = useProps(propName ? `${originalPath}.${propName}` : path, {}, {});
137
+ const numberedRowProps = useProps(propName ? `Table.Row.${rowIndex}.${propName}` : `Table.Row.${rowIndex}`, {}, {});
125
138
  const specificRowProps = useProps(path, {}, {});
126
139
  const { component, props: _props } = useMemo(
127
140
  // #MUSTASSERT user-configured MantineThemeProvider row overrides flow through deepMerge as `{}`; narrow to the RowOverride shape consumed below
128
- () => deepMerge(generalRowProps, arrayRowProps, indexedRowProps, specificRowProps),
129
- [generalRowProps, arrayRowProps, indexedRowProps, specificRowProps]
141
+ () => deepMerge(
142
+ generalRowProps,
143
+ arrayRowProps,
144
+ indexedRowProps,
145
+ propRowProps,
146
+ numberedRowProps,
147
+ specificRowProps
148
+ ),
149
+ [generalRowProps, arrayRowProps, indexedRowProps, propRowProps, numberedRowProps, specificRowProps]
130
150
  );
131
151
  const theme = useThemeCustomizer({ [path]: { component, props: _props } });
132
152
  const [, _tdProps] = useContextProps("Table.Row.Td", `${originalPath}.Td`, { maw: 0 }, props, {
133
153
  withAllProps: false
134
154
  });
135
- const [, __tdProps] = useContextProps(`Table.Row.${index}.Td`, `${path}.Td`, { maw: 0 }, props, {
155
+ const [, __tdProps] = useContextProps(
156
+ `Table.Row.${index}.Td`,
157
+ propName ? `${originalPath}.${propName}.Td` : `${path}.Td`,
158
+ {},
159
+ props,
160
+ {
161
+ withAllProps: false,
162
+ withComponentProps: false
163
+ }
164
+ );
165
+ const [, ___tdProps] = useContextProps(`${path}.Td`, `${path}.Td`, {}, props, {
136
166
  withAllProps: false,
137
167
  withComponentProps: false
138
168
  });
139
- const tdProps = useMemo(() => deepMerge(_tdProps, __tdProps), [_tdProps, __tdProps]);
169
+ const [, _numberedTdProps] = useContextProps(
170
+ propName ? `Table.Row.${rowIndex}.${propName}.Td` : `Table.Row.${rowIndex}.Td`,
171
+ propName ? `Table.Row.${rowIndex}.${propName}.Td` : `Table.Row.${rowIndex}.Td`,
172
+ {},
173
+ props,
174
+ {
175
+ withAllProps: false,
176
+ withComponentProps: false
177
+ }
178
+ );
179
+ const tdProps = useMemo(
180
+ () => deepMerge(_tdProps, __tdProps, _numberedTdProps, ___tdProps),
181
+ [_tdProps, __tdProps, _numberedTdProps, ___tdProps]
182
+ );
140
183
  return /* @__PURE__ */ jsx(MantineThemeProvider, { theme, children: /* @__PURE__ */ jsx(NoBorderTableCell, { ...tdProps, children: schema.properties ? /* @__PURE__ */ jsx(
141
184
  DispatchCell,
142
185
  {
@@ -180,9 +223,19 @@ const NonEmptyRowComponent = (props) => {
180
223
  withAllProps: false
181
224
  });
182
225
  const trProps = useMemo(() => deepMerge(_trProps, __trProps), [_trProps, __trProps]);
226
+ const [ActionsComponent, _actionsProps] = useContextProps(
227
+ "Table.Row.Actions",
228
+ `${childPath}.Row.Actions`,
229
+ {
230
+ style: showSortButtons ? styles.fixedCell : styles.fixedCellSmall,
231
+ children: NavigationComponent
232
+ },
233
+ props,
234
+ { withAllProps: false }
235
+ );
183
236
  return /* @__PURE__ */ jsxs(Table.Tr, { ...trProps, children: [
184
237
  generateCells(NonEmptyCell, schema, childPath, enabled, cells),
185
- NavigationComponent ? /* @__PURE__ */ jsx(NoBorderTableCell, { style: showSortButtons ? styles.fixedCell : styles.fixedCellSmall, children: NavigationComponent }) : null
238
+ NavigationComponent ? ActionsComponent === void 0 ? /* @__PURE__ */ jsx(NoBorderTableCell, { ..._actionsProps }) : ActionsComponent : null
186
239
  ] }, childPath);
187
240
  };
188
241
  const NonEmptyRow = React.memo(NonEmptyRowComponent);
@@ -203,7 +256,7 @@ const TableRows = (props) => {
203
256
  } = props;
204
257
  const isEmptyTable = data === 0;
205
258
  if (isEmptyTable) {
206
- return /* @__PURE__ */ jsx(EmptyTable, { numColumns: getValidColumnProps(schema).length + 1, translations });
259
+ return /* @__PURE__ */ jsx(EmptyTable, { numColumns: getValidColumnProps(schema).length + 1, translations, path });
207
260
  }
208
261
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
209
262
  return range(data).map((index) => {
@@ -254,13 +307,32 @@ const MantineTableControl = memo(function MantineTableControl2(props) {
254
307
  const headerCells = isObjectSchema ? generateCells(TableHeaderCell, schema, path, enabled, cells) : void 0;
255
308
  const isEnabled = enabled && !doDisableAdd;
256
309
  const headerErrors = useArrayHeaderErrors(path, schema);
257
- const [Component, _props] = useContextProps("Table", `${path}.Table`, {}, props, { withAllProps: false });
258
- if (!visible) {
259
- return null;
260
- }
261
- if (Component === void 0) {
262
- return /* @__PURE__ */ jsxs(Table, { ..._props, children: [
263
- /* @__PURE__ */ jsxs(Table.Thead, { children: [
310
+ const [HeaderActionsComponent, _headerActionsProps] = useContextProps(
311
+ "Table.Header.Actions",
312
+ `${path}.Header.Actions`,
313
+ {},
314
+ props,
315
+ { withAllProps: false }
316
+ );
317
+ const headerActionsEl = HeaderActionsComponent === void 0 ? /* @__PURE__ */ jsx(Table.Th, { ..._headerActionsProps }) : HeaderActionsComponent;
318
+ const [HeaderTrComponent, _headerTrProps] = useContextProps(
319
+ "Table.Header.Tr",
320
+ `${path}.Header.Tr`,
321
+ {
322
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
323
+ headerCells,
324
+ isEnabled ? headerActionsEl : null
325
+ ] })
326
+ },
327
+ props,
328
+ { withAllProps: false }
329
+ );
330
+ const headerTrEl = HeaderTrComponent === void 0 ? /* @__PURE__ */ jsx(Table.Tr, { ..._headerTrProps }) : HeaderTrComponent;
331
+ const [TheadComponent, _theadProps] = useContextProps(
332
+ "Table.Thead",
333
+ `${path}.Thead`,
334
+ {
335
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
264
336
  /* @__PURE__ */ jsx(
265
337
  TableToolbar,
266
338
  {
@@ -277,15 +349,37 @@ const MantineTableControl = memo(function MantineTableControl2(props) {
277
349
  translations
278
350
  }
279
351
  ),
280
- isObjectSchema && /* @__PURE__ */ jsxs(Table.Tr, { children: [
281
- headerCells,
282
- isEnabled ? /* @__PURE__ */ jsx(Table.Th, {}) : null
283
- ] })
284
- ] }),
285
- /* @__PURE__ */ jsx(Table.Tbody, { children: /* @__PURE__ */ jsx(TableRows, { ...props, disableRemove: doDisableRemove }) })
286
- ] });
352
+ isObjectSchema && headerTrEl
353
+ ] })
354
+ },
355
+ props,
356
+ { withAllProps: false }
357
+ );
358
+ const theadEl = TheadComponent === void 0 ? /* @__PURE__ */ jsx(Table.Thead, { ..._theadProps }) : TheadComponent;
359
+ const [TbodyComponent, _tbodyProps] = useContextProps(
360
+ "Table.Tbody",
361
+ `${path}.Tbody`,
362
+ { children: /* @__PURE__ */ jsx(TableRows, { ...props, disableRemove: doDisableRemove }) },
363
+ props,
364
+ { withAllProps: false }
365
+ );
366
+ const tbodyEl = TbodyComponent === void 0 ? /* @__PURE__ */ jsx(Table.Tbody, { ..._tbodyProps }) : TbodyComponent;
367
+ const [Component, _props] = useContextProps(
368
+ "Table",
369
+ `${path}.Table`,
370
+ {
371
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
372
+ theadEl,
373
+ tbodyEl
374
+ ] })
375
+ },
376
+ props,
377
+ { withAllProps: false }
378
+ );
379
+ if (!visible) {
380
+ return null;
287
381
  }
288
- return Component;
382
+ return Component === void 0 ? /* @__PURE__ */ jsx(Table, { ..._props }) : Component;
289
383
  });
290
384
  export {
291
385
  MantineTableControl,
@@ -1,7 +1,8 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { createDefaultValue } from "../../../../../../../../.external/esm/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.mjs";
3
3
  import { Table } from "@mantine/core";
4
4
  import { memo } from "react";
5
+ import { useContextProps } from "../../hooks/useContextProps.mjs";
5
6
  import { useToolbarComponent } from "../../hooks/useToolbarComponent.mjs";
6
7
  import { NoBorderTableCell } from "./NoBorderTableCell.mjs";
7
8
  const fixedCellSmall = {
@@ -16,10 +17,35 @@ const TableToolbar = memo(function TableToolbar2(props) {
16
17
  onAdd: addItem(path, createDefaultValue(schema, rootSchema)),
17
18
  ...props
18
19
  });
19
- return /* @__PURE__ */ jsxs(Table.Tr, { children: [
20
- /* @__PURE__ */ jsx(NoBorderTableCell, { p: 0, colSpan: numColumns, children: ToolbarComponent }),
21
- enabled && ToolbarAdd && /* @__PURE__ */ jsx(NoBorderTableCell, { p: 0, align: "right", style: fixedCellSmall, children: ToolbarAdd })
22
- ] });
20
+ const [ToolbarCell, _toolbarCellProps] = useContextProps(
21
+ "Table.Header.Toolbar.Cell",
22
+ `${path}.Header.Toolbar.Cell`,
23
+ { p: 0, colSpan: numColumns, children: ToolbarComponent },
24
+ props,
25
+ { withAllProps: false }
26
+ );
27
+ const [ToolbarAddCell, _toolbarAddCellProps] = useContextProps(
28
+ "Table.Header.Toolbar.Add",
29
+ `${path}.Header.Toolbar.Add`,
30
+ { p: 0, align: "right", style: fixedCellSmall, children: ToolbarAdd },
31
+ props,
32
+ { withAllProps: false }
33
+ );
34
+ const toolbarCellEl = ToolbarCell === void 0 ? /* @__PURE__ */ jsx(NoBorderTableCell, { ..._toolbarCellProps }) : ToolbarCell;
35
+ const toolbarAddCellEl = ToolbarAddCell === void 0 ? /* @__PURE__ */ jsx(NoBorderTableCell, { ..._toolbarAddCellProps }) : ToolbarAddCell;
36
+ const [ToolbarTr, _toolbarTrProps] = useContextProps(
37
+ "Table.Header.Toolbar",
38
+ `${path}.Header.Toolbar`,
39
+ {
40
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
41
+ toolbarCellEl,
42
+ enabled && ToolbarAdd && toolbarAddCellEl
43
+ ] })
44
+ },
45
+ props,
46
+ { withAllProps: false }
47
+ );
48
+ return ToolbarTr === void 0 ? /* @__PURE__ */ jsx(Table.Tr, { ..._toolbarTrProps }) : ToolbarTr;
23
49
  });
24
50
  export {
25
51
  TableToolbar
@@ -11,13 +11,11 @@ function useContextProps(name, path, componentProps, jsonFormsProps, { withAllPr
11
11
  () => deepMerge(withAllProps ? allProps : void 0, _componentProps, contextProps),
12
12
  [_componentProps, allProps, contextProps, withAllProps]
13
13
  );
14
- return [
15
- parseFromValuesOrFunc(component, { componentProps, jsonFormsProps }),
16
- {
17
- ...withComponentProps ? componentProps : {},
18
- ...parseFromValuesOrFunc(props, { componentProps, jsonFormsProps })
19
- }
20
- ];
14
+ const mergedProps = {
15
+ ...withComponentProps ? componentProps : {},
16
+ ...parseFromValuesOrFunc(props, { componentProps, jsonFormsProps })
17
+ };
18
+ return [parseFromValuesOrFunc(component, { componentProps: mergedProps, jsonFormsProps }), mergedProps];
21
19
  }
22
20
  export {
23
21
  useContextProps
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useContextProps } from "./useContextProps.mjs";
3
- import { useProps, Grid, ActionIcon } from "@mantine/core";
3
+ import { useProps, ActionIcon, Grid } from "@mantine/core";
4
4
  import { useMemo } from "react";
5
5
  import ForwardRef$1 from "../../../../_virtual/arrow-down.mjs";
6
6
  import ForwardRef from "../../../../_virtual/arrow-up.mjs";
@@ -18,7 +18,8 @@ const useNavigationComponent = (props) => {
18
18
  ["aria-label"]: translations == null ? void 0 : translations.upAriaLabel,
19
19
  onClick: onUp,
20
20
  disabled: !enableUp,
21
- ...iconProps
21
+ ...iconProps,
22
+ children: /* @__PURE__ */ jsx(ForwardRef, {})
22
23
  },
23
24
  rest,
24
25
  { withAllProps: false }
@@ -31,7 +32,8 @@ const useNavigationComponent = (props) => {
31
32
  ["aria-label"]: translations == null ? void 0 : translations.downAriaLabel,
32
33
  onClick: onDown,
33
34
  disabled: !enableDown,
34
- ...iconProps
35
+ ...iconProps,
36
+ children: /* @__PURE__ */ jsx(ForwardRef$1, {})
35
37
  },
36
38
  rest,
37
39
  { withAllProps: false }
@@ -44,22 +46,44 @@ const useNavigationComponent = (props) => {
44
46
  title: translations == null ? void 0 : translations.removeTooltip,
45
47
  ["aria-label"]: translations == null ? void 0 : translations.removeAriaLabel,
46
48
  onClick: onDelete,
47
- ...iconProps
49
+ ...iconProps,
50
+ children: /* @__PURE__ */ jsx(ForwardRef$2, {})
48
51
  },
49
52
  rest,
50
53
  { withAllProps: false }
51
54
  );
55
+ const [ComponentUpCol, _up_col_props] = useContextProps(
56
+ `${componentName}.${componentIdentifier}.Up.Col`,
57
+ `${childPath}.${componentIdentifier}.Up.Col`,
58
+ { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._up_props }) },
59
+ rest,
60
+ { withAllProps: false }
61
+ );
62
+ const [ComponentDownCol, _down_col_props] = useContextProps(
63
+ `${componentName}.${componentIdentifier}.Down.Col`,
64
+ `${childPath}.${componentIdentifier}.Down.Col`,
65
+ { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._down_props }) },
66
+ rest,
67
+ { withAllProps: false }
68
+ );
69
+ const [ComponentRemoveCol, _remove_col_props] = useContextProps(
70
+ `${componentName}.${componentIdentifier}.Remove.Col`,
71
+ `${childPath}.${componentIdentifier}.Remove.Col`,
72
+ { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._remove_props }) },
73
+ rest,
74
+ { withAllProps: false }
75
+ );
52
76
  const ActionIconUp = useMemo(
53
- () => ComponentUp === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._up_props, children: /* @__PURE__ */ jsx(ForwardRef, {}) }) }) : ComponentUp,
54
- [ComponentUp, _up_props]
77
+ () => ComponentUp === void 0 ? ComponentUpCol === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { ..._up_col_props }) : ComponentUpCol : ComponentUp,
78
+ [ComponentUp, ComponentUpCol, _up_col_props]
55
79
  );
56
80
  const ActionIconDown = useMemo(
57
- () => ComponentDown === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._down_props, children: /* @__PURE__ */ jsx(ForwardRef$1, {}) }) }) : ComponentDown,
58
- [ComponentDown, _down_props]
81
+ () => ComponentDown === void 0 ? ComponentDownCol === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { ..._down_col_props }) : ComponentDownCol : ComponentDown,
82
+ [ComponentDown, ComponentDownCol, _down_col_props]
59
83
  );
60
84
  const ActionIconRemove = useMemo(
61
- () => ComponentRemove === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._remove_props, children: /* @__PURE__ */ jsx(ForwardRef$2, {}) }) }) : ComponentRemove,
62
- [ComponentRemove, _remove_props]
85
+ () => ComponentRemove === void 0 ? ComponentRemoveCol === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { ..._remove_col_props }) : ComponentRemoveCol : ComponentRemove,
86
+ [ComponentRemove, ComponentRemoveCol, _remove_col_props]
63
87
  );
64
88
  const SortButtons = useMemo(
65
89
  () => /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -74,10 +98,21 @@ const useNavigationComponent = (props) => {
74
98
  );
75
99
  const enableRemove = useMemo(() => !disableRemove && !!ActionIconRemove, [disableRemove, ActionIconRemove]);
76
100
  const showComponent = useMemo(() => enableSort || enableRemove, [enableSort, enableRemove]);
77
- return showComponent ? /* @__PURE__ */ jsxs(Grid, { justify: "flex-end", align: "center", children: [
78
- enableSort && SortButtons,
79
- enableRemove && ActionIconRemove
80
- ] }) : void 0;
101
+ const [ComponentGrid, _grid_props] = useContextProps(
102
+ `${componentName}.${componentIdentifier}.Grid`,
103
+ `${childPath}.${componentIdentifier}.Grid`,
104
+ {
105
+ justify: "flex-end",
106
+ align: "center",
107
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
108
+ enableSort && SortButtons,
109
+ enableRemove && ActionIconRemove
110
+ ] })
111
+ },
112
+ rest,
113
+ { withAllProps: false }
114
+ );
115
+ return showComponent ? ComponentGrid === void 0 ? /* @__PURE__ */ jsx(Grid, { ..._grid_props }) : ComponentGrid : void 0;
81
116
  };
82
117
  export {
83
118
  useNavigationComponent
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { useContextProps } from "./useContextProps.mjs";
3
3
  import { useProps, Input, ActionIcon, Flex, Tooltip, Indicator, Stack, Text } from "@mantine/core";
4
4
  import ForwardRef$1 from "../../../../_virtual/exclamation-circle.mjs";
@@ -64,7 +64,8 @@ const useToolbarComponent = (props) => {
64
64
  id: "tooltip-add",
65
65
  title: translations == null ? void 0 : translations.addTooltip,
66
66
  onClick: onAdd,
67
- ...iconProps
67
+ ...iconProps,
68
+ children: /* @__PURE__ */ jsx(ForwardRef, {})
68
69
  },
69
70
  rest,
70
71
  {}
@@ -72,18 +73,37 @@ const useToolbarComponent = (props) => {
72
73
  const TextLabel = ComponentLabel === void 0 ? (_label_props == null ? void 0 : _label_props.value) ? /* @__PURE__ */ jsx(Input.Label, { children: _label_props == null ? void 0 : _label_props.value }) : null : ComponentLabel;
73
74
  const TextDescription = ComponentDescription === void 0 ? (_description_props == null ? void 0 : _description_props.value) ? /* @__PURE__ */ jsx(Input.Description, { children: _description_props == null ? void 0 : _description_props.value }) : null : ComponentDescription;
74
75
  const IconValidation = ComponentValidation === void 0 ? /* @__PURE__ */ jsx(ValidationIcon, { ..._validation_props }) : ComponentValidation;
75
- const ActionIconAdd = ComponentAdd === void 0 ? /* @__PURE__ */ jsx(ActionIcon, { ..._add_props, children: /* @__PURE__ */ jsx(ForwardRef, {}) }) : ComponentAdd;
76
- return [
77
- // eslint-disable-next-line react/jsx-key
78
- /* @__PURE__ */ jsxs(Input.Wrapper, { children: [
79
- /* @__PURE__ */ jsxs(Flex, { justify: "flex-start", align: "center", gap: "sm", children: [
76
+ const ActionIconAdd = ComponentAdd === void 0 ? /* @__PURE__ */ jsx(ActionIcon, { ..._add_props }) : ComponentAdd;
77
+ const [ComponentFlex, _flex_props] = useContextProps(
78
+ `${componentName}.${componentIdentifier}.Flex`,
79
+ `${path}.${componentIdentifier}.Flex`,
80
+ {
81
+ justify: "flex-start",
82
+ align: "center",
83
+ gap: "sm",
84
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
80
85
  TextLabel,
81
86
  IconValidation
82
- ] }),
83
- TextDescription
84
- ] }),
85
- ActionIconAdd
86
- ];
87
+ ] })
88
+ },
89
+ rest,
90
+ { withAllProps: false }
91
+ );
92
+ const flexEl = ComponentFlex === void 0 ? /* @__PURE__ */ jsx(Flex, { ..._flex_props }) : ComponentFlex;
93
+ const [ComponentWrapper, _wrapper_props] = useContextProps(
94
+ `${componentName}.${componentIdentifier}.Wrapper`,
95
+ `${path}.${componentIdentifier}.Wrapper`,
96
+ {
97
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
98
+ flexEl,
99
+ TextDescription
100
+ ] })
101
+ },
102
+ rest,
103
+ { withAllProps: false }
104
+ );
105
+ const wrapperEl = ComponentWrapper === void 0 ? /* @__PURE__ */ jsx(Input.Wrapper, { ..._wrapper_props }) : ComponentWrapper;
106
+ return [wrapperEl, ActionIconAdd];
87
107
  };
88
108
  export {
89
109
  useToolbarComponent
@@ -2,12 +2,20 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { rankWith, isLabelable } from "../../../../../../../.external/esm/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.mjs";
3
3
  import { withJsonFormsLabelProps } from "../../../../../../../.external/esm/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.3/@jsonforms/react/lib/jsonforms-react.esm.mjs";
4
4
  import { Title } from "@mantine/core";
5
+ import { useContextProps } from "../hooks/useContextProps.mjs";
5
6
  const Component = (props) => {
6
7
  const { text, visible } = props;
8
+ const [CustomComponent, _props] = useContextProps(
9
+ "Label",
10
+ `Label.${text}`,
11
+ { fw: "bold", size: "xl", children: text },
12
+ props,
13
+ { withAllProps: false }
14
+ );
7
15
  if (!visible) {
8
16
  return null;
9
17
  }
10
- return /* @__PURE__ */ jsx(Title, { fw: "bold", size: "xl", children: text });
18
+ return CustomComponent === void 0 ? /* @__PURE__ */ jsx(Title, { ..._props }) : CustomComponent;
11
19
  };
12
20
  const mantineLabelTester = rankWith(1, isLabelable);
13
21
  const MantineLabelRenderer = withJsonFormsLabelProps(Component);
@@ -1,6 +1,7 @@
1
- import { jsxs } from "react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { Group } from "@mantine/core";
3
3
  import React from "react";
4
+ import { useContextProps } from "../../hooks/useContextProps.mjs";
4
5
  import { useToolbarComponent } from "../../hooks/useToolbarComponent.mjs";
5
6
  const ArrayLayoutToolbar = React.memo(function ArrayLayoutToolbar2(props) {
6
7
  const { addItem, path, enabled, createDefault } = props;
@@ -10,10 +11,20 @@ const ArrayLayoutToolbar = React.memo(function ArrayLayoutToolbar2(props) {
10
11
  onAdd: addItem(path, createDefault()),
11
12
  ...props
12
13
  });
13
- return /* @__PURE__ */ jsxs(Group, { justify: "space-between", children: [
14
- ToolbarComponent,
15
- enabled && ToolbarAdd
16
- ] });
14
+ const [ToolbarGroup, _toolbarGroupProps] = useContextProps(
15
+ "Array.Header.Group",
16
+ `${path}.Header.Group`,
17
+ {
18
+ justify: "space-between",
19
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ ToolbarComponent,
21
+ enabled && ToolbarAdd
22
+ ] })
23
+ },
24
+ props,
25
+ { withAllProps: false }
26
+ );
27
+ return ToolbarGroup === void 0 ? /* @__PURE__ */ jsx(Group, { ..._toolbarGroupProps }) : ToolbarGroup;
17
28
  });
18
29
  export {
19
30
  ArrayLayoutToolbar
@@ -1,9 +1,10 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { createId, removeId, findUISchema, Paths, computeChildLabel, update, moveDown, moveUp } from "../../../../../../../../.external/esm/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.mjs";
3
3
  import { JsonFormsDispatch, withJsonFormsContext } from "../../../../../../../../.external/esm/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.3/@jsonforms/react/lib/jsonforms-react.esm.mjs";
4
- import { Accordion, Center, Group, Stack, Avatar } from "@mantine/core";
4
+ import { Avatar, Stack, Group, Accordion, Center } from "@mantine/core";
5
5
  import merge from "../../../../../_virtual/merge.mjs";
6
6
  import React, { useState, useEffect, useMemo, useCallback } from "react";
7
+ import { useContextProps } from "../../hooks/useContextProps.mjs";
7
8
  import { useNavigationComponent } from "../../hooks/useNavigationComponent.mjs";
8
9
  const Component = (props) => {
9
10
  const [labelHtmlId] = useState(createId("expand-panel"));
@@ -45,24 +46,88 @@ const Component = (props) => {
45
46
  showSortButtons,
46
47
  ...props
47
48
  });
48
- return /* @__PURE__ */ jsxs(Accordion.Item, { value: childPath, children: [
49
- /* @__PURE__ */ jsx(Center, { children: /* @__PURE__ */ jsx(Accordion.Control, { component: "div", icon: /* @__PURE__ */ jsx(Avatar, { children: index + 1 }), children: /* @__PURE__ */ jsxs(Group, { justify: "space-between", pr: "md", children: [
50
- /* @__PURE__ */ jsx(Stack, { children: childLabel }),
51
- NavigationComponent
52
- ] }) }) }),
53
- /* @__PURE__ */ jsx(Accordion.Panel, { children: /* @__PURE__ */ jsx(
54
- JsonFormsDispatch,
55
- {
56
- enabled,
57
- schema,
58
- uischema: foundUISchema,
59
- path: childPath,
60
- renderers,
61
- cells
62
- },
63
- childPath
64
- ) })
65
- ] });
49
+ const [AvatarComp, _avatarProps] = useContextProps(
50
+ "Array.Item.Avatar",
51
+ `${childPath}.Item.Avatar`,
52
+ { children: index + 1 },
53
+ props,
54
+ { withAllProps: false }
55
+ );
56
+ const avatarEl = AvatarComp === void 0 ? /* @__PURE__ */ jsx(Avatar, { ..._avatarProps }) : AvatarComp;
57
+ const [StackComp, _stackProps] = useContextProps(
58
+ "Array.Item.Stack",
59
+ `${childPath}.Item.Stack`,
60
+ { children: childLabel },
61
+ props,
62
+ { withAllProps: false }
63
+ );
64
+ const stackEl = StackComp === void 0 ? /* @__PURE__ */ jsx(Stack, { ..._stackProps }) : StackComp;
65
+ const [GroupComp, _groupProps] = useContextProps(
66
+ "Array.Item.Group",
67
+ `${childPath}.Item.Group`,
68
+ {
69
+ justify: "space-between",
70
+ pr: "md",
71
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
72
+ stackEl,
73
+ NavigationComponent
74
+ ] })
75
+ },
76
+ props,
77
+ { withAllProps: false }
78
+ );
79
+ const groupEl = GroupComp === void 0 ? /* @__PURE__ */ jsx(Group, { ..._groupProps }) : GroupComp;
80
+ const [ControlComp, _controlProps] = useContextProps(
81
+ "Array.Item.Control",
82
+ `${childPath}.Item.Control`,
83
+ { component: "div", icon: avatarEl, children: groupEl },
84
+ props,
85
+ { withAllProps: false }
86
+ );
87
+ const controlEl = ControlComp === void 0 ? /* @__PURE__ */ jsx(Accordion.Control, { ..._controlProps }) : ControlComp;
88
+ const [CenterComp, _centerProps] = useContextProps(
89
+ "Array.Item.Center",
90
+ `${childPath}.Item.Center`,
91
+ { children: controlEl },
92
+ props,
93
+ { withAllProps: false }
94
+ );
95
+ const centerEl = CenterComp === void 0 ? /* @__PURE__ */ jsx(Center, { ..._centerProps }) : CenterComp;
96
+ const [PanelComp, _panelProps] = useContextProps(
97
+ "Array.Item.Panel",
98
+ `${childPath}.Item.Panel`,
99
+ {
100
+ children: /* @__PURE__ */ jsx(
101
+ JsonFormsDispatch,
102
+ {
103
+ enabled,
104
+ schema,
105
+ uischema: foundUISchema,
106
+ path: childPath,
107
+ renderers,
108
+ cells
109
+ },
110
+ childPath
111
+ )
112
+ },
113
+ props,
114
+ { withAllProps: false }
115
+ );
116
+ const panelEl = PanelComp === void 0 ? /* @__PURE__ */ jsx(Accordion.Panel, { ..._panelProps }) : PanelComp;
117
+ const [ItemComp, _itemProps] = useContextProps(
118
+ "Array.Item.Accordion",
119
+ `${childPath}.Item.Accordion`,
120
+ {
121
+ value: childPath,
122
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
123
+ centerEl,
124
+ panelEl
125
+ ] })
126
+ },
127
+ props,
128
+ { withAllProps: false }
129
+ );
130
+ return ItemComp === void 0 ? /* @__PURE__ */ jsx(Accordion.Item, { value: childPath, ..._itemProps }) : ItemComp;
66
131
  };
67
132
  const MemoComponent = React.memo(Component);
68
133
  const useCtxDispatchToExpandPanelProps = (dispatch) => ({