@oliasoft-open-source/react-ui-library 4.14.1-beta-2 → 4.14.1-beta-3
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/global.css +105 -114
- package/dist/index.js +851 -1253
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
11
11
|
var _docChanged, _ignoreNextExit, _suggesters, _next, _prev, _handlerMatches, _ignored, _removed, _lastChangeFromAppend, _a;
|
|
12
12
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
13
13
|
import * as React$4 from "react";
|
|
14
|
-
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, PureComponent, useImperativeHandle, memo
|
|
14
|
+
import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback as useCallback$1, createElement, forwardRef, useMemo as useMemo$1, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, PureComponent, useImperativeHandle, memo, cloneElement as cloneElement$1 } from "react";
|
|
15
15
|
import * as PropTypes from "prop-types";
|
|
16
16
|
import PropTypes__default from "prop-types";
|
|
17
|
-
import ReactDOM, { createPortal, unstable_batchedUpdates,
|
|
18
|
-
import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$
|
|
17
|
+
import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
|
|
18
|
+
import { noop as noop$3, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$2, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$4 } from "lodash";
|
|
19
19
|
import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue as getValue$1, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
|
|
20
20
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
21
21
|
function getDefaultExportFromCjs(x2) {
|
|
@@ -222,32 +222,32 @@ function _setPrototypeOf$3(t, e2) {
|
|
|
222
222
|
function _inheritsLoose$3(t, o) {
|
|
223
223
|
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf$3(t, o);
|
|
224
224
|
}
|
|
225
|
-
var extendStatics = function(d2, b2) {
|
|
226
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
225
|
+
var extendStatics$1 = function(d2, b2) {
|
|
226
|
+
extendStatics$1 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
227
227
|
d3.__proto__ = b3;
|
|
228
228
|
} || function(d3, b3) {
|
|
229
229
|
for (var p in b3) if (Object.prototype.hasOwnProperty.call(b3, p)) d3[p] = b3[p];
|
|
230
230
|
};
|
|
231
|
-
return extendStatics(d2, b2);
|
|
231
|
+
return extendStatics$1(d2, b2);
|
|
232
232
|
};
|
|
233
|
-
function __extends(d2, b2) {
|
|
233
|
+
function __extends$1(d2, b2) {
|
|
234
234
|
if (typeof b2 !== "function" && b2 !== null)
|
|
235
235
|
throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
|
|
236
|
-
extendStatics(d2, b2);
|
|
236
|
+
extendStatics$1(d2, b2);
|
|
237
237
|
function __() {
|
|
238
238
|
this.constructor = d2;
|
|
239
239
|
}
|
|
240
240
|
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
241
241
|
}
|
|
242
|
-
var __assign$
|
|
243
|
-
__assign$
|
|
242
|
+
var __assign$4 = function() {
|
|
243
|
+
__assign$4 = Object.assign || function __assign2(t) {
|
|
244
244
|
for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
245
245
|
s = arguments[i];
|
|
246
246
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
247
247
|
}
|
|
248
248
|
return t;
|
|
249
249
|
};
|
|
250
|
-
return __assign$
|
|
250
|
+
return __assign$4.apply(this, arguments);
|
|
251
251
|
};
|
|
252
252
|
function __rest$1(s, e2) {
|
|
253
253
|
var t = {};
|
|
@@ -883,15 +883,15 @@ var DefaultContext = {
|
|
|
883
883
|
attr: void 0
|
|
884
884
|
};
|
|
885
885
|
var IconContext = React__default.createContext && React__default.createContext(DefaultContext);
|
|
886
|
-
var __assign$
|
|
887
|
-
__assign$
|
|
886
|
+
var __assign$3 = function() {
|
|
887
|
+
__assign$3 = Object.assign || function(t) {
|
|
888
888
|
for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
889
889
|
s = arguments[i];
|
|
890
890
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
891
891
|
}
|
|
892
892
|
return t;
|
|
893
893
|
};
|
|
894
|
-
return __assign$
|
|
894
|
+
return __assign$3.apply(this, arguments);
|
|
895
895
|
};
|
|
896
896
|
var __rest = function(s, e2) {
|
|
897
897
|
var t = {};
|
|
@@ -903,15 +903,15 @@ var __rest = function(s, e2) {
|
|
|
903
903
|
};
|
|
904
904
|
function Tree2Element(tree2) {
|
|
905
905
|
return tree2 && tree2.map(function(node2, i) {
|
|
906
|
-
return React__default.createElement(node2.tag, __assign$
|
|
906
|
+
return React__default.createElement(node2.tag, __assign$3({
|
|
907
907
|
key: i
|
|
908
908
|
}, node2.attr), Tree2Element(node2.child));
|
|
909
909
|
});
|
|
910
910
|
}
|
|
911
911
|
function GenIcon(data) {
|
|
912
912
|
return function(props) {
|
|
913
|
-
return React__default.createElement(IconBase, __assign$
|
|
914
|
-
attr: __assign$
|
|
913
|
+
return React__default.createElement(IconBase, __assign$3({
|
|
914
|
+
attr: __assign$3({}, data.attr)
|
|
915
915
|
}, props), Tree2Element(data.child));
|
|
916
916
|
};
|
|
917
917
|
}
|
|
@@ -922,13 +922,13 @@ function IconBase(props) {
|
|
|
922
922
|
var className;
|
|
923
923
|
if (conf.className) className = conf.className;
|
|
924
924
|
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
925
|
-
return React__default.createElement("svg", __assign$
|
|
925
|
+
return React__default.createElement("svg", __assign$3({
|
|
926
926
|
stroke: "currentColor",
|
|
927
927
|
fill: "currentColor",
|
|
928
928
|
strokeWidth: "0"
|
|
929
929
|
}, conf.attr, attr, svgProps, {
|
|
930
930
|
className,
|
|
931
|
-
style: __assign$
|
|
931
|
+
style: __assign$3(__assign$3({
|
|
932
932
|
color: props.color || conf.color
|
|
933
933
|
}, conf.style), props.style),
|
|
934
934
|
height: computedSize,
|
|
@@ -1808,7 +1808,7 @@ var requestAnimationFrame$1 = function() {
|
|
|
1808
1808
|
};
|
|
1809
1809
|
}();
|
|
1810
1810
|
var trailingTimeout = 2;
|
|
1811
|
-
function throttle$
|
|
1811
|
+
function throttle$2(callback, delay) {
|
|
1812
1812
|
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
1813
1813
|
function resolvePending() {
|
|
1814
1814
|
if (leadingCall) {
|
|
@@ -1850,7 +1850,7 @@ var ResizeObserverController$1 = (
|
|
|
1850
1850
|
this.mutationsObserver_ = null;
|
|
1851
1851
|
this.observers_ = [];
|
|
1852
1852
|
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
1853
|
-
this.refresh = throttle$
|
|
1853
|
+
this.refresh = throttle$2(this.refresh.bind(this), REFRESH_DELAY);
|
|
1854
1854
|
}
|
|
1855
1855
|
ResizeObserverController2.prototype.addObserver = function(observer) {
|
|
1856
1856
|
if (!~this.observers_.indexOf(observer)) {
|
|
@@ -2354,7 +2354,7 @@ function useEventSubscriptions() {
|
|
|
2354
2354
|
};
|
|
2355
2355
|
}, []);
|
|
2356
2356
|
}
|
|
2357
|
-
var useIsomorphicLayoutEffect$
|
|
2357
|
+
var useIsomorphicLayoutEffect$6 = typeof window !== "undefined" ? useLayoutEffect$1 : useEffect;
|
|
2358
2358
|
function useLastState(currentState, enabled) {
|
|
2359
2359
|
var lastState = useRef(currentState);
|
|
2360
2360
|
if (!enabled) {
|
|
@@ -2602,7 +2602,7 @@ function useTrackElements(_ref) {
|
|
|
2602
2602
|
resetWhenReferenceChangedWhileTracking(previousTrigger, trigger2);
|
|
2603
2603
|
}, [get4, set2, resetWhenReferenceChangedWhileTracking, getScrollContainers]));
|
|
2604
2604
|
var triggerOptionParent = triggerOption == null ? void 0 : triggerOption.getParent == null ? void 0 : triggerOption.getParent();
|
|
2605
|
-
useIsomorphicLayoutEffect$
|
|
2605
|
+
useIsomorphicLayoutEffect$6(function() {
|
|
2606
2606
|
if (!triggerOptionParent) {
|
|
2607
2607
|
return;
|
|
2608
2608
|
}
|
|
@@ -2612,7 +2612,7 @@ function useTrackElements(_ref) {
|
|
|
2612
2612
|
});
|
|
2613
2613
|
});
|
|
2614
2614
|
}, [triggerOptionParent, set2, getScrollContainers]);
|
|
2615
|
-
useIsomorphicLayoutEffect$
|
|
2615
|
+
useIsomorphicLayoutEffect$6(function() {
|
|
2616
2616
|
if (enabled) {
|
|
2617
2617
|
if (!hasEventSubscriptions()) {
|
|
2618
2618
|
addEventListeners();
|
|
@@ -2624,7 +2624,7 @@ function useTrackElements(_ref) {
|
|
|
2624
2624
|
}
|
|
2625
2625
|
};
|
|
2626
2626
|
}, [enabled, hasEventSubscriptions, addEventListeners, removeAllEventSubscriptions]);
|
|
2627
|
-
useIsomorphicLayoutEffect$
|
|
2627
|
+
useIsomorphicLayoutEffect$6(function() {
|
|
2628
2628
|
if (enabled) {
|
|
2629
2629
|
handleChange();
|
|
2630
2630
|
}
|
|
@@ -5306,15 +5306,15 @@ const Card = ({
|
|
|
5306
5306
|
}
|
|
5307
5307
|
);
|
|
5308
5308
|
};
|
|
5309
|
-
var __assign$
|
|
5310
|
-
__assign$
|
|
5309
|
+
var __assign$2 = function() {
|
|
5310
|
+
__assign$2 = Object.assign || function __assign2(t) {
|
|
5311
5311
|
for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
5312
5312
|
s = arguments[i];
|
|
5313
5313
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
5314
5314
|
}
|
|
5315
5315
|
return t;
|
|
5316
5316
|
};
|
|
5317
|
-
return __assign$
|
|
5317
|
+
return __assign$2.apply(this, arguments);
|
|
5318
5318
|
};
|
|
5319
5319
|
function __spreadArray$1(to2, from3, pack) {
|
|
5320
5320
|
if (pack || arguments.length === 2) for (var i = 0, l = from3.length, ar2; i < l; i++) {
|
|
@@ -6147,7 +6147,7 @@ var Ie = function(e2) {
|
|
|
6147
6147
|
function e2(e3, n2, o) {
|
|
6148
6148
|
void 0 === e3 && (e3 = C), void 0 === n2 && (n2 = {});
|
|
6149
6149
|
var r2 = this;
|
|
6150
|
-
this.options = __assign$
|
|
6150
|
+
this.options = __assign$2(__assign$2({}, Te), e3), this.gs = n2, this.names = new Map(o), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
|
|
6151
6151
|
return function(e4) {
|
|
6152
6152
|
for (var t = e4.getTag(), n3 = t.length, o2 = "", r3 = function(n4) {
|
|
6153
6153
|
var r4 = function(e5) {
|
|
@@ -6170,7 +6170,7 @@ var Ie = function(e2) {
|
|
|
6170
6170
|
}, e2.prototype.rehydrate = function() {
|
|
6171
6171
|
!this.server && S && _e(this);
|
|
6172
6172
|
}, e2.prototype.reconstructWithOptions = function(n2, o) {
|
|
6173
|
-
return void 0 === o && (o = true), new e2(__assign$
|
|
6173
|
+
return void 0 === o && (o = true), new e2(__assign$2(__assign$2({}, this.options), n2), this.gs, o && this.names || void 0);
|
|
6174
6174
|
}, e2.prototype.allocateGSInstance = function(e3) {
|
|
6175
6175
|
return this.gs[e3] = (this.gs[e3] || 0) + 1;
|
|
6176
6176
|
}, e2.prototype.getTag = function() {
|
|
@@ -6343,9 +6343,9 @@ function it$1(e2, r2, s) {
|
|
|
6343
6343
|
var i2 = e4.attrs, a3 = e4.componentStyle, c3 = e4.defaultProps, p2 = e4.foldedComponentIds, d3 = e4.styledComponentId, h2 = e4.target, f3 = React__default.useContext(et$1), m3 = Ge(), y3 = e4.shouldForwardProp || m3.shouldForwardProp;
|
|
6344
6344
|
"production" !== process.env.NODE_ENV && useDebugValue(d3);
|
|
6345
6345
|
var v2 = I(r4, f3, c3) || C, g3 = function(e5, n2, o) {
|
|
6346
|
-
for (var r5, s3 = __assign$
|
|
6346
|
+
for (var r5, s3 = __assign$2(__assign$2({}, n2), { className: void 0, theme: o }), i3 = 0; i3 < e5.length; i3 += 1) {
|
|
6347
6347
|
var a4 = re(r5 = e5[i3]) ? r5(s3) : r5;
|
|
6348
|
-
for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$
|
|
6348
|
+
for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$2(__assign$2({}, s3[c4]), a4[c4]) : a4[c4];
|
|
6349
6349
|
}
|
|
6350
6350
|
return n2.className && (s3.className = ie$2(s3.className, n2.className)), s3;
|
|
6351
6351
|
}(i2, r4, v2), S3 = g3.as || h2, w3 = {};
|
|
@@ -6401,9 +6401,9 @@ function ut(n2, o, r2) {
|
|
|
6401
6401
|
return n2(o, r2, lt$1.apply(void 0, __spreadArray$1([t], s2, false)));
|
|
6402
6402
|
};
|
|
6403
6403
|
return s.attrs = function(e2) {
|
|
6404
|
-
return ut(n2, o, __assign$
|
|
6404
|
+
return ut(n2, o, __assign$2(__assign$2({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
|
|
6405
6405
|
}, s.withConfig = function(e2) {
|
|
6406
|
-
return ut(n2, o, __assign$
|
|
6406
|
+
return ut(n2, o, __assign$2(__assign$2({}, r2), e2));
|
|
6407
6407
|
}, s;
|
|
6408
6408
|
}
|
|
6409
6409
|
var pt$1 = function(e2) {
|
|
@@ -9929,7 +9929,7 @@ function createSubscription(store, parentSub) {
|
|
|
9929
9929
|
};
|
|
9930
9930
|
return subscription;
|
|
9931
9931
|
}
|
|
9932
|
-
var useIsomorphicLayoutEffect$
|
|
9932
|
+
var useIsomorphicLayoutEffect$5 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? useLayoutEffect$1 : useEffect;
|
|
9933
9933
|
function Provider(_ref) {
|
|
9934
9934
|
var store = _ref.store, context2 = _ref.context, children = _ref.children;
|
|
9935
9935
|
var contextValue = useMemo$1(function() {
|
|
@@ -9942,7 +9942,7 @@ function Provider(_ref) {
|
|
|
9942
9942
|
var previousState = useMemo$1(function() {
|
|
9943
9943
|
return store.getState();
|
|
9944
9944
|
}, [store]);
|
|
9945
|
-
useIsomorphicLayoutEffect$
|
|
9945
|
+
useIsomorphicLayoutEffect$5(function() {
|
|
9946
9946
|
var subscription = contextValue.subscription;
|
|
9947
9947
|
subscription.onStateChange = subscription.notifyNestedSubs;
|
|
9948
9948
|
subscription.trySubscribe();
|
|
@@ -10662,7 +10662,7 @@ function storeStateUpdatesReducer(state, action2) {
|
|
|
10662
10662
|
return [action2.payload, updateCount2 + 1];
|
|
10663
10663
|
}
|
|
10664
10664
|
function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {
|
|
10665
|
-
useIsomorphicLayoutEffect$
|
|
10665
|
+
useIsomorphicLayoutEffect$5(function() {
|
|
10666
10666
|
return effectFunc.apply(void 0, effectArgs);
|
|
10667
10667
|
}, dependencies);
|
|
10668
10668
|
}
|
|
@@ -15367,7 +15367,7 @@ var getStyles$1 = function(contextId) {
|
|
|
15367
15367
|
userCancel: getStyles(rules2, "userCancel")
|
|
15368
15368
|
};
|
|
15369
15369
|
};
|
|
15370
|
-
var useIsomorphicLayoutEffect$
|
|
15370
|
+
var useIsomorphicLayoutEffect$4 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? useLayoutEffect$1 : useEffect;
|
|
15371
15371
|
var getHead = function getHead2() {
|
|
15372
15372
|
var head = document.querySelector("head");
|
|
15373
15373
|
!head ? process.env.NODE_ENV !== "production" ? invariant$3(false, "Cannot find the head to append a style to") : invariant$3() : void 0;
|
|
@@ -15397,7 +15397,7 @@ function useStyleMarshal(contextId, nonce) {
|
|
|
15397
15397
|
!el2 ? process.env.NODE_ENV !== "production" ? invariant$3(false, "Cannot set dynamic style element if it is not set") : invariant$3() : void 0;
|
|
15398
15398
|
el2.textContent = proposed;
|
|
15399
15399
|
}, []);
|
|
15400
|
-
useIsomorphicLayoutEffect$
|
|
15400
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
15401
15401
|
!(!alwaysRef.current && !dynamicRef.current) ? process.env.NODE_ENV !== "production" ? invariant$3(false, "style elements already mounted") : invariant$3() : void 0;
|
|
15402
15402
|
var always = createStyleEl(nonce);
|
|
15403
15403
|
var dynamic = createStyleEl(nonce);
|
|
@@ -15527,7 +15527,7 @@ function useFocusMarshal(contextId) {
|
|
|
15527
15527
|
}
|
|
15528
15528
|
recordRef.current = id2;
|
|
15529
15529
|
}, []);
|
|
15530
|
-
useIsomorphicLayoutEffect$
|
|
15530
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
15531
15531
|
isMountedRef.current = true;
|
|
15532
15532
|
return function clearFrameOnUnmount() {
|
|
15533
15533
|
isMountedRef.current = false;
|
|
@@ -16144,7 +16144,7 @@ function useMouseSensor(api) {
|
|
|
16144
16144
|
};
|
|
16145
16145
|
bindCapturingEvents();
|
|
16146
16146
|
}, [bindCapturingEvents]);
|
|
16147
|
-
useIsomorphicLayoutEffect$
|
|
16147
|
+
useIsomorphicLayoutEffect$4(function mount() {
|
|
16148
16148
|
listenForCapture();
|
|
16149
16149
|
return function unmount() {
|
|
16150
16150
|
unbindEventsRef.current();
|
|
@@ -16275,7 +16275,7 @@ function useKeyboardSensor(api) {
|
|
|
16275
16275
|
};
|
|
16276
16276
|
unbindEventsRef.current = bindEvents(window, [startCaptureBinding], options);
|
|
16277
16277
|
}, [startCaptureBinding]);
|
|
16278
|
-
useIsomorphicLayoutEffect$
|
|
16278
|
+
useIsomorphicLayoutEffect$4(function mount() {
|
|
16279
16279
|
listenForCapture();
|
|
16280
16280
|
return function unmount() {
|
|
16281
16281
|
unbindEventsRef.current();
|
|
@@ -16504,7 +16504,7 @@ function useTouchSensor(api) {
|
|
|
16504
16504
|
});
|
|
16505
16505
|
bindCapturingEvents();
|
|
16506
16506
|
}, [bindCapturingEvents, getPhase, setPhase, startDragging]);
|
|
16507
|
-
useIsomorphicLayoutEffect$
|
|
16507
|
+
useIsomorphicLayoutEffect$4(function mount() {
|
|
16508
16508
|
listenForCapture();
|
|
16509
16509
|
return function unmount() {
|
|
16510
16510
|
unbindEventsRef.current();
|
|
@@ -16515,7 +16515,7 @@ function useTouchSensor(api) {
|
|
|
16515
16515
|
}
|
|
16516
16516
|
};
|
|
16517
16517
|
}, [getPhase, listenForCapture, setPhase]);
|
|
16518
|
-
useIsomorphicLayoutEffect$
|
|
16518
|
+
useIsomorphicLayoutEffect$4(function webkitHack() {
|
|
16519
16519
|
var unbind = bindEvents(window, [{
|
|
16520
16520
|
eventName: "touchmove",
|
|
16521
16521
|
fn: function fn() {
|
|
@@ -16862,7 +16862,7 @@ function useSensorMarshal(_ref4) {
|
|
|
16862
16862
|
lockAPI.tryAbandon();
|
|
16863
16863
|
}
|
|
16864
16864
|
}, [lockAPI]);
|
|
16865
|
-
useIsomorphicLayoutEffect$
|
|
16865
|
+
useIsomorphicLayoutEffect$4(function listenToStore() {
|
|
16866
16866
|
var previous = store.getState();
|
|
16867
16867
|
var unsubscribe = store.subscribe(function() {
|
|
16868
16868
|
var current = store.getState();
|
|
@@ -16871,7 +16871,7 @@ function useSensorMarshal(_ref4) {
|
|
|
16871
16871
|
});
|
|
16872
16872
|
return unsubscribe;
|
|
16873
16873
|
}, [lockAPI, store, tryAbandonLock]);
|
|
16874
|
-
useIsomorphicLayoutEffect$
|
|
16874
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
16875
16875
|
return lockAPI.tryAbandon;
|
|
16876
16876
|
}, [lockAPI.tryAbandon]);
|
|
16877
16877
|
var canGetLock = useCallback(function(draggableId) {
|
|
@@ -17412,7 +17412,7 @@ function useDroppablePublisher(args) {
|
|
|
17412
17412
|
callbacks: callbacks2
|
|
17413
17413
|
};
|
|
17414
17414
|
}, [callbacks2, descriptor, uniqueId3]);
|
|
17415
|
-
useIsomorphicLayoutEffect$
|
|
17415
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
17416
17416
|
publishedDescriptorRef.current = entry.descriptor;
|
|
17417
17417
|
registry.droppable.register(entry);
|
|
17418
17418
|
return function() {
|
|
@@ -17423,13 +17423,13 @@ function useDroppablePublisher(args) {
|
|
|
17423
17423
|
registry.droppable.unregister(entry);
|
|
17424
17424
|
};
|
|
17425
17425
|
}, [callbacks2, descriptor, dragStopped, entry, marshal, registry.droppable]);
|
|
17426
|
-
useIsomorphicLayoutEffect$
|
|
17426
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
17427
17427
|
if (!whileDraggingRef.current) {
|
|
17428
17428
|
return;
|
|
17429
17429
|
}
|
|
17430
17430
|
marshal.updateDroppableIsEnabled(publishedDescriptorRef.current.id, !args.isDropDisabled);
|
|
17431
17431
|
}, [args.isDropDisabled, marshal]);
|
|
17432
|
-
useIsomorphicLayoutEffect$
|
|
17432
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
17433
17433
|
if (!whileDraggingRef.current) {
|
|
17434
17434
|
return;
|
|
17435
17435
|
}
|
|
@@ -17757,13 +17757,13 @@ function useDraggablePublisher(args) {
|
|
|
17757
17757
|
}, [descriptor, getDimension2, options, uniqueId3]);
|
|
17758
17758
|
var publishedRef = useRef(entry);
|
|
17759
17759
|
var isFirstPublishRef = useRef(true);
|
|
17760
|
-
useIsomorphicLayoutEffect$
|
|
17760
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
17761
17761
|
registry.draggable.register(publishedRef.current);
|
|
17762
17762
|
return function() {
|
|
17763
17763
|
return registry.draggable.unregister(publishedRef.current);
|
|
17764
17764
|
};
|
|
17765
17765
|
}, [registry.draggable]);
|
|
17766
|
-
useIsomorphicLayoutEffect$
|
|
17766
|
+
useIsomorphicLayoutEffect$4(function() {
|
|
17767
17767
|
if (isFirstPublishRef.current) {
|
|
17768
17768
|
isFirstPublishRef.current = false;
|
|
17769
17769
|
return;
|
|
@@ -18340,795 +18340,382 @@ var ConnectedDroppable = connect(makeMapStateToProps$1, mapDispatchToProps$1, nu
|
|
|
18340
18340
|
areStatePropsEqual: isStrictEqual
|
|
18341
18341
|
})(Droppable);
|
|
18342
18342
|
ConnectedDroppable.defaultProps = defaultProps;
|
|
18343
|
-
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
|
|
18347
|
-
|
|
18348
|
-
|
|
18349
|
-
|
|
18350
|
-
|
|
18351
|
-
|
|
18352
|
-
|
|
18353
|
-
|
|
18354
|
-
|
|
18355
|
-
|
|
18356
|
-
|
|
18357
|
-
|
|
18358
|
-
|
|
18359
|
-
|
|
18360
|
-
|
|
18361
|
-
|
|
18362
|
-
const resultFpsPercentage = resultEndTime / 16;
|
|
18363
|
-
const pad = (str, num) => {
|
|
18364
|
-
str = String(str);
|
|
18365
|
-
while (str.length < num) {
|
|
18366
|
-
str = " " + str;
|
|
18367
|
-
}
|
|
18368
|
-
return str;
|
|
18369
|
-
};
|
|
18370
|
-
console.info(
|
|
18371
|
-
`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
|
|
18372
|
-
`
|
|
18373
|
-
font-size: .6rem;
|
|
18374
|
-
font-weight: bold;
|
|
18375
|
-
color: hsl(${Math.max(
|
|
18376
|
-
0,
|
|
18377
|
-
Math.min(120 - 120 * resultFpsPercentage, 120)
|
|
18378
|
-
)}deg 100% 31%);`,
|
|
18379
|
-
opts == null ? void 0 : opts.key
|
|
18380
|
-
);
|
|
18381
|
-
}
|
|
18382
|
-
(_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
|
|
18383
|
-
return result;
|
|
18343
|
+
/*! *****************************************************************************
|
|
18344
|
+
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
18345
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
18346
|
+
this file except in compliance with the License. You may obtain a copy of the
|
|
18347
|
+
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18348
|
+
|
|
18349
|
+
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
18350
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
18351
|
+
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
18352
|
+
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
18353
|
+
|
|
18354
|
+
See the Apache Version 2.0 License for specific language governing permissions
|
|
18355
|
+
and limitations under the License.
|
|
18356
|
+
***************************************************************************** */
|
|
18357
|
+
var extendStatics = function(d2, b2) {
|
|
18358
|
+
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
|
|
18359
|
+
d3.__proto__ = b3;
|
|
18360
|
+
} || function(d3, b3) {
|
|
18361
|
+
for (var p in b3) if (b3.hasOwnProperty(p)) d3[p] = b3[p];
|
|
18384
18362
|
};
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
|
|
18390
|
-
|
|
18363
|
+
return extendStatics(d2, b2);
|
|
18364
|
+
};
|
|
18365
|
+
function __extends(d2, b2) {
|
|
18366
|
+
extendStatics(d2, b2);
|
|
18367
|
+
function __() {
|
|
18368
|
+
this.constructor = d2;
|
|
18391
18369
|
}
|
|
18370
|
+
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
18392
18371
|
}
|
|
18393
|
-
|
|
18394
|
-
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18398
|
-
|
|
18372
|
+
var __assign$1 = function() {
|
|
18373
|
+
__assign$1 = Object.assign || function __assign2(t) {
|
|
18374
|
+
for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
|
|
18375
|
+
s = arguments[i];
|
|
18376
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
18377
|
+
}
|
|
18378
|
+
return t;
|
|
18399
18379
|
};
|
|
18380
|
+
return __assign$1.apply(this, arguments);
|
|
18400
18381
|
};
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
return arr;
|
|
18410
|
-
};
|
|
18411
|
-
const observeElementRect = (instance, cb2) => {
|
|
18412
|
-
const element = instance.scrollElement;
|
|
18413
|
-
if (!element) {
|
|
18414
|
-
return;
|
|
18382
|
+
function throttle$1(delay, noTrailing, callback, debounceMode) {
|
|
18383
|
+
var timeoutID;
|
|
18384
|
+
var cancelled = false;
|
|
18385
|
+
var lastExec = 0;
|
|
18386
|
+
function clearExistingTimeout() {
|
|
18387
|
+
if (timeoutID) {
|
|
18388
|
+
clearTimeout(timeoutID);
|
|
18389
|
+
}
|
|
18415
18390
|
}
|
|
18416
|
-
|
|
18417
|
-
|
|
18418
|
-
|
|
18391
|
+
function cancel() {
|
|
18392
|
+
clearExistingTimeout();
|
|
18393
|
+
cancelled = true;
|
|
18419
18394
|
}
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
handler(element.getBoundingClientRect());
|
|
18425
|
-
if (!targetWindow.ResizeObserver) {
|
|
18426
|
-
return () => {
|
|
18427
|
-
};
|
|
18395
|
+
if (typeof noTrailing !== "boolean") {
|
|
18396
|
+
debounceMode = callback;
|
|
18397
|
+
callback = noTrailing;
|
|
18398
|
+
noTrailing = void 0;
|
|
18428
18399
|
}
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
return;
|
|
18436
|
-
}
|
|
18400
|
+
function wrapper2() {
|
|
18401
|
+
var self2 = this;
|
|
18402
|
+
var elapsed = Date.now() - lastExec;
|
|
18403
|
+
var args = arguments;
|
|
18404
|
+
if (cancelled) {
|
|
18405
|
+
return;
|
|
18437
18406
|
}
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
}
|
|
18445
|
-
|
|
18446
|
-
|
|
18447
|
-
}
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
}
|
|
18454
|
-
const targetWindow = instance.targetWindow;
|
|
18455
|
-
if (!targetWindow) {
|
|
18456
|
-
return;
|
|
18457
|
-
}
|
|
18458
|
-
let offset3 = 0;
|
|
18459
|
-
const fallback = supportsScrollend ? () => void 0 : debounce$2(
|
|
18460
|
-
targetWindow,
|
|
18461
|
-
() => {
|
|
18462
|
-
cb2(offset3, false);
|
|
18463
|
-
},
|
|
18464
|
-
instance.options.isScrollingResetDelay
|
|
18465
|
-
);
|
|
18466
|
-
const createHandler = (isScrolling) => () => {
|
|
18467
|
-
const { horizontal: horizontal2, isRtl } = instance.options;
|
|
18468
|
-
offset3 = horizontal2 ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"];
|
|
18469
|
-
fallback();
|
|
18470
|
-
cb2(offset3, isScrolling);
|
|
18471
|
-
};
|
|
18472
|
-
const handler = createHandler(true);
|
|
18473
|
-
const endHandler = createHandler(false);
|
|
18474
|
-
endHandler();
|
|
18475
|
-
element.addEventListener("scroll", handler, addEventListenerOptions);
|
|
18476
|
-
element.addEventListener("scrollend", endHandler, addEventListenerOptions);
|
|
18477
|
-
return () => {
|
|
18478
|
-
element.removeEventListener("scroll", handler);
|
|
18479
|
-
element.removeEventListener("scrollend", endHandler);
|
|
18480
|
-
};
|
|
18481
|
-
};
|
|
18482
|
-
const measureElement = (element, entry, instance) => {
|
|
18483
|
-
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
18484
|
-
const box = entry.borderBoxSize[0];
|
|
18485
|
-
if (box) {
|
|
18486
|
-
const size2 = Math.round(
|
|
18487
|
-
box[instance.options.horizontal ? "inlineSize" : "blockSize"]
|
|
18488
|
-
);
|
|
18489
|
-
return size2;
|
|
18407
|
+
function exec() {
|
|
18408
|
+
lastExec = Date.now();
|
|
18409
|
+
callback.apply(self2, args);
|
|
18410
|
+
}
|
|
18411
|
+
function clear() {
|
|
18412
|
+
timeoutID = void 0;
|
|
18413
|
+
}
|
|
18414
|
+
if (debounceMode && !timeoutID) {
|
|
18415
|
+
exec();
|
|
18416
|
+
}
|
|
18417
|
+
clearExistingTimeout();
|
|
18418
|
+
if (debounceMode === void 0 && elapsed > delay) {
|
|
18419
|
+
exec();
|
|
18420
|
+
} else if (noTrailing !== true) {
|
|
18421
|
+
timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
|
|
18490
18422
|
}
|
|
18491
18423
|
}
|
|
18492
|
-
|
|
18493
|
-
|
|
18494
|
-
|
|
18424
|
+
wrapper2.cancel = cancel;
|
|
18425
|
+
return wrapper2;
|
|
18426
|
+
}
|
|
18427
|
+
var ThresholdUnits = {
|
|
18428
|
+
Pixel: "Pixel",
|
|
18429
|
+
Percent: "Percent"
|
|
18495
18430
|
};
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
}, instance) => {
|
|
18500
|
-
var _a2, _b;
|
|
18501
|
-
const toOffset = offset3 + adjustments;
|
|
18502
|
-
(_b = (_a2 = instance.scrollElement) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, {
|
|
18503
|
-
[instance.options.horizontal ? "left" : "top"]: toOffset,
|
|
18504
|
-
behavior
|
|
18505
|
-
});
|
|
18431
|
+
var defaultThreshold = {
|
|
18432
|
+
unit: ThresholdUnits.Percent,
|
|
18433
|
+
value: 0.8
|
|
18506
18434
|
};
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
this.pendingMeasuredCacheIndexes = [];
|
|
18517
|
-
this.scrollRect = null;
|
|
18518
|
-
this.scrollOffset = null;
|
|
18519
|
-
this.scrollDirection = null;
|
|
18520
|
-
this.scrollAdjustments = 0;
|
|
18521
|
-
this.elementsCache = /* @__PURE__ */ new Map();
|
|
18522
|
-
this.observer = /* @__PURE__ */ (() => {
|
|
18523
|
-
let _ro = null;
|
|
18524
|
-
const get4 = () => {
|
|
18525
|
-
if (_ro) {
|
|
18526
|
-
return _ro;
|
|
18527
|
-
}
|
|
18528
|
-
if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
|
|
18529
|
-
return null;
|
|
18530
|
-
}
|
|
18531
|
-
return _ro = new this.targetWindow.ResizeObserver((entries2) => {
|
|
18532
|
-
entries2.forEach((entry) => {
|
|
18533
|
-
this._measureElement(entry.target, entry);
|
|
18534
|
-
});
|
|
18535
|
-
});
|
|
18536
|
-
};
|
|
18435
|
+
function parseThreshold(scrollThreshold) {
|
|
18436
|
+
if (typeof scrollThreshold === "number") {
|
|
18437
|
+
return {
|
|
18438
|
+
unit: ThresholdUnits.Percent,
|
|
18439
|
+
value: scrollThreshold * 100
|
|
18440
|
+
};
|
|
18441
|
+
}
|
|
18442
|
+
if (typeof scrollThreshold === "string") {
|
|
18443
|
+
if (scrollThreshold.match(/^(\d*(\.\d+)?)px$/)) {
|
|
18537
18444
|
return {
|
|
18538
|
-
|
|
18539
|
-
|
|
18540
|
-
return (_a2 = get4()) == null ? void 0 : _a2.disconnect();
|
|
18541
|
-
},
|
|
18542
|
-
observe: (target) => {
|
|
18543
|
-
var _a2;
|
|
18544
|
-
return (_a2 = get4()) == null ? void 0 : _a2.observe(target, { box: "border-box" });
|
|
18545
|
-
},
|
|
18546
|
-
unobserve: (target) => {
|
|
18547
|
-
var _a2;
|
|
18548
|
-
return (_a2 = get4()) == null ? void 0 : _a2.unobserve(target);
|
|
18549
|
-
}
|
|
18445
|
+
unit: ThresholdUnits.Pixel,
|
|
18446
|
+
value: parseFloat(scrollThreshold)
|
|
18550
18447
|
};
|
|
18551
|
-
}
|
|
18552
|
-
|
|
18553
|
-
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
});
|
|
18557
|
-
this.options = {
|
|
18558
|
-
debug: false,
|
|
18559
|
-
initialOffset: 0,
|
|
18560
|
-
overscan: 1,
|
|
18561
|
-
paddingStart: 0,
|
|
18562
|
-
paddingEnd: 0,
|
|
18563
|
-
scrollPaddingStart: 0,
|
|
18564
|
-
scrollPaddingEnd: 0,
|
|
18565
|
-
horizontal: false,
|
|
18566
|
-
getItemKey: defaultKeyExtractor,
|
|
18567
|
-
rangeExtractor: defaultRangeExtractor,
|
|
18568
|
-
onChange: () => {
|
|
18569
|
-
},
|
|
18570
|
-
measureElement,
|
|
18571
|
-
initialRect: { width: 0, height: 0 },
|
|
18572
|
-
scrollMargin: 0,
|
|
18573
|
-
gap: 0,
|
|
18574
|
-
indexAttribute: "data-index",
|
|
18575
|
-
initialMeasurementsCache: [],
|
|
18576
|
-
lanes: 1,
|
|
18577
|
-
isScrollingResetDelay: 150,
|
|
18578
|
-
enabled: true,
|
|
18579
|
-
isRtl: false,
|
|
18580
|
-
...opts2
|
|
18448
|
+
}
|
|
18449
|
+
if (scrollThreshold.match(/^(\d*(\.\d+)?)%$/)) {
|
|
18450
|
+
return {
|
|
18451
|
+
unit: ThresholdUnits.Percent,
|
|
18452
|
+
value: parseFloat(scrollThreshold)
|
|
18581
18453
|
};
|
|
18582
|
-
}
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18592
|
-
|
|
18593
|
-
|
|
18594
|
-
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18605
|
-
|
|
18606
|
-
|
|
18607
|
-
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
this.unsubs = [];
|
|
18612
|
-
this.scrollElement = null;
|
|
18613
|
-
this.targetWindow = null;
|
|
18614
|
-
this.observer.disconnect();
|
|
18615
|
-
this.elementsCache.clear();
|
|
18616
|
-
};
|
|
18617
|
-
this._didMount = () => {
|
|
18618
|
-
return () => {
|
|
18619
|
-
this.cleanup();
|
|
18454
|
+
}
|
|
18455
|
+
console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...');
|
|
18456
|
+
return defaultThreshold;
|
|
18457
|
+
}
|
|
18458
|
+
console.warn("scrollThreshold should be string or number");
|
|
18459
|
+
return defaultThreshold;
|
|
18460
|
+
}
|
|
18461
|
+
var InfiniteScroll = (
|
|
18462
|
+
/** @class */
|
|
18463
|
+
function(_super) {
|
|
18464
|
+
__extends(InfiniteScroll2, _super);
|
|
18465
|
+
function InfiniteScroll2(props) {
|
|
18466
|
+
var _this = _super.call(this, props) || this;
|
|
18467
|
+
_this.lastScrollTop = 0;
|
|
18468
|
+
_this.actionTriggered = false;
|
|
18469
|
+
_this.startY = 0;
|
|
18470
|
+
_this.currentY = 0;
|
|
18471
|
+
_this.dragging = false;
|
|
18472
|
+
_this.maxPullDownDistance = 0;
|
|
18473
|
+
_this.getScrollableTarget = function() {
|
|
18474
|
+
if (_this.props.scrollableTarget instanceof HTMLElement)
|
|
18475
|
+
return _this.props.scrollableTarget;
|
|
18476
|
+
if (typeof _this.props.scrollableTarget === "string") {
|
|
18477
|
+
return document.getElementById(_this.props.scrollableTarget);
|
|
18478
|
+
}
|
|
18479
|
+
if (_this.props.scrollableTarget === null) {
|
|
18480
|
+
console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n ");
|
|
18481
|
+
}
|
|
18482
|
+
return null;
|
|
18620
18483
|
};
|
|
18621
|
-
|
|
18622
|
-
|
|
18623
|
-
var _a2;
|
|
18624
|
-
const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
|
|
18625
|
-
if (this.scrollElement !== scrollElement) {
|
|
18626
|
-
this.cleanup();
|
|
18627
|
-
if (!scrollElement) {
|
|
18628
|
-
this.maybeNotify();
|
|
18484
|
+
_this.onStart = function(evt) {
|
|
18485
|
+
if (_this.lastScrollTop)
|
|
18629
18486
|
return;
|
|
18487
|
+
_this.dragging = true;
|
|
18488
|
+
if (evt instanceof MouseEvent) {
|
|
18489
|
+
_this.startY = evt.pageY;
|
|
18490
|
+
} else if (evt instanceof TouchEvent) {
|
|
18491
|
+
_this.startY = evt.touches[0].pageY;
|
|
18630
18492
|
}
|
|
18631
|
-
|
|
18632
|
-
if (
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
this.targetWindow = ((_a2 = this.scrollElement) == null ? void 0 : _a2.window) ?? null;
|
|
18493
|
+
_this.currentY = _this.startY;
|
|
18494
|
+
if (_this._infScroll) {
|
|
18495
|
+
_this._infScroll.style.willChange = "transform";
|
|
18496
|
+
_this._infScroll.style.transition = "transform 0.2s cubic-bezier(0,0,0.31,1)";
|
|
18636
18497
|
}
|
|
18637
|
-
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
|
|
18644
|
-
|
|
18645
|
-
})
|
|
18646
|
-
);
|
|
18647
|
-
this.unsubs.push(
|
|
18648
|
-
this.options.observeElementOffset(this, (offset3, isScrolling) => {
|
|
18649
|
-
this.scrollAdjustments = 0;
|
|
18650
|
-
this.scrollDirection = isScrolling ? this.getScrollOffset() < offset3 ? "forward" : "backward" : null;
|
|
18651
|
-
this.scrollOffset = offset3;
|
|
18652
|
-
this.isScrolling = isScrolling;
|
|
18653
|
-
this.maybeNotify();
|
|
18654
|
-
})
|
|
18655
|
-
);
|
|
18656
|
-
}
|
|
18657
|
-
};
|
|
18658
|
-
this.getSize = () => {
|
|
18659
|
-
if (!this.options.enabled) {
|
|
18660
|
-
this.scrollRect = null;
|
|
18661
|
-
return 0;
|
|
18662
|
-
}
|
|
18663
|
-
this.scrollRect = this.scrollRect ?? this.options.initialRect;
|
|
18664
|
-
return this.scrollRect[this.options.horizontal ? "width" : "height"];
|
|
18665
|
-
};
|
|
18666
|
-
this.getScrollOffset = () => {
|
|
18667
|
-
if (!this.options.enabled) {
|
|
18668
|
-
this.scrollOffset = null;
|
|
18669
|
-
return 0;
|
|
18670
|
-
}
|
|
18671
|
-
this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
|
|
18672
|
-
return this.scrollOffset;
|
|
18673
|
-
};
|
|
18674
|
-
this.getFurthestMeasurement = (measurements, index2) => {
|
|
18675
|
-
const furthestMeasurementsFound = /* @__PURE__ */ new Map();
|
|
18676
|
-
const furthestMeasurements = /* @__PURE__ */ new Map();
|
|
18677
|
-
for (let m2 = index2 - 1; m2 >= 0; m2--) {
|
|
18678
|
-
const measurement = measurements[m2];
|
|
18679
|
-
if (furthestMeasurementsFound.has(measurement.lane)) {
|
|
18680
|
-
continue;
|
|
18681
|
-
}
|
|
18682
|
-
const previousFurthestMeasurement = furthestMeasurements.get(
|
|
18683
|
-
measurement.lane
|
|
18684
|
-
);
|
|
18685
|
-
if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
|
|
18686
|
-
furthestMeasurements.set(measurement.lane, measurement);
|
|
18687
|
-
} else if (measurement.end < previousFurthestMeasurement.end) {
|
|
18688
|
-
furthestMeasurementsFound.set(measurement.lane, true);
|
|
18689
|
-
}
|
|
18690
|
-
if (furthestMeasurementsFound.size === this.options.lanes) {
|
|
18691
|
-
break;
|
|
18692
|
-
}
|
|
18693
|
-
}
|
|
18694
|
-
return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a2, b2) => {
|
|
18695
|
-
if (a2.end === b2.end) {
|
|
18696
|
-
return a2.index - b2.index;
|
|
18498
|
+
};
|
|
18499
|
+
_this.onMove = function(evt) {
|
|
18500
|
+
if (!_this.dragging)
|
|
18501
|
+
return;
|
|
18502
|
+
if (evt instanceof MouseEvent) {
|
|
18503
|
+
_this.currentY = evt.pageY;
|
|
18504
|
+
} else if (evt instanceof TouchEvent) {
|
|
18505
|
+
_this.currentY = evt.touches[0].pageY;
|
|
18697
18506
|
}
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
this.options.count,
|
|
18704
|
-
this.options.paddingStart,
|
|
18705
|
-
this.options.scrollMargin,
|
|
18706
|
-
this.options.getItemKey,
|
|
18707
|
-
this.options.enabled
|
|
18708
|
-
],
|
|
18709
|
-
(count2, paddingStart, scrollMargin, getItemKey, enabled) => {
|
|
18710
|
-
this.pendingMeasuredCacheIndexes = [];
|
|
18711
|
-
return {
|
|
18712
|
-
count: count2,
|
|
18713
|
-
paddingStart,
|
|
18714
|
-
scrollMargin,
|
|
18715
|
-
getItemKey,
|
|
18716
|
-
enabled
|
|
18717
|
-
};
|
|
18718
|
-
},
|
|
18719
|
-
{
|
|
18720
|
-
key: false
|
|
18721
|
-
}
|
|
18722
|
-
);
|
|
18723
|
-
this.getMeasurements = memo(
|
|
18724
|
-
() => [this.getMeasurementOptions(), this.itemSizeCache],
|
|
18725
|
-
({ count: count2, paddingStart, scrollMargin, getItemKey, enabled }, itemSizeCache) => {
|
|
18726
|
-
if (!enabled) {
|
|
18727
|
-
this.measurementsCache = [];
|
|
18728
|
-
this.itemSizeCache.clear();
|
|
18729
|
-
return [];
|
|
18730
|
-
}
|
|
18731
|
-
if (this.measurementsCache.length === 0) {
|
|
18732
|
-
this.measurementsCache = this.options.initialMeasurementsCache;
|
|
18733
|
-
this.measurementsCache.forEach((item2) => {
|
|
18734
|
-
this.itemSizeCache.set(item2.key, item2.size);
|
|
18507
|
+
if (_this.currentY < _this.startY)
|
|
18508
|
+
return;
|
|
18509
|
+
if (_this.currentY - _this.startY >= Number(_this.props.pullDownToRefreshThreshold)) {
|
|
18510
|
+
_this.setState({
|
|
18511
|
+
pullToRefreshThresholdBreached: true
|
|
18735
18512
|
});
|
|
18736
18513
|
}
|
|
18737
|
-
|
|
18738
|
-
|
|
18739
|
-
|
|
18740
|
-
|
|
18741
|
-
|
|
18742
|
-
const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
|
|
18743
|
-
const start3 = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
|
|
18744
|
-
const measuredSize = itemSizeCache.get(key2);
|
|
18745
|
-
const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
|
|
18746
|
-
const end2 = start3 + size2;
|
|
18747
|
-
const lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
|
|
18748
|
-
measurements[i] = {
|
|
18749
|
-
index: i,
|
|
18750
|
-
start: start3,
|
|
18751
|
-
size: size2,
|
|
18752
|
-
end: end2,
|
|
18753
|
-
key: key2,
|
|
18754
|
-
lane
|
|
18755
|
-
};
|
|
18756
|
-
}
|
|
18757
|
-
this.measurementsCache = measurements;
|
|
18758
|
-
return measurements;
|
|
18759
|
-
},
|
|
18760
|
-
{
|
|
18761
|
-
key: process.env.NODE_ENV !== "production" && "getMeasurements",
|
|
18762
|
-
debug: () => this.options.debug
|
|
18763
|
-
}
|
|
18764
|
-
);
|
|
18765
|
-
this.calculateRange = memo(
|
|
18766
|
-
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
|
|
18767
|
-
(measurements, outerSize, scrollOffset) => {
|
|
18768
|
-
return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
|
|
18769
|
-
measurements,
|
|
18770
|
-
outerSize,
|
|
18771
|
-
scrollOffset
|
|
18772
|
-
}) : null;
|
|
18773
|
-
},
|
|
18774
|
-
{
|
|
18775
|
-
key: process.env.NODE_ENV !== "production" && "calculateRange",
|
|
18776
|
-
debug: () => this.options.debug
|
|
18777
|
-
}
|
|
18778
|
-
);
|
|
18779
|
-
this.getIndexes = memo(
|
|
18780
|
-
() => [
|
|
18781
|
-
this.options.rangeExtractor,
|
|
18782
|
-
this.calculateRange(),
|
|
18783
|
-
this.options.overscan,
|
|
18784
|
-
this.options.count
|
|
18785
|
-
],
|
|
18786
|
-
(rangeExtractor, range2, overscan, count2) => {
|
|
18787
|
-
return range2 === null ? [] : rangeExtractor({
|
|
18788
|
-
startIndex: range2.startIndex,
|
|
18789
|
-
endIndex: range2.endIndex,
|
|
18790
|
-
overscan,
|
|
18791
|
-
count: count2
|
|
18792
|
-
});
|
|
18793
|
-
},
|
|
18794
|
-
{
|
|
18795
|
-
key: process.env.NODE_ENV !== "production" && "getIndexes",
|
|
18796
|
-
debug: () => this.options.debug
|
|
18797
|
-
}
|
|
18798
|
-
);
|
|
18799
|
-
this.indexFromElement = (node2) => {
|
|
18800
|
-
const attributeName = this.options.indexAttribute;
|
|
18801
|
-
const indexStr = node2.getAttribute(attributeName);
|
|
18802
|
-
if (!indexStr) {
|
|
18803
|
-
console.warn(
|
|
18804
|
-
`Missing attribute name '${attributeName}={index}' on measured element.`
|
|
18805
|
-
);
|
|
18806
|
-
return -1;
|
|
18807
|
-
}
|
|
18808
|
-
return parseInt(indexStr, 10);
|
|
18809
|
-
};
|
|
18810
|
-
this._measureElement = (node2, entry) => {
|
|
18811
|
-
const index2 = this.indexFromElement(node2);
|
|
18812
|
-
const item2 = this.measurementsCache[index2];
|
|
18813
|
-
if (!item2) {
|
|
18814
|
-
return;
|
|
18815
|
-
}
|
|
18816
|
-
const key2 = item2.key;
|
|
18817
|
-
const prevNode = this.elementsCache.get(key2);
|
|
18818
|
-
if (prevNode !== node2) {
|
|
18819
|
-
if (prevNode) {
|
|
18820
|
-
this.observer.unobserve(prevNode);
|
|
18514
|
+
if (_this.currentY - _this.startY > _this.maxPullDownDistance * 1.5)
|
|
18515
|
+
return;
|
|
18516
|
+
if (_this._infScroll) {
|
|
18517
|
+
_this._infScroll.style.overflow = "visible";
|
|
18518
|
+
_this._infScroll.style.transform = "translate3d(0px, " + (_this.currentY - _this.startY) + "px, 0px)";
|
|
18821
18519
|
}
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
if (!item2) {
|
|
18832
|
-
return;
|
|
18833
|
-
}
|
|
18834
|
-
const itemSize = this.itemSizeCache.get(item2.key) ?? item2.size;
|
|
18835
|
-
const delta = size2 - itemSize;
|
|
18836
|
-
if (delta !== 0) {
|
|
18837
|
-
if (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item2, delta, this) : item2.start < this.getScrollOffset() + this.scrollAdjustments) {
|
|
18838
|
-
if (process.env.NODE_ENV !== "production" && this.options.debug) {
|
|
18839
|
-
console.info("correction", delta);
|
|
18840
|
-
}
|
|
18841
|
-
this._scrollToOffset(this.getScrollOffset(), {
|
|
18842
|
-
adjustments: this.scrollAdjustments += delta,
|
|
18843
|
-
behavior: void 0
|
|
18520
|
+
};
|
|
18521
|
+
_this.onEnd = function() {
|
|
18522
|
+
_this.startY = 0;
|
|
18523
|
+
_this.currentY = 0;
|
|
18524
|
+
_this.dragging = false;
|
|
18525
|
+
if (_this.state.pullToRefreshThresholdBreached) {
|
|
18526
|
+
_this.props.refreshFunction && _this.props.refreshFunction();
|
|
18527
|
+
_this.setState({
|
|
18528
|
+
pullToRefreshThresholdBreached: false
|
|
18844
18529
|
});
|
|
18845
18530
|
}
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
this.measureElement = (node2) => {
|
|
18852
|
-
if (!node2) {
|
|
18853
|
-
this.elementsCache.forEach((cached, key2) => {
|
|
18854
|
-
if (!cached.isConnected) {
|
|
18855
|
-
this.observer.unobserve(cached);
|
|
18856
|
-
this.elementsCache.delete(key2);
|
|
18531
|
+
requestAnimationFrame(function() {
|
|
18532
|
+
if (_this._infScroll) {
|
|
18533
|
+
_this._infScroll.style.overflow = "auto";
|
|
18534
|
+
_this._infScroll.style.transform = "none";
|
|
18535
|
+
_this._infScroll.style.willChange = "unset";
|
|
18857
18536
|
}
|
|
18858
18537
|
});
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
|
|
18863
|
-
|
|
18864
|
-
|
|
18865
|
-
|
|
18866
|
-
|
|
18867
|
-
|
|
18868
|
-
|
|
18869
|
-
|
|
18870
|
-
|
|
18871
|
-
|
|
18872
|
-
|
|
18873
|
-
|
|
18874
|
-
|
|
18875
|
-
|
|
18876
|
-
|
|
18877
|
-
|
|
18878
|
-
|
|
18879
|
-
|
|
18880
|
-
|
|
18881
|
-
|
|
18882
|
-
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18890
|
-
)
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
|
|
18538
|
+
};
|
|
18539
|
+
_this.onScrollListener = function(event) {
|
|
18540
|
+
if (typeof _this.props.onScroll === "function") {
|
|
18541
|
+
setTimeout(function() {
|
|
18542
|
+
return _this.props.onScroll && _this.props.onScroll(event);
|
|
18543
|
+
}, 0);
|
|
18544
|
+
}
|
|
18545
|
+
var target = _this.props.height || _this._scrollableNode ? event.target : document.documentElement.scrollTop ? document.documentElement : document.body;
|
|
18546
|
+
if (_this.actionTriggered)
|
|
18547
|
+
return;
|
|
18548
|
+
var atBottom = _this.props.inverse ? _this.isElementAtTop(target, _this.props.scrollThreshold) : _this.isElementAtBottom(target, _this.props.scrollThreshold);
|
|
18549
|
+
if (atBottom && _this.props.hasMore) {
|
|
18550
|
+
_this.actionTriggered = true;
|
|
18551
|
+
_this.setState({ showLoader: true });
|
|
18552
|
+
_this.props.next && _this.props.next();
|
|
18553
|
+
}
|
|
18554
|
+
_this.lastScrollTop = target.scrollTop;
|
|
18555
|
+
};
|
|
18556
|
+
_this.state = {
|
|
18557
|
+
showLoader: false,
|
|
18558
|
+
pullToRefreshThresholdBreached: false,
|
|
18559
|
+
prevDataLength: props.dataLength
|
|
18560
|
+
};
|
|
18561
|
+
_this.throttledOnScrollListener = throttle$1(150, _this.onScrollListener).bind(_this);
|
|
18562
|
+
_this.onStart = _this.onStart.bind(_this);
|
|
18563
|
+
_this.onMove = _this.onMove.bind(_this);
|
|
18564
|
+
_this.onEnd = _this.onEnd.bind(_this);
|
|
18565
|
+
return _this;
|
|
18566
|
+
}
|
|
18567
|
+
InfiniteScroll2.prototype.componentDidMount = function() {
|
|
18568
|
+
if (typeof this.props.dataLength === "undefined") {
|
|
18569
|
+
throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
|
|
18570
|
+
}
|
|
18571
|
+
this._scrollableNode = this.getScrollableTarget();
|
|
18572
|
+
this.el = this.props.height ? this._infScroll : this._scrollableNode || window;
|
|
18573
|
+
if (this.el) {
|
|
18574
|
+
this.el.addEventListener("scroll", this.throttledOnScrollListener);
|
|
18575
|
+
}
|
|
18576
|
+
if (typeof this.props.initialScrollY === "number" && this.el && this.el instanceof HTMLElement && this.el.scrollHeight > this.props.initialScrollY) {
|
|
18577
|
+
this.el.scrollTo(0, this.props.initialScrollY);
|
|
18578
|
+
}
|
|
18579
|
+
if (this.props.pullDownToRefresh && this.el) {
|
|
18580
|
+
this.el.addEventListener("touchstart", this.onStart);
|
|
18581
|
+
this.el.addEventListener("touchmove", this.onMove);
|
|
18582
|
+
this.el.addEventListener("touchend", this.onEnd);
|
|
18583
|
+
this.el.addEventListener("mousedown", this.onStart);
|
|
18584
|
+
this.el.addEventListener("mousemove", this.onMove);
|
|
18585
|
+
this.el.addEventListener("mouseup", this.onEnd);
|
|
18586
|
+
this.maxPullDownDistance = this._pullDown && this._pullDown.firstChild && this._pullDown.firstChild.getBoundingClientRect().height || 0;
|
|
18587
|
+
this.forceUpdate();
|
|
18588
|
+
if (typeof this.props.refreshFunction !== "function") {
|
|
18589
|
+
throw new Error(`Mandatory prop "refreshFunction" missing.
|
|
18590
|
+
Pull Down To Refresh functionality will not work
|
|
18591
|
+
as expected. Check README.md for usage'`);
|
|
18903
18592
|
}
|
|
18904
18593
|
}
|
|
18905
|
-
if (align === "start") {
|
|
18906
|
-
toOffset = toOffset;
|
|
18907
|
-
} else if (align === "end") {
|
|
18908
|
-
toOffset = toOffset - size2;
|
|
18909
|
-
} else if (align === "center") {
|
|
18910
|
-
toOffset = toOffset - size2 / 2;
|
|
18911
|
-
}
|
|
18912
|
-
const scrollSizeProp = this.options.horizontal ? "scrollWidth" : "scrollHeight";
|
|
18913
|
-
const scrollSize = this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;
|
|
18914
|
-
const maxOffset = scrollSize - size2;
|
|
18915
|
-
return Math.max(Math.min(maxOffset, toOffset), 0);
|
|
18916
18594
|
};
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
align = "end";
|
|
18928
|
-
} else if (item2.start <= scrollOffset + this.options.scrollPaddingStart) {
|
|
18929
|
-
align = "start";
|
|
18930
|
-
} else {
|
|
18931
|
-
return [scrollOffset, align];
|
|
18595
|
+
InfiniteScroll2.prototype.componentWillUnmount = function() {
|
|
18596
|
+
if (this.el) {
|
|
18597
|
+
this.el.removeEventListener("scroll", this.throttledOnScrollListener);
|
|
18598
|
+
if (this.props.pullDownToRefresh) {
|
|
18599
|
+
this.el.removeEventListener("touchstart", this.onStart);
|
|
18600
|
+
this.el.removeEventListener("touchmove", this.onMove);
|
|
18601
|
+
this.el.removeEventListener("touchend", this.onEnd);
|
|
18602
|
+
this.el.removeEventListener("mousedown", this.onStart);
|
|
18603
|
+
this.el.removeEventListener("mousemove", this.onMove);
|
|
18604
|
+
this.el.removeEventListener("mouseup", this.onEnd);
|
|
18932
18605
|
}
|
|
18933
18606
|
}
|
|
18934
|
-
const toOffset = align === "end" ? item2.end + this.options.scrollPaddingEnd : item2.start - this.options.scrollPaddingStart;
|
|
18935
|
-
return [this.getOffsetForAlignment(toOffset, align), align];
|
|
18936
18607
|
};
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18608
|
+
InfiniteScroll2.prototype.componentDidUpdate = function(prevProps) {
|
|
18609
|
+
if (this.props.dataLength === prevProps.dataLength)
|
|
18610
|
+
return;
|
|
18611
|
+
this.actionTriggered = false;
|
|
18612
|
+
this.setState({
|
|
18613
|
+
showLoader: false
|
|
18614
|
+
});
|
|
18943
18615
|
};
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
if (
|
|
18947
|
-
|
|
18948
|
-
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18949
|
-
);
|
|
18616
|
+
InfiniteScroll2.getDerivedStateFromProps = function(nextProps, prevState) {
|
|
18617
|
+
var dataLengthChanged = nextProps.dataLength !== prevState.prevDataLength;
|
|
18618
|
+
if (dataLengthChanged) {
|
|
18619
|
+
return __assign$1(__assign$1({}, prevState), { prevDataLength: nextProps.dataLength });
|
|
18950
18620
|
}
|
|
18951
|
-
|
|
18952
|
-
adjustments: void 0,
|
|
18953
|
-
behavior
|
|
18954
|
-
});
|
|
18621
|
+
return null;
|
|
18955
18622
|
};
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
if (behavior === "smooth" && this.isDynamicMode()) {
|
|
18960
|
-
console.warn(
|
|
18961
|
-
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18962
|
-
);
|
|
18623
|
+
InfiniteScroll2.prototype.isElementAtTop = function(target, scrollThreshold) {
|
|
18624
|
+
if (scrollThreshold === void 0) {
|
|
18625
|
+
scrollThreshold = 0.8;
|
|
18963
18626
|
}
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
if (behavior !== "smooth" && this.isDynamicMode() && this.targetWindow) {
|
|
18969
|
-
this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
|
|
18970
|
-
this.scrollToIndexTimeoutId = null;
|
|
18971
|
-
const elementInDOM = this.elementsCache.has(
|
|
18972
|
-
this.options.getItemKey(index2)
|
|
18973
|
-
);
|
|
18974
|
-
if (elementInDOM) {
|
|
18975
|
-
const [latestOffset] = notUndefined(
|
|
18976
|
-
this.getOffsetForIndex(index2, align)
|
|
18977
|
-
);
|
|
18978
|
-
if (!approxEqual(latestOffset, this.getScrollOffset())) {
|
|
18979
|
-
this.scrollToIndex(index2, { align, behavior });
|
|
18980
|
-
}
|
|
18981
|
-
} else {
|
|
18982
|
-
this.scrollToIndex(index2, { align, behavior });
|
|
18983
|
-
}
|
|
18984
|
-
});
|
|
18627
|
+
var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
|
|
18628
|
+
var threshold = parseThreshold(scrollThreshold);
|
|
18629
|
+
if (threshold.unit === ThresholdUnits.Pixel) {
|
|
18630
|
+
return target.scrollTop <= threshold.value + clientHeight - target.scrollHeight + 1;
|
|
18985
18631
|
}
|
|
18632
|
+
return target.scrollTop <= threshold.value / 100 + clientHeight - target.scrollHeight + 1;
|
|
18986
18633
|
};
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
console.warn(
|
|
18991
|
-
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18992
|
-
);
|
|
18634
|
+
InfiniteScroll2.prototype.isElementAtBottom = function(target, scrollThreshold) {
|
|
18635
|
+
if (scrollThreshold === void 0) {
|
|
18636
|
+
scrollThreshold = 0.8;
|
|
18993
18637
|
}
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
|
|
18998
|
-
};
|
|
18999
|
-
this.getTotalSize = () => {
|
|
19000
|
-
var _a2;
|
|
19001
|
-
const measurements = this.getMeasurements();
|
|
19002
|
-
let end2;
|
|
19003
|
-
if (measurements.length === 0) {
|
|
19004
|
-
end2 = this.options.paddingStart;
|
|
19005
|
-
} else {
|
|
19006
|
-
end2 = this.options.lanes === 1 ? ((_a2 = measurements[measurements.length - 1]) == null ? void 0 : _a2.end) ?? 0 : Math.max(
|
|
19007
|
-
...measurements.slice(-this.options.lanes).map((m2) => m2.end)
|
|
19008
|
-
);
|
|
18638
|
+
var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
|
|
18639
|
+
var threshold = parseThreshold(scrollThreshold);
|
|
18640
|
+
if (threshold.unit === ThresholdUnits.Pixel) {
|
|
18641
|
+
return target.scrollTop + clientHeight >= target.scrollHeight - threshold.value;
|
|
19009
18642
|
}
|
|
19010
|
-
return
|
|
19011
|
-
};
|
|
19012
|
-
this._scrollToOffset = (offset3, {
|
|
19013
|
-
adjustments,
|
|
19014
|
-
behavior
|
|
19015
|
-
}) => {
|
|
19016
|
-
this.options.scrollToFn(offset3, { behavior, adjustments }, this);
|
|
18643
|
+
return target.scrollTop + clientHeight >= threshold.value / 100 * target.scrollHeight;
|
|
19017
18644
|
};
|
|
19018
|
-
|
|
19019
|
-
|
|
19020
|
-
this.
|
|
18645
|
+
InfiniteScroll2.prototype.render = function() {
|
|
18646
|
+
var _this = this;
|
|
18647
|
+
var style2 = __assign$1({ height: this.props.height || "auto", overflow: "auto", WebkitOverflowScrolling: "touch" }, this.props.style);
|
|
18648
|
+
var hasChildren2 = this.props.hasChildren || !!(this.props.children && this.props.children instanceof Array && this.props.children.length);
|
|
18649
|
+
var outerDivStyle = this.props.pullDownToRefresh && this.props.height ? { overflow: "auto" } : {};
|
|
18650
|
+
return React__default.createElement(
|
|
18651
|
+
"div",
|
|
18652
|
+
{ style: outerDivStyle, className: "infinite-scroll-component__outerdiv" },
|
|
18653
|
+
React__default.createElement(
|
|
18654
|
+
"div",
|
|
18655
|
+
{ className: "infinite-scroll-component " + (this.props.className || ""), ref: function(infScroll) {
|
|
18656
|
+
return _this._infScroll = infScroll;
|
|
18657
|
+
}, style: style2 },
|
|
18658
|
+
this.props.pullDownToRefresh && React__default.createElement(
|
|
18659
|
+
"div",
|
|
18660
|
+
{ style: { position: "relative" }, ref: function(pullDown) {
|
|
18661
|
+
return _this._pullDown = pullDown;
|
|
18662
|
+
} },
|
|
18663
|
+
React__default.createElement("div", { style: {
|
|
18664
|
+
position: "absolute",
|
|
18665
|
+
left: 0,
|
|
18666
|
+
right: 0,
|
|
18667
|
+
top: -1 * this.maxPullDownDistance
|
|
18668
|
+
} }, this.state.pullToRefreshThresholdBreached ? this.props.releaseToRefreshContent : this.props.pullDownToRefreshContent)
|
|
18669
|
+
),
|
|
18670
|
+
this.props.children,
|
|
18671
|
+
!this.state.showLoader && !hasChildren2 && this.props.hasMore && this.props.loader,
|
|
18672
|
+
this.state.showLoader && this.props.hasMore && this.props.loader,
|
|
18673
|
+
!this.props.hasMore && this.props.endMessage
|
|
18674
|
+
)
|
|
18675
|
+
);
|
|
19021
18676
|
};
|
|
19022
|
-
|
|
19023
|
-
}
|
|
19024
|
-
|
|
19025
|
-
const
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19031
|
-
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
|
|
19043
|
-
|
|
19044
|
-
|
|
19045
|
-
|
|
19046
|
-
|
|
19047
|
-
|
|
19048
|
-
|
|
19049
|
-
|
|
19050
|
-
|
|
19051
|
-
|
|
19052
|
-
|
|
19053
|
-
|
|
19054
|
-
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
const
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
if (sync2) {
|
|
19065
|
-
flushSync$1(rerender);
|
|
19066
|
-
} else {
|
|
19067
|
-
rerender();
|
|
19068
|
-
}
|
|
19069
|
-
(_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync2);
|
|
19070
|
-
}
|
|
19071
|
-
};
|
|
19072
|
-
const [instance] = React$4.useState(
|
|
19073
|
-
() => new Virtualizer(resolvedOptions)
|
|
19074
|
-
);
|
|
19075
|
-
instance.setOptions(resolvedOptions);
|
|
19076
|
-
React$4.useEffect(() => {
|
|
19077
|
-
return instance._didMount();
|
|
19078
|
-
}, []);
|
|
19079
|
-
useIsomorphicLayoutEffect$4(() => {
|
|
19080
|
-
return instance._willUpdate();
|
|
19081
|
-
});
|
|
19082
|
-
return instance;
|
|
19083
|
-
}
|
|
19084
|
-
function useVirtualizer(options) {
|
|
19085
|
-
return useVirtualizerBase({
|
|
19086
|
-
observeElementRect,
|
|
19087
|
-
observeElementOffset,
|
|
19088
|
-
scrollToFn: elementScroll,
|
|
19089
|
-
...options
|
|
19090
|
-
});
|
|
19091
|
-
}
|
|
19092
|
-
const inputInTable$8 = "_inputInTable_7fzf8_1";
|
|
19093
|
-
const inputHover$8 = "_inputHover_7fzf8_13";
|
|
19094
|
-
const inputFocus$8 = "_inputFocus_7fzf8_18";
|
|
19095
|
-
const inputError$8 = "_inputError_7fzf8_25";
|
|
19096
|
-
const inputWarning$8 = "_inputWarning_7fzf8_26";
|
|
19097
|
-
const inputDisabled$8 = "_inputDisabled_7fzf8_61";
|
|
19098
|
-
const hideScrollbars$8 = "_hideScrollbars_7fzf8_67";
|
|
19099
|
-
const listWrapper = "_listWrapper_7fzf8_77";
|
|
19100
|
-
const listWrapperBordered = "_listWrapperBordered_7fzf8_82";
|
|
19101
|
-
const header$1 = "_header_7fzf8_89";
|
|
19102
|
-
const headerTitle = "_headerTitle_7fzf8_89";
|
|
19103
|
-
const heading$3 = "_heading_7fzf8_90";
|
|
19104
|
-
const itemHeader = "_itemHeader_7fzf8_90";
|
|
19105
|
-
const narrow = "_narrow_7fzf8_93";
|
|
19106
|
-
const stickyHeader = "_stickyHeader_7fzf8_97";
|
|
19107
|
-
const title$3 = "_title_7fzf8_108";
|
|
19108
|
-
const name = "_name_7fzf8_114";
|
|
19109
|
-
const iconTooltipMargin = "_iconTooltipMargin_7fzf8_117";
|
|
19110
|
-
const bold = "_bold_7fzf8_120";
|
|
19111
|
-
const toggleNarrow = "_toggleNarrow_7fzf8_129";
|
|
19112
|
-
const drag$1 = "_drag_7fzf8_147";
|
|
19113
|
-
const list$1 = "_list_7fzf8_77";
|
|
19114
|
-
const bordered$1 = "_bordered_7fzf8_172";
|
|
19115
|
-
const item$4 = "_item_7fzf8_90";
|
|
19116
|
-
const action = "_action_7fzf8_205";
|
|
19117
|
-
const active$3 = "_active_7fzf8_208";
|
|
19118
|
-
const indented = "_indented_7fzf8_215";
|
|
19119
|
-
const disabled$5 = "_disabled_7fzf8_228";
|
|
19120
|
-
const label$6 = "_label_7fzf8_239";
|
|
19121
|
-
const details$2 = "_details_7fzf8_250";
|
|
19122
|
-
const metadata = "_metadata_7fzf8_251";
|
|
19123
|
-
const itemContent = "_itemContent_7fzf8_259";
|
|
19124
|
-
const indentIcon = "_indentIcon_7fzf8_266";
|
|
19125
|
-
const expandIcon = "_expandIcon_7fzf8_271";
|
|
19126
|
-
const expanded = "_expanded_7fzf8_278";
|
|
19127
|
-
const right$4 = "_right_7fzf8_281";
|
|
19128
|
-
const actions = "_actions_7fzf8_289";
|
|
19129
|
-
const scrollableList = "_scrollableList_7fzf8_294";
|
|
19130
|
-
const hideScrollbar = "_hideScrollbar_7fzf8_67";
|
|
19131
|
-
const noPointerEvents = "_noPointerEvents_7fzf8_314";
|
|
18677
|
+
return InfiniteScroll2;
|
|
18678
|
+
}(Component$1)
|
|
18679
|
+
);
|
|
18680
|
+
const inputInTable$8 = "_inputInTable_1llou_1";
|
|
18681
|
+
const inputHover$8 = "_inputHover_1llou_13";
|
|
18682
|
+
const inputFocus$8 = "_inputFocus_1llou_18";
|
|
18683
|
+
const inputError$8 = "_inputError_1llou_25";
|
|
18684
|
+
const inputWarning$8 = "_inputWarning_1llou_26";
|
|
18685
|
+
const inputDisabled$8 = "_inputDisabled_1llou_61";
|
|
18686
|
+
const hideScrollbars$8 = "_hideScrollbars_1llou_67";
|
|
18687
|
+
const header$1 = "_header_1llou_77";
|
|
18688
|
+
const headerTitle = "_headerTitle_1llou_77";
|
|
18689
|
+
const heading$3 = "_heading_1llou_78";
|
|
18690
|
+
const itemHeader = "_itemHeader_1llou_78";
|
|
18691
|
+
const narrow = "_narrow_1llou_81";
|
|
18692
|
+
const stickyHeader = "_stickyHeader_1llou_85";
|
|
18693
|
+
const title$3 = "_title_1llou_96";
|
|
18694
|
+
const name = "_name_1llou_102";
|
|
18695
|
+
const iconTooltipMargin = "_iconTooltipMargin_1llou_105";
|
|
18696
|
+
const bold = "_bold_1llou_108";
|
|
18697
|
+
const toggleNarrow = "_toggleNarrow_1llou_117";
|
|
18698
|
+
const drag$1 = "_drag_1llou_135";
|
|
18699
|
+
const list$1 = "_list_1llou_155";
|
|
18700
|
+
const bordered$1 = "_bordered_1llou_159";
|
|
18701
|
+
const item$4 = "_item_1llou_78";
|
|
18702
|
+
const action = "_action_1llou_192";
|
|
18703
|
+
const active$3 = "_active_1llou_195";
|
|
18704
|
+
const indented = "_indented_1llou_202";
|
|
18705
|
+
const disabled$5 = "_disabled_1llou_215";
|
|
18706
|
+
const label$6 = "_label_1llou_226";
|
|
18707
|
+
const details$2 = "_details_1llou_237";
|
|
18708
|
+
const metadata = "_metadata_1llou_238";
|
|
18709
|
+
const itemContent = "_itemContent_1llou_246";
|
|
18710
|
+
const indentIcon = "_indentIcon_1llou_253";
|
|
18711
|
+
const expandIcon = "_expandIcon_1llou_258";
|
|
18712
|
+
const expanded = "_expanded_1llou_265";
|
|
18713
|
+
const right$4 = "_right_1llou_268";
|
|
18714
|
+
const actions = "_actions_1llou_276";
|
|
18715
|
+
const scrollableList = "_scrollableList_1llou_281";
|
|
18716
|
+
const infiniteScrollContainer = "_infiniteScrollContainer_1llou_286";
|
|
18717
|
+
const hideScrollbar = "_hideScrollbar_1llou_67";
|
|
18718
|
+
const noPointerEvents = "_noPointerEvents_1llou_303";
|
|
19132
18719
|
const listStyles = {
|
|
19133
18720
|
inputInTable: inputInTable$8,
|
|
19134
18721
|
inputHover: inputHover$8,
|
|
@@ -19137,8 +18724,6 @@ const listStyles = {
|
|
|
19137
18724
|
inputWarning: inputWarning$8,
|
|
19138
18725
|
inputDisabled: inputDisabled$8,
|
|
19139
18726
|
hideScrollbars: hideScrollbars$8,
|
|
19140
|
-
listWrapper,
|
|
19141
|
-
listWrapperBordered,
|
|
19142
18727
|
header: header$1,
|
|
19143
18728
|
headerTitle,
|
|
19144
18729
|
heading: heading$3,
|
|
@@ -19168,6 +18753,7 @@ const listStyles = {
|
|
|
19168
18753
|
right: right$4,
|
|
19169
18754
|
actions,
|
|
19170
18755
|
scrollableList,
|
|
18756
|
+
infiniteScrollContainer,
|
|
19171
18757
|
hideScrollbar,
|
|
19172
18758
|
noPointerEvents
|
|
19173
18759
|
};
|
|
@@ -19295,271 +18881,95 @@ const getItemStyle = (draggableProps, item2) => {
|
|
|
19295
18881
|
};
|
|
19296
18882
|
};
|
|
19297
18883
|
const ListRow = forwardRef(
|
|
19298
|
-
({
|
|
18884
|
+
({ items, expanding, invokeEditOnRowClick, provided, draggable: draggable2 }, listRowRefs) => {
|
|
19299
18885
|
const disabledContext = useContext(DisabledContext);
|
|
19300
|
-
const listElement = (
|
|
19301
|
-
const Component2 =
|
|
19302
|
-
return /* @__PURE__ */
|
|
18886
|
+
const listElement = (index2, provided2, item2, indent, hasOnClick, edit2) => {
|
|
18887
|
+
const Component2 = item2.component || "a";
|
|
18888
|
+
return /* @__PURE__ */ createElement(
|
|
19303
18889
|
Component2,
|
|
19304
18890
|
{
|
|
19305
|
-
href:
|
|
19306
|
-
to:
|
|
19307
|
-
|
|
18891
|
+
href: item2.url,
|
|
18892
|
+
to: item2.url,
|
|
18893
|
+
ref: provided2 == null ? void 0 : provided2.innerRef,
|
|
18894
|
+
...provided2.draggableProps,
|
|
18895
|
+
style: getItemStyle(provided2.draggableProps, item2),
|
|
19308
18896
|
className: cx$2(
|
|
19309
18897
|
listStyles.item,
|
|
19310
|
-
|
|
19311
|
-
|
|
19312
|
-
|
|
18898
|
+
item2.active ? listStyles.active : "",
|
|
18899
|
+
item2.disabled || disabledContext ? listStyles.disabled : "",
|
|
18900
|
+
hasOnClick ? listStyles.action : ""
|
|
19313
18901
|
),
|
|
19314
18902
|
onClick: (evt) => {
|
|
19315
|
-
if (invokeEditOnRowClick &&
|
|
19316
|
-
if (
|
|
18903
|
+
if (invokeEditOnRowClick && edit2) {
|
|
18904
|
+
if (edit2.onClick) edit2.onClick(evt, item2.id);
|
|
19317
18905
|
}
|
|
19318
|
-
if (
|
|
19319
|
-
return
|
|
18906
|
+
if (item2.onClick) {
|
|
18907
|
+
return item2.onClick(evt);
|
|
19320
18908
|
}
|
|
19321
18909
|
},
|
|
19322
|
-
|
|
19323
|
-
|
|
19324
|
-
|
|
19325
|
-
|
|
19326
|
-
/* @__PURE__ */ jsxs("div", { className: listStyles.itemHeader, children: [
|
|
19327
|
-
draggable2 && /* @__PURE__ */ jsx(
|
|
19328
|
-
"div",
|
|
19329
|
-
{
|
|
19330
|
-
className: listStyles.drag,
|
|
19331
|
-
...provided2.dragHandleProps,
|
|
19332
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
19333
|
-
}
|
|
19334
|
-
),
|
|
19335
|
-
item22.level && item22.level > 0 ? /* @__PURE__ */ jsx("div", { className: listStyles.indentIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.INDENT }) }) : null,
|
|
19336
|
-
/* @__PURE__ */ jsx(Label$1, { label: item22.label }),
|
|
19337
|
-
/* @__PURE__ */ jsx(MetaContent, { item: item22 }),
|
|
19338
|
-
/* @__PURE__ */ jsxs("div", { className: listStyles.right, children: [
|
|
19339
|
-
/* @__PURE__ */ jsx(MetaCount, { item: item22 }),
|
|
19340
|
-
!(item22.disabled || disabledContext) && item22.actions && /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: item22.actions }) })
|
|
19341
|
-
] })
|
|
19342
|
-
] }),
|
|
19343
|
-
/* @__PURE__ */ jsx(ItemContent, { item: item22, expanding })
|
|
19344
|
-
] })
|
|
18910
|
+
key: index2,
|
|
18911
|
+
"data-id": index2,
|
|
18912
|
+
title: item2.title,
|
|
18913
|
+
"data-testid": item2.testId
|
|
19345
18914
|
},
|
|
19346
|
-
|
|
19347
|
-
|
|
19348
|
-
|
|
19349
|
-
|
|
19350
|
-
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
}
|
|
19360
|
-
);
|
|
19361
|
-
const ListDroppableWrapper = ({
|
|
19362
|
-
onListReorder,
|
|
19363
|
-
children,
|
|
19364
|
-
list: list2,
|
|
19365
|
-
draggable: draggable2,
|
|
19366
|
-
expanding
|
|
19367
|
-
}) => {
|
|
19368
|
-
if (!draggable2) {
|
|
19369
|
-
return children();
|
|
19370
|
-
}
|
|
19371
|
-
return /* @__PURE__ */ jsx(
|
|
19372
|
-
DragDropContext,
|
|
19373
|
-
{
|
|
19374
|
-
onDragEnd: (result) => {
|
|
19375
|
-
var _a2, _b;
|
|
19376
|
-
const from3 = (_a2 = result == null ? void 0 : result.source) == null ? void 0 : _a2.index;
|
|
19377
|
-
const to2 = (_b = result == null ? void 0 : result.destination) == null ? void 0 : _b.index;
|
|
19378
|
-
onListReorder({ from: from3, to: to2 });
|
|
19379
|
-
},
|
|
19380
|
-
children: /* @__PURE__ */ jsx(
|
|
19381
|
-
ConnectedDroppable,
|
|
19382
|
-
{
|
|
19383
|
-
droppableId: "droppable",
|
|
19384
|
-
mode: "virtual",
|
|
19385
|
-
renderClone: (provided, snapshot, rubric) => {
|
|
19386
|
-
return /* @__PURE__ */ jsx(
|
|
19387
|
-
"div",
|
|
19388
|
-
{
|
|
19389
|
-
...provided.draggableProps,
|
|
19390
|
-
ref: provided.innerRef,
|
|
19391
|
-
style: {
|
|
19392
|
-
height: 36,
|
|
19393
|
-
width: "100%",
|
|
19394
|
-
display: "flex",
|
|
19395
|
-
alignItems: "center"
|
|
19396
|
-
},
|
|
19397
|
-
children: /* @__PURE__ */ jsx(
|
|
19398
|
-
ListRow,
|
|
18915
|
+
/* @__PURE__ */ jsxs(
|
|
18916
|
+
"div",
|
|
18917
|
+
{
|
|
18918
|
+
ref: (el2) => {
|
|
18919
|
+
if (listRowRefs && "current" in listRowRefs && Array.isArray(listRowRefs.current) && index2 !== void 0) {
|
|
18920
|
+
listRowRefs.current[index2] = el2;
|
|
18921
|
+
}
|
|
18922
|
+
},
|
|
18923
|
+
style: { paddingLeft: indent },
|
|
18924
|
+
children: [
|
|
18925
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.itemHeader, children: [
|
|
18926
|
+
draggable2 && /* @__PURE__ */ jsx(
|
|
18927
|
+
"div",
|
|
19399
18928
|
{
|
|
19400
|
-
|
|
19401
|
-
|
|
19402
|
-
|
|
19403
|
-
onListReorder,
|
|
19404
|
-
index: rubric.source.index,
|
|
19405
|
-
provided
|
|
18929
|
+
className: listStyles.drag,
|
|
18930
|
+
...provided2.dragHandleProps,
|
|
18931
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
19406
18932
|
}
|
|
19407
|
-
)
|
|
19408
|
-
|
|
19409
|
-
|
|
19410
|
-
|
|
19411
|
-
|
|
19412
|
-
|
|
19413
|
-
|
|
19414
|
-
|
|
19415
|
-
|
|
19416
|
-
|
|
19417
|
-
|
|
19418
|
-
|
|
19419
|
-
|
|
19420
|
-
const List = ({
|
|
19421
|
-
list: list2,
|
|
19422
|
-
bordered: bordered2 = false,
|
|
19423
|
-
expanding = false,
|
|
19424
|
-
narrow: narrow2 = false,
|
|
19425
|
-
toggleNarrow: toggleNarrow2 = false,
|
|
19426
|
-
onToggleNarrow = () => {
|
|
19427
|
-
},
|
|
19428
|
-
invokeEditOnRowClick = true,
|
|
19429
|
-
noHeader = false,
|
|
19430
|
-
stickyHeader: stickyHeader2,
|
|
19431
|
-
draggable: draggable2 = false,
|
|
19432
|
-
onListReorder = () => {
|
|
19433
|
-
},
|
|
19434
|
-
marginBottom = 0,
|
|
19435
|
-
height: height2,
|
|
19436
|
-
testId,
|
|
19437
|
-
scrollDetails = {
|
|
19438
|
-
scrollable: false,
|
|
19439
|
-
hideScrollbar: false,
|
|
19440
|
-
triggerScrollToActiveItem: false,
|
|
19441
|
-
infiniteScroll: false,
|
|
19442
|
-
limit: 10,
|
|
19443
|
-
infiniteScrollTarget: void 0
|
|
19444
|
-
}
|
|
19445
|
-
}) => {
|
|
19446
|
-
const { scrollable, hideScrollbar: hideScrollbar2, triggerScrollToActiveItem } = scrollDetails;
|
|
19447
|
-
const listContainerRef = useRef(null);
|
|
19448
|
-
const virtualizer = useVirtualizer({
|
|
19449
|
-
count: list2.items.length,
|
|
19450
|
-
getScrollElement: () => listContainerRef.current,
|
|
19451
|
-
estimateSize: () => 37,
|
|
19452
|
-
overscan: 5
|
|
19453
|
-
});
|
|
19454
|
-
useEffect(() => {
|
|
19455
|
-
if (triggerScrollToActiveItem) {
|
|
19456
|
-
const activeItemIndex = list2.items.findIndex(
|
|
19457
|
-
(item2) => item2.active === true
|
|
18933
|
+
),
|
|
18934
|
+
item2.level && item2.level > 0 ? /* @__PURE__ */ jsx("div", { className: listStyles.indentIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.INDENT }) }) : null,
|
|
18935
|
+
/* @__PURE__ */ jsx(Label$1, { label: item2.label }),
|
|
18936
|
+
/* @__PURE__ */ jsx(MetaContent, { item: item2 }),
|
|
18937
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.right, children: [
|
|
18938
|
+
/* @__PURE__ */ jsx(MetaCount, { item: item2 }),
|
|
18939
|
+
!(item2.disabled || disabledContext) && item2.actions && /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: item2.actions }) })
|
|
18940
|
+
] })
|
|
18941
|
+
] }),
|
|
18942
|
+
/* @__PURE__ */ jsx(ItemContent, { item: item2, expanding })
|
|
18943
|
+
]
|
|
18944
|
+
}
|
|
18945
|
+
)
|
|
19458
18946
|
);
|
|
19459
|
-
|
|
19460
|
-
|
|
19461
|
-
|
|
19462
|
-
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
|
|
19466
|
-
|
|
19467
|
-
{
|
|
19468
|
-
ref: dragProvided == null ? void 0 : dragProvided.innerRef,
|
|
19469
|
-
...dragProvided == null ? void 0 : dragProvided.draggableProps,
|
|
19470
|
-
"data-index": virtualRow.index,
|
|
19471
|
-
style: {
|
|
19472
|
-
...dragProvided == null ? void 0 : dragProvided.draggableProps.style,
|
|
19473
|
-
position: "absolute",
|
|
19474
|
-
top: 0,
|
|
19475
|
-
left: 0,
|
|
19476
|
-
width: "100%",
|
|
19477
|
-
height: `${virtualRow.size}px`,
|
|
19478
|
-
transform: `translateY(${virtualRow.start}px)`
|
|
19479
|
-
},
|
|
19480
|
-
children: /* @__PURE__ */ jsx("div", { ref: virtualizer.measureElement, "data-index": virtualRow.index, children: /* @__PURE__ */ jsx(
|
|
19481
|
-
ListRow,
|
|
19482
|
-
{
|
|
19483
|
-
index: virtualRow.index,
|
|
19484
|
-
draggable: draggable2,
|
|
19485
|
-
item: list2.items[virtualRow.index],
|
|
19486
|
-
expanding,
|
|
19487
|
-
invokeEditOnRowClick,
|
|
19488
|
-
onListReorder,
|
|
19489
|
-
provided: dragProvided
|
|
18947
|
+
};
|
|
18948
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
18949
|
+
items.map((item2, index2) => {
|
|
18950
|
+
const isSubheading = item2.type === "Heading";
|
|
18951
|
+
const edit2 = item2.actions && item2.actions.find(
|
|
18952
|
+
(a2) => {
|
|
18953
|
+
var _a2;
|
|
18954
|
+
return a2.label && ((_a2 = String(a2.label)) == null ? void 0 : _a2.toLowerCase()) === "edit";
|
|
19490
18955
|
}
|
|
19491
|
-
)
|
|
19492
|
-
|
|
19493
|
-
|
|
19494
|
-
|
|
19495
|
-
|
|
19496
|
-
|
|
19497
|
-
|
|
19498
|
-
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
|
|
19502
|
-
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19506
|
-
|
|
19507
|
-
|
|
19508
|
-
hideScrollbar2 ? listStyles.hideScrollbar : ""
|
|
19509
|
-
),
|
|
19510
|
-
"data-testid": testId,
|
|
19511
|
-
style: { height: height2, marginBottom },
|
|
19512
|
-
ref: listContainerRef,
|
|
19513
|
-
children: [
|
|
19514
|
-
!noHeader && /* @__PURE__ */ jsx(
|
|
19515
|
-
ListHeading,
|
|
19516
|
-
{
|
|
19517
|
-
name: list2.name,
|
|
19518
|
-
actions: list2.actions,
|
|
19519
|
-
toggleNarrow: toggleNarrow2,
|
|
19520
|
-
onToggleNarrow,
|
|
19521
|
-
stickyHeader: stickyHeader2
|
|
19522
|
-
}
|
|
19523
|
-
),
|
|
19524
|
-
/* @__PURE__ */ jsx(
|
|
19525
|
-
ListDroppableWrapper,
|
|
19526
|
-
{
|
|
19527
|
-
onListReorder,
|
|
19528
|
-
list: list2,
|
|
19529
|
-
draggable: draggable2,
|
|
19530
|
-
expanding,
|
|
19531
|
-
children: (provided, snapshot) => {
|
|
19532
|
-
return /* @__PURE__ */ jsx(
|
|
19533
|
-
"div",
|
|
19534
|
-
{
|
|
19535
|
-
className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""),
|
|
19536
|
-
style: {
|
|
19537
|
-
height: `${virtualizer.getTotalSize()}px`
|
|
19538
|
-
},
|
|
19539
|
-
ref: provided == null ? void 0 : provided.innerRef,
|
|
19540
|
-
...provided == null ? void 0 : provided.droppableProps,
|
|
19541
|
-
children: virtualizer.getVirtualItems().map(
|
|
19542
|
-
(virtualRow) => draggable2 ? /* @__PURE__ */ jsx(
|
|
19543
|
-
PublicDraggable,
|
|
19544
|
-
{
|
|
19545
|
-
draggableId: virtualRow.index.toString(),
|
|
19546
|
-
index: virtualRow.index,
|
|
19547
|
-
children: (dragProvided, dragSnapshot) => renderItem(virtualRow, dragProvided)
|
|
19548
|
-
},
|
|
19549
|
-
virtualRow.index
|
|
19550
|
-
) : /* @__PURE__ */ jsx(Fragment$2, { children: renderItem(virtualRow) }, virtualRow.index)
|
|
19551
|
-
)
|
|
19552
|
-
}
|
|
19553
|
-
);
|
|
19554
|
-
}
|
|
19555
|
-
}
|
|
19556
|
-
)
|
|
19557
|
-
]
|
|
19558
|
-
}
|
|
19559
|
-
)
|
|
19560
|
-
}
|
|
19561
|
-
);
|
|
19562
|
-
};
|
|
18956
|
+
);
|
|
18957
|
+
const hasOnClick = !!(edit2 || item2.url || item2.onClick);
|
|
18958
|
+
const indent = item2.level && item2.level > 1 ? (item2.level - 1) * 20 : 0;
|
|
18959
|
+
return isSubheading ? /* @__PURE__ */ jsx(
|
|
18960
|
+
ListSubheading,
|
|
18961
|
+
{
|
|
18962
|
+
ref: listRowRefs,
|
|
18963
|
+
item: item2,
|
|
18964
|
+
index: index2
|
|
18965
|
+
},
|
|
18966
|
+
index2
|
|
18967
|
+
) : draggable2 ? /* @__PURE__ */ jsx(PublicDraggable, { draggableId: item2.id + "", index: index2, children: (provided2) => listElement(index2, provided2, item2, indent, hasOnClick, edit2) }, item2.id) : listElement(index2, provided, item2, indent, hasOnClick, edit2);
|
|
18968
|
+
}),
|
|
18969
|
+
provided.placeholder
|
|
18970
|
+
] });
|
|
18971
|
+
}
|
|
18972
|
+
);
|
|
19563
18973
|
const loader = "_loader_477i5_1";
|
|
19564
18974
|
const fullViewPortSize = "_fullViewPortSize_477i5_7";
|
|
19565
18975
|
const cover = "_cover_477i5_14";
|
|
@@ -19626,6 +19036,178 @@ const Loader = ({
|
|
|
19626
19036
|
}
|
|
19627
19037
|
);
|
|
19628
19038
|
};
|
|
19039
|
+
const List = ({
|
|
19040
|
+
list: list2,
|
|
19041
|
+
bordered: bordered2 = false,
|
|
19042
|
+
expanding = false,
|
|
19043
|
+
narrow: narrow2 = false,
|
|
19044
|
+
toggleNarrow: toggleNarrow2 = false,
|
|
19045
|
+
onToggleNarrow = () => {
|
|
19046
|
+
},
|
|
19047
|
+
invokeEditOnRowClick = true,
|
|
19048
|
+
noHeader = false,
|
|
19049
|
+
stickyHeader: stickyHeader2,
|
|
19050
|
+
draggable: draggable2 = false,
|
|
19051
|
+
onListReorder = () => {
|
|
19052
|
+
},
|
|
19053
|
+
marginBottom = 0,
|
|
19054
|
+
height: height2,
|
|
19055
|
+
testId,
|
|
19056
|
+
scrollDetails = {
|
|
19057
|
+
scrollable: false,
|
|
19058
|
+
hideScrollbar: false,
|
|
19059
|
+
triggerScrollToActiveItem: false,
|
|
19060
|
+
infiniteScroll: false,
|
|
19061
|
+
limit: 10,
|
|
19062
|
+
infiniteScrollTarget: void 0
|
|
19063
|
+
}
|
|
19064
|
+
}) => {
|
|
19065
|
+
const {
|
|
19066
|
+
scrollable,
|
|
19067
|
+
hideScrollbar: hideScrollbar2,
|
|
19068
|
+
triggerScrollToActiveItem,
|
|
19069
|
+
infiniteScroll,
|
|
19070
|
+
infiniteScrollTarget
|
|
19071
|
+
} = scrollDetails;
|
|
19072
|
+
const listHeadingRef = useRef(null);
|
|
19073
|
+
const listRowRefs = useRef([]);
|
|
19074
|
+
const listContainerRef = useRef(null);
|
|
19075
|
+
const MIN_ITEM_HEIGHT = 44;
|
|
19076
|
+
const pageSize = infiniteScroll ? Math.ceil(window.innerHeight / MIN_ITEM_HEIGHT) : list2.items.length;
|
|
19077
|
+
const [numVisibleRows, setNumVisibleRows] = useState(pageSize);
|
|
19078
|
+
const [hasMore, setHasMore] = useState(numVisibleRows < (list2 == null ? void 0 : list2.items.length));
|
|
19079
|
+
useEffect(() => {
|
|
19080
|
+
listRowRefs.current = listRowRefs.current.slice(0, list2.items.length);
|
|
19081
|
+
}, [list2.items.length]);
|
|
19082
|
+
const loadMoreItems = () => {
|
|
19083
|
+
if (numVisibleRows >= list2.items.length) {
|
|
19084
|
+
setHasMore(false);
|
|
19085
|
+
return;
|
|
19086
|
+
}
|
|
19087
|
+
const newVisibleRows = pageSize + numVisibleRows;
|
|
19088
|
+
setNumVisibleRows(newVisibleRows);
|
|
19089
|
+
};
|
|
19090
|
+
const findFirstActiveItemIndex = (items) => items.findIndex((item2) => item2.active === true);
|
|
19091
|
+
const setScrollToActiveItem = (activeItemIndex) => {
|
|
19092
|
+
if (!listContainerRef.current || !listHeadingRef.current) return;
|
|
19093
|
+
const itemBorderLength = 1;
|
|
19094
|
+
if (triggerScrollToActiveItem && activeItemIndex >= 0) {
|
|
19095
|
+
const itemOffsets = listRowRefs.current.reduce((acc, val, index2) => {
|
|
19096
|
+
if (index2 < activeItemIndex) {
|
|
19097
|
+
return acc + val.clientHeight + itemBorderLength;
|
|
19098
|
+
}
|
|
19099
|
+
return acc;
|
|
19100
|
+
}, 0);
|
|
19101
|
+
const centerOffset = listContainerRef.current.clientHeight / 2 - listRowRefs.current[activeItemIndex].clientHeight / 2;
|
|
19102
|
+
const scrollOffset = itemOffsets - centerOffset;
|
|
19103
|
+
if (stickyHeader2) {
|
|
19104
|
+
const headingOffset2 = listHeadingRef.current.clientHeight / 2;
|
|
19105
|
+
listContainerRef.current.scrollTop = scrollOffset + headingOffset2;
|
|
19106
|
+
}
|
|
19107
|
+
const headingOffset = listHeadingRef.current.clientHeight;
|
|
19108
|
+
listContainerRef.current.scrollTop = scrollOffset + headingOffset;
|
|
19109
|
+
}
|
|
19110
|
+
};
|
|
19111
|
+
useEffect(() => {
|
|
19112
|
+
if (triggerScrollToActiveItem) {
|
|
19113
|
+
const activeItemIndex = findFirstActiveItemIndex(list2 == null ? void 0 : list2.items);
|
|
19114
|
+
setScrollToActiveItem(activeItemIndex);
|
|
19115
|
+
}
|
|
19116
|
+
}, [
|
|
19117
|
+
listContainerRef.current,
|
|
19118
|
+
listHeadingRef.current,
|
|
19119
|
+
triggerScrollToActiveItem
|
|
19120
|
+
]);
|
|
19121
|
+
return /* @__PURE__ */ jsx(
|
|
19122
|
+
DragDropContext,
|
|
19123
|
+
{
|
|
19124
|
+
onDragEnd: (result) => {
|
|
19125
|
+
var _a2, _b;
|
|
19126
|
+
const from3 = (_a2 = result == null ? void 0 : result.source) == null ? void 0 : _a2.index;
|
|
19127
|
+
const to2 = (_b = result == null ? void 0 : result.destination) == null ? void 0 : _b.index;
|
|
19128
|
+
onListReorder({ from: from3, to: to2 });
|
|
19129
|
+
},
|
|
19130
|
+
children: /* @__PURE__ */ jsx(ConnectedDroppable, { droppableId: "droppable", children: (provided, snapshot) => {
|
|
19131
|
+
return /* @__PURE__ */ jsx(
|
|
19132
|
+
"div",
|
|
19133
|
+
{
|
|
19134
|
+
className: cx$2(
|
|
19135
|
+
narrow2 ? listStyles.narrow : "",
|
|
19136
|
+
scrollable ? listStyles.scrollableList : "",
|
|
19137
|
+
hideScrollbar2 ? listStyles.hideScrollbar : ""
|
|
19138
|
+
),
|
|
19139
|
+
"data-testid": testId,
|
|
19140
|
+
id: "scrollableDiv",
|
|
19141
|
+
style: { height: height2, marginBottom },
|
|
19142
|
+
ref: listContainerRef,
|
|
19143
|
+
children: /* @__PURE__ */ jsx(
|
|
19144
|
+
"div",
|
|
19145
|
+
{
|
|
19146
|
+
ref: provided.innerRef,
|
|
19147
|
+
...provided.droppableProps,
|
|
19148
|
+
children: /* @__PURE__ */ jsxs(Card, { bordered: bordered2, padding: false, children: [
|
|
19149
|
+
!noHeader && /* @__PURE__ */ jsx(
|
|
19150
|
+
ListHeading,
|
|
19151
|
+
{
|
|
19152
|
+
name: list2.name,
|
|
19153
|
+
actions: list2.actions,
|
|
19154
|
+
toggleNarrow: toggleNarrow2,
|
|
19155
|
+
onToggleNarrow,
|
|
19156
|
+
stickyHeader: stickyHeader2,
|
|
19157
|
+
ref: listHeadingRef
|
|
19158
|
+
}
|
|
19159
|
+
),
|
|
19160
|
+
/* @__PURE__ */ jsx(
|
|
19161
|
+
"div",
|
|
19162
|
+
{
|
|
19163
|
+
className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""),
|
|
19164
|
+
children: infiniteScroll ? /* @__PURE__ */ jsx(
|
|
19165
|
+
InfiniteScroll,
|
|
19166
|
+
{
|
|
19167
|
+
dataLength: numVisibleRows,
|
|
19168
|
+
next: loadMoreItems,
|
|
19169
|
+
hasMore,
|
|
19170
|
+
scrollableTarget: infiniteScrollTarget || "scrollableDiv",
|
|
19171
|
+
loader: /* @__PURE__ */ jsx(Loader, {}),
|
|
19172
|
+
className: listStyles.infiniteScrollContainer,
|
|
19173
|
+
children: /* @__PURE__ */ jsx(
|
|
19174
|
+
ListRow,
|
|
19175
|
+
{
|
|
19176
|
+
draggable: draggable2,
|
|
19177
|
+
items: list2.items.slice(0, numVisibleRows),
|
|
19178
|
+
expanding,
|
|
19179
|
+
invokeEditOnRowClick,
|
|
19180
|
+
onListReorder,
|
|
19181
|
+
provided,
|
|
19182
|
+
snapshot,
|
|
19183
|
+
ref: listRowRefs
|
|
19184
|
+
}
|
|
19185
|
+
)
|
|
19186
|
+
}
|
|
19187
|
+
) : /* @__PURE__ */ jsx(
|
|
19188
|
+
ListRow,
|
|
19189
|
+
{
|
|
19190
|
+
draggable: draggable2,
|
|
19191
|
+
items: list2.items,
|
|
19192
|
+
expanding,
|
|
19193
|
+
invokeEditOnRowClick,
|
|
19194
|
+
onListReorder,
|
|
19195
|
+
provided,
|
|
19196
|
+
snapshot,
|
|
19197
|
+
ref: listRowRefs
|
|
19198
|
+
}
|
|
19199
|
+
)
|
|
19200
|
+
}
|
|
19201
|
+
)
|
|
19202
|
+
] })
|
|
19203
|
+
}
|
|
19204
|
+
)
|
|
19205
|
+
}
|
|
19206
|
+
);
|
|
19207
|
+
} })
|
|
19208
|
+
}
|
|
19209
|
+
);
|
|
19210
|
+
};
|
|
19629
19211
|
const inputInTable$7 = "_inputInTable_1okhq_1";
|
|
19630
19212
|
const inputHover$7 = "_inputHover_1okhq_13";
|
|
19631
19213
|
const inputFocus$7 = "_inputFocus_1okhq_18";
|
|
@@ -20385,7 +19967,7 @@ const useFontsReady = () => {
|
|
|
20385
19967
|
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
20386
19968
|
const useWindowWidth = () => {
|
|
20387
19969
|
const [width2, setWidth] = useState(getWidth());
|
|
20388
|
-
const resizeListener = debounce$
|
|
19970
|
+
const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
|
|
20389
19971
|
useEffect(() => {
|
|
20390
19972
|
window.addEventListener("resize", resizeListener);
|
|
20391
19973
|
return () => {
|
|
@@ -21614,43 +21196,48 @@ const useCustomSelectLogic = ({
|
|
|
21614
21196
|
setTriggerFocus();
|
|
21615
21197
|
};
|
|
21616
21198
|
const openLayer = () => dispatch({ type: ActionTypes.OPEN_LAYER });
|
|
21617
|
-
const isFirstRun = useRef(true);
|
|
21618
|
-
useEffect(() => {
|
|
21619
|
-
if (isFirstRun.current) {
|
|
21620
|
-
isFirstRun.current = false;
|
|
21621
|
-
} else {
|
|
21622
|
-
dispatch({ type: ActionTypes.SET_VISIBLE_OPTIONS, options });
|
|
21623
|
-
}
|
|
21624
|
-
}, [options]);
|
|
21625
21199
|
const onSelectOption = (evt, option2, close2) => {
|
|
21626
21200
|
if (!(disabled2 || disabledContext)) {
|
|
21201
|
+
console.log(1);
|
|
21627
21202
|
if (close2) {
|
|
21203
|
+
console.log(2);
|
|
21628
21204
|
close2();
|
|
21629
21205
|
}
|
|
21630
21206
|
if (option2) {
|
|
21207
|
+
console.log(3);
|
|
21631
21208
|
if (option2.createAble && onCreate) {
|
|
21209
|
+
console.log(4);
|
|
21632
21210
|
onCreate(option2.value);
|
|
21633
21211
|
} else {
|
|
21212
|
+
console.log(5);
|
|
21634
21213
|
if (!option2.disabled) {
|
|
21214
|
+
console.log(6);
|
|
21635
21215
|
if (Array.isArray(selectedOptions)) {
|
|
21216
|
+
console.log(7);
|
|
21636
21217
|
const alreadySelected = selectedOptions.some(
|
|
21637
21218
|
(selectedOption) => selectedOption.label === option2.label
|
|
21638
21219
|
);
|
|
21639
21220
|
if (!alreadySelected) {
|
|
21221
|
+
console.log(8);
|
|
21640
21222
|
const newSelectedOptions = [...selectedOptions, option2];
|
|
21641
21223
|
if (onChange) {
|
|
21224
|
+
console.log(9);
|
|
21642
21225
|
onChange(evt, newSelectedOptions);
|
|
21643
21226
|
}
|
|
21644
21227
|
} else {
|
|
21228
|
+
console.log(10);
|
|
21645
21229
|
const newSelectedOptions = selectedOptions.filter(
|
|
21646
21230
|
(opt) => opt.label !== option2.label
|
|
21647
21231
|
);
|
|
21648
21232
|
if (onChange) {
|
|
21233
|
+
console.log(11);
|
|
21649
21234
|
onChange(evt, newSelectedOptions);
|
|
21650
21235
|
}
|
|
21651
21236
|
}
|
|
21652
21237
|
} else {
|
|
21238
|
+
console.log(12);
|
|
21653
21239
|
if (onChange) {
|
|
21240
|
+
console.log(14);
|
|
21654
21241
|
onChange(evt, option2);
|
|
21655
21242
|
}
|
|
21656
21243
|
}
|
|
@@ -53073,7 +52660,7 @@ const styles$d = {
|
|
|
53073
52660
|
active: active$2,
|
|
53074
52661
|
icon: icon$1
|
|
53075
52662
|
};
|
|
53076
|
-
const TooltipIcon = memo
|
|
52663
|
+
const TooltipIcon = memo(
|
|
53077
52664
|
({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
|
|
53078
52665
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
53079
52666
|
/* @__PURE__ */ jsx(
|
|
@@ -53148,7 +52735,7 @@ const Sections = ({
|
|
|
53148
52735
|
)
|
|
53149
52736
|
] }, i)) });
|
|
53150
52737
|
};
|
|
53151
|
-
const SideBar = memo
|
|
52738
|
+
const SideBar = memo(
|
|
53152
52739
|
({
|
|
53153
52740
|
options,
|
|
53154
52741
|
startOpen = false,
|
|
@@ -55745,18 +55332,18 @@ const Spacer = ({
|
|
|
55745
55332
|
}
|
|
55746
55333
|
}
|
|
55747
55334
|
);
|
|
55748
|
-
const inputInTable$2 = "
|
|
55749
|
-
const inputHover$2 = "
|
|
55750
|
-
const inputFocus$2 = "
|
|
55751
|
-
const inputError$2 = "
|
|
55752
|
-
const inputWarning$2 = "
|
|
55753
|
-
const inputDisabled$2 = "
|
|
55754
|
-
const hideScrollbars$2 = "
|
|
55755
|
-
const wrapper = "
|
|
55756
|
-
const bordered = "
|
|
55757
|
-
const scroll2 = "
|
|
55758
|
-
const table = "
|
|
55759
|
-
const striped = "
|
|
55335
|
+
const inputInTable$2 = "_inputInTable_1dg3w_1";
|
|
55336
|
+
const inputHover$2 = "_inputHover_1dg3w_13";
|
|
55337
|
+
const inputFocus$2 = "_inputFocus_1dg3w_18";
|
|
55338
|
+
const inputError$2 = "_inputError_1dg3w_25";
|
|
55339
|
+
const inputWarning$2 = "_inputWarning_1dg3w_26";
|
|
55340
|
+
const inputDisabled$2 = "_inputDisabled_1dg3w_61";
|
|
55341
|
+
const hideScrollbars$2 = "_hideScrollbars_1dg3w_67";
|
|
55342
|
+
const wrapper = "_wrapper_1dg3w_85";
|
|
55343
|
+
const bordered = "_bordered_1dg3w_93";
|
|
55344
|
+
const scroll2 = "_scroll_1dg3w_98";
|
|
55345
|
+
const table = "_table_1dg3w_108";
|
|
55346
|
+
const striped = "_striped_1dg3w_188";
|
|
55760
55347
|
const styles$b = {
|
|
55761
55348
|
inputInTable: inputInTable$2,
|
|
55762
55349
|
inputHover: inputHover$2,
|
|
@@ -55855,24 +55442,33 @@ const hasRowActions = (rows, headers) => {
|
|
|
55855
55442
|
};
|
|
55856
55443
|
const TableScrollWrapper = ({
|
|
55857
55444
|
table: table2,
|
|
55858
|
-
children
|
|
55859
|
-
headerRef
|
|
55445
|
+
children
|
|
55860
55446
|
}) => {
|
|
55861
|
-
var _a2;
|
|
55862
55447
|
const { rows, infiniteScroll } = table2;
|
|
55863
|
-
const
|
|
55864
|
-
const
|
|
55865
|
-
|
|
55866
|
-
|
|
55867
|
-
|
|
55868
|
-
|
|
55869
|
-
|
|
55870
|
-
|
|
55871
|
-
|
|
55872
|
-
|
|
55873
|
-
|
|
55874
|
-
|
|
55875
|
-
|
|
55448
|
+
const pageSize = Math.ceil(window.innerHeight / 30);
|
|
55449
|
+
const [visibleRows, setVisibleRows] = infiniteScroll ? useState(pageSize) : [rows.length, null];
|
|
55450
|
+
const [hasMore, setHasMore] = infiniteScroll ? useState(visibleRows < rows.length) : [false, null];
|
|
55451
|
+
const loadMoreItems = () => {
|
|
55452
|
+
if (visibleRows >= rows.length && setHasMore) {
|
|
55453
|
+
setHasMore(false);
|
|
55454
|
+
return;
|
|
55455
|
+
}
|
|
55456
|
+
if (setVisibleRows) {
|
|
55457
|
+
setVisibleRows(visibleRows + pageSize);
|
|
55458
|
+
}
|
|
55459
|
+
};
|
|
55460
|
+
return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: infiniteScroll ? /* @__PURE__ */ jsx(
|
|
55461
|
+
InfiniteScroll,
|
|
55462
|
+
{
|
|
55463
|
+
dataLength: Math.min(rows.length, visibleRows + pageSize),
|
|
55464
|
+
next: loadMoreItems,
|
|
55465
|
+
hasMore,
|
|
55466
|
+
scrollableTarget: "scrollWrapper",
|
|
55467
|
+
style: { overflow: "initial" },
|
|
55468
|
+
loader: null,
|
|
55469
|
+
children: children({ visibleRows })
|
|
55470
|
+
}
|
|
55471
|
+
) : children({ visibleRows }) });
|
|
55876
55472
|
};
|
|
55877
55473
|
const clickableRow = "_clickableRow_m64j5_1";
|
|
55878
55474
|
const hoverableRow = "_hoverableRow_m64j5_4";
|
|
@@ -56583,11 +56179,9 @@ const Row = ({
|
|
|
56583
56179
|
provided = null,
|
|
56584
56180
|
width: width2,
|
|
56585
56181
|
columnWidths,
|
|
56586
|
-
style: style2,
|
|
56587
56182
|
testId
|
|
56588
56183
|
//TODO: add testId
|
|
56589
56184
|
}) => {
|
|
56590
|
-
var _a2;
|
|
56591
56185
|
const targetRef = useRef(null);
|
|
56592
56186
|
const columnHeaderAlignment = getHeaderAlignment(
|
|
56593
56187
|
columnHeaderAlignments,
|
|
@@ -56631,8 +56225,7 @@ const Row = ({
|
|
|
56631
56225
|
},
|
|
56632
56226
|
columnCount
|
|
56633
56227
|
);
|
|
56634
|
-
const
|
|
56635
|
-
if (!snapshot || !provided) return null;
|
|
56228
|
+
const getItemStyle2 = (isDragging, draggableStyle) => {
|
|
56636
56229
|
return {
|
|
56637
56230
|
minWidth: isDragging && `${width2}px`,
|
|
56638
56231
|
width: isDragging && "100%",
|
|
@@ -56648,7 +56241,7 @@ const Row = ({
|
|
|
56648
56241
|
if (row2.noDrag) {
|
|
56649
56242
|
return /* @__PURE__ */ jsx("td", { "aria-labelledby": "unique-label-id" });
|
|
56650
56243
|
}
|
|
56651
|
-
return /* @__PURE__ */ jsx("td", { className: styles$8.dragIconCell, children: /* @__PURE__ */ jsx("div", { ...provided
|
|
56244
|
+
return /* @__PURE__ */ jsx("td", { className: styles$8.dragIconCell, children: /* @__PURE__ */ jsx("div", { ...provided.dragHandleProps, className: styles$8.dragIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG }) }) });
|
|
56652
56245
|
};
|
|
56653
56246
|
return isHeader ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
56654
56247
|
/* @__PURE__ */ jsxs(
|
|
@@ -56700,13 +56293,7 @@ const Row = ({
|
|
|
56700
56293
|
"data-warning": warning2 || null,
|
|
56701
56294
|
ref: (provided == null ? void 0 : provided.innerRef) || null,
|
|
56702
56295
|
...(provided == null ? void 0 : provided.draggableProps) || null,
|
|
56703
|
-
style:
|
|
56704
|
-
...style2,
|
|
56705
|
-
...getDraggingStyle2(
|
|
56706
|
-
snapshot == null ? void 0 : snapshot.isDragging,
|
|
56707
|
-
(_a2 = provided == null ? void 0 : provided.draggableProps) == null ? void 0 : _a2.style
|
|
56708
|
-
)
|
|
56709
|
-
},
|
|
56296
|
+
style: snapshot && provided ? getItemStyle2(snapshot.isDragging, provided.draggableProps.style) : null,
|
|
56710
56297
|
children: [
|
|
56711
56298
|
draggableTable ? getDragItem() : null,
|
|
56712
56299
|
cells,
|
|
@@ -56748,8 +56335,16 @@ const Table = (props) => {
|
|
|
56748
56335
|
maxHeight,
|
|
56749
56336
|
fixedWidth: width2
|
|
56750
56337
|
} = propTable;
|
|
56751
|
-
useRef(null);
|
|
56752
|
-
const
|
|
56338
|
+
const targetRef = useRef(null);
|
|
56339
|
+
const [dimensions, setDimensions] = useState({ width: 0, height: 0 });
|
|
56340
|
+
useEffect(() => {
|
|
56341
|
+
if (targetRef.current) {
|
|
56342
|
+
setDimensions({
|
|
56343
|
+
width: targetRef.current.offsetWidth,
|
|
56344
|
+
height: targetRef.current.offsetHeight
|
|
56345
|
+
});
|
|
56346
|
+
}
|
|
56347
|
+
}, []);
|
|
56753
56348
|
const headers = get$2(props, "table.headers", []);
|
|
56754
56349
|
const columnCount = getColumnCount(propRows, headers);
|
|
56755
56350
|
const rowActions = hasRowActions(propRows, headers);
|
|
@@ -56800,7 +56395,7 @@ const Table = (props) => {
|
|
|
56800
56395
|
// Collapse width if width = auto
|
|
56801
56396
|
display: width2 === "auto" ? "inline-flex" : "flex"
|
|
56802
56397
|
};
|
|
56803
|
-
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, style: wrapperStyles, children: [
|
|
56398
|
+
return draggable2 ? /* @__PURE__ */ jsxs("div", { ref: targetRef, className: wrapperClass, style: wrapperStyles, children: [
|
|
56804
56399
|
/* @__PURE__ */ jsx(
|
|
56805
56400
|
Title$1,
|
|
56806
56401
|
{
|
|
@@ -56821,96 +56416,40 @@ const Table = (props) => {
|
|
|
56821
56416
|
onListReorder({ from: from3, to: to2 });
|
|
56822
56417
|
}
|
|
56823
56418
|
},
|
|
56824
|
-
children: /* @__PURE__ */ jsx(
|
|
56825
|
-
|
|
56826
|
-
|
|
56827
|
-
|
|
56828
|
-
|
|
56829
|
-
|
|
56830
|
-
|
|
56831
|
-
|
|
56832
|
-
{
|
|
56833
|
-
|
|
56834
|
-
|
|
56835
|
-
|
|
56836
|
-
|
|
56837
|
-
|
|
56838
|
-
|
|
56839
|
-
|
|
56840
|
-
|
|
56841
|
-
|
|
56842
|
-
|
|
56843
|
-
|
|
56844
|
-
|
|
56845
|
-
|
|
56846
|
-
|
|
56847
|
-
|
|
56848
|
-
|
|
56849
|
-
|
|
56850
|
-
|
|
56851
|
-
|
|
56852
|
-
|
|
56853
|
-
|
|
56854
|
-
|
|
56855
|
-
|
|
56856
|
-
|
|
56857
|
-
|
|
56858
|
-
style: {
|
|
56859
|
-
position: "relative",
|
|
56860
|
-
transition: "transform 0.2s",
|
|
56861
|
-
transform: !isScrolling ? `translateY(${scrollOffset}px)` : "translateY(0px)"
|
|
56862
|
-
},
|
|
56863
|
-
children: headers.map((row2, rowIndex) => {
|
|
56864
|
-
return /* @__PURE__ */ jsx(
|
|
56865
|
-
Row,
|
|
56866
|
-
{
|
|
56867
|
-
rowIndex,
|
|
56868
|
-
isHeader: true,
|
|
56869
|
-
row: row2,
|
|
56870
|
-
columnCount,
|
|
56871
|
-
columnWidths,
|
|
56872
|
-
colSpan,
|
|
56873
|
-
hasRowActions: rowActions,
|
|
56874
|
-
columnAlignment,
|
|
56875
|
-
columnHeaderAlignments,
|
|
56876
|
-
draggableTable: draggable2
|
|
56877
|
-
},
|
|
56878
|
-
`0_${rowIndex}`
|
|
56879
|
-
);
|
|
56880
|
-
})
|
|
56881
|
-
}
|
|
56882
|
-
),
|
|
56883
|
-
/* @__PURE__ */ jsx("tbody", { children: virtualItems.map((virtualRow, rowIndex) => {
|
|
56884
|
-
const row2 = rows[virtualRow.index];
|
|
56885
|
-
return draggable2 ? /* @__PURE__ */ jsx(
|
|
56886
|
-
PublicDraggable,
|
|
56887
|
-
{
|
|
56888
|
-
draggableId: rowIndex + "",
|
|
56889
|
-
index: rowIndex,
|
|
56890
|
-
isDragDisabled: row2.noDrag,
|
|
56891
|
-
children: (provided2, snapshot) => /* @__PURE__ */ jsx(
|
|
56892
|
-
Row,
|
|
56893
|
-
{
|
|
56894
|
-
rowIndex,
|
|
56895
|
-
row: row2,
|
|
56896
|
-
columnCount,
|
|
56897
|
-
columnWidths,
|
|
56898
|
-
colSpan,
|
|
56899
|
-
hasRowActions: rowActions,
|
|
56900
|
-
columnAlignment,
|
|
56901
|
-
style: {
|
|
56902
|
-
height: `${virtualRow.size}px`,
|
|
56903
|
-
transform: `translateY(${virtualRow.start - rowIndex * virtualRow.size}px)`
|
|
56904
|
-
},
|
|
56905
|
-
provided: provided2,
|
|
56906
|
-
snapshot,
|
|
56907
|
-
draggableTable: draggable2
|
|
56908
|
-
},
|
|
56909
|
-
`1_${rowIndex}`
|
|
56910
|
-
)
|
|
56911
|
-
},
|
|
56912
|
-
`index_${rowIndex}`
|
|
56913
|
-
) : /* @__PURE__ */ jsx(
|
|
56419
|
+
children: /* @__PURE__ */ jsx(ConnectedDroppable, { droppableId: "droppable", children: (provided) => {
|
|
56420
|
+
return /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, children: ({ visibleRows }) => /* @__PURE__ */ jsxs(
|
|
56421
|
+
"table",
|
|
56422
|
+
{
|
|
56423
|
+
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
56424
|
+
"data-testid": testId,
|
|
56425
|
+
ref: provided.innerRef,
|
|
56426
|
+
children: [
|
|
56427
|
+
/* @__PURE__ */ jsx("thead", { children: headers.map((row2, rowIndex) => {
|
|
56428
|
+
return /* @__PURE__ */ jsx(
|
|
56429
|
+
Row,
|
|
56430
|
+
{
|
|
56431
|
+
rowIndex,
|
|
56432
|
+
isHeader: true,
|
|
56433
|
+
row: row2,
|
|
56434
|
+
columnCount,
|
|
56435
|
+
columnWidths,
|
|
56436
|
+
colSpan,
|
|
56437
|
+
hasRowActions: rowActions,
|
|
56438
|
+
columnAlignment,
|
|
56439
|
+
columnHeaderAlignments,
|
|
56440
|
+
draggableTable: draggable2
|
|
56441
|
+
},
|
|
56442
|
+
`0_${rowIndex}`
|
|
56443
|
+
);
|
|
56444
|
+
}) }),
|
|
56445
|
+
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
56446
|
+
rows.slice(0, visibleRows).map((row2, rowIndex) => /* @__PURE__ */ jsx(
|
|
56447
|
+
PublicDraggable,
|
|
56448
|
+
{
|
|
56449
|
+
draggableId: rowIndex + "",
|
|
56450
|
+
index: rowIndex,
|
|
56451
|
+
isDragDisabled: row2.noDrag,
|
|
56452
|
+
children: (provided2, snapshot) => /* @__PURE__ */ jsx(
|
|
56914
56453
|
Row,
|
|
56915
56454
|
{
|
|
56916
56455
|
rowIndex,
|
|
@@ -56920,22 +56459,81 @@ const Table = (props) => {
|
|
|
56920
56459
|
colSpan,
|
|
56921
56460
|
hasRowActions: rowActions,
|
|
56922
56461
|
columnAlignment,
|
|
56923
|
-
|
|
56924
|
-
|
|
56925
|
-
|
|
56926
|
-
|
|
56462
|
+
provided: provided2,
|
|
56463
|
+
snapshot,
|
|
56464
|
+
draggableTable: draggable2,
|
|
56465
|
+
width: dimensions.width
|
|
56927
56466
|
},
|
|
56928
56467
|
`1_${rowIndex}`
|
|
56929
|
-
)
|
|
56930
|
-
}
|
|
56931
|
-
|
|
56932
|
-
|
|
56933
|
-
|
|
56468
|
+
)
|
|
56469
|
+
},
|
|
56470
|
+
`index_${rowIndex}`
|
|
56471
|
+
)),
|
|
56472
|
+
provided.placeholder
|
|
56473
|
+
] })
|
|
56474
|
+
]
|
|
56934
56475
|
}
|
|
56935
|
-
}
|
|
56936
|
-
)
|
|
56476
|
+
) });
|
|
56477
|
+
} })
|
|
56937
56478
|
}
|
|
56938
56479
|
),
|
|
56480
|
+
footer2 && /* @__PURE__ */ jsx(
|
|
56481
|
+
Footer,
|
|
56482
|
+
{
|
|
56483
|
+
pagination: footer2.pagination,
|
|
56484
|
+
actions: footer2.actions,
|
|
56485
|
+
content: footer2.content
|
|
56486
|
+
}
|
|
56487
|
+
)
|
|
56488
|
+
] }) : /* @__PURE__ */ jsxs("div", { className: wrapperClass, style: wrapperStyles, children: [
|
|
56489
|
+
/* @__PURE__ */ jsx(
|
|
56490
|
+
Title$1,
|
|
56491
|
+
{
|
|
56492
|
+
actions: actions2,
|
|
56493
|
+
actionsRight,
|
|
56494
|
+
name: name2,
|
|
56495
|
+
testId: testId && `${testId}-title`
|
|
56496
|
+
}
|
|
56497
|
+
),
|
|
56498
|
+
/* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, children: ({ visibleRows }) => /* @__PURE__ */ jsxs(
|
|
56499
|
+
"table",
|
|
56500
|
+
{
|
|
56501
|
+
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
56502
|
+
"data-testid": testId,
|
|
56503
|
+
children: [
|
|
56504
|
+
/* @__PURE__ */ jsx("thead", { children: headers.map((row2, rowIndex) => {
|
|
56505
|
+
return /* @__PURE__ */ jsx(
|
|
56506
|
+
Row,
|
|
56507
|
+
{
|
|
56508
|
+
rowIndex,
|
|
56509
|
+
isHeader: true,
|
|
56510
|
+
row: row2,
|
|
56511
|
+
columnCount,
|
|
56512
|
+
columnWidths,
|
|
56513
|
+
colSpan,
|
|
56514
|
+
hasRowActions: rowActions,
|
|
56515
|
+
columnAlignment,
|
|
56516
|
+
columnHeaderAlignments
|
|
56517
|
+
},
|
|
56518
|
+
`0_${rowIndex}`
|
|
56519
|
+
);
|
|
56520
|
+
}) }),
|
|
56521
|
+
/* @__PURE__ */ jsx("tbody", { children: rows.slice(0, visibleRows).map((row2, rowIndex) => /* @__PURE__ */ jsx(
|
|
56522
|
+
Row,
|
|
56523
|
+
{
|
|
56524
|
+
rowIndex,
|
|
56525
|
+
row: row2,
|
|
56526
|
+
columnCount,
|
|
56527
|
+
columnWidths,
|
|
56528
|
+
colSpan,
|
|
56529
|
+
hasRowActions: rowActions,
|
|
56530
|
+
columnAlignment
|
|
56531
|
+
},
|
|
56532
|
+
`1_${rowIndex}`
|
|
56533
|
+
)) })
|
|
56534
|
+
]
|
|
56535
|
+
}
|
|
56536
|
+
) }),
|
|
56939
56537
|
footer2 && /* @__PURE__ */ jsx(
|
|
56940
56538
|
Footer,
|
|
56941
56539
|
{
|
|
@@ -59849,7 +59447,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
59849
59447
|
}
|
|
59850
59448
|
let refCount = 0;
|
|
59851
59449
|
const INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
59852
|
-
var DndProvider = /* @__PURE__ */ memo
|
|
59450
|
+
var DndProvider = /* @__PURE__ */ memo(function DndProvider2(_param) {
|
|
59853
59451
|
var { children } = _param, props = _objectWithoutProperties(_param, [
|
|
59854
59452
|
"children"
|
|
59855
59453
|
]);
|
|
@@ -62210,7 +61808,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
|
|
|
62210
61808
|
var name_1 = featureNames[i];
|
|
62211
61809
|
var _a2 = featureDefinitions[name_1], isEnabled = _a2.isEnabled, Component2 = _a2.Component;
|
|
62212
61810
|
if (isEnabled(props) && Component2) {
|
|
62213
|
-
features.push(React$4.createElement(Component2, __assign$
|
|
61811
|
+
features.push(React$4.createElement(Component2, __assign$4({ key: name_1 }, props, { visualElement: visualElement2 })));
|
|
62214
61812
|
}
|
|
62215
61813
|
}
|
|
62216
61814
|
return features;
|
|
@@ -62451,7 +62049,7 @@ function useProjection(projectionId, _a2, visualElement2, ProjectionNodeConstruc
|
|
|
62451
62049
|
var VisualElementHandler = (
|
|
62452
62050
|
/** @class */
|
|
62453
62051
|
function(_super) {
|
|
62454
|
-
__extends(VisualElementHandler2, _super);
|
|
62052
|
+
__extends$1(VisualElementHandler2, _super);
|
|
62455
62053
|
function VisualElementHandler2() {
|
|
62456
62054
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62457
62055
|
}
|
|
@@ -62477,20 +62075,20 @@ function createMotionComponent(_a2) {
|
|
|
62477
62075
|
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
62478
62076
|
function MotionComponent(props, externalRef) {
|
|
62479
62077
|
var layoutId = useLayoutId(props);
|
|
62480
|
-
props = __assign$
|
|
62078
|
+
props = __assign$4(__assign$4({}, props), { layoutId });
|
|
62481
62079
|
var config2 = useContext(MotionConfigContext);
|
|
62482
62080
|
var features = null;
|
|
62483
62081
|
var context2 = useCreateMotionContext(props);
|
|
62484
62082
|
var projectionId = config2.isStatic ? void 0 : useProjectionId();
|
|
62485
62083
|
var visualState = useVisualState(props, config2.isStatic);
|
|
62486
62084
|
if (!config2.isStatic && isBrowser) {
|
|
62487
|
-
context2.visualElement = useVisualElement(Component2, visualState, __assign$
|
|
62085
|
+
context2.visualElement = useVisualElement(Component2, visualState, __assign$4(__assign$4({}, config2), props), createVisualElement);
|
|
62488
62086
|
useProjection(projectionId, props, context2.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
|
|
62489
62087
|
features = useFeatures(props, context2.visualElement, preloadedFeatures);
|
|
62490
62088
|
}
|
|
62491
62089
|
return React$4.createElement(
|
|
62492
62090
|
VisualElementHandler,
|
|
62493
|
-
{ visualElement: context2.visualElement, props: __assign$
|
|
62091
|
+
{ visualElement: context2.visualElement, props: __assign$4(__assign$4({}, config2), props) },
|
|
62494
62092
|
features,
|
|
62495
62093
|
React$4.createElement(MotionContext.Provider, { value: context2 }, useRender(Component2, props, projectionId, useMotionRef(visualState, context2.visualElement, externalRef), visualState, config2.isStatic, context2.visualElement))
|
|
62496
62094
|
);
|
|
@@ -62816,7 +62414,7 @@ const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v
|
|
|
62816
62414
|
const functions = v2.match(functionRegex);
|
|
62817
62415
|
return functions ? functions.map(applyDefaultFilter).join(" ") : v2;
|
|
62818
62416
|
} });
|
|
62819
|
-
var int = __assign$
|
|
62417
|
+
var int = __assign$4(__assign$4({}, number), { transform: Math.round });
|
|
62820
62418
|
var numberValueTypes = {
|
|
62821
62419
|
// Border props
|
|
62822
62420
|
borderWidth: px,
|
|
@@ -62946,7 +62544,7 @@ function useInitialMotionValues(_a2, visualState, isStatic) {
|
|
|
62946
62544
|
var state = createHtmlRenderState();
|
|
62947
62545
|
buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
|
|
62948
62546
|
var vars = state.vars, style2 = state.style;
|
|
62949
|
-
return __assign$
|
|
62547
|
+
return __assign$4(__assign$4({}, vars), style2);
|
|
62950
62548
|
}, [visualState]);
|
|
62951
62549
|
}
|
|
62952
62550
|
function useStyle(props, visualState, isStatic) {
|
|
@@ -63104,18 +62702,18 @@ function buildSVGAttrs(state, _a2, options, transformTemplate) {
|
|
|
63104
62702
|
}
|
|
63105
62703
|
}
|
|
63106
62704
|
var createSvgRenderState = function() {
|
|
63107
|
-
return __assign$
|
|
62705
|
+
return __assign$4(__assign$4({}, createHtmlRenderState()), { attrs: {} });
|
|
63108
62706
|
};
|
|
63109
62707
|
function useSVGProps(props, visualState) {
|
|
63110
62708
|
var visualProps = useMemo$1(function() {
|
|
63111
62709
|
var state = createSvgRenderState();
|
|
63112
62710
|
buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
|
|
63113
|
-
return __assign$
|
|
62711
|
+
return __assign$4(__assign$4({}, state.attrs), { style: __assign$4({}, state.style) });
|
|
63114
62712
|
}, [visualState]);
|
|
63115
62713
|
if (props.style) {
|
|
63116
62714
|
var rawStyles = {};
|
|
63117
62715
|
copyRawValuesOnly(rawStyles, props.style, props);
|
|
63118
|
-
visualProps.style = __assign$
|
|
62716
|
+
visualProps.style = __assign$4(__assign$4({}, rawStyles), visualProps.style);
|
|
63119
62717
|
}
|
|
63120
62718
|
return visualProps;
|
|
63121
62719
|
}
|
|
@@ -63128,7 +62726,7 @@ function createUseRender(forwardMotionProps) {
|
|
|
63128
62726
|
var useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
|
|
63129
62727
|
var visualProps = useVisualProps(props, latestValues, isStatic);
|
|
63130
62728
|
var filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
|
|
63131
|
-
var elementProps = __assign$
|
|
62729
|
+
var elementProps = __assign$4(__assign$4(__assign$4({}, filteredProps), visualProps), { ref: ref2 });
|
|
63132
62730
|
if (projectionId) {
|
|
63133
62731
|
elementProps["data-projection-id"] = projectionId;
|
|
63134
62732
|
}
|
|
@@ -63305,7 +62903,7 @@ var htmlMotionConfig = {
|
|
|
63305
62903
|
function createDomMotionConfig(Component2, _a2, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
|
|
63306
62904
|
var _b = _a2.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
|
|
63307
62905
|
var baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
|
|
63308
|
-
return __assign$
|
|
62906
|
+
return __assign$4(__assign$4({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
|
|
63309
62907
|
}
|
|
63310
62908
|
var AnimationType;
|
|
63311
62909
|
(function(AnimationType2) {
|
|
@@ -64392,7 +63990,7 @@ function initIntersectionObserver(_a2) {
|
|
|
64392
63990
|
var rootObservers = observers.get(lookupRoot);
|
|
64393
63991
|
var key2 = JSON.stringify(options);
|
|
64394
63992
|
if (!rootObservers[key2]) {
|
|
64395
|
-
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$
|
|
63993
|
+
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$4({ root: root2 }, options));
|
|
64396
63994
|
}
|
|
64397
63995
|
return rootObservers[key2];
|
|
64398
63996
|
}
|
|
@@ -64610,9 +64208,9 @@ var getDefaultTransition = function(valueKey, to2) {
|
|
|
64610
64208
|
} else {
|
|
64611
64209
|
transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
|
|
64612
64210
|
}
|
|
64613
|
-
return __assign$
|
|
64211
|
+
return __assign$4({ to: to2 }, transitionFactory(to2));
|
|
64614
64212
|
};
|
|
64615
|
-
var defaultValueTypes = __assign$
|
|
64213
|
+
var defaultValueTypes = __assign$4(__assign$4({}, numberValueTypes), {
|
|
64616
64214
|
// Color props
|
|
64617
64215
|
color,
|
|
64618
64216
|
backgroundColor: color,
|
|
@@ -64654,7 +64252,7 @@ function isTransitionDefined(_a2) {
|
|
|
64654
64252
|
var legacyRepeatWarning = false;
|
|
64655
64253
|
function convertTransitionToAnimationOptions(_a2) {
|
|
64656
64254
|
var ease2 = _a2.ease, times = _a2.times, yoyo = _a2.yoyo, flip = _a2.flip, loop = _a2.loop, transition = __rest$1(_a2, ["ease", "times", "yoyo", "flip", "loop"]);
|
|
64657
|
-
var options = __assign$
|
|
64255
|
+
var options = __assign$4({}, transition);
|
|
64658
64256
|
if (times)
|
|
64659
64257
|
options["offset"] = times;
|
|
64660
64258
|
if (transition.duration)
|
|
@@ -64701,9 +64299,9 @@ function getPopmotionAnimationOptions(transition, options, key2) {
|
|
|
64701
64299
|
}
|
|
64702
64300
|
hydrateKeyframes(options);
|
|
64703
64301
|
if (!isTransitionDefined(transition)) {
|
|
64704
|
-
transition = __assign$
|
|
64302
|
+
transition = __assign$4(__assign$4({}, transition), getDefaultTransition(key2, options.to));
|
|
64705
64303
|
}
|
|
64706
|
-
return __assign$
|
|
64304
|
+
return __assign$4(__assign$4({}, options), convertTransitionToAnimationOptions(transition));
|
|
64707
64305
|
}
|
|
64708
64306
|
function getAnimation(key2, value, target, transition, onComplete) {
|
|
64709
64307
|
var _a2;
|
|
@@ -64729,7 +64327,7 @@ function getAnimation(key2, value, target, transition, onComplete) {
|
|
|
64729
64327
|
return value.set(v2);
|
|
64730
64328
|
}
|
|
64731
64329
|
};
|
|
64732
|
-
return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$
|
|
64330
|
+
return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$4(__assign$4({}, options), valueTransition)) : animate$1(__assign$4(__assign$4({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
|
|
64733
64331
|
var _a3;
|
|
64734
64332
|
options.onUpdate(v2);
|
|
64735
64333
|
(_a3 = valueTransition.onUpdate) === null || _a3 === void 0 ? void 0 : _a3.call(valueTransition, v2);
|
|
@@ -64982,7 +64580,7 @@ function setTarget(visualElement2, definition) {
|
|
|
64982
64580
|
var _a2 = resolved ? visualElement2.makeTargetAnimatable(resolved, false) : {}, _b = _a2.transitionEnd, transitionEnd = _b === void 0 ? {} : _b;
|
|
64983
64581
|
_a2.transition;
|
|
64984
64582
|
var target = __rest$1(_a2, ["transitionEnd", "transition"]);
|
|
64985
|
-
target = __assign$
|
|
64583
|
+
target = __assign$4(__assign$4({}, target), transitionEnd);
|
|
64986
64584
|
for (var key2 in target) {
|
|
64987
64585
|
var value = resolveFinalValueInKeyframes(target[key2]);
|
|
64988
64586
|
setMotionValue(visualElement2, key2, value);
|
|
@@ -65100,9 +64698,9 @@ function animateTarget(visualElement2, definition, _a2) {
|
|
|
65100
64698
|
if (!value || valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key2)) {
|
|
65101
64699
|
continue;
|
|
65102
64700
|
}
|
|
65103
|
-
var valueTransition = __assign$
|
|
64701
|
+
var valueTransition = __assign$4({ delay }, transition);
|
|
65104
64702
|
if (visualElement2.shouldReduceMotion && isTransformProp(key2)) {
|
|
65105
|
-
valueTransition = __assign$
|
|
64703
|
+
valueTransition = __assign$4(__assign$4({}, valueTransition), { type: false, delay: 0 });
|
|
65106
64704
|
}
|
|
65107
64705
|
var animation = startAnimation(key2, value, valueTarget, valueTransition);
|
|
65108
64706
|
animations2.push(animation);
|
|
@@ -65135,7 +64733,7 @@ function animateChildren(visualElement2, variant, delayChildren, staggerChildren
|
|
|
65135
64733
|
return maxStaggerDuration - i * staggerChildren;
|
|
65136
64734
|
};
|
|
65137
64735
|
Array.from(visualElement2.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
|
|
65138
|
-
animations2.push(animateVariant(child, variant, __assign$
|
|
64736
|
+
animations2.push(animateVariant(child, variant, __assign$4(__assign$4({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
|
|
65139
64737
|
return child.notifyAnimationComplete(variant);
|
|
65140
64738
|
}));
|
|
65141
64739
|
});
|
|
@@ -65179,7 +64777,7 @@ function createAnimationState(visualElement2) {
|
|
|
65179
64777
|
if (resolved) {
|
|
65180
64778
|
resolved.transition;
|
|
65181
64779
|
var transitionEnd = resolved.transitionEnd, target = __rest$1(resolved, ["transition", "transitionEnd"]);
|
|
65182
|
-
acc = __assign$
|
|
64780
|
+
acc = __assign$4(__assign$4(__assign$4({}, acc), target), transitionEnd);
|
|
65183
64781
|
}
|
|
65184
64782
|
return acc;
|
|
65185
64783
|
};
|
|
@@ -65209,7 +64807,7 @@ function createAnimationState(visualElement2) {
|
|
|
65209
64807
|
if (isInherited && isInitialRender && visualElement2.manuallyAnimateOnMount) {
|
|
65210
64808
|
isInherited = false;
|
|
65211
64809
|
}
|
|
65212
|
-
typeState.protectedKeys = __assign$
|
|
64810
|
+
typeState.protectedKeys = __assign$4({}, encounteredKeys);
|
|
65213
64811
|
if (
|
|
65214
64812
|
// If it isn't active and hasn't *just* been set as inactive
|
|
65215
64813
|
!typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
|
|
@@ -65227,7 +64825,7 @@ function createAnimationState(visualElement2) {
|
|
|
65227
64825
|
if (activeDelta === false)
|
|
65228
64826
|
resolvedValues = {};
|
|
65229
64827
|
var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;
|
|
65230
|
-
var allKeys = __assign$
|
|
64828
|
+
var allKeys = __assign$4(__assign$4({}, prevResolvedValues), resolvedValues);
|
|
65231
64829
|
var markToAnimate = function(key3) {
|
|
65232
64830
|
shouldAnimateType = true;
|
|
65233
64831
|
removedKeys.delete(key3);
|
|
@@ -65259,7 +64857,7 @@ function createAnimationState(visualElement2) {
|
|
|
65259
64857
|
typeState.prevProp = prop;
|
|
65260
64858
|
typeState.prevResolvedValues = resolvedValues;
|
|
65261
64859
|
if (typeState.isActive) {
|
|
65262
|
-
encounteredKeys = __assign$
|
|
64860
|
+
encounteredKeys = __assign$4(__assign$4({}, encounteredKeys), resolvedValues);
|
|
65263
64861
|
}
|
|
65264
64862
|
if (isInitialRender && visualElement2.blockInitialAnimation) {
|
|
65265
64863
|
shouldAnimateType = false;
|
|
@@ -65268,7 +64866,7 @@ function createAnimationState(visualElement2) {
|
|
|
65268
64866
|
animations2.push.apply(animations2, __spreadArray$2([], __read(definitionList.map(function(animation) {
|
|
65269
64867
|
return {
|
|
65270
64868
|
animation,
|
|
65271
|
-
options: __assign$
|
|
64869
|
+
options: __assign$4({ type }, options)
|
|
65272
64870
|
};
|
|
65273
64871
|
})), false));
|
|
65274
64872
|
}
|
|
@@ -65276,7 +64874,7 @@ function createAnimationState(visualElement2) {
|
|
|
65276
64874
|
for (var i = 0; i < numAnimationTypes; i++) {
|
|
65277
64875
|
_loop_1(i);
|
|
65278
64876
|
}
|
|
65279
|
-
allAnimatedKeys = __assign$
|
|
64877
|
+
allAnimatedKeys = __assign$4({}, encounteredKeys);
|
|
65280
64878
|
if (removedKeys.size) {
|
|
65281
64879
|
var fallbackAnimation_1 = {};
|
|
65282
64880
|
removedKeys.forEach(function(key2) {
|
|
@@ -65384,7 +64982,7 @@ var PanSession = (
|
|
|
65384
64982
|
return;
|
|
65385
64983
|
var point2 = info3.point;
|
|
65386
64984
|
var timestamp2 = getFrameData().timestamp;
|
|
65387
|
-
_this.history.push(__assign$
|
|
64985
|
+
_this.history.push(__assign$4(__assign$4({}, point2), { timestamp: timestamp2 }));
|
|
65388
64986
|
var _a3 = _this.handlers, onStart = _a3.onStart, onMove = _a3.onMove;
|
|
65389
64987
|
if (!isPanStarted) {
|
|
65390
64988
|
onStart && onStart(_this.lastMoveEvent, info3);
|
|
@@ -65418,7 +65016,7 @@ var PanSession = (
|
|
|
65418
65016
|
var initialInfo = transformPoint(info2, this.transformPagePoint);
|
|
65419
65017
|
var point = initialInfo.point;
|
|
65420
65018
|
var timestamp = getFrameData().timestamp;
|
|
65421
|
-
this.history = [__assign$
|
|
65019
|
+
this.history = [__assign$4(__assign$4({}, point), { timestamp })];
|
|
65422
65020
|
var onSessionStart = handlers2.onSessionStart;
|
|
65423
65021
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
65424
65022
|
this.removeListeners = pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
|
|
@@ -65939,7 +65537,7 @@ var VisualElementDragControls = (
|
|
|
65939
65537
|
transition = { min: 0, max: 0 };
|
|
65940
65538
|
var bounceStiffness = dragElastic ? 200 : 1e6;
|
|
65941
65539
|
var bounceDamping = dragElastic ? 40 : 1e7;
|
|
65942
|
-
var inertia2 = __assign$
|
|
65540
|
+
var inertia2 = __assign$4(__assign$4({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
|
|
65943
65541
|
return _this.startAxisValueAnimation(axis, inertia2);
|
|
65944
65542
|
});
|
|
65945
65543
|
return Promise.all(momentumAnimations).then(onDragTransitionEnd);
|
|
@@ -66050,7 +65648,7 @@ var VisualElementDragControls = (
|
|
|
66050
65648
|
VisualElementDragControls2.prototype.getProps = function() {
|
|
66051
65649
|
var props = this.visualElement.getProps();
|
|
66052
65650
|
var _a2 = props.drag, drag2 = _a2 === void 0 ? false : _a2, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e2 = props.dragElastic, dragElastic = _e2 === void 0 ? defaultElastic : _e2, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;
|
|
66053
|
-
return __assign$
|
|
65651
|
+
return __assign$4(__assign$4({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
|
|
66054
65652
|
};
|
|
66055
65653
|
return VisualElementDragControls2;
|
|
66056
65654
|
}()
|
|
@@ -66207,7 +65805,7 @@ var visualElement = function(_a2) {
|
|
|
66207
65805
|
var values2 = /* @__PURE__ */ new Map();
|
|
66208
65806
|
var valueSubscriptions = /* @__PURE__ */ new Map();
|
|
66209
65807
|
var prevMotionValues = {};
|
|
66210
|
-
var baseTarget = __assign$
|
|
65808
|
+
var baseTarget = __assign$4({}, latestValues);
|
|
66211
65809
|
var removeFromVariantTree;
|
|
66212
65810
|
function render2() {
|
|
66213
65811
|
if (!instance || !isMounted)
|
|
@@ -66241,7 +65839,7 @@ var visualElement = function(_a2) {
|
|
|
66241
65839
|
}
|
|
66242
65840
|
var isControllingVariants = checkIfControllingVariants(props);
|
|
66243
65841
|
var isVariantNode = checkIfVariantNode(props);
|
|
66244
|
-
var element = __assign$
|
|
65842
|
+
var element = __assign$4(__assign$4({
|
|
66245
65843
|
treeType,
|
|
66246
65844
|
/**
|
|
66247
65845
|
* This is a mirror of the internal instance prop, which keeps
|
|
@@ -66606,7 +66204,7 @@ function resolveCSSVariables(visualElement2, _a2, transitionEnd) {
|
|
|
66606
66204
|
if (!(element instanceof Element))
|
|
66607
66205
|
return { target, transitionEnd };
|
|
66608
66206
|
if (transitionEnd) {
|
|
66609
|
-
transitionEnd = __assign$
|
|
66207
|
+
transitionEnd = __assign$4({}, transitionEnd);
|
|
66610
66208
|
}
|
|
66611
66209
|
visualElement2.forEachValue(function(value) {
|
|
66612
66210
|
var current2 = value.get();
|
|
@@ -66761,8 +66359,8 @@ var checkAndConvertChangedValueTypes = function(visualElement2, target, origin2,
|
|
|
66761
66359
|
if (transitionEnd === void 0) {
|
|
66762
66360
|
transitionEnd = {};
|
|
66763
66361
|
}
|
|
66764
|
-
target = __assign$
|
|
66765
|
-
transitionEnd = __assign$
|
|
66362
|
+
target = __assign$4({}, target);
|
|
66363
|
+
transitionEnd = __assign$4({}, transitionEnd);
|
|
66766
66364
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
|
|
66767
66365
|
var removedTransformValues = [];
|
|
66768
66366
|
var hasAttemptedToRemoveTransformValues = false;
|
|
@@ -66915,7 +66513,7 @@ var htmlConfig = {
|
|
|
66915
66513
|
transitionEnd = parsed.transitionEnd;
|
|
66916
66514
|
target = parsed.target;
|
|
66917
66515
|
}
|
|
66918
|
-
return __assign$
|
|
66516
|
+
return __assign$4({ transition, transitionEnd }, target);
|
|
66919
66517
|
},
|
|
66920
66518
|
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
|
|
66921
66519
|
build: function(element, renderState, latestValues, options, props) {
|
|
@@ -66927,7 +66525,7 @@ var htmlConfig = {
|
|
|
66927
66525
|
render: renderHTML
|
|
66928
66526
|
};
|
|
66929
66527
|
var htmlVisualElement = visualElement(htmlConfig);
|
|
66930
|
-
var svgVisualElement = visualElement(__assign$
|
|
66528
|
+
var svgVisualElement = visualElement(__assign$4(__assign$4({}, htmlConfig), { getBaseTarget: function(props, key2) {
|
|
66931
66529
|
return props[key2];
|
|
66932
66530
|
}, readValueFromInstance: function(domElement, key2) {
|
|
66933
66531
|
var _a2;
|
|
@@ -67005,7 +66603,7 @@ var correctBoxShadow = {
|
|
|
67005
66603
|
var MeasureLayoutWithContext = (
|
|
67006
66604
|
/** @class */
|
|
67007
66605
|
function(_super) {
|
|
67008
|
-
__extends(MeasureLayoutWithContext2, _super);
|
|
66606
|
+
__extends$1(MeasureLayoutWithContext2, _super);
|
|
67009
66607
|
function MeasureLayoutWithContext2() {
|
|
67010
66608
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
67011
66609
|
}
|
|
@@ -67024,7 +66622,7 @@ var MeasureLayoutWithContext = (
|
|
|
67024
66622
|
projection.addEventListener("animationComplete", function() {
|
|
67025
66623
|
_this.safeToRemove();
|
|
67026
66624
|
});
|
|
67027
|
-
projection.setOptions(__assign$
|
|
66625
|
+
projection.setOptions(__assign$4(__assign$4({}, projection.options), { onExitComplete: function() {
|
|
67028
66626
|
return _this.safeToRemove();
|
|
67029
66627
|
} }));
|
|
67030
66628
|
}
|
|
@@ -67089,10 +66687,10 @@ var MeasureLayoutWithContext = (
|
|
|
67089
66687
|
function MeasureLayout(props) {
|
|
67090
66688
|
var _a2 = __read(usePresence(), 2), isPresent = _a2[0], safeToRemove = _a2[1];
|
|
67091
66689
|
var layoutGroup = useContext(LayoutGroupContext);
|
|
67092
|
-
return React__default.createElement(MeasureLayoutWithContext, __assign$
|
|
66690
|
+
return React__default.createElement(MeasureLayoutWithContext, __assign$4({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
|
|
67093
66691
|
}
|
|
67094
66692
|
var defaultScaleCorrectors = {
|
|
67095
|
-
borderRadius: __assign$
|
|
66693
|
+
borderRadius: __assign$4(__assign$4({}, correctBorderRadius), { applyTo: [
|
|
67096
66694
|
"borderTopLeftRadius",
|
|
67097
66695
|
"borderTopRightRadius",
|
|
67098
66696
|
"borderBottomLeftRadius",
|
|
@@ -67515,7 +67113,7 @@ function createProjectionNode(_a2) {
|
|
|
67515
67113
|
_this.resumingFrom.resumingFrom = void 0;
|
|
67516
67114
|
}
|
|
67517
67115
|
_this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
67518
|
-
var animationOptions = __assign$
|
|
67116
|
+
var animationOptions = __assign$4(__assign$4({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
|
|
67519
67117
|
if (visualElement2.shouldReduceMotion) {
|
|
67520
67118
|
animationOptions.delay = 0;
|
|
67521
67119
|
animationOptions.type = false;
|
|
@@ -67769,7 +67367,7 @@ function createProjectionNode(_a2) {
|
|
|
67769
67367
|
};
|
|
67770
67368
|
ProjectionNode.prototype.setOptions = function(options) {
|
|
67771
67369
|
var _a3;
|
|
67772
|
-
this.options = __assign$
|
|
67370
|
+
this.options = __assign$4(__assign$4(__assign$4({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
|
|
67773
67371
|
};
|
|
67774
67372
|
ProjectionNode.prototype.clearMeasurements = function() {
|
|
67775
67373
|
this.scroll = void 0;
|
|
@@ -67887,7 +67485,7 @@ function createProjectionNode(_a2) {
|
|
|
67887
67485
|
}
|
|
67888
67486
|
var snapshot = this.snapshot;
|
|
67889
67487
|
var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
|
|
67890
|
-
var mixedValues = __assign$
|
|
67488
|
+
var mixedValues = __assign$4({}, this.latestValues);
|
|
67891
67489
|
var targetDelta = createDelta();
|
|
67892
67490
|
this.relativeTarget = this.relativeTargetOrigin = void 0;
|
|
67893
67491
|
this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
|
|
@@ -67930,7 +67528,7 @@ function createProjectionNode(_a2) {
|
|
|
67930
67528
|
}
|
|
67931
67529
|
this.pendingAnimation = sync.update(function() {
|
|
67932
67530
|
globalProjectionState.hasAnimatedSinceResize = true;
|
|
67933
|
-
_this.currentAnimation = animate(0, animationTarget, __assign$
|
|
67531
|
+
_this.currentAnimation = animate(0, animationTarget, __assign$4(__assign$4({}, options), { onUpdate: function(latest) {
|
|
67934
67532
|
var _a4;
|
|
67935
67533
|
_this.mixTargetDelta(latest);
|
|
67936
67534
|
(_a4 = options.onUpdate) === null || _a4 === void 0 ? void 0 : _a4.call(options, latest);
|
|
@@ -68298,7 +67896,7 @@ var HTMLProjectionNode = createProjectionNode({
|
|
|
68298
67896
|
return Boolean(window.getComputedStyle(instance).position === "fixed");
|
|
68299
67897
|
}
|
|
68300
67898
|
});
|
|
68301
|
-
var featureBundle = __assign$
|
|
67899
|
+
var featureBundle = __assign$4(__assign$4(__assign$4(__assign$4({}, animations), gestureAnimations), drag), layoutFeatures);
|
|
68302
67900
|
var motion = /* @__PURE__ */ createMotionProxy(function(Component2, config2) {
|
|
68303
67901
|
return createDomMotionConfig(Component2, config2, featureBundle, createDomVisualElement, HTMLProjectionNode);
|
|
68304
67902
|
});
|