@ztwoint/z-ui 0.1.61 → 0.1.62
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/_virtual/bind-all.js +4 -0
- package/dist/_virtual/bind.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/assets/icons/drag-handle.js +18 -0
- package/dist/components/assets/icons/minus.js +28 -0
- package/dist/components/column-reorder/column-reorder.hook.js +47 -0
- package/dist/components/column-reorder/column-reorder.js +26 -0
- package/dist/components/column-reorder/components/column-item/column-item.hook.js +78 -0
- package/dist/components/column-reorder/components/column-item/column-item.js +79 -0
- package/dist/components/column-reorder/components/column-item/column-item.util.js +12 -0
- package/dist/components/table/components/cell/avatar-cell.js +9 -6
- package/dist/components/table/table-provider.js +3 -0
- package/dist/components/table-card/table-card.js +32 -29
- package/dist/index.d.ts +1 -0
- package/dist/index.js +37 -35
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter-native-data-key.js +4 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/adapter/element-adapter.js +127 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/get-element-from-point-without-honey-pot.js +9 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/honey-pot-data-attribute.js +4 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/is-honey-pot-element.js +7 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/honey-pot-fix/make-honey-pot-fix.js +226 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/dispatch-consumer-event.js +107 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/lifecycle-manager.js +195 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/ledger/usage-ledger.js +21 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-adapter.js +43 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-drop-target.js +253 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js +121 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/combine.js +12 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/center-under-pointer.js +10 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/pointer-outside-of-preview.js +31 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/element/custom-native-drag-preview/set-custom-native-drag-preview.js +66 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/once.js +17 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/public-utils/reorder.js +11 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/add-attribute.js +9 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/android.js +8 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/count-events-for-safari.js +57 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-from-another-window.js +9 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/changing-window/is-leaving-window.js +13 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js +47 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/get-input.js +17 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-firefox.js +7 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari-on-ios.js +8 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/is-safari.js +10 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/max-z-index.js +4 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/text-media-type.js +4 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/media-types/url-media-type.js +4 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/dist/esm/trigger-post-move-flash.js +20 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-flourish/node_modules/@atlaskit/motion/dist/esm/utils/durations.js +6 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/closest-edge.js +58 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/get-reorder-destination-index.js +12 -0
- package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/reorder-with-edge.js +18 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +8 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +6 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js +24 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/slicedToArray.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +11 -0
- package/dist/node_modules/bind-event-listener/dist/bind-all.js +45 -0
- package/dist/node_modules/bind-event-listener/dist/bind.js +16 -0
- package/dist/node_modules/bind-event-listener/dist/index.js +20 -0
- package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { monitorForElements as v } from "../../../adapter/element-adapter.js";
|
|
2
|
+
import { isSafari as c } from "../../../util/is-safari.js";
|
|
3
|
+
import { maxZIndex as s } from "../../../util/max-z-index.js";
|
|
4
|
+
function l() {
|
|
5
|
+
return {
|
|
6
|
+
x: 0,
|
|
7
|
+
y: 0
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function y(t) {
|
|
11
|
+
var d = t.render, n = t.nativeSetDragImage, r = t.getOffset, u = r === void 0 ? l : r, e = document.createElement("div");
|
|
12
|
+
Object.assign(e.style, {
|
|
13
|
+
// Ensuring we don't cause reflow when adding the element to the page
|
|
14
|
+
// Using `position:fixed` rather than `position:absolute` so we are
|
|
15
|
+
// positioned on the current viewport.
|
|
16
|
+
// `position:fixed` also creates a new stacking context, so we don't need to do that here
|
|
17
|
+
position: "fixed",
|
|
18
|
+
// According to `mdn`, the element can be offscreen:
|
|
19
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setDragImage#imgelement
|
|
20
|
+
//
|
|
21
|
+
// However, that information does not appear in the specs:
|
|
22
|
+
// https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-setdragimage-dev
|
|
23
|
+
//
|
|
24
|
+
// If the element is _completely_ offscreen, Safari@17.1 will cancel the drag
|
|
25
|
+
top: 0,
|
|
26
|
+
left: 0,
|
|
27
|
+
// Using maximum possible z-index so that this element will always be on top
|
|
28
|
+
// https://stackoverflow.com/questions/491052/minimum-and-maximum-value-of-z-index
|
|
29
|
+
// Did not use `layers` in `@atlaskit/theme` because:
|
|
30
|
+
// 1. This element is not a 'layer' in the conventional sense, as this element
|
|
31
|
+
// is only created for a single frame for the browser to take a photo of it,
|
|
32
|
+
// and then it is destroyed
|
|
33
|
+
// 2. Did not want to add a dependency onto `@atlaskit/theme`
|
|
34
|
+
// 3. Want to always be on top of product UI which might have higher z-index's
|
|
35
|
+
zIndex: s,
|
|
36
|
+
// Avoiding any additional events caused by the new element (being super safe)
|
|
37
|
+
pointerEvents: "none"
|
|
38
|
+
}), document.body.append(e);
|
|
39
|
+
var o = d({
|
|
40
|
+
container: e
|
|
41
|
+
});
|
|
42
|
+
queueMicrotask(function() {
|
|
43
|
+
var a = u({
|
|
44
|
+
container: e
|
|
45
|
+
});
|
|
46
|
+
if (c()) {
|
|
47
|
+
var f = e.getBoundingClientRect();
|
|
48
|
+
if (f.width === 0)
|
|
49
|
+
return;
|
|
50
|
+
e.style.left = "-".concat(f.width - 1e-4, "px");
|
|
51
|
+
}
|
|
52
|
+
n == null || n(e, a.x, a.y);
|
|
53
|
+
});
|
|
54
|
+
function i() {
|
|
55
|
+
m(), o == null || o(), document.body.removeChild(e);
|
|
56
|
+
}
|
|
57
|
+
var m = v({
|
|
58
|
+
// Remove portal in the dragstart event so that the user will never see it
|
|
59
|
+
onDragStart: i,
|
|
60
|
+
// Backup: remove portal when the drop finishes (this would be an error case)
|
|
61
|
+
onDrop: i
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export {
|
|
65
|
+
y as setCustomNativeDragPreview
|
|
66
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function l(a) {
|
|
2
|
+
var n = null;
|
|
3
|
+
return function() {
|
|
4
|
+
if (!n) {
|
|
5
|
+
for (var t = arguments.length, u = new Array(t), r = 0; r < t; r++)
|
|
6
|
+
u[r] = arguments[r];
|
|
7
|
+
var e = a.apply(this, u);
|
|
8
|
+
n = {
|
|
9
|
+
result: e
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return n.result;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
l as once
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import a from "../../../../../@babel/runtime/helpers/esm/slicedToArray.js";
|
|
2
|
+
function c(r) {
|
|
3
|
+
var i = r.list, s = r.startIndex, t = r.finishIndex;
|
|
4
|
+
if (s === -1 || t === -1)
|
|
5
|
+
return Array.from(i);
|
|
6
|
+
var e = Array.from(i), l = e.splice(s, 1), n = a(l, 1), o = n[0];
|
|
7
|
+
return e.splice(t, 0, o), e;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
c as reorder
|
|
11
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { d } from "../../../../../../../_virtual/index.js";
|
|
2
|
+
import { isSafari as a } from "../is-safari.js";
|
|
3
|
+
var i = {
|
|
4
|
+
isLeavingWindow: Symbol("leaving"),
|
|
5
|
+
isEnteringWindow: Symbol("entering")
|
|
6
|
+
};
|
|
7
|
+
function l(r) {
|
|
8
|
+
var n = r.dragLeave;
|
|
9
|
+
return a() ? n.hasOwnProperty(i.isLeavingWindow) : !1;
|
|
10
|
+
}
|
|
11
|
+
(function() {
|
|
12
|
+
if (typeof window > "u" || process.env.NODE_ENV === "test" || !a())
|
|
13
|
+
return;
|
|
14
|
+
function n() {
|
|
15
|
+
return {
|
|
16
|
+
enterCount: 0,
|
|
17
|
+
isOverWindow: !1
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
var e = n();
|
|
21
|
+
function o() {
|
|
22
|
+
e = n();
|
|
23
|
+
}
|
|
24
|
+
d.bindAll(
|
|
25
|
+
window,
|
|
26
|
+
[{
|
|
27
|
+
type: "dragstart",
|
|
28
|
+
listener: function() {
|
|
29
|
+
e.enterCount = 0, e.isOverWindow = !0;
|
|
30
|
+
}
|
|
31
|
+
}, {
|
|
32
|
+
type: "drop",
|
|
33
|
+
listener: o
|
|
34
|
+
}, {
|
|
35
|
+
type: "dragend",
|
|
36
|
+
listener: o
|
|
37
|
+
}, {
|
|
38
|
+
type: "dragenter",
|
|
39
|
+
listener: function(t) {
|
|
40
|
+
!e.isOverWindow && e.enterCount === 0 && (t[i.isEnteringWindow] = !0), e.isOverWindow = !0, e.enterCount++;
|
|
41
|
+
}
|
|
42
|
+
}, {
|
|
43
|
+
type: "dragleave",
|
|
44
|
+
listener: function(t) {
|
|
45
|
+
e.enterCount--, e.isOverWindow && e.enterCount === 0 && (t[i.isLeavingWindow] = !0, e.isOverWindow = !1);
|
|
46
|
+
}
|
|
47
|
+
}],
|
|
48
|
+
// using `capture: true` so that adding event listeners
|
|
49
|
+
// in bubble phase will have the correct symbols
|
|
50
|
+
{
|
|
51
|
+
capture: !0
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
})();
|
|
55
|
+
export {
|
|
56
|
+
l as isLeavingWindowInSafari
|
|
57
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { isFirefox as t } from "../is-firefox.js";
|
|
2
|
+
import { isSafari as n } from "../is-safari.js";
|
|
3
|
+
import { isLeavingWindowInSafari as o } from "./count-events-for-safari.js";
|
|
4
|
+
import { isFromAnotherWindow as f } from "./is-from-another-window.js";
|
|
5
|
+
function v(a) {
|
|
6
|
+
var r = a.dragLeave, i = r.type, e = r.relatedTarget;
|
|
7
|
+
return i !== "dragleave" ? !1 : n() ? o({
|
|
8
|
+
dragLeave: r
|
|
9
|
+
}) : e == null ? !0 : t() ? f(e) : e instanceof HTMLIFrameElement;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
v as isLeavingWindow
|
|
13
|
+
};
|
package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/util/detect-broken-drag.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
function o(e) {
|
|
2
|
+
var n = e.onDragEnd;
|
|
3
|
+
return [
|
|
4
|
+
// ## Detecting drag ending for removed draggables
|
|
5
|
+
//
|
|
6
|
+
// If a draggable element is removed during a drag and the user drops:
|
|
7
|
+
// 1. if over a valid drop target: we get a "drop" event to know the drag is finished
|
|
8
|
+
// 2. if not over a valid drop target (or cancelled): we get nothing
|
|
9
|
+
// The "dragend" event will not fire on the source draggable if it has been
|
|
10
|
+
// removed from the DOM.
|
|
11
|
+
// So we need to figure out if a drag operation has finished by looking at other events
|
|
12
|
+
// We can do this by looking at other events
|
|
13
|
+
// ### First detection: "pointermove" events
|
|
14
|
+
// 1. "pointermove" events cannot fire during a drag and drop operation
|
|
15
|
+
// according to the spec. So if we get a "pointermove" it means that
|
|
16
|
+
// the drag and drop operations has finished. So if we get a "pointermove"
|
|
17
|
+
// we know that the drag is over
|
|
18
|
+
// 2. 🦊😤 Drag and drop operations are _supposed_ to suppress
|
|
19
|
+
// other pointer events. However, firefox will allow a few
|
|
20
|
+
// pointer event to get through after a drag starts.
|
|
21
|
+
// The most I've seen is 3
|
|
22
|
+
{
|
|
23
|
+
type: "pointermove",
|
|
24
|
+
listener: /* @__PURE__ */ function() {
|
|
25
|
+
var r = 0;
|
|
26
|
+
return function() {
|
|
27
|
+
if (r < 20) {
|
|
28
|
+
r++;
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
n();
|
|
32
|
+
};
|
|
33
|
+
}()
|
|
34
|
+
},
|
|
35
|
+
// ### Second detection: "pointerdown" events
|
|
36
|
+
// If we receive this event then we know that a drag operation has finished
|
|
37
|
+
// and potentially another one is about to start.
|
|
38
|
+
// Note: `pointerdown` fires on all browsers / platforms before "dragstart"
|
|
39
|
+
{
|
|
40
|
+
type: "pointerdown",
|
|
41
|
+
listener: n
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
o as getBindingsForBrokenDrags
|
|
47
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function a(t) {
|
|
2
|
+
return {
|
|
3
|
+
altKey: t.altKey,
|
|
4
|
+
button: t.button,
|
|
5
|
+
buttons: t.buttons,
|
|
6
|
+
ctrlKey: t.ctrlKey,
|
|
7
|
+
metaKey: t.metaKey,
|
|
8
|
+
shiftKey: t.shiftKey,
|
|
9
|
+
clientX: t.clientX,
|
|
10
|
+
clientY: t.clientY,
|
|
11
|
+
pageX: t.pageX,
|
|
12
|
+
pageY: t.pageY
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
a as getInput
|
|
17
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { once as i } from "../public-utils/once.js";
|
|
2
|
+
var a = i(function() {
|
|
3
|
+
if (process.env.NODE_ENV === "test")
|
|
4
|
+
return !1;
|
|
5
|
+
var r = navigator, e = r.userAgent;
|
|
6
|
+
return e.includes("AppleWebKit") && !e.includes("Chrome");
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
a as isSafari
|
|
10
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { durations as o } from "../../node_modules/@atlaskit/motion/dist/esm/utils/durations.js";
|
|
2
|
+
function a(r) {
|
|
3
|
+
r.animate([{
|
|
4
|
+
backgroundColor: "var(--ds-background-selected, #E9F2FF)"
|
|
5
|
+
}, {}], {
|
|
6
|
+
duration: o.large,
|
|
7
|
+
/**
|
|
8
|
+
* This is equivalent to the browser default, but we are making it
|
|
9
|
+
* explicit to avoid relying on implicit behavior.
|
|
10
|
+
*
|
|
11
|
+
* This curve is not part of `@atlaskit/motion` but it was an intentional
|
|
12
|
+
* design decision to use this curve.
|
|
13
|
+
*/
|
|
14
|
+
easing: "cubic-bezier(0.25, 0.1, 0.25, 1.0)",
|
|
15
|
+
iterations: 1
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
a as triggerPostMoveFlash
|
|
20
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import l from "../../../../@babel/runtime/helpers/esm/defineProperty.js";
|
|
2
|
+
function a(r, t) {
|
|
3
|
+
var e = Object.keys(r);
|
|
4
|
+
if (Object.getOwnPropertySymbols) {
|
|
5
|
+
var n = Object.getOwnPropertySymbols(r);
|
|
6
|
+
t && (n = n.filter(function(u) {
|
|
7
|
+
return Object.getOwnPropertyDescriptor(r, u).enumerable;
|
|
8
|
+
})), e.push.apply(e, n);
|
|
9
|
+
}
|
|
10
|
+
return e;
|
|
11
|
+
}
|
|
12
|
+
function c(r) {
|
|
13
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
14
|
+
var e = arguments[t] != null ? arguments[t] : {};
|
|
15
|
+
t % 2 ? a(Object(e), !0).forEach(function(n) {
|
|
16
|
+
l(r, n, e[n]);
|
|
17
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(e)) : a(Object(e)).forEach(function(n) {
|
|
18
|
+
Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(e, n));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return r;
|
|
22
|
+
}
|
|
23
|
+
var y = {
|
|
24
|
+
top: function(t, e) {
|
|
25
|
+
return Math.abs(e.y - t.top);
|
|
26
|
+
},
|
|
27
|
+
right: function(t, e) {
|
|
28
|
+
return Math.abs(t.right - e.x);
|
|
29
|
+
},
|
|
30
|
+
bottom: function(t, e) {
|
|
31
|
+
return Math.abs(t.bottom - e.y);
|
|
32
|
+
},
|
|
33
|
+
left: function(t, e) {
|
|
34
|
+
return Math.abs(e.x - t.left);
|
|
35
|
+
}
|
|
36
|
+
}, s = Symbol("closestEdge");
|
|
37
|
+
function m(r, t) {
|
|
38
|
+
var e, n, u = t.element, i = t.input, g = t.allowedEdges, p = {
|
|
39
|
+
x: i.clientX,
|
|
40
|
+
y: i.clientY
|
|
41
|
+
}, f = u.getBoundingClientRect(), b = g.map(function(o) {
|
|
42
|
+
return {
|
|
43
|
+
edge: o,
|
|
44
|
+
value: y[o](f, p)
|
|
45
|
+
};
|
|
46
|
+
}), d = (e = (n = b.sort(function(o, v) {
|
|
47
|
+
return o.value - v.value;
|
|
48
|
+
})[0]) === null || n === void 0 ? void 0 : n.edge) !== null && e !== void 0 ? e : null;
|
|
49
|
+
return c(c({}, r), {}, l({}, s, d));
|
|
50
|
+
}
|
|
51
|
+
function h(r) {
|
|
52
|
+
var t;
|
|
53
|
+
return (t = r[s]) !== null && t !== void 0 ? t : null;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
m as attachClosestEdge,
|
|
57
|
+
h as extractClosestEdge
|
|
58
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function s(e) {
|
|
2
|
+
var r = e.startIndex, n = e.closestEdgeOfTarget, t = e.indexOfTarget, a = e.axis;
|
|
3
|
+
if (r === -1 || t === -1 || r === t)
|
|
4
|
+
return r;
|
|
5
|
+
if (n == null)
|
|
6
|
+
return t;
|
|
7
|
+
var i = n === "bottom" || a === "horizontal", o = r < t;
|
|
8
|
+
return o ? i ? t : t - 1 : i ? t + 1 : t;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
s as getReorderDestinationIndex
|
|
12
|
+
};
|
package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop-hitbox/dist/esm/reorder-with-edge.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { reorder as a } from "../../../pragmatic-drag-and-drop/dist/esm/public-utils/reorder.js";
|
|
2
|
+
import { getReorderDestinationIndex as n } from "./get-reorder-destination-index.js";
|
|
3
|
+
function g(t) {
|
|
4
|
+
var r = t.list, e = t.startIndex, s = t.closestEdgeOfTarget, i = t.indexOfTarget, d = t.axis;
|
|
5
|
+
return a({
|
|
6
|
+
list: r,
|
|
7
|
+
startIndex: e,
|
|
8
|
+
finishIndex: n({
|
|
9
|
+
closestEdgeOfTarget: s,
|
|
10
|
+
startIndex: e,
|
|
11
|
+
indexOfTarget: i,
|
|
12
|
+
axis: d
|
|
13
|
+
})
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
g as reorderWithEdge
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function c(e, u) {
|
|
2
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
3
|
+
if (t != null) {
|
|
4
|
+
var a, i, f, l, n = [], r = !0, o = !1;
|
|
5
|
+
try {
|
|
6
|
+
if (f = (t = t.call(e)).next, u === 0) {
|
|
7
|
+
if (Object(t) !== t) return;
|
|
8
|
+
r = !1;
|
|
9
|
+
} else for (; !(r = (a = f.call(t)).done) && (n.push(a.value), n.length !== u); r = !0) ;
|
|
10
|
+
} catch (y) {
|
|
11
|
+
o = !0, i = y;
|
|
12
|
+
} finally {
|
|
13
|
+
try {
|
|
14
|
+
if (!r && t.return != null && (l = t.return(), Object(l) !== l)) return;
|
|
15
|
+
} finally {
|
|
16
|
+
if (o) throw i;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return n;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
c as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import t from "./arrayWithHoles.js";
|
|
2
|
+
import e from "./iterableToArrayLimit.js";
|
|
3
|
+
import a from "./unsupportedIterableToArray.js";
|
|
4
|
+
import i from "./nonIterableRest.js";
|
|
5
|
+
function n(r, o) {
|
|
6
|
+
return t(r) || e(r, o) || a(r, o) || i();
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import o from "./arrayWithoutHoles.js";
|
|
2
|
+
import t from "./iterableToArray.js";
|
|
3
|
+
import e from "./unsupportedIterableToArray.js";
|
|
4
|
+
import a from "./nonIterableSpread.js";
|
|
5
|
+
function u(r) {
|
|
6
|
+
return o(r) || t(r) || e(r) || a();
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
u as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import o from "./typeof.js";
|
|
2
|
+
function n(r, i) {
|
|
3
|
+
if (o(r) != "object" || !r) return r;
|
|
4
|
+
var e = r[Symbol.toPrimitive];
|
|
5
|
+
if (e !== void 0) {
|
|
6
|
+
var t = e.call(r, i);
|
|
7
|
+
if (o(t) != "object") return t;
|
|
8
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9
|
+
}
|
|
10
|
+
return (i === "string" ? String : Number)(r);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
n as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function o(e) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
return o = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
4
|
+
return typeof t;
|
|
5
|
+
} : function(t) {
|
|
6
|
+
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
7
|
+
}, o(e);
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
o as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import o from "./arrayLikeToArray.js";
|
|
2
|
+
function n(r, e) {
|
|
3
|
+
if (r) {
|
|
4
|
+
if (typeof r == "string") return o(r, e);
|
|
5
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
6
|
+
return t === "Object" && r.constructor && (t = r.constructor.name), t === "Map" || t === "Set" ? Array.from(r) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? o(r, e) : void 0;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
n as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { __exports as t } from "../../../_virtual/bind-all.js";
|
|
2
|
+
import { __require as b } from "./bind.js";
|
|
3
|
+
var a;
|
|
4
|
+
function g() {
|
|
5
|
+
if (a) return t;
|
|
6
|
+
a = 1;
|
|
7
|
+
var i = t && t.__assign || function() {
|
|
8
|
+
return i = Object.assign || function(n) {
|
|
9
|
+
for (var r, e = 1, o = arguments.length; e < o; e++) {
|
|
10
|
+
r = arguments[e];
|
|
11
|
+
for (var u in r) Object.prototype.hasOwnProperty.call(r, u) && (n[u] = r[u]);
|
|
12
|
+
}
|
|
13
|
+
return n;
|
|
14
|
+
}, i.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.bindAll = void 0;
|
|
17
|
+
var l = /* @__PURE__ */ b();
|
|
18
|
+
function d(n) {
|
|
19
|
+
if (!(typeof n > "u"))
|
|
20
|
+
return typeof n == "boolean" ? {
|
|
21
|
+
capture: n
|
|
22
|
+
} : n;
|
|
23
|
+
}
|
|
24
|
+
function s(n, r) {
|
|
25
|
+
if (r == null)
|
|
26
|
+
return n;
|
|
27
|
+
var e = i(i({}, n), { options: i(i({}, d(r)), d(n.options)) });
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function c(n, r, e) {
|
|
31
|
+
var o = r.map(function(u) {
|
|
32
|
+
var f = s(u, e);
|
|
33
|
+
return (0, l.bind)(n, f);
|
|
34
|
+
});
|
|
35
|
+
return function() {
|
|
36
|
+
o.forEach(function(f) {
|
|
37
|
+
return f();
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
return t.bindAll = c, t;
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
g as __require
|
|
45
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __exports as e } from "../../../_virtual/bind.js";
|
|
2
|
+
var d;
|
|
3
|
+
function v() {
|
|
4
|
+
if (d) return e;
|
|
5
|
+
d = 1, Object.defineProperty(e, "__esModule", { value: !0 }), e.bind = void 0;
|
|
6
|
+
function u(r, n) {
|
|
7
|
+
var i = n.type, t = n.listener, o = n.options;
|
|
8
|
+
return r.addEventListener(i, t, o), function() {
|
|
9
|
+
r.removeEventListener(i, t, o);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
return e.bind = u, e;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
v as __require
|
|
16
|
+
};
|