@oliasoft-open-source/react-ui-library 4.14.0 → 4.14.1-beta-1
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 +34 -36
- package/dist/index.js +1195 -797
- 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,
|
|
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 as memo$1, 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, 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$
|
|
17
|
+
import ReactDOM, { createPortal, unstable_batchedUpdates, flushSync as flushSync$1, 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$3, 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
|
|
226
|
-
extendStatics
|
|
225
|
+
var extendStatics = function(d2, b2) {
|
|
226
|
+
extendStatics = 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
|
|
231
|
+
return extendStatics(d2, b2);
|
|
232
232
|
};
|
|
233
|
-
function __extends
|
|
233
|
+
function __extends(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
|
|
236
|
+
extendStatics(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$3 = function() {
|
|
243
|
+
__assign$3 = 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$3.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$2 = function() {
|
|
887
|
+
__assign$2 = 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$2.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$2({
|
|
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$2({
|
|
914
|
+
attr: __assign$2({}, 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$2({
|
|
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$2(__assign$2({
|
|
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$1(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$1(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$7 = 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$7(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$7(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$7(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$1 = function() {
|
|
5310
|
+
__assign$1 = 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$1.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$1(__assign$1({}, 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$1(__assign$1({}, 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$1(__assign$1({}, 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$1(__assign$1({}, 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$1(__assign$1({}, 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$1(__assign$1({}, 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$6 = 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$6(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$6(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$5 = 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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(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$5(function() {
|
|
17767
17767
|
if (isFirstPublishRef.current) {
|
|
17768
17768
|
isFirstPublishRef.current = false;
|
|
17769
17769
|
return;
|
|
@@ -18340,343 +18340,755 @@ 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
|
-
|
|
18343
|
+
function memo(getDeps, fn, opts) {
|
|
18344
|
+
let deps = opts.initialDeps ?? [];
|
|
18345
|
+
let result;
|
|
18346
|
+
return () => {
|
|
18347
|
+
var _a2, _b, _c, _d;
|
|
18348
|
+
let depTime;
|
|
18349
|
+
if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
|
|
18350
|
+
const newDeps = getDeps();
|
|
18351
|
+
const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
|
|
18352
|
+
if (!depsChanged) {
|
|
18353
|
+
return result;
|
|
18354
|
+
}
|
|
18355
|
+
deps = newDeps;
|
|
18356
|
+
let resultTime;
|
|
18357
|
+
if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
|
|
18358
|
+
result = fn(...newDeps);
|
|
18359
|
+
if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
|
|
18360
|
+
const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
|
|
18361
|
+
const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
|
|
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;
|
|
18362
18384
|
};
|
|
18363
|
-
|
|
18364
|
-
|
|
18365
|
-
|
|
18366
|
-
|
|
18367
|
-
|
|
18368
|
-
|
|
18385
|
+
}
|
|
18386
|
+
function notUndefined(value, msg2) {
|
|
18387
|
+
if (value === void 0) {
|
|
18388
|
+
throw new Error(`Unexpected undefined${""}`);
|
|
18389
|
+
} else {
|
|
18390
|
+
return value;
|
|
18369
18391
|
}
|
|
18370
|
-
d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
|
|
18371
18392
|
}
|
|
18372
|
-
|
|
18373
|
-
|
|
18374
|
-
|
|
18375
|
-
|
|
18376
|
-
|
|
18377
|
-
|
|
18378
|
-
return t;
|
|
18393
|
+
const approxEqual = (a2, b2) => Math.abs(a2 - b2) < 1;
|
|
18394
|
+
const debounce$2 = (targetWindow, fn, ms2) => {
|
|
18395
|
+
let timeoutId;
|
|
18396
|
+
return function(...args) {
|
|
18397
|
+
targetWindow.clearTimeout(timeoutId);
|
|
18398
|
+
timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms2);
|
|
18379
18399
|
};
|
|
18380
|
-
return __assign$1.apply(this, arguments);
|
|
18381
18400
|
};
|
|
18382
|
-
|
|
18383
|
-
|
|
18384
|
-
|
|
18385
|
-
|
|
18386
|
-
|
|
18387
|
-
|
|
18388
|
-
|
|
18389
|
-
}
|
|
18401
|
+
const defaultKeyExtractor = (index2) => index2;
|
|
18402
|
+
const defaultRangeExtractor = (range2) => {
|
|
18403
|
+
const start3 = Math.max(range2.startIndex - range2.overscan, 0);
|
|
18404
|
+
const end2 = Math.min(range2.endIndex + range2.overscan, range2.count - 1);
|
|
18405
|
+
const arr = [];
|
|
18406
|
+
for (let i = start3; i <= end2; i++) {
|
|
18407
|
+
arr.push(i);
|
|
18390
18408
|
}
|
|
18391
|
-
|
|
18392
|
-
|
|
18393
|
-
|
|
18409
|
+
return arr;
|
|
18410
|
+
};
|
|
18411
|
+
const observeElementRect = (instance, cb2) => {
|
|
18412
|
+
const element = instance.scrollElement;
|
|
18413
|
+
if (!element) {
|
|
18414
|
+
return;
|
|
18394
18415
|
}
|
|
18395
|
-
|
|
18396
|
-
|
|
18397
|
-
|
|
18398
|
-
noTrailing = void 0;
|
|
18416
|
+
const targetWindow = instance.targetWindow;
|
|
18417
|
+
if (!targetWindow) {
|
|
18418
|
+
return;
|
|
18399
18419
|
}
|
|
18400
|
-
|
|
18401
|
-
|
|
18402
|
-
|
|
18403
|
-
|
|
18404
|
-
|
|
18405
|
-
|
|
18406
|
-
|
|
18407
|
-
|
|
18408
|
-
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18420
|
+
const handler = (rect) => {
|
|
18421
|
+
const { width: width2, height: height2 } = rect;
|
|
18422
|
+
cb2({ width: Math.round(width2), height: Math.round(height2) });
|
|
18423
|
+
};
|
|
18424
|
+
handler(element.getBoundingClientRect());
|
|
18425
|
+
if (!targetWindow.ResizeObserver) {
|
|
18426
|
+
return () => {
|
|
18427
|
+
};
|
|
18428
|
+
}
|
|
18429
|
+
const observer = new targetWindow.ResizeObserver((entries2) => {
|
|
18430
|
+
const entry = entries2[0];
|
|
18431
|
+
if (entry == null ? void 0 : entry.borderBoxSize) {
|
|
18432
|
+
const box = entry.borderBoxSize[0];
|
|
18433
|
+
if (box) {
|
|
18434
|
+
handler({ width: box.inlineSize, height: box.blockSize });
|
|
18435
|
+
return;
|
|
18436
|
+
}
|
|
18416
18437
|
}
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18438
|
+
handler(element.getBoundingClientRect());
|
|
18439
|
+
});
|
|
18440
|
+
observer.observe(element, { box: "border-box" });
|
|
18441
|
+
return () => {
|
|
18442
|
+
observer.unobserve(element);
|
|
18443
|
+
};
|
|
18444
|
+
};
|
|
18445
|
+
const addEventListenerOptions = {
|
|
18446
|
+
passive: true
|
|
18447
|
+
};
|
|
18448
|
+
const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
|
|
18449
|
+
const observeElementOffset = (instance, cb2) => {
|
|
18450
|
+
const element = instance.scrollElement;
|
|
18451
|
+
if (!element) {
|
|
18452
|
+
return;
|
|
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;
|
|
18422
18490
|
}
|
|
18423
18491
|
}
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
var ThresholdUnits = {
|
|
18428
|
-
Pixel: "Pixel",
|
|
18429
|
-
Percent: "Percent"
|
|
18492
|
+
return Math.round(
|
|
18493
|
+
element.getBoundingClientRect()[instance.options.horizontal ? "width" : "height"]
|
|
18494
|
+
);
|
|
18430
18495
|
};
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18496
|
+
const elementScroll = (offset3, {
|
|
18497
|
+
adjustments = 0,
|
|
18498
|
+
behavior
|
|
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
|
+
});
|
|
18434
18506
|
};
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
18507
|
+
class Virtualizer {
|
|
18508
|
+
constructor(opts) {
|
|
18509
|
+
this.unsubs = [];
|
|
18510
|
+
this.scrollElement = null;
|
|
18511
|
+
this.targetWindow = null;
|
|
18512
|
+
this.isScrolling = false;
|
|
18513
|
+
this.scrollToIndexTimeoutId = null;
|
|
18514
|
+
this.measurementsCache = [];
|
|
18515
|
+
this.itemSizeCache = /* @__PURE__ */ new Map();
|
|
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
|
+
});
|
|
18447
18536
|
};
|
|
18448
|
-
}
|
|
18449
|
-
if (scrollThreshold.match(/^(\d*(\.\d+)?)%$/)) {
|
|
18450
18537
|
return {
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
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 ");
|
|
18538
|
+
disconnect: () => {
|
|
18539
|
+
var _a2;
|
|
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);
|
|
18481
18549
|
}
|
|
18482
|
-
return null;
|
|
18483
18550
|
};
|
|
18484
|
-
|
|
18485
|
-
|
|
18551
|
+
})();
|
|
18552
|
+
this.range = null;
|
|
18553
|
+
this.setOptions = (opts2) => {
|
|
18554
|
+
Object.entries(opts2).forEach(([key2, value]) => {
|
|
18555
|
+
if (typeof value === "undefined") delete opts2[key2];
|
|
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
|
|
18581
|
+
};
|
|
18582
|
+
};
|
|
18583
|
+
this.notify = (sync2) => {
|
|
18584
|
+
var _a2, _b;
|
|
18585
|
+
(_b = (_a2 = this.options).onChange) == null ? void 0 : _b.call(_a2, this, sync2);
|
|
18586
|
+
};
|
|
18587
|
+
this.maybeNotify = memo(
|
|
18588
|
+
() => {
|
|
18589
|
+
this.calculateRange();
|
|
18590
|
+
return [
|
|
18591
|
+
this.isScrolling,
|
|
18592
|
+
this.range ? this.range.startIndex : null,
|
|
18593
|
+
this.range ? this.range.endIndex : null
|
|
18594
|
+
];
|
|
18595
|
+
},
|
|
18596
|
+
(isScrolling) => {
|
|
18597
|
+
this.notify(isScrolling);
|
|
18598
|
+
},
|
|
18599
|
+
{
|
|
18600
|
+
key: process.env.NODE_ENV !== "production" && "maybeNotify",
|
|
18601
|
+
debug: () => this.options.debug,
|
|
18602
|
+
initialDeps: [
|
|
18603
|
+
this.isScrolling,
|
|
18604
|
+
this.range ? this.range.startIndex : null,
|
|
18605
|
+
this.range ? this.range.endIndex : null
|
|
18606
|
+
]
|
|
18607
|
+
}
|
|
18608
|
+
);
|
|
18609
|
+
this.cleanup = () => {
|
|
18610
|
+
this.unsubs.filter(Boolean).forEach((d2) => d2());
|
|
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();
|
|
18620
|
+
};
|
|
18621
|
+
};
|
|
18622
|
+
this._willUpdate = () => {
|
|
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();
|
|
18486
18629
|
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;
|
|
18492
18630
|
}
|
|
18493
|
-
|
|
18494
|
-
if (
|
|
18495
|
-
|
|
18496
|
-
|
|
18631
|
+
this.scrollElement = scrollElement;
|
|
18632
|
+
if (this.scrollElement && "ownerDocument" in this.scrollElement) {
|
|
18633
|
+
this.targetWindow = this.scrollElement.ownerDocument.defaultView;
|
|
18634
|
+
} else {
|
|
18635
|
+
this.targetWindow = ((_a2 = this.scrollElement) == null ? void 0 : _a2.window) ?? null;
|
|
18497
18636
|
}
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18637
|
+
this._scrollToOffset(this.getScrollOffset(), {
|
|
18638
|
+
adjustments: void 0,
|
|
18639
|
+
behavior: void 0
|
|
18640
|
+
});
|
|
18641
|
+
this.unsubs.push(
|
|
18642
|
+
this.options.observeElementRect(this, (rect) => {
|
|
18643
|
+
this.scrollRect = rect;
|
|
18644
|
+
this.maybeNotify();
|
|
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;
|
|
18506
18681
|
}
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
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);
|
|
18513
18689
|
}
|
|
18514
|
-
if (
|
|
18515
|
-
|
|
18516
|
-
if (_this._infScroll) {
|
|
18517
|
-
_this._infScroll.style.overflow = "visible";
|
|
18518
|
-
_this._infScroll.style.transform = "translate3d(0px, " + (_this.currentY - _this.startY) + "px, 0px)";
|
|
18690
|
+
if (furthestMeasurementsFound.size === this.options.lanes) {
|
|
18691
|
+
break;
|
|
18519
18692
|
}
|
|
18520
|
-
}
|
|
18521
|
-
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
|
|
18526
|
-
|
|
18527
|
-
|
|
18528
|
-
|
|
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;
|
|
18697
|
+
}
|
|
18698
|
+
return a2.end - b2.end;
|
|
18699
|
+
})[0] : void 0;
|
|
18700
|
+
};
|
|
18701
|
+
this.getMeasurementOptions = memo(
|
|
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);
|
|
18529
18735
|
});
|
|
18530
18736
|
}
|
|
18531
|
-
|
|
18532
|
-
|
|
18533
|
-
|
|
18534
|
-
|
|
18535
|
-
|
|
18536
|
-
|
|
18737
|
+
const min = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
|
|
18738
|
+
this.pendingMeasuredCacheIndexes = [];
|
|
18739
|
+
const measurements = this.measurementsCache.slice(0, min);
|
|
18740
|
+
for (let i = min; i < count2; i++) {
|
|
18741
|
+
const key2 = getItemKey(i);
|
|
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
|
|
18537
18792
|
});
|
|
18538
|
-
}
|
|
18539
|
-
|
|
18540
|
-
|
|
18541
|
-
|
|
18542
|
-
|
|
18543
|
-
|
|
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);
|
|
18544
18821
|
}
|
|
18545
|
-
|
|
18546
|
-
|
|
18547
|
-
|
|
18548
|
-
|
|
18549
|
-
|
|
18550
|
-
|
|
18551
|
-
|
|
18552
|
-
|
|
18822
|
+
this.observer.observe(node2);
|
|
18823
|
+
this.elementsCache.set(key2, node2);
|
|
18824
|
+
}
|
|
18825
|
+
if (node2.isConnected) {
|
|
18826
|
+
this.resizeItem(index2, this.options.measureElement(node2, entry, this));
|
|
18827
|
+
}
|
|
18828
|
+
};
|
|
18829
|
+
this.resizeItem = (index2, size2) => {
|
|
18830
|
+
const item2 = this.measurementsCache[index2];
|
|
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
|
|
18844
|
+
});
|
|
18553
18845
|
}
|
|
18554
|
-
|
|
18555
|
-
|
|
18556
|
-
|
|
18557
|
-
|
|
18558
|
-
|
|
18559
|
-
|
|
18560
|
-
|
|
18561
|
-
|
|
18562
|
-
|
|
18563
|
-
|
|
18564
|
-
|
|
18565
|
-
|
|
18566
|
-
|
|
18567
|
-
|
|
18568
|
-
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18579
|
-
|
|
18580
|
-
|
|
18581
|
-
|
|
18582
|
-
|
|
18583
|
-
|
|
18584
|
-
|
|
18585
|
-
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
|
|
18589
|
-
|
|
18590
|
-
|
|
18591
|
-
|
|
18846
|
+
this.pendingMeasuredCacheIndexes.push(item2.index);
|
|
18847
|
+
this.itemSizeCache = new Map(this.itemSizeCache.set(item2.key, size2));
|
|
18848
|
+
this.notify(false);
|
|
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);
|
|
18857
|
+
}
|
|
18858
|
+
});
|
|
18859
|
+
return;
|
|
18860
|
+
}
|
|
18861
|
+
this._measureElement(node2, void 0);
|
|
18862
|
+
};
|
|
18863
|
+
this.getVirtualItems = memo(
|
|
18864
|
+
() => [this.getIndexes(), this.getMeasurements()],
|
|
18865
|
+
(indexes, measurements) => {
|
|
18866
|
+
const virtualItems = [];
|
|
18867
|
+
for (let k2 = 0, len = indexes.length; k2 < len; k2++) {
|
|
18868
|
+
const i = indexes[k2];
|
|
18869
|
+
const measurement = measurements[i];
|
|
18870
|
+
virtualItems.push(measurement);
|
|
18871
|
+
}
|
|
18872
|
+
return virtualItems;
|
|
18873
|
+
},
|
|
18874
|
+
{
|
|
18875
|
+
key: process.env.NODE_ENV !== "production" && "getVirtualItems",
|
|
18876
|
+
debug: () => this.options.debug
|
|
18877
|
+
}
|
|
18878
|
+
);
|
|
18879
|
+
this.getVirtualItemForOffset = (offset3) => {
|
|
18880
|
+
const measurements = this.getMeasurements();
|
|
18881
|
+
if (measurements.length === 0) {
|
|
18882
|
+
return void 0;
|
|
18883
|
+
}
|
|
18884
|
+
return notUndefined(
|
|
18885
|
+
measurements[findNearestBinarySearch(
|
|
18886
|
+
0,
|
|
18887
|
+
measurements.length - 1,
|
|
18888
|
+
(index2) => notUndefined(measurements[index2]).start,
|
|
18889
|
+
offset3
|
|
18890
|
+
)]
|
|
18891
|
+
);
|
|
18892
|
+
};
|
|
18893
|
+
this.getOffsetForAlignment = (toOffset, align) => {
|
|
18894
|
+
const size2 = this.getSize();
|
|
18895
|
+
const scrollOffset = this.getScrollOffset();
|
|
18896
|
+
if (align === "auto") {
|
|
18897
|
+
if (toOffset <= scrollOffset) {
|
|
18898
|
+
align = "start";
|
|
18899
|
+
} else if (toOffset >= scrollOffset + size2) {
|
|
18900
|
+
align = "end";
|
|
18901
|
+
} else {
|
|
18902
|
+
align = "start";
|
|
18592
18903
|
}
|
|
18593
18904
|
}
|
|
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);
|
|
18594
18916
|
};
|
|
18595
|
-
|
|
18596
|
-
|
|
18597
|
-
|
|
18598
|
-
|
|
18599
|
-
|
|
18600
|
-
|
|
18601
|
-
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
|
|
18917
|
+
this.getOffsetForIndex = (index2, align = "auto") => {
|
|
18918
|
+
index2 = Math.max(0, Math.min(index2, this.options.count - 1));
|
|
18919
|
+
const item2 = this.measurementsCache[index2];
|
|
18920
|
+
if (!item2) {
|
|
18921
|
+
return void 0;
|
|
18922
|
+
}
|
|
18923
|
+
const size2 = this.getSize();
|
|
18924
|
+
const scrollOffset = this.getScrollOffset();
|
|
18925
|
+
if (align === "auto") {
|
|
18926
|
+
if (item2.end >= scrollOffset + size2 - this.options.scrollPaddingEnd) {
|
|
18927
|
+
align = "end";
|
|
18928
|
+
} else if (item2.start <= scrollOffset + this.options.scrollPaddingStart) {
|
|
18929
|
+
align = "start";
|
|
18930
|
+
} else {
|
|
18931
|
+
return [scrollOffset, align];
|
|
18605
18932
|
}
|
|
18606
18933
|
}
|
|
18934
|
+
const toOffset = align === "end" ? item2.end + this.options.scrollPaddingEnd : item2.start - this.options.scrollPaddingStart;
|
|
18935
|
+
return [this.getOffsetForAlignment(toOffset, align), align];
|
|
18607
18936
|
};
|
|
18608
|
-
|
|
18609
|
-
|
|
18610
|
-
|
|
18611
|
-
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
});
|
|
18937
|
+
this.isDynamicMode = () => this.elementsCache.size > 0;
|
|
18938
|
+
this.cancelScrollToIndex = () => {
|
|
18939
|
+
if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {
|
|
18940
|
+
this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);
|
|
18941
|
+
this.scrollToIndexTimeoutId = null;
|
|
18942
|
+
}
|
|
18615
18943
|
};
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
if (
|
|
18619
|
-
|
|
18944
|
+
this.scrollToOffset = (toOffset, { align = "start", behavior } = {}) => {
|
|
18945
|
+
this.cancelScrollToIndex();
|
|
18946
|
+
if (behavior === "smooth" && this.isDynamicMode()) {
|
|
18947
|
+
console.warn(
|
|
18948
|
+
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18949
|
+
);
|
|
18620
18950
|
}
|
|
18621
|
-
|
|
18951
|
+
this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {
|
|
18952
|
+
adjustments: void 0,
|
|
18953
|
+
behavior
|
|
18954
|
+
});
|
|
18622
18955
|
};
|
|
18623
|
-
|
|
18624
|
-
|
|
18625
|
-
|
|
18956
|
+
this.scrollToIndex = (index2, { align: initialAlign = "auto", behavior } = {}) => {
|
|
18957
|
+
index2 = Math.max(0, Math.min(index2, this.options.count - 1));
|
|
18958
|
+
this.cancelScrollToIndex();
|
|
18959
|
+
if (behavior === "smooth" && this.isDynamicMode()) {
|
|
18960
|
+
console.warn(
|
|
18961
|
+
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18962
|
+
);
|
|
18626
18963
|
}
|
|
18627
|
-
|
|
18628
|
-
|
|
18629
|
-
|
|
18630
|
-
|
|
18964
|
+
const offsetAndAlign = this.getOffsetForIndex(index2, initialAlign);
|
|
18965
|
+
if (!offsetAndAlign) return;
|
|
18966
|
+
const [offset3, align] = offsetAndAlign;
|
|
18967
|
+
this._scrollToOffset(offset3, { adjustments: void 0, behavior });
|
|
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
|
+
});
|
|
18631
18985
|
}
|
|
18632
|
-
return target.scrollTop <= threshold.value / 100 + clientHeight - target.scrollHeight + 1;
|
|
18633
18986
|
};
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18987
|
+
this.scrollBy = (delta, { behavior } = {}) => {
|
|
18988
|
+
this.cancelScrollToIndex();
|
|
18989
|
+
if (behavior === "smooth" && this.isDynamicMode()) {
|
|
18990
|
+
console.warn(
|
|
18991
|
+
"The `smooth` scroll behavior is not fully supported with dynamic size."
|
|
18992
|
+
);
|
|
18637
18993
|
}
|
|
18638
|
-
|
|
18639
|
-
|
|
18640
|
-
|
|
18641
|
-
|
|
18994
|
+
this._scrollToOffset(this.getScrollOffset() + delta, {
|
|
18995
|
+
adjustments: void 0,
|
|
18996
|
+
behavior
|
|
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
|
+
);
|
|
18642
19009
|
}
|
|
18643
|
-
return
|
|
19010
|
+
return end2 - this.options.scrollMargin + this.options.paddingEnd;
|
|
18644
19011
|
};
|
|
18645
|
-
|
|
18646
|
-
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
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
|
-
);
|
|
19012
|
+
this._scrollToOffset = (offset3, {
|
|
19013
|
+
adjustments,
|
|
19014
|
+
behavior
|
|
19015
|
+
}) => {
|
|
19016
|
+
this.options.scrollToFn(offset3, { behavior, adjustments }, this);
|
|
18676
19017
|
};
|
|
18677
|
-
|
|
18678
|
-
|
|
18679
|
-
);
|
|
19018
|
+
this.measure = () => {
|
|
19019
|
+
this.itemSizeCache = /* @__PURE__ */ new Map();
|
|
19020
|
+
this.notify(false);
|
|
19021
|
+
};
|
|
19022
|
+
this.setOptions(opts);
|
|
19023
|
+
}
|
|
19024
|
+
}
|
|
19025
|
+
const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
|
|
19026
|
+
while (low <= high) {
|
|
19027
|
+
const middle = (low + high) / 2 | 0;
|
|
19028
|
+
const currentValue = getCurrentValue(middle);
|
|
19029
|
+
if (currentValue < value) {
|
|
19030
|
+
low = middle + 1;
|
|
19031
|
+
} else if (currentValue > value) {
|
|
19032
|
+
high = middle - 1;
|
|
19033
|
+
} else {
|
|
19034
|
+
return middle;
|
|
19035
|
+
}
|
|
19036
|
+
}
|
|
19037
|
+
if (low > 0) {
|
|
19038
|
+
return low - 1;
|
|
19039
|
+
} else {
|
|
19040
|
+
return 0;
|
|
19041
|
+
}
|
|
19042
|
+
};
|
|
19043
|
+
function calculateRange({
|
|
19044
|
+
measurements,
|
|
19045
|
+
outerSize,
|
|
19046
|
+
scrollOffset
|
|
19047
|
+
}) {
|
|
19048
|
+
const count2 = measurements.length - 1;
|
|
19049
|
+
const getOffset2 = (index2) => measurements[index2].start;
|
|
19050
|
+
const startIndex = findNearestBinarySearch(0, count2, getOffset2, scrollOffset);
|
|
19051
|
+
let endIndex = startIndex;
|
|
19052
|
+
while (endIndex < count2 && measurements[endIndex].end < scrollOffset + outerSize) {
|
|
19053
|
+
endIndex++;
|
|
19054
|
+
}
|
|
19055
|
+
return { startIndex, endIndex };
|
|
19056
|
+
}
|
|
19057
|
+
const useIsomorphicLayoutEffect$4 = typeof document !== "undefined" ? React$4.useLayoutEffect : React$4.useEffect;
|
|
19058
|
+
function useVirtualizerBase(options) {
|
|
19059
|
+
const rerender = React$4.useReducer(() => ({}), {})[1];
|
|
19060
|
+
const resolvedOptions = {
|
|
19061
|
+
...options,
|
|
19062
|
+
onChange: (instance2, sync2) => {
|
|
19063
|
+
var _a2;
|
|
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
|
+
}
|
|
18680
19092
|
const inputInTable$8 = "_inputInTable_1llou_1";
|
|
18681
19093
|
const inputHover$8 = "_inputHover_1llou_13";
|
|
18682
19094
|
const inputFocus$8 = "_inputFocus_1llou_18";
|
|
@@ -18881,95 +19293,264 @@ const getItemStyle = (draggableProps, item2) => {
|
|
|
18881
19293
|
};
|
|
18882
19294
|
};
|
|
18883
19295
|
const ListRow = forwardRef(
|
|
18884
|
-
({
|
|
19296
|
+
({ item: item2, index: index2, expanding, invokeEditOnRowClick, provided, draggable: draggable2 }, listRowRefs) => {
|
|
18885
19297
|
const disabledContext = useContext(DisabledContext);
|
|
18886
|
-
const listElement = (
|
|
18887
|
-
const Component2 =
|
|
18888
|
-
return /* @__PURE__ */
|
|
19298
|
+
const listElement = (index22, provided2, item22, indent2, hasOnClick2, edit22) => {
|
|
19299
|
+
const Component2 = item22.component || "a";
|
|
19300
|
+
return /* @__PURE__ */ jsx(
|
|
18889
19301
|
Component2,
|
|
18890
19302
|
{
|
|
18891
|
-
href:
|
|
18892
|
-
to:
|
|
18893
|
-
|
|
18894
|
-
...provided2.draggableProps,
|
|
18895
|
-
style: getItemStyle(provided2.draggableProps, item2),
|
|
19303
|
+
href: item22.url,
|
|
19304
|
+
to: item22.url,
|
|
19305
|
+
style: getItemStyle(provided2 == null ? void 0 : provided2.draggableProps, item22),
|
|
18896
19306
|
className: cx$2(
|
|
18897
19307
|
listStyles.item,
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
19308
|
+
item22.active ? listStyles.active : "",
|
|
19309
|
+
item22.disabled || disabledContext ? listStyles.disabled : "",
|
|
19310
|
+
hasOnClick2 ? listStyles.action : ""
|
|
18901
19311
|
),
|
|
18902
19312
|
onClick: (evt) => {
|
|
18903
|
-
if (invokeEditOnRowClick &&
|
|
18904
|
-
if (
|
|
19313
|
+
if (invokeEditOnRowClick && edit22) {
|
|
19314
|
+
if (edit22.onClick) edit22.onClick(evt, item22.id);
|
|
18905
19315
|
}
|
|
18906
|
-
if (
|
|
18907
|
-
return
|
|
19316
|
+
if (item22.onClick) {
|
|
19317
|
+
return item22.onClick(evt);
|
|
18908
19318
|
}
|
|
18909
19319
|
},
|
|
18910
|
-
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
"
|
|
19320
|
+
"data-id": index22,
|
|
19321
|
+
title: item22.title,
|
|
19322
|
+
"data-testid": item22.testId,
|
|
19323
|
+
children: /* @__PURE__ */ jsxs("div", { style: { paddingLeft: indent2 }, children: [
|
|
19324
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.itemHeader, children: [
|
|
19325
|
+
draggable2 && /* @__PURE__ */ jsx(
|
|
19326
|
+
"div",
|
|
19327
|
+
{
|
|
19328
|
+
className: listStyles.drag,
|
|
19329
|
+
...provided2.dragHandleProps,
|
|
19330
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
19331
|
+
}
|
|
19332
|
+
),
|
|
19333
|
+
item22.level && item22.level > 0 ? /* @__PURE__ */ jsx("div", { className: listStyles.indentIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.INDENT }) }) : null,
|
|
19334
|
+
/* @__PURE__ */ jsx(Label$1, { label: item22.label }),
|
|
19335
|
+
/* @__PURE__ */ jsx(MetaContent, { item: item22 }),
|
|
19336
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.right, children: [
|
|
19337
|
+
/* @__PURE__ */ jsx(MetaCount, { item: item22 }),
|
|
19338
|
+
!(item22.disabled || disabledContext) && item22.actions && /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: item22.actions }) })
|
|
19339
|
+
] })
|
|
19340
|
+
] }),
|
|
19341
|
+
/* @__PURE__ */ jsx(ItemContent, { item: item22, expanding })
|
|
19342
|
+
] })
|
|
18914
19343
|
},
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
18926
|
-
|
|
18927
|
-
|
|
19344
|
+
index22
|
|
19345
|
+
);
|
|
19346
|
+
};
|
|
19347
|
+
const isSubheading = item2.type === "Heading";
|
|
19348
|
+
const edit2 = item2.actions && item2.actions.find(
|
|
19349
|
+
(a2) => {
|
|
19350
|
+
var _a2;
|
|
19351
|
+
return a2.label && ((_a2 = String(a2.label)) == null ? void 0 : _a2.toLowerCase()) === "edit";
|
|
19352
|
+
}
|
|
19353
|
+
);
|
|
19354
|
+
const hasOnClick = !!(edit2 || item2.url || item2.onClick);
|
|
19355
|
+
const indent = item2.level && item2.level > 1 ? (item2.level - 1) * 20 : 0;
|
|
19356
|
+
return isSubheading ? /* @__PURE__ */ jsx(ListSubheading, { item: item2, index: index2 }) : listElement(index2, provided, item2, indent, hasOnClick, edit2);
|
|
19357
|
+
}
|
|
19358
|
+
);
|
|
19359
|
+
const ListDroppableWrapper = ({
|
|
19360
|
+
onListReorder,
|
|
19361
|
+
children,
|
|
19362
|
+
list: list2,
|
|
19363
|
+
draggable: draggable2,
|
|
19364
|
+
expanding
|
|
19365
|
+
}) => {
|
|
19366
|
+
if (!draggable2) {
|
|
19367
|
+
return children();
|
|
19368
|
+
}
|
|
19369
|
+
return /* @__PURE__ */ jsx(
|
|
19370
|
+
DragDropContext,
|
|
19371
|
+
{
|
|
19372
|
+
onDragEnd: (result) => {
|
|
19373
|
+
var _a2, _b;
|
|
19374
|
+
const from3 = (_a2 = result == null ? void 0 : result.source) == null ? void 0 : _a2.index;
|
|
19375
|
+
const to2 = (_b = result == null ? void 0 : result.destination) == null ? void 0 : _b.index;
|
|
19376
|
+
onListReorder({ from: from3, to: to2 });
|
|
19377
|
+
},
|
|
19378
|
+
children: /* @__PURE__ */ jsx(
|
|
19379
|
+
ConnectedDroppable,
|
|
19380
|
+
{
|
|
19381
|
+
droppableId: "droppable",
|
|
19382
|
+
mode: "virtual",
|
|
19383
|
+
renderClone: (provided, snapshot, rubric) => {
|
|
19384
|
+
return /* @__PURE__ */ jsx(
|
|
19385
|
+
"div",
|
|
19386
|
+
{
|
|
19387
|
+
...provided.draggableProps,
|
|
19388
|
+
ref: provided.innerRef,
|
|
19389
|
+
style: {
|
|
19390
|
+
height: 36,
|
|
19391
|
+
width: "100%",
|
|
19392
|
+
display: "flex",
|
|
19393
|
+
alignItems: "center"
|
|
19394
|
+
},
|
|
19395
|
+
children: /* @__PURE__ */ jsx(
|
|
19396
|
+
ListRow,
|
|
18928
19397
|
{
|
|
18929
|
-
|
|
18930
|
-
|
|
18931
|
-
|
|
19398
|
+
draggable: draggable2,
|
|
19399
|
+
item: list2.items[rubric.source.index],
|
|
19400
|
+
expanding,
|
|
19401
|
+
onListReorder,
|
|
19402
|
+
index: rubric.source.index,
|
|
19403
|
+
provided
|
|
18932
19404
|
}
|
|
18933
|
-
)
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
19405
|
+
)
|
|
19406
|
+
}
|
|
19407
|
+
);
|
|
19408
|
+
},
|
|
19409
|
+
children: (provided) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
19410
|
+
children(provided),
|
|
19411
|
+
provided.placeholder
|
|
19412
|
+
] })
|
|
19413
|
+
}
|
|
19414
|
+
)
|
|
19415
|
+
}
|
|
19416
|
+
);
|
|
19417
|
+
};
|
|
19418
|
+
const List = ({
|
|
19419
|
+
list: list2,
|
|
19420
|
+
bordered: bordered2 = false,
|
|
19421
|
+
expanding = false,
|
|
19422
|
+
narrow: narrow2 = false,
|
|
19423
|
+
toggleNarrow: toggleNarrow2 = false,
|
|
19424
|
+
onToggleNarrow = () => {
|
|
19425
|
+
},
|
|
19426
|
+
invokeEditOnRowClick = true,
|
|
19427
|
+
noHeader = false,
|
|
19428
|
+
stickyHeader: stickyHeader2,
|
|
19429
|
+
draggable: draggable2 = false,
|
|
19430
|
+
onListReorder = () => {
|
|
19431
|
+
},
|
|
19432
|
+
marginBottom = 0,
|
|
19433
|
+
height: height2,
|
|
19434
|
+
testId,
|
|
19435
|
+
scrollDetails = {
|
|
19436
|
+
scrollable: false,
|
|
19437
|
+
hideScrollbar: false,
|
|
19438
|
+
triggerScrollToActiveItem: false,
|
|
19439
|
+
infiniteScroll: false,
|
|
19440
|
+
limit: 10,
|
|
19441
|
+
infiniteScrollTarget: void 0
|
|
19442
|
+
}
|
|
19443
|
+
}) => {
|
|
19444
|
+
const { scrollable, hideScrollbar: hideScrollbar2, triggerScrollToActiveItem } = scrollDetails;
|
|
19445
|
+
const listContainerRef = useRef(null);
|
|
19446
|
+
const virtualizer = useVirtualizer({
|
|
19447
|
+
count: list2.items.length,
|
|
19448
|
+
getScrollElement: () => listContainerRef.current,
|
|
19449
|
+
estimateSize: () => 36,
|
|
19450
|
+
overscan: 5
|
|
19451
|
+
});
|
|
19452
|
+
useEffect(() => {
|
|
19453
|
+
if (triggerScrollToActiveItem) {
|
|
19454
|
+
const activeItemIndex = list2.items.findIndex(
|
|
19455
|
+
(item2) => item2.active === true
|
|
18946
19456
|
);
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
19457
|
+
if (activeItemIndex !== -1) {
|
|
19458
|
+
virtualizer.scrollToIndex(activeItemIndex, { align: "center" });
|
|
19459
|
+
}
|
|
19460
|
+
}
|
|
19461
|
+
}, [list2.items, triggerScrollToActiveItem]);
|
|
19462
|
+
const renderItem = (virtualRow, dragProvided) => {
|
|
19463
|
+
return /* @__PURE__ */ jsx(
|
|
19464
|
+
"div",
|
|
19465
|
+
{
|
|
19466
|
+
ref: dragProvided == null ? void 0 : dragProvided.innerRef,
|
|
19467
|
+
...dragProvided == null ? void 0 : dragProvided.draggableProps,
|
|
19468
|
+
"data-index": virtualRow.index,
|
|
19469
|
+
style: {
|
|
19470
|
+
...dragProvided == null ? void 0 : dragProvided.draggableProps.style,
|
|
19471
|
+
position: "absolute",
|
|
19472
|
+
top: 0,
|
|
19473
|
+
left: 0,
|
|
19474
|
+
width: "100%",
|
|
19475
|
+
height: `${virtualRow.size}px`,
|
|
19476
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
19477
|
+
},
|
|
19478
|
+
children: /* @__PURE__ */ jsx("div", { ref: virtualizer.measureElement, "data-index": virtualRow.index, children: /* @__PURE__ */ jsx(
|
|
19479
|
+
ListRow,
|
|
19480
|
+
{
|
|
19481
|
+
index: virtualRow.index,
|
|
19482
|
+
draggable: draggable2,
|
|
19483
|
+
item: list2.items[virtualRow.index],
|
|
19484
|
+
expanding,
|
|
19485
|
+
invokeEditOnRowClick,
|
|
19486
|
+
onListReorder,
|
|
19487
|
+
provided: dragProvided
|
|
18955
19488
|
}
|
|
18956
|
-
)
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
|
|
19489
|
+
) })
|
|
19490
|
+
}
|
|
19491
|
+
);
|
|
19492
|
+
};
|
|
19493
|
+
return /* @__PURE__ */ jsx(Card, { bordered: bordered2, padding: false, children: /* @__PURE__ */ jsxs(
|
|
19494
|
+
"div",
|
|
19495
|
+
{
|
|
19496
|
+
className: cx$2(
|
|
19497
|
+
listStyles.scrollableList,
|
|
19498
|
+
narrow2 ? listStyles.narrow : "",
|
|
19499
|
+
hideScrollbar2 ? listStyles.hideScrollbar : ""
|
|
19500
|
+
),
|
|
19501
|
+
"data-testid": testId,
|
|
19502
|
+
style: { height: height2, marginBottom },
|
|
19503
|
+
ref: listContainerRef,
|
|
19504
|
+
children: [
|
|
19505
|
+
!noHeader && /* @__PURE__ */ jsx(
|
|
19506
|
+
ListHeading,
|
|
18961
19507
|
{
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
18967
|
-
|
|
18968
|
-
|
|
18969
|
-
|
|
18970
|
-
|
|
18971
|
-
|
|
18972
|
-
|
|
19508
|
+
name: list2.name,
|
|
19509
|
+
actions: list2.actions,
|
|
19510
|
+
toggleNarrow: toggleNarrow2,
|
|
19511
|
+
onToggleNarrow,
|
|
19512
|
+
stickyHeader: stickyHeader2
|
|
19513
|
+
}
|
|
19514
|
+
),
|
|
19515
|
+
/* @__PURE__ */ jsx(
|
|
19516
|
+
ListDroppableWrapper,
|
|
19517
|
+
{
|
|
19518
|
+
onListReorder,
|
|
19519
|
+
list: list2,
|
|
19520
|
+
draggable: draggable2,
|
|
19521
|
+
expanding,
|
|
19522
|
+
children: (provided, snapshot) => {
|
|
19523
|
+
return /* @__PURE__ */ jsx(
|
|
19524
|
+
"div",
|
|
19525
|
+
{
|
|
19526
|
+
className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""),
|
|
19527
|
+
style: {
|
|
19528
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
19529
|
+
width: "100%",
|
|
19530
|
+
position: "relative"
|
|
19531
|
+
},
|
|
19532
|
+
ref: provided == null ? void 0 : provided.innerRef,
|
|
19533
|
+
...provided == null ? void 0 : provided.droppableProps,
|
|
19534
|
+
children: virtualizer.getVirtualItems().map(
|
|
19535
|
+
(virtualRow) => draggable2 ? /* @__PURE__ */ jsx(
|
|
19536
|
+
PublicDraggable,
|
|
19537
|
+
{
|
|
19538
|
+
draggableId: virtualRow.index.toString(),
|
|
19539
|
+
index: virtualRow.index,
|
|
19540
|
+
children: (dragProvided, dragSnapshot) => renderItem(virtualRow, dragProvided)
|
|
19541
|
+
},
|
|
19542
|
+
virtualRow.index
|
|
19543
|
+
) : /* @__PURE__ */ jsx(Fragment$2, { children: renderItem(virtualRow) }, virtualRow.index)
|
|
19544
|
+
)
|
|
19545
|
+
}
|
|
19546
|
+
);
|
|
19547
|
+
}
|
|
19548
|
+
}
|
|
19549
|
+
)
|
|
19550
|
+
]
|
|
19551
|
+
}
|
|
19552
|
+
) });
|
|
19553
|
+
};
|
|
18973
19554
|
const loader = "_loader_477i5_1";
|
|
18974
19555
|
const fullViewPortSize = "_fullViewPortSize_477i5_7";
|
|
18975
19556
|
const cover = "_cover_477i5_14";
|
|
@@ -19036,178 +19617,6 @@ const Loader = ({
|
|
|
19036
19617
|
}
|
|
19037
19618
|
);
|
|
19038
19619
|
};
|
|
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
|
-
};
|
|
19211
19620
|
const inputInTable$7 = "_inputInTable_1okhq_1";
|
|
19212
19621
|
const inputHover$7 = "_inputHover_1okhq_13";
|
|
19213
19622
|
const inputFocus$7 = "_inputFocus_1okhq_18";
|
|
@@ -19967,7 +20376,7 @@ const useFontsReady = () => {
|
|
|
19967
20376
|
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
19968
20377
|
const useWindowWidth = () => {
|
|
19969
20378
|
const [width2, setWidth] = useState(getWidth());
|
|
19970
|
-
const resizeListener = debounce$
|
|
20379
|
+
const resizeListener = debounce$3(() => setWidth(getWidth()), 150);
|
|
19971
20380
|
useEffect(() => {
|
|
19972
20381
|
window.addEventListener("resize", resizeListener);
|
|
19973
20382
|
return () => {
|
|
@@ -52655,7 +53064,7 @@ const styles$d = {
|
|
|
52655
53064
|
active: active$2,
|
|
52656
53065
|
icon: icon$1
|
|
52657
53066
|
};
|
|
52658
|
-
const TooltipIcon = memo(
|
|
53067
|
+
const TooltipIcon = memo$1(
|
|
52659
53068
|
({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
|
|
52660
53069
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52661
53070
|
/* @__PURE__ */ jsx(
|
|
@@ -52730,7 +53139,7 @@ const Sections = ({
|
|
|
52730
53139
|
)
|
|
52731
53140
|
] }, i)) });
|
|
52732
53141
|
};
|
|
52733
|
-
const SideBar = memo(
|
|
53142
|
+
const SideBar = memo$1(
|
|
52734
53143
|
({
|
|
52735
53144
|
options,
|
|
52736
53145
|
startOpen = false,
|
|
@@ -55327,18 +55736,18 @@ const Spacer = ({
|
|
|
55327
55736
|
}
|
|
55328
55737
|
}
|
|
55329
55738
|
);
|
|
55330
|
-
const inputInTable$2 = "
|
|
55331
|
-
const inputHover$2 = "
|
|
55332
|
-
const inputFocus$2 = "
|
|
55333
|
-
const inputError$2 = "
|
|
55334
|
-
const inputWarning$2 = "
|
|
55335
|
-
const inputDisabled$2 = "
|
|
55336
|
-
const hideScrollbars$2 = "
|
|
55337
|
-
const wrapper = "
|
|
55338
|
-
const bordered = "
|
|
55339
|
-
const scroll2 = "
|
|
55340
|
-
const table = "
|
|
55341
|
-
const striped = "
|
|
55739
|
+
const inputInTable$2 = "_inputInTable_sqhcz_1";
|
|
55740
|
+
const inputHover$2 = "_inputHover_sqhcz_13";
|
|
55741
|
+
const inputFocus$2 = "_inputFocus_sqhcz_18";
|
|
55742
|
+
const inputError$2 = "_inputError_sqhcz_25";
|
|
55743
|
+
const inputWarning$2 = "_inputWarning_sqhcz_26";
|
|
55744
|
+
const inputDisabled$2 = "_inputDisabled_sqhcz_61";
|
|
55745
|
+
const hideScrollbars$2 = "_hideScrollbars_sqhcz_67";
|
|
55746
|
+
const wrapper = "_wrapper_sqhcz_85";
|
|
55747
|
+
const bordered = "_bordered_sqhcz_93";
|
|
55748
|
+
const scroll2 = "_scroll_sqhcz_98";
|
|
55749
|
+
const table = "_table_sqhcz_108";
|
|
55750
|
+
const striped = "_striped_sqhcz_186";
|
|
55342
55751
|
const styles$b = {
|
|
55343
55752
|
inputInTable: inputInTable$2,
|
|
55344
55753
|
inputHover: inputHover$2,
|
|
@@ -55437,33 +55846,24 @@ const hasRowActions = (rows, headers) => {
|
|
|
55437
55846
|
};
|
|
55438
55847
|
const TableScrollWrapper = ({
|
|
55439
55848
|
table: table2,
|
|
55440
|
-
children
|
|
55849
|
+
children,
|
|
55850
|
+
headerRef
|
|
55441
55851
|
}) => {
|
|
55852
|
+
var _a2;
|
|
55442
55853
|
const { rows, infiniteScroll } = table2;
|
|
55443
|
-
const
|
|
55444
|
-
const
|
|
55445
|
-
|
|
55446
|
-
|
|
55447
|
-
|
|
55448
|
-
|
|
55449
|
-
|
|
55450
|
-
|
|
55451
|
-
|
|
55452
|
-
|
|
55453
|
-
|
|
55454
|
-
|
|
55455
|
-
|
|
55456
|
-
InfiniteScroll,
|
|
55457
|
-
{
|
|
55458
|
-
dataLength: Math.min(rows.length, visibleRows + pageSize),
|
|
55459
|
-
next: loadMoreItems,
|
|
55460
|
-
hasMore,
|
|
55461
|
-
scrollableTarget: "scrollWrapper",
|
|
55462
|
-
style: { overflow: "initial" },
|
|
55463
|
-
loader: null,
|
|
55464
|
-
children: children({ visibleRows })
|
|
55465
|
-
}
|
|
55466
|
-
) : children({ visibleRows }) });
|
|
55854
|
+
const scrollRef = useRef(null);
|
|
55855
|
+
const virtualizer = useVirtualizer({
|
|
55856
|
+
count: rows.length,
|
|
55857
|
+
getScrollElement: () => scrollRef.current,
|
|
55858
|
+
estimateSize: () => 31,
|
|
55859
|
+
overscan: 10
|
|
55860
|
+
});
|
|
55861
|
+
const totalHeight = virtualizer.getTotalSize() + (((_a2 = headerRef == null ? void 0 : headerRef.current) == null ? void 0 : _a2.clientHeight) || 0);
|
|
55862
|
+
return /* @__PURE__ */ jsx("div", { ref: scrollRef, className: styles$b.scroll, children: /* @__PURE__ */ jsx("div", { style: { minHeight: totalHeight }, children: children({
|
|
55863
|
+
virtualItems: virtualizer.getVirtualItems(),
|
|
55864
|
+
isScrolling: virtualizer.isScrolling,
|
|
55865
|
+
scrollOffset: virtualizer.scrollOffset
|
|
55866
|
+
}) }) });
|
|
55467
55867
|
};
|
|
55468
55868
|
const clickableRow = "_clickableRow_m64j5_1";
|
|
55469
55869
|
const hoverableRow = "_hoverableRow_m64j5_4";
|
|
@@ -56174,9 +56574,11 @@ const Row = ({
|
|
|
56174
56574
|
provided = null,
|
|
56175
56575
|
width: width2,
|
|
56176
56576
|
columnWidths,
|
|
56577
|
+
style: style2,
|
|
56177
56578
|
testId
|
|
56178
56579
|
//TODO: add testId
|
|
56179
56580
|
}) => {
|
|
56581
|
+
var _a2;
|
|
56180
56582
|
const targetRef = useRef(null);
|
|
56181
56583
|
const columnHeaderAlignment = getHeaderAlignment(
|
|
56182
56584
|
columnHeaderAlignments,
|
|
@@ -56220,7 +56622,8 @@ const Row = ({
|
|
|
56220
56622
|
},
|
|
56221
56623
|
columnCount
|
|
56222
56624
|
);
|
|
56223
|
-
const
|
|
56625
|
+
const getDraggingStyle2 = (isDragging, draggableStyle) => {
|
|
56626
|
+
if (!snapshot || !provided) return null;
|
|
56224
56627
|
return {
|
|
56225
56628
|
minWidth: isDragging && `${width2}px`,
|
|
56226
56629
|
width: isDragging && "100%",
|
|
@@ -56236,7 +56639,7 @@ const Row = ({
|
|
|
56236
56639
|
if (row2.noDrag) {
|
|
56237
56640
|
return /* @__PURE__ */ jsx("td", { "aria-labelledby": "unique-label-id" });
|
|
56238
56641
|
}
|
|
56239
|
-
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 }) }) });
|
|
56642
|
+
return /* @__PURE__ */ jsx("td", { className: styles$8.dragIconCell, children: /* @__PURE__ */ jsx("div", { ...provided == null ? void 0 : provided.dragHandleProps, className: styles$8.dragIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG }) }) });
|
|
56240
56643
|
};
|
|
56241
56644
|
return isHeader ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
56242
56645
|
/* @__PURE__ */ jsxs(
|
|
@@ -56288,7 +56691,13 @@ const Row = ({
|
|
|
56288
56691
|
"data-warning": warning2 || null,
|
|
56289
56692
|
ref: (provided == null ? void 0 : provided.innerRef) || null,
|
|
56290
56693
|
...(provided == null ? void 0 : provided.draggableProps) || null,
|
|
56291
|
-
style:
|
|
56694
|
+
style: {
|
|
56695
|
+
...style2,
|
|
56696
|
+
...getDraggingStyle2(
|
|
56697
|
+
snapshot == null ? void 0 : snapshot.isDragging,
|
|
56698
|
+
(_a2 = provided == null ? void 0 : provided.draggableProps) == null ? void 0 : _a2.style
|
|
56699
|
+
)
|
|
56700
|
+
},
|
|
56292
56701
|
children: [
|
|
56293
56702
|
draggableTable ? getDragItem() : null,
|
|
56294
56703
|
cells,
|
|
@@ -56330,16 +56739,8 @@ const Table = (props) => {
|
|
|
56330
56739
|
maxHeight,
|
|
56331
56740
|
fixedWidth: width2
|
|
56332
56741
|
} = propTable;
|
|
56333
|
-
|
|
56334
|
-
const
|
|
56335
|
-
useEffect(() => {
|
|
56336
|
-
if (targetRef.current) {
|
|
56337
|
-
setDimensions({
|
|
56338
|
-
width: targetRef.current.offsetWidth,
|
|
56339
|
-
height: targetRef.current.offsetHeight
|
|
56340
|
-
});
|
|
56341
|
-
}
|
|
56342
|
-
}, []);
|
|
56742
|
+
useRef(null);
|
|
56743
|
+
const headerRef = useRef(null);
|
|
56343
56744
|
const headers = get$2(props, "table.headers", []);
|
|
56344
56745
|
const columnCount = getColumnCount(propRows, headers);
|
|
56345
56746
|
const rowActions = hasRowActions(propRows, headers);
|
|
@@ -56390,7 +56791,7 @@ const Table = (props) => {
|
|
|
56390
56791
|
// Collapse width if width = auto
|
|
56391
56792
|
display: width2 === "auto" ? "inline-flex" : "flex"
|
|
56392
56793
|
};
|
|
56393
|
-
return
|
|
56794
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, style: wrapperStyles, children: [
|
|
56394
56795
|
/* @__PURE__ */ jsx(
|
|
56395
56796
|
Title$1,
|
|
56396
56797
|
{
|
|
@@ -56411,40 +56812,96 @@ const Table = (props) => {
|
|
|
56411
56812
|
onListReorder({ from: from3, to: to2 });
|
|
56412
56813
|
}
|
|
56413
56814
|
},
|
|
56414
|
-
children: /* @__PURE__ */ jsx(
|
|
56415
|
-
|
|
56416
|
-
|
|
56417
|
-
|
|
56418
|
-
|
|
56419
|
-
|
|
56420
|
-
|
|
56421
|
-
|
|
56422
|
-
|
|
56423
|
-
|
|
56424
|
-
|
|
56425
|
-
|
|
56426
|
-
|
|
56427
|
-
|
|
56428
|
-
|
|
56429
|
-
|
|
56430
|
-
|
|
56431
|
-
|
|
56432
|
-
|
|
56433
|
-
|
|
56434
|
-
|
|
56435
|
-
|
|
56436
|
-
|
|
56437
|
-
|
|
56438
|
-
|
|
56439
|
-
|
|
56440
|
-
|
|
56441
|
-
|
|
56442
|
-
|
|
56443
|
-
|
|
56444
|
-
|
|
56445
|
-
|
|
56446
|
-
|
|
56447
|
-
|
|
56815
|
+
children: /* @__PURE__ */ jsx(
|
|
56816
|
+
ConnectedDroppable,
|
|
56817
|
+
{
|
|
56818
|
+
droppableId: "droppable",
|
|
56819
|
+
mode: "virtual",
|
|
56820
|
+
renderClone: (provided, snapshot, rubric) => {
|
|
56821
|
+
return /* @__PURE__ */ jsx(
|
|
56822
|
+
Row,
|
|
56823
|
+
{
|
|
56824
|
+
rowIndex: rubric.source.index,
|
|
56825
|
+
row: rows[rubric.source.index],
|
|
56826
|
+
columnCount,
|
|
56827
|
+
columnWidths,
|
|
56828
|
+
colSpan,
|
|
56829
|
+
hasRowActions: rowActions,
|
|
56830
|
+
columnAlignment,
|
|
56831
|
+
columnHeaderAlignments,
|
|
56832
|
+
draggableTable: draggable2,
|
|
56833
|
+
...provided.draggableProps
|
|
56834
|
+
}
|
|
56835
|
+
);
|
|
56836
|
+
},
|
|
56837
|
+
children: (provided) => {
|
|
56838
|
+
return /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, headerRef, children: ({ virtualItems, isScrolling, scrollOffset }) => /* @__PURE__ */ jsxs(
|
|
56839
|
+
"table",
|
|
56840
|
+
{
|
|
56841
|
+
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
56842
|
+
"data-testid": testId,
|
|
56843
|
+
ref: provided.innerRef,
|
|
56844
|
+
children: [
|
|
56845
|
+
/* @__PURE__ */ jsx(
|
|
56846
|
+
"thead",
|
|
56847
|
+
{
|
|
56848
|
+
ref: headerRef,
|
|
56849
|
+
style: {
|
|
56850
|
+
position: "relative",
|
|
56851
|
+
transition: "transform 0.2s",
|
|
56852
|
+
transform: !isScrolling ? `translateY(${scrollOffset}px)` : "translateY(0px)"
|
|
56853
|
+
},
|
|
56854
|
+
children: headers.map((row2, rowIndex) => {
|
|
56855
|
+
return /* @__PURE__ */ jsx(
|
|
56856
|
+
Row,
|
|
56857
|
+
{
|
|
56858
|
+
rowIndex,
|
|
56859
|
+
isHeader: true,
|
|
56860
|
+
row: row2,
|
|
56861
|
+
columnCount,
|
|
56862
|
+
columnWidths,
|
|
56863
|
+
colSpan,
|
|
56864
|
+
hasRowActions: rowActions,
|
|
56865
|
+
columnAlignment,
|
|
56866
|
+
columnHeaderAlignments,
|
|
56867
|
+
draggableTable: draggable2
|
|
56868
|
+
},
|
|
56869
|
+
`0_${rowIndex}`
|
|
56870
|
+
);
|
|
56871
|
+
})
|
|
56872
|
+
}
|
|
56873
|
+
),
|
|
56874
|
+
/* @__PURE__ */ jsx("tbody", { children: virtualItems.map((virtualRow, rowIndex) => {
|
|
56875
|
+
const row2 = rows[virtualRow.index];
|
|
56876
|
+
return draggable2 ? /* @__PURE__ */ jsx(
|
|
56877
|
+
PublicDraggable,
|
|
56878
|
+
{
|
|
56879
|
+
draggableId: rowIndex + "",
|
|
56880
|
+
index: rowIndex,
|
|
56881
|
+
isDragDisabled: row2.noDrag,
|
|
56882
|
+
children: (provided2, snapshot) => /* @__PURE__ */ jsx(
|
|
56883
|
+
Row,
|
|
56884
|
+
{
|
|
56885
|
+
rowIndex,
|
|
56886
|
+
row: row2,
|
|
56887
|
+
columnCount,
|
|
56888
|
+
columnWidths,
|
|
56889
|
+
colSpan,
|
|
56890
|
+
hasRowActions: rowActions,
|
|
56891
|
+
columnAlignment,
|
|
56892
|
+
style: {
|
|
56893
|
+
height: `${virtualRow.size}px`,
|
|
56894
|
+
transform: `translateY(${virtualRow.start - rowIndex * virtualRow.size}px)`
|
|
56895
|
+
},
|
|
56896
|
+
provided: provided2,
|
|
56897
|
+
snapshot,
|
|
56898
|
+
draggableTable: draggable2
|
|
56899
|
+
},
|
|
56900
|
+
`1_${rowIndex}`
|
|
56901
|
+
)
|
|
56902
|
+
},
|
|
56903
|
+
`index_${rowIndex}`
|
|
56904
|
+
) : /* @__PURE__ */ jsx(
|
|
56448
56905
|
Row,
|
|
56449
56906
|
{
|
|
56450
56907
|
rowIndex,
|
|
@@ -56454,81 +56911,22 @@ const Table = (props) => {
|
|
|
56454
56911
|
colSpan,
|
|
56455
56912
|
hasRowActions: rowActions,
|
|
56456
56913
|
columnAlignment,
|
|
56457
|
-
|
|
56458
|
-
|
|
56459
|
-
|
|
56460
|
-
|
|
56914
|
+
style: {
|
|
56915
|
+
height: `${virtualRow.size}px`,
|
|
56916
|
+
transform: `translateY(${virtualRow.start - rowIndex * virtualRow.size}px)`
|
|
56917
|
+
}
|
|
56461
56918
|
},
|
|
56462
56919
|
`1_${rowIndex}`
|
|
56463
|
-
)
|
|
56464
|
-
}
|
|
56465
|
-
|
|
56466
|
-
|
|
56467
|
-
|
|
56468
|
-
] })
|
|
56469
|
-
]
|
|
56920
|
+
);
|
|
56921
|
+
}) })
|
|
56922
|
+
]
|
|
56923
|
+
}
|
|
56924
|
+
) });
|
|
56470
56925
|
}
|
|
56471
|
-
|
|
56472
|
-
|
|
56473
|
-
}
|
|
56474
|
-
),
|
|
56475
|
-
footer2 && /* @__PURE__ */ jsx(
|
|
56476
|
-
Footer,
|
|
56477
|
-
{
|
|
56478
|
-
pagination: footer2.pagination,
|
|
56479
|
-
actions: footer2.actions,
|
|
56480
|
-
content: footer2.content
|
|
56481
|
-
}
|
|
56482
|
-
)
|
|
56483
|
-
] }) : /* @__PURE__ */ jsxs("div", { className: wrapperClass, style: wrapperStyles, children: [
|
|
56484
|
-
/* @__PURE__ */ jsx(
|
|
56485
|
-
Title$1,
|
|
56486
|
-
{
|
|
56487
|
-
actions: actions2,
|
|
56488
|
-
actionsRight,
|
|
56489
|
-
name: name2,
|
|
56490
|
-
testId: testId && `${testId}-title`
|
|
56926
|
+
}
|
|
56927
|
+
)
|
|
56491
56928
|
}
|
|
56492
56929
|
),
|
|
56493
|
-
/* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, children: ({ visibleRows }) => /* @__PURE__ */ jsxs(
|
|
56494
|
-
"table",
|
|
56495
|
-
{
|
|
56496
|
-
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
56497
|
-
"data-testid": testId,
|
|
56498
|
-
children: [
|
|
56499
|
-
/* @__PURE__ */ jsx("thead", { children: headers.map((row2, rowIndex) => {
|
|
56500
|
-
return /* @__PURE__ */ jsx(
|
|
56501
|
-
Row,
|
|
56502
|
-
{
|
|
56503
|
-
rowIndex,
|
|
56504
|
-
isHeader: true,
|
|
56505
|
-
row: row2,
|
|
56506
|
-
columnCount,
|
|
56507
|
-
columnWidths,
|
|
56508
|
-
colSpan,
|
|
56509
|
-
hasRowActions: rowActions,
|
|
56510
|
-
columnAlignment,
|
|
56511
|
-
columnHeaderAlignments
|
|
56512
|
-
},
|
|
56513
|
-
`0_${rowIndex}`
|
|
56514
|
-
);
|
|
56515
|
-
}) }),
|
|
56516
|
-
/* @__PURE__ */ jsx("tbody", { children: rows.slice(0, visibleRows).map((row2, rowIndex) => /* @__PURE__ */ jsx(
|
|
56517
|
-
Row,
|
|
56518
|
-
{
|
|
56519
|
-
rowIndex,
|
|
56520
|
-
row: row2,
|
|
56521
|
-
columnCount,
|
|
56522
|
-
columnWidths,
|
|
56523
|
-
colSpan,
|
|
56524
|
-
hasRowActions: rowActions,
|
|
56525
|
-
columnAlignment
|
|
56526
|
-
},
|
|
56527
|
-
`1_${rowIndex}`
|
|
56528
|
-
)) })
|
|
56529
|
-
]
|
|
56530
|
-
}
|
|
56531
|
-
) }),
|
|
56532
56930
|
footer2 && /* @__PURE__ */ jsx(
|
|
56533
56931
|
Footer,
|
|
56534
56932
|
{
|
|
@@ -59442,7 +59840,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
59442
59840
|
}
|
|
59443
59841
|
let refCount = 0;
|
|
59444
59842
|
const INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
59445
|
-
var DndProvider = /* @__PURE__ */ memo(function DndProvider2(_param) {
|
|
59843
|
+
var DndProvider = /* @__PURE__ */ memo$1(function DndProvider2(_param) {
|
|
59446
59844
|
var { children } = _param, props = _objectWithoutProperties(_param, [
|
|
59447
59845
|
"children"
|
|
59448
59846
|
]);
|
|
@@ -61803,7 +62201,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
|
|
|
61803
62201
|
var name_1 = featureNames[i];
|
|
61804
62202
|
var _a2 = featureDefinitions[name_1], isEnabled = _a2.isEnabled, Component2 = _a2.Component;
|
|
61805
62203
|
if (isEnabled(props) && Component2) {
|
|
61806
|
-
features.push(React$4.createElement(Component2, __assign$
|
|
62204
|
+
features.push(React$4.createElement(Component2, __assign$3({ key: name_1 }, props, { visualElement: visualElement2 })));
|
|
61807
62205
|
}
|
|
61808
62206
|
}
|
|
61809
62207
|
return features;
|
|
@@ -62044,7 +62442,7 @@ function useProjection(projectionId, _a2, visualElement2, ProjectionNodeConstruc
|
|
|
62044
62442
|
var VisualElementHandler = (
|
|
62045
62443
|
/** @class */
|
|
62046
62444
|
function(_super) {
|
|
62047
|
-
__extends
|
|
62445
|
+
__extends(VisualElementHandler2, _super);
|
|
62048
62446
|
function VisualElementHandler2() {
|
|
62049
62447
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62050
62448
|
}
|
|
@@ -62070,20 +62468,20 @@ function createMotionComponent(_a2) {
|
|
|
62070
62468
|
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
62071
62469
|
function MotionComponent(props, externalRef) {
|
|
62072
62470
|
var layoutId = useLayoutId(props);
|
|
62073
|
-
props = __assign$
|
|
62471
|
+
props = __assign$3(__assign$3({}, props), { layoutId });
|
|
62074
62472
|
var config2 = useContext(MotionConfigContext);
|
|
62075
62473
|
var features = null;
|
|
62076
62474
|
var context2 = useCreateMotionContext(props);
|
|
62077
62475
|
var projectionId = config2.isStatic ? void 0 : useProjectionId();
|
|
62078
62476
|
var visualState = useVisualState(props, config2.isStatic);
|
|
62079
62477
|
if (!config2.isStatic && isBrowser) {
|
|
62080
|
-
context2.visualElement = useVisualElement(Component2, visualState, __assign$
|
|
62478
|
+
context2.visualElement = useVisualElement(Component2, visualState, __assign$3(__assign$3({}, config2), props), createVisualElement);
|
|
62081
62479
|
useProjection(projectionId, props, context2.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
|
|
62082
62480
|
features = useFeatures(props, context2.visualElement, preloadedFeatures);
|
|
62083
62481
|
}
|
|
62084
62482
|
return React$4.createElement(
|
|
62085
62483
|
VisualElementHandler,
|
|
62086
|
-
{ visualElement: context2.visualElement, props: __assign$
|
|
62484
|
+
{ visualElement: context2.visualElement, props: __assign$3(__assign$3({}, config2), props) },
|
|
62087
62485
|
features,
|
|
62088
62486
|
React$4.createElement(MotionContext.Provider, { value: context2 }, useRender(Component2, props, projectionId, useMotionRef(visualState, context2.visualElement, externalRef), visualState, config2.isStatic, context2.visualElement))
|
|
62089
62487
|
);
|
|
@@ -62409,7 +62807,7 @@ const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v
|
|
|
62409
62807
|
const functions = v2.match(functionRegex);
|
|
62410
62808
|
return functions ? functions.map(applyDefaultFilter).join(" ") : v2;
|
|
62411
62809
|
} });
|
|
62412
|
-
var int = __assign$
|
|
62810
|
+
var int = __assign$3(__assign$3({}, number), { transform: Math.round });
|
|
62413
62811
|
var numberValueTypes = {
|
|
62414
62812
|
// Border props
|
|
62415
62813
|
borderWidth: px,
|
|
@@ -62539,7 +62937,7 @@ function useInitialMotionValues(_a2, visualState, isStatic) {
|
|
|
62539
62937
|
var state = createHtmlRenderState();
|
|
62540
62938
|
buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
|
|
62541
62939
|
var vars = state.vars, style2 = state.style;
|
|
62542
|
-
return __assign$
|
|
62940
|
+
return __assign$3(__assign$3({}, vars), style2);
|
|
62543
62941
|
}, [visualState]);
|
|
62544
62942
|
}
|
|
62545
62943
|
function useStyle(props, visualState, isStatic) {
|
|
@@ -62697,18 +63095,18 @@ function buildSVGAttrs(state, _a2, options, transformTemplate) {
|
|
|
62697
63095
|
}
|
|
62698
63096
|
}
|
|
62699
63097
|
var createSvgRenderState = function() {
|
|
62700
|
-
return __assign$
|
|
63098
|
+
return __assign$3(__assign$3({}, createHtmlRenderState()), { attrs: {} });
|
|
62701
63099
|
};
|
|
62702
63100
|
function useSVGProps(props, visualState) {
|
|
62703
63101
|
var visualProps = useMemo$1(function() {
|
|
62704
63102
|
var state = createSvgRenderState();
|
|
62705
63103
|
buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
|
|
62706
|
-
return __assign$
|
|
63104
|
+
return __assign$3(__assign$3({}, state.attrs), { style: __assign$3({}, state.style) });
|
|
62707
63105
|
}, [visualState]);
|
|
62708
63106
|
if (props.style) {
|
|
62709
63107
|
var rawStyles = {};
|
|
62710
63108
|
copyRawValuesOnly(rawStyles, props.style, props);
|
|
62711
|
-
visualProps.style = __assign$
|
|
63109
|
+
visualProps.style = __assign$3(__assign$3({}, rawStyles), visualProps.style);
|
|
62712
63110
|
}
|
|
62713
63111
|
return visualProps;
|
|
62714
63112
|
}
|
|
@@ -62721,7 +63119,7 @@ function createUseRender(forwardMotionProps) {
|
|
|
62721
63119
|
var useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
|
|
62722
63120
|
var visualProps = useVisualProps(props, latestValues, isStatic);
|
|
62723
63121
|
var filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
|
|
62724
|
-
var elementProps = __assign$
|
|
63122
|
+
var elementProps = __assign$3(__assign$3(__assign$3({}, filteredProps), visualProps), { ref: ref2 });
|
|
62725
63123
|
if (projectionId) {
|
|
62726
63124
|
elementProps["data-projection-id"] = projectionId;
|
|
62727
63125
|
}
|
|
@@ -62898,7 +63296,7 @@ var htmlMotionConfig = {
|
|
|
62898
63296
|
function createDomMotionConfig(Component2, _a2, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
|
|
62899
63297
|
var _b = _a2.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
|
|
62900
63298
|
var baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
|
|
62901
|
-
return __assign$
|
|
63299
|
+
return __assign$3(__assign$3({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
|
|
62902
63300
|
}
|
|
62903
63301
|
var AnimationType;
|
|
62904
63302
|
(function(AnimationType2) {
|
|
@@ -63985,7 +64383,7 @@ function initIntersectionObserver(_a2) {
|
|
|
63985
64383
|
var rootObservers = observers.get(lookupRoot);
|
|
63986
64384
|
var key2 = JSON.stringify(options);
|
|
63987
64385
|
if (!rootObservers[key2]) {
|
|
63988
|
-
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$
|
|
64386
|
+
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$3({ root: root2 }, options));
|
|
63989
64387
|
}
|
|
63990
64388
|
return rootObservers[key2];
|
|
63991
64389
|
}
|
|
@@ -64203,9 +64601,9 @@ var getDefaultTransition = function(valueKey, to2) {
|
|
|
64203
64601
|
} else {
|
|
64204
64602
|
transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
|
|
64205
64603
|
}
|
|
64206
|
-
return __assign$
|
|
64604
|
+
return __assign$3({ to: to2 }, transitionFactory(to2));
|
|
64207
64605
|
};
|
|
64208
|
-
var defaultValueTypes = __assign$
|
|
64606
|
+
var defaultValueTypes = __assign$3(__assign$3({}, numberValueTypes), {
|
|
64209
64607
|
// Color props
|
|
64210
64608
|
color,
|
|
64211
64609
|
backgroundColor: color,
|
|
@@ -64247,7 +64645,7 @@ function isTransitionDefined(_a2) {
|
|
|
64247
64645
|
var legacyRepeatWarning = false;
|
|
64248
64646
|
function convertTransitionToAnimationOptions(_a2) {
|
|
64249
64647
|
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"]);
|
|
64250
|
-
var options = __assign$
|
|
64648
|
+
var options = __assign$3({}, transition);
|
|
64251
64649
|
if (times)
|
|
64252
64650
|
options["offset"] = times;
|
|
64253
64651
|
if (transition.duration)
|
|
@@ -64294,9 +64692,9 @@ function getPopmotionAnimationOptions(transition, options, key2) {
|
|
|
64294
64692
|
}
|
|
64295
64693
|
hydrateKeyframes(options);
|
|
64296
64694
|
if (!isTransitionDefined(transition)) {
|
|
64297
|
-
transition = __assign$
|
|
64695
|
+
transition = __assign$3(__assign$3({}, transition), getDefaultTransition(key2, options.to));
|
|
64298
64696
|
}
|
|
64299
|
-
return __assign$
|
|
64697
|
+
return __assign$3(__assign$3({}, options), convertTransitionToAnimationOptions(transition));
|
|
64300
64698
|
}
|
|
64301
64699
|
function getAnimation(key2, value, target, transition, onComplete) {
|
|
64302
64700
|
var _a2;
|
|
@@ -64322,7 +64720,7 @@ function getAnimation(key2, value, target, transition, onComplete) {
|
|
|
64322
64720
|
return value.set(v2);
|
|
64323
64721
|
}
|
|
64324
64722
|
};
|
|
64325
|
-
return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$
|
|
64723
|
+
return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$3(__assign$3({}, options), valueTransition)) : animate$1(__assign$3(__assign$3({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
|
|
64326
64724
|
var _a3;
|
|
64327
64725
|
options.onUpdate(v2);
|
|
64328
64726
|
(_a3 = valueTransition.onUpdate) === null || _a3 === void 0 ? void 0 : _a3.call(valueTransition, v2);
|
|
@@ -64575,7 +64973,7 @@ function setTarget(visualElement2, definition) {
|
|
|
64575
64973
|
var _a2 = resolved ? visualElement2.makeTargetAnimatable(resolved, false) : {}, _b = _a2.transitionEnd, transitionEnd = _b === void 0 ? {} : _b;
|
|
64576
64974
|
_a2.transition;
|
|
64577
64975
|
var target = __rest$1(_a2, ["transitionEnd", "transition"]);
|
|
64578
|
-
target = __assign$
|
|
64976
|
+
target = __assign$3(__assign$3({}, target), transitionEnd);
|
|
64579
64977
|
for (var key2 in target) {
|
|
64580
64978
|
var value = resolveFinalValueInKeyframes(target[key2]);
|
|
64581
64979
|
setMotionValue(visualElement2, key2, value);
|
|
@@ -64693,9 +65091,9 @@ function animateTarget(visualElement2, definition, _a2) {
|
|
|
64693
65091
|
if (!value || valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key2)) {
|
|
64694
65092
|
continue;
|
|
64695
65093
|
}
|
|
64696
|
-
var valueTransition = __assign$
|
|
65094
|
+
var valueTransition = __assign$3({ delay }, transition);
|
|
64697
65095
|
if (visualElement2.shouldReduceMotion && isTransformProp(key2)) {
|
|
64698
|
-
valueTransition = __assign$
|
|
65096
|
+
valueTransition = __assign$3(__assign$3({}, valueTransition), { type: false, delay: 0 });
|
|
64699
65097
|
}
|
|
64700
65098
|
var animation = startAnimation(key2, value, valueTarget, valueTransition);
|
|
64701
65099
|
animations2.push(animation);
|
|
@@ -64728,7 +65126,7 @@ function animateChildren(visualElement2, variant, delayChildren, staggerChildren
|
|
|
64728
65126
|
return maxStaggerDuration - i * staggerChildren;
|
|
64729
65127
|
};
|
|
64730
65128
|
Array.from(visualElement2.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
|
|
64731
|
-
animations2.push(animateVariant(child, variant, __assign$
|
|
65129
|
+
animations2.push(animateVariant(child, variant, __assign$3(__assign$3({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
|
|
64732
65130
|
return child.notifyAnimationComplete(variant);
|
|
64733
65131
|
}));
|
|
64734
65132
|
});
|
|
@@ -64772,7 +65170,7 @@ function createAnimationState(visualElement2) {
|
|
|
64772
65170
|
if (resolved) {
|
|
64773
65171
|
resolved.transition;
|
|
64774
65172
|
var transitionEnd = resolved.transitionEnd, target = __rest$1(resolved, ["transition", "transitionEnd"]);
|
|
64775
|
-
acc = __assign$
|
|
65173
|
+
acc = __assign$3(__assign$3(__assign$3({}, acc), target), transitionEnd);
|
|
64776
65174
|
}
|
|
64777
65175
|
return acc;
|
|
64778
65176
|
};
|
|
@@ -64802,7 +65200,7 @@ function createAnimationState(visualElement2) {
|
|
|
64802
65200
|
if (isInherited && isInitialRender && visualElement2.manuallyAnimateOnMount) {
|
|
64803
65201
|
isInherited = false;
|
|
64804
65202
|
}
|
|
64805
|
-
typeState.protectedKeys = __assign$
|
|
65203
|
+
typeState.protectedKeys = __assign$3({}, encounteredKeys);
|
|
64806
65204
|
if (
|
|
64807
65205
|
// If it isn't active and hasn't *just* been set as inactive
|
|
64808
65206
|
!typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
|
|
@@ -64820,7 +65218,7 @@ function createAnimationState(visualElement2) {
|
|
|
64820
65218
|
if (activeDelta === false)
|
|
64821
65219
|
resolvedValues = {};
|
|
64822
65220
|
var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;
|
|
64823
|
-
var allKeys = __assign$
|
|
65221
|
+
var allKeys = __assign$3(__assign$3({}, prevResolvedValues), resolvedValues);
|
|
64824
65222
|
var markToAnimate = function(key3) {
|
|
64825
65223
|
shouldAnimateType = true;
|
|
64826
65224
|
removedKeys.delete(key3);
|
|
@@ -64852,7 +65250,7 @@ function createAnimationState(visualElement2) {
|
|
|
64852
65250
|
typeState.prevProp = prop;
|
|
64853
65251
|
typeState.prevResolvedValues = resolvedValues;
|
|
64854
65252
|
if (typeState.isActive) {
|
|
64855
|
-
encounteredKeys = __assign$
|
|
65253
|
+
encounteredKeys = __assign$3(__assign$3({}, encounteredKeys), resolvedValues);
|
|
64856
65254
|
}
|
|
64857
65255
|
if (isInitialRender && visualElement2.blockInitialAnimation) {
|
|
64858
65256
|
shouldAnimateType = false;
|
|
@@ -64861,7 +65259,7 @@ function createAnimationState(visualElement2) {
|
|
|
64861
65259
|
animations2.push.apply(animations2, __spreadArray$2([], __read(definitionList.map(function(animation) {
|
|
64862
65260
|
return {
|
|
64863
65261
|
animation,
|
|
64864
|
-
options: __assign$
|
|
65262
|
+
options: __assign$3({ type }, options)
|
|
64865
65263
|
};
|
|
64866
65264
|
})), false));
|
|
64867
65265
|
}
|
|
@@ -64869,7 +65267,7 @@ function createAnimationState(visualElement2) {
|
|
|
64869
65267
|
for (var i = 0; i < numAnimationTypes; i++) {
|
|
64870
65268
|
_loop_1(i);
|
|
64871
65269
|
}
|
|
64872
|
-
allAnimatedKeys = __assign$
|
|
65270
|
+
allAnimatedKeys = __assign$3({}, encounteredKeys);
|
|
64873
65271
|
if (removedKeys.size) {
|
|
64874
65272
|
var fallbackAnimation_1 = {};
|
|
64875
65273
|
removedKeys.forEach(function(key2) {
|
|
@@ -64977,7 +65375,7 @@ var PanSession = (
|
|
|
64977
65375
|
return;
|
|
64978
65376
|
var point2 = info3.point;
|
|
64979
65377
|
var timestamp2 = getFrameData().timestamp;
|
|
64980
|
-
_this.history.push(__assign$
|
|
65378
|
+
_this.history.push(__assign$3(__assign$3({}, point2), { timestamp: timestamp2 }));
|
|
64981
65379
|
var _a3 = _this.handlers, onStart = _a3.onStart, onMove = _a3.onMove;
|
|
64982
65380
|
if (!isPanStarted) {
|
|
64983
65381
|
onStart && onStart(_this.lastMoveEvent, info3);
|
|
@@ -65011,7 +65409,7 @@ var PanSession = (
|
|
|
65011
65409
|
var initialInfo = transformPoint(info2, this.transformPagePoint);
|
|
65012
65410
|
var point = initialInfo.point;
|
|
65013
65411
|
var timestamp = getFrameData().timestamp;
|
|
65014
|
-
this.history = [__assign$
|
|
65412
|
+
this.history = [__assign$3(__assign$3({}, point), { timestamp })];
|
|
65015
65413
|
var onSessionStart = handlers2.onSessionStart;
|
|
65016
65414
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
65017
65415
|
this.removeListeners = pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
|
|
@@ -65532,7 +65930,7 @@ var VisualElementDragControls = (
|
|
|
65532
65930
|
transition = { min: 0, max: 0 };
|
|
65533
65931
|
var bounceStiffness = dragElastic ? 200 : 1e6;
|
|
65534
65932
|
var bounceDamping = dragElastic ? 40 : 1e7;
|
|
65535
|
-
var inertia2 = __assign$
|
|
65933
|
+
var inertia2 = __assign$3(__assign$3({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
|
|
65536
65934
|
return _this.startAxisValueAnimation(axis, inertia2);
|
|
65537
65935
|
});
|
|
65538
65936
|
return Promise.all(momentumAnimations).then(onDragTransitionEnd);
|
|
@@ -65643,7 +66041,7 @@ var VisualElementDragControls = (
|
|
|
65643
66041
|
VisualElementDragControls2.prototype.getProps = function() {
|
|
65644
66042
|
var props = this.visualElement.getProps();
|
|
65645
66043
|
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;
|
|
65646
|
-
return __assign$
|
|
66044
|
+
return __assign$3(__assign$3({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
|
|
65647
66045
|
};
|
|
65648
66046
|
return VisualElementDragControls2;
|
|
65649
66047
|
}()
|
|
@@ -65800,7 +66198,7 @@ var visualElement = function(_a2) {
|
|
|
65800
66198
|
var values2 = /* @__PURE__ */ new Map();
|
|
65801
66199
|
var valueSubscriptions = /* @__PURE__ */ new Map();
|
|
65802
66200
|
var prevMotionValues = {};
|
|
65803
|
-
var baseTarget = __assign$
|
|
66201
|
+
var baseTarget = __assign$3({}, latestValues);
|
|
65804
66202
|
var removeFromVariantTree;
|
|
65805
66203
|
function render2() {
|
|
65806
66204
|
if (!instance || !isMounted)
|
|
@@ -65834,7 +66232,7 @@ var visualElement = function(_a2) {
|
|
|
65834
66232
|
}
|
|
65835
66233
|
var isControllingVariants = checkIfControllingVariants(props);
|
|
65836
66234
|
var isVariantNode = checkIfVariantNode(props);
|
|
65837
|
-
var element = __assign$
|
|
66235
|
+
var element = __assign$3(__assign$3({
|
|
65838
66236
|
treeType,
|
|
65839
66237
|
/**
|
|
65840
66238
|
* This is a mirror of the internal instance prop, which keeps
|
|
@@ -66199,7 +66597,7 @@ function resolveCSSVariables(visualElement2, _a2, transitionEnd) {
|
|
|
66199
66597
|
if (!(element instanceof Element))
|
|
66200
66598
|
return { target, transitionEnd };
|
|
66201
66599
|
if (transitionEnd) {
|
|
66202
|
-
transitionEnd = __assign$
|
|
66600
|
+
transitionEnd = __assign$3({}, transitionEnd);
|
|
66203
66601
|
}
|
|
66204
66602
|
visualElement2.forEachValue(function(value) {
|
|
66205
66603
|
var current2 = value.get();
|
|
@@ -66354,8 +66752,8 @@ var checkAndConvertChangedValueTypes = function(visualElement2, target, origin2,
|
|
|
66354
66752
|
if (transitionEnd === void 0) {
|
|
66355
66753
|
transitionEnd = {};
|
|
66356
66754
|
}
|
|
66357
|
-
target = __assign$
|
|
66358
|
-
transitionEnd = __assign$
|
|
66755
|
+
target = __assign$3({}, target);
|
|
66756
|
+
transitionEnd = __assign$3({}, transitionEnd);
|
|
66359
66757
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
|
|
66360
66758
|
var removedTransformValues = [];
|
|
66361
66759
|
var hasAttemptedToRemoveTransformValues = false;
|
|
@@ -66508,7 +66906,7 @@ var htmlConfig = {
|
|
|
66508
66906
|
transitionEnd = parsed.transitionEnd;
|
|
66509
66907
|
target = parsed.target;
|
|
66510
66908
|
}
|
|
66511
|
-
return __assign$
|
|
66909
|
+
return __assign$3({ transition, transitionEnd }, target);
|
|
66512
66910
|
},
|
|
66513
66911
|
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
|
|
66514
66912
|
build: function(element, renderState, latestValues, options, props) {
|
|
@@ -66520,7 +66918,7 @@ var htmlConfig = {
|
|
|
66520
66918
|
render: renderHTML
|
|
66521
66919
|
};
|
|
66522
66920
|
var htmlVisualElement = visualElement(htmlConfig);
|
|
66523
|
-
var svgVisualElement = visualElement(__assign$
|
|
66921
|
+
var svgVisualElement = visualElement(__assign$3(__assign$3({}, htmlConfig), { getBaseTarget: function(props, key2) {
|
|
66524
66922
|
return props[key2];
|
|
66525
66923
|
}, readValueFromInstance: function(domElement, key2) {
|
|
66526
66924
|
var _a2;
|
|
@@ -66598,7 +66996,7 @@ var correctBoxShadow = {
|
|
|
66598
66996
|
var MeasureLayoutWithContext = (
|
|
66599
66997
|
/** @class */
|
|
66600
66998
|
function(_super) {
|
|
66601
|
-
__extends
|
|
66999
|
+
__extends(MeasureLayoutWithContext2, _super);
|
|
66602
67000
|
function MeasureLayoutWithContext2() {
|
|
66603
67001
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
66604
67002
|
}
|
|
@@ -66617,7 +67015,7 @@ var MeasureLayoutWithContext = (
|
|
|
66617
67015
|
projection.addEventListener("animationComplete", function() {
|
|
66618
67016
|
_this.safeToRemove();
|
|
66619
67017
|
});
|
|
66620
|
-
projection.setOptions(__assign$
|
|
67018
|
+
projection.setOptions(__assign$3(__assign$3({}, projection.options), { onExitComplete: function() {
|
|
66621
67019
|
return _this.safeToRemove();
|
|
66622
67020
|
} }));
|
|
66623
67021
|
}
|
|
@@ -66682,10 +67080,10 @@ var MeasureLayoutWithContext = (
|
|
|
66682
67080
|
function MeasureLayout(props) {
|
|
66683
67081
|
var _a2 = __read(usePresence(), 2), isPresent = _a2[0], safeToRemove = _a2[1];
|
|
66684
67082
|
var layoutGroup = useContext(LayoutGroupContext);
|
|
66685
|
-
return React__default.createElement(MeasureLayoutWithContext, __assign$
|
|
67083
|
+
return React__default.createElement(MeasureLayoutWithContext, __assign$3({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
|
|
66686
67084
|
}
|
|
66687
67085
|
var defaultScaleCorrectors = {
|
|
66688
|
-
borderRadius: __assign$
|
|
67086
|
+
borderRadius: __assign$3(__assign$3({}, correctBorderRadius), { applyTo: [
|
|
66689
67087
|
"borderTopLeftRadius",
|
|
66690
67088
|
"borderTopRightRadius",
|
|
66691
67089
|
"borderBottomLeftRadius",
|
|
@@ -67108,7 +67506,7 @@ function createProjectionNode(_a2) {
|
|
|
67108
67506
|
_this.resumingFrom.resumingFrom = void 0;
|
|
67109
67507
|
}
|
|
67110
67508
|
_this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
67111
|
-
var animationOptions = __assign$
|
|
67509
|
+
var animationOptions = __assign$3(__assign$3({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
|
|
67112
67510
|
if (visualElement2.shouldReduceMotion) {
|
|
67113
67511
|
animationOptions.delay = 0;
|
|
67114
67512
|
animationOptions.type = false;
|
|
@@ -67362,7 +67760,7 @@ function createProjectionNode(_a2) {
|
|
|
67362
67760
|
};
|
|
67363
67761
|
ProjectionNode.prototype.setOptions = function(options) {
|
|
67364
67762
|
var _a3;
|
|
67365
|
-
this.options = __assign$
|
|
67763
|
+
this.options = __assign$3(__assign$3(__assign$3({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
|
|
67366
67764
|
};
|
|
67367
67765
|
ProjectionNode.prototype.clearMeasurements = function() {
|
|
67368
67766
|
this.scroll = void 0;
|
|
@@ -67480,7 +67878,7 @@ function createProjectionNode(_a2) {
|
|
|
67480
67878
|
}
|
|
67481
67879
|
var snapshot = this.snapshot;
|
|
67482
67880
|
var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
|
|
67483
|
-
var mixedValues = __assign$
|
|
67881
|
+
var mixedValues = __assign$3({}, this.latestValues);
|
|
67484
67882
|
var targetDelta = createDelta();
|
|
67485
67883
|
this.relativeTarget = this.relativeTargetOrigin = void 0;
|
|
67486
67884
|
this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
|
|
@@ -67523,7 +67921,7 @@ function createProjectionNode(_a2) {
|
|
|
67523
67921
|
}
|
|
67524
67922
|
this.pendingAnimation = sync.update(function() {
|
|
67525
67923
|
globalProjectionState.hasAnimatedSinceResize = true;
|
|
67526
|
-
_this.currentAnimation = animate(0, animationTarget, __assign$
|
|
67924
|
+
_this.currentAnimation = animate(0, animationTarget, __assign$3(__assign$3({}, options), { onUpdate: function(latest) {
|
|
67527
67925
|
var _a4;
|
|
67528
67926
|
_this.mixTargetDelta(latest);
|
|
67529
67927
|
(_a4 = options.onUpdate) === null || _a4 === void 0 ? void 0 : _a4.call(options, latest);
|
|
@@ -67891,7 +68289,7 @@ var HTMLProjectionNode = createProjectionNode({
|
|
|
67891
68289
|
return Boolean(window.getComputedStyle(instance).position === "fixed");
|
|
67892
68290
|
}
|
|
67893
68291
|
});
|
|
67894
|
-
var featureBundle = __assign$
|
|
68292
|
+
var featureBundle = __assign$3(__assign$3(__assign$3(__assign$3({}, animations), gestureAnimations), drag), layoutFeatures);
|
|
67895
68293
|
var motion = /* @__PURE__ */ createMotionProxy(function(Component2, config2) {
|
|
67896
68294
|
return createDomMotionConfig(Component2, config2, featureBundle, createDomVisualElement, HTMLProjectionNode);
|
|
67897
68295
|
});
|