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
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var compile = {};
4
- exports.__exports = compile;
3
+ var format = {};
4
+ exports.__exports = format;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var codegen = {};
4
- exports.__exports = codegen;
3
+ var discriminator = {};
4
+ exports.__exports = discriminator;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var discriminator = {};
4
- exports.__exports = discriminator;
3
+ var validate = {};
4
+ exports.__exports = validate;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var validate = {};
4
- exports.__exports = validate;
3
+ var codegen = {};
4
+ exports.__exports = codegen;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var core = {};
4
- exports.__exports = core;
3
+ var compile = {};
4
+ exports.__exports = compile;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var validation = {};
4
- exports.__exports = validation;
3
+ var core = {};
4
+ exports.__exports = core;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var applicator = {};
4
- exports.__exports = applicator;
3
+ var validation = {};
4
+ exports.__exports = validation;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- var format = {};
4
- exports.__exports = format;
3
+ var applicator = {};
4
+ exports.__exports = applicator;
@@ -19,13 +19,22 @@ const InnerMantineFileInput = (props) => {
19
19
  const fileProps = useFileProps.useFileProps({ value, onChange: commonProps.onChange, accept, errors });
20
20
  const componentProps = React.useMemo(() => ({ ...commonProps, ...fileProps }), [commonProps, fileProps]);
21
21
  const [Component, _props] = useContextProps.useContextProps(contextName, path, componentProps, rest);
22
+ const [BoxComponent, _boxProps] = useContextProps.useContextProps(
23
+ `${contextName}.Box`,
24
+ `${path}.Box`,
25
+ {
26
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
27
+ /* @__PURE__ */ jsxRuntime.jsx(core.FileInput, { ..._props }),
28
+ utils.parseFromValuesOrFunc(children, { componentProps, jsonFormsProps: rest })
29
+ ] })
30
+ },
31
+ rest,
32
+ { withAllProps: false }
33
+ );
22
34
  if (!rest.visible) {
23
35
  return null;
24
36
  }
25
- return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `${componentName}-${path}`, ..._props, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Box, { children: [
26
- /* @__PURE__ */ jsxRuntime.jsx(core.FileInput, { ..._props }),
27
- utils.parseFromValuesOrFunc(children, { componentProps, jsonFormsProps: rest })
28
- ] }) }) : Component;
37
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(utils.MemoWrapper, { componentName: `${componentName}-${path}`, ..._props, children: BoxComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Box, { ..._boxProps }) : BoxComponent }) : Component;
29
38
  };
30
39
  function MantineFileInput(props) {
31
40
  return /* @__PURE__ */ jsxRuntime.jsx(InnerMantineFileInput, { ...props, contextName: "File", componentName: "MantineFileInput" });
@@ -3,8 +3,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const jsonformsCore_esm = require("../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
5
5
  const jsonformsReact_esm = require("../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.3/@jsonforms/react/lib/jsonforms-react.esm.cjs");
6
+ const core = require("@mantine/core");
6
7
  const lodash = require("../../../../_virtual/lodash.cjs");
7
8
  const React = require("react");
9
+ const useContextProps = require("../hooks/useContextProps.cjs");
8
10
  function MantineObjectInput(props) {
9
11
  const { renderers, cells, uischemas, schema, path, visible, enabled, uischema, rootSchema } = props;
10
12
  const label = "label" in props ? props.label : void 0;
@@ -23,20 +25,29 @@ function MantineObjectInput(props) {
23
25
  ),
24
26
  [uischemas, schema, path, label, uischema, rootSchema]
25
27
  );
28
+ const [Component, _props] = useContextProps.useContextProps(
29
+ "Object",
30
+ `${path}.Object`,
31
+ {
32
+ children: /* @__PURE__ */ jsxRuntime.jsx(
33
+ jsonformsReact_esm.JsonFormsDispatch,
34
+ {
35
+ visible,
36
+ enabled,
37
+ schema,
38
+ uischema: detailUiSchema,
39
+ path,
40
+ renderers,
41
+ cells
42
+ }
43
+ )
44
+ },
45
+ props,
46
+ { withAllProps: false }
47
+ );
26
48
  if (!visible) {
27
49
  return null;
28
50
  }
29
- return /* @__PURE__ */ jsxRuntime.jsx(
30
- jsonformsReact_esm.JsonFormsDispatch,
31
- {
32
- visible,
33
- enabled,
34
- schema,
35
- uischema: detailUiSchema,
36
- path,
37
- renderers,
38
- cells
39
- }
40
- );
51
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Box, { ..._props }) : Component;
41
52
  }
42
53
  exports.MantineObjectInput = MantineObjectInput;
@@ -3,14 +3,45 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const core = require("@mantine/core");
5
5
  const React = require("react");
6
+ const useContextProps = require("../../hooks/useContextProps.cjs");
6
7
  const DeleteDialog = React.memo(function DeleteDialog2(props) {
7
8
  const { open, onClose, onConfirm, onCancel, title, message, acceptText, declineText } = props;
8
- return /* @__PURE__ */ jsxRuntime.jsx(core.Modal, { opened: open, withCloseButton: false, centered: true, title, keepMounted: true, onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { children: [
9
- /* @__PURE__ */ jsxRuntime.jsx(core.Text, { children: message }),
10
- /* @__PURE__ */ jsxRuntime.jsxs(core.Flex, { justify: "flex-end", align: "center", gap: "md", children: [
11
- /* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: onCancel, children: declineText }),
12
- /* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: onConfirm, children: acceptText })
13
- ] })
14
- ] }) });
9
+ const [FlexComponent, _flexProps] = useContextProps.useContextProps(
10
+ "Array.DeleteDialog.Flex",
11
+ "Array.DeleteDialog.Flex",
12
+ {
13
+ justify: "flex-end",
14
+ align: "center",
15
+ gap: "md",
16
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
17
+ /* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: onCancel, children: declineText }),
18
+ /* @__PURE__ */ jsxRuntime.jsx(core.Button, { onClick: onConfirm, children: acceptText })
19
+ ] })
20
+ },
21
+ props,
22
+ { withAllProps: false }
23
+ );
24
+ const flexEl = FlexComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Flex, { ..._flexProps }) : FlexComponent;
25
+ const [StackComponent, _stackProps] = useContextProps.useContextProps(
26
+ "Array.DeleteDialog.Stack",
27
+ "Array.DeleteDialog.Stack",
28
+ {
29
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
30
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { children: message }),
31
+ flexEl
32
+ ] })
33
+ },
34
+ props,
35
+ { withAllProps: false }
36
+ );
37
+ const stackEl = StackComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Stack, { ..._stackProps }) : StackComponent;
38
+ const [ModalComponent, _modalProps] = useContextProps.useContextProps(
39
+ "Array.DeleteDialog",
40
+ "Array.DeleteDialog",
41
+ { withCloseButton: false, centered: true, title, keepMounted: true, opened: open, onClose, children: stackEl },
42
+ props,
43
+ { withAllProps: false }
44
+ );
45
+ return ModalComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Modal, { opened: open, onClose, ..._modalProps }) : ModalComponent;
15
46
  });
16
47
  exports.DeleteDialog = DeleteDialog;
@@ -5,6 +5,7 @@ const jsonformsCore_esm = require("../../../../../../../../.external/cjs/@jsonfo
5
5
  const jsonformsReact_esm = require("../../../../../../../../.external/cjs/@jsonforms_react@3.7.0_@jsonforms_core@3.7.0_react@19.2.3/@jsonforms/react/lib/jsonforms-react.esm.cjs");
6
6
  const core = require("@mantine/core");
7
7
  const React = require("react");
8
+ const useContextProps = require("../../hooks/useContextProps.cjs");
8
9
  const useThemeCustomizer = require("../../hooks/useThemeCustomizer.cjs");
9
10
  const isEnumArrayArrayControl = require("../../testers/isEnumArrayArrayControl.cjs");
10
11
  const isFilesControl = require("../../testers/isFilesControl.cjs");
@@ -55,17 +56,21 @@ const Component = (props) => {
55
56
  )
56
57
  ] });
57
58
  };
58
- const FileArrayComponent = (props) => /* @__PURE__ */ jsxRuntime.jsx(
59
- core.MantineThemeProvider,
60
- {
61
- theme: useThemeCustomizer.useThemeCustomizer({
62
- "Table.Header.Validation": {
63
- component: /* @__PURE__ */ jsxRuntime.jsx(core.Box, { style: { display: "none" } })
64
- }
65
- }),
66
- children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props })
67
- }
68
- );
59
+ const FileArrayComponent = (props) => {
60
+ const [HiddenBox, _hiddenBoxProps] = useContextProps.useContextProps(
61
+ "Array.File.HiddenValidation",
62
+ "Array.File.HiddenValidation",
63
+ { style: { display: "none" } },
64
+ props,
65
+ { withAllProps: false }
66
+ );
67
+ const theme = useThemeCustomizer.useThemeCustomizer({
68
+ "Table.Header.Validation": {
69
+ component: HiddenBox === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Box, { ..._hiddenBoxProps }) : HiddenBox
70
+ }
71
+ });
72
+ return /* @__PURE__ */ jsxRuntime.jsx(core.MantineThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props }) });
73
+ };
69
74
  const mantineArrayControlTester = jsonformsCore_esm.rankWith(
70
75
  1,
71
76
  jsonformsCore_esm.or(jsonformsCore_esm.isObjectArrayControl, jsonformsCore_esm.isPrimitiveArrayControl, isEnumArrayArrayControl.isEnumArrayArrayControl, isJsonArrayControl.isJsonArrayControl)
@@ -68,8 +68,18 @@ const getValidColumnProps = (scopedSchema) => {
68
68
  return [""];
69
69
  };
70
70
  const EmptyTable = (props) => {
71
- const { numColumns, translations } = props;
72
- return /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tr, { children: /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { colSpan: numColumns, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ta: "center", children: translations.noDataMessage }) }) });
71
+ const { numColumns, translations, path } = props;
72
+ const [EmptyComponent, _emptyProps] = useContextProps.useContextProps(
73
+ "Table.Empty",
74
+ `${path}.Empty`,
75
+ {
76
+ colSpan: numColumns,
77
+ children: /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { colSpan: numColumns, children: /* @__PURE__ */ jsxRuntime.jsx(core.Text, { ta: "center", children: translations.noDataMessage }) })
78
+ },
79
+ props,
80
+ { withAllProps: false }
81
+ );
82
+ return EmptyComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tr, { ..._emptyProps }) : EmptyComponent;
73
83
  };
74
84
  const TableHeaderCell = React.memo(function TableHeaderCell2(props) {
75
85
  const { title, rowPath, propName, index } = props;
@@ -121,24 +131,57 @@ const NonEmptyCellComponent = React.memo(function NonEmptyCellComponent2(props)
121
131
  [path, propName]
122
132
  );
123
133
  const index = React.useMemo(() => path.split(".").slice(-1)[0], [path]);
134
+ const rowIndex = React.useMemo(() => path.split(".")[originalPath.split(".").length], [path, originalPath]);
124
135
  const generalRowProps = core.useProps("Table.Row", {}, {});
125
136
  const arrayRowProps = core.useProps(originalPath, {}, {});
126
137
  const indexedRowProps = core.useProps(`Table.Row.${index}`, {}, {});
138
+ const propRowProps = core.useProps(propName ? `${originalPath}.${propName}` : path, {}, {});
139
+ const numberedRowProps = core.useProps(propName ? `Table.Row.${rowIndex}.${propName}` : `Table.Row.${rowIndex}`, {}, {});
127
140
  const specificRowProps = core.useProps(path, {}, {});
128
141
  const { component, props: _props } = React.useMemo(
129
142
  // #MUSTASSERT user-configured MantineThemeProvider row overrides flow through deepMerge as `{}`; narrow to the RowOverride shape consumed below
130
- () => utils.deepMerge(generalRowProps, arrayRowProps, indexedRowProps, specificRowProps),
131
- [generalRowProps, arrayRowProps, indexedRowProps, specificRowProps]
143
+ () => utils.deepMerge(
144
+ generalRowProps,
145
+ arrayRowProps,
146
+ indexedRowProps,
147
+ propRowProps,
148
+ numberedRowProps,
149
+ specificRowProps
150
+ ),
151
+ [generalRowProps, arrayRowProps, indexedRowProps, propRowProps, numberedRowProps, specificRowProps]
132
152
  );
133
153
  const theme = useThemeCustomizer.useThemeCustomizer({ [path]: { component, props: _props } });
134
154
  const [, _tdProps] = useContextProps.useContextProps("Table.Row.Td", `${originalPath}.Td`, { maw: 0 }, props, {
135
155
  withAllProps: false
136
156
  });
137
- const [, __tdProps] = useContextProps.useContextProps(`Table.Row.${index}.Td`, `${path}.Td`, { maw: 0 }, props, {
157
+ const [, __tdProps] = useContextProps.useContextProps(
158
+ `Table.Row.${index}.Td`,
159
+ propName ? `${originalPath}.${propName}.Td` : `${path}.Td`,
160
+ {},
161
+ props,
162
+ {
163
+ withAllProps: false,
164
+ withComponentProps: false
165
+ }
166
+ );
167
+ const [, ___tdProps] = useContextProps.useContextProps(`${path}.Td`, `${path}.Td`, {}, props, {
138
168
  withAllProps: false,
139
169
  withComponentProps: false
140
170
  });
141
- const tdProps = React.useMemo(() => utils.deepMerge(_tdProps, __tdProps), [_tdProps, __tdProps]);
171
+ const [, _numberedTdProps] = useContextProps.useContextProps(
172
+ propName ? `Table.Row.${rowIndex}.${propName}.Td` : `Table.Row.${rowIndex}.Td`,
173
+ propName ? `Table.Row.${rowIndex}.${propName}.Td` : `Table.Row.${rowIndex}.Td`,
174
+ {},
175
+ props,
176
+ {
177
+ withAllProps: false,
178
+ withComponentProps: false
179
+ }
180
+ );
181
+ const tdProps = React.useMemo(
182
+ () => utils.deepMerge(_tdProps, __tdProps, _numberedTdProps, ___tdProps),
183
+ [_tdProps, __tdProps, _numberedTdProps, ___tdProps]
184
+ );
142
185
  return /* @__PURE__ */ jsxRuntime.jsx(core.MantineThemeProvider, { theme, children: /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { ...tdProps, children: schema.properties ? /* @__PURE__ */ jsxRuntime.jsx(
143
186
  jsonformsReact_esm.DispatchCell,
144
187
  {
@@ -182,9 +225,19 @@ const NonEmptyRowComponent = (props) => {
182
225
  withAllProps: false
183
226
  });
184
227
  const trProps = React.useMemo(() => utils.deepMerge(_trProps, __trProps), [_trProps, __trProps]);
228
+ const [ActionsComponent, _actionsProps] = useContextProps.useContextProps(
229
+ "Table.Row.Actions",
230
+ `${childPath}.Row.Actions`,
231
+ {
232
+ style: showSortButtons ? styles.fixedCell : styles.fixedCellSmall,
233
+ children: NavigationComponent
234
+ },
235
+ props,
236
+ { withAllProps: false }
237
+ );
185
238
  return /* @__PURE__ */ jsxRuntime.jsxs(core.Table.Tr, { ...trProps, children: [
186
239
  generateCells(NonEmptyCell, schema, childPath, enabled, cells),
187
- NavigationComponent ? /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { style: showSortButtons ? styles.fixedCell : styles.fixedCellSmall, children: NavigationComponent }) : null
240
+ NavigationComponent ? ActionsComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { ..._actionsProps }) : ActionsComponent : null
188
241
  ] }, childPath);
189
242
  };
190
243
  const NonEmptyRow = React.memo(NonEmptyRowComponent);
@@ -205,7 +258,7 @@ const TableRows = (props) => {
205
258
  } = props;
206
259
  const isEmptyTable = data === 0;
207
260
  if (isEmptyTable) {
208
- return /* @__PURE__ */ jsxRuntime.jsx(EmptyTable, { numColumns: getValidColumnProps(schema).length + 1, translations });
261
+ return /* @__PURE__ */ jsxRuntime.jsx(EmptyTable, { numColumns: getValidColumnProps(schema).length + 1, translations, path });
209
262
  }
210
263
  const appliedUiSchemaOptions = merge({}, config, uischema.options);
211
264
  return range(data).map((index) => {
@@ -256,13 +309,32 @@ const MantineTableControl = React.memo(function MantineTableControl2(props) {
256
309
  const headerCells = isObjectSchema ? generateCells(TableHeaderCell, schema, path, enabled, cells) : void 0;
257
310
  const isEnabled = enabled && !doDisableAdd;
258
311
  const headerErrors = useArrayHeaderErrors.useArrayHeaderErrors(path, schema);
259
- const [Component, _props] = useContextProps.useContextProps("Table", `${path}.Table`, {}, props, { withAllProps: false });
260
- if (!visible) {
261
- return null;
262
- }
263
- if (Component === void 0) {
264
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Table, { ..._props, children: [
265
- /* @__PURE__ */ jsxRuntime.jsxs(core.Table.Thead, { children: [
312
+ const [HeaderActionsComponent, _headerActionsProps] = useContextProps.useContextProps(
313
+ "Table.Header.Actions",
314
+ `${path}.Header.Actions`,
315
+ {},
316
+ props,
317
+ { withAllProps: false }
318
+ );
319
+ const headerActionsEl = HeaderActionsComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Th, { ..._headerActionsProps }) : HeaderActionsComponent;
320
+ const [HeaderTrComponent, _headerTrProps] = useContextProps.useContextProps(
321
+ "Table.Header.Tr",
322
+ `${path}.Header.Tr`,
323
+ {
324
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
325
+ headerCells,
326
+ isEnabled ? headerActionsEl : null
327
+ ] })
328
+ },
329
+ props,
330
+ { withAllProps: false }
331
+ );
332
+ const headerTrEl = HeaderTrComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tr, { ..._headerTrProps }) : HeaderTrComponent;
333
+ const [TheadComponent, _theadProps] = useContextProps.useContextProps(
334
+ "Table.Thead",
335
+ `${path}.Thead`,
336
+ {
337
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
266
338
  /* @__PURE__ */ jsxRuntime.jsx(
267
339
  TableToolbar.TableToolbar,
268
340
  {
@@ -279,15 +351,37 @@ const MantineTableControl = React.memo(function MantineTableControl2(props) {
279
351
  translations
280
352
  }
281
353
  ),
282
- isObjectSchema && /* @__PURE__ */ jsxRuntime.jsxs(core.Table.Tr, { children: [
283
- headerCells,
284
- isEnabled ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Th, {}) : null
285
- ] })
286
- ] }),
287
- /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tbody, { children: /* @__PURE__ */ jsxRuntime.jsx(TableRows, { ...props, disableRemove: doDisableRemove }) })
288
- ] });
354
+ isObjectSchema && headerTrEl
355
+ ] })
356
+ },
357
+ props,
358
+ { withAllProps: false }
359
+ );
360
+ const theadEl = TheadComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Thead, { ..._theadProps }) : TheadComponent;
361
+ const [TbodyComponent, _tbodyProps] = useContextProps.useContextProps(
362
+ "Table.Tbody",
363
+ `${path}.Tbody`,
364
+ { children: /* @__PURE__ */ jsxRuntime.jsx(TableRows, { ...props, disableRemove: doDisableRemove }) },
365
+ props,
366
+ { withAllProps: false }
367
+ );
368
+ const tbodyEl = TbodyComponent === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tbody, { ..._tbodyProps }) : TbodyComponent;
369
+ const [Component, _props] = useContextProps.useContextProps(
370
+ "Table",
371
+ `${path}.Table`,
372
+ {
373
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
374
+ theadEl,
375
+ tbodyEl
376
+ ] })
377
+ },
378
+ props,
379
+ { withAllProps: false }
380
+ );
381
+ if (!visible) {
382
+ return null;
289
383
  }
290
- return Component;
384
+ return Component === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table, { ..._props }) : Component;
291
385
  });
292
386
  exports.MantineTableControl = MantineTableControl;
293
387
  exports.NonEmptyRow = NonEmptyRow;
@@ -4,6 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
4
4
  const jsonformsCore_esm = require("../../../../../../../../.external/cjs/@jsonforms_core@3.7.0/@jsonforms/core/lib/jsonforms-core.esm.cjs");
5
5
  const core = require("@mantine/core");
6
6
  const React = require("react");
7
+ const useContextProps = require("../../hooks/useContextProps.cjs");
7
8
  const useToolbarComponent = require("../../hooks/useToolbarComponent.cjs");
8
9
  const NoBorderTableCell = require("./NoBorderTableCell.cjs");
9
10
  const fixedCellSmall = {
@@ -18,9 +19,34 @@ const TableToolbar = React.memo(function TableToolbar2(props) {
18
19
  onAdd: addItem(path, jsonformsCore_esm.createDefaultValue(schema, rootSchema)),
19
20
  ...props
20
21
  });
21
- return /* @__PURE__ */ jsxRuntime.jsxs(core.Table.Tr, { children: [
22
- /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { p: 0, colSpan: numColumns, children: ToolbarComponent }),
23
- enabled && ToolbarAdd && /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { p: 0, align: "right", style: fixedCellSmall, children: ToolbarAdd })
24
- ] });
22
+ const [ToolbarCell, _toolbarCellProps] = useContextProps.useContextProps(
23
+ "Table.Header.Toolbar.Cell",
24
+ `${path}.Header.Toolbar.Cell`,
25
+ { p: 0, colSpan: numColumns, children: ToolbarComponent },
26
+ props,
27
+ { withAllProps: false }
28
+ );
29
+ const [ToolbarAddCell, _toolbarAddCellProps] = useContextProps.useContextProps(
30
+ "Table.Header.Toolbar.Add",
31
+ `${path}.Header.Toolbar.Add`,
32
+ { p: 0, align: "right", style: fixedCellSmall, children: ToolbarAdd },
33
+ props,
34
+ { withAllProps: false }
35
+ );
36
+ const toolbarCellEl = ToolbarCell === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { ..._toolbarCellProps }) : ToolbarCell;
37
+ const toolbarAddCellEl = ToolbarAddCell === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(NoBorderTableCell.NoBorderTableCell, { ..._toolbarAddCellProps }) : ToolbarAddCell;
38
+ const [ToolbarTr, _toolbarTrProps] = useContextProps.useContextProps(
39
+ "Table.Header.Toolbar",
40
+ `${path}.Header.Toolbar`,
41
+ {
42
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
43
+ toolbarCellEl,
44
+ enabled && ToolbarAdd && toolbarAddCellEl
45
+ ] })
46
+ },
47
+ props,
48
+ { withAllProps: false }
49
+ );
50
+ return ToolbarTr === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Table.Tr, { ..._toolbarTrProps }) : ToolbarTr;
25
51
  });
26
52
  exports.TableToolbar = TableToolbar;
@@ -13,12 +13,10 @@ function useContextProps(name, path, componentProps, jsonFormsProps, { withAllPr
13
13
  () => utils.deepMerge(withAllProps ? allProps : void 0, _componentProps, contextProps),
14
14
  [_componentProps, allProps, contextProps, withAllProps]
15
15
  );
16
- return [
17
- utils.parseFromValuesOrFunc(component, { componentProps, jsonFormsProps }),
18
- {
19
- ...withComponentProps ? componentProps : {},
20
- ...utils.parseFromValuesOrFunc(props, { componentProps, jsonFormsProps })
21
- }
22
- ];
16
+ const mergedProps = {
17
+ ...withComponentProps ? componentProps : {},
18
+ ...utils.parseFromValuesOrFunc(props, { componentProps, jsonFormsProps })
19
+ };
20
+ return [utils.parseFromValuesOrFunc(component, { componentProps: mergedProps, jsonFormsProps }), mergedProps];
23
21
  }
24
22
  exports.useContextProps = useContextProps;
@@ -20,7 +20,8 @@ const useNavigationComponent = (props) => {
20
20
  ["aria-label"]: translations == null ? void 0 : translations.upAriaLabel,
21
21
  onClick: onUp,
22
22
  disabled: !enableUp,
23
- ...iconProps
23
+ ...iconProps,
24
+ children: /* @__PURE__ */ jsxRuntime.jsx(arrowUp, {})
24
25
  },
25
26
  rest,
26
27
  { withAllProps: false }
@@ -33,7 +34,8 @@ const useNavigationComponent = (props) => {
33
34
  ["aria-label"]: translations == null ? void 0 : translations.downAriaLabel,
34
35
  onClick: onDown,
35
36
  disabled: !enableDown,
36
- ...iconProps
37
+ ...iconProps,
38
+ children: /* @__PURE__ */ jsxRuntime.jsx(arrowDown, {})
37
39
  },
38
40
  rest,
39
41
  { withAllProps: false }
@@ -46,22 +48,44 @@ const useNavigationComponent = (props) => {
46
48
  title: translations == null ? void 0 : translations.removeTooltip,
47
49
  ["aria-label"]: translations == null ? void 0 : translations.removeAriaLabel,
48
50
  onClick: onDelete,
49
- ...iconProps
51
+ ...iconProps,
52
+ children: /* @__PURE__ */ jsxRuntime.jsx(trash, {})
50
53
  },
51
54
  rest,
52
55
  { withAllProps: false }
53
56
  );
57
+ const [ComponentUpCol, _up_col_props] = useContextProps.useContextProps(
58
+ `${componentName}.${componentIdentifier}.Up.Col`,
59
+ `${childPath}.${componentIdentifier}.Up.Col`,
60
+ { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._up_props }) },
61
+ rest,
62
+ { withAllProps: false }
63
+ );
64
+ const [ComponentDownCol, _down_col_props] = useContextProps.useContextProps(
65
+ `${componentName}.${componentIdentifier}.Down.Col`,
66
+ `${childPath}.${componentIdentifier}.Down.Col`,
67
+ { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._down_props }) },
68
+ rest,
69
+ { withAllProps: false }
70
+ );
71
+ const [ComponentRemoveCol, _remove_col_props] = useContextProps.useContextProps(
72
+ `${componentName}.${componentIdentifier}.Remove.Col`,
73
+ `${childPath}.${componentIdentifier}.Remove.Col`,
74
+ { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._remove_props }) },
75
+ rest,
76
+ { withAllProps: false }
77
+ );
54
78
  const ActionIconUp = React.useMemo(
55
- () => ComponentUp === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._up_props, children: /* @__PURE__ */ jsxRuntime.jsx(arrowUp, {}) }) }) : ComponentUp,
56
- [ComponentUp, _up_props]
79
+ () => ComponentUp === void 0 ? ComponentUpCol === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { ..._up_col_props }) : ComponentUpCol : ComponentUp,
80
+ [ComponentUp, ComponentUpCol, _up_col_props]
57
81
  );
58
82
  const ActionIconDown = React.useMemo(
59
- () => ComponentDown === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._down_props, children: /* @__PURE__ */ jsxRuntime.jsx(arrowDown, {}) }) }) : ComponentDown,
60
- [ComponentDown, _down_props]
83
+ () => ComponentDown === void 0 ? ComponentDownCol === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { ..._down_col_props }) : ComponentDownCol : ComponentDown,
84
+ [ComponentDown, ComponentDownCol, _down_col_props]
61
85
  );
62
86
  const ActionIconRemove = React.useMemo(
63
- () => ComponentRemove === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { span: "content", children: /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._remove_props, children: /* @__PURE__ */ jsxRuntime.jsx(trash, {}) }) }) : ComponentRemove,
64
- [ComponentRemove, _remove_props]
87
+ () => ComponentRemove === void 0 ? ComponentRemoveCol === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid.Col, { ..._remove_col_props }) : ComponentRemoveCol : ComponentRemove,
88
+ [ComponentRemove, ComponentRemoveCol, _remove_col_props]
65
89
  );
66
90
  const SortButtons = React.useMemo(
67
91
  () => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -76,9 +100,20 @@ const useNavigationComponent = (props) => {
76
100
  );
77
101
  const enableRemove = React.useMemo(() => !disableRemove && !!ActionIconRemove, [disableRemove, ActionIconRemove]);
78
102
  const showComponent = React.useMemo(() => enableSort || enableRemove, [enableSort, enableRemove]);
79
- return showComponent ? /* @__PURE__ */ jsxRuntime.jsxs(core.Grid, { justify: "flex-end", align: "center", children: [
80
- enableSort && SortButtons,
81
- enableRemove && ActionIconRemove
82
- ] }) : void 0;
103
+ const [ComponentGrid, _grid_props] = useContextProps.useContextProps(
104
+ `${componentName}.${componentIdentifier}.Grid`,
105
+ `${childPath}.${componentIdentifier}.Grid`,
106
+ {
107
+ justify: "flex-end",
108
+ align: "center",
109
+ children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
110
+ enableSort && SortButtons,
111
+ enableRemove && ActionIconRemove
112
+ ] })
113
+ },
114
+ rest,
115
+ { withAllProps: false }
116
+ );
117
+ return showComponent ? ComponentGrid === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.Grid, { ..._grid_props }) : ComponentGrid : void 0;
83
118
  };
84
119
  exports.useNavigationComponent = useNavigationComponent;