@pie-element/match-list 7.1.2-next.0 → 7.1.2-next.10
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/browser/controller/index.js +18 -18
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +3861 -4704
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{isEmpty-Eo-n7WSl.js → dist-Cn8gDne6.js} +59 -168
- package/dist/browser/dist-Cn8gDne6.js.map +1 -0
- package/dist/controller/index.js +24 -24
- package/dist/delivery/answer-area.d.ts +3 -0
- package/dist/delivery/answer-area.js +51 -44
- package/dist/delivery/answer.d.ts +9 -0
- package/dist/delivery/answer.js +121 -85
- package/dist/delivery/arrow.js +14 -13
- package/dist/delivery/choices-list.d.ts +3 -0
- package/dist/delivery/choices-list.js +28 -24
- package/dist/delivery/droppable-placeholder.d.ts +3 -1
- package/dist/delivery/droppable-placeholder.js +11 -7
- package/dist/delivery/index.js +2 -2
- package/dist/delivery/keyboard-coordinates.d.ts +24 -0
- package/dist/delivery/keyboard-coordinates.js +63 -0
- package/dist/delivery/main.d.ts +11 -0
- package/dist/delivery/main.js +135 -74
- package/dist/index.iife.js +35 -35
- package/dist/runtime-support.d.ts +12 -0
- package/dist/runtime-support.js +12 -0
- package/package.json +18 -15
- package/dist/browser/isEmpty-Eo-n7WSl.js.map +0 -1
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayMap.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arraySome.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseEach.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFindKey.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseForOwn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGet.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseHasIn.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqual.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsEqualDeep.js +0 -30
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMatch.js +0 -26
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIteratee.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatches.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseMatchesProperty.js +0 -17
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseProperty.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyDeep.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseReduce.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseToString.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseEach.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createBaseFor.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalArrays.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalByTag.js +0 -35
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_equalObjects.js +0 -32
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMatchData.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +0 -23
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hasPath.js +0 -18
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isStrictComparable.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_matchesStrictComparable.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheAdd.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToArray.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stringToPath.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/find.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js +0 -13
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/findKey.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/get.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/hasIn.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +0 -21
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isUndefined.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +0 -9
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/memoize.js +0 -16
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/property.js +0 -10
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/reduce.js +0 -12
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js +0 -8
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +0 -19
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toString.js +0 -7
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/uniqueId.js +0 -9
package/dist/delivery/answer.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "react";
|
|
1
|
+
import e, { useState as t } from "react";
|
|
3
2
|
import n from "debug";
|
|
4
3
|
import r from "prop-types";
|
|
5
4
|
import { PlaceHolder as i } from "@pie-lib/drag";
|
|
@@ -7,13 +6,14 @@ import { useDraggable as a, useDroppable as o } from "@dnd-kit/core";
|
|
|
7
6
|
import { color as s } from "@pie-lib/render-ui";
|
|
8
7
|
import { jsx as c } from "react/jsx-runtime";
|
|
9
8
|
import { styled as l } from "@mui/material/styles";
|
|
9
|
+
import { isEmpty as u } from "@pie-element/shared-lodash";
|
|
10
10
|
//#region src/delivery/answer.tsx
|
|
11
|
-
var
|
|
11
|
+
var d = n("pie-elements:match-title:answer"), f = l("div")(({ theme: e }) => ({
|
|
12
12
|
width: "100%",
|
|
13
13
|
fontSize: "18px",
|
|
14
14
|
textAlign: "center",
|
|
15
15
|
color: `rgba(${e.palette.common.black}, 0.6)`
|
|
16
|
-
})),
|
|
16
|
+
})), p = ({ index: e, isOver: t, disabled: n, type: r }) => /* @__PURE__ */ c(i, {
|
|
17
17
|
extraStyles: {
|
|
18
18
|
display: "flex",
|
|
19
19
|
padding: "0",
|
|
@@ -24,18 +24,18 @@ var u = n("pie-elements:match-title:answer"), d = l("div")(({ theme: e }) => ({
|
|
|
24
24
|
disabled: n,
|
|
25
25
|
isOver: t,
|
|
26
26
|
type: r,
|
|
27
|
-
children: e !== void 0 && /* @__PURE__ */ c(
|
|
27
|
+
children: e !== void 0 && /* @__PURE__ */ c(f, { children: e })
|
|
28
28
|
});
|
|
29
|
-
|
|
29
|
+
p.propTypes = {
|
|
30
30
|
index: r.number,
|
|
31
31
|
isOver: r.bool,
|
|
32
32
|
disabled: r.bool,
|
|
33
33
|
type: r.string
|
|
34
34
|
};
|
|
35
|
-
var
|
|
35
|
+
var m = l("div")(({ isDragging: e, isSelected: t, isOver: n, disabled: r, outcome: i }) => ({
|
|
36
36
|
color: s.text(),
|
|
37
37
|
backgroundColor: s.white(),
|
|
38
|
-
border: `1px solid ${i === "correct" ? s.correct() : i === "incorrect" ? s.incorrect() :
|
|
38
|
+
border: `1px solid ${i === "correct" ? s.correct() : i === "incorrect" ? s.incorrect() : s.border()}`,
|
|
39
39
|
cursor: r ? "not-allowed" : "pointer",
|
|
40
40
|
width: "100%",
|
|
41
41
|
padding: "10px",
|
|
@@ -43,36 +43,38 @@ var p = l("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
43
43
|
overflow: "hidden",
|
|
44
44
|
transition: "opacity 200ms linear",
|
|
45
45
|
wordBreak: "break-word",
|
|
46
|
-
opacity: t && !r ? .5 : n && !r ? .2 : 1,
|
|
46
|
+
opacity: (e || t) && !r ? .5 : n && !r ? .2 : 1,
|
|
47
47
|
touchAction: "none"
|
|
48
|
-
})),
|
|
49
|
-
let { isDragging: t,
|
|
50
|
-
return
|
|
51
|
-
index:
|
|
52
|
-
isOver:
|
|
53
|
-
disabled:
|
|
54
|
-
type:
|
|
55
|
-
}) : /* @__PURE__ */ c(
|
|
48
|
+
})), h = (e) => {
|
|
49
|
+
let { isDragging: t, isSelected: n, isOver: r, title: i, disabled: a, empty: o, outcome: s, guideIndex: l, type: u } = e;
|
|
50
|
+
return o ? /* @__PURE__ */ c(p, {
|
|
51
|
+
index: l,
|
|
52
|
+
isOver: r,
|
|
53
|
+
disabled: a,
|
|
54
|
+
type: u
|
|
55
|
+
}) : /* @__PURE__ */ c(m, {
|
|
56
56
|
isDragging: t,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
isSelected: n,
|
|
58
|
+
isOver: r,
|
|
59
|
+
disabled: a,
|
|
60
|
+
outcome: s,
|
|
61
|
+
dangerouslySetInnerHTML: { __html: i }
|
|
61
62
|
});
|
|
62
|
-
},
|
|
63
|
+
}, g = l("div")(({ correct: e, isSelected: t, isDragging: n, theme: r }) => ({
|
|
63
64
|
boxSizing: "border-box",
|
|
64
65
|
minHeight: 40,
|
|
65
66
|
minWidth: "200px",
|
|
66
67
|
overflow: "hidden",
|
|
67
|
-
margin:
|
|
68
|
+
margin: r.spacing(.5),
|
|
68
69
|
padding: "0px",
|
|
69
70
|
textAlign: "center",
|
|
70
71
|
height: "initial",
|
|
71
|
-
border: e === !0 ? `1px solid var(--feedback-correct-bg-color, ${s.correct()})` : e === !1 ? `1px solid var(--feedback-incorrect-bg-color, ${s.incorrect()})` : "none"
|
|
72
|
-
})),
|
|
72
|
+
border: e === !0 ? `1px solid var(--feedback-correct-bg-color, ${s.correct()})` : e === !1 ? `1px solid var(--feedback-incorrect-bg-color, ${s.incorrect()})` : t && !n ? `2px solid ${s.buttonFocusOutline()}` : "none"
|
|
73
|
+
})), _ = class extends e.Component {
|
|
73
74
|
static propTypes = {
|
|
74
75
|
className: r.string,
|
|
75
76
|
isDragging: r.bool,
|
|
77
|
+
isSelected: r.bool,
|
|
76
78
|
id: r.any,
|
|
77
79
|
title: r.string,
|
|
78
80
|
isOver: r.bool,
|
|
@@ -89,88 +91,122 @@ var p = l("div")(({ theme: e, isDragging: t, isOver: n, disabled: r, outcome: i
|
|
|
89
91
|
}
|
|
90
92
|
handleTouchStart = (e) => {};
|
|
91
93
|
render() {
|
|
92
|
-
let { id:
|
|
93
|
-
return
|
|
94
|
+
let { id: e, title: t, isDragging: n = !1, isSelected: r = !1, className: i, disabled: a, isOver: o = !1, type: s, correct: l } = this.props;
|
|
95
|
+
return d("[render], props: ", this.props), /* @__PURE__ */ c(g, {
|
|
94
96
|
correct: l,
|
|
97
|
+
isSelected: r,
|
|
98
|
+
isDragging: n,
|
|
95
99
|
className: i,
|
|
96
100
|
ref: (e) => this.ref = e,
|
|
97
|
-
children: /* @__PURE__ */ c(
|
|
98
|
-
title:
|
|
99
|
-
id:
|
|
101
|
+
children: /* @__PURE__ */ c(h, {
|
|
102
|
+
title: t,
|
|
103
|
+
id: e,
|
|
100
104
|
isOver: o,
|
|
101
|
-
empty:
|
|
102
|
-
isDragging:
|
|
105
|
+
empty: u(t),
|
|
106
|
+
isDragging: n,
|
|
107
|
+
isSelected: r,
|
|
103
108
|
disabled: a,
|
|
104
109
|
type: s
|
|
105
110
|
})
|
|
106
111
|
});
|
|
107
112
|
}
|
|
108
|
-
}
|
|
109
|
-
function
|
|
110
|
-
let { id:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
disabled: s ||
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
ref:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
113
|
+
}, v = ({ type: e, id: t, promptId: n }) => n == null ? `${e || "answer"}-${t}` : `${e || "answer"}-prompt-${n}`;
|
|
114
|
+
function y(e) {
|
|
115
|
+
let { id: n, instanceId: r, promptId: i, draggable: s = !0, disabled: l = !1, type: u, selectedAnswer: d, onSelectClick: f, onPlacementClick: p } = e, m = v({
|
|
116
|
+
type: u,
|
|
117
|
+
id: n,
|
|
118
|
+
promptId: i
|
|
119
|
+
}), h = i == null ? void 0 : `drop-${i}`, g = {
|
|
120
|
+
type: u || "answer",
|
|
121
|
+
id: n,
|
|
122
|
+
instanceId: r,
|
|
123
|
+
value: e.title,
|
|
124
|
+
promptId: i
|
|
125
|
+
}, y = h ? {
|
|
126
|
+
type: "drop-zone",
|
|
127
|
+
promptId: i,
|
|
128
|
+
instanceId: r
|
|
129
|
+
} : void 0, { attributes: b, listeners: x, setNodeRef: S, transform: C, transition: w, isDragging: T } = a({
|
|
130
|
+
id: m,
|
|
131
|
+
data: g,
|
|
132
|
+
disabled: !s || l,
|
|
133
|
+
attributes: { tabIndex: s && !l ? 0 : -1 }
|
|
134
|
+
}), E = o({
|
|
135
|
+
id: h,
|
|
136
|
+
data: y,
|
|
137
|
+
disabled: l || !h
|
|
138
|
+
}), D = E.setNodeRef, O = E.isOver, [k, A] = t(!1), j = !!d, M = O || j && k && !l, N = !!d && d.type === g.type && d.id === g.id && d.promptId === g.promptId, P = C ? `translate3d(${C.x}px, ${C.y}px, 0)` : void 0;
|
|
139
|
+
if (h) {
|
|
140
|
+
let t = () => {
|
|
141
|
+
l || (N ? f?.(g) : d ? p?.(y) : s && f?.(g));
|
|
142
|
+
}, n = !s && !l;
|
|
143
|
+
return /* @__PURE__ */ c("div", {
|
|
144
|
+
ref: D,
|
|
145
|
+
role: "button",
|
|
146
|
+
tabIndex: n ? 0 : -1,
|
|
147
|
+
onClick: t,
|
|
148
|
+
onKeyDown: n ? (e) => {
|
|
149
|
+
(e.code === "Space" || e.code === "Enter") && (e.preventDefault(), t());
|
|
150
|
+
} : void 0,
|
|
151
|
+
onMouseEnter: () => A(!0),
|
|
152
|
+
onMouseLeave: () => A(!1),
|
|
153
|
+
style: {
|
|
154
|
+
flex: 1,
|
|
155
|
+
opacity: T ? .5 : 1,
|
|
156
|
+
backgroundColor: T || N || M ? "rgba(0,0,0,0.05)" : "transparent",
|
|
157
|
+
cursor: j && !l ? "pointer" : void 0
|
|
158
|
+
},
|
|
159
|
+
children: /* @__PURE__ */ c("div", {
|
|
160
|
+
ref: S,
|
|
161
|
+
...x,
|
|
162
|
+
...b,
|
|
163
|
+
style: {
|
|
164
|
+
transform: P,
|
|
165
|
+
transition: w
|
|
166
|
+
},
|
|
167
|
+
children: /* @__PURE__ */ c(_, {
|
|
168
|
+
...e,
|
|
169
|
+
isDragging: T,
|
|
170
|
+
isSelected: N,
|
|
171
|
+
isOver: M
|
|
172
|
+
})
|
|
146
173
|
})
|
|
147
|
-
})
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
let F = (e) => {
|
|
177
|
+
l || (e.stopPropagation(), f?.(g));
|
|
178
|
+
};
|
|
179
|
+
return /* @__PURE__ */ c("div", {
|
|
180
|
+
ref: S,
|
|
181
|
+
...x,
|
|
182
|
+
...b,
|
|
183
|
+
onClick: F,
|
|
152
184
|
style: {
|
|
153
|
-
transform:
|
|
154
|
-
transition:
|
|
155
|
-
cursor:
|
|
156
|
-
opacity:
|
|
157
|
-
touchAction:
|
|
185
|
+
transform: P,
|
|
186
|
+
transition: w,
|
|
187
|
+
cursor: l ? "not-allowed" : "grab",
|
|
188
|
+
opacity: T ? .5 : 1,
|
|
189
|
+
touchAction: s && !l ? "none" : "auto"
|
|
158
190
|
},
|
|
159
|
-
children: /* @__PURE__ */ c(
|
|
191
|
+
children: /* @__PURE__ */ c(_, {
|
|
160
192
|
...e,
|
|
161
|
-
isDragging:
|
|
193
|
+
isDragging: T,
|
|
194
|
+
isSelected: N,
|
|
162
195
|
isOver: !1
|
|
163
196
|
})
|
|
164
197
|
});
|
|
165
198
|
}
|
|
166
|
-
|
|
199
|
+
y.propTypes = {
|
|
167
200
|
id: r.any,
|
|
168
201
|
instanceId: r.string,
|
|
169
202
|
promptId: r.any,
|
|
170
203
|
title: r.string,
|
|
171
204
|
draggable: r.bool,
|
|
172
205
|
disabled: r.bool,
|
|
173
|
-
type: r.string
|
|
206
|
+
type: r.string,
|
|
207
|
+
selectedAnswer: r.object,
|
|
208
|
+
onSelectClick: r.func,
|
|
209
|
+
onPlacementClick: r.func
|
|
174
210
|
};
|
|
175
211
|
//#endregion
|
|
176
|
-
export {
|
|
212
|
+
export { _ as Answer, v as buildDragId, y as default };
|
package/dist/delivery/arrow.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import e from "react";
|
|
2
2
|
import t from "prop-types";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import a from "@mui/
|
|
3
|
+
import { color as n } from "@pie-lib/render-ui";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import { styled as a } from "@mui/material/styles";
|
|
6
|
+
import o from "@mui/icons-material/ArrowDropDown";
|
|
6
7
|
//#region src/delivery/arrow.tsx
|
|
7
|
-
var
|
|
8
|
+
var s = a("div")({
|
|
8
9
|
display: "inline-block",
|
|
9
10
|
position: "relative",
|
|
10
11
|
width: "100%"
|
|
11
|
-
}),
|
|
12
|
-
backgroundColor:
|
|
13
|
-
bottom:
|
|
12
|
+
}), c = a("span")(({ isRight: e }) => ({
|
|
13
|
+
backgroundColor: n.border(),
|
|
14
|
+
bottom: e ? 20 : 19,
|
|
14
15
|
content: "\"\"",
|
|
15
16
|
display: "block",
|
|
16
17
|
height: 1,
|
|
17
18
|
left: 20,
|
|
18
19
|
position: "absolute",
|
|
19
20
|
width: "100%"
|
|
20
|
-
})),
|
|
21
|
+
})), l = class extends e.Component {
|
|
21
22
|
static propTypes = { direction: t.string };
|
|
22
23
|
render() {
|
|
23
24
|
let { direction: e } = this.props;
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ i(s, {
|
|
25
26
|
style: e === "left" ? {} : { transform: "rotate(180deg)" },
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ r(o, { style: {
|
|
27
28
|
transform: "rotate(90deg)",
|
|
28
|
-
color:
|
|
29
|
+
color: n.border(),
|
|
29
30
|
fontSize: 40
|
|
30
|
-
} }), /* @__PURE__ */
|
|
31
|
+
} }), /* @__PURE__ */ r(c, { isRight: e !== "left" })]
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
//#endregion
|
|
35
|
-
export {
|
|
36
|
+
export { l as Arrow, l as default };
|
|
@@ -15,6 +15,9 @@ export declare class ChoicesList extends React.Component {
|
|
|
15
15
|
model: PropTypes.Validator<object>;
|
|
16
16
|
disabled: PropTypes.Validator<boolean>;
|
|
17
17
|
onRemoveAnswer: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
selectedAnswer: PropTypes.Requireable<object>;
|
|
19
|
+
onChoiceClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
20
|
+
onPlacementClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
21
|
};
|
|
19
22
|
render(): React.JSX.Element;
|
|
20
23
|
}
|
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import e from "
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import r from "
|
|
5
|
-
import i from "
|
|
6
|
-
import a from "
|
|
7
|
-
import o from "
|
|
8
|
-
import { jsx as s } from "react/jsx-runtime";
|
|
9
|
-
import { styled as c } from "@mui/material/styles";
|
|
1
|
+
import e from "./answer.js";
|
|
2
|
+
import { DroppablePlaceholder as t } from "./droppable-placeholder.js";
|
|
3
|
+
import n from "react";
|
|
4
|
+
import r from "prop-types";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { styled as a } from "@mui/material/styles";
|
|
7
|
+
import { find as o, isEmpty as s, isUndefined as c } from "@pie-element/shared-lodash";
|
|
10
8
|
//#region src/delivery/choices-list.tsx
|
|
11
|
-
var l =
|
|
9
|
+
var l = a("div")(({ theme: e }) => ({ marginBottom: e.spacing(2) })), u = class extends n.Component {
|
|
12
10
|
static propTypes = {
|
|
13
|
-
session:
|
|
14
|
-
instanceId:
|
|
15
|
-
model:
|
|
16
|
-
disabled:
|
|
17
|
-
onRemoveAnswer:
|
|
11
|
+
session: r.object.isRequired,
|
|
12
|
+
instanceId: r.string.isRequired,
|
|
13
|
+
model: r.object.isRequired,
|
|
14
|
+
disabled: r.bool.isRequired,
|
|
15
|
+
onRemoveAnswer: r.func,
|
|
16
|
+
selectedAnswer: r.object,
|
|
17
|
+
onChoiceClick: r.func,
|
|
18
|
+
onPlacementClick: r.func
|
|
18
19
|
};
|
|
19
20
|
render() {
|
|
20
|
-
let { model:
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
let { model: n, disabled: r, session: a, instanceId: u, onRemoveAnswer: d, selectedAnswer: f, onChoiceClick: p, onPlacementClick: m } = this.props, { config: h } = n, { duplicates: g } = h;
|
|
22
|
+
return /* @__PURE__ */ i(l, { children: /* @__PURE__ */ i(t, {
|
|
22
23
|
id: "choices-pool",
|
|
23
|
-
disabled:
|
|
24
|
+
disabled: r,
|
|
24
25
|
onRemoveAnswer: d,
|
|
25
|
-
|
|
26
|
+
onPlacementClick: m,
|
|
27
|
+
children: h.answers.filter((e) => g || s(a) || !a.value || c(o(a.value, (t) => t === e.id))).map((t) => /* @__PURE__ */ i(e, {
|
|
26
28
|
instanceId: u,
|
|
27
29
|
draggable: !0,
|
|
28
|
-
disabled:
|
|
29
|
-
session:
|
|
30
|
+
disabled: r,
|
|
31
|
+
session: a,
|
|
30
32
|
type: "choice",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
selectedAnswer: f,
|
|
34
|
+
onSelectClick: p,
|
|
35
|
+
...t
|
|
36
|
+
}, t.id))
|
|
33
37
|
}) });
|
|
34
38
|
}
|
|
35
39
|
};
|
|
36
40
|
//#endregion
|
|
37
|
-
export { u as default };
|
|
41
|
+
export { u as ChoicesList, u as default };
|
|
@@ -8,17 +8,19 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
|
-
export declare function DroppablePlaceholder({ id, disabled, children, ...rest }: {
|
|
11
|
+
export declare function DroppablePlaceholder({ id, disabled, children, onPlacementClick, ...rest }: {
|
|
12
12
|
[x: string]: any;
|
|
13
13
|
id: any;
|
|
14
14
|
disabled: any;
|
|
15
15
|
children: any;
|
|
16
|
+
onPlacementClick: any;
|
|
16
17
|
}): React.JSX.Element;
|
|
17
18
|
export declare namespace DroppablePlaceholder {
|
|
18
19
|
var propTypes: {
|
|
19
20
|
id: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
20
21
|
disabled: PropTypes.Requireable<boolean>;
|
|
21
22
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
23
|
+
onPlacementClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
24
|
};
|
|
23
25
|
}
|
|
24
26
|
export default DroppablePlaceholder;
|
|
@@ -16,16 +16,19 @@ var a = i("div")(({ theme: e }) => ({
|
|
|
16
16
|
minHeight: 50,
|
|
17
17
|
transition: "background-color 200ms ease"
|
|
18
18
|
}));
|
|
19
|
-
function o({ id: e, disabled: i, children: o,
|
|
20
|
-
let { setNodeRef:
|
|
19
|
+
function o({ id: e, disabled: i, children: o, onPlacementClick: s, ...c }) {
|
|
20
|
+
let { setNodeRef: l, isOver: u } = n({
|
|
21
21
|
id: e || "choices-pool",
|
|
22
22
|
data: { type: "choices-pool" },
|
|
23
23
|
disabled: i
|
|
24
24
|
});
|
|
25
25
|
return /* @__PURE__ */ r(a, {
|
|
26
|
-
ref:
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
ref: l,
|
|
27
|
+
onClick: () => {
|
|
28
|
+
i || s?.({ type: "choices-pool" });
|
|
29
|
+
},
|
|
30
|
+
style: { backgroundColor: u ? "rgba(0,0,0,0.05)" : "transparent" },
|
|
31
|
+
...c,
|
|
29
32
|
children: /* @__PURE__ */ r(t, {
|
|
30
33
|
id: e,
|
|
31
34
|
disabled: i,
|
|
@@ -36,7 +39,8 @@ function o({ id: e, disabled: i, children: o, ...s }) {
|
|
|
36
39
|
o.propTypes = {
|
|
37
40
|
id: e.oneOfType([e.string, e.number]),
|
|
38
41
|
disabled: e.bool,
|
|
39
|
-
children: e.node
|
|
42
|
+
children: e.node,
|
|
43
|
+
onPlacementClick: e.func
|
|
40
44
|
};
|
|
41
45
|
//#endregion
|
|
42
|
-
export { o as default };
|
|
46
|
+
export { o as DroppablePlaceholder, o as default };
|
package/dist/delivery/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e from "./main.js";
|
|
1
|
+
import { Main as e } from "./main.js";
|
|
2
2
|
import t from "react";
|
|
3
3
|
import { createRoot as n } from "react-dom/client";
|
|
4
4
|
import r from "debug";
|
|
@@ -42,7 +42,7 @@ var o = r("pie-ui:graph-lines"), s = (e, t) => {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
disconnectedCallback() {
|
|
45
|
-
this._root
|
|
45
|
+
this._root &&= (this._root.unmount(), null);
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
//#endregion
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @synced-from pie-elements/packages/match-list/src/keyboard-coordinates.js
|
|
3
|
+
* @auto-generated
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically synced from pie-elements and converted to TypeScript.
|
|
6
|
+
* Manual edits will be overwritten on next sync.
|
|
7
|
+
* To make changes, edit the upstream JavaScript file and run sync again.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Custom keyboard coordinate getter for non-sortable drag-and-drop.
|
|
11
|
+
*
|
|
12
|
+
* Tab/Shift+Tab cycle the dragged item directly onto the next/previous droppable
|
|
13
|
+
* (response area or the choices pool), in DOM order, placing the dragged item's own
|
|
14
|
+
* top-left corner at the target's center-left point. Arrow keys are left doing plain
|
|
15
|
+
* free-form movement (nudging the dragged item by a fixed step, same as dnd-kit's own
|
|
16
|
+
* default keyboard behavior) rather than jumping between droppables — collision
|
|
17
|
+
* detection (rectIntersection) still picks up whatever the item ends up actually
|
|
18
|
+
* overlapping.
|
|
19
|
+
*/
|
|
20
|
+
export declare const closestDroppableKeyboardCoordinates: (event: any, { active, context, currentCoordinates }: {
|
|
21
|
+
active: any;
|
|
22
|
+
context: any;
|
|
23
|
+
currentCoordinates: any;
|
|
24
|
+
}) => any;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { KeyboardCode as e } from "@dnd-kit/core";
|
|
2
|
+
//#region src/delivery/keyboard-coordinates.ts
|
|
3
|
+
var t = 25, n = (n, { active: i, context: a, currentCoordinates: o }) => {
|
|
4
|
+
let { code: s } = n, c = s === "Tab", l = s === e.Down || s === e.Up || s === e.Left || s === e.Right;
|
|
5
|
+
if (!c && !l) return;
|
|
6
|
+
if (n.preventDefault(), l) switch (s) {
|
|
7
|
+
case e.Down: return {
|
|
8
|
+
...o,
|
|
9
|
+
y: o.y + t
|
|
10
|
+
};
|
|
11
|
+
case e.Up: return {
|
|
12
|
+
...o,
|
|
13
|
+
y: o.y - t
|
|
14
|
+
};
|
|
15
|
+
case e.Right: return {
|
|
16
|
+
...o,
|
|
17
|
+
x: o.x + t
|
|
18
|
+
};
|
|
19
|
+
case e.Left: return {
|
|
20
|
+
...o,
|
|
21
|
+
x: o.x - t
|
|
22
|
+
};
|
|
23
|
+
default: return o;
|
|
24
|
+
}
|
|
25
|
+
let { droppableRects: u, droppableContainers: d, collisionRect: f } = a;
|
|
26
|
+
if (!u || u.size === 0) return o;
|
|
27
|
+
let p = i?.data?.current, m = p?.promptId == null ? void 0 : `drop-${p.promptId}`, h = [];
|
|
28
|
+
for (let [e, t] of d) {
|
|
29
|
+
if (t?.disabled || e === m) continue;
|
|
30
|
+
let n = t?.node?.current?.getBoundingClientRect() ?? u.get(e);
|
|
31
|
+
if (!n) continue;
|
|
32
|
+
let r = {
|
|
33
|
+
x: n.left + n.width / 2,
|
|
34
|
+
y: n.top + n.height / 2
|
|
35
|
+
}, i = f?.height ?? 0, a = {
|
|
36
|
+
x: n.left,
|
|
37
|
+
y: n.top + n.height / 2 - i / 2
|
|
38
|
+
};
|
|
39
|
+
h.push({
|
|
40
|
+
id: e,
|
|
41
|
+
rect: n,
|
|
42
|
+
dropPosition: a,
|
|
43
|
+
center: r
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (h.length === 0) return o;
|
|
47
|
+
let g = n.shiftKey;
|
|
48
|
+
h.sort((e, t) => Math.abs(e.center.y - t.center.y) > 10 ? e.center.y - t.center.y : e.center.x - t.center.x);
|
|
49
|
+
let _ = f ? {
|
|
50
|
+
x: f.left + f.width / 2,
|
|
51
|
+
y: f.top + f.height / 2
|
|
52
|
+
} : o, v = h.findIndex((e) => _.x >= e.rect.left && _.x <= e.rect.right && _.y >= e.rect.top && _.y <= e.rect.bottom);
|
|
53
|
+
if (v === -1) {
|
|
54
|
+
let e = Infinity;
|
|
55
|
+
for (let t = 0; t < h.length; t++) {
|
|
56
|
+
let n = r(o, h[t].dropPosition);
|
|
57
|
+
n < e && (e = n, v = t);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return h[g ? (v - 1 + h.length) % h.length : (v + 1) % h.length].dropPosition;
|
|
61
|
+
}, r = (e, t) => Math.sqrt((e.x - t.x) ** 2 + (e.y - t.y) ** 2);
|
|
62
|
+
//#endregion
|
|
63
|
+
export { n as closestDroppableKeyboardCoordinates };
|
package/dist/delivery/main.d.ts
CHANGED
|
@@ -18,7 +18,18 @@ export declare class Main extends React.Component {
|
|
|
18
18
|
constructor(props: any);
|
|
19
19
|
onRemoveAnswer(id: any): void;
|
|
20
20
|
onDragStart: any;
|
|
21
|
+
onDragCancel: any;
|
|
22
|
+
placeAnswer: any;
|
|
21
23
|
onPlaceAnswer: any;
|
|
24
|
+
isSameAnswer: (a: any, b: any) => boolean;
|
|
25
|
+
selectAnswer: any;
|
|
26
|
+
toggleAnswerSelection: any;
|
|
27
|
+
cancelSelection: any;
|
|
28
|
+
endAnyLiveKeyboardDrag: any;
|
|
29
|
+
placeSelectedAnswer: any;
|
|
30
|
+
isClickSoonAfterDragEnd: () => boolean;
|
|
31
|
+
onChoiceClick: any;
|
|
32
|
+
onPlacementClick: any;
|
|
22
33
|
toggleShowCorrect: any;
|
|
23
34
|
renderDragOverlay: any;
|
|
24
35
|
render(): React.JSX.Element;
|