eat-js-sdk 2.0.24 → 2.0.25
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/interaction-builder.mjs +17 -25
- package/package.json +1 -1
|
@@ -14052,28 +14052,21 @@ var root$5 = /* @__PURE__ */ from_html(`<!> <section role="group" aria-dropeffe
|
|
|
14052
14052
|
function CategoriseDndContainer($$anchor, $$props) {
|
|
14053
14053
|
push($$props, true);
|
|
14054
14054
|
let containerId = prop($$props, "containerId", 7), containerClass = prop($$props, "containerClass", 7, ""), showButton = prop($$props, "showButton", 7, true), items = prop($$props, "items", 23, () => []), selectedItemId = prop($$props, "selectedItemId", 7, void 0), isLocked = prop($$props, "isLocked", 7, false), currentTabContainer = prop($$props, "currentTabContainer", 7, null), isMobile = prop($$props, "isMobile", 7, false), mode = prop($$props, "mode", 7), paddingTop = prop($$props, "paddingTop", 7, 0), dndType = prop($$props, "dndType", 7, "categorise"), onitemdrop = prop($$props, "onitemdrop", 7), onitemselect = prop($$props, "onitemselect", 7), oncontainerclick = prop($$props, "oncontainerclick", 7), onitemkeydown = prop($$props, "onitemkeydown", 7), ondraghover = prop($$props, "ondraghover", 7), ondragstart = prop($$props, "ondragstart", 7), children = prop($$props, "children", 7);
|
|
14055
|
-
let dndItems = /* @__PURE__ */ state(proxy([]));
|
|
14056
14055
|
let considerItemId = /* @__PURE__ */ state(void 0);
|
|
14057
14056
|
let isHoveringDrag = /* @__PURE__ */ state(false);
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
}
|
|
14070
|
-
return { ...item };
|
|
14071
|
-
}),
|
|
14072
|
-
true
|
|
14073
|
-
);
|
|
14074
|
-
});
|
|
14057
|
+
const dndItems = /* @__PURE__ */ user_derived(() => items().map((item) => {
|
|
14058
|
+
if (item.id === get$1(considerItemId)) {
|
|
14059
|
+
return {
|
|
14060
|
+
id: "clonedId",
|
|
14061
|
+
itemText: item.itemText,
|
|
14062
|
+
isClonedItem: true,
|
|
14063
|
+
cloneId: item.id
|
|
14064
|
+
};
|
|
14065
|
+
}
|
|
14066
|
+
return { ...item };
|
|
14067
|
+
}));
|
|
14075
14068
|
const handleConsider = (e2) => {
|
|
14076
|
-
const {
|
|
14069
|
+
const { info } = e2.detail;
|
|
14077
14070
|
if (info.trigger === "draggedEntered") {
|
|
14078
14071
|
set(isHoveringDrag, true);
|
|
14079
14072
|
if (ondraghover()) {
|
|
@@ -14096,16 +14089,15 @@ function CategoriseDndContainer($$anchor, $$props) {
|
|
|
14096
14089
|
}
|
|
14097
14090
|
return;
|
|
14098
14091
|
}
|
|
14099
|
-
if (
|
|
14100
|
-
set(
|
|
14092
|
+
if (info.trigger === "droppedOutsideOfAny" || info.trigger === "dragStopped") {
|
|
14093
|
+
set(considerItemId, void 0);
|
|
14094
|
+
set(isHoveringDrag, false);
|
|
14095
|
+
return;
|
|
14101
14096
|
}
|
|
14102
14097
|
};
|
|
14103
14098
|
const handleFinalize = (e2) => {
|
|
14104
|
-
const { items: newItems } = e2.detail;
|
|
14105
14099
|
set(considerItemId, void 0);
|
|
14106
14100
|
set(isHoveringDrag, false);
|
|
14107
|
-
const filteredItems = newItems.filter((item) => !item.isClonedItem);
|
|
14108
|
-
set(dndItems, filteredItems, true);
|
|
14109
14101
|
if (onitemdrop()) {
|
|
14110
14102
|
onitemdrop()(e2);
|
|
14111
14103
|
}
|
|
@@ -14154,7 +14146,7 @@ function CategoriseDndContainer($$anchor, $$props) {
|
|
|
14154
14146
|
zoneItemTabIndex: get$1(getZoneItemTabIndex)(),
|
|
14155
14147
|
zoneTabIndex: -1,
|
|
14156
14148
|
autoAriaDisabled: true,
|
|
14157
|
-
|
|
14149
|
+
disableEnterSpaceKeyDrag: true
|
|
14158
14150
|
}));
|
|
14159
14151
|
const isEmpty = /* @__PURE__ */ user_derived(() => get$1(dndItems).length === 0);
|
|
14160
14152
|
const isSourceContainer = /* @__PURE__ */ user_derived(() => () => {
|