@overmap-ai/core 1.0.34-image-preview.1 → 1.0.34-image-preview.3
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/overmap-core.js +19 -19
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +19 -19
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/overmap-core.js
CHANGED
|
@@ -10267,39 +10267,39 @@ const FieldActions = memo((props) => {
|
|
|
10267
10267
|
const { values } = useFormikContext();
|
|
10268
10268
|
const actions = useMemo(() => {
|
|
10269
10269
|
const actions2 = [
|
|
10270
|
-
{
|
|
10271
|
-
Icon: TrashIcon,
|
|
10272
|
-
buttonProps: { onClick: remove2 },
|
|
10273
|
-
key: "delete",
|
|
10274
|
-
text: "Delete"
|
|
10275
|
-
},
|
|
10276
10270
|
{
|
|
10277
10271
|
Icon: CopyIcon,
|
|
10278
10272
|
key: "duplicate",
|
|
10279
10273
|
text: "Duplicate",
|
|
10280
10274
|
buttonProps: { onClick: duplicate }
|
|
10275
|
+
},
|
|
10276
|
+
{
|
|
10277
|
+
Icon: TrashIcon,
|
|
10278
|
+
buttonProps: { onClick: remove2 },
|
|
10279
|
+
key: "delete",
|
|
10280
|
+
text: "Delete"
|
|
10281
10281
|
}
|
|
10282
10282
|
];
|
|
10283
|
-
if (sectionIndex === void 0 && index2 !==
|
|
10284
|
-
actions2.
|
|
10285
|
-
Icon:
|
|
10286
|
-
key: "
|
|
10287
|
-
text: "Move
|
|
10283
|
+
if (sectionIndex === void 0 && index2 !== values.fields.length - 1 || sectionIndex !== void 0 && (sectionIndex < values.fields.length - 1 || index2 !== values.fields[sectionIndex].fields.length - 1)) {
|
|
10284
|
+
actions2.unshift({
|
|
10285
|
+
Icon: ArrowDownIcon,
|
|
10286
|
+
key: "moveDown",
|
|
10287
|
+
text: "Move down",
|
|
10288
10288
|
buttonProps: {
|
|
10289
10289
|
onClick: () => {
|
|
10290
|
-
move("
|
|
10290
|
+
move("down");
|
|
10291
10291
|
}
|
|
10292
10292
|
}
|
|
10293
10293
|
});
|
|
10294
10294
|
}
|
|
10295
|
-
if (sectionIndex === void 0 && index2 !==
|
|
10296
|
-
actions2.
|
|
10297
|
-
Icon:
|
|
10298
|
-
key: "
|
|
10299
|
-
text: "Move
|
|
10295
|
+
if (sectionIndex === void 0 && index2 !== 0 || sectionIndex !== void 0 && (sectionIndex !== 0 || index2 !== 0)) {
|
|
10296
|
+
actions2.unshift({
|
|
10297
|
+
Icon: ArrowUpIcon,
|
|
10298
|
+
key: "moveUp",
|
|
10299
|
+
text: "Move up",
|
|
10300
10300
|
buttonProps: {
|
|
10301
10301
|
onClick: () => {
|
|
10302
|
-
move("
|
|
10302
|
+
move("up");
|
|
10303
10303
|
}
|
|
10304
10304
|
}
|
|
10305
10305
|
});
|
|
@@ -10307,7 +10307,7 @@ const FieldActions = memo((props) => {
|
|
|
10307
10307
|
return actions2;
|
|
10308
10308
|
}, [duplicate, index2, move, remove2, sectionIndex, values.fields]);
|
|
10309
10309
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10310
|
-
/* @__PURE__ */ jsx(Flex, {
|
|
10310
|
+
/* @__PURE__ */ jsx(Flex, { display: forMobile(false, "flex"), direction: "column", gap: "5", mx: "2", children: actions.map((Action) => /* @__PURE__ */ jsx(
|
|
10311
10311
|
IconButton,
|
|
10312
10312
|
{
|
|
10313
10313
|
type: "button",
|