@overmap-ai/forms 1.0.10-conditional-arrows-2.3 → 1.0.10-conditional-arrows-2.5

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/forms.js CHANGED
@@ -2109,7 +2109,7 @@ const FieldActions = memo(function FieldActions2(props) {
2109
2109
  return {
2110
2110
  ...Action.buttonProps,
2111
2111
  onSelect: (_a = Action.buttonProps) == null ? void 0 : _a.onClick,
2112
- content: /* @__PURE__ */ jsx(Wrapper, { ...Action.wrapperProps, children: /* @__PURE__ */ jsxs(Flex, { gap: "2", align: "center", children: [
2112
+ content: /* @__PURE__ */ jsx(Wrapper, { ...Action.wrapperProps, children: /* @__PURE__ */ jsxs(Flex, { gap: "2", align: "center", role: "button", children: [
2113
2113
  /* @__PURE__ */ jsx(Action.Icon, {}),
2114
2114
  Action.text
2115
2115
  ] }) })
@@ -2170,7 +2170,8 @@ const FieldWithActions = memo(function FieldWithActions2(props) {
2170
2170
  ref: draggableProvided.innerRef,
2171
2171
  ...draggableProvided.draggableProps,
2172
2172
  ...draggableProvided.dragHandleProps,
2173
- onDragStart: updateXarrow,
2173
+ onDrag: updateXarrow,
2174
+ onDragEnd: updateXarrow,
2174
2175
  id: `${field.identifier}-card`,
2175
2176
  mb: "4",
2176
2177
  children: /* @__PURE__ */ jsxs(Flex, { gap: "4", justify: "between", align: "center", children: [
@@ -2415,7 +2416,7 @@ const FieldSectionWithActions = memo(function FieldSectionWithActions2(props) {
2415
2416
  if (valueIsFile((_d = field.condition) == null ? void 0 : _d.value))
2416
2417
  throw new Error("File values are not supported for conditions.");
2417
2418
  const conditionValue = Array.isArray((_e = field.condition) == null ? void 0 : _e.value) ? (_g = (_f = field.condition) == null ? void 0 : _f.value) == null ? void 0 : _g.map((v) => typeof v === "string" ? v : v.label).join(", ") : (_i = (_h = field.condition) == null ? void 0 : _h.value) == null ? void 0 : _i.toString();
2418
- return /* @__PURE__ */ jsx(Draggable, { draggableId: field.identifier, index: sectionIndex, children: (draggableProvided) => /* @__PURE__ */ jsx(
2419
+ return /* @__PURE__ */ jsx(Draggable, { draggableId: field.identifier, index: sectionIndex, children: (draggableProvided) => /* @__PURE__ */ jsxs(
2419
2420
  Flex,
2420
2421
  {
2421
2422
  className: styles$3.sectionContainer,
@@ -2425,12 +2426,13 @@ const FieldSectionWithActions = memo(function FieldSectionWithActions2(props) {
2425
2426
  justify: "center",
2426
2427
  align: "center",
2427
2428
  mb: "4",
2428
- children: /* @__PURE__ */ jsxs(Xwrapper, { children: [
2429
+ children: [
2429
2430
  /* @__PURE__ */ jsx(
2430
2431
  Card,
2431
2432
  {
2432
2433
  ...draggableProvided.dragHandleProps,
2433
- onDragStart: updateXarrow,
2434
+ onDrag: updateXarrow,
2435
+ onDragEnd: updateXarrow,
2434
2436
  id: `${field.identifier}-card`,
2435
2437
  style: { flexGrow: "1" },
2436
2438
  children: /* @__PURE__ */ jsxs(Flex, { gap: "3", justify: "between", align: "center", children: [
@@ -2505,7 +2507,7 @@ const FieldSectionWithActions = memo(function FieldSectionWithActions2(props) {
2505
2507
  }
2506
2508
  ),
2507
2509
  field.condition && /* @__PURE__ */ jsx(ConditionalArrow, { identifier: field.identifier, condition: field.condition })
2508
- ] })
2510
+ ]
2509
2511
  }
2510
2512
  ) });
2511
2513
  });
@@ -2656,17 +2658,19 @@ const FieldsEditor = memo(function FieldsEditor2() {
2656
2658
  direction: "column",
2657
2659
  gap: "0",
2658
2660
  children: [
2659
- values.fields.map((field, index) => /* @__PURE__ */ jsx(
2660
- FieldSectionWithActions,
2661
- {
2662
- field,
2663
- index,
2664
- dropState,
2665
- conditionalFieldCounts: conditionalFieldCounts()
2666
- },
2667
- field.label
2668
- )),
2669
- droppableProvided.placeholder,
2661
+ /* @__PURE__ */ jsxs(Xwrapper, { children: [
2662
+ values.fields.map((field, index) => /* @__PURE__ */ jsx(
2663
+ FieldSectionWithActions,
2664
+ {
2665
+ field,
2666
+ index,
2667
+ dropState,
2668
+ conditionalFieldCounts: conditionalFieldCounts()
2669
+ },
2670
+ field.label
2671
+ )),
2672
+ droppableProvided.placeholder
2673
+ ] }),
2670
2674
  /* @__PURE__ */ jsx(FieldBuilder, { ...makeFieldSectionProps, children: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "outline", children: [
2671
2675
  /* @__PURE__ */ jsx(PlusIcon, {}),
2672
2676
  " Add a section"