fastapi-rtk 0.2.52 → 0.2.54
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.
- package/dist/.bundled/jsonforms/cjs/_virtual/map.cjs +6 -0
- package/dist/.bundled/jsonforms/cjs/_virtual/reduce.cjs +5 -2
- package/dist/.bundled/jsonforms/cjs/_virtual/toPairs.cjs +5 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineArrayControl/MantineArrayControl.cjs +6 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineObjectControl.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.cjs +11 -91
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/TableToolbar.cjs +10 -54
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useNavigationComponent.cjs +83 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/hooks/useToolbarComponent.cjs +88 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/labels/MantineLabelRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ArrayToolbar.cjs +20 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.cjs +147 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayout.cjs +81 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Array/MantineArrayLayoutRenderer.cjs +21 -0
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/Categorization/MantineCategorizationLayoutRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/layouts/MantineGroupLayoutRenderer.cjs +2 -2
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/renderers/mantineRenderers.cjs +7 -4
- package/dist/.bundled/jsonforms/esm/_virtual/map.mjs +7 -0
- package/dist/.bundled/jsonforms/esm/_virtual/reduce.mjs +6 -1
- package/dist/.bundled/jsonforms/esm/_virtual/toPairs.mjs +6 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineArrayControl/MantineArrayControl.mjs +7 -1
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineObjectControl.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/MantineTableControl.mjs +13 -93
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/TableToolbar.mjs +12 -56
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useNavigationComponent.mjs +83 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/hooks/useToolbarComponent.mjs +88 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/labels/MantineLabelRenderer.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ArrayToolbar.mjs +20 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/ExpandPanelRenderer.mjs +147 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayout.mjs +81 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Array/MantineArrayLayoutRenderer.mjs +21 -0
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/Categorization/MantineCategorizationLayoutRenderer.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/layouts/MantineGroupLayoutRenderer.mjs +2 -2
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/renderers/mantineRenderers.mjs +12 -9
- package/dist/.external/cjs/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.cjs +133 -2
- package/dist/.external/cjs/lodash@4.17.21/lodash/_baseMap.cjs +21 -0
- package/dist/.external/cjs/lodash@4.17.21/lodash/map.cjs +20 -0
- package/dist/.external/esm/@jsonforms_core@3.6.0/@jsonforms/core/lib/jsonforms-core.esm.mjs +133 -2
- package/dist/.external/esm/lodash@4.17.21/lodash/_baseMap.mjs +21 -0
- package/dist/.external/esm/lodash@4.17.21/lodash/map.mjs +20 -0
- package/dist/jsonforms/cjs/_virtual/map.cjs +6 -0
- package/dist/jsonforms/cjs/complex/MantineArrayControl/MantineArrayControl.cjs +6 -0
- package/dist/jsonforms/cjs/complex/MantineObjectControl.cjs +2 -2
- package/dist/jsonforms/cjs/complex/MantineTableControl/MantineTableControl.cjs +11 -91
- package/dist/jsonforms/cjs/complex/MantineTableControl/TableToolbar.cjs +13 -57
- package/dist/jsonforms/cjs/hooks/useNavigationComponent.cjs +83 -0
- package/dist/jsonforms/cjs/hooks/useToolbarComponent.cjs +88 -0
- package/dist/jsonforms/cjs/labels/MantineLabelRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/layouts/Array/ArrayToolbar.cjs +20 -0
- package/dist/jsonforms/cjs/layouts/Array/ExpandPanelRenderer.cjs +147 -0
- package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayout.cjs +81 -0
- package/dist/jsonforms/cjs/layouts/Array/MantineArrayLayoutRenderer.cjs +21 -0
- package/dist/jsonforms/cjs/layouts/Categorization/MantineCategorizationLayoutRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/layouts/MantineGroupLayoutRenderer.cjs +2 -2
- package/dist/jsonforms/cjs/renderers/mantineRenderers.cjs +7 -4
- package/dist/jsonforms/esm/_virtual/map.mjs +7 -0
- package/dist/jsonforms/esm/complex/MantineArrayControl/MantineArrayControl.mjs +7 -1
- package/dist/jsonforms/esm/complex/MantineObjectControl.mjs +2 -2
- package/dist/jsonforms/esm/complex/MantineTableControl/MantineTableControl.mjs +13 -93
- package/dist/jsonforms/esm/complex/MantineTableControl/TableToolbar.mjs +12 -56
- package/dist/jsonforms/esm/hooks/useNavigationComponent.mjs +83 -0
- package/dist/jsonforms/esm/hooks/useToolbarComponent.mjs +88 -0
- package/dist/jsonforms/esm/labels/MantineLabelRenderer.mjs +2 -2
- package/dist/jsonforms/esm/layouts/Array/ArrayToolbar.mjs +20 -0
- package/dist/jsonforms/esm/layouts/Array/ExpandPanelRenderer.mjs +147 -0
- package/dist/jsonforms/esm/layouts/Array/MantineArrayLayout.mjs +81 -0
- package/dist/jsonforms/esm/layouts/Array/MantineArrayLayoutRenderer.mjs +21 -0
- package/dist/jsonforms/esm/layouts/Categorization/MantineCategorizationLayoutRenderer.mjs +2 -2
- package/dist/jsonforms/esm/layouts/MantineGroupLayoutRenderer.mjs +2 -2
- package/dist/jsonforms/esm/renderers/mantineRenderers.mjs +12 -9
- package/dist/jsonforms/lib/complex/MantineArrayControl/MantineArrayControl.d.ts +2 -0
- package/dist/jsonforms/lib/complex/MantineObjectControl.d.ts +1 -1
- package/dist/jsonforms/lib/hooks/useNavigationComponent.d.ts +8 -0
- package/dist/jsonforms/lib/hooks/useToolbarComponent.d.ts +6 -0
- package/dist/jsonforms/lib/labels/MantineLabelRenderer.d.ts +1 -1
- package/dist/jsonforms/lib/layouts/Array/ArrayToolbar.d.ts +2 -0
- package/dist/jsonforms/lib/layouts/Array/ExpandPanelRenderer.d.ts +3 -0
- package/dist/jsonforms/lib/layouts/Array/MantineArrayLayout.d.ts +1 -0
- package/dist/jsonforms/lib/layouts/Array/MantineArrayLayoutRenderer.d.ts +2 -0
- package/dist/jsonforms/lib/layouts/Categorization/MantineCategorizationLayoutRenderer.d.ts +1 -1
- package/dist/jsonforms/lib/layouts/MantineGroupLayoutRenderer.d.ts +1 -1
- package/package.json +1 -1
- package/dist/.bundled/jsonforms/cjs/packages/jsonforms/src/complex/MantineTableControl/ValidationIcon.cjs +0 -19
- package/dist/.bundled/jsonforms/esm/packages/jsonforms/src/complex/MantineTableControl/ValidationIcon.mjs +0 -19
- package/dist/jsonforms/cjs/complex/MantineTableControl/ValidationIcon.cjs +0 -19
- package/dist/jsonforms/esm/complex/MantineTableControl/ValidationIcon.mjs +0 -19
- package/dist/jsonforms/lib/complex/MantineTableControl/ValidationIcon.d.ts +0 -4
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core$1 = require("fastapi-rtk/core");
|
|
5
|
+
const core = require("@mantine/core");
|
|
6
|
+
const IconPlus = require("../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconPlus.cjs");
|
|
7
|
+
const IconExclamationCircle = require("../../../.external/cjs/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconExclamationCircle.cjs");
|
|
8
|
+
const ValidationIcon = ({ id, error }) => {
|
|
9
|
+
const errorMessageList = (error == null ? void 0 : error.split("\n")) || [];
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
core.Tooltip,
|
|
12
|
+
{
|
|
13
|
+
id,
|
|
14
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs(core.Stack, { gap: "0.25rem", children: [
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Text, { children: `${errorMessageList.length} error(s)` }),
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx(core.Stack, { gap: 0, children: errorMessageList.map((error2, index) => /* @__PURE__ */ jsxRuntime.jsx(core.Text, { children: error2 }, `${error2}-${index}`)) })
|
|
17
|
+
] }),
|
|
18
|
+
position: "right",
|
|
19
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
20
|
+
core.Indicator,
|
|
21
|
+
{
|
|
22
|
+
size: "0.85rem",
|
|
23
|
+
label: errorMessageList.length,
|
|
24
|
+
disabled: !error,
|
|
25
|
+
style: { visibility: error ? "visible" : "hidden" },
|
|
26
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconExclamationCircle, {})
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
const useToolbarComponent = ({ componentName, componentIdentifier, onAdd, ...props }) => {
|
|
33
|
+
const { errors, label, description, path, translations } = props;
|
|
34
|
+
const defaultProps = { variant: "transparent", size: "sm", mt: "0.35rem" };
|
|
35
|
+
const iconProps = core.useProps("ActionIcon", defaultProps, {});
|
|
36
|
+
const [ComponentLabel, _label_props] = core$1.useContextProps(
|
|
37
|
+
`${componentName}.${componentIdentifier}.Label`,
|
|
38
|
+
`${path}.${componentIdentifier}.Label`,
|
|
39
|
+
{ value: label },
|
|
40
|
+
props,
|
|
41
|
+
false
|
|
42
|
+
);
|
|
43
|
+
const [ComponentDescription, _description_props] = core$1.useContextProps(
|
|
44
|
+
`${componentName}.${componentIdentifier}.Description`,
|
|
45
|
+
`${path}.${componentIdentifier}.Description`,
|
|
46
|
+
{ value: description },
|
|
47
|
+
props,
|
|
48
|
+
false
|
|
49
|
+
);
|
|
50
|
+
const [ComponentValidation, _validation_props] = core$1.useContextProps(
|
|
51
|
+
`${componentName}.${componentIdentifier}.Validation`,
|
|
52
|
+
`${path}.${componentIdentifier}.Validation`,
|
|
53
|
+
{
|
|
54
|
+
id: "tooltip-validation",
|
|
55
|
+
error: errors
|
|
56
|
+
},
|
|
57
|
+
props,
|
|
58
|
+
false
|
|
59
|
+
);
|
|
60
|
+
const [ComponentAdd, _add_props] = core$1.useContextProps(
|
|
61
|
+
`${componentName}.${componentIdentifier}.Add`,
|
|
62
|
+
`${path}.${componentIdentifier}.Add`,
|
|
63
|
+
{
|
|
64
|
+
id: "tooltip-add",
|
|
65
|
+
title: translations.addTooltip,
|
|
66
|
+
onClick: onAdd,
|
|
67
|
+
...iconProps
|
|
68
|
+
},
|
|
69
|
+
props,
|
|
70
|
+
false
|
|
71
|
+
);
|
|
72
|
+
const TextLabel = ComponentLabel === void 0 ? (_label_props == null ? void 0 : _label_props.value) ? /* @__PURE__ */ jsxRuntime.jsx(core.Input.Label, { children: _label_props == null ? void 0 : _label_props.value }) : null : ComponentLabel;
|
|
73
|
+
const TextDescription = ComponentDescription === void 0 ? (_description_props == null ? void 0 : _description_props.value) ? /* @__PURE__ */ jsxRuntime.jsx(core.Input.Description, { children: _description_props == null ? void 0 : _description_props.value }) : null : ComponentDescription;
|
|
74
|
+
const IconValidation = ComponentValidation === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(ValidationIcon, { ..._validation_props }) : ComponentValidation;
|
|
75
|
+
const ActionIconAdd = ComponentAdd === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core.ActionIcon, { ..._add_props, children: /* @__PURE__ */ jsxRuntime.jsx(IconPlus, {}) }) : ComponentAdd;
|
|
76
|
+
return [
|
|
77
|
+
// eslint-disable-next-line react/jsx-key
|
|
78
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Input.Wrapper, { children: [
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsxs(core.Flex, { justify: "flex-start", align: "center", gap: "sm", children: [
|
|
80
|
+
TextLabel,
|
|
81
|
+
IconValidation
|
|
82
|
+
] }),
|
|
83
|
+
TextDescription
|
|
84
|
+
] }),
|
|
85
|
+
ActionIconAdd
|
|
86
|
+
];
|
|
87
|
+
};
|
|
88
|
+
exports.useToolbarComponent = useToolbarComponent;
|
|
@@ -11,7 +11,7 @@ const Component = (props) => {
|
|
|
11
11
|
}
|
|
12
12
|
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Title, { fw: "bold", size: "xl", children: text });
|
|
13
13
|
};
|
|
14
|
-
const
|
|
14
|
+
const mantineLabelTester = core.rankWith(1, core.isLabelable);
|
|
15
15
|
const MantineLabelRenderer = react.withJsonFormsLabelProps(Component);
|
|
16
16
|
exports.MantineLabelRenderer = MantineLabelRenderer;
|
|
17
|
-
exports.
|
|
17
|
+
exports.mantineLabelTester = mantineLabelTester;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@mantine/core");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const useToolbarComponent = require("../../hooks/useToolbarComponent.cjs");
|
|
7
|
+
const ArrayLayoutToolbar = React.memo(function ArrayLayoutToolbar2(props) {
|
|
8
|
+
const { addItem, path, enabled, createDefault } = props;
|
|
9
|
+
const [ToolbarComponent, ToolbarAdd] = useToolbarComponent.useToolbarComponent({
|
|
10
|
+
componentName: "Array",
|
|
11
|
+
componentIdentifier: "Header",
|
|
12
|
+
onAdd: addItem(path, createDefault()),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core.Group, { justify: "space-between", children: [
|
|
16
|
+
ToolbarComponent,
|
|
17
|
+
enabled && ToolbarAdd
|
|
18
|
+
] });
|
|
19
|
+
});
|
|
20
|
+
exports.ArrayLayoutToolbar = ArrayLayoutToolbar;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@jsonforms/core");
|
|
5
|
+
const react = require("@jsonforms/react");
|
|
6
|
+
const core$1 = require("@mantine/core");
|
|
7
|
+
const merge = require("../../_virtual/merge.cjs");
|
|
8
|
+
const React = require("react");
|
|
9
|
+
const useNavigationComponent = require("../../hooks/useNavigationComponent.cjs");
|
|
10
|
+
const Component = (props) => {
|
|
11
|
+
const [labelHtmlId] = React.useState(core.createId("expand-panel"));
|
|
12
|
+
React.useEffect(() => {
|
|
13
|
+
return () => {
|
|
14
|
+
core.removeId(labelHtmlId);
|
|
15
|
+
};
|
|
16
|
+
}, [labelHtmlId]);
|
|
17
|
+
const {
|
|
18
|
+
enabled,
|
|
19
|
+
path,
|
|
20
|
+
childPath,
|
|
21
|
+
childLabel,
|
|
22
|
+
index,
|
|
23
|
+
rootSchema,
|
|
24
|
+
schema,
|
|
25
|
+
uischema,
|
|
26
|
+
uischemas,
|
|
27
|
+
renderers,
|
|
28
|
+
cells,
|
|
29
|
+
moveUp: moveUp2,
|
|
30
|
+
moveDown: moveDown2,
|
|
31
|
+
removeItems,
|
|
32
|
+
config
|
|
33
|
+
} = props;
|
|
34
|
+
const foundUISchema = React.useMemo(
|
|
35
|
+
() => core.findUISchema(uischemas, schema, uischema.scope, path, void 0, uischema, rootSchema),
|
|
36
|
+
[uischemas, schema, path, uischema, rootSchema]
|
|
37
|
+
);
|
|
38
|
+
const appliedUiSchemaOptions = merge({}, config, uischema.options);
|
|
39
|
+
const showSortButtons = appliedUiSchemaOptions.showSortButtons || appliedUiSchemaOptions.showArrayLayoutSortButtons;
|
|
40
|
+
const NavigationComponent = useNavigationComponent.useNavigationComponent({
|
|
41
|
+
componentName: "Array",
|
|
42
|
+
componentIdentifier: "Item",
|
|
43
|
+
onUp: moveUp2(path, index),
|
|
44
|
+
onDown: moveDown2(path, index),
|
|
45
|
+
onDelete: removeItems(path, [index]),
|
|
46
|
+
showSortButtons,
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core$1.Accordion.Item, { value: childPath, children: [
|
|
50
|
+
/* @__PURE__ */ jsxRuntime.jsx(core$1.Center, { children: /* @__PURE__ */ jsxRuntime.jsx(core$1.Accordion.Control, { component: "div", icon: /* @__PURE__ */ jsxRuntime.jsx(core$1.Avatar, { children: index + 1 }), children: /* @__PURE__ */ jsxRuntime.jsxs(core$1.Group, { justify: "space-between", pr: "md", children: [
|
|
51
|
+
/* @__PURE__ */ jsxRuntime.jsx(core$1.Stack, { children: childLabel }),
|
|
52
|
+
NavigationComponent
|
|
53
|
+
] }) }) }),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(core$1.Accordion.Panel, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
react.JsonFormsDispatch,
|
|
56
|
+
{
|
|
57
|
+
enabled,
|
|
58
|
+
schema,
|
|
59
|
+
uischema: foundUISchema,
|
|
60
|
+
path: childPath,
|
|
61
|
+
renderers,
|
|
62
|
+
cells
|
|
63
|
+
},
|
|
64
|
+
childPath
|
|
65
|
+
) })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
const MemoComponent = React.memo(Component);
|
|
69
|
+
const useCtxDispatchToExpandPanelProps = (dispatch) => ({
|
|
70
|
+
removeItems: React.useCallback(
|
|
71
|
+
(path, toDelete) => (event) => {
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
dispatch(
|
|
74
|
+
core.update(
|
|
75
|
+
path,
|
|
76
|
+
(array) => {
|
|
77
|
+
toDelete.sort().reverse().forEach((s) => array.splice(s, 1));
|
|
78
|
+
return array;
|
|
79
|
+
},
|
|
80
|
+
{ type: "REMOVE", indices: toDelete }
|
|
81
|
+
)
|
|
82
|
+
);
|
|
83
|
+
},
|
|
84
|
+
[dispatch]
|
|
85
|
+
),
|
|
86
|
+
moveUp: React.useCallback(
|
|
87
|
+
(path, toMove) => (event) => {
|
|
88
|
+
event.stopPropagation();
|
|
89
|
+
dispatch(
|
|
90
|
+
core.update(
|
|
91
|
+
path,
|
|
92
|
+
(array) => {
|
|
93
|
+
core.moveUp(array, toMove);
|
|
94
|
+
return array;
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "MOVE",
|
|
98
|
+
moves: [{ from: toMove, to: toMove - 1 }]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
);
|
|
102
|
+
},
|
|
103
|
+
[dispatch]
|
|
104
|
+
),
|
|
105
|
+
moveDown: React.useCallback(
|
|
106
|
+
(path, toMove) => (event) => {
|
|
107
|
+
event.stopPropagation();
|
|
108
|
+
dispatch(
|
|
109
|
+
core.update(
|
|
110
|
+
path,
|
|
111
|
+
(array) => {
|
|
112
|
+
core.moveDown(array, toMove);
|
|
113
|
+
return array;
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: "MOVE",
|
|
117
|
+
moves: [{ from: toMove, to: toMove + 1 }]
|
|
118
|
+
}
|
|
119
|
+
)
|
|
120
|
+
);
|
|
121
|
+
},
|
|
122
|
+
[dispatch]
|
|
123
|
+
)
|
|
124
|
+
});
|
|
125
|
+
const withContextToExpandPanelProps = (Component2) => {
|
|
126
|
+
return function WithContextToExpandPanelProps({ ctx, props }) {
|
|
127
|
+
const dispatchProps = useCtxDispatchToExpandPanelProps(ctx.dispatch);
|
|
128
|
+
const { childLabelProp, schema, uischema, rootSchema, path, index, uischemas } = props;
|
|
129
|
+
const childPath = core.Paths.compose(path, `${index}`);
|
|
130
|
+
const childLabel = React.useMemo(() => {
|
|
131
|
+
return core.computeChildLabel(
|
|
132
|
+
ctx.core.data,
|
|
133
|
+
childPath,
|
|
134
|
+
childLabelProp,
|
|
135
|
+
schema,
|
|
136
|
+
rootSchema,
|
|
137
|
+
ctx.i18n.translate,
|
|
138
|
+
uischema
|
|
139
|
+
);
|
|
140
|
+
}, [ctx.core.data, childPath, childLabelProp, schema, rootSchema, ctx.i18n.translate, uischema]);
|
|
141
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component2, { ...props, ...dispatchProps, childLabel, childPath, uischemas });
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
const withJsonFormsExpandPanelProps = (Component2) => react.withJsonFormsContext(withContextToExpandPanelProps(Component2));
|
|
145
|
+
const ExpandPanelRenderer = withJsonFormsExpandPanelProps(MemoComponent);
|
|
146
|
+
exports.ExpandPanelRenderer = ExpandPanelRenderer;
|
|
147
|
+
exports.MemoComponent = MemoComponent;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core$1 = require("fastapi-rtk/core");
|
|
5
|
+
const core = require("@jsonforms/core");
|
|
6
|
+
const core$2 = require("@mantine/core");
|
|
7
|
+
const map = require("../../_virtual/map.cjs");
|
|
8
|
+
const merge = require("../../_virtual/merge.cjs");
|
|
9
|
+
const range = require("../../_virtual/range.cjs");
|
|
10
|
+
const React = require("react");
|
|
11
|
+
const ArrayToolbar = require("./ArrayToolbar.cjs");
|
|
12
|
+
const ExpandPanelRenderer = require("./ExpandPanelRenderer.cjs");
|
|
13
|
+
const Component = (props) => {
|
|
14
|
+
const {
|
|
15
|
+
enabled,
|
|
16
|
+
data,
|
|
17
|
+
path,
|
|
18
|
+
schema,
|
|
19
|
+
uischema,
|
|
20
|
+
errors,
|
|
21
|
+
addItem,
|
|
22
|
+
renderers,
|
|
23
|
+
cells,
|
|
24
|
+
label,
|
|
25
|
+
required,
|
|
26
|
+
rootSchema,
|
|
27
|
+
config,
|
|
28
|
+
uischemas,
|
|
29
|
+
description,
|
|
30
|
+
disableAdd,
|
|
31
|
+
disableRemove,
|
|
32
|
+
translations
|
|
33
|
+
} = props;
|
|
34
|
+
const appliedUiSchemaOptions = merge({}, config, props.uischema.options);
|
|
35
|
+
const doDisableAdd = disableAdd || appliedUiSchemaOptions.disableAdd;
|
|
36
|
+
const doDisableRemove = disableRemove || appliedUiSchemaOptions.disableRemove;
|
|
37
|
+
const innerCreateDefaultValue = React.useCallback(() => core.createDefaultValue(props.schema, props.rootSchema), [props.schema]);
|
|
38
|
+
const [Component2, _props] = core$1.useContextProps("Array.Accordion", `${path}.Accordion`, {}, props, false);
|
|
39
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(core$2.Stack, { children: [
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
41
|
+
ArrayToolbar.ArrayLayoutToolbar,
|
|
42
|
+
{
|
|
43
|
+
translations,
|
|
44
|
+
label: core.computeLabel(label, required, appliedUiSchemaOptions.hideRequiredAsterisk),
|
|
45
|
+
description,
|
|
46
|
+
errors,
|
|
47
|
+
path,
|
|
48
|
+
enabled,
|
|
49
|
+
addItem,
|
|
50
|
+
createDefault: innerCreateDefaultValue,
|
|
51
|
+
disableAdd: doDisableAdd
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsxRuntime.jsx(core$2.Stack, { children: data > 0 ? Component2 === void 0 ? /* @__PURE__ */ jsxRuntime.jsx(core$2.Accordion, { variant: "separated", ..._props, children: map(range(data), (index) => {
|
|
55
|
+
const childPath = core.Paths.compose(path, `${index}`);
|
|
56
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
|
+
ExpandPanelRenderer.ExpandPanelRenderer,
|
|
58
|
+
{
|
|
59
|
+
enabled,
|
|
60
|
+
path,
|
|
61
|
+
childPath,
|
|
62
|
+
index,
|
|
63
|
+
rootSchema,
|
|
64
|
+
schema,
|
|
65
|
+
uischema,
|
|
66
|
+
uischemas,
|
|
67
|
+
renderers,
|
|
68
|
+
cells,
|
|
69
|
+
enableUp: index !== 0,
|
|
70
|
+
enableDown: index !== data - 1,
|
|
71
|
+
disableRemove: doDisableRemove,
|
|
72
|
+
config,
|
|
73
|
+
translations
|
|
74
|
+
},
|
|
75
|
+
index
|
|
76
|
+
);
|
|
77
|
+
}) }) : Component2 : /* @__PURE__ */ jsxRuntime.jsx(core$2.Text, { ta: "center", children: translations.noDataMessage }) })
|
|
78
|
+
] });
|
|
79
|
+
};
|
|
80
|
+
const MantineArrayLayout = React.memo(Component);
|
|
81
|
+
exports.MantineArrayLayout = MantineArrayLayout;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const core = require("@jsonforms/core");
|
|
5
|
+
const react = require("@jsonforms/react");
|
|
6
|
+
const core$1 = require("@mantine/core");
|
|
7
|
+
const React = require("react");
|
|
8
|
+
const MantineArrayLayout = require("./MantineArrayLayout.cjs");
|
|
9
|
+
const Component = ({ visible, addItem, translations, ...props }) => {
|
|
10
|
+
const addItemCb = React.useCallback((p, value) => addItem(p, value), [addItem]);
|
|
11
|
+
if (!visible) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Stack, { m: "0.5rem", mx: "calc(0.5rem + 2px)", children: /* @__PURE__ */ jsxRuntime.jsx(MantineArrayLayout.MantineArrayLayout, { translations, visible, addItem: addItemCb, ...props }) });
|
|
15
|
+
};
|
|
16
|
+
const mantineArrayLayoutTester = core.rankWith(2, core.isObjectArrayWithNesting);
|
|
17
|
+
const MantineArrayLayoutRenderer = react.withJsonFormsArrayLayoutProps(
|
|
18
|
+
react.withTranslateProps(react.withArrayTranslationProps(Component))
|
|
19
|
+
);
|
|
20
|
+
exports.MantineArrayLayoutRenderer = MantineArrayLayoutRenderer;
|
|
21
|
+
exports.mantineArrayLayoutTester = mantineArrayLayoutTester;
|
|
@@ -67,9 +67,9 @@ const Component = (props) => {
|
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
};
|
|
70
|
-
const
|
|
70
|
+
const mantineCategorizationLayoutTester = core.rankWith(1, core.uiTypeIs("Categorization"));
|
|
71
71
|
const MantineCategorizationLayoutRenderer = withAjvProps.withAjvProps(
|
|
72
72
|
react.withTranslateProps(react.withJsonFormsLayoutProps(withDebounce.withDebounce(Component)))
|
|
73
73
|
);
|
|
74
74
|
exports.MantineCategorizationLayoutRenderer = MantineCategorizationLayoutRenderer;
|
|
75
|
-
exports.
|
|
75
|
+
exports.mantineCategorizationLayoutTester = mantineCategorizationLayoutTester;
|
|
@@ -10,7 +10,7 @@ const Component = ({ schema, uischema, path, enabled, visible, renderers, cells,
|
|
|
10
10
|
const childProps = { schema, path, enabled, visible, elements: layout$1.elements, direction: "column" };
|
|
11
11
|
return /* @__PURE__ */ jsxRuntime.jsx(core$1.Fieldset, { legend: label, m: "0.5rem", mx: "calc(0.5rem + 2px)", children: /* @__PURE__ */ jsxRuntime.jsx(layout.MantineLayoutRenderer, { ...childProps, renderers, cells }) });
|
|
12
12
|
};
|
|
13
|
-
const
|
|
13
|
+
const mantineGroupLayoutTester = core.rankWith(1, core.uiTypeIs("Group"));
|
|
14
14
|
const MantineGroupLayoutRenderer = react.withJsonFormsLayoutProps(Component);
|
|
15
15
|
exports.MantineGroupLayoutRenderer = MantineGroupLayoutRenderer;
|
|
16
|
-
exports.
|
|
16
|
+
exports.mantineGroupLayoutTester = mantineGroupLayoutTester;
|
|
@@ -16,6 +16,7 @@ const MantineOneOfEnumControl = require("../controls/MantineOneOfEnumControl.cjs
|
|
|
16
16
|
const MantineTextControl = require("../controls/MantineTextControl.cjs");
|
|
17
17
|
const MantineTimeControl = require("../controls/MantineTimeControl.cjs");
|
|
18
18
|
const MantineLabelRenderer = require("../labels/MantineLabelRenderer.cjs");
|
|
19
|
+
const MantineArrayLayoutRenderer = require("../layouts/Array/MantineArrayLayoutRenderer.cjs");
|
|
19
20
|
const MantineCategorizationLayoutRenderer = require("../layouts/Categorization/MantineCategorizationLayoutRenderer.cjs");
|
|
20
21
|
const MantineGroupLayoutRenderer = require("../layouts/MantineGroupLayoutRenderer.cjs");
|
|
21
22
|
const MantineHotizontalLayoutRenderer = require("../layouts/MantineHotizontalLayoutRenderer.cjs");
|
|
@@ -35,15 +36,17 @@ const mantineRenderers = [
|
|
|
35
36
|
{ tester: MantineIntegerControl.mantineIntegerControlTester, renderer: MantineIntegerControl.MantineIntegerControl },
|
|
36
37
|
{ tester: MantineBooleanControl.mantineBooleanControlTester, renderer: MantineBooleanControl.MantineBooleanControl },
|
|
37
38
|
// Complex
|
|
38
|
-
{ tester: MantineObjectControl.
|
|
39
|
+
{ tester: MantineObjectControl.mantineObjectControlTester, renderer: MantineObjectControl.MantineObjectControl },
|
|
39
40
|
{ tester: MantineArrayControl.mantineArrayControlTester, renderer: MantineArrayControl.MantineArrayControlRenderer },
|
|
41
|
+
{ tester: MantineArrayControl.mantineArrayEnumArrayControlTester, renderer: MantineArrayControl.MantineArrayEnumArrayControlRenderer },
|
|
40
42
|
{ tester: MantineEnumArrayControl.mantineEnumArrayRendererTester, renderer: MantineEnumArrayControl.MantineEnumArrayRenderer },
|
|
41
43
|
// Layouts
|
|
42
44
|
{ tester: MantineHotizontalLayoutRenderer.mantineHorizontalLayoutTester, renderer: MantineHotizontalLayoutRenderer.MantineHorizontalLayoutRenderer },
|
|
43
45
|
{ tester: MantineVerticalLayoutRenderer.mantineVerticalLayoutTester, renderer: MantineVerticalLayoutRenderer.MantineVerticalLayoutRenderer },
|
|
44
|
-
{ tester: MantineGroupLayoutRenderer.
|
|
45
|
-
{ tester: MantineCategorizationLayoutRenderer.
|
|
46
|
+
{ tester: MantineGroupLayoutRenderer.mantineGroupLayoutTester, renderer: MantineGroupLayoutRenderer.MantineGroupLayoutRenderer },
|
|
47
|
+
{ tester: MantineCategorizationLayoutRenderer.mantineCategorizationLayoutTester, renderer: MantineCategorizationLayoutRenderer.MantineCategorizationLayoutRenderer },
|
|
48
|
+
{ tester: MantineArrayLayoutRenderer.mantineArrayLayoutTester, renderer: MantineArrayLayoutRenderer.MantineArrayLayoutRenderer },
|
|
46
49
|
// Labels
|
|
47
|
-
{ tester: MantineLabelRenderer.
|
|
50
|
+
{ tester: MantineLabelRenderer.mantineLabelTester, renderer: MantineLabelRenderer.MantineLabelRenderer }
|
|
48
51
|
];
|
|
49
52
|
exports.mantineRenderers = mantineRenderers;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs } from "./_commonjsHelpers.mjs";
|
|
2
|
+
import { __require as requireMap } from "../../../.external/esm/lodash@4.17.21/lodash/map.mjs";
|
|
3
|
+
var mapExports = requireMap();
|
|
4
|
+
const map = /* @__PURE__ */ getDefaultExportFromCjs(mapExports);
|
|
5
|
+
export {
|
|
6
|
+
map as default
|
|
7
|
+
};
|
|
@@ -52,10 +52,16 @@ const mantineArrayControlTester = rankWith(
|
|
|
52
52
|
1,
|
|
53
53
|
or(isObjectArrayControl, isPrimitiveArrayControl, isEnumArrayArrayControl, isJsonArrayControl)
|
|
54
54
|
);
|
|
55
|
+
const mantineArrayEnumArrayControlTester = rankWith(3, isEnumArrayArrayControl);
|
|
55
56
|
const MantineArrayControlRenderer = withJsonFormsArrayLayoutProps(
|
|
56
57
|
withTranslateProps(withArrayTranslationProps(Component))
|
|
57
58
|
);
|
|
59
|
+
const MantineArrayEnumArrayControlRenderer = withJsonFormsArrayLayoutProps(
|
|
60
|
+
withTranslateProps(withArrayTranslationProps(Component))
|
|
61
|
+
);
|
|
58
62
|
export {
|
|
59
63
|
MantineArrayControlRenderer,
|
|
60
|
-
|
|
64
|
+
MantineArrayEnumArrayControlRenderer,
|
|
65
|
+
mantineArrayControlTester,
|
|
66
|
+
mantineArrayEnumArrayControlTester
|
|
61
67
|
};
|
|
@@ -2,9 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { rankWith, isObjectControl } from "@jsonforms/core";
|
|
3
3
|
import { withJsonFormsDetailProps } from "@jsonforms/react";
|
|
4
4
|
import { MantineObjectInput } from "../MantineInputs/MantineObjectInput.mjs";
|
|
5
|
-
const
|
|
5
|
+
const mantineObjectControlTester = rankWith(1, isObjectControl);
|
|
6
6
|
const MantineObjectControl = withJsonFormsDetailProps((props) => /* @__PURE__ */ jsx(MantineObjectInput, { ...props }));
|
|
7
7
|
export {
|
|
8
8
|
MantineObjectControl,
|
|
9
|
-
|
|
9
|
+
mantineObjectControlTester
|
|
10
10
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx, jsxs
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { deepMerge } from "fastapi-rtk/utils";
|
|
3
3
|
import { Resolve, encode, Paths, formatErrorMessage, errorsAt } from "@jsonforms/core";
|
|
4
4
|
import { DispatchCell, useJsonForms } from "@jsonforms/react";
|
|
5
|
-
import { Table, useProps, MantineThemeProvider, Text
|
|
5
|
+
import { Table, useProps, MantineThemeProvider, Text } from "@mantine/core";
|
|
6
6
|
import isEmpty from "../../_virtual/isEmpty.mjs";
|
|
7
7
|
import merge from "../../_virtual/merge.mjs";
|
|
8
8
|
import range from "../../_virtual/range.mjs";
|
|
@@ -10,12 +10,10 @@ import startCase from "../../_virtual/startCase.mjs";
|
|
|
10
10
|
import union from "../../_virtual/union.mjs";
|
|
11
11
|
import React, { useMemo, memo } from "react";
|
|
12
12
|
import { useContextProps } from "../../hooks/useContextProps.mjs";
|
|
13
|
+
import { useNavigationComponent } from "../../hooks/useNavigationComponent.mjs";
|
|
13
14
|
import { useThemeCustomizer } from "../../hooks/useThemeCustomizer.mjs";
|
|
14
15
|
import { NoBorderTableCell } from "./NoBorderTableCell.mjs";
|
|
15
16
|
import { TableToolbar } from "./TableToolbar.mjs";
|
|
16
|
-
import IconArrowUp from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconArrowUp.mjs";
|
|
17
|
-
import IconArrowDown from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconArrowDown.mjs";
|
|
18
|
-
import IconTrash from "../../../../.external/esm/@tabler_icons-react@3.18.0_react@18.3.1/@tabler/icons-react/dist/esm/icons/IconTrash.mjs";
|
|
19
17
|
const isValidObjectSchema = (schema) => schema.type === "object" && typeof schema.properties === "object";
|
|
20
18
|
const styles = {
|
|
21
19
|
fixedCell: {
|
|
@@ -149,96 +147,18 @@ const NonEmptyCell = (ownProps) => {
|
|
|
149
147
|
return /* @__PURE__ */ jsx(NonEmptyCellComponent, { ...emptyCellProps, isValid });
|
|
150
148
|
};
|
|
151
149
|
const NonEmptyRowComponent = (props) => {
|
|
152
|
-
const {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
showSortButtons,
|
|
162
|
-
enabled,
|
|
163
|
-
cells,
|
|
164
|
-
path,
|
|
165
|
-
translations,
|
|
166
|
-
disableRemove
|
|
167
|
-
} = props;
|
|
168
|
-
const defaultProps = { variant: "transparent", size: "sm", mt: "0.35rem" };
|
|
169
|
-
const iconProps = useProps("ActionIcon", defaultProps, {});
|
|
170
|
-
const moveUp = useMemo(() => moveUpCreator(path, rowIndex), [moveUpCreator, path, rowIndex]);
|
|
171
|
-
const moveDown = useMemo(() => moveDownCreator(path, rowIndex), [moveDownCreator, path, rowIndex]);
|
|
172
|
-
const [ComponentUp, _up_props] = useContextProps(
|
|
173
|
-
"Table.Row.Up",
|
|
174
|
-
`${childPath}.Row.Up`,
|
|
175
|
-
{
|
|
176
|
-
title: translations.up,
|
|
177
|
-
["aria-label"]: translations.upAriaLabel,
|
|
178
|
-
onClick: moveUp,
|
|
179
|
-
disabled: !enableUp,
|
|
180
|
-
...iconProps
|
|
181
|
-
},
|
|
182
|
-
props,
|
|
183
|
-
false
|
|
184
|
-
);
|
|
185
|
-
const [ComponentDown, _down_props] = useContextProps(
|
|
186
|
-
"Table.Row.Down",
|
|
187
|
-
`${childPath}.Row.Down`,
|
|
188
|
-
{
|
|
189
|
-
title: translations.down,
|
|
190
|
-
["aria-label"]: translations.downAriaLabel,
|
|
191
|
-
onClick: moveDown,
|
|
192
|
-
disabled: !enableDown,
|
|
193
|
-
...iconProps
|
|
194
|
-
},
|
|
195
|
-
props,
|
|
196
|
-
false
|
|
197
|
-
);
|
|
198
|
-
const [ComponentRemove, _remove_props] = useContextProps(
|
|
199
|
-
"Table.Row.Remove",
|
|
200
|
-
`${childPath}.Row.Remove`,
|
|
201
|
-
{
|
|
202
|
-
id: "tooltip-remove",
|
|
203
|
-
title: translations.removeTooltip,
|
|
204
|
-
["aria-label"]: translations.removeAriaLabel,
|
|
205
|
-
onClick: () => openDeleteDialog(childPath, rowIndex),
|
|
206
|
-
...iconProps
|
|
207
|
-
},
|
|
208
|
-
props,
|
|
209
|
-
false
|
|
210
|
-
);
|
|
211
|
-
const ActionIconUp = useMemo(
|
|
212
|
-
() => ComponentUp === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._up_props, children: /* @__PURE__ */ jsx(IconArrowUp, {}) }) }) : ComponentUp,
|
|
213
|
-
[ComponentUp, _up_props]
|
|
214
|
-
);
|
|
215
|
-
const ActionIconDown = useMemo(
|
|
216
|
-
() => ComponentDown === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._down_props, children: /* @__PURE__ */ jsx(IconArrowDown, {}) }) }) : ComponentDown,
|
|
217
|
-
[ComponentDown, _down_props]
|
|
218
|
-
);
|
|
219
|
-
const ActionIconRemove = useMemo(
|
|
220
|
-
() => ComponentRemove === void 0 ? /* @__PURE__ */ jsx(Grid.Col, { span: "content", children: /* @__PURE__ */ jsx(ActionIcon, { ..._remove_props, children: /* @__PURE__ */ jsx(IconTrash, {}) }) }) : ComponentRemove,
|
|
221
|
-
[ComponentRemove, _remove_props]
|
|
222
|
-
);
|
|
223
|
-
const SortButtons = useMemo(
|
|
224
|
-
() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
225
|
-
ActionIconUp,
|
|
226
|
-
ActionIconDown
|
|
227
|
-
] }),
|
|
228
|
-
[ActionIconDown, ActionIconUp]
|
|
229
|
-
);
|
|
230
|
-
const enableSort = useMemo(
|
|
231
|
-
() => !!showSortButtons && !!(ActionIconUp || ActionIconDown),
|
|
232
|
-
[showSortButtons, ActionIconUp, ActionIconDown]
|
|
233
|
-
);
|
|
234
|
-
const enableRemove = useMemo(() => !disableRemove && !!ActionIconRemove, [disableRemove, ActionIconRemove]);
|
|
235
|
-
const showCell = useMemo(() => enableSort || enableRemove, [enableSort, enableRemove]);
|
|
150
|
+
const { childPath, schema, showSortButtons, enabled, cells } = props;
|
|
151
|
+
const NavigationComponent = useNavigationComponent({
|
|
152
|
+
componentName: "Table",
|
|
153
|
+
componentIdentifier: "Row",
|
|
154
|
+
onUp: props.moveUpCreator(props.path, props.rowIndex),
|
|
155
|
+
onDown: props.moveDownCreator(props.path, props.rowIndex),
|
|
156
|
+
onDelete: () => props.openDeleteDialog(childPath, props.rowIndex),
|
|
157
|
+
...props
|
|
158
|
+
});
|
|
236
159
|
return /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
|
237
160
|
generateCells(NonEmptyCell, schema, childPath, enabled, cells),
|
|
238
|
-
|
|
239
|
-
enableSort && SortButtons,
|
|
240
|
-
enableRemove && ActionIconRemove
|
|
241
|
-
] }) }) : null
|
|
161
|
+
NavigationComponent ? /* @__PURE__ */ jsx(NoBorderTableCell, { style: showSortButtons ? styles.fixedCell : styles.fixedCellSmall, children: NavigationComponent }) : null
|
|
242
162
|
] }, childPath);
|
|
243
163
|
};
|
|
244
164
|
const NonEmptyRow = React.memo(NonEmptyRowComponent);
|