react-timelane 1.2.1 → 1.2.2
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/_virtual/index3.js +5 -0
- package/dist/_virtual/index4.js +4 -0
- package/dist/_virtual/react-dom.development.js +4 -0
- package/dist/_virtual/react-dom.production.js +4 -0
- package/dist/components/Timelane/Timelane.css +1 -0
- package/dist/components/Timelane/Timelane.js +53 -0
- package/dist/components/TimelaneAllocation/TimelaneAllocation.js +49 -0
- package/dist/components/TimelaneAside/TimelaneAside.js +60 -0
- package/dist/components/TimelaneBackground/TimelaneBackground.js +46 -0
- package/dist/components/TimelaneBody/TimelaneBody.js +13 -0
- package/dist/components/TimelaneBody/TimelaneSelectionLayer.js +96 -0
- package/dist/components/TimelaneHeader/DaysHeader.js +30 -0
- package/dist/components/TimelaneHeader/MonthsHeader.js +38 -0
- package/dist/components/TimelaneHeader/TimelaneHeader.js +55 -0
- package/dist/components/TimelaneHeader/WeeksHeader.js +39 -0
- package/dist/components/TimelaneHeader/renderingUtils.js +26 -0
- package/dist/components/TimelaneItem/DragResizeComponent.js +125 -0
- package/dist/components/TimelaneItem/TimelaneItem.js +42 -0
- package/dist/components/TimelaneLane/DropPreview.js +25 -0
- package/dist/components/TimelaneLane/DropTarget.js +57 -0
- package/dist/components/TimelaneLane/OverlapIndicator.js +21 -0
- package/dist/components/TimelaneLane/TimelaneLane.js +164 -0
- package/dist/components/TimelaneLayout/TimelaneLayout.js +77 -0
- package/dist/components/TimelaneLayout/layout.css +1 -0
- package/dist/components/TimelaneSettingsProvider/TimelaneSettingsContext.js +21 -0
- package/dist/components/TimelaneSettingsProvider/TimelaneSettingsProvider.js +15 -0
- package/dist/components/utils.js +243 -0
- package/dist/hooks/useScroll.js +47 -0
- package/dist/hooks/useTimelaneContext.js +6 -0
- package/dist/index.js +36 -0
- 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/once.js +17 -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.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/@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 +21 -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/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/date-fns/_lib/format/formatters.js +583 -0
- package/dist/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/date-fns/_lib/normalizeInterval.js +8 -0
- package/dist/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/date-fns/addDays.js +10 -0
- package/dist/node_modules/date-fns/addWeeks.js +8 -0
- package/dist/node_modules/date-fns/constants.js +6 -0
- package/dist/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/date-fns/eachDayOfInterval.js +17 -0
- package/dist/node_modules/date-fns/eachMonthOfInterval.js +17 -0
- package/dist/node_modules/date-fns/eachWeekOfInterval.js +22 -0
- package/dist/node_modules/date-fns/format.js +59 -0
- package/dist/node_modules/date-fns/getDay.js +8 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/date-fns/getWeekYear.js +17 -0
- package/dist/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/date-fns/isSameDay.js +14 -0
- package/dist/node_modules/date-fns/isSunday.js +8 -0
- package/dist/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/date-fns/lastDayOfMonth.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/date-fns/max.js +14 -0
- package/dist/node_modules/date-fns/min.js +14 -0
- package/dist/node_modules/date-fns/nextDay.js +10 -0
- package/dist/node_modules/date-fns/nextSunday.js +8 -0
- package/dist/node_modules/date-fns/setHours.js +9 -0
- package/dist/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/date-fns/startOfWeek.js +11 -0
- package/dist/node_modules/date-fns/startOfWeekYear.js +13 -0
- package/dist/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/date-fns/toDate.js +8 -0
- package/dist/node_modules/raf-schd/dist/raf-schd.esm.js +15 -0
- package/dist/node_modules/re-resizable/lib/index.js +424 -0
- package/dist/node_modules/re-resizable/lib/resizer.js +49 -0
- package/dist/node_modules/react-dom/cjs/react-dom.development.js +227 -0
- package/dist/node_modules/react-dom/cjs/react-dom.production.js +147 -0
- package/dist/node_modules/react-dom/index.js +23 -0
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +12 -0
- package/dist/types/Item.js +6 -0
- package/package.json +10 -7
- package/dist/react-timelane.css +0 -1
- package/dist/react-timelane.js +0 -4754
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import U from "../../../../../@babel/runtime/helpers/esm/defineProperty.js";
|
|
2
|
+
import V from "../../../../../@babel/runtime/helpers/esm/toConsumableArray.js";
|
|
3
|
+
import { combine as Y } from "../public-utils/combine.js";
|
|
4
|
+
import { once as q } from "../public-utils/once.js";
|
|
5
|
+
import { addAttribute as z } from "../util/add-attribute.js";
|
|
6
|
+
function M(e, o) {
|
|
7
|
+
var t = Object.keys(e);
|
|
8
|
+
if (Object.getOwnPropertySymbols) {
|
|
9
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
10
|
+
o && (a = a.filter(function(T) {
|
|
11
|
+
return Object.getOwnPropertyDescriptor(e, T).enumerable;
|
|
12
|
+
})), t.push.apply(t, a);
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function E(e) {
|
|
17
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
18
|
+
var t = arguments[o] != null ? arguments[o] : {};
|
|
19
|
+
o % 2 ? M(Object(t), !0).forEach(function(a) {
|
|
20
|
+
U(e, a, t[a]);
|
|
21
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : M(Object(t)).forEach(function(a) {
|
|
22
|
+
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(t, a));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return e;
|
|
26
|
+
}
|
|
27
|
+
function I(e, o) {
|
|
28
|
+
var t = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
29
|
+
if (!t) {
|
|
30
|
+
if (Array.isArray(e) || (t = B(e)) || o) {
|
|
31
|
+
t && (e = t);
|
|
32
|
+
var a = 0, T = function() {
|
|
33
|
+
};
|
|
34
|
+
return { s: T, n: function() {
|
|
35
|
+
return a >= e.length ? { done: !0 } : { done: !1, value: e[a++] };
|
|
36
|
+
}, e: function(b) {
|
|
37
|
+
throw b;
|
|
38
|
+
}, f: T };
|
|
39
|
+
}
|
|
40
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
41
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
42
|
+
}
|
|
43
|
+
var S, k = !0, C = !1;
|
|
44
|
+
return { s: function() {
|
|
45
|
+
t = t.call(e);
|
|
46
|
+
}, n: function() {
|
|
47
|
+
var b = t.next();
|
|
48
|
+
return k = b.done, b;
|
|
49
|
+
}, e: function(b) {
|
|
50
|
+
C = !0, S = b;
|
|
51
|
+
}, f: function() {
|
|
52
|
+
try {
|
|
53
|
+
k || t.return == null || t.return();
|
|
54
|
+
} finally {
|
|
55
|
+
if (C) throw S;
|
|
56
|
+
}
|
|
57
|
+
} };
|
|
58
|
+
}
|
|
59
|
+
function B(e, o) {
|
|
60
|
+
if (e) {
|
|
61
|
+
if (typeof e == "string") return H(e, o);
|
|
62
|
+
var t = {}.toString.call(e).slice(8, -1);
|
|
63
|
+
return t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set" ? Array.from(e) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? H(e, o) : void 0;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function H(e, o) {
|
|
67
|
+
(o == null || o > e.length) && (o = e.length);
|
|
68
|
+
for (var t = 0, a = Array(o); t < o; t++) a[t] = e[t];
|
|
69
|
+
return a;
|
|
70
|
+
}
|
|
71
|
+
function N(e) {
|
|
72
|
+
return e.slice(0).reverse();
|
|
73
|
+
}
|
|
74
|
+
function F(e) {
|
|
75
|
+
var o = e.typeKey, t = e.defaultDropEffect, a = /* @__PURE__ */ new WeakMap(), T = "data-drop-target-for-".concat(o), S = "[".concat(T, "]");
|
|
76
|
+
function k(r) {
|
|
77
|
+
return a.set(r.element, r), function() {
|
|
78
|
+
return a.delete(r.element);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function C(r) {
|
|
82
|
+
if (process.env.NODE_ENV !== "production") {
|
|
83
|
+
var p = a.get(r.element);
|
|
84
|
+
p && console.warn("You have already registered a [".concat(o, "] dropTarget on the same element"), {
|
|
85
|
+
existing: p,
|
|
86
|
+
proposed: r
|
|
87
|
+
}), r.element instanceof HTMLIFrameElement && console.warn(`
|
|
88
|
+
We recommend not registering <iframe> elements as drop targets
|
|
89
|
+
as it can result in some strange browser event ordering.
|
|
90
|
+
`.replace(/\s{2,}/g, " ").trim());
|
|
91
|
+
}
|
|
92
|
+
var i = Y(z(r.element, {
|
|
93
|
+
attribute: T,
|
|
94
|
+
value: "true"
|
|
95
|
+
}), k(r));
|
|
96
|
+
return q(i);
|
|
97
|
+
}
|
|
98
|
+
function g(r) {
|
|
99
|
+
var p, i, s, d, l = r.source, c = r.target, v = r.input, f = r.result, n = f === void 0 ? [] : f;
|
|
100
|
+
if (c == null)
|
|
101
|
+
return n;
|
|
102
|
+
if (!(c instanceof Element))
|
|
103
|
+
return c instanceof Node ? g({
|
|
104
|
+
source: l,
|
|
105
|
+
target: c.parentElement,
|
|
106
|
+
input: v,
|
|
107
|
+
result: n
|
|
108
|
+
}) : n;
|
|
109
|
+
var y = c.closest(S);
|
|
110
|
+
if (y == null)
|
|
111
|
+
return n;
|
|
112
|
+
var u = a.get(y);
|
|
113
|
+
if (u == null)
|
|
114
|
+
return n;
|
|
115
|
+
var h = {
|
|
116
|
+
input: v,
|
|
117
|
+
source: l,
|
|
118
|
+
element: u.element
|
|
119
|
+
};
|
|
120
|
+
if (u.canDrop && !u.canDrop(h))
|
|
121
|
+
return g({
|
|
122
|
+
source: l,
|
|
123
|
+
target: u.element.parentElement,
|
|
124
|
+
input: v,
|
|
125
|
+
result: n
|
|
126
|
+
});
|
|
127
|
+
var O = (p = (i = u.getData) === null || i === void 0 ? void 0 : i.call(u, h)) !== null && p !== void 0 ? p : {}, D = (s = (d = u.getDropEffect) === null || d === void 0 ? void 0 : d.call(u, h)) !== null && s !== void 0 ? s : t, m = {
|
|
128
|
+
data: O,
|
|
129
|
+
element: u.element,
|
|
130
|
+
dropEffect: D,
|
|
131
|
+
// we are collecting _actual_ drop targets, so these are
|
|
132
|
+
// being applied _not_ due to stickiness
|
|
133
|
+
isActiveDueToStickiness: !1
|
|
134
|
+
};
|
|
135
|
+
return g({
|
|
136
|
+
source: l,
|
|
137
|
+
target: u.element.parentElement,
|
|
138
|
+
input: v,
|
|
139
|
+
// Using bubble ordering. Same ordering as `event.getPath()`
|
|
140
|
+
result: [].concat(V(n), [m])
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function b(r) {
|
|
144
|
+
var p = r.eventName, i = r.payload, s = I(i.location.current.dropTargets), d;
|
|
145
|
+
try {
|
|
146
|
+
for (s.s(); !(d = s.n()).done; ) {
|
|
147
|
+
var l, c = d.value, v = a.get(c.element), f = E(E({}, i), {}, {
|
|
148
|
+
self: c
|
|
149
|
+
});
|
|
150
|
+
v == null || (l = v[p]) === null || l === void 0 || l.call(
|
|
151
|
+
v,
|
|
152
|
+
// I cannot seem to get the types right here.
|
|
153
|
+
// TS doesn't seem to like that one event can need `nativeSetDragImage`
|
|
154
|
+
// @ts-expect-error
|
|
155
|
+
f
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
} catch (n) {
|
|
159
|
+
s.e(n);
|
|
160
|
+
} finally {
|
|
161
|
+
s.f();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
var R = {
|
|
165
|
+
onGenerateDragPreview: b,
|
|
166
|
+
onDrag: b,
|
|
167
|
+
onDragStart: b,
|
|
168
|
+
onDrop: b,
|
|
169
|
+
onDropTargetChange: function(p) {
|
|
170
|
+
var i = p.payload, s = new Set(i.location.current.dropTargets.map(function(A) {
|
|
171
|
+
return A.element;
|
|
172
|
+
})), d = /* @__PURE__ */ new Set(), l = I(i.location.previous.dropTargets), c;
|
|
173
|
+
try {
|
|
174
|
+
for (l.s(); !(c = l.n()).done; ) {
|
|
175
|
+
var v, f = c.value;
|
|
176
|
+
d.add(f.element);
|
|
177
|
+
var n = a.get(f.element), y = s.has(f.element), u = E(E({}, i), {}, {
|
|
178
|
+
self: f
|
|
179
|
+
});
|
|
180
|
+
if (n == null || (v = n.onDropTargetChange) === null || v === void 0 || v.call(n, u), !y) {
|
|
181
|
+
var h;
|
|
182
|
+
n == null || (h = n.onDragLeave) === null || h === void 0 || h.call(n, u);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
} catch (A) {
|
|
186
|
+
l.e(A);
|
|
187
|
+
} finally {
|
|
188
|
+
l.f();
|
|
189
|
+
}
|
|
190
|
+
var O = I(i.location.current.dropTargets), D;
|
|
191
|
+
try {
|
|
192
|
+
for (O.s(); !(D = O.n()).done; ) {
|
|
193
|
+
var m, j, P = D.value;
|
|
194
|
+
if (!d.has(P.element)) {
|
|
195
|
+
var K = E(E({}, i), {}, {
|
|
196
|
+
self: P
|
|
197
|
+
}), w = a.get(P.element);
|
|
198
|
+
w == null || (m = w.onDropTargetChange) === null || m === void 0 || m.call(w, K), w == null || (j = w.onDragEnter) === null || j === void 0 || j.call(w, K);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
} catch (A) {
|
|
202
|
+
O.e(A);
|
|
203
|
+
} finally {
|
|
204
|
+
O.f();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
function W(r) {
|
|
209
|
+
R[r.eventName](r);
|
|
210
|
+
}
|
|
211
|
+
function G(r) {
|
|
212
|
+
var p = r.source, i = r.target, s = r.input, d = r.current, l = g({
|
|
213
|
+
source: p,
|
|
214
|
+
target: i,
|
|
215
|
+
input: s
|
|
216
|
+
});
|
|
217
|
+
if (l.length >= d.length)
|
|
218
|
+
return l;
|
|
219
|
+
for (var c = N(d), v = N(l), f = [], n = 0; n < c.length; n++) {
|
|
220
|
+
var y, u = c[n], h = v[n];
|
|
221
|
+
if (h != null) {
|
|
222
|
+
f.push(h);
|
|
223
|
+
continue;
|
|
224
|
+
}
|
|
225
|
+
var O = f[n - 1], D = c[n - 1];
|
|
226
|
+
if ((O == null ? void 0 : O.element) !== (D == null ? void 0 : D.element))
|
|
227
|
+
break;
|
|
228
|
+
var m = a.get(u.element);
|
|
229
|
+
if (!m)
|
|
230
|
+
break;
|
|
231
|
+
var j = {
|
|
232
|
+
input: s,
|
|
233
|
+
source: p,
|
|
234
|
+
element: m.element
|
|
235
|
+
};
|
|
236
|
+
if (m.canDrop && !m.canDrop(j) || !((y = m.getIsSticky) !== null && y !== void 0 && y.call(m, j)))
|
|
237
|
+
break;
|
|
238
|
+
f.push(E(E({}, u), {}, {
|
|
239
|
+
// making it clear to consumers this drop target is active due to stickiness
|
|
240
|
+
isActiveDueToStickiness: !0
|
|
241
|
+
}));
|
|
242
|
+
}
|
|
243
|
+
return N(f);
|
|
244
|
+
}
|
|
245
|
+
return {
|
|
246
|
+
dropTargetForConsumers: C,
|
|
247
|
+
getIsOver: G,
|
|
248
|
+
dispatchEvent: W
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
export {
|
|
252
|
+
F as makeDropTarget
|
|
253
|
+
};
|
package/dist/node_modules/@atlaskit/pragmatic-drag-and-drop/dist/esm/make-adapter/make-monitor.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import O from "../../../../../@babel/runtime/helpers/esm/defineProperty.js";
|
|
2
|
+
import { once as h } from "../public-utils/once.js";
|
|
3
|
+
function j(e, t) {
|
|
4
|
+
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
5
|
+
if (!r) {
|
|
6
|
+
if (Array.isArray(e) || (r = w(e)) || t) {
|
|
7
|
+
r && (e = r);
|
|
8
|
+
var n = 0, f = function() {
|
|
9
|
+
};
|
|
10
|
+
return { s: f, n: function() {
|
|
11
|
+
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
|
|
12
|
+
}, e: function(c) {
|
|
13
|
+
throw c;
|
|
14
|
+
}, f };
|
|
15
|
+
}
|
|
16
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
18
|
+
}
|
|
19
|
+
var o, a = !0, u = !1;
|
|
20
|
+
return { s: function() {
|
|
21
|
+
r = r.call(e);
|
|
22
|
+
}, n: function() {
|
|
23
|
+
var c = r.next();
|
|
24
|
+
return a = c.done, c;
|
|
25
|
+
}, e: function(c) {
|
|
26
|
+
u = !0, o = c;
|
|
27
|
+
}, f: function() {
|
|
28
|
+
try {
|
|
29
|
+
a || r.return == null || r.return();
|
|
30
|
+
} finally {
|
|
31
|
+
if (u) throw o;
|
|
32
|
+
}
|
|
33
|
+
} };
|
|
34
|
+
}
|
|
35
|
+
function w(e, t) {
|
|
36
|
+
if (e) {
|
|
37
|
+
if (typeof e == "string") return p(e, t);
|
|
38
|
+
var r = {}.toString.call(e).slice(8, -1);
|
|
39
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? p(e, t) : void 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function p(e, t) {
|
|
43
|
+
(t == null || t > e.length) && (t = e.length);
|
|
44
|
+
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
function d(e, t) {
|
|
48
|
+
var r = Object.keys(e);
|
|
49
|
+
if (Object.getOwnPropertySymbols) {
|
|
50
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
51
|
+
t && (n = n.filter(function(f) {
|
|
52
|
+
return Object.getOwnPropertyDescriptor(e, f).enumerable;
|
|
53
|
+
})), r.push.apply(r, n);
|
|
54
|
+
}
|
|
55
|
+
return r;
|
|
56
|
+
}
|
|
57
|
+
function A(e) {
|
|
58
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
59
|
+
var r = arguments[t] != null ? arguments[t] : {};
|
|
60
|
+
t % 2 ? d(Object(r), !0).forEach(function(n) {
|
|
61
|
+
O(e, n, r[n]);
|
|
62
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : d(Object(r)).forEach(function(n) {
|
|
63
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return e;
|
|
67
|
+
}
|
|
68
|
+
function D() {
|
|
69
|
+
var e = /* @__PURE__ */ new Set(), t = null;
|
|
70
|
+
function r(o) {
|
|
71
|
+
t && (!o.canMonitor || o.canMonitor(t.canMonitorArgs)) && t.active.add(o);
|
|
72
|
+
}
|
|
73
|
+
function n(o) {
|
|
74
|
+
var a = A({}, o);
|
|
75
|
+
e.add(a), r(a);
|
|
76
|
+
function u() {
|
|
77
|
+
e.delete(a), t && t.active.delete(a);
|
|
78
|
+
}
|
|
79
|
+
return h(u);
|
|
80
|
+
}
|
|
81
|
+
function f(o) {
|
|
82
|
+
var a = o.eventName, u = o.payload;
|
|
83
|
+
if (a === "onGenerateDragPreview") {
|
|
84
|
+
t = {
|
|
85
|
+
canMonitorArgs: {
|
|
86
|
+
initial: u.location.initial,
|
|
87
|
+
source: u.source
|
|
88
|
+
},
|
|
89
|
+
active: /* @__PURE__ */ new Set()
|
|
90
|
+
};
|
|
91
|
+
var i = j(e), c;
|
|
92
|
+
try {
|
|
93
|
+
for (i.s(); !(c = i.n()).done; ) {
|
|
94
|
+
var b = c.value;
|
|
95
|
+
r(b);
|
|
96
|
+
}
|
|
97
|
+
} catch (m) {
|
|
98
|
+
i.e(m);
|
|
99
|
+
} finally {
|
|
100
|
+
i.f();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (t) {
|
|
104
|
+
for (var g = Array.from(t.active), l = 0, v = g; l < v.length; l++) {
|
|
105
|
+
var s = v[l];
|
|
106
|
+
if (t.active.has(s)) {
|
|
107
|
+
var y;
|
|
108
|
+
(y = s[a]) === null || y === void 0 || y.call(s, u);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
a === "onDrop" && (t.active.clear(), t = null);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
dispatchEvent: f,
|
|
116
|
+
monitorForConsumers: n
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export {
|
|
120
|
+
D as makeMonitor
|
|
121
|
+
};
|
|
@@ -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,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,21 @@
|
|
|
1
|
+
function c(l, a) {
|
|
2
|
+
var t = l == null ? null : typeof Symbol < "u" && l[Symbol.iterator] || l["@@iterator"];
|
|
3
|
+
if (t != null) {
|
|
4
|
+
var u, i, f, e, r = [], n = !0, o = !1;
|
|
5
|
+
try {
|
|
6
|
+
if (f = (t = t.call(l)).next, a !== 0) for (; !(n = (u = f.call(t)).done) && (r.push(u.value), r.length !== a); n = !0) ;
|
|
7
|
+
} catch (y) {
|
|
8
|
+
o = !0, i = y;
|
|
9
|
+
} finally {
|
|
10
|
+
try {
|
|
11
|
+
if (!n && t.return != null && (e = t.return(), Object(e) !== e)) return;
|
|
12
|
+
} finally {
|
|
13
|
+
if (o) throw i;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return r;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
c as default
|
|
21
|
+
};
|