@oliasoft-open-source/react-ui-library 4.14.0 → 4.14.1-beta-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.css +114 -105
- package/dist/index.js +1245 -838
- 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,382 +18340,795 @@ 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
|
-
);
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18683
|
-
|
|
18684
|
-
const
|
|
18685
|
-
|
|
18686
|
-
const
|
|
18687
|
-
const
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18693
|
-
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
|
|
18701
|
-
|
|
18702
|
-
|
|
18703
|
-
|
|
18704
|
-
|
|
18705
|
-
|
|
18706
|
-
|
|
18707
|
-
const
|
|
18708
|
-
const
|
|
18709
|
-
const
|
|
18710
|
-
|
|
18711
|
-
|
|
18712
|
-
|
|
18713
|
-
|
|
18714
|
-
|
|
18715
|
-
|
|
18716
|
-
const
|
|
18717
|
-
|
|
18718
|
-
const
|
|
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
|
+
}
|
|
19092
|
+
const inputInTable$8 = "_inputInTable_7fzf8_1";
|
|
19093
|
+
const inputHover$8 = "_inputHover_7fzf8_13";
|
|
19094
|
+
const inputFocus$8 = "_inputFocus_7fzf8_18";
|
|
19095
|
+
const inputError$8 = "_inputError_7fzf8_25";
|
|
19096
|
+
const inputWarning$8 = "_inputWarning_7fzf8_26";
|
|
19097
|
+
const inputDisabled$8 = "_inputDisabled_7fzf8_61";
|
|
19098
|
+
const hideScrollbars$8 = "_hideScrollbars_7fzf8_67";
|
|
19099
|
+
const listWrapper = "_listWrapper_7fzf8_77";
|
|
19100
|
+
const listWrapperBordered = "_listWrapperBordered_7fzf8_82";
|
|
19101
|
+
const header$1 = "_header_7fzf8_89";
|
|
19102
|
+
const headerTitle = "_headerTitle_7fzf8_89";
|
|
19103
|
+
const heading$3 = "_heading_7fzf8_90";
|
|
19104
|
+
const itemHeader = "_itemHeader_7fzf8_90";
|
|
19105
|
+
const narrow = "_narrow_7fzf8_93";
|
|
19106
|
+
const stickyHeader = "_stickyHeader_7fzf8_97";
|
|
19107
|
+
const title$3 = "_title_7fzf8_108";
|
|
19108
|
+
const name = "_name_7fzf8_114";
|
|
19109
|
+
const iconTooltipMargin = "_iconTooltipMargin_7fzf8_117";
|
|
19110
|
+
const bold = "_bold_7fzf8_120";
|
|
19111
|
+
const toggleNarrow = "_toggleNarrow_7fzf8_129";
|
|
19112
|
+
const drag$1 = "_drag_7fzf8_147";
|
|
19113
|
+
const list$1 = "_list_7fzf8_77";
|
|
19114
|
+
const bordered$1 = "_bordered_7fzf8_172";
|
|
19115
|
+
const item$4 = "_item_7fzf8_90";
|
|
19116
|
+
const action = "_action_7fzf8_205";
|
|
19117
|
+
const active$3 = "_active_7fzf8_208";
|
|
19118
|
+
const indented = "_indented_7fzf8_215";
|
|
19119
|
+
const disabled$5 = "_disabled_7fzf8_228";
|
|
19120
|
+
const label$6 = "_label_7fzf8_239";
|
|
19121
|
+
const details$2 = "_details_7fzf8_250";
|
|
19122
|
+
const metadata = "_metadata_7fzf8_251";
|
|
19123
|
+
const itemContent = "_itemContent_7fzf8_259";
|
|
19124
|
+
const indentIcon = "_indentIcon_7fzf8_266";
|
|
19125
|
+
const expandIcon = "_expandIcon_7fzf8_271";
|
|
19126
|
+
const expanded = "_expanded_7fzf8_278";
|
|
19127
|
+
const right$4 = "_right_7fzf8_281";
|
|
19128
|
+
const actions = "_actions_7fzf8_289";
|
|
19129
|
+
const scrollableList = "_scrollableList_7fzf8_294";
|
|
19130
|
+
const hideScrollbar = "_hideScrollbar_7fzf8_67";
|
|
19131
|
+
const noPointerEvents = "_noPointerEvents_7fzf8_314";
|
|
18719
19132
|
const listStyles = {
|
|
18720
19133
|
inputInTable: inputInTable$8,
|
|
18721
19134
|
inputHover: inputHover$8,
|
|
@@ -18724,6 +19137,8 @@ const listStyles = {
|
|
|
18724
19137
|
inputWarning: inputWarning$8,
|
|
18725
19138
|
inputDisabled: inputDisabled$8,
|
|
18726
19139
|
hideScrollbars: hideScrollbars$8,
|
|
19140
|
+
listWrapper,
|
|
19141
|
+
listWrapperBordered,
|
|
18727
19142
|
header: header$1,
|
|
18728
19143
|
headerTitle,
|
|
18729
19144
|
heading: heading$3,
|
|
@@ -18753,7 +19168,6 @@ const listStyles = {
|
|
|
18753
19168
|
right: right$4,
|
|
18754
19169
|
actions,
|
|
18755
19170
|
scrollableList,
|
|
18756
|
-
infiniteScrollContainer,
|
|
18757
19171
|
hideScrollbar,
|
|
18758
19172
|
noPointerEvents
|
|
18759
19173
|
};
|
|
@@ -18881,95 +19295,271 @@ const getItemStyle = (draggableProps, item2) => {
|
|
|
18881
19295
|
};
|
|
18882
19296
|
};
|
|
18883
19297
|
const ListRow = forwardRef(
|
|
18884
|
-
({
|
|
19298
|
+
({ item: item2, index: index2, expanding, invokeEditOnRowClick, provided, draggable: draggable2 }, listRowRefs) => {
|
|
18885
19299
|
const disabledContext = useContext(DisabledContext);
|
|
18886
|
-
const listElement = (
|
|
18887
|
-
const Component2 =
|
|
18888
|
-
return /* @__PURE__ */
|
|
19300
|
+
const listElement = (index22, provided2, item22, indent2, hasOnClick2, edit22) => {
|
|
19301
|
+
const Component2 = item22.component || "a";
|
|
19302
|
+
return /* @__PURE__ */ jsx(
|
|
18889
19303
|
Component2,
|
|
18890
19304
|
{
|
|
18891
|
-
href:
|
|
18892
|
-
to:
|
|
18893
|
-
|
|
18894
|
-
...provided2.draggableProps,
|
|
18895
|
-
style: getItemStyle(provided2.draggableProps, item2),
|
|
19305
|
+
href: item22.url,
|
|
19306
|
+
to: item22.url,
|
|
19307
|
+
style: getItemStyle(provided2 == null ? void 0 : provided2.draggableProps, item22),
|
|
18896
19308
|
className: cx$2(
|
|
18897
19309
|
listStyles.item,
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
19310
|
+
item22.active ? listStyles.active : "",
|
|
19311
|
+
item22.disabled || disabledContext ? listStyles.disabled : "",
|
|
19312
|
+
hasOnClick2 ? listStyles.action : ""
|
|
18901
19313
|
),
|
|
18902
19314
|
onClick: (evt) => {
|
|
18903
|
-
if (invokeEditOnRowClick &&
|
|
18904
|
-
if (
|
|
19315
|
+
if (invokeEditOnRowClick && edit22) {
|
|
19316
|
+
if (edit22.onClick) edit22.onClick(evt, item22.id);
|
|
18905
19317
|
}
|
|
18906
|
-
if (
|
|
18907
|
-
return
|
|
19318
|
+
if (item22.onClick) {
|
|
19319
|
+
return item22.onClick(evt);
|
|
18908
19320
|
}
|
|
18909
19321
|
},
|
|
18910
|
-
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
"
|
|
19322
|
+
"data-id": index22,
|
|
19323
|
+
title: item22.title,
|
|
19324
|
+
"data-testid": item22.testId,
|
|
19325
|
+
children: /* @__PURE__ */ jsxs("div", { style: { paddingLeft: indent2 }, children: [
|
|
19326
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.itemHeader, children: [
|
|
19327
|
+
draggable2 && /* @__PURE__ */ jsx(
|
|
19328
|
+
"div",
|
|
19329
|
+
{
|
|
19330
|
+
className: listStyles.drag,
|
|
19331
|
+
...provided2.dragHandleProps,
|
|
19332
|
+
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
19333
|
+
}
|
|
19334
|
+
),
|
|
19335
|
+
item22.level && item22.level > 0 ? /* @__PURE__ */ jsx("div", { className: listStyles.indentIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.INDENT }) }) : null,
|
|
19336
|
+
/* @__PURE__ */ jsx(Label$1, { label: item22.label }),
|
|
19337
|
+
/* @__PURE__ */ jsx(MetaContent, { item: item22 }),
|
|
19338
|
+
/* @__PURE__ */ jsxs("div", { className: listStyles.right, children: [
|
|
19339
|
+
/* @__PURE__ */ jsx(MetaCount, { item: item22 }),
|
|
19340
|
+
!(item22.disabled || disabledContext) && item22.actions && /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: item22.actions }) })
|
|
19341
|
+
] })
|
|
19342
|
+
] }),
|
|
19343
|
+
/* @__PURE__ */ jsx(ItemContent, { item: item22, expanding })
|
|
19344
|
+
] })
|
|
18914
19345
|
},
|
|
18915
|
-
|
|
18916
|
-
"div",
|
|
18917
|
-
{
|
|
18918
|
-
ref: (el2) => {
|
|
18919
|
-
if (listRowRefs && "current" in listRowRefs && Array.isArray(listRowRefs.current) && index2 !== void 0) {
|
|
18920
|
-
listRowRefs.current[index2] = el2;
|
|
18921
|
-
}
|
|
18922
|
-
},
|
|
18923
|
-
style: { paddingLeft: indent },
|
|
18924
|
-
children: [
|
|
18925
|
-
/* @__PURE__ */ jsxs("div", { className: listStyles.itemHeader, children: [
|
|
18926
|
-
draggable2 && /* @__PURE__ */ jsx(
|
|
18927
|
-
"div",
|
|
18928
|
-
{
|
|
18929
|
-
className: listStyles.drag,
|
|
18930
|
-
...provided2.dragHandleProps,
|
|
18931
|
-
children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
|
|
18932
|
-
}
|
|
18933
|
-
),
|
|
18934
|
-
item2.level && item2.level > 0 ? /* @__PURE__ */ jsx("div", { className: listStyles.indentIcon, children: /* @__PURE__ */ jsx(Icon, { icon: IconType.INDENT }) }) : null,
|
|
18935
|
-
/* @__PURE__ */ jsx(Label$1, { label: item2.label }),
|
|
18936
|
-
/* @__PURE__ */ jsx(MetaContent, { item: item2 }),
|
|
18937
|
-
/* @__PURE__ */ jsxs("div", { className: listStyles.right, children: [
|
|
18938
|
-
/* @__PURE__ */ jsx(MetaCount, { item: item2 }),
|
|
18939
|
-
!(item2.disabled || disabledContext) && item2.actions && /* @__PURE__ */ jsx("div", { className: listStyles.actions, children: /* @__PURE__ */ jsx(Actions, { actions: item2.actions }) })
|
|
18940
|
-
] })
|
|
18941
|
-
] }),
|
|
18942
|
-
/* @__PURE__ */ jsx(ItemContent, { item: item2, expanding })
|
|
18943
|
-
]
|
|
18944
|
-
}
|
|
18945
|
-
)
|
|
19346
|
+
index22
|
|
18946
19347
|
);
|
|
18947
19348
|
};
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
const indent = item2.level && item2.level > 1 ? (item2.level - 1) * 20 : 0;
|
|
18959
|
-
return isSubheading ? /* @__PURE__ */ jsx(
|
|
18960
|
-
ListSubheading,
|
|
18961
|
-
{
|
|
18962
|
-
ref: listRowRefs,
|
|
18963
|
-
item: item2,
|
|
18964
|
-
index: index2
|
|
18965
|
-
},
|
|
18966
|
-
index2
|
|
18967
|
-
) : draggable2 ? /* @__PURE__ */ jsx(PublicDraggable, { draggableId: item2.id + "", index: index2, children: (provided2) => listElement(index2, provided2, item2, indent, hasOnClick, edit2) }, item2.id) : listElement(index2, provided, item2, indent, hasOnClick, edit2);
|
|
18968
|
-
}),
|
|
18969
|
-
provided.placeholder
|
|
18970
|
-
] });
|
|
19349
|
+
const isSubheading = item2.type === "Heading";
|
|
19350
|
+
const edit2 = item2.actions && item2.actions.find(
|
|
19351
|
+
(a2) => {
|
|
19352
|
+
var _a2;
|
|
19353
|
+
return a2.label && ((_a2 = String(a2.label)) == null ? void 0 : _a2.toLowerCase()) === "edit";
|
|
19354
|
+
}
|
|
19355
|
+
);
|
|
19356
|
+
const hasOnClick = !!(edit2 || item2.url || item2.onClick);
|
|
19357
|
+
const indent = item2.level && item2.level > 1 ? (item2.level - 1) * 20 : 0;
|
|
19358
|
+
return isSubheading ? /* @__PURE__ */ jsx(ListSubheading, { item: item2, index: index2 }) : listElement(index2, provided, item2, indent, hasOnClick, edit2);
|
|
18971
19359
|
}
|
|
18972
19360
|
);
|
|
19361
|
+
const ListDroppableWrapper = ({
|
|
19362
|
+
onListReorder,
|
|
19363
|
+
children,
|
|
19364
|
+
list: list2,
|
|
19365
|
+
draggable: draggable2,
|
|
19366
|
+
expanding
|
|
19367
|
+
}) => {
|
|
19368
|
+
if (!draggable2) {
|
|
19369
|
+
return children();
|
|
19370
|
+
}
|
|
19371
|
+
return /* @__PURE__ */ jsx(
|
|
19372
|
+
DragDropContext,
|
|
19373
|
+
{
|
|
19374
|
+
onDragEnd: (result) => {
|
|
19375
|
+
var _a2, _b;
|
|
19376
|
+
const from3 = (_a2 = result == null ? void 0 : result.source) == null ? void 0 : _a2.index;
|
|
19377
|
+
const to2 = (_b = result == null ? void 0 : result.destination) == null ? void 0 : _b.index;
|
|
19378
|
+
onListReorder({ from: from3, to: to2 });
|
|
19379
|
+
},
|
|
19380
|
+
children: /* @__PURE__ */ jsx(
|
|
19381
|
+
ConnectedDroppable,
|
|
19382
|
+
{
|
|
19383
|
+
droppableId: "droppable",
|
|
19384
|
+
mode: "virtual",
|
|
19385
|
+
renderClone: (provided, snapshot, rubric) => {
|
|
19386
|
+
return /* @__PURE__ */ jsx(
|
|
19387
|
+
"div",
|
|
19388
|
+
{
|
|
19389
|
+
...provided.draggableProps,
|
|
19390
|
+
ref: provided.innerRef,
|
|
19391
|
+
style: {
|
|
19392
|
+
height: 36,
|
|
19393
|
+
width: "100%",
|
|
19394
|
+
display: "flex",
|
|
19395
|
+
alignItems: "center"
|
|
19396
|
+
},
|
|
19397
|
+
children: /* @__PURE__ */ jsx(
|
|
19398
|
+
ListRow,
|
|
19399
|
+
{
|
|
19400
|
+
draggable: draggable2,
|
|
19401
|
+
item: list2.items[rubric.source.index],
|
|
19402
|
+
expanding,
|
|
19403
|
+
onListReorder,
|
|
19404
|
+
index: rubric.source.index,
|
|
19405
|
+
provided
|
|
19406
|
+
}
|
|
19407
|
+
)
|
|
19408
|
+
}
|
|
19409
|
+
);
|
|
19410
|
+
},
|
|
19411
|
+
children: (provided) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
19412
|
+
children(provided),
|
|
19413
|
+
provided.placeholder
|
|
19414
|
+
] })
|
|
19415
|
+
}
|
|
19416
|
+
)
|
|
19417
|
+
}
|
|
19418
|
+
);
|
|
19419
|
+
};
|
|
19420
|
+
const List = ({
|
|
19421
|
+
list: list2,
|
|
19422
|
+
bordered: bordered2 = false,
|
|
19423
|
+
expanding = false,
|
|
19424
|
+
narrow: narrow2 = false,
|
|
19425
|
+
toggleNarrow: toggleNarrow2 = false,
|
|
19426
|
+
onToggleNarrow = () => {
|
|
19427
|
+
},
|
|
19428
|
+
invokeEditOnRowClick = true,
|
|
19429
|
+
noHeader = false,
|
|
19430
|
+
stickyHeader: stickyHeader2,
|
|
19431
|
+
draggable: draggable2 = false,
|
|
19432
|
+
onListReorder = () => {
|
|
19433
|
+
},
|
|
19434
|
+
marginBottom = 0,
|
|
19435
|
+
height: height2,
|
|
19436
|
+
testId,
|
|
19437
|
+
scrollDetails = {
|
|
19438
|
+
scrollable: false,
|
|
19439
|
+
hideScrollbar: false,
|
|
19440
|
+
triggerScrollToActiveItem: false,
|
|
19441
|
+
infiniteScroll: false,
|
|
19442
|
+
limit: 10,
|
|
19443
|
+
infiniteScrollTarget: void 0
|
|
19444
|
+
}
|
|
19445
|
+
}) => {
|
|
19446
|
+
const { scrollable, hideScrollbar: hideScrollbar2, triggerScrollToActiveItem } = scrollDetails;
|
|
19447
|
+
const listContainerRef = useRef(null);
|
|
19448
|
+
const virtualizer = useVirtualizer({
|
|
19449
|
+
count: list2.items.length,
|
|
19450
|
+
getScrollElement: () => listContainerRef.current,
|
|
19451
|
+
estimateSize: () => 37,
|
|
19452
|
+
overscan: 5
|
|
19453
|
+
});
|
|
19454
|
+
useEffect(() => {
|
|
19455
|
+
if (triggerScrollToActiveItem) {
|
|
19456
|
+
const activeItemIndex = list2.items.findIndex(
|
|
19457
|
+
(item2) => item2.active === true
|
|
19458
|
+
);
|
|
19459
|
+
if (activeItemIndex !== -1) {
|
|
19460
|
+
virtualizer.scrollToIndex(activeItemIndex, { align: "center" });
|
|
19461
|
+
}
|
|
19462
|
+
}
|
|
19463
|
+
}, [list2.items, triggerScrollToActiveItem]);
|
|
19464
|
+
const renderItem = (virtualRow, dragProvided) => {
|
|
19465
|
+
return /* @__PURE__ */ jsx(
|
|
19466
|
+
"div",
|
|
19467
|
+
{
|
|
19468
|
+
ref: dragProvided == null ? void 0 : dragProvided.innerRef,
|
|
19469
|
+
...dragProvided == null ? void 0 : dragProvided.draggableProps,
|
|
19470
|
+
"data-index": virtualRow.index,
|
|
19471
|
+
style: {
|
|
19472
|
+
...dragProvided == null ? void 0 : dragProvided.draggableProps.style,
|
|
19473
|
+
position: "absolute",
|
|
19474
|
+
top: 0,
|
|
19475
|
+
left: 0,
|
|
19476
|
+
width: "100%",
|
|
19477
|
+
height: `${virtualRow.size}px`,
|
|
19478
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
19479
|
+
},
|
|
19480
|
+
children: /* @__PURE__ */ jsx("div", { ref: virtualizer.measureElement, "data-index": virtualRow.index, children: /* @__PURE__ */ jsx(
|
|
19481
|
+
ListRow,
|
|
19482
|
+
{
|
|
19483
|
+
index: virtualRow.index,
|
|
19484
|
+
draggable: draggable2,
|
|
19485
|
+
item: list2.items[virtualRow.index],
|
|
19486
|
+
expanding,
|
|
19487
|
+
invokeEditOnRowClick,
|
|
19488
|
+
onListReorder,
|
|
19489
|
+
provided: dragProvided
|
|
19490
|
+
}
|
|
19491
|
+
) })
|
|
19492
|
+
}
|
|
19493
|
+
);
|
|
19494
|
+
};
|
|
19495
|
+
return /* @__PURE__ */ jsx(
|
|
19496
|
+
"div",
|
|
19497
|
+
{
|
|
19498
|
+
className: cx$2(
|
|
19499
|
+
listStyles.listWrapper,
|
|
19500
|
+
bordered2 ? listStyles.listWrapperBordered : ""
|
|
19501
|
+
),
|
|
19502
|
+
children: /* @__PURE__ */ jsxs(
|
|
19503
|
+
"div",
|
|
19504
|
+
{
|
|
19505
|
+
className: cx$2(
|
|
19506
|
+
listStyles.scrollableList,
|
|
19507
|
+
narrow2 ? listStyles.narrow : "",
|
|
19508
|
+
hideScrollbar2 ? listStyles.hideScrollbar : ""
|
|
19509
|
+
),
|
|
19510
|
+
"data-testid": testId,
|
|
19511
|
+
style: { height: height2, marginBottom },
|
|
19512
|
+
ref: listContainerRef,
|
|
19513
|
+
children: [
|
|
19514
|
+
!noHeader && /* @__PURE__ */ jsx(
|
|
19515
|
+
ListHeading,
|
|
19516
|
+
{
|
|
19517
|
+
name: list2.name,
|
|
19518
|
+
actions: list2.actions,
|
|
19519
|
+
toggleNarrow: toggleNarrow2,
|
|
19520
|
+
onToggleNarrow,
|
|
19521
|
+
stickyHeader: stickyHeader2
|
|
19522
|
+
}
|
|
19523
|
+
),
|
|
19524
|
+
/* @__PURE__ */ jsx(
|
|
19525
|
+
ListDroppableWrapper,
|
|
19526
|
+
{
|
|
19527
|
+
onListReorder,
|
|
19528
|
+
list: list2,
|
|
19529
|
+
draggable: draggable2,
|
|
19530
|
+
expanding,
|
|
19531
|
+
children: (provided, snapshot) => {
|
|
19532
|
+
return /* @__PURE__ */ jsx(
|
|
19533
|
+
"div",
|
|
19534
|
+
{
|
|
19535
|
+
className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""),
|
|
19536
|
+
style: {
|
|
19537
|
+
height: `${virtualizer.getTotalSize()}px`
|
|
19538
|
+
},
|
|
19539
|
+
ref: provided == null ? void 0 : provided.innerRef,
|
|
19540
|
+
...provided == null ? void 0 : provided.droppableProps,
|
|
19541
|
+
children: virtualizer.getVirtualItems().map(
|
|
19542
|
+
(virtualRow) => draggable2 ? /* @__PURE__ */ jsx(
|
|
19543
|
+
PublicDraggable,
|
|
19544
|
+
{
|
|
19545
|
+
draggableId: virtualRow.index.toString(),
|
|
19546
|
+
index: virtualRow.index,
|
|
19547
|
+
children: (dragProvided, dragSnapshot) => renderItem(virtualRow, dragProvided)
|
|
19548
|
+
},
|
|
19549
|
+
virtualRow.index
|
|
19550
|
+
) : /* @__PURE__ */ jsx(Fragment$2, { children: renderItem(virtualRow) }, virtualRow.index)
|
|
19551
|
+
)
|
|
19552
|
+
}
|
|
19553
|
+
);
|
|
19554
|
+
}
|
|
19555
|
+
}
|
|
19556
|
+
)
|
|
19557
|
+
]
|
|
19558
|
+
}
|
|
19559
|
+
)
|
|
19560
|
+
}
|
|
19561
|
+
);
|
|
19562
|
+
};
|
|
18973
19563
|
const loader = "_loader_477i5_1";
|
|
18974
19564
|
const fullViewPortSize = "_fullViewPortSize_477i5_7";
|
|
18975
19565
|
const cover = "_cover_477i5_14";
|
|
@@ -19036,178 +19626,6 @@ const Loader = ({
|
|
|
19036
19626
|
}
|
|
19037
19627
|
);
|
|
19038
19628
|
};
|
|
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
19629
|
const inputInTable$7 = "_inputInTable_1okhq_1";
|
|
19212
19630
|
const inputHover$7 = "_inputHover_1okhq_13";
|
|
19213
19631
|
const inputFocus$7 = "_inputFocus_1okhq_18";
|
|
@@ -19967,7 +20385,7 @@ const useFontsReady = () => {
|
|
|
19967
20385
|
const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
19968
20386
|
const useWindowWidth = () => {
|
|
19969
20387
|
const [width2, setWidth] = useState(getWidth());
|
|
19970
|
-
const resizeListener = debounce$
|
|
20388
|
+
const resizeListener = debounce$3(() => setWidth(getWidth()), 150);
|
|
19971
20389
|
useEffect(() => {
|
|
19972
20390
|
window.addEventListener("resize", resizeListener);
|
|
19973
20391
|
return () => {
|
|
@@ -52655,7 +53073,7 @@ const styles$d = {
|
|
|
52655
53073
|
active: active$2,
|
|
52656
53074
|
icon: icon$1
|
|
52657
53075
|
};
|
|
52658
|
-
const TooltipIcon = memo(
|
|
53076
|
+
const TooltipIcon = memo$1(
|
|
52659
53077
|
({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
|
|
52660
53078
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
52661
53079
|
/* @__PURE__ */ jsx(
|
|
@@ -52730,7 +53148,7 @@ const Sections = ({
|
|
|
52730
53148
|
)
|
|
52731
53149
|
] }, i)) });
|
|
52732
53150
|
};
|
|
52733
|
-
const SideBar = memo(
|
|
53151
|
+
const SideBar = memo$1(
|
|
52734
53152
|
({
|
|
52735
53153
|
options,
|
|
52736
53154
|
startOpen = false,
|
|
@@ -55327,18 +55745,18 @@ const Spacer = ({
|
|
|
55327
55745
|
}
|
|
55328
55746
|
}
|
|
55329
55747
|
);
|
|
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 = "
|
|
55748
|
+
const inputInTable$2 = "_inputInTable_sqhcz_1";
|
|
55749
|
+
const inputHover$2 = "_inputHover_sqhcz_13";
|
|
55750
|
+
const inputFocus$2 = "_inputFocus_sqhcz_18";
|
|
55751
|
+
const inputError$2 = "_inputError_sqhcz_25";
|
|
55752
|
+
const inputWarning$2 = "_inputWarning_sqhcz_26";
|
|
55753
|
+
const inputDisabled$2 = "_inputDisabled_sqhcz_61";
|
|
55754
|
+
const hideScrollbars$2 = "_hideScrollbars_sqhcz_67";
|
|
55755
|
+
const wrapper = "_wrapper_sqhcz_85";
|
|
55756
|
+
const bordered = "_bordered_sqhcz_93";
|
|
55757
|
+
const scroll2 = "_scroll_sqhcz_98";
|
|
55758
|
+
const table = "_table_sqhcz_108";
|
|
55759
|
+
const striped = "_striped_sqhcz_186";
|
|
55342
55760
|
const styles$b = {
|
|
55343
55761
|
inputInTable: inputInTable$2,
|
|
55344
55762
|
inputHover: inputHover$2,
|
|
@@ -55437,33 +55855,24 @@ const hasRowActions = (rows, headers) => {
|
|
|
55437
55855
|
};
|
|
55438
55856
|
const TableScrollWrapper = ({
|
|
55439
55857
|
table: table2,
|
|
55440
|
-
children
|
|
55858
|
+
children,
|
|
55859
|
+
headerRef
|
|
55441
55860
|
}) => {
|
|
55861
|
+
var _a2;
|
|
55442
55862
|
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 }) });
|
|
55863
|
+
const scrollRef = useRef(null);
|
|
55864
|
+
const virtualizer = useVirtualizer({
|
|
55865
|
+
count: rows.length,
|
|
55866
|
+
getScrollElement: () => scrollRef.current,
|
|
55867
|
+
estimateSize: () => 31,
|
|
55868
|
+
overscan: 10
|
|
55869
|
+
});
|
|
55870
|
+
const totalHeight = virtualizer.getTotalSize() + (((_a2 = headerRef == null ? void 0 : headerRef.current) == null ? void 0 : _a2.clientHeight) || 0);
|
|
55871
|
+
return /* @__PURE__ */ jsx("div", { ref: scrollRef, className: styles$b.scroll, children: /* @__PURE__ */ jsx("div", { style: { minHeight: totalHeight }, children: children({
|
|
55872
|
+
virtualItems: virtualizer.getVirtualItems(),
|
|
55873
|
+
isScrolling: virtualizer.isScrolling,
|
|
55874
|
+
scrollOffset: virtualizer.scrollOffset
|
|
55875
|
+
}) }) });
|
|
55467
55876
|
};
|
|
55468
55877
|
const clickableRow = "_clickableRow_m64j5_1";
|
|
55469
55878
|
const hoverableRow = "_hoverableRow_m64j5_4";
|
|
@@ -56174,9 +56583,11 @@ const Row = ({
|
|
|
56174
56583
|
provided = null,
|
|
56175
56584
|
width: width2,
|
|
56176
56585
|
columnWidths,
|
|
56586
|
+
style: style2,
|
|
56177
56587
|
testId
|
|
56178
56588
|
//TODO: add testId
|
|
56179
56589
|
}) => {
|
|
56590
|
+
var _a2;
|
|
56180
56591
|
const targetRef = useRef(null);
|
|
56181
56592
|
const columnHeaderAlignment = getHeaderAlignment(
|
|
56182
56593
|
columnHeaderAlignments,
|
|
@@ -56220,7 +56631,8 @@ const Row = ({
|
|
|
56220
56631
|
},
|
|
56221
56632
|
columnCount
|
|
56222
56633
|
);
|
|
56223
|
-
const
|
|
56634
|
+
const getDraggingStyle2 = (isDragging, draggableStyle) => {
|
|
56635
|
+
if (!snapshot || !provided) return null;
|
|
56224
56636
|
return {
|
|
56225
56637
|
minWidth: isDragging && `${width2}px`,
|
|
56226
56638
|
width: isDragging && "100%",
|
|
@@ -56236,7 +56648,7 @@ const Row = ({
|
|
|
56236
56648
|
if (row2.noDrag) {
|
|
56237
56649
|
return /* @__PURE__ */ jsx("td", { "aria-labelledby": "unique-label-id" });
|
|
56238
56650
|
}
|
|
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 }) }) });
|
|
56651
|
+
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
56652
|
};
|
|
56241
56653
|
return isHeader ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
56242
56654
|
/* @__PURE__ */ jsxs(
|
|
@@ -56288,7 +56700,13 @@ const Row = ({
|
|
|
56288
56700
|
"data-warning": warning2 || null,
|
|
56289
56701
|
ref: (provided == null ? void 0 : provided.innerRef) || null,
|
|
56290
56702
|
...(provided == null ? void 0 : provided.draggableProps) || null,
|
|
56291
|
-
style:
|
|
56703
|
+
style: {
|
|
56704
|
+
...style2,
|
|
56705
|
+
...getDraggingStyle2(
|
|
56706
|
+
snapshot == null ? void 0 : snapshot.isDragging,
|
|
56707
|
+
(_a2 = provided == null ? void 0 : provided.draggableProps) == null ? void 0 : _a2.style
|
|
56708
|
+
)
|
|
56709
|
+
},
|
|
56292
56710
|
children: [
|
|
56293
56711
|
draggableTable ? getDragItem() : null,
|
|
56294
56712
|
cells,
|
|
@@ -56330,16 +56748,8 @@ const Table = (props) => {
|
|
|
56330
56748
|
maxHeight,
|
|
56331
56749
|
fixedWidth: width2
|
|
56332
56750
|
} = 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
|
-
}, []);
|
|
56751
|
+
useRef(null);
|
|
56752
|
+
const headerRef = useRef(null);
|
|
56343
56753
|
const headers = get$2(props, "table.headers", []);
|
|
56344
56754
|
const columnCount = getColumnCount(propRows, headers);
|
|
56345
56755
|
const rowActions = hasRowActions(propRows, headers);
|
|
@@ -56390,7 +56800,7 @@ const Table = (props) => {
|
|
|
56390
56800
|
// Collapse width if width = auto
|
|
56391
56801
|
display: width2 === "auto" ? "inline-flex" : "flex"
|
|
56392
56802
|
};
|
|
56393
|
-
return
|
|
56803
|
+
return /* @__PURE__ */ jsxs("div", { className: wrapperClass, style: wrapperStyles, children: [
|
|
56394
56804
|
/* @__PURE__ */ jsx(
|
|
56395
56805
|
Title$1,
|
|
56396
56806
|
{
|
|
@@ -56411,40 +56821,96 @@ const Table = (props) => {
|
|
|
56411
56821
|
onListReorder({ from: from3, to: to2 });
|
|
56412
56822
|
}
|
|
56413
56823
|
},
|
|
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
|
-
|
|
56824
|
+
children: /* @__PURE__ */ jsx(
|
|
56825
|
+
ConnectedDroppable,
|
|
56826
|
+
{
|
|
56827
|
+
droppableId: "droppable",
|
|
56828
|
+
mode: "virtual",
|
|
56829
|
+
renderClone: (provided, snapshot, rubric) => {
|
|
56830
|
+
return /* @__PURE__ */ jsx(
|
|
56831
|
+
Row,
|
|
56832
|
+
{
|
|
56833
|
+
rowIndex: rubric.source.index,
|
|
56834
|
+
row: rows[rubric.source.index],
|
|
56835
|
+
columnCount,
|
|
56836
|
+
columnWidths,
|
|
56837
|
+
colSpan,
|
|
56838
|
+
hasRowActions: rowActions,
|
|
56839
|
+
columnAlignment,
|
|
56840
|
+
columnHeaderAlignments,
|
|
56841
|
+
draggableTable: draggable2,
|
|
56842
|
+
...provided.draggableProps
|
|
56843
|
+
}
|
|
56844
|
+
);
|
|
56845
|
+
},
|
|
56846
|
+
children: (provided) => {
|
|
56847
|
+
return /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, headerRef, children: ({ virtualItems, isScrolling, scrollOffset }) => /* @__PURE__ */ jsxs(
|
|
56848
|
+
"table",
|
|
56849
|
+
{
|
|
56850
|
+
className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
|
|
56851
|
+
"data-testid": testId,
|
|
56852
|
+
ref: provided.innerRef,
|
|
56853
|
+
children: [
|
|
56854
|
+
/* @__PURE__ */ jsx(
|
|
56855
|
+
"thead",
|
|
56856
|
+
{
|
|
56857
|
+
ref: headerRef,
|
|
56858
|
+
style: {
|
|
56859
|
+
position: "relative",
|
|
56860
|
+
transition: "transform 0.2s",
|
|
56861
|
+
transform: !isScrolling ? `translateY(${scrollOffset}px)` : "translateY(0px)"
|
|
56862
|
+
},
|
|
56863
|
+
children: headers.map((row2, rowIndex) => {
|
|
56864
|
+
return /* @__PURE__ */ jsx(
|
|
56865
|
+
Row,
|
|
56866
|
+
{
|
|
56867
|
+
rowIndex,
|
|
56868
|
+
isHeader: true,
|
|
56869
|
+
row: row2,
|
|
56870
|
+
columnCount,
|
|
56871
|
+
columnWidths,
|
|
56872
|
+
colSpan,
|
|
56873
|
+
hasRowActions: rowActions,
|
|
56874
|
+
columnAlignment,
|
|
56875
|
+
columnHeaderAlignments,
|
|
56876
|
+
draggableTable: draggable2
|
|
56877
|
+
},
|
|
56878
|
+
`0_${rowIndex}`
|
|
56879
|
+
);
|
|
56880
|
+
})
|
|
56881
|
+
}
|
|
56882
|
+
),
|
|
56883
|
+
/* @__PURE__ */ jsx("tbody", { children: virtualItems.map((virtualRow, rowIndex) => {
|
|
56884
|
+
const row2 = rows[virtualRow.index];
|
|
56885
|
+
return draggable2 ? /* @__PURE__ */ jsx(
|
|
56886
|
+
PublicDraggable,
|
|
56887
|
+
{
|
|
56888
|
+
draggableId: rowIndex + "",
|
|
56889
|
+
index: rowIndex,
|
|
56890
|
+
isDragDisabled: row2.noDrag,
|
|
56891
|
+
children: (provided2, snapshot) => /* @__PURE__ */ jsx(
|
|
56892
|
+
Row,
|
|
56893
|
+
{
|
|
56894
|
+
rowIndex,
|
|
56895
|
+
row: row2,
|
|
56896
|
+
columnCount,
|
|
56897
|
+
columnWidths,
|
|
56898
|
+
colSpan,
|
|
56899
|
+
hasRowActions: rowActions,
|
|
56900
|
+
columnAlignment,
|
|
56901
|
+
style: {
|
|
56902
|
+
height: `${virtualRow.size}px`,
|
|
56903
|
+
transform: `translateY(${virtualRow.start - rowIndex * virtualRow.size}px)`
|
|
56904
|
+
},
|
|
56905
|
+
provided: provided2,
|
|
56906
|
+
snapshot,
|
|
56907
|
+
draggableTable: draggable2
|
|
56908
|
+
},
|
|
56909
|
+
`1_${rowIndex}`
|
|
56910
|
+
)
|
|
56911
|
+
},
|
|
56912
|
+
`index_${rowIndex}`
|
|
56913
|
+
) : /* @__PURE__ */ jsx(
|
|
56448
56914
|
Row,
|
|
56449
56915
|
{
|
|
56450
56916
|
rowIndex,
|
|
@@ -56454,81 +56920,22 @@ const Table = (props) => {
|
|
|
56454
56920
|
colSpan,
|
|
56455
56921
|
hasRowActions: rowActions,
|
|
56456
56922
|
columnAlignment,
|
|
56457
|
-
|
|
56458
|
-
|
|
56459
|
-
|
|
56460
|
-
|
|
56923
|
+
style: {
|
|
56924
|
+
height: `${virtualRow.size}px`,
|
|
56925
|
+
transform: `translateY(${virtualRow.start - rowIndex * virtualRow.size}px)`
|
|
56926
|
+
}
|
|
56461
56927
|
},
|
|
56462
56928
|
`1_${rowIndex}`
|
|
56463
|
-
)
|
|
56464
|
-
}
|
|
56465
|
-
|
|
56466
|
-
|
|
56467
|
-
|
|
56468
|
-
] })
|
|
56469
|
-
]
|
|
56929
|
+
);
|
|
56930
|
+
}) })
|
|
56931
|
+
]
|
|
56932
|
+
}
|
|
56933
|
+
) });
|
|
56470
56934
|
}
|
|
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`
|
|
56935
|
+
}
|
|
56936
|
+
)
|
|
56491
56937
|
}
|
|
56492
56938
|
),
|
|
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
56939
|
footer2 && /* @__PURE__ */ jsx(
|
|
56533
56940
|
Footer,
|
|
56534
56941
|
{
|
|
@@ -59442,7 +59849,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
59442
59849
|
}
|
|
59443
59850
|
let refCount = 0;
|
|
59444
59851
|
const INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
59445
|
-
var DndProvider = /* @__PURE__ */ memo(function DndProvider2(_param) {
|
|
59852
|
+
var DndProvider = /* @__PURE__ */ memo$1(function DndProvider2(_param) {
|
|
59446
59853
|
var { children } = _param, props = _objectWithoutProperties(_param, [
|
|
59447
59854
|
"children"
|
|
59448
59855
|
]);
|
|
@@ -61803,7 +62210,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
|
|
|
61803
62210
|
var name_1 = featureNames[i];
|
|
61804
62211
|
var _a2 = featureDefinitions[name_1], isEnabled = _a2.isEnabled, Component2 = _a2.Component;
|
|
61805
62212
|
if (isEnabled(props) && Component2) {
|
|
61806
|
-
features.push(React$4.createElement(Component2, __assign$
|
|
62213
|
+
features.push(React$4.createElement(Component2, __assign$3({ key: name_1 }, props, { visualElement: visualElement2 })));
|
|
61807
62214
|
}
|
|
61808
62215
|
}
|
|
61809
62216
|
return features;
|
|
@@ -62044,7 +62451,7 @@ function useProjection(projectionId, _a2, visualElement2, ProjectionNodeConstruc
|
|
|
62044
62451
|
var VisualElementHandler = (
|
|
62045
62452
|
/** @class */
|
|
62046
62453
|
function(_super) {
|
|
62047
|
-
__extends
|
|
62454
|
+
__extends(VisualElementHandler2, _super);
|
|
62048
62455
|
function VisualElementHandler2() {
|
|
62049
62456
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62050
62457
|
}
|
|
@@ -62070,20 +62477,20 @@ function createMotionComponent(_a2) {
|
|
|
62070
62477
|
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
62071
62478
|
function MotionComponent(props, externalRef) {
|
|
62072
62479
|
var layoutId = useLayoutId(props);
|
|
62073
|
-
props = __assign$
|
|
62480
|
+
props = __assign$3(__assign$3({}, props), { layoutId });
|
|
62074
62481
|
var config2 = useContext(MotionConfigContext);
|
|
62075
62482
|
var features = null;
|
|
62076
62483
|
var context2 = useCreateMotionContext(props);
|
|
62077
62484
|
var projectionId = config2.isStatic ? void 0 : useProjectionId();
|
|
62078
62485
|
var visualState = useVisualState(props, config2.isStatic);
|
|
62079
62486
|
if (!config2.isStatic && isBrowser) {
|
|
62080
|
-
context2.visualElement = useVisualElement(Component2, visualState, __assign$
|
|
62487
|
+
context2.visualElement = useVisualElement(Component2, visualState, __assign$3(__assign$3({}, config2), props), createVisualElement);
|
|
62081
62488
|
useProjection(projectionId, props, context2.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
|
|
62082
62489
|
features = useFeatures(props, context2.visualElement, preloadedFeatures);
|
|
62083
62490
|
}
|
|
62084
62491
|
return React$4.createElement(
|
|
62085
62492
|
VisualElementHandler,
|
|
62086
|
-
{ visualElement: context2.visualElement, props: __assign$
|
|
62493
|
+
{ visualElement: context2.visualElement, props: __assign$3(__assign$3({}, config2), props) },
|
|
62087
62494
|
features,
|
|
62088
62495
|
React$4.createElement(MotionContext.Provider, { value: context2 }, useRender(Component2, props, projectionId, useMotionRef(visualState, context2.visualElement, externalRef), visualState, config2.isStatic, context2.visualElement))
|
|
62089
62496
|
);
|
|
@@ -62409,7 +62816,7 @@ const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v
|
|
|
62409
62816
|
const functions = v2.match(functionRegex);
|
|
62410
62817
|
return functions ? functions.map(applyDefaultFilter).join(" ") : v2;
|
|
62411
62818
|
} });
|
|
62412
|
-
var int = __assign$
|
|
62819
|
+
var int = __assign$3(__assign$3({}, number), { transform: Math.round });
|
|
62413
62820
|
var numberValueTypes = {
|
|
62414
62821
|
// Border props
|
|
62415
62822
|
borderWidth: px,
|
|
@@ -62539,7 +62946,7 @@ function useInitialMotionValues(_a2, visualState, isStatic) {
|
|
|
62539
62946
|
var state = createHtmlRenderState();
|
|
62540
62947
|
buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
|
|
62541
62948
|
var vars = state.vars, style2 = state.style;
|
|
62542
|
-
return __assign$
|
|
62949
|
+
return __assign$3(__assign$3({}, vars), style2);
|
|
62543
62950
|
}, [visualState]);
|
|
62544
62951
|
}
|
|
62545
62952
|
function useStyle(props, visualState, isStatic) {
|
|
@@ -62697,18 +63104,18 @@ function buildSVGAttrs(state, _a2, options, transformTemplate) {
|
|
|
62697
63104
|
}
|
|
62698
63105
|
}
|
|
62699
63106
|
var createSvgRenderState = function() {
|
|
62700
|
-
return __assign$
|
|
63107
|
+
return __assign$3(__assign$3({}, createHtmlRenderState()), { attrs: {} });
|
|
62701
63108
|
};
|
|
62702
63109
|
function useSVGProps(props, visualState) {
|
|
62703
63110
|
var visualProps = useMemo$1(function() {
|
|
62704
63111
|
var state = createSvgRenderState();
|
|
62705
63112
|
buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
|
|
62706
|
-
return __assign$
|
|
63113
|
+
return __assign$3(__assign$3({}, state.attrs), { style: __assign$3({}, state.style) });
|
|
62707
63114
|
}, [visualState]);
|
|
62708
63115
|
if (props.style) {
|
|
62709
63116
|
var rawStyles = {};
|
|
62710
63117
|
copyRawValuesOnly(rawStyles, props.style, props);
|
|
62711
|
-
visualProps.style = __assign$
|
|
63118
|
+
visualProps.style = __assign$3(__assign$3({}, rawStyles), visualProps.style);
|
|
62712
63119
|
}
|
|
62713
63120
|
return visualProps;
|
|
62714
63121
|
}
|
|
@@ -62721,7 +63128,7 @@ function createUseRender(forwardMotionProps) {
|
|
|
62721
63128
|
var useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
|
|
62722
63129
|
var visualProps = useVisualProps(props, latestValues, isStatic);
|
|
62723
63130
|
var filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
|
|
62724
|
-
var elementProps = __assign$
|
|
63131
|
+
var elementProps = __assign$3(__assign$3(__assign$3({}, filteredProps), visualProps), { ref: ref2 });
|
|
62725
63132
|
if (projectionId) {
|
|
62726
63133
|
elementProps["data-projection-id"] = projectionId;
|
|
62727
63134
|
}
|
|
@@ -62898,7 +63305,7 @@ var htmlMotionConfig = {
|
|
|
62898
63305
|
function createDomMotionConfig(Component2, _a2, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
|
|
62899
63306
|
var _b = _a2.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
|
|
62900
63307
|
var baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
|
|
62901
|
-
return __assign$
|
|
63308
|
+
return __assign$3(__assign$3({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
|
|
62902
63309
|
}
|
|
62903
63310
|
var AnimationType;
|
|
62904
63311
|
(function(AnimationType2) {
|
|
@@ -63985,7 +64392,7 @@ function initIntersectionObserver(_a2) {
|
|
|
63985
64392
|
var rootObservers = observers.get(lookupRoot);
|
|
63986
64393
|
var key2 = JSON.stringify(options);
|
|
63987
64394
|
if (!rootObservers[key2]) {
|
|
63988
|
-
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$
|
|
64395
|
+
rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$3({ root: root2 }, options));
|
|
63989
64396
|
}
|
|
63990
64397
|
return rootObservers[key2];
|
|
63991
64398
|
}
|
|
@@ -64203,9 +64610,9 @@ var getDefaultTransition = function(valueKey, to2) {
|
|
|
64203
64610
|
} else {
|
|
64204
64611
|
transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
|
|
64205
64612
|
}
|
|
64206
|
-
return __assign$
|
|
64613
|
+
return __assign$3({ to: to2 }, transitionFactory(to2));
|
|
64207
64614
|
};
|
|
64208
|
-
var defaultValueTypes = __assign$
|
|
64615
|
+
var defaultValueTypes = __assign$3(__assign$3({}, numberValueTypes), {
|
|
64209
64616
|
// Color props
|
|
64210
64617
|
color,
|
|
64211
64618
|
backgroundColor: color,
|
|
@@ -64247,7 +64654,7 @@ function isTransitionDefined(_a2) {
|
|
|
64247
64654
|
var legacyRepeatWarning = false;
|
|
64248
64655
|
function convertTransitionToAnimationOptions(_a2) {
|
|
64249
64656
|
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$
|
|
64657
|
+
var options = __assign$3({}, transition);
|
|
64251
64658
|
if (times)
|
|
64252
64659
|
options["offset"] = times;
|
|
64253
64660
|
if (transition.duration)
|
|
@@ -64294,9 +64701,9 @@ function getPopmotionAnimationOptions(transition, options, key2) {
|
|
|
64294
64701
|
}
|
|
64295
64702
|
hydrateKeyframes(options);
|
|
64296
64703
|
if (!isTransitionDefined(transition)) {
|
|
64297
|
-
transition = __assign$
|
|
64704
|
+
transition = __assign$3(__assign$3({}, transition), getDefaultTransition(key2, options.to));
|
|
64298
64705
|
}
|
|
64299
|
-
return __assign$
|
|
64706
|
+
return __assign$3(__assign$3({}, options), convertTransitionToAnimationOptions(transition));
|
|
64300
64707
|
}
|
|
64301
64708
|
function getAnimation(key2, value, target, transition, onComplete) {
|
|
64302
64709
|
var _a2;
|
|
@@ -64322,7 +64729,7 @@ function getAnimation(key2, value, target, transition, onComplete) {
|
|
|
64322
64729
|
return value.set(v2);
|
|
64323
64730
|
}
|
|
64324
64731
|
};
|
|
64325
|
-
return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$
|
|
64732
|
+
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
64733
|
var _a3;
|
|
64327
64734
|
options.onUpdate(v2);
|
|
64328
64735
|
(_a3 = valueTransition.onUpdate) === null || _a3 === void 0 ? void 0 : _a3.call(valueTransition, v2);
|
|
@@ -64575,7 +64982,7 @@ function setTarget(visualElement2, definition) {
|
|
|
64575
64982
|
var _a2 = resolved ? visualElement2.makeTargetAnimatable(resolved, false) : {}, _b = _a2.transitionEnd, transitionEnd = _b === void 0 ? {} : _b;
|
|
64576
64983
|
_a2.transition;
|
|
64577
64984
|
var target = __rest$1(_a2, ["transitionEnd", "transition"]);
|
|
64578
|
-
target = __assign$
|
|
64985
|
+
target = __assign$3(__assign$3({}, target), transitionEnd);
|
|
64579
64986
|
for (var key2 in target) {
|
|
64580
64987
|
var value = resolveFinalValueInKeyframes(target[key2]);
|
|
64581
64988
|
setMotionValue(visualElement2, key2, value);
|
|
@@ -64693,9 +65100,9 @@ function animateTarget(visualElement2, definition, _a2) {
|
|
|
64693
65100
|
if (!value || valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key2)) {
|
|
64694
65101
|
continue;
|
|
64695
65102
|
}
|
|
64696
|
-
var valueTransition = __assign$
|
|
65103
|
+
var valueTransition = __assign$3({ delay }, transition);
|
|
64697
65104
|
if (visualElement2.shouldReduceMotion && isTransformProp(key2)) {
|
|
64698
|
-
valueTransition = __assign$
|
|
65105
|
+
valueTransition = __assign$3(__assign$3({}, valueTransition), { type: false, delay: 0 });
|
|
64699
65106
|
}
|
|
64700
65107
|
var animation = startAnimation(key2, value, valueTarget, valueTransition);
|
|
64701
65108
|
animations2.push(animation);
|
|
@@ -64728,7 +65135,7 @@ function animateChildren(visualElement2, variant, delayChildren, staggerChildren
|
|
|
64728
65135
|
return maxStaggerDuration - i * staggerChildren;
|
|
64729
65136
|
};
|
|
64730
65137
|
Array.from(visualElement2.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
|
|
64731
|
-
animations2.push(animateVariant(child, variant, __assign$
|
|
65138
|
+
animations2.push(animateVariant(child, variant, __assign$3(__assign$3({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
|
|
64732
65139
|
return child.notifyAnimationComplete(variant);
|
|
64733
65140
|
}));
|
|
64734
65141
|
});
|
|
@@ -64772,7 +65179,7 @@ function createAnimationState(visualElement2) {
|
|
|
64772
65179
|
if (resolved) {
|
|
64773
65180
|
resolved.transition;
|
|
64774
65181
|
var transitionEnd = resolved.transitionEnd, target = __rest$1(resolved, ["transition", "transitionEnd"]);
|
|
64775
|
-
acc = __assign$
|
|
65182
|
+
acc = __assign$3(__assign$3(__assign$3({}, acc), target), transitionEnd);
|
|
64776
65183
|
}
|
|
64777
65184
|
return acc;
|
|
64778
65185
|
};
|
|
@@ -64802,7 +65209,7 @@ function createAnimationState(visualElement2) {
|
|
|
64802
65209
|
if (isInherited && isInitialRender && visualElement2.manuallyAnimateOnMount) {
|
|
64803
65210
|
isInherited = false;
|
|
64804
65211
|
}
|
|
64805
|
-
typeState.protectedKeys = __assign$
|
|
65212
|
+
typeState.protectedKeys = __assign$3({}, encounteredKeys);
|
|
64806
65213
|
if (
|
|
64807
65214
|
// If it isn't active and hasn't *just* been set as inactive
|
|
64808
65215
|
!typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
|
|
@@ -64820,7 +65227,7 @@ function createAnimationState(visualElement2) {
|
|
|
64820
65227
|
if (activeDelta === false)
|
|
64821
65228
|
resolvedValues = {};
|
|
64822
65229
|
var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;
|
|
64823
|
-
var allKeys = __assign$
|
|
65230
|
+
var allKeys = __assign$3(__assign$3({}, prevResolvedValues), resolvedValues);
|
|
64824
65231
|
var markToAnimate = function(key3) {
|
|
64825
65232
|
shouldAnimateType = true;
|
|
64826
65233
|
removedKeys.delete(key3);
|
|
@@ -64852,7 +65259,7 @@ function createAnimationState(visualElement2) {
|
|
|
64852
65259
|
typeState.prevProp = prop;
|
|
64853
65260
|
typeState.prevResolvedValues = resolvedValues;
|
|
64854
65261
|
if (typeState.isActive) {
|
|
64855
|
-
encounteredKeys = __assign$
|
|
65262
|
+
encounteredKeys = __assign$3(__assign$3({}, encounteredKeys), resolvedValues);
|
|
64856
65263
|
}
|
|
64857
65264
|
if (isInitialRender && visualElement2.blockInitialAnimation) {
|
|
64858
65265
|
shouldAnimateType = false;
|
|
@@ -64861,7 +65268,7 @@ function createAnimationState(visualElement2) {
|
|
|
64861
65268
|
animations2.push.apply(animations2, __spreadArray$2([], __read(definitionList.map(function(animation) {
|
|
64862
65269
|
return {
|
|
64863
65270
|
animation,
|
|
64864
|
-
options: __assign$
|
|
65271
|
+
options: __assign$3({ type }, options)
|
|
64865
65272
|
};
|
|
64866
65273
|
})), false));
|
|
64867
65274
|
}
|
|
@@ -64869,7 +65276,7 @@ function createAnimationState(visualElement2) {
|
|
|
64869
65276
|
for (var i = 0; i < numAnimationTypes; i++) {
|
|
64870
65277
|
_loop_1(i);
|
|
64871
65278
|
}
|
|
64872
|
-
allAnimatedKeys = __assign$
|
|
65279
|
+
allAnimatedKeys = __assign$3({}, encounteredKeys);
|
|
64873
65280
|
if (removedKeys.size) {
|
|
64874
65281
|
var fallbackAnimation_1 = {};
|
|
64875
65282
|
removedKeys.forEach(function(key2) {
|
|
@@ -64977,7 +65384,7 @@ var PanSession = (
|
|
|
64977
65384
|
return;
|
|
64978
65385
|
var point2 = info3.point;
|
|
64979
65386
|
var timestamp2 = getFrameData().timestamp;
|
|
64980
|
-
_this.history.push(__assign$
|
|
65387
|
+
_this.history.push(__assign$3(__assign$3({}, point2), { timestamp: timestamp2 }));
|
|
64981
65388
|
var _a3 = _this.handlers, onStart = _a3.onStart, onMove = _a3.onMove;
|
|
64982
65389
|
if (!isPanStarted) {
|
|
64983
65390
|
onStart && onStart(_this.lastMoveEvent, info3);
|
|
@@ -65011,7 +65418,7 @@ var PanSession = (
|
|
|
65011
65418
|
var initialInfo = transformPoint(info2, this.transformPagePoint);
|
|
65012
65419
|
var point = initialInfo.point;
|
|
65013
65420
|
var timestamp = getFrameData().timestamp;
|
|
65014
|
-
this.history = [__assign$
|
|
65421
|
+
this.history = [__assign$3(__assign$3({}, point), { timestamp })];
|
|
65015
65422
|
var onSessionStart = handlers2.onSessionStart;
|
|
65016
65423
|
onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
|
|
65017
65424
|
this.removeListeners = pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
|
|
@@ -65532,7 +65939,7 @@ var VisualElementDragControls = (
|
|
|
65532
65939
|
transition = { min: 0, max: 0 };
|
|
65533
65940
|
var bounceStiffness = dragElastic ? 200 : 1e6;
|
|
65534
65941
|
var bounceDamping = dragElastic ? 40 : 1e7;
|
|
65535
|
-
var inertia2 = __assign$
|
|
65942
|
+
var inertia2 = __assign$3(__assign$3({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
|
|
65536
65943
|
return _this.startAxisValueAnimation(axis, inertia2);
|
|
65537
65944
|
});
|
|
65538
65945
|
return Promise.all(momentumAnimations).then(onDragTransitionEnd);
|
|
@@ -65643,7 +66050,7 @@ var VisualElementDragControls = (
|
|
|
65643
66050
|
VisualElementDragControls2.prototype.getProps = function() {
|
|
65644
66051
|
var props = this.visualElement.getProps();
|
|
65645
66052
|
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$
|
|
66053
|
+
return __assign$3(__assign$3({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
|
|
65647
66054
|
};
|
|
65648
66055
|
return VisualElementDragControls2;
|
|
65649
66056
|
}()
|
|
@@ -65800,7 +66207,7 @@ var visualElement = function(_a2) {
|
|
|
65800
66207
|
var values2 = /* @__PURE__ */ new Map();
|
|
65801
66208
|
var valueSubscriptions = /* @__PURE__ */ new Map();
|
|
65802
66209
|
var prevMotionValues = {};
|
|
65803
|
-
var baseTarget = __assign$
|
|
66210
|
+
var baseTarget = __assign$3({}, latestValues);
|
|
65804
66211
|
var removeFromVariantTree;
|
|
65805
66212
|
function render2() {
|
|
65806
66213
|
if (!instance || !isMounted)
|
|
@@ -65834,7 +66241,7 @@ var visualElement = function(_a2) {
|
|
|
65834
66241
|
}
|
|
65835
66242
|
var isControllingVariants = checkIfControllingVariants(props);
|
|
65836
66243
|
var isVariantNode = checkIfVariantNode(props);
|
|
65837
|
-
var element = __assign$
|
|
66244
|
+
var element = __assign$3(__assign$3({
|
|
65838
66245
|
treeType,
|
|
65839
66246
|
/**
|
|
65840
66247
|
* This is a mirror of the internal instance prop, which keeps
|
|
@@ -66199,7 +66606,7 @@ function resolveCSSVariables(visualElement2, _a2, transitionEnd) {
|
|
|
66199
66606
|
if (!(element instanceof Element))
|
|
66200
66607
|
return { target, transitionEnd };
|
|
66201
66608
|
if (transitionEnd) {
|
|
66202
|
-
transitionEnd = __assign$
|
|
66609
|
+
transitionEnd = __assign$3({}, transitionEnd);
|
|
66203
66610
|
}
|
|
66204
66611
|
visualElement2.forEachValue(function(value) {
|
|
66205
66612
|
var current2 = value.get();
|
|
@@ -66354,8 +66761,8 @@ var checkAndConvertChangedValueTypes = function(visualElement2, target, origin2,
|
|
|
66354
66761
|
if (transitionEnd === void 0) {
|
|
66355
66762
|
transitionEnd = {};
|
|
66356
66763
|
}
|
|
66357
|
-
target = __assign$
|
|
66358
|
-
transitionEnd = __assign$
|
|
66764
|
+
target = __assign$3({}, target);
|
|
66765
|
+
transitionEnd = __assign$3({}, transitionEnd);
|
|
66359
66766
|
var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
|
|
66360
66767
|
var removedTransformValues = [];
|
|
66361
66768
|
var hasAttemptedToRemoveTransformValues = false;
|
|
@@ -66508,7 +66915,7 @@ var htmlConfig = {
|
|
|
66508
66915
|
transitionEnd = parsed.transitionEnd;
|
|
66509
66916
|
target = parsed.target;
|
|
66510
66917
|
}
|
|
66511
|
-
return __assign$
|
|
66918
|
+
return __assign$3({ transition, transitionEnd }, target);
|
|
66512
66919
|
},
|
|
66513
66920
|
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
|
|
66514
66921
|
build: function(element, renderState, latestValues, options, props) {
|
|
@@ -66520,7 +66927,7 @@ var htmlConfig = {
|
|
|
66520
66927
|
render: renderHTML
|
|
66521
66928
|
};
|
|
66522
66929
|
var htmlVisualElement = visualElement(htmlConfig);
|
|
66523
|
-
var svgVisualElement = visualElement(__assign$
|
|
66930
|
+
var svgVisualElement = visualElement(__assign$3(__assign$3({}, htmlConfig), { getBaseTarget: function(props, key2) {
|
|
66524
66931
|
return props[key2];
|
|
66525
66932
|
}, readValueFromInstance: function(domElement, key2) {
|
|
66526
66933
|
var _a2;
|
|
@@ -66598,7 +67005,7 @@ var correctBoxShadow = {
|
|
|
66598
67005
|
var MeasureLayoutWithContext = (
|
|
66599
67006
|
/** @class */
|
|
66600
67007
|
function(_super) {
|
|
66601
|
-
__extends
|
|
67008
|
+
__extends(MeasureLayoutWithContext2, _super);
|
|
66602
67009
|
function MeasureLayoutWithContext2() {
|
|
66603
67010
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
66604
67011
|
}
|
|
@@ -66617,7 +67024,7 @@ var MeasureLayoutWithContext = (
|
|
|
66617
67024
|
projection.addEventListener("animationComplete", function() {
|
|
66618
67025
|
_this.safeToRemove();
|
|
66619
67026
|
});
|
|
66620
|
-
projection.setOptions(__assign$
|
|
67027
|
+
projection.setOptions(__assign$3(__assign$3({}, projection.options), { onExitComplete: function() {
|
|
66621
67028
|
return _this.safeToRemove();
|
|
66622
67029
|
} }));
|
|
66623
67030
|
}
|
|
@@ -66682,10 +67089,10 @@ var MeasureLayoutWithContext = (
|
|
|
66682
67089
|
function MeasureLayout(props) {
|
|
66683
67090
|
var _a2 = __read(usePresence(), 2), isPresent = _a2[0], safeToRemove = _a2[1];
|
|
66684
67091
|
var layoutGroup = useContext(LayoutGroupContext);
|
|
66685
|
-
return React__default.createElement(MeasureLayoutWithContext, __assign$
|
|
67092
|
+
return React__default.createElement(MeasureLayoutWithContext, __assign$3({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
|
|
66686
67093
|
}
|
|
66687
67094
|
var defaultScaleCorrectors = {
|
|
66688
|
-
borderRadius: __assign$
|
|
67095
|
+
borderRadius: __assign$3(__assign$3({}, correctBorderRadius), { applyTo: [
|
|
66689
67096
|
"borderTopLeftRadius",
|
|
66690
67097
|
"borderTopRightRadius",
|
|
66691
67098
|
"borderBottomLeftRadius",
|
|
@@ -67108,7 +67515,7 @@ function createProjectionNode(_a2) {
|
|
|
67108
67515
|
_this.resumingFrom.resumingFrom = void 0;
|
|
67109
67516
|
}
|
|
67110
67517
|
_this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
|
|
67111
|
-
var animationOptions = __assign$
|
|
67518
|
+
var animationOptions = __assign$3(__assign$3({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
|
|
67112
67519
|
if (visualElement2.shouldReduceMotion) {
|
|
67113
67520
|
animationOptions.delay = 0;
|
|
67114
67521
|
animationOptions.type = false;
|
|
@@ -67362,7 +67769,7 @@ function createProjectionNode(_a2) {
|
|
|
67362
67769
|
};
|
|
67363
67770
|
ProjectionNode.prototype.setOptions = function(options) {
|
|
67364
67771
|
var _a3;
|
|
67365
|
-
this.options = __assign$
|
|
67772
|
+
this.options = __assign$3(__assign$3(__assign$3({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
|
|
67366
67773
|
};
|
|
67367
67774
|
ProjectionNode.prototype.clearMeasurements = function() {
|
|
67368
67775
|
this.scroll = void 0;
|
|
@@ -67480,7 +67887,7 @@ function createProjectionNode(_a2) {
|
|
|
67480
67887
|
}
|
|
67481
67888
|
var snapshot = this.snapshot;
|
|
67482
67889
|
var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
|
|
67483
|
-
var mixedValues = __assign$
|
|
67890
|
+
var mixedValues = __assign$3({}, this.latestValues);
|
|
67484
67891
|
var targetDelta = createDelta();
|
|
67485
67892
|
this.relativeTarget = this.relativeTargetOrigin = void 0;
|
|
67486
67893
|
this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
|
|
@@ -67523,7 +67930,7 @@ function createProjectionNode(_a2) {
|
|
|
67523
67930
|
}
|
|
67524
67931
|
this.pendingAnimation = sync.update(function() {
|
|
67525
67932
|
globalProjectionState.hasAnimatedSinceResize = true;
|
|
67526
|
-
_this.currentAnimation = animate(0, animationTarget, __assign$
|
|
67933
|
+
_this.currentAnimation = animate(0, animationTarget, __assign$3(__assign$3({}, options), { onUpdate: function(latest) {
|
|
67527
67934
|
var _a4;
|
|
67528
67935
|
_this.mixTargetDelta(latest);
|
|
67529
67936
|
(_a4 = options.onUpdate) === null || _a4 === void 0 ? void 0 : _a4.call(options, latest);
|
|
@@ -67891,7 +68298,7 @@ var HTMLProjectionNode = createProjectionNode({
|
|
|
67891
68298
|
return Boolean(window.getComputedStyle(instance).position === "fixed");
|
|
67892
68299
|
}
|
|
67893
68300
|
});
|
|
67894
|
-
var featureBundle = __assign$
|
|
68301
|
+
var featureBundle = __assign$3(__assign$3(__assign$3(__assign$3({}, animations), gestureAnimations), drag), layoutFeatures);
|
|
67895
68302
|
var motion = /* @__PURE__ */ createMotionProxy(function(Component2, config2) {
|
|
67896
68303
|
return createDomMotionConfig(Component2, config2, featureBundle, createDomVisualElement, HTMLProjectionNode);
|
|
67897
68304
|
});
|