@superblocksteam/library 2.0.6-next.1 → 2.0.6-next.10
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/{allPaths-CnwU0IkR.js → allPaths-BbwLOFSN.js} +2 -2
- package/dist/{allPaths-CnwU0IkR.js.map → allPaths-BbwLOFSN.js.map} +1 -1
- package/dist/{allPaths-D2gSnJTY.js → allPaths-YpR_xtpv.js} +2 -2
- package/dist/{allPaths-D2gSnJTY.js.map → allPaths-YpR_xtpv.js.map} +1 -1
- package/dist/{allPathsLoader-CKSn0cwC.js → allPathsLoader-CTr7XzYS.js} +3 -3
- package/dist/{allPathsLoader-CKSn0cwC.js.map → allPathsLoader-CTr7XzYS.js.map} +1 -1
- package/dist/{allPathsLoader-gti9SNxQ.js → allPathsLoader-DjBKQsij.js} +3 -3
- package/dist/{allPathsLoader-gti9SNxQ.js.map → allPathsLoader-DjBKQsij.js.map} +1 -1
- package/dist/{devtools-consolidated-DZq1Gl91.js → devtools-consolidated-B2GVETCf.js} +2 -2
- package/dist/{devtools-consolidated-DZq1Gl91.js.map → devtools-consolidated-B2GVETCf.js.map} +1 -1
- package/dist/{index-4wDJlcoC.js → index-snr_jI8a.js} +1011 -718
- package/dist/{index-4wDJlcoC.js.map → index-snr_jI8a.js.map} +1 -1
- package/dist/index.js +2 -2
- package/dist/{splitPathsBySizeLoader-YkToSR_C.js → splitPathsBySizeLoader-Blv6tUe4.js} +2 -2
- package/dist/{splitPathsBySizeLoader-YkToSR_C.js.map → splitPathsBySizeLoader-Blv6tUe4.js.map} +1 -1
- package/dist/{splitPathsBySizeLoader-CJ_TAf-i.js → splitPathsBySizeLoader-DbNFtg9G.js} +2 -2
- package/dist/{splitPathsBySizeLoader-CJ_TAf-i.js.map → splitPathsBySizeLoader-DbNFtg9G.js.map} +1 -1
- package/dist-types/lib/internal-details/is-sb-component.d.ts +5 -1
- package/dist-types/lib/user-facing/components/grid/index.d.ts +7 -5
- package/dist-types/lib/user-facing/components/table/components/table-header.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/index.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/props.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/table-component.d.ts +1 -0
- package/dist-types/lib/user-facing/components/table/table-utilities.d.ts +4 -7
- package/dist-types/lib/user-facing/components/table/table-widget.d.ts +3 -2
- package/dist-types/lib/user-facing/components/table/types.d.ts +1 -1
- package/package.json +2 -2
- package/dist-types/lib/user-facing/components/grid/utils.d.ts +0 -1
|
@@ -48,7 +48,7 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
|
|
|
48
48
|
var __privateMethod = (obj, member, method4) => (__accessCheck(obj, member, "access private method"), method4);
|
|
49
49
|
var _removeSourceIdElement_dec, _setSourceIdElement_dec, _setActiveRootInstanceId_dec, _init, _cancelApi_dec, _runApi_dec, _init2, _renameWidget_dec, _setWidgetProperty_dec, _setWidgetProperties_dec, _writeRuntimeProperties_dec, _deleteComponents_dec, _dropComponent_dec, _createComponent_dec, _batchUpdate_dec, _clearPendingTransactions_dec, _addPendingTransaction_dec, _executeOrAddToBatch_dec, _init3, _addOptimisticCreateWidget_dec, _processRootWidget_dec, _init4, _refreshPositionsAndGetDropConstraints_dec, _init5, _updateChildPositions_dec, _setWidgetPosition_dec, _setActiveTargetRect_dec, _setActiveDragRect_dec, _setDropTargetId_dec, _setInvalidDropTarget_dec, _setValidRootIds_dec, _cancelNewComponentDrag_dec, _startNewComponentDrag_dec, _setIsDragging_dec, _setWidgetFeatures_dec, _init6;
|
|
50
50
|
import * as React from "react";
|
|
51
|
-
import React__default, { isValidElement as isValidElement$1, version as version$2, createContext, useContext, useEffect, useRef, useLayoutEffect as useLayoutEffect$2, Component, useState, useMemo as useMemo$2, useCallback, forwardRef, useImperativeHandle, cloneElement as cloneElement$1, createElement, Suspense, Children, memo, useReducer,
|
|
51
|
+
import React__default, { isValidElement as isValidElement$1, version as version$2, createContext, useContext, useEffect, useRef, useLayoutEffect as useLayoutEffect$2, Component, useState, useMemo as useMemo$2, useCallback, forwardRef, useImperativeHandle, cloneElement as cloneElement$1, createElement, Suspense, Children, memo, useReducer, useSyncExternalStore, PureComponent, createRef } from "react";
|
|
52
52
|
import { S as SvgClose, a as SvgSystemDanger, b as SvgSystemInfo, c as SvgSystemError, d as SvgSystemSuccess, e as SvgPlus, f as SvgHide, g as SvgChevronDown, h as SvgEmptyCheckbox, i as SvgMinus, j as SvgCheckmark, k as SvgCopy, l as SvgExternalLink, m as SvgPlay, n as SvgDownload, o as SvgTrash, p as SvgFilter, q as SvgFreeze, r as SvgSort, s as SvgEllipsis, t as SvgCrossXs, u as SvgClark } from "./icons-NrNO8p_u.js";
|
|
53
53
|
import * as ReactDOM from "react-dom";
|
|
54
54
|
import ReactDOM__default, { unstable_batchedUpdates, flushSync, createPortal } from "react-dom";
|
|
@@ -55191,8 +55191,8 @@ function RawList(props2, ref2) {
|
|
|
55191
55191
|
showScrollBar
|
|
55192
55192
|
}));
|
|
55193
55193
|
}
|
|
55194
|
-
var List$
|
|
55195
|
-
List$
|
|
55194
|
+
var List$2 = /* @__PURE__ */ React.forwardRef(RawList);
|
|
55195
|
+
List$2.displayName = "List";
|
|
55196
55196
|
function isPlatformMac() {
|
|
55197
55197
|
return /(mac\sos|macintosh)/i.test(navigator.appVersion);
|
|
55198
55198
|
}
|
|
@@ -55384,7 +55384,7 @@ var OptionList = function OptionList2(_15, ref2) {
|
|
|
55384
55384
|
width: 0,
|
|
55385
55385
|
overflow: "hidden"
|
|
55386
55386
|
}
|
|
55387
|
-
}, renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), /* @__PURE__ */ React.createElement(List$
|
|
55387
|
+
}, renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), /* @__PURE__ */ React.createElement(List$2, {
|
|
55388
55388
|
itemKey: "key",
|
|
55389
55389
|
ref: listRef,
|
|
55390
55390
|
data: memoFlattenOptions,
|
|
@@ -57930,7 +57930,7 @@ function WrapperField(_ref6) {
|
|
|
57930
57930
|
}));
|
|
57931
57931
|
}
|
|
57932
57932
|
var define_process_env_default$16 = {};
|
|
57933
|
-
function List(_ref2) {
|
|
57933
|
+
function List$1(_ref2) {
|
|
57934
57934
|
var name = _ref2.name, initialValue = _ref2.initialValue, children = _ref2.children, rules2 = _ref2.rules, validateTrigger = _ref2.validateTrigger, isListField = _ref2.isListField;
|
|
57935
57935
|
var context2 = React.useContext(Context$1);
|
|
57936
57936
|
var wrapperListContext = React.useContext(ListContext);
|
|
@@ -59101,7 +59101,7 @@ var InternalForm$1 = /* @__PURE__ */ React.forwardRef(Form$3);
|
|
|
59101
59101
|
var RefForm = InternalForm$1;
|
|
59102
59102
|
RefForm.FormProvider = FormProvider$1;
|
|
59103
59103
|
RefForm.Field = WrapperField;
|
|
59104
|
-
RefForm.List = List;
|
|
59104
|
+
RefForm.List = List$1;
|
|
59105
59105
|
RefForm.useForm = useForm$1;
|
|
59106
59106
|
RefForm.useWatch = useWatch;
|
|
59107
59107
|
var FormContext = /* @__PURE__ */ React.createContext({
|
|
@@ -67437,7 +67437,7 @@ var PanelContext = /* @__PURE__ */ React.createContext({});
|
|
|
67437
67437
|
var HIDDEN_STYLE = {
|
|
67438
67438
|
visibility: "hidden"
|
|
67439
67439
|
};
|
|
67440
|
-
function Header$
|
|
67440
|
+
function Header$2(_ref2) {
|
|
67441
67441
|
var prefixCls = _ref2.prefixCls, _ref$prevIcon = _ref2.prevIcon, prevIcon = _ref$prevIcon === void 0 ? "‹" : _ref$prevIcon, _ref$nextIcon = _ref2.nextIcon, nextIcon = _ref$nextIcon === void 0 ? "›" : _ref$nextIcon, _ref$superPrevIcon = _ref2.superPrevIcon, superPrevIcon = _ref$superPrevIcon === void 0 ? "«" : _ref$superPrevIcon, _ref$superNextIcon = _ref2.superNextIcon, superNextIcon = _ref$superNextIcon === void 0 ? "»" : _ref$superNextIcon, onSuperPrev = _ref2.onSuperPrev, onSuperNext = _ref2.onSuperNext, onPrev = _ref2.onPrev, onNext = _ref2.onNext, children = _ref2.children;
|
|
67442
67442
|
var _React$useContext = React.useContext(PanelContext), hideNextBtn = _React$useContext.hideNextBtn, hidePrevBtn = _React$useContext.hidePrevBtn;
|
|
67443
67443
|
return /* @__PURE__ */ React.createElement("div", {
|
|
@@ -67480,7 +67480,7 @@ function DecadeHeader(props2) {
|
|
|
67480
67480
|
var yearNumber = generateConfig2.getYear(viewDate);
|
|
67481
67481
|
var startYear = Math.floor(yearNumber / DECADE_DISTANCE_COUNT) * DECADE_DISTANCE_COUNT;
|
|
67482
67482
|
var endYear = startYear + DECADE_DISTANCE_COUNT - 1;
|
|
67483
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
67483
|
+
return /* @__PURE__ */ React.createElement(Header$2, _extends$4({}, props2, {
|
|
67484
67484
|
prefixCls: headerPrefixCls,
|
|
67485
67485
|
onSuperPrev: onPrevDecades,
|
|
67486
67486
|
onSuperNext: onNextDecades
|
|
@@ -68036,7 +68036,7 @@ function TimeHeader(props2) {
|
|
|
68036
68036
|
}
|
|
68037
68037
|
var prefixCls = props2.prefixCls, generateConfig2 = props2.generateConfig, locale2 = props2.locale, value = props2.value, format3 = props2.format;
|
|
68038
68038
|
var headerPrefixCls = "".concat(prefixCls, "-header");
|
|
68039
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
68039
|
+
return /* @__PURE__ */ React.createElement(Header$2, {
|
|
68040
68040
|
prefixCls: headerPrefixCls
|
|
68041
68041
|
}, value ? formatValue(value, {
|
|
68042
68042
|
locale: locale2,
|
|
@@ -68495,7 +68495,7 @@ function DateHeader(props2) {
|
|
|
68495
68495
|
generateConfig: generateConfig2
|
|
68496
68496
|
}) : monthsLocale[month]);
|
|
68497
68497
|
var monthYearNodes = locale2.monthBeforeYear ? [monthNode, yearNode] : [yearNode, monthNode];
|
|
68498
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
68498
|
+
return /* @__PURE__ */ React.createElement(Header$2, _extends$4({}, props2, {
|
|
68499
68499
|
prefixCls: headerPrefixCls,
|
|
68500
68500
|
onSuperPrev: onPrevYear,
|
|
68501
68501
|
onPrev: onPrevMonth,
|
|
@@ -68679,7 +68679,7 @@ function MonthHeader(props2) {
|
|
|
68679
68679
|
return null;
|
|
68680
68680
|
}
|
|
68681
68681
|
var headerPrefixCls = "".concat(prefixCls, "-header");
|
|
68682
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
68682
|
+
return /* @__PURE__ */ React.createElement(Header$2, _extends$4({}, props2, {
|
|
68683
68683
|
prefixCls: headerPrefixCls,
|
|
68684
68684
|
onSuperPrev: onPrevYear,
|
|
68685
68685
|
onSuperNext: onNextYear
|
|
@@ -68797,7 +68797,7 @@ function QuarterHeader(props2) {
|
|
|
68797
68797
|
return null;
|
|
68798
68798
|
}
|
|
68799
68799
|
var headerPrefixCls = "".concat(prefixCls, "-header");
|
|
68800
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
68800
|
+
return /* @__PURE__ */ React.createElement(Header$2, _extends$4({}, props2, {
|
|
68801
68801
|
prefixCls: headerPrefixCls,
|
|
68802
68802
|
onSuperPrev: onPrevYear,
|
|
68803
68803
|
onSuperNext: onNextYear
|
|
@@ -68911,7 +68911,7 @@ function YearHeader(props2) {
|
|
|
68911
68911
|
var yearNumber = generateConfig2.getYear(viewDate);
|
|
68912
68912
|
var startYear = Math.floor(yearNumber / YEAR_DECADE_COUNT) * YEAR_DECADE_COUNT;
|
|
68913
68913
|
var endYear = startYear + YEAR_DECADE_COUNT - 1;
|
|
68914
|
-
return /* @__PURE__ */ React.createElement(Header$
|
|
68914
|
+
return /* @__PURE__ */ React.createElement(Header$2, _extends$4({}, props2, {
|
|
68915
68915
|
prefixCls: headerPrefixCls,
|
|
68916
68916
|
onSuperPrev: onPrevDecade,
|
|
68917
68917
|
onSuperNext: onNextDecade
|
|
@@ -73131,7 +73131,7 @@ var FormList = function FormList2(_a2) {
|
|
|
73131
73131
|
status: "error"
|
|
73132
73132
|
};
|
|
73133
73133
|
}, [prefixCls]);
|
|
73134
|
-
return /* @__PURE__ */ React.createElement(List, _extends$4({}, props2), function(fields, operation, meta) {
|
|
73134
|
+
return /* @__PURE__ */ React.createElement(List$1, _extends$4({}, props2), function(fields, operation, meta) {
|
|
73135
73135
|
return /* @__PURE__ */ React.createElement(FormItemPrefixContext.Provider, {
|
|
73136
73136
|
value: contextValue
|
|
73137
73137
|
}, children(fields.map(function(field2) {
|
|
@@ -83504,7 +83504,7 @@ function registerStores(stores) {
|
|
|
83504
83504
|
internalStores = { ...internalStores, ...stores };
|
|
83505
83505
|
if (SUPPORTED_MODES.includes("production")) {
|
|
83506
83506
|
if (Object.keys(internalStores).length === Object.keys(stores).length) {
|
|
83507
|
-
import("./devtools-consolidated-
|
|
83507
|
+
import("./devtools-consolidated-B2GVETCf.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
|
|
83508
83508
|
setRegisteredStores(internalStores);
|
|
83509
83509
|
initializeCustomDevTools();
|
|
83510
83510
|
}).catch((error) => {
|
|
@@ -83517,7 +83517,7 @@ function registerStores(stores) {
|
|
|
83517
83517
|
}
|
|
83518
83518
|
}
|
|
83519
83519
|
const DevToolsInternal = React__default.lazy(() => {
|
|
83520
|
-
return import("./devtools-consolidated-
|
|
83520
|
+
return import("./devtools-consolidated-B2GVETCf.js").then((module2) => ({
|
|
83521
83521
|
default: module2.CustomDevTools
|
|
83522
83522
|
}));
|
|
83523
83523
|
});
|
|
@@ -91039,14 +91039,14 @@ function getLoaderFn$1(options) {
|
|
|
91039
91039
|
if (!(loader === "all")) return [3, 3];
|
|
91040
91040
|
return [4, import(
|
|
91041
91041
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
91042
|
-
"./allPathsLoader-
|
|
91042
|
+
"./allPathsLoader-CTr7XzYS.js"
|
|
91043
91043
|
)];
|
|
91044
91044
|
case 2:
|
|
91045
91045
|
return [2, _b2.sent().allPathsLoader];
|
|
91046
91046
|
case 3:
|
|
91047
91047
|
return [4, import(
|
|
91048
91048
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
91049
|
-
"./splitPathsBySizeLoader-
|
|
91049
|
+
"./splitPathsBySizeLoader-DbNFtg9G.js"
|
|
91050
91050
|
)];
|
|
91051
91051
|
case 4:
|
|
91052
91052
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -117530,12 +117530,18 @@ const AddSectionButton = ({
|
|
|
117530
117530
|
sectionInstanceId
|
|
117531
117531
|
}) => {
|
|
117532
117532
|
const indexForNewSection = placement === "above" ? indexForBaseSection : indexForBaseSection + 1;
|
|
117533
|
-
const createSection = useCallback(() => {
|
|
117534
|
-
createComponent({
|
|
117533
|
+
const createSection = useCallback(async () => {
|
|
117534
|
+
const newSectionSourceId = await createComponent({
|
|
117535
117535
|
componentType: "SbSection",
|
|
117536
117536
|
parent: { id: sectionParentSourceId, index: indexForNewSection },
|
|
117537
117537
|
scopeName: sectionParentScopeName
|
|
117538
117538
|
});
|
|
117539
|
+
if (newSectionSourceId) {
|
|
117540
|
+
const newSectionInstanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
|
|
117541
|
+
newSectionSourceId
|
|
117542
|
+
);
|
|
117543
|
+
getEditStore().ui.selectWidget(newSectionInstanceId);
|
|
117544
|
+
}
|
|
117539
117545
|
}, [sectionParentSourceId, indexForNewSection, sectionParentScopeName]);
|
|
117540
117546
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
117541
117547
|
Wrapper$2,
|
|
@@ -120058,20 +120064,16 @@ const generateClassName = (seed2) => {
|
|
|
120058
120064
|
return `superblocks_widget_${seed2}`;
|
|
120059
120065
|
};
|
|
120060
120066
|
const getCanvasClassName = () => "canvas";
|
|
120061
|
-
const getChildName = (child) => {
|
|
120062
|
-
var _a2;
|
|
120063
|
-
return ((_a2 = getBindingIdentifier(child.props.bind)) == null ? void 0 : _a2.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE];
|
|
120064
|
-
};
|
|
120065
120067
|
const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights) => {
|
|
120066
120068
|
return orderedNames.reduce(
|
|
120067
120069
|
(acc, name) => {
|
|
120068
120070
|
var _a2;
|
|
120069
|
-
const child = childrenArray.find((child2) =>
|
|
120071
|
+
const child = childrenArray.find((child2) => child2.name === name);
|
|
120070
120072
|
if (!child) {
|
|
120071
120073
|
return acc;
|
|
120072
120074
|
}
|
|
120073
|
-
const marginTopPx = (((_a2 = child.
|
|
120074
|
-
const constraintTop = child.
|
|
120075
|
+
const marginTopPx = (((_a2 = child.marginTop) == null ? void 0 : _a2.value) ?? 0) * rowHeight;
|
|
120076
|
+
const constraintTop = child.constraintTop;
|
|
120075
120077
|
const bottomFunc = (name2) => {
|
|
120076
120078
|
const topRow = acc[name2];
|
|
120077
120079
|
const pxHeight = pxHeights[name2];
|
|
@@ -120096,16 +120098,16 @@ const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights
|
|
|
120096
120098
|
const orderConstraints = (children) => {
|
|
120097
120099
|
const childrenMap = children.reduce(
|
|
120098
120100
|
(acc, child) => {
|
|
120099
|
-
acc[
|
|
120101
|
+
acc[child.name] = child;
|
|
120100
120102
|
return acc;
|
|
120101
120103
|
},
|
|
120102
120104
|
{}
|
|
120103
120105
|
);
|
|
120104
120106
|
const constraintsMap = children.reduce(
|
|
120105
120107
|
(acc, child) => {
|
|
120106
|
-
if (child.
|
|
120107
|
-
const constraints = Array.isArray(child.
|
|
120108
|
-
acc[
|
|
120108
|
+
if (child.constraintTop) {
|
|
120109
|
+
const constraints = Array.isArray(child.constraintTop) ? child.constraintTop : [child.constraintTop];
|
|
120110
|
+
acc[child.name] = constraints.filter(
|
|
120109
120111
|
(constraint) => !!childrenMap[constraint]
|
|
120110
120112
|
);
|
|
120111
120113
|
}
|
|
@@ -120117,24 +120119,24 @@ const orderConstraints = (children) => {
|
|
|
120117
120119
|
const foundItems = /* @__PURE__ */ new Set();
|
|
120118
120120
|
const itemsLeft = /* @__PURE__ */ new Set();
|
|
120119
120121
|
children.forEach((child) => {
|
|
120120
|
-
const constraints = constraintsMap[
|
|
120122
|
+
const constraints = constraintsMap[child.name] ?? [];
|
|
120121
120123
|
const hasNoConstraints = constraints.length === 0;
|
|
120122
120124
|
if (hasNoConstraints) {
|
|
120123
|
-
foundItems.add(
|
|
120124
|
-
orderedNames.push(
|
|
120125
|
+
foundItems.add(child.name);
|
|
120126
|
+
orderedNames.push(child.name);
|
|
120125
120127
|
} else {
|
|
120126
120128
|
itemsLeft.add(child);
|
|
120127
120129
|
}
|
|
120128
120130
|
});
|
|
120129
120131
|
while (itemsLeft.size > 0) {
|
|
120130
120132
|
itemsLeft.forEach((child) => {
|
|
120131
|
-
const constraints = constraintsMap[
|
|
120133
|
+
const constraints = constraintsMap[child.name] ?? [];
|
|
120132
120134
|
const constraintsLeft = constraints.filter(
|
|
120133
120135
|
(constraint) => !foundItems.has(constraint)
|
|
120134
120136
|
);
|
|
120135
120137
|
if (constraintsLeft.length === 0) {
|
|
120136
|
-
foundItems.add(
|
|
120137
|
-
orderedNames.push(
|
|
120138
|
+
foundItems.add(child.name);
|
|
120139
|
+
orderedNames.push(child.name);
|
|
120138
120140
|
itemsLeft.delete(child);
|
|
120139
120141
|
}
|
|
120140
120142
|
});
|
|
@@ -120185,99 +120187,141 @@ const heightReducer = (state, action2) => {
|
|
|
120185
120187
|
}
|
|
120186
120188
|
};
|
|
120187
120189
|
const EMPTY_ARRAY$1 = [];
|
|
120188
|
-
const
|
|
120189
|
-
|
|
120190
|
-
|
|
120191
|
-
|
|
120192
|
-
|
|
120193
|
-
|
|
120194
|
-
|
|
120195
|
-
|
|
120196
|
-
|
|
120197
|
-
|
|
120198
|
-
|
|
120199
|
-
|
|
120200
|
-
|
|
120201
|
-
|
|
120202
|
-
}
|
|
120203
|
-
return childrenArray2;
|
|
120204
|
-
}, [children, isEditing]);
|
|
120205
|
-
const columns = props2.columns ?? 12;
|
|
120206
|
-
const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
|
|
120207
|
-
const gridPositions = useMemo$2(() => {
|
|
120208
|
-
const orderedNames = orderConstraints(childrenArray);
|
|
120209
|
-
const rowPos = calculateRowPositions(
|
|
120210
|
-
orderedNames,
|
|
120211
|
-
childrenArray,
|
|
120212
|
-
rowHeight,
|
|
120213
|
-
pxHeights
|
|
120214
|
-
);
|
|
120215
|
-
const positions = childrenArray.reduce(
|
|
120216
|
-
(acc, child) => {
|
|
120217
|
-
var _a3, _b3, _c2;
|
|
120218
|
-
let width = ((_a3 = child.props.width) == null ? void 0 : _a3.value) ?? (child.type.sbType === "SbTable" || child.type.sbType === "SbContainer" ? 6 : 2);
|
|
120219
|
-
if (((_b3 = child.props.width) == null ? void 0 : _b3.mode) === "fill") {
|
|
120220
|
-
width = columns;
|
|
120221
|
-
}
|
|
120222
|
-
acc[getChildName(child)] = {
|
|
120223
|
-
top: rowPos[getChildName(child)],
|
|
120224
|
-
left: ((_c2 = child.props.marginLeft) == null ? void 0 : _c2.value) ?? 0,
|
|
120225
|
-
width,
|
|
120226
|
-
height: Math.ceil(pxHeights[getChildName(child)] / rowHeight)
|
|
120227
|
-
};
|
|
120228
|
-
return acc;
|
|
120229
|
-
},
|
|
120230
|
-
{}
|
|
120231
|
-
);
|
|
120232
|
-
return positions;
|
|
120233
|
-
}, [columns, childrenArray, rowHeight, pxHeights]);
|
|
120234
|
-
const gridStyle = React__default.useMemo(() => {
|
|
120235
|
-
const spacingValue = 0;
|
|
120236
|
-
const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
|
|
120237
|
-
return {
|
|
120238
|
-
display: "grid",
|
|
120239
|
-
gridAutoRows: `${rowHeight}px`,
|
|
120240
|
-
gap: `${spacingValue}px`,
|
|
120241
|
-
gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
|
|
120242
|
-
...style2
|
|
120243
|
-
};
|
|
120244
|
-
}, [columns, rowHeight, style2]);
|
|
120245
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => {
|
|
120246
|
-
var _a3, _b3;
|
|
120247
|
-
const heightMode = ((_a3 = child.props.height) == null ? void 0 : _a3.mode) ?? "fit";
|
|
120248
|
-
const top2 = gridPositions[getChildName(child)].top;
|
|
120249
|
-
const left2 = gridPositions[getChildName(child)].left;
|
|
120250
|
-
const rows = gridPositions[getChildName(child)].height;
|
|
120251
|
-
const columns2 = gridPositions[getChildName(child)].width;
|
|
120190
|
+
const GridChild = observer(
|
|
120191
|
+
({
|
|
120192
|
+
childProps,
|
|
120193
|
+
gridPositions,
|
|
120194
|
+
rowHeight,
|
|
120195
|
+
dispatchHeight,
|
|
120196
|
+
childElement
|
|
120197
|
+
}) => {
|
|
120198
|
+
var _a2, _b2;
|
|
120199
|
+
const heightMode = ((_a2 = childProps.height) == null ? void 0 : _a2.mode) ?? "fit";
|
|
120200
|
+
const top2 = gridPositions[childProps.name].top;
|
|
120201
|
+
const left2 = gridPositions[childProps.name].left;
|
|
120202
|
+
const rows = gridPositions[childProps.name].height;
|
|
120203
|
+
const columns = gridPositions[childProps.name].width;
|
|
120252
120204
|
const Component3 = heightMode === "fit" ? MeasuredComponent : StaticComponent;
|
|
120253
120205
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120254
120206
|
"div",
|
|
120255
120207
|
{
|
|
120256
120208
|
style: {
|
|
120257
120209
|
gridRow: `${top2 + 1} / span ${Math.max(1, rows)}`,
|
|
120258
|
-
gridColumn: `${left2 + 1} / span ${Math.max(1,
|
|
120210
|
+
gridColumn: `${left2 + 1} / span ${Math.max(1, columns)}`,
|
|
120259
120211
|
width: "100%",
|
|
120260
120212
|
maxWidth: "100%"
|
|
120261
120213
|
},
|
|
120262
120214
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120263
120215
|
Component3,
|
|
120264
120216
|
{
|
|
120265
|
-
staticHeight: (((
|
|
120217
|
+
staticHeight: (((_b2 = childProps.height) == null ? void 0 : _b2.value) ?? 0) * rowHeight,
|
|
120266
120218
|
onHeightChanged: (height) => {
|
|
120267
120219
|
dispatchHeight({
|
|
120268
120220
|
type: "SET_HEIGHT",
|
|
120269
|
-
name:
|
|
120221
|
+
name: childProps.name,
|
|
120270
120222
|
height
|
|
120271
120223
|
});
|
|
120272
120224
|
},
|
|
120273
|
-
children:
|
|
120225
|
+
children: childElement
|
|
120274
120226
|
}
|
|
120275
120227
|
)
|
|
120276
120228
|
},
|
|
120277
|
-
|
|
120229
|
+
childProps.name
|
|
120278
120230
|
);
|
|
120279
|
-
}
|
|
120280
|
-
|
|
120231
|
+
}
|
|
120232
|
+
);
|
|
120233
|
+
const InternalGrid = observer(
|
|
120234
|
+
({ children = EMPTY_ARRAY$1, ...props2 }) => {
|
|
120235
|
+
var _a2;
|
|
120236
|
+
const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
|
|
120237
|
+
const rowHeight = ((_a2 = props2.rowHeight) == null ? void 0 : _a2.value) ?? 12;
|
|
120238
|
+
const childrenArray = useObserverMemo(() => {
|
|
120239
|
+
var _a3;
|
|
120240
|
+
const childrenArray2 = Array.isArray(children) ? children : [children];
|
|
120241
|
+
const isEditing = Boolean((_a3 = rootStore.editStore) == null ? void 0 : _a3.isInitialized);
|
|
120242
|
+
const withEvaluatedProps = childrenArray2.reduce((acc, child) => {
|
|
120243
|
+
const bindingIdentifier = getBindingIdentifier(child.props.bind);
|
|
120244
|
+
const entity = bindingIdentifier ? rootStore.entityManager.getEntity(bindingIdentifier.scopeId, {
|
|
120245
|
+
value: bindingIdentifier.entityName,
|
|
120246
|
+
isAnonymous: false
|
|
120247
|
+
}) : null;
|
|
120248
|
+
const marginTop = (entity == null ? void 0 : entity.marginTop) ?? (isDimension(child.props.marginTop) ? child.props.marginTop : void 0);
|
|
120249
|
+
const marginLeft = (entity == null ? void 0 : entity.marginLeft) ?? (isDimension(child.props.marginLeft) ? child.props.marginLeft : void 0);
|
|
120250
|
+
const width = (entity == null ? void 0 : entity.width) ?? (isDimension(child.props.width) ? child.props.width : void 0);
|
|
120251
|
+
const height = (entity == null ? void 0 : entity.height) ?? (isDimension(child.props.height) ? child.props.height : void 0);
|
|
120252
|
+
const constraintTop = (entity == null ? void 0 : entity.constraintTop) ?? child.props.constraintTop;
|
|
120253
|
+
const isVisible2 = (entity == null ? void 0 : entity.isVisible) ?? child.props.isVisible;
|
|
120254
|
+
const gridChild = {
|
|
120255
|
+
marginTop,
|
|
120256
|
+
marginLeft,
|
|
120257
|
+
width,
|
|
120258
|
+
height,
|
|
120259
|
+
constraintTop,
|
|
120260
|
+
name: (bindingIdentifier == null ? void 0 : bindingIdentifier.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE],
|
|
120261
|
+
// source ID as a fallback
|
|
120262
|
+
sbType: isSbComponent(child) ? child.type.sbType : void 0,
|
|
120263
|
+
element: child
|
|
120264
|
+
};
|
|
120265
|
+
if (isVisible2 !== false || isEditing) {
|
|
120266
|
+
acc.push(gridChild);
|
|
120267
|
+
}
|
|
120268
|
+
return acc;
|
|
120269
|
+
}, []);
|
|
120270
|
+
return withEvaluatedProps;
|
|
120271
|
+
}, [children]);
|
|
120272
|
+
const columns = props2.columns ?? 12;
|
|
120273
|
+
const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
|
|
120274
|
+
const gridPositions = useMemo$2(() => {
|
|
120275
|
+
const orderedNames = orderConstraints(childrenArray);
|
|
120276
|
+
const rowPos = calculateRowPositions(
|
|
120277
|
+
orderedNames,
|
|
120278
|
+
childrenArray,
|
|
120279
|
+
rowHeight,
|
|
120280
|
+
pxHeights
|
|
120281
|
+
);
|
|
120282
|
+
const positions = childrenArray.reduce(
|
|
120283
|
+
(acc, child) => {
|
|
120284
|
+
var _a3, _b2, _c2;
|
|
120285
|
+
let width = ((_a3 = child.width) == null ? void 0 : _a3.value) ?? (child.sbType === "SbTable" || child.sbType === "SbContainer" ? 6 : 2);
|
|
120286
|
+
if (((_b2 = child.width) == null ? void 0 : _b2.mode) === "fill") {
|
|
120287
|
+
width = columns;
|
|
120288
|
+
}
|
|
120289
|
+
acc[child.name] = {
|
|
120290
|
+
top: rowPos[child.name],
|
|
120291
|
+
left: ((_c2 = child.marginLeft) == null ? void 0 : _c2.value) ?? 0,
|
|
120292
|
+
width,
|
|
120293
|
+
height: Math.ceil(pxHeights[child.name] / rowHeight)
|
|
120294
|
+
};
|
|
120295
|
+
return acc;
|
|
120296
|
+
},
|
|
120297
|
+
{}
|
|
120298
|
+
);
|
|
120299
|
+
return positions;
|
|
120300
|
+
}, [columns, childrenArray, rowHeight, pxHeights]);
|
|
120301
|
+
const gridStyle = React__default.useMemo(() => {
|
|
120302
|
+
const spacingValue = 0;
|
|
120303
|
+
const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
|
|
120304
|
+
return {
|
|
120305
|
+
display: "grid",
|
|
120306
|
+
gridAutoRows: `${rowHeight}px`,
|
|
120307
|
+
gap: `${spacingValue}px`,
|
|
120308
|
+
gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
|
|
120309
|
+
...style2
|
|
120310
|
+
};
|
|
120311
|
+
}, [columns, rowHeight, style2]);
|
|
120312
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120313
|
+
GridChild,
|
|
120314
|
+
{
|
|
120315
|
+
childProps: child,
|
|
120316
|
+
childElement: child.element,
|
|
120317
|
+
gridPositions,
|
|
120318
|
+
rowHeight,
|
|
120319
|
+
dispatchHeight
|
|
120320
|
+
},
|
|
120321
|
+
child.name
|
|
120322
|
+
)) }) });
|
|
120323
|
+
}
|
|
120324
|
+
);
|
|
120281
120325
|
const DragDisplay = (props2) => {
|
|
120282
120326
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
120283
120327
|
"div",
|
|
@@ -143130,7 +143174,7 @@ function Caption(props2) {
|
|
|
143130
143174
|
}
|
|
143131
143175
|
return jsxRuntimeExports.jsx("div", { className: classNames2.caption, style: styles.caption, children: caption });
|
|
143132
143176
|
}
|
|
143133
|
-
function Footer$
|
|
143177
|
+
function Footer$2(props2) {
|
|
143134
143178
|
var _a2 = useDayPicker(), footer = _a2.footer, styles = _a2.styles, tfoot = _a2.classNames.tfoot;
|
|
143135
143179
|
if (!footer)
|
|
143136
143180
|
return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {});
|
|
@@ -144016,7 +144060,7 @@ function Table$2(props2) {
|
|
|
144016
144060
|
});
|
|
144017
144061
|
var HeadComponent = (_a2 = components === null || components === void 0 ? void 0 : components.Head) !== null && _a2 !== void 0 ? _a2 : Head;
|
|
144018
144062
|
var RowComponent = (_b2 = components === null || components === void 0 ? void 0 : components.Row) !== null && _b2 !== void 0 ? _b2 : Row;
|
|
144019
|
-
var FooterComponent = (_c2 = components === null || components === void 0 ? void 0 : components.Footer) !== null && _c2 !== void 0 ? _c2 : Footer$
|
|
144063
|
+
var FooterComponent = (_c2 = components === null || components === void 0 ? void 0 : components.Footer) !== null && _c2 !== void 0 ? _c2 : Footer$2;
|
|
144020
144064
|
return jsxRuntimeExports.jsxs("table", { id: props2.id, className: classNames2.table, style: styles.table, role: "grid", "aria-labelledby": props2["aria-labelledby"], children: [!hideHead && jsxRuntimeExports.jsx(HeadComponent, {}), jsxRuntimeExports.jsx("tbody", { className: classNames2.tbody, style: styles.tbody, children: weeks2.map(function(week) {
|
|
144021
144065
|
return jsxRuntimeExports.jsx(RowComponent, { displayMonth: props2.displayMonth, dates: week.dates, weekNumber: week.weekNumber }, week.weekNumber);
|
|
144022
144066
|
}) }), jsxRuntimeExports.jsx(FooterComponent, { displayMonth: props2.displayMonth })] });
|
|
@@ -145512,14 +145556,14 @@ function getLoaderFn(options) {
|
|
|
145512
145556
|
if (!(loader === "all")) return [3, 3];
|
|
145513
145557
|
return [4, import(
|
|
145514
145558
|
/* webpackChunkName: "blueprint-icons-all-paths-loader" */
|
|
145515
|
-
"./allPathsLoader-
|
|
145559
|
+
"./allPathsLoader-DjBKQsij.js"
|
|
145516
145560
|
)];
|
|
145517
145561
|
case 2:
|
|
145518
145562
|
return [2, _b2.sent().allPathsLoader];
|
|
145519
145563
|
case 3:
|
|
145520
145564
|
return [4, import(
|
|
145521
145565
|
/* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
|
|
145522
|
-
"./splitPathsBySizeLoader-
|
|
145566
|
+
"./splitPathsBySizeLoader-Blv6tUe4.js"
|
|
145523
145567
|
)];
|
|
145524
145568
|
case 4:
|
|
145525
145569
|
return [2, _b2.sent().splitPathsBySizeLoader];
|
|
@@ -160959,16 +161003,11 @@ const TagsPopoverContentWrapper = qe$1.div`
|
|
|
160959
161003
|
display: flex;
|
|
160960
161004
|
cursor: default;
|
|
160961
161005
|
`;
|
|
160962
|
-
const sanitizeCellValue = (cellValue) => {
|
|
160963
|
-
const valueStr = `${cellValue}`;
|
|
160964
|
-
return `${valueStr.toLowerCase()}_clean`;
|
|
160965
|
-
};
|
|
160966
161006
|
const TagsCell = ({
|
|
160967
161007
|
isHidden: isHidden2,
|
|
160968
161008
|
cellProperties,
|
|
160969
161009
|
tagValues,
|
|
160970
161010
|
tagsColorAssignment,
|
|
160971
|
-
tagsCustomColorAssignment,
|
|
160972
161011
|
rowDensity,
|
|
160973
161012
|
handleCellFocus,
|
|
160974
161013
|
maxWidth,
|
|
@@ -161046,29 +161085,24 @@ const TagsCell = ({
|
|
|
161046
161085
|
]);
|
|
161047
161086
|
const backgroundColor = cellProperties.cellBackground ?? theme.colors.neutral;
|
|
161048
161087
|
const coloredValues = useMemo$2(() => {
|
|
161088
|
+
let i3 = 0;
|
|
161049
161089
|
return transformedValues.map((value) => {
|
|
161050
|
-
|
|
161090
|
+
var _a2;
|
|
161091
|
+
const color = (_a2 = tagsColorAssignment == null ? void 0 : tagsColorAssignment[value]) == null ? void 0 : _a2.color;
|
|
161051
161092
|
let colors2;
|
|
161052
|
-
if (
|
|
161053
|
-
colors2 = generateComplementaryTagColors(
|
|
161054
|
-
tagsCustomColorAssignment[value].color,
|
|
161055
|
-
backgroundColor
|
|
161056
|
-
);
|
|
161093
|
+
if (color) {
|
|
161094
|
+
colors2 = generateComplementaryTagColors(color, backgroundColor);
|
|
161057
161095
|
} else {
|
|
161058
|
-
const nextDefaultColor = tagColorPalette[
|
|
161096
|
+
const nextDefaultColor = tagColorPalette[i3 % tagColorPalette.length];
|
|
161059
161097
|
colors2 = generateComplementaryTagColors(
|
|
161060
161098
|
nextDefaultColor,
|
|
161061
161099
|
backgroundColor
|
|
161062
161100
|
);
|
|
161101
|
+
i3++;
|
|
161063
161102
|
}
|
|
161064
161103
|
return { value, colors: colors2 };
|
|
161065
161104
|
});
|
|
161066
|
-
}, [
|
|
161067
|
-
transformedValues,
|
|
161068
|
-
tagsColorAssignment == null ? void 0 : tagsColorAssignment.mapping,
|
|
161069
|
-
tagsCustomColorAssignment,
|
|
161070
|
-
backgroundColor
|
|
161071
|
-
]);
|
|
161105
|
+
}, [transformedValues, tagsColorAssignment, backgroundColor]);
|
|
161072
161106
|
const firstHiddenIdx = transformedValues.length - hiddenTagCount;
|
|
161073
161107
|
const { cellTextStyle, horizontalAlign, verticalAlign, tagsWrap } = cellProperties;
|
|
161074
161108
|
const [className, styles] = useMemo$2(() => {
|
|
@@ -161792,7 +161826,6 @@ const renderCell = ({
|
|
|
161792
161826
|
isHidden: isHidden2,
|
|
161793
161827
|
tagValues: displayValue,
|
|
161794
161828
|
tagsColorAssignment: cellProps.tagsColorAssignment,
|
|
161795
|
-
tagsCustomColorAssignment: cellProps.tagsCustomColorAssignment,
|
|
161796
161829
|
rowDensity,
|
|
161797
161830
|
maxLinesPerRow,
|
|
161798
161831
|
theme
|
|
@@ -162768,6 +162801,7 @@ const propertiesDefinition$9 = {
|
|
|
162768
162801
|
visibility: "SHOW_NAME",
|
|
162769
162802
|
isJSConvertible: false,
|
|
162770
162803
|
isRemovable: true,
|
|
162804
|
+
defaultOnAdd: () => Property.Computed(""),
|
|
162771
162805
|
helpText: "Allows specifying the filters that will be used on page load",
|
|
162772
162806
|
isVisible: function() {
|
|
162773
162807
|
return this.isFilterable && this.pageType !== "server-side";
|
|
@@ -162844,6 +162878,8 @@ const propertiesDefinition$9 = {
|
|
|
162844
162878
|
label: "Default sort",
|
|
162845
162879
|
helpText: "Allows specifying the sort options that will be used on page load",
|
|
162846
162880
|
controlType: "DEFAULT_TABLE_SORT",
|
|
162881
|
+
isRemovable: true,
|
|
162882
|
+
visibility: "SHOW_NAME",
|
|
162847
162883
|
childrenDisplayMode: {
|
|
162848
162884
|
type: "popover",
|
|
162849
162885
|
title: "Default sort"
|
|
@@ -162852,6 +162888,8 @@ const propertiesDefinition$9 = {
|
|
|
162852
162888
|
defaultSearchText: Prop.string().readAndWrite().propertiesPanel({
|
|
162853
162889
|
label: "Default search",
|
|
162854
162890
|
helpText: "Sets the default search text",
|
|
162891
|
+
isRemovable: true,
|
|
162892
|
+
visibility: "SHOW_NAME",
|
|
162855
162893
|
isVisible: function() {
|
|
162856
162894
|
return this.enableClientSideSearch !== false;
|
|
162857
162895
|
}
|
|
@@ -162890,6 +162928,10 @@ const propertiesDefinition$9 = {
|
|
|
162890
162928
|
default: Theme.colors.neutral900
|
|
162891
162929
|
}
|
|
162892
162930
|
})),
|
|
162931
|
+
columnHeaderTextWrap: Prop.boolean().readAndWrite().default(false).propertiesPanel({
|
|
162932
|
+
label: "Wrap header text",
|
|
162933
|
+
helpText: "When enabled, overflow text in a column header will wrap to a new line"
|
|
162934
|
+
}),
|
|
162893
162935
|
"cellProps.textStyle": textStyleProp({
|
|
162894
162936
|
propertiesPanel: {
|
|
162895
162937
|
label: "Cell text style"
|
|
@@ -168956,6 +168998,7 @@ function useChangedListContentsSizes(callback, itemSize, enabled, scrollContaine
|
|
|
168956
168998
|
scrollHeight,
|
|
168957
168999
|
viewportHeight
|
|
168958
169000
|
});
|
|
169001
|
+
gap == null ? void 0 : gap(resolveGapValue$1("row-gap", getComputedStyle(el2).rowGap, log3));
|
|
168959
169002
|
if (ranges !== null) {
|
|
168960
169003
|
callback(ranges);
|
|
168961
169004
|
}
|
|
@@ -168993,6 +169036,15 @@ function getChangedChildSizes(children, itemSize, field2, log3) {
|
|
|
168993
169036
|
}
|
|
168994
169037
|
return results;
|
|
168995
169038
|
}
|
|
169039
|
+
function resolveGapValue$1(property, value, log3) {
|
|
169040
|
+
if (value !== "normal" && !(value == null ? void 0 : value.endsWith("px"))) {
|
|
169041
|
+
log3(`${property} was not resolved to pixel value correctly`, value, LogLevel.WARN);
|
|
169042
|
+
}
|
|
169043
|
+
if (value === "normal") {
|
|
169044
|
+
return 0;
|
|
169045
|
+
}
|
|
169046
|
+
return parseInt(value != null ? value : "0", 10);
|
|
169047
|
+
}
|
|
168996
169048
|
function correctItemSize(el2, dimension) {
|
|
168997
169049
|
return Math.round(el2.getBoundingClientRect()[dimension]);
|
|
168998
169050
|
}
|
|
@@ -171479,10 +171531,115 @@ const listComponentPropsSystem = /* @__PURE__ */ system(() => {
|
|
|
171479
171531
|
ScrollSeekPlaceholder: distinctProp("ScrollSeekPlaceholder")
|
|
171480
171532
|
};
|
|
171481
171533
|
});
|
|
171482
|
-
/* @__PURE__ */ system(([listSystem2, propsSystem]) => {
|
|
171534
|
+
const combinedSystem$2 = /* @__PURE__ */ system(([listSystem2, propsSystem]) => {
|
|
171483
171535
|
return { ...listSystem2, ...propsSystem };
|
|
171484
171536
|
}, tup(listSystem, listComponentPropsSystem));
|
|
171485
|
-
({
|
|
171537
|
+
const DefaultScrollSeekPlaceholder$1 = ({ height }) => /* @__PURE__ */ React__default.createElement("div", { style: { height } });
|
|
171538
|
+
const GROUP_STYLE = { position: positionStickyCssValue(), zIndex: 1, overflowAnchor: "none" };
|
|
171539
|
+
const ITEM_STYLE$1 = { overflowAnchor: "none" };
|
|
171540
|
+
const Items$1 = /* @__PURE__ */ React__default.memo(function VirtuosoItems({ showTopList = false }) {
|
|
171541
|
+
const listState = useEmitterValue$2("listState");
|
|
171542
|
+
const sizeRanges = usePublisher$2("sizeRanges");
|
|
171543
|
+
const useWindowScroll = useEmitterValue$2("useWindowScroll");
|
|
171544
|
+
const customScrollParent = useEmitterValue$2("customScrollParent");
|
|
171545
|
+
const windowScrollContainerStateCallback = usePublisher$2("windowScrollContainerState");
|
|
171546
|
+
const _scrollContainerStateCallback = usePublisher$2("scrollContainerState");
|
|
171547
|
+
const scrollContainerStateCallback = customScrollParent || useWindowScroll ? windowScrollContainerStateCallback : _scrollContainerStateCallback;
|
|
171548
|
+
const itemContent = useEmitterValue$2("itemContent");
|
|
171549
|
+
const context2 = useEmitterValue$2("context");
|
|
171550
|
+
const groupContent = useEmitterValue$2("groupContent");
|
|
171551
|
+
const trackItemSizes = useEmitterValue$2("trackItemSizes");
|
|
171552
|
+
const itemSize = useEmitterValue$2("itemSize");
|
|
171553
|
+
const log3 = useEmitterValue$2("log");
|
|
171554
|
+
const listGap = usePublisher$2("gap");
|
|
171555
|
+
const { callbackRef } = useChangedListContentsSizes(
|
|
171556
|
+
sizeRanges,
|
|
171557
|
+
itemSize,
|
|
171558
|
+
trackItemSizes,
|
|
171559
|
+
showTopList ? noop$1 : scrollContainerStateCallback,
|
|
171560
|
+
log3,
|
|
171561
|
+
listGap,
|
|
171562
|
+
customScrollParent
|
|
171563
|
+
);
|
|
171564
|
+
const [deviation, setDeviation] = React__default.useState(0);
|
|
171565
|
+
useEmitter$2("deviation", (value) => {
|
|
171566
|
+
if (deviation !== value) {
|
|
171567
|
+
setDeviation(value);
|
|
171568
|
+
}
|
|
171569
|
+
});
|
|
171570
|
+
const EmptyPlaceholder = useEmitterValue$2("EmptyPlaceholder");
|
|
171571
|
+
const ScrollSeekPlaceholder = useEmitterValue$2("ScrollSeekPlaceholder") || DefaultScrollSeekPlaceholder$1;
|
|
171572
|
+
const ListComponent = useEmitterValue$2("ListComponent");
|
|
171573
|
+
const ItemComponent = useEmitterValue$2("ItemComponent");
|
|
171574
|
+
const GroupComponent = useEmitterValue$2("GroupComponent");
|
|
171575
|
+
const computeItemKey = useEmitterValue$2("computeItemKey");
|
|
171576
|
+
const isSeeking = useEmitterValue$2("isSeeking");
|
|
171577
|
+
const hasGroups2 = useEmitterValue$2("groupIndices").length > 0;
|
|
171578
|
+
const alignToBottom = useEmitterValue$2("alignToBottom");
|
|
171579
|
+
const scrolledToInitialItem = useEmitterValue$2("scrolledToInitialItem");
|
|
171580
|
+
const containerStyle = showTopList ? {} : {
|
|
171581
|
+
boxSizing: "border-box",
|
|
171582
|
+
paddingTop: listState.offsetTop,
|
|
171583
|
+
paddingBottom: listState.offsetBottom,
|
|
171584
|
+
marginTop: deviation !== 0 ? deviation : alignToBottom ? "auto" : 0,
|
|
171585
|
+
...scrolledToInitialItem ? {} : { visibility: "hidden" }
|
|
171586
|
+
};
|
|
171587
|
+
if (!showTopList && listState.totalCount === 0 && EmptyPlaceholder) {
|
|
171588
|
+
return React__default.createElement(EmptyPlaceholder, contextPropIfNotDomElement(EmptyPlaceholder, context2));
|
|
171589
|
+
}
|
|
171590
|
+
return React__default.createElement(
|
|
171591
|
+
ListComponent,
|
|
171592
|
+
{
|
|
171593
|
+
...contextPropIfNotDomElement(ListComponent, context2),
|
|
171594
|
+
ref: callbackRef,
|
|
171595
|
+
style: containerStyle,
|
|
171596
|
+
"data-test-id": showTopList ? "virtuoso-top-item-list" : "virtuoso-item-list"
|
|
171597
|
+
},
|
|
171598
|
+
(showTopList ? listState.topItems : listState.items).map((item) => {
|
|
171599
|
+
const index2 = item.originalIndex;
|
|
171600
|
+
const key2 = computeItemKey(index2 + listState.firstItemIndex, item.data, context2);
|
|
171601
|
+
if (isSeeking) {
|
|
171602
|
+
return React__default.createElement(ScrollSeekPlaceholder, {
|
|
171603
|
+
...contextPropIfNotDomElement(ScrollSeekPlaceholder, context2),
|
|
171604
|
+
key: key2,
|
|
171605
|
+
index: item.index,
|
|
171606
|
+
height: item.size,
|
|
171607
|
+
type: item.type || "item",
|
|
171608
|
+
...item.type === "group" ? {} : { groupIndex: item.groupIndex }
|
|
171609
|
+
});
|
|
171610
|
+
}
|
|
171611
|
+
if (item.type === "group") {
|
|
171612
|
+
return React__default.createElement(
|
|
171613
|
+
GroupComponent,
|
|
171614
|
+
{
|
|
171615
|
+
...contextPropIfNotDomElement(GroupComponent, context2),
|
|
171616
|
+
key: key2,
|
|
171617
|
+
"data-index": index2,
|
|
171618
|
+
"data-known-size": item.size,
|
|
171619
|
+
"data-item-index": item.index,
|
|
171620
|
+
style: GROUP_STYLE
|
|
171621
|
+
},
|
|
171622
|
+
groupContent(item.index, context2)
|
|
171623
|
+
);
|
|
171624
|
+
} else {
|
|
171625
|
+
return React__default.createElement(
|
|
171626
|
+
ItemComponent,
|
|
171627
|
+
{
|
|
171628
|
+
...contextPropIfNotDomElement(ItemComponent, context2),
|
|
171629
|
+
...itemPropIfNotDomElement(ItemComponent, item.data),
|
|
171630
|
+
key: key2,
|
|
171631
|
+
"data-index": index2,
|
|
171632
|
+
"data-known-size": item.size,
|
|
171633
|
+
"data-item-index": item.index,
|
|
171634
|
+
"data-item-group-index": item.groupIndex,
|
|
171635
|
+
style: ITEM_STYLE$1
|
|
171636
|
+
},
|
|
171637
|
+
hasGroups2 ? itemContent(item.index, item.groupIndex, item.data, context2) : itemContent(item.index, item.data, context2)
|
|
171638
|
+
);
|
|
171639
|
+
}
|
|
171640
|
+
})
|
|
171641
|
+
);
|
|
171642
|
+
});
|
|
171486
171643
|
const scrollerStyle = {
|
|
171487
171644
|
height: "100%",
|
|
171488
171645
|
outline: "none",
|
|
@@ -171495,11 +171652,14 @@ const viewportStyle = (alignToBottom) => ({
|
|
|
171495
171652
|
height: "100%",
|
|
171496
171653
|
position: "absolute",
|
|
171497
171654
|
top: 0,
|
|
171498
|
-
...{}
|
|
171499
|
-
});
|
|
171500
|
-
({
|
|
171501
|
-
position: positionStickyCssValue()
|
|
171655
|
+
...alignToBottom ? { display: "flex", flexDirection: "column" } : {}
|
|
171502
171656
|
});
|
|
171657
|
+
const topItemListStyle = {
|
|
171658
|
+
width: "100%",
|
|
171659
|
+
position: positionStickyCssValue(),
|
|
171660
|
+
top: 0,
|
|
171661
|
+
zIndex: 1
|
|
171662
|
+
};
|
|
171503
171663
|
function contextPropIfNotDomElement(element, context2) {
|
|
171504
171664
|
if (typeof element === "string") {
|
|
171505
171665
|
return void 0;
|
|
@@ -171509,6 +171669,22 @@ function contextPropIfNotDomElement(element, context2) {
|
|
|
171509
171669
|
function itemPropIfNotDomElement(element, item) {
|
|
171510
171670
|
return { item: typeof element === "string" ? void 0 : item };
|
|
171511
171671
|
}
|
|
171672
|
+
const Header$1 = /* @__PURE__ */ React__default.memo(function VirtuosoHeader() {
|
|
171673
|
+
const Header2 = useEmitterValue$2("HeaderComponent");
|
|
171674
|
+
const headerHeight = usePublisher$2("headerHeight");
|
|
171675
|
+
const headerFooterTag = useEmitterValue$2("headerFooterTag");
|
|
171676
|
+
const ref2 = useSize((el2) => headerHeight(correctItemSize(el2, "height")));
|
|
171677
|
+
const context2 = useEmitterValue$2("context");
|
|
171678
|
+
return Header2 ? React__default.createElement(headerFooterTag, { ref: ref2 }, React__default.createElement(Header2, contextPropIfNotDomElement(Header2, context2))) : null;
|
|
171679
|
+
});
|
|
171680
|
+
const Footer$1 = /* @__PURE__ */ React__default.memo(function VirtuosoFooter() {
|
|
171681
|
+
const Footer2 = useEmitterValue$2("FooterComponent");
|
|
171682
|
+
const footerHeight = usePublisher$2("footerHeight");
|
|
171683
|
+
const headerFooterTag = useEmitterValue$2("headerFooterTag");
|
|
171684
|
+
const ref2 = useSize((el2) => footerHeight(correctItemSize(el2, "height")));
|
|
171685
|
+
const context2 = useEmitterValue$2("context");
|
|
171686
|
+
return Footer2 ? React__default.createElement(headerFooterTag, { ref: ref2 }, React__default.createElement(Footer2, contextPropIfNotDomElement(Footer2, context2))) : null;
|
|
171687
|
+
});
|
|
171512
171688
|
function buildScroller({ usePublisher: usePublisher2, useEmitter: useEmitter2, useEmitterValue: useEmitterValue2 }) {
|
|
171513
171689
|
const Scroller2 = React__default.memo(function VirtuosoScroller({ style: style2, children, ...props2 }) {
|
|
171514
171690
|
const scrollContainerStateCallback = usePublisher2("scrollContainerState");
|
|
@@ -171577,6 +171753,115 @@ function buildWindowScroller({ usePublisher: usePublisher2, useEmitter: useEmitt
|
|
|
171577
171753
|
});
|
|
171578
171754
|
return Scroller2;
|
|
171579
171755
|
}
|
|
171756
|
+
const Viewport$2 = ({ children }) => {
|
|
171757
|
+
const ctx = React__default.useContext(VirtuosoMockContext);
|
|
171758
|
+
const viewportHeight = usePublisher$2("viewportHeight");
|
|
171759
|
+
const fixedItemHeight = usePublisher$2("fixedItemHeight");
|
|
171760
|
+
const alignToBottom = useEmitterValue$2("alignToBottom");
|
|
171761
|
+
const viewportRef = useSize(compose(viewportHeight, (el2) => correctItemSize(el2, "height")));
|
|
171762
|
+
React__default.useEffect(() => {
|
|
171763
|
+
if (ctx) {
|
|
171764
|
+
viewportHeight(ctx.viewportHeight);
|
|
171765
|
+
fixedItemHeight(ctx.itemHeight);
|
|
171766
|
+
}
|
|
171767
|
+
}, [ctx, viewportHeight, fixedItemHeight]);
|
|
171768
|
+
return /* @__PURE__ */ React__default.createElement("div", { style: viewportStyle(alignToBottom), ref: viewportRef, "data-viewport-type": "element" }, children);
|
|
171769
|
+
};
|
|
171770
|
+
const WindowViewport$2 = ({ children }) => {
|
|
171771
|
+
const ctx = React__default.useContext(VirtuosoMockContext);
|
|
171772
|
+
const windowViewportRect = usePublisher$2("windowViewportRect");
|
|
171773
|
+
const fixedItemHeight = usePublisher$2("fixedItemHeight");
|
|
171774
|
+
const customScrollParent = useEmitterValue$2("customScrollParent");
|
|
171775
|
+
const viewportRef = useWindowViewportRectRef(windowViewportRect, customScrollParent);
|
|
171776
|
+
const alignToBottom = useEmitterValue$2("alignToBottom");
|
|
171777
|
+
React__default.useEffect(() => {
|
|
171778
|
+
if (ctx) {
|
|
171779
|
+
fixedItemHeight(ctx.itemHeight);
|
|
171780
|
+
windowViewportRect({ offsetTop: 0, visibleHeight: ctx.viewportHeight, visibleWidth: 100 });
|
|
171781
|
+
}
|
|
171782
|
+
}, [ctx, windowViewportRect, fixedItemHeight]);
|
|
171783
|
+
return /* @__PURE__ */ React__default.createElement("div", { ref: viewportRef, style: viewportStyle(alignToBottom), "data-viewport-type": "window" }, children);
|
|
171784
|
+
};
|
|
171785
|
+
const TopItemListContainer = ({ children }) => {
|
|
171786
|
+
const TopItemList = useEmitterValue$2("TopItemListComponent") || "div";
|
|
171787
|
+
const headerHeight = useEmitterValue$2("headerHeight");
|
|
171788
|
+
const style2 = { ...topItemListStyle, marginTop: `${headerHeight}px` };
|
|
171789
|
+
const context2 = useEmitterValue$2("context");
|
|
171790
|
+
return React__default.createElement(TopItemList, { style: style2, ...contextPropIfNotDomElement(TopItemList, context2) }, children);
|
|
171791
|
+
};
|
|
171792
|
+
const ListRoot = /* @__PURE__ */ React__default.memo(function VirtuosoRoot(props2) {
|
|
171793
|
+
const useWindowScroll = useEmitterValue$2("useWindowScroll");
|
|
171794
|
+
const showTopList = useEmitterValue$2("topItemsIndexes").length > 0;
|
|
171795
|
+
const customScrollParent = useEmitterValue$2("customScrollParent");
|
|
171796
|
+
const TheScroller = customScrollParent || useWindowScroll ? WindowScroller$2 : Scroller$2;
|
|
171797
|
+
const TheViewport = customScrollParent || useWindowScroll ? WindowViewport$2 : Viewport$2;
|
|
171798
|
+
return /* @__PURE__ */ React__default.createElement(TheScroller, { ...props2 }, showTopList && /* @__PURE__ */ React__default.createElement(TopItemListContainer, null, /* @__PURE__ */ React__default.createElement(Items$1, { showTopList: true })), /* @__PURE__ */ React__default.createElement(TheViewport, null, /* @__PURE__ */ React__default.createElement(Header$1, null), /* @__PURE__ */ React__default.createElement(Items$1, null), /* @__PURE__ */ React__default.createElement(Footer$1, null)));
|
|
171799
|
+
});
|
|
171800
|
+
const {
|
|
171801
|
+
Component: List,
|
|
171802
|
+
usePublisher: usePublisher$2,
|
|
171803
|
+
useEmitterValue: useEmitterValue$2,
|
|
171804
|
+
useEmitter: useEmitter$2
|
|
171805
|
+
} = /* @__PURE__ */ systemToComponent(
|
|
171806
|
+
combinedSystem$2,
|
|
171807
|
+
{
|
|
171808
|
+
required: {},
|
|
171809
|
+
optional: {
|
|
171810
|
+
restoreStateFrom: "restoreStateFrom",
|
|
171811
|
+
context: "context",
|
|
171812
|
+
followOutput: "followOutput",
|
|
171813
|
+
itemContent: "itemContent",
|
|
171814
|
+
groupContent: "groupContent",
|
|
171815
|
+
overscan: "overscan",
|
|
171816
|
+
increaseViewportBy: "increaseViewportBy",
|
|
171817
|
+
totalCount: "totalCount",
|
|
171818
|
+
groupCounts: "groupCounts",
|
|
171819
|
+
topItemCount: "topItemCount",
|
|
171820
|
+
firstItemIndex: "firstItemIndex",
|
|
171821
|
+
initialTopMostItemIndex: "initialTopMostItemIndex",
|
|
171822
|
+
components: "components",
|
|
171823
|
+
atBottomThreshold: "atBottomThreshold",
|
|
171824
|
+
atTopThreshold: "atTopThreshold",
|
|
171825
|
+
computeItemKey: "computeItemKey",
|
|
171826
|
+
defaultItemHeight: "defaultItemHeight",
|
|
171827
|
+
fixedItemHeight: "fixedItemHeight",
|
|
171828
|
+
itemSize: "itemSize",
|
|
171829
|
+
scrollSeekConfiguration: "scrollSeekConfiguration",
|
|
171830
|
+
headerFooterTag: "headerFooterTag",
|
|
171831
|
+
data: "data",
|
|
171832
|
+
initialItemCount: "initialItemCount",
|
|
171833
|
+
initialScrollTop: "initialScrollTop",
|
|
171834
|
+
alignToBottom: "alignToBottom",
|
|
171835
|
+
useWindowScroll: "useWindowScroll",
|
|
171836
|
+
customScrollParent: "customScrollParent",
|
|
171837
|
+
scrollerRef: "scrollerRef",
|
|
171838
|
+
logLevel: "logLevel"
|
|
171839
|
+
},
|
|
171840
|
+
methods: {
|
|
171841
|
+
scrollToIndex: "scrollToIndex",
|
|
171842
|
+
scrollIntoView: "scrollIntoView",
|
|
171843
|
+
scrollTo: "scrollTo",
|
|
171844
|
+
scrollBy: "scrollBy",
|
|
171845
|
+
autoscrollToBottom: "autoscrollToBottom",
|
|
171846
|
+
getState: "getState"
|
|
171847
|
+
},
|
|
171848
|
+
events: {
|
|
171849
|
+
isScrolling: "isScrolling",
|
|
171850
|
+
endReached: "endReached",
|
|
171851
|
+
startReached: "startReached",
|
|
171852
|
+
rangeChanged: "rangeChanged",
|
|
171853
|
+
atBottomStateChange: "atBottomStateChange",
|
|
171854
|
+
atTopStateChange: "atTopStateChange",
|
|
171855
|
+
totalListHeightChanged: "totalListHeightChanged",
|
|
171856
|
+
itemsRendered: "itemsRendered",
|
|
171857
|
+
groupIndices: "groupIndices"
|
|
171858
|
+
}
|
|
171859
|
+
},
|
|
171860
|
+
ListRoot
|
|
171861
|
+
);
|
|
171862
|
+
const Scroller$2 = /* @__PURE__ */ buildScroller({ usePublisher: usePublisher$2, useEmitterValue: useEmitterValue$2, useEmitter: useEmitter$2 });
|
|
171863
|
+
const WindowScroller$2 = /* @__PURE__ */ buildWindowScroller({ usePublisher: usePublisher$2, useEmitterValue: useEmitterValue$2, useEmitter: useEmitter$2 });
|
|
171864
|
+
const Virtuoso = List;
|
|
171580
171865
|
const INITIAL_GRID_STATE = {
|
|
171581
171866
|
items: [],
|
|
171582
171867
|
offsetBottom: 0,
|
|
@@ -172086,7 +172371,7 @@ const Viewport$1 = ({ children }) => {
|
|
|
172086
172371
|
itemDimensions({ height: ctx.itemHeight, width: ctx.itemWidth });
|
|
172087
172372
|
}
|
|
172088
172373
|
}, [ctx, viewportDimensions, itemDimensions]);
|
|
172089
|
-
return /* @__PURE__ */ React__default.createElement("div", { style: viewportStyle(), ref: viewportRef }, children);
|
|
172374
|
+
return /* @__PURE__ */ React__default.createElement("div", { style: viewportStyle(false), ref: viewportRef }, children);
|
|
172090
172375
|
};
|
|
172091
172376
|
const WindowViewport$1 = ({ children }) => {
|
|
172092
172377
|
const ctx = React__default.useContext(VirtuosoGridMockContext);
|
|
@@ -172100,7 +172385,7 @@ const WindowViewport$1 = ({ children }) => {
|
|
|
172100
172385
|
windowViewportRect({ offsetTop: 0, visibleHeight: ctx.viewportHeight, visibleWidth: ctx.viewportWidth });
|
|
172101
172386
|
}
|
|
172102
172387
|
}, [ctx, windowViewportRect, itemDimensions]);
|
|
172103
|
-
return /* @__PURE__ */ React__default.createElement("div", { ref: viewportRef, style: viewportStyle() }, children);
|
|
172388
|
+
return /* @__PURE__ */ React__default.createElement("div", { ref: viewportRef, style: viewportStyle(false) }, children);
|
|
172104
172389
|
};
|
|
172105
172390
|
const GridRoot = /* @__PURE__ */ React__default.memo(function GridRoot2({ ...props2 }) {
|
|
172106
172391
|
const useWindowScroll = useEmitterValue$1("useWindowScroll");
|
|
@@ -172296,7 +172581,7 @@ const Viewport = ({ children }) => {
|
|
|
172296
172581
|
fixedItemHeight(ctx.itemHeight);
|
|
172297
172582
|
}
|
|
172298
172583
|
}, [ctx, viewportHeight, fixedItemHeight]);
|
|
172299
|
-
return /* @__PURE__ */ React__default.createElement("div", { style: viewportStyle(), ref: viewportRef, "data-viewport-type": "element" }, children);
|
|
172584
|
+
return /* @__PURE__ */ React__default.createElement("div", { style: viewportStyle(false), ref: viewportRef, "data-viewport-type": "element" }, children);
|
|
172300
172585
|
};
|
|
172301
172586
|
const WindowViewport = ({ children }) => {
|
|
172302
172587
|
const ctx = React__default.useContext(VirtuosoMockContext);
|
|
@@ -172310,7 +172595,7 @@ const WindowViewport = ({ children }) => {
|
|
|
172310
172595
|
windowViewportRect({ offsetTop: 0, visibleHeight: ctx.viewportHeight, visibleWidth: 100 });
|
|
172311
172596
|
}
|
|
172312
172597
|
}, [ctx, windowViewportRect, fixedItemHeight]);
|
|
172313
|
-
return /* @__PURE__ */ React__default.createElement("div", { ref: viewportRef, style: viewportStyle(), "data-viewport-type": "window" }, children);
|
|
172598
|
+
return /* @__PURE__ */ React__default.createElement("div", { ref: viewportRef, style: viewportStyle(false), "data-viewport-type": "window" }, children);
|
|
172314
172599
|
};
|
|
172315
172600
|
const TableRoot = /* @__PURE__ */ React__default.memo(function TableVirtuosoRoot(props2) {
|
|
172316
172601
|
const useWindowScroll = useEmitterValue("useWindowScroll");
|
|
@@ -173251,7 +173536,8 @@ const ColumnsSetting = (props2) => {
|
|
|
173251
173536
|
{
|
|
173252
173537
|
isChecked: col.isVisible,
|
|
173253
173538
|
isDisabled: false,
|
|
173254
|
-
isValid: true
|
|
173539
|
+
isValid: true,
|
|
173540
|
+
id: `column-${col.id}-isVisible`
|
|
173255
173541
|
}
|
|
173256
173542
|
),
|
|
173257
173543
|
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: col.label })
|
|
@@ -173293,503 +173579,6 @@ const ColumnsSetting = (props2) => {
|
|
|
173293
173579
|
}
|
|
173294
173580
|
) });
|
|
173295
173581
|
};
|
|
173296
|
-
var define_process_env_default = {};
|
|
173297
|
-
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
173298
|
-
var now = hasNativePerformanceNow ? function() {
|
|
173299
|
-
return performance.now();
|
|
173300
|
-
} : function() {
|
|
173301
|
-
return Date.now();
|
|
173302
|
-
};
|
|
173303
|
-
function cancelTimeout(timeoutID) {
|
|
173304
|
-
cancelAnimationFrame(timeoutID.id);
|
|
173305
|
-
}
|
|
173306
|
-
function requestTimeout(callback, delay) {
|
|
173307
|
-
var start2 = now();
|
|
173308
|
-
function tick() {
|
|
173309
|
-
if (now() - start2 >= delay) {
|
|
173310
|
-
callback.call(null);
|
|
173311
|
-
} else {
|
|
173312
|
-
timeoutID.id = requestAnimationFrame(tick);
|
|
173313
|
-
}
|
|
173314
|
-
}
|
|
173315
|
-
var timeoutID = {
|
|
173316
|
-
id: requestAnimationFrame(tick)
|
|
173317
|
-
};
|
|
173318
|
-
return timeoutID;
|
|
173319
|
-
}
|
|
173320
|
-
var size = -1;
|
|
173321
|
-
function getScrollbarSize(recalculate) {
|
|
173322
|
-
if (recalculate === void 0) {
|
|
173323
|
-
recalculate = false;
|
|
173324
|
-
}
|
|
173325
|
-
if (size === -1 || recalculate) {
|
|
173326
|
-
var div2 = document.createElement("div");
|
|
173327
|
-
var style2 = div2.style;
|
|
173328
|
-
style2.width = "50px";
|
|
173329
|
-
style2.height = "50px";
|
|
173330
|
-
style2.overflow = "scroll";
|
|
173331
|
-
document.body.appendChild(div2);
|
|
173332
|
-
size = div2.offsetWidth - div2.clientWidth;
|
|
173333
|
-
document.body.removeChild(div2);
|
|
173334
|
-
}
|
|
173335
|
-
return size;
|
|
173336
|
-
}
|
|
173337
|
-
var cachedRTLResult = null;
|
|
173338
|
-
function getRTLOffsetType(recalculate) {
|
|
173339
|
-
if (recalculate === void 0) {
|
|
173340
|
-
recalculate = false;
|
|
173341
|
-
}
|
|
173342
|
-
if (cachedRTLResult === null || recalculate) {
|
|
173343
|
-
var outerDiv = document.createElement("div");
|
|
173344
|
-
var outerStyle = outerDiv.style;
|
|
173345
|
-
outerStyle.width = "50px";
|
|
173346
|
-
outerStyle.height = "50px";
|
|
173347
|
-
outerStyle.overflow = "scroll";
|
|
173348
|
-
outerStyle.direction = "rtl";
|
|
173349
|
-
var innerDiv = document.createElement("div");
|
|
173350
|
-
var innerStyle = innerDiv.style;
|
|
173351
|
-
innerStyle.width = "100px";
|
|
173352
|
-
innerStyle.height = "100px";
|
|
173353
|
-
outerDiv.appendChild(innerDiv);
|
|
173354
|
-
document.body.appendChild(outerDiv);
|
|
173355
|
-
if (outerDiv.scrollLeft > 0) {
|
|
173356
|
-
cachedRTLResult = "positive-descending";
|
|
173357
|
-
} else {
|
|
173358
|
-
outerDiv.scrollLeft = 1;
|
|
173359
|
-
if (outerDiv.scrollLeft === 0) {
|
|
173360
|
-
cachedRTLResult = "negative";
|
|
173361
|
-
} else {
|
|
173362
|
-
cachedRTLResult = "positive-ascending";
|
|
173363
|
-
}
|
|
173364
|
-
}
|
|
173365
|
-
document.body.removeChild(outerDiv);
|
|
173366
|
-
return cachedRTLResult;
|
|
173367
|
-
}
|
|
173368
|
-
return cachedRTLResult;
|
|
173369
|
-
}
|
|
173370
|
-
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
173371
|
-
var defaultItemKey$1 = function defaultItemKey3(index2, data2) {
|
|
173372
|
-
return index2;
|
|
173373
|
-
};
|
|
173374
|
-
var devWarningsDirection = null;
|
|
173375
|
-
var devWarningsTagName$1 = null;
|
|
173376
|
-
if (define_process_env_default.NODE_ENV !== "production") {
|
|
173377
|
-
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
173378
|
-
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
173379
|
-
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
173380
|
-
}
|
|
173381
|
-
}
|
|
173382
|
-
function createListComponent(_ref2) {
|
|
173383
|
-
var _class;
|
|
173384
|
-
var getItemOffset3 = _ref2.getItemOffset, getEstimatedTotalSize4 = _ref2.getEstimatedTotalSize, getItemSize3 = _ref2.getItemSize, getOffsetForIndexAndAlignment5 = _ref2.getOffsetForIndexAndAlignment, getStartIndexForOffset3 = _ref2.getStartIndexForOffset, getStopIndexForStartIndex3 = _ref2.getStopIndexForStartIndex, initInstanceProps5 = _ref2.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange, validateProps5 = _ref2.validateProps;
|
|
173385
|
-
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
173386
|
-
_inheritsLoose(List2, _PureComponent);
|
|
173387
|
-
function List2(props2) {
|
|
173388
|
-
var _this;
|
|
173389
|
-
_this = _PureComponent.call(this, props2) || this;
|
|
173390
|
-
_this._instanceProps = initInstanceProps5(_this.props, _assertThisInitialized(_this));
|
|
173391
|
-
_this._outerRef = void 0;
|
|
173392
|
-
_this._resetIsScrollingTimeoutId = null;
|
|
173393
|
-
_this.state = {
|
|
173394
|
-
instance: _assertThisInitialized(_this),
|
|
173395
|
-
isScrolling: false,
|
|
173396
|
-
scrollDirection: "forward",
|
|
173397
|
-
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
173398
|
-
scrollUpdateWasRequested: false
|
|
173399
|
-
};
|
|
173400
|
-
_this._callOnItemsRendered = void 0;
|
|
173401
|
-
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
173402
|
-
return _this.props.onItemsRendered({
|
|
173403
|
-
overscanStartIndex,
|
|
173404
|
-
overscanStopIndex,
|
|
173405
|
-
visibleStartIndex,
|
|
173406
|
-
visibleStopIndex
|
|
173407
|
-
});
|
|
173408
|
-
});
|
|
173409
|
-
_this._callOnScroll = void 0;
|
|
173410
|
-
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
173411
|
-
return _this.props.onScroll({
|
|
173412
|
-
scrollDirection,
|
|
173413
|
-
scrollOffset,
|
|
173414
|
-
scrollUpdateWasRequested
|
|
173415
|
-
});
|
|
173416
|
-
});
|
|
173417
|
-
_this._getItemStyle = void 0;
|
|
173418
|
-
_this._getItemStyle = function(index2) {
|
|
173419
|
-
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
173420
|
-
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
173421
|
-
var style2;
|
|
173422
|
-
if (itemStyleCache.hasOwnProperty(index2)) {
|
|
173423
|
-
style2 = itemStyleCache[index2];
|
|
173424
|
-
} else {
|
|
173425
|
-
var _offset = getItemOffset3(_this.props, index2, _this._instanceProps);
|
|
173426
|
-
var size2 = getItemSize3(_this.props, index2, _this._instanceProps);
|
|
173427
|
-
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
173428
|
-
var isRtl = direction === "rtl";
|
|
173429
|
-
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
173430
|
-
itemStyleCache[index2] = style2 = {
|
|
173431
|
-
position: "absolute",
|
|
173432
|
-
left: isRtl ? void 0 : offsetHorizontal,
|
|
173433
|
-
right: isRtl ? offsetHorizontal : void 0,
|
|
173434
|
-
top: !isHorizontal ? _offset : 0,
|
|
173435
|
-
height: !isHorizontal ? size2 : "100%",
|
|
173436
|
-
width: isHorizontal ? size2 : "100%"
|
|
173437
|
-
};
|
|
173438
|
-
}
|
|
173439
|
-
return style2;
|
|
173440
|
-
};
|
|
173441
|
-
_this._getItemStyleCache = void 0;
|
|
173442
|
-
_this._getItemStyleCache = memoizeOne(function(_15, __, ___) {
|
|
173443
|
-
return {};
|
|
173444
|
-
});
|
|
173445
|
-
_this._onScrollHorizontal = function(event) {
|
|
173446
|
-
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
173447
|
-
_this.setState(function(prevState) {
|
|
173448
|
-
if (prevState.scrollOffset === scrollLeft) {
|
|
173449
|
-
return null;
|
|
173450
|
-
}
|
|
173451
|
-
var direction = _this.props.direction;
|
|
173452
|
-
var scrollOffset = scrollLeft;
|
|
173453
|
-
if (direction === "rtl") {
|
|
173454
|
-
switch (getRTLOffsetType()) {
|
|
173455
|
-
case "negative":
|
|
173456
|
-
scrollOffset = -scrollLeft;
|
|
173457
|
-
break;
|
|
173458
|
-
case "positive-descending":
|
|
173459
|
-
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
173460
|
-
break;
|
|
173461
|
-
}
|
|
173462
|
-
}
|
|
173463
|
-
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
173464
|
-
return {
|
|
173465
|
-
isScrolling: true,
|
|
173466
|
-
scrollDirection: prevState.scrollOffset < scrollLeft ? "forward" : "backward",
|
|
173467
|
-
scrollOffset,
|
|
173468
|
-
scrollUpdateWasRequested: false
|
|
173469
|
-
};
|
|
173470
|
-
}, _this._resetIsScrollingDebounced);
|
|
173471
|
-
};
|
|
173472
|
-
_this._onScrollVertical = function(event) {
|
|
173473
|
-
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
173474
|
-
_this.setState(function(prevState) {
|
|
173475
|
-
if (prevState.scrollOffset === scrollTop) {
|
|
173476
|
-
return null;
|
|
173477
|
-
}
|
|
173478
|
-
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
173479
|
-
return {
|
|
173480
|
-
isScrolling: true,
|
|
173481
|
-
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
173482
|
-
scrollOffset,
|
|
173483
|
-
scrollUpdateWasRequested: false
|
|
173484
|
-
};
|
|
173485
|
-
}, _this._resetIsScrollingDebounced);
|
|
173486
|
-
};
|
|
173487
|
-
_this._outerRefSetter = function(ref2) {
|
|
173488
|
-
var outerRef = _this.props.outerRef;
|
|
173489
|
-
_this._outerRef = ref2;
|
|
173490
|
-
if (typeof outerRef === "function") {
|
|
173491
|
-
outerRef(ref2);
|
|
173492
|
-
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
173493
|
-
outerRef.current = ref2;
|
|
173494
|
-
}
|
|
173495
|
-
};
|
|
173496
|
-
_this._resetIsScrollingDebounced = function() {
|
|
173497
|
-
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
173498
|
-
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
173499
|
-
}
|
|
173500
|
-
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
173501
|
-
};
|
|
173502
|
-
_this._resetIsScrolling = function() {
|
|
173503
|
-
_this._resetIsScrollingTimeoutId = null;
|
|
173504
|
-
_this.setState({
|
|
173505
|
-
isScrolling: false
|
|
173506
|
-
}, function() {
|
|
173507
|
-
_this._getItemStyleCache(-1, null);
|
|
173508
|
-
});
|
|
173509
|
-
};
|
|
173510
|
-
return _this;
|
|
173511
|
-
}
|
|
173512
|
-
List2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
173513
|
-
validateSharedProps$1(nextProps, prevState);
|
|
173514
|
-
validateProps5(nextProps);
|
|
173515
|
-
return null;
|
|
173516
|
-
};
|
|
173517
|
-
var _proto = List2.prototype;
|
|
173518
|
-
_proto.scrollTo = function scrollTo2(scrollOffset) {
|
|
173519
|
-
scrollOffset = Math.max(0, scrollOffset);
|
|
173520
|
-
this.setState(function(prevState) {
|
|
173521
|
-
if (prevState.scrollOffset === scrollOffset) {
|
|
173522
|
-
return null;
|
|
173523
|
-
}
|
|
173524
|
-
return {
|
|
173525
|
-
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
173526
|
-
scrollOffset,
|
|
173527
|
-
scrollUpdateWasRequested: true
|
|
173528
|
-
};
|
|
173529
|
-
}, this._resetIsScrollingDebounced);
|
|
173530
|
-
};
|
|
173531
|
-
_proto.scrollToItem = function scrollToItem(index2, align) {
|
|
173532
|
-
if (align === void 0) {
|
|
173533
|
-
align = "auto";
|
|
173534
|
-
}
|
|
173535
|
-
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
173536
|
-
var scrollOffset = this.state.scrollOffset;
|
|
173537
|
-
index2 = Math.max(0, Math.min(index2, itemCount - 1));
|
|
173538
|
-
var scrollbarSize = 0;
|
|
173539
|
-
if (this._outerRef) {
|
|
173540
|
-
var outerRef = this._outerRef;
|
|
173541
|
-
if (layout === "vertical") {
|
|
173542
|
-
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
173543
|
-
} else {
|
|
173544
|
-
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
173545
|
-
}
|
|
173546
|
-
}
|
|
173547
|
-
this.scrollTo(getOffsetForIndexAndAlignment5(this.props, index2, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
173548
|
-
};
|
|
173549
|
-
_proto.componentDidMount = function componentDidMount() {
|
|
173550
|
-
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
173551
|
-
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
173552
|
-
var outerRef = this._outerRef;
|
|
173553
|
-
if (direction === "horizontal" || layout === "horizontal") {
|
|
173554
|
-
outerRef.scrollLeft = initialScrollOffset;
|
|
173555
|
-
} else {
|
|
173556
|
-
outerRef.scrollTop = initialScrollOffset;
|
|
173557
|
-
}
|
|
173558
|
-
}
|
|
173559
|
-
this._callPropsCallbacks();
|
|
173560
|
-
};
|
|
173561
|
-
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
173562
|
-
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
173563
|
-
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
173564
|
-
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
173565
|
-
var outerRef = this._outerRef;
|
|
173566
|
-
if (direction === "horizontal" || layout === "horizontal") {
|
|
173567
|
-
if (direction === "rtl") {
|
|
173568
|
-
switch (getRTLOffsetType()) {
|
|
173569
|
-
case "negative":
|
|
173570
|
-
outerRef.scrollLeft = -scrollOffset;
|
|
173571
|
-
break;
|
|
173572
|
-
case "positive-ascending":
|
|
173573
|
-
outerRef.scrollLeft = scrollOffset;
|
|
173574
|
-
break;
|
|
173575
|
-
default:
|
|
173576
|
-
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
173577
|
-
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
173578
|
-
break;
|
|
173579
|
-
}
|
|
173580
|
-
} else {
|
|
173581
|
-
outerRef.scrollLeft = scrollOffset;
|
|
173582
|
-
}
|
|
173583
|
-
} else {
|
|
173584
|
-
outerRef.scrollTop = scrollOffset;
|
|
173585
|
-
}
|
|
173586
|
-
}
|
|
173587
|
-
this._callPropsCallbacks();
|
|
173588
|
-
};
|
|
173589
|
-
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
173590
|
-
if (this._resetIsScrollingTimeoutId !== null) {
|
|
173591
|
-
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
173592
|
-
}
|
|
173593
|
-
};
|
|
173594
|
-
_proto.render = function render2() {
|
|
173595
|
-
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey2 = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width = _this$props5.width;
|
|
173596
|
-
var isScrolling = this.state.isScrolling;
|
|
173597
|
-
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
173598
|
-
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
173599
|
-
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
173600
|
-
var items = [];
|
|
173601
|
-
if (itemCount > 0) {
|
|
173602
|
-
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
173603
|
-
items.push(createElement(children, {
|
|
173604
|
-
data: itemData,
|
|
173605
|
-
key: itemKey2(_index, itemData),
|
|
173606
|
-
index: _index,
|
|
173607
|
-
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
173608
|
-
style: this._getItemStyle(_index)
|
|
173609
|
-
}));
|
|
173610
|
-
}
|
|
173611
|
-
}
|
|
173612
|
-
var estimatedTotalSize = getEstimatedTotalSize4(this.props, this._instanceProps);
|
|
173613
|
-
return createElement(outerElementType || outerTagName || "div", {
|
|
173614
|
-
className,
|
|
173615
|
-
onScroll,
|
|
173616
|
-
ref: this._outerRefSetter,
|
|
173617
|
-
style: _extends$4({
|
|
173618
|
-
position: "relative",
|
|
173619
|
-
height,
|
|
173620
|
-
width,
|
|
173621
|
-
overflow: "auto",
|
|
173622
|
-
WebkitOverflowScrolling: "touch",
|
|
173623
|
-
willChange: "transform",
|
|
173624
|
-
direction
|
|
173625
|
-
}, style2)
|
|
173626
|
-
}, createElement(innerElementType || innerTagName || "div", {
|
|
173627
|
-
children: items,
|
|
173628
|
-
ref: innerRef,
|
|
173629
|
-
style: {
|
|
173630
|
-
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
173631
|
-
pointerEvents: isScrolling ? "none" : void 0,
|
|
173632
|
-
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
173633
|
-
}
|
|
173634
|
-
}));
|
|
173635
|
-
};
|
|
173636
|
-
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
173637
|
-
if (typeof this.props.onItemsRendered === "function") {
|
|
173638
|
-
var itemCount = this.props.itemCount;
|
|
173639
|
-
if (itemCount > 0) {
|
|
173640
|
-
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
173641
|
-
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
173642
|
-
}
|
|
173643
|
-
}
|
|
173644
|
-
if (typeof this.props.onScroll === "function") {
|
|
173645
|
-
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
173646
|
-
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
173647
|
-
}
|
|
173648
|
-
};
|
|
173649
|
-
_proto._getRangeToRender = function _getRangeToRender() {
|
|
173650
|
-
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
173651
|
-
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
173652
|
-
if (itemCount === 0) {
|
|
173653
|
-
return [0, 0, 0, 0];
|
|
173654
|
-
}
|
|
173655
|
-
var startIndex = getStartIndexForOffset3(this.props, scrollOffset, this._instanceProps);
|
|
173656
|
-
var stopIndex = getStopIndexForStartIndex3(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
173657
|
-
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
173658
|
-
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
173659
|
-
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
173660
|
-
};
|
|
173661
|
-
return List2;
|
|
173662
|
-
}(PureComponent), _class.defaultProps = {
|
|
173663
|
-
direction: "ltr",
|
|
173664
|
-
itemData: void 0,
|
|
173665
|
-
layout: "vertical",
|
|
173666
|
-
overscanCount: 2,
|
|
173667
|
-
useIsScrolling: false
|
|
173668
|
-
}, _class;
|
|
173669
|
-
}
|
|
173670
|
-
var validateSharedProps$1 = function validateSharedProps3(_ref2, _ref3) {
|
|
173671
|
-
var children = _ref2.children, direction = _ref2.direction, height = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width = _ref2.width;
|
|
173672
|
-
var instance = _ref3.instance;
|
|
173673
|
-
if (define_process_env_default.NODE_ENV !== "production") {
|
|
173674
|
-
if (innerTagName != null || outerTagName != null) {
|
|
173675
|
-
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
173676
|
-
devWarningsTagName$1.add(instance);
|
|
173677
|
-
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
173678
|
-
}
|
|
173679
|
-
}
|
|
173680
|
-
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
173681
|
-
switch (direction) {
|
|
173682
|
-
case "horizontal":
|
|
173683
|
-
case "vertical":
|
|
173684
|
-
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
173685
|
-
devWarningsDirection.add(instance);
|
|
173686
|
-
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
173687
|
-
}
|
|
173688
|
-
break;
|
|
173689
|
-
case "ltr":
|
|
173690
|
-
case "rtl":
|
|
173691
|
-
break;
|
|
173692
|
-
default:
|
|
173693
|
-
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
173694
|
-
}
|
|
173695
|
-
switch (layout) {
|
|
173696
|
-
case "horizontal":
|
|
173697
|
-
case "vertical":
|
|
173698
|
-
break;
|
|
173699
|
-
default:
|
|
173700
|
-
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
173701
|
-
}
|
|
173702
|
-
if (children == null) {
|
|
173703
|
-
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
173704
|
-
}
|
|
173705
|
-
if (isHorizontal && typeof width !== "number") {
|
|
173706
|
-
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width === null ? "null" : typeof width) + '" was specified.'));
|
|
173707
|
-
} else if (!isHorizontal && typeof height !== "number") {
|
|
173708
|
-
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height === null ? "null" : typeof height) + '" was specified.'));
|
|
173709
|
-
}
|
|
173710
|
-
}
|
|
173711
|
-
};
|
|
173712
|
-
var FixedSizeList = /* @__PURE__ */ createListComponent({
|
|
173713
|
-
getItemOffset: function getItemOffset2(_ref2, index2) {
|
|
173714
|
-
var itemSize = _ref2.itemSize;
|
|
173715
|
-
return index2 * itemSize;
|
|
173716
|
-
},
|
|
173717
|
-
getItemSize: function getItemSize2(_ref2, index2) {
|
|
173718
|
-
var itemSize = _ref2.itemSize;
|
|
173719
|
-
return itemSize;
|
|
173720
|
-
},
|
|
173721
|
-
getEstimatedTotalSize: function getEstimatedTotalSize3(_ref3) {
|
|
173722
|
-
var itemCount = _ref3.itemCount, itemSize = _ref3.itemSize;
|
|
173723
|
-
return itemSize * itemCount;
|
|
173724
|
-
},
|
|
173725
|
-
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment4(_ref4, index2, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
173726
|
-
var direction = _ref4.direction, height = _ref4.height, itemCount = _ref4.itemCount, itemSize = _ref4.itemSize, layout = _ref4.layout, width = _ref4.width;
|
|
173727
|
-
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
173728
|
-
var size2 = isHorizontal ? width : height;
|
|
173729
|
-
var lastItemOffset = Math.max(0, itemCount * itemSize - size2);
|
|
173730
|
-
var maxOffset = Math.min(lastItemOffset, index2 * itemSize);
|
|
173731
|
-
var minOffset = Math.max(0, index2 * itemSize - size2 + itemSize + scrollbarSize);
|
|
173732
|
-
if (align === "smart") {
|
|
173733
|
-
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
173734
|
-
align = "auto";
|
|
173735
|
-
} else {
|
|
173736
|
-
align = "center";
|
|
173737
|
-
}
|
|
173738
|
-
}
|
|
173739
|
-
switch (align) {
|
|
173740
|
-
case "start":
|
|
173741
|
-
return maxOffset;
|
|
173742
|
-
case "end":
|
|
173743
|
-
return minOffset;
|
|
173744
|
-
case "center": {
|
|
173745
|
-
var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
173746
|
-
if (middleOffset < Math.ceil(size2 / 2)) {
|
|
173747
|
-
return 0;
|
|
173748
|
-
} else if (middleOffset > lastItemOffset + Math.floor(size2 / 2)) {
|
|
173749
|
-
return lastItemOffset;
|
|
173750
|
-
} else {
|
|
173751
|
-
return middleOffset;
|
|
173752
|
-
}
|
|
173753
|
-
}
|
|
173754
|
-
case "auto":
|
|
173755
|
-
default:
|
|
173756
|
-
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
173757
|
-
return scrollOffset;
|
|
173758
|
-
} else if (scrollOffset < minOffset) {
|
|
173759
|
-
return minOffset;
|
|
173760
|
-
} else {
|
|
173761
|
-
return maxOffset;
|
|
173762
|
-
}
|
|
173763
|
-
}
|
|
173764
|
-
},
|
|
173765
|
-
getStartIndexForOffset: function getStartIndexForOffset2(_ref5, offset3) {
|
|
173766
|
-
var itemCount = _ref5.itemCount, itemSize = _ref5.itemSize;
|
|
173767
|
-
return Math.max(0, Math.min(itemCount - 1, Math.floor(offset3 / itemSize)));
|
|
173768
|
-
},
|
|
173769
|
-
getStopIndexForStartIndex: function getStopIndexForStartIndex2(_ref6, startIndex, scrollOffset) {
|
|
173770
|
-
var direction = _ref6.direction, height = _ref6.height, itemCount = _ref6.itemCount, itemSize = _ref6.itemSize, layout = _ref6.layout, width = _ref6.width;
|
|
173771
|
-
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
173772
|
-
var offset3 = startIndex * itemSize;
|
|
173773
|
-
var size2 = isHorizontal ? width : height;
|
|
173774
|
-
var numVisibleItems = Math.ceil((size2 + scrollOffset - offset3) / itemSize);
|
|
173775
|
-
return Math.max(0, Math.min(
|
|
173776
|
-
itemCount - 1,
|
|
173777
|
-
startIndex + numVisibleItems - 1
|
|
173778
|
-
// -1 is because stop index is inclusive
|
|
173779
|
-
));
|
|
173780
|
-
},
|
|
173781
|
-
initInstanceProps: function initInstanceProps4(props2) {
|
|
173782
|
-
},
|
|
173783
|
-
shouldResetStyleCacheOnItemSizeChange: true,
|
|
173784
|
-
validateProps: function validateProps4(_ref7) {
|
|
173785
|
-
var itemSize = _ref7.itemSize;
|
|
173786
|
-
if (define_process_env_default.NODE_ENV !== "production") {
|
|
173787
|
-
if (typeof itemSize !== "number") {
|
|
173788
|
-
throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
173789
|
-
}
|
|
173790
|
-
}
|
|
173791
|
-
}
|
|
173792
|
-
});
|
|
173793
173582
|
const SelectClass = styleAsClass`
|
|
173794
173583
|
&.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
|
|
173795
173584
|
padding: 0 8px;
|
|
@@ -174380,11 +174169,12 @@ const ActionButtonsWrapper = qe$1.div`
|
|
|
174380
174169
|
}
|
|
174381
174170
|
`;
|
|
174382
174171
|
const UniqueValueListItemWrapper = qe$1.div`
|
|
174383
|
-
line-height: ${VALUES_LIST_ITEM_HEIGHT_PX}px;
|
|
174172
|
+
line-height: ${VALUES_LIST_ITEM_HEIGHT_PX}px !important;
|
|
174384
174173
|
display: flex;
|
|
174385
174174
|
align-items: center;
|
|
174386
174175
|
gap: 8px;
|
|
174387
174176
|
cursor: pointer;
|
|
174177
|
+
height: ${VALUES_LIST_ITEM_HEIGHT_PX}px;
|
|
174388
174178
|
`;
|
|
174389
174179
|
const UniqueValueListItem = (props2) => {
|
|
174390
174180
|
const { uniqueValue, onChange: onChange2 } = props2;
|
|
@@ -174399,7 +174189,6 @@ const UniqueValueListItem = (props2) => {
|
|
|
174399
174189
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
174400
174190
|
UniqueValueListItemWrapper,
|
|
174401
174191
|
{
|
|
174402
|
-
style: props2.style,
|
|
174403
174192
|
className: CLASS_NAMES.BUILTIN_BODY,
|
|
174404
174193
|
onClick: handleChange,
|
|
174405
174194
|
"data-test": `filter-value-${uniqueValue.rawValue}`,
|
|
@@ -174409,7 +174198,8 @@ const UniqueValueListItem = (props2) => {
|
|
|
174409
174198
|
{
|
|
174410
174199
|
isChecked: props2.checked,
|
|
174411
174200
|
isDisabled: false,
|
|
174412
|
-
isValid: true
|
|
174201
|
+
isValid: true,
|
|
174202
|
+
id: `filter-value-${uniqueValue.rawValue}`
|
|
174413
174203
|
}
|
|
174414
174204
|
),
|
|
174415
174205
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -174554,15 +174344,18 @@ const FilterPopoverContent = ({
|
|
|
174554
174344
|
setFilter
|
|
174555
174345
|
]
|
|
174556
174346
|
);
|
|
174557
|
-
const
|
|
174558
|
-
|
|
174559
|
-
|
|
174560
|
-
(
|
|
174561
|
-
|
|
174562
|
-
|
|
174563
|
-
|
|
174347
|
+
const groupedOpts = React__default.useMemo(() => {
|
|
174348
|
+
const groupedOpts2 = {};
|
|
174349
|
+
for (const [type5, spec] of Object.entries(conditionFieldsSpec)) {
|
|
174350
|
+
if (spec.columnTypes === void 0 || spec.columnTypes.includes(columnProperties.columnType)) {
|
|
174351
|
+
(groupedOpts2[spec.group] ?? (groupedOpts2[spec.group] = [])).push([
|
|
174352
|
+
type5,
|
|
174353
|
+
spec
|
|
174354
|
+
]);
|
|
174355
|
+
}
|
|
174564
174356
|
}
|
|
174565
|
-
|
|
174357
|
+
return groupedOpts2;
|
|
174358
|
+
}, [columnProperties.columnType]);
|
|
174566
174359
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnFilterWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
174567
174360
|
StyledForm,
|
|
174568
174361
|
{
|
|
@@ -174598,7 +174391,7 @@ const FilterPopoverContent = ({
|
|
|
174598
174391
|
autoFocus: true,
|
|
174599
174392
|
"data-test": "filter-select-condition-type",
|
|
174600
174393
|
className: `${CLASS_NAMES.BUILTIN_BODY}`,
|
|
174601
|
-
children: Object.entries(
|
|
174394
|
+
children: Object.entries(groupedOpts).map(([group, opts]) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174602
174395
|
Select$1.OptGroup,
|
|
174603
174396
|
{
|
|
174604
174397
|
label: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -174686,22 +174479,19 @@ const FilterPopoverContent = ({
|
|
|
174686
174479
|
}
|
|
174687
174480
|
),
|
|
174688
174481
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174689
|
-
|
|
174482
|
+
Virtuoso,
|
|
174690
174483
|
{
|
|
174691
|
-
height:
|
|
174692
|
-
|
|
174693
|
-
|
|
174694
|
-
|
|
174695
|
-
itemKey: (filteredIndex) => filteredValues[filteredIndex].index,
|
|
174696
|
-
style: { marginTop: 8 },
|
|
174697
|
-
children: ({ index: filteredIndex, style: style2 }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174484
|
+
style: { height: "200px" },
|
|
174485
|
+
totalCount: filteredValues.length,
|
|
174486
|
+
fixedItemHeight: VALUES_LIST_ITEM_HEIGHT_PX,
|
|
174487
|
+
itemContent: (index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
174698
174488
|
UniqueValueListItem,
|
|
174699
174489
|
{
|
|
174700
|
-
checked: !excludedVals.has(filteredValues[
|
|
174701
|
-
uniqueValue: filteredValues[
|
|
174702
|
-
style: style2,
|
|
174490
|
+
checked: !excludedVals.has(filteredValues[index2]),
|
|
174491
|
+
uniqueValue: filteredValues[index2],
|
|
174703
174492
|
onChange: handleCheckboxOnChange
|
|
174704
|
-
}
|
|
174493
|
+
},
|
|
174494
|
+
`filter-value-${filteredValues[index2].rawValue}`
|
|
174705
174495
|
)
|
|
174706
174496
|
}
|
|
174707
174497
|
)
|
|
@@ -174872,6 +174662,7 @@ const TableColumnHeaderBtn = ({
|
|
|
174872
174662
|
trigger: "click",
|
|
174873
174663
|
placement: "bottom",
|
|
174874
174664
|
open,
|
|
174665
|
+
showArrow: false,
|
|
174875
174666
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: CLASS_NAMES.BUILTIN_BODY, children: [
|
|
174876
174667
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
174877
174668
|
ColumnMenuItemWrapper,
|
|
@@ -175108,6 +174899,7 @@ const TableHeaderCell = (props2) => {
|
|
|
175108
174899
|
);
|
|
175109
174900
|
const { key: key2, ...headerProps } = column2.getHeaderProps();
|
|
175110
174901
|
const headerIconPosition = props2.columnProperties.headerIconPosition ?? "left";
|
|
174902
|
+
const textWrap = props2.columnHeaderTextWrap ? "wrap" : "nowrap";
|
|
175111
174903
|
const parentRef = useRef(null);
|
|
175112
174904
|
const columnHeaderClassNames = [columnHeaderClassName];
|
|
175113
174905
|
if (!props2.isHidden) {
|
|
@@ -175164,7 +174956,10 @@ const TableHeaderCell = (props2) => {
|
|
|
175164
174956
|
HeaderCellContentWrapper,
|
|
175165
174957
|
{
|
|
175166
174958
|
columnProperties: props2.columnProperties,
|
|
175167
|
-
style:
|
|
174959
|
+
style: {
|
|
174960
|
+
...columnHeaderStyleProps.style,
|
|
174961
|
+
textWrap
|
|
174962
|
+
},
|
|
175168
174963
|
className: columnHeaderClassNames.join(" "),
|
|
175169
174964
|
draggable: !props2.isHidden,
|
|
175170
174965
|
onDragStart: (e3) => {
|
|
@@ -176612,6 +176407,7 @@ const Table = (props2) => {
|
|
|
176612
176407
|
handleHeaderDropped,
|
|
176613
176408
|
mutableHeaderDragRef,
|
|
176614
176409
|
columnHeaderProps: props2.columnHeaderTextStyle,
|
|
176410
|
+
columnHeaderTextWrap: props2.columnHeaderTextWrap,
|
|
176615
176411
|
theme,
|
|
176616
176412
|
updateProperty: props2.updateProperty
|
|
176617
176413
|
},
|
|
@@ -176992,6 +176788,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
176992
176788
|
});
|
|
176993
176789
|
__publicField(this, "currentCellFocus", []);
|
|
176994
176790
|
__publicField(this, "eventListenerController");
|
|
176791
|
+
__publicField(this, "cachedTagColorAssignment");
|
|
176995
176792
|
__publicField(this, "getDisplayedValueForEditCell", ({
|
|
176996
176793
|
columnId,
|
|
176997
176794
|
rawValue,
|
|
@@ -177943,7 +177740,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
177943
177740
|
notation: columnNotation
|
|
177944
177741
|
},
|
|
177945
177742
|
Cell: (props2) => {
|
|
177946
|
-
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j, _k, _l2, _m2, _n2, _o2, _p2, _q, _r2, _s2, _t2, _u2, _v, _w;
|
|
177743
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j, _k, _l2, _m2, _n2, _o2, _p2, _q, _r2, _s2, _t2, _u2, _v, _w, _x, _y;
|
|
177947
177744
|
const currentRowIndex = props2.cell.row.index;
|
|
177948
177745
|
const originalRowIndex = ((_a2 = this.props.filteredOrderMap) == null ? void 0 : _a2[currentRowIndex]) ?? currentRowIndex;
|
|
177949
177746
|
const isEdited = ((_b2 = this.props.editOverrides) == null ? void 0 : _b2[originalRowIndex]) != null && columnProperties.id in this.props.editOverrides[originalRowIndex];
|
|
@@ -177980,8 +177777,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
177980
177777
|
cellProps: {
|
|
177981
177778
|
isHidden: isHidden2,
|
|
177982
177779
|
cellProperties,
|
|
177983
|
-
tagsColorAssignment: this.
|
|
177984
|
-
tagsCustomColorAssignment: columnProperties.tagDisplayConfig,
|
|
177780
|
+
tagsColorAssignment: (_m2 = this.cachedTagColorAssignment) == null ? void 0 : _m2[columnProperties.id],
|
|
177985
177781
|
notation: columnNotation,
|
|
177986
177782
|
currency: columnProperties.currency,
|
|
177987
177783
|
minimumFractionDigits: columnProperties.minimumFractionDigits,
|
|
@@ -178047,7 +177843,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178047
177843
|
columnProperties,
|
|
178048
177844
|
originalRowIndex
|
|
178049
177845
|
),
|
|
178050
|
-
isEditFocused: ((
|
|
177846
|
+
isEditFocused: ((_n2 = this.props.currentEditFocus) == null ? void 0 : _n2.row) === originalRowIndex && ((_o2 = this.props.currentEditFocus) == null ? void 0 : _o2.columnId) === columnProperties.id,
|
|
178051
177847
|
isEdited,
|
|
178052
177848
|
currentEditValue: this.props.currentEditValue,
|
|
178053
177849
|
editInputType: columnProperties.editInputType,
|
|
@@ -178062,7 +177858,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178062
177858
|
editDropdownClientSideFiltering: columnProperties.editDropdownClientSideFiltering,
|
|
178063
177859
|
editOptions: this.editOptions[columnProperties.id],
|
|
178064
177860
|
transformation: columnProperties.transformation,
|
|
178065
|
-
validationErrors: isInserted ? ((
|
|
177861
|
+
validationErrors: isInserted ? ((_r2 = (_q = (_p2 = this.props.inserts) == null ? void 0 : _p2.insertedRowValidations) == null ? void 0 : _q[originalRowIndex]) == null ? void 0 : _r2[columnProperties.id]) ?? [] : ((_u2 = (_t2 = (_s2 = this.props.editOverrides) == null ? void 0 : _s2[originalRowIndex]) == null ? void 0 : _t2[columnProperties.id]) == null ? void 0 : _u2.validationErrors) ?? [],
|
|
178066
177862
|
editMinDate: columnProperties.editMinDate,
|
|
178067
177863
|
editMaxDate: columnProperties.editMaxDate,
|
|
178068
177864
|
editTwentyFourHourTime: columnProperties.editTwentyFourHourTime
|
|
@@ -178111,7 +177907,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178111
177907
|
columnId: columnProperties.id
|
|
178112
177908
|
},
|
|
178113
177909
|
maxLinesPerRow: this.props.maxLinesPerRow,
|
|
178114
|
-
tableCellTextStyle: (
|
|
177910
|
+
tableCellTextStyle: (_v = this.props.cellProps) == null ? void 0 : _v.textStyle,
|
|
178115
177911
|
value: props2.cell.value
|
|
178116
177912
|
});
|
|
178117
177913
|
} else {
|
|
@@ -178121,20 +177917,19 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178121
177917
|
columnType: columnProperties.columnType,
|
|
178122
177918
|
editInputType: columnProperties.editInputType,
|
|
178123
177919
|
maxLinesPerRow: this.props.maxLinesPerRow,
|
|
178124
|
-
tableCellTextStyle: (
|
|
177920
|
+
tableCellTextStyle: (_w = this.props.cellProps) == null ? void 0 : _w.textStyle,
|
|
178125
177921
|
typographies: this.props.theme.typographies,
|
|
178126
177922
|
cellProps: {
|
|
178127
177923
|
// since these are overridden by the cellProperties
|
|
178128
177924
|
...columnProperties,
|
|
178129
177925
|
...getCellProperties(
|
|
178130
|
-
(
|
|
177926
|
+
(_x = tableProps == null ? void 0 : tableProps.cellProps) == null ? void 0 : _x.textStyle,
|
|
178131
177927
|
columnProperties,
|
|
178132
177928
|
indexInTableDataWithInserts
|
|
178133
177929
|
),
|
|
178134
177930
|
isHidden: isHidden2,
|
|
178135
177931
|
cellProperties,
|
|
178136
|
-
tagsColorAssignment: this.
|
|
178137
|
-
tagsCustomColorAssignment: columnProperties.tagDisplayConfig,
|
|
177932
|
+
tagsColorAssignment: (_y = this.cachedTagColorAssignment) == null ? void 0 : _y[columnProperties.id],
|
|
178138
177933
|
booleanStyleFalse: columnProperties.booleanStyleFalse,
|
|
178139
177934
|
rowDensity: this.props.rowDensity,
|
|
178140
177935
|
isFocused: props2.isFocused,
|
|
@@ -178177,6 +177972,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178177
177972
|
const { pageSize } = this.props;
|
|
178178
177973
|
const editOverrides = this.props.editOverrides ?? {};
|
|
178179
177974
|
const filteredTableData = Array.isArray(this.props.filteredTableData) ? this.props.filteredTableData : [];
|
|
177975
|
+
this.assignTagColors(this.props.tableData, this.props.columns);
|
|
178180
177976
|
const tableColumns = this.getReactTableColumns() || [];
|
|
178181
177977
|
const transformedData = _TableWidget.transformData(
|
|
178182
177978
|
filteredTableData || [],
|
|
@@ -178184,7 +177980,6 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178184
177980
|
tableColumns,
|
|
178185
177981
|
editOverrides
|
|
178186
177982
|
);
|
|
178187
|
-
this.assignTagColors(transformedData, tableColumns);
|
|
178188
177983
|
let pageNo = this.props.pageNo;
|
|
178189
177984
|
if (pageNo === void 0) {
|
|
178190
177985
|
pageNo = 1;
|
|
@@ -178265,6 +178060,7 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178265
178060
|
tableCellTextStyle: (_c2 = this.props.cellProps) == null ? void 0 : _c2.textStyle,
|
|
178266
178061
|
tableHeaderTextStyle: (_d2 = this.props.headerProps) == null ? void 0 : _d2.textStyle,
|
|
178267
178062
|
columnHeaderTextStyle: (_e2 = this.props.columnHeaderProps) == null ? void 0 : _e2.textStyle,
|
|
178063
|
+
columnHeaderTextWrap: this.props.columnHeaderTextWrap,
|
|
178268
178064
|
searchProps: this.props.searchProps,
|
|
178269
178065
|
disableNudge: this.props.disableNudge,
|
|
178270
178066
|
setCurrentCellFocus: this.setCurrentCellFocus,
|
|
@@ -178274,43 +178070,47 @@ const _TableWidget = class _TableWidget extends React__default.Component {
|
|
|
178274
178070
|
}
|
|
178275
178071
|
) }) });
|
|
178276
178072
|
}
|
|
178277
|
-
assignTagColors(tableData, columns) {
|
|
178278
|
-
var _a2;
|
|
178279
|
-
|
|
178280
|
-
|
|
178281
|
-
|
|
178282
|
-
|
|
178283
|
-
|
|
178284
|
-
|
|
178285
|
-
|
|
178286
|
-
|
|
178287
|
-
|
|
178288
|
-
|
|
178289
|
-
|
|
178290
|
-
|
|
178291
|
-
|
|
178292
|
-
|
|
178293
|
-
|
|
178294
|
-
|
|
178295
|
-
|
|
178296
|
-
|
|
178297
|
-
|
|
178298
|
-
|
|
178299
|
-
|
|
178300
|
-
uniqValueIdx = updatedColorAssignment.uniqueTagsCount;
|
|
178301
|
-
updatedColorAssignment.uniqueTagsCount = uniqValueIdx + 1;
|
|
178302
|
-
updatedColorAssignment.mapping = {
|
|
178303
|
-
...updatedColorAssignment == null ? void 0 : updatedColorAssignment.mapping,
|
|
178304
|
-
[tagValueNorm]: uniqValueIdx
|
|
178073
|
+
assignTagColors(tableData = [], columns = {}) {
|
|
178074
|
+
var _a2, _b2;
|
|
178075
|
+
const updatedTagColorAssignment = {};
|
|
178076
|
+
for (const [columnId, columnSettings] of Object.entries(columns)) {
|
|
178077
|
+
if ((columnSettings == null ? void 0 : columnSettings.columnType) === "tags") {
|
|
178078
|
+
updatedTagColorAssignment[columnId] = {
|
|
178079
|
+
...(_a2 = this.cachedTagColorAssignment) == null ? void 0 : _a2[columnId],
|
|
178080
|
+
...columnSettings == null ? void 0 : columnSettings.tagDisplayConfig
|
|
178081
|
+
};
|
|
178082
|
+
} else {
|
|
178083
|
+
(_b2 = this.cachedTagColorAssignment) == null ? true : delete _b2[columnId];
|
|
178084
|
+
}
|
|
178085
|
+
}
|
|
178086
|
+
let i3 = 0;
|
|
178087
|
+
tableData.forEach((row) => {
|
|
178088
|
+
Object.keys(updatedTagColorAssignment).forEach((columnId) => {
|
|
178089
|
+
const data2 = row[columnId];
|
|
178090
|
+
const tagConfig = updatedTagColorAssignment[columnId];
|
|
178091
|
+
if (Array.isArray(data2)) {
|
|
178092
|
+
data2.forEach((tag2) => {
|
|
178093
|
+
if (!tagConfig[tag2]) {
|
|
178094
|
+
tagConfig[tag2] = {
|
|
178095
|
+
color: tagColorPalette[i3 % tagColorPalette.length]
|
|
178305
178096
|
};
|
|
178097
|
+
i3++;
|
|
178306
178098
|
}
|
|
178307
|
-
}
|
|
178099
|
+
});
|
|
178100
|
+
} else if (data2 != null && typeof data2 === "string" && !tagConfig[data2]) {
|
|
178101
|
+
tagConfig[data2] = {
|
|
178102
|
+
color: tagColorPalette[i3 % tagColorPalette.length]
|
|
178103
|
+
};
|
|
178104
|
+
i3++;
|
|
178105
|
+
} else if (data2 != null && (typeof data2 === "number" || typeof data2 === "boolean") && !tagConfig[`${data2}`]) {
|
|
178106
|
+
tagConfig[`${data2}`] = {
|
|
178107
|
+
color: tagColorPalette[i3 % tagColorPalette.length]
|
|
178108
|
+
};
|
|
178109
|
+
i3++;
|
|
178308
178110
|
}
|
|
178309
|
-
}
|
|
178310
|
-
}
|
|
178311
|
-
|
|
178312
|
-
this.props.updateTagColorAssignment(updatedColorAssignment);
|
|
178313
|
-
}
|
|
178111
|
+
});
|
|
178112
|
+
});
|
|
178113
|
+
this.cachedTagColorAssignment = updatedTagColorAssignment;
|
|
178314
178114
|
}
|
|
178315
178115
|
};
|
|
178316
178116
|
__publicField(_TableWidget, "transformData", (tableData, filteredOrderMap, columns, editOverrides) => {
|
|
@@ -178398,7 +178198,10 @@ const SbTable = registerSbComponent(
|
|
|
178398
178198
|
const newPageNo = Math.max(value - 1, 0);
|
|
178399
178199
|
update((e3) => e3.pageNo = newPageNo);
|
|
178400
178200
|
if (triggerEventHandlers) {
|
|
178401
|
-
onPageChange == null ? void 0 : onPageChange(
|
|
178201
|
+
onPageChange == null ? void 0 : onPageChange({
|
|
178202
|
+
...rowContext,
|
|
178203
|
+
nextPage: newPageNo
|
|
178204
|
+
});
|
|
178402
178205
|
}
|
|
178403
178206
|
},
|
|
178404
178207
|
[update, onPageChange]
|
|
@@ -178455,12 +178258,6 @@ const SbTable = registerSbComponent(
|
|
|
178455
178258
|
},
|
|
178456
178259
|
[update]
|
|
178457
178260
|
);
|
|
178458
|
-
const updateTagColorAssignment = useCallback(
|
|
178459
|
-
(value) => {
|
|
178460
|
-
update((e3) => e3.tagsColorAssignment = value);
|
|
178461
|
-
},
|
|
178462
|
-
[update]
|
|
178463
|
-
);
|
|
178464
178261
|
const setTableFilters = useCallback(
|
|
178465
178262
|
(columnId, filter2) => {
|
|
178466
178263
|
update((e3) => {
|
|
@@ -178578,7 +178375,6 @@ const SbTable = registerSbComponent(
|
|
|
178578
178375
|
setSortedColumn,
|
|
178579
178376
|
setColumnSizeMap,
|
|
178580
178377
|
setSearchText,
|
|
178581
|
-
updateTagColorAssignment,
|
|
178582
178378
|
onRowClicked: handleRowClick,
|
|
178583
178379
|
selectAllRows,
|
|
178584
178380
|
deselectAllRows,
|
|
@@ -180753,6 +180549,503 @@ Fuse.config = Config;
|
|
|
180753
180549
|
{
|
|
180754
180550
|
register3(ExtendedSearch);
|
|
180755
180551
|
}
|
|
180552
|
+
var define_process_env_default = {};
|
|
180553
|
+
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
180554
|
+
var now = hasNativePerformanceNow ? function() {
|
|
180555
|
+
return performance.now();
|
|
180556
|
+
} : function() {
|
|
180557
|
+
return Date.now();
|
|
180558
|
+
};
|
|
180559
|
+
function cancelTimeout(timeoutID) {
|
|
180560
|
+
cancelAnimationFrame(timeoutID.id);
|
|
180561
|
+
}
|
|
180562
|
+
function requestTimeout(callback, delay) {
|
|
180563
|
+
var start2 = now();
|
|
180564
|
+
function tick() {
|
|
180565
|
+
if (now() - start2 >= delay) {
|
|
180566
|
+
callback.call(null);
|
|
180567
|
+
} else {
|
|
180568
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
180569
|
+
}
|
|
180570
|
+
}
|
|
180571
|
+
var timeoutID = {
|
|
180572
|
+
id: requestAnimationFrame(tick)
|
|
180573
|
+
};
|
|
180574
|
+
return timeoutID;
|
|
180575
|
+
}
|
|
180576
|
+
var size = -1;
|
|
180577
|
+
function getScrollbarSize(recalculate) {
|
|
180578
|
+
if (recalculate === void 0) {
|
|
180579
|
+
recalculate = false;
|
|
180580
|
+
}
|
|
180581
|
+
if (size === -1 || recalculate) {
|
|
180582
|
+
var div2 = document.createElement("div");
|
|
180583
|
+
var style2 = div2.style;
|
|
180584
|
+
style2.width = "50px";
|
|
180585
|
+
style2.height = "50px";
|
|
180586
|
+
style2.overflow = "scroll";
|
|
180587
|
+
document.body.appendChild(div2);
|
|
180588
|
+
size = div2.offsetWidth - div2.clientWidth;
|
|
180589
|
+
document.body.removeChild(div2);
|
|
180590
|
+
}
|
|
180591
|
+
return size;
|
|
180592
|
+
}
|
|
180593
|
+
var cachedRTLResult = null;
|
|
180594
|
+
function getRTLOffsetType(recalculate) {
|
|
180595
|
+
if (recalculate === void 0) {
|
|
180596
|
+
recalculate = false;
|
|
180597
|
+
}
|
|
180598
|
+
if (cachedRTLResult === null || recalculate) {
|
|
180599
|
+
var outerDiv = document.createElement("div");
|
|
180600
|
+
var outerStyle = outerDiv.style;
|
|
180601
|
+
outerStyle.width = "50px";
|
|
180602
|
+
outerStyle.height = "50px";
|
|
180603
|
+
outerStyle.overflow = "scroll";
|
|
180604
|
+
outerStyle.direction = "rtl";
|
|
180605
|
+
var innerDiv = document.createElement("div");
|
|
180606
|
+
var innerStyle = innerDiv.style;
|
|
180607
|
+
innerStyle.width = "100px";
|
|
180608
|
+
innerStyle.height = "100px";
|
|
180609
|
+
outerDiv.appendChild(innerDiv);
|
|
180610
|
+
document.body.appendChild(outerDiv);
|
|
180611
|
+
if (outerDiv.scrollLeft > 0) {
|
|
180612
|
+
cachedRTLResult = "positive-descending";
|
|
180613
|
+
} else {
|
|
180614
|
+
outerDiv.scrollLeft = 1;
|
|
180615
|
+
if (outerDiv.scrollLeft === 0) {
|
|
180616
|
+
cachedRTLResult = "negative";
|
|
180617
|
+
} else {
|
|
180618
|
+
cachedRTLResult = "positive-ascending";
|
|
180619
|
+
}
|
|
180620
|
+
}
|
|
180621
|
+
document.body.removeChild(outerDiv);
|
|
180622
|
+
return cachedRTLResult;
|
|
180623
|
+
}
|
|
180624
|
+
return cachedRTLResult;
|
|
180625
|
+
}
|
|
180626
|
+
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
180627
|
+
var defaultItemKey$1 = function defaultItemKey3(index2, data2) {
|
|
180628
|
+
return index2;
|
|
180629
|
+
};
|
|
180630
|
+
var devWarningsDirection = null;
|
|
180631
|
+
var devWarningsTagName$1 = null;
|
|
180632
|
+
if (define_process_env_default.NODE_ENV !== "production") {
|
|
180633
|
+
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
180634
|
+
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
180635
|
+
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
180636
|
+
}
|
|
180637
|
+
}
|
|
180638
|
+
function createListComponent(_ref2) {
|
|
180639
|
+
var _class;
|
|
180640
|
+
var getItemOffset3 = _ref2.getItemOffset, getEstimatedTotalSize4 = _ref2.getEstimatedTotalSize, getItemSize3 = _ref2.getItemSize, getOffsetForIndexAndAlignment5 = _ref2.getOffsetForIndexAndAlignment, getStartIndexForOffset3 = _ref2.getStartIndexForOffset, getStopIndexForStartIndex3 = _ref2.getStopIndexForStartIndex, initInstanceProps5 = _ref2.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref2.shouldResetStyleCacheOnItemSizeChange, validateProps5 = _ref2.validateProps;
|
|
180641
|
+
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
180642
|
+
_inheritsLoose(List2, _PureComponent);
|
|
180643
|
+
function List2(props2) {
|
|
180644
|
+
var _this;
|
|
180645
|
+
_this = _PureComponent.call(this, props2) || this;
|
|
180646
|
+
_this._instanceProps = initInstanceProps5(_this.props, _assertThisInitialized(_this));
|
|
180647
|
+
_this._outerRef = void 0;
|
|
180648
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
180649
|
+
_this.state = {
|
|
180650
|
+
instance: _assertThisInitialized(_this),
|
|
180651
|
+
isScrolling: false,
|
|
180652
|
+
scrollDirection: "forward",
|
|
180653
|
+
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
180654
|
+
scrollUpdateWasRequested: false
|
|
180655
|
+
};
|
|
180656
|
+
_this._callOnItemsRendered = void 0;
|
|
180657
|
+
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
180658
|
+
return _this.props.onItemsRendered({
|
|
180659
|
+
overscanStartIndex,
|
|
180660
|
+
overscanStopIndex,
|
|
180661
|
+
visibleStartIndex,
|
|
180662
|
+
visibleStopIndex
|
|
180663
|
+
});
|
|
180664
|
+
});
|
|
180665
|
+
_this._callOnScroll = void 0;
|
|
180666
|
+
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
180667
|
+
return _this.props.onScroll({
|
|
180668
|
+
scrollDirection,
|
|
180669
|
+
scrollOffset,
|
|
180670
|
+
scrollUpdateWasRequested
|
|
180671
|
+
});
|
|
180672
|
+
});
|
|
180673
|
+
_this._getItemStyle = void 0;
|
|
180674
|
+
_this._getItemStyle = function(index2) {
|
|
180675
|
+
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
180676
|
+
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
180677
|
+
var style2;
|
|
180678
|
+
if (itemStyleCache.hasOwnProperty(index2)) {
|
|
180679
|
+
style2 = itemStyleCache[index2];
|
|
180680
|
+
} else {
|
|
180681
|
+
var _offset = getItemOffset3(_this.props, index2, _this._instanceProps);
|
|
180682
|
+
var size2 = getItemSize3(_this.props, index2, _this._instanceProps);
|
|
180683
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
180684
|
+
var isRtl = direction === "rtl";
|
|
180685
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
180686
|
+
itemStyleCache[index2] = style2 = {
|
|
180687
|
+
position: "absolute",
|
|
180688
|
+
left: isRtl ? void 0 : offsetHorizontal,
|
|
180689
|
+
right: isRtl ? offsetHorizontal : void 0,
|
|
180690
|
+
top: !isHorizontal ? _offset : 0,
|
|
180691
|
+
height: !isHorizontal ? size2 : "100%",
|
|
180692
|
+
width: isHorizontal ? size2 : "100%"
|
|
180693
|
+
};
|
|
180694
|
+
}
|
|
180695
|
+
return style2;
|
|
180696
|
+
};
|
|
180697
|
+
_this._getItemStyleCache = void 0;
|
|
180698
|
+
_this._getItemStyleCache = memoizeOne(function(_15, __, ___) {
|
|
180699
|
+
return {};
|
|
180700
|
+
});
|
|
180701
|
+
_this._onScrollHorizontal = function(event) {
|
|
180702
|
+
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
180703
|
+
_this.setState(function(prevState) {
|
|
180704
|
+
if (prevState.scrollOffset === scrollLeft) {
|
|
180705
|
+
return null;
|
|
180706
|
+
}
|
|
180707
|
+
var direction = _this.props.direction;
|
|
180708
|
+
var scrollOffset = scrollLeft;
|
|
180709
|
+
if (direction === "rtl") {
|
|
180710
|
+
switch (getRTLOffsetType()) {
|
|
180711
|
+
case "negative":
|
|
180712
|
+
scrollOffset = -scrollLeft;
|
|
180713
|
+
break;
|
|
180714
|
+
case "positive-descending":
|
|
180715
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
180716
|
+
break;
|
|
180717
|
+
}
|
|
180718
|
+
}
|
|
180719
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
180720
|
+
return {
|
|
180721
|
+
isScrolling: true,
|
|
180722
|
+
scrollDirection: prevState.scrollOffset < scrollLeft ? "forward" : "backward",
|
|
180723
|
+
scrollOffset,
|
|
180724
|
+
scrollUpdateWasRequested: false
|
|
180725
|
+
};
|
|
180726
|
+
}, _this._resetIsScrollingDebounced);
|
|
180727
|
+
};
|
|
180728
|
+
_this._onScrollVertical = function(event) {
|
|
180729
|
+
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
180730
|
+
_this.setState(function(prevState) {
|
|
180731
|
+
if (prevState.scrollOffset === scrollTop) {
|
|
180732
|
+
return null;
|
|
180733
|
+
}
|
|
180734
|
+
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
180735
|
+
return {
|
|
180736
|
+
isScrolling: true,
|
|
180737
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
180738
|
+
scrollOffset,
|
|
180739
|
+
scrollUpdateWasRequested: false
|
|
180740
|
+
};
|
|
180741
|
+
}, _this._resetIsScrollingDebounced);
|
|
180742
|
+
};
|
|
180743
|
+
_this._outerRefSetter = function(ref2) {
|
|
180744
|
+
var outerRef = _this.props.outerRef;
|
|
180745
|
+
_this._outerRef = ref2;
|
|
180746
|
+
if (typeof outerRef === "function") {
|
|
180747
|
+
outerRef(ref2);
|
|
180748
|
+
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
180749
|
+
outerRef.current = ref2;
|
|
180750
|
+
}
|
|
180751
|
+
};
|
|
180752
|
+
_this._resetIsScrollingDebounced = function() {
|
|
180753
|
+
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
180754
|
+
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
180755
|
+
}
|
|
180756
|
+
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
180757
|
+
};
|
|
180758
|
+
_this._resetIsScrolling = function() {
|
|
180759
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
180760
|
+
_this.setState({
|
|
180761
|
+
isScrolling: false
|
|
180762
|
+
}, function() {
|
|
180763
|
+
_this._getItemStyleCache(-1, null);
|
|
180764
|
+
});
|
|
180765
|
+
};
|
|
180766
|
+
return _this;
|
|
180767
|
+
}
|
|
180768
|
+
List2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
180769
|
+
validateSharedProps$1(nextProps, prevState);
|
|
180770
|
+
validateProps5(nextProps);
|
|
180771
|
+
return null;
|
|
180772
|
+
};
|
|
180773
|
+
var _proto = List2.prototype;
|
|
180774
|
+
_proto.scrollTo = function scrollTo2(scrollOffset) {
|
|
180775
|
+
scrollOffset = Math.max(0, scrollOffset);
|
|
180776
|
+
this.setState(function(prevState) {
|
|
180777
|
+
if (prevState.scrollOffset === scrollOffset) {
|
|
180778
|
+
return null;
|
|
180779
|
+
}
|
|
180780
|
+
return {
|
|
180781
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
180782
|
+
scrollOffset,
|
|
180783
|
+
scrollUpdateWasRequested: true
|
|
180784
|
+
};
|
|
180785
|
+
}, this._resetIsScrollingDebounced);
|
|
180786
|
+
};
|
|
180787
|
+
_proto.scrollToItem = function scrollToItem(index2, align) {
|
|
180788
|
+
if (align === void 0) {
|
|
180789
|
+
align = "auto";
|
|
180790
|
+
}
|
|
180791
|
+
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
180792
|
+
var scrollOffset = this.state.scrollOffset;
|
|
180793
|
+
index2 = Math.max(0, Math.min(index2, itemCount - 1));
|
|
180794
|
+
var scrollbarSize = 0;
|
|
180795
|
+
if (this._outerRef) {
|
|
180796
|
+
var outerRef = this._outerRef;
|
|
180797
|
+
if (layout === "vertical") {
|
|
180798
|
+
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
180799
|
+
} else {
|
|
180800
|
+
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
180801
|
+
}
|
|
180802
|
+
}
|
|
180803
|
+
this.scrollTo(getOffsetForIndexAndAlignment5(this.props, index2, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
180804
|
+
};
|
|
180805
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
180806
|
+
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
180807
|
+
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
180808
|
+
var outerRef = this._outerRef;
|
|
180809
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
180810
|
+
outerRef.scrollLeft = initialScrollOffset;
|
|
180811
|
+
} else {
|
|
180812
|
+
outerRef.scrollTop = initialScrollOffset;
|
|
180813
|
+
}
|
|
180814
|
+
}
|
|
180815
|
+
this._callPropsCallbacks();
|
|
180816
|
+
};
|
|
180817
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
180818
|
+
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
180819
|
+
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
180820
|
+
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
180821
|
+
var outerRef = this._outerRef;
|
|
180822
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
180823
|
+
if (direction === "rtl") {
|
|
180824
|
+
switch (getRTLOffsetType()) {
|
|
180825
|
+
case "negative":
|
|
180826
|
+
outerRef.scrollLeft = -scrollOffset;
|
|
180827
|
+
break;
|
|
180828
|
+
case "positive-ascending":
|
|
180829
|
+
outerRef.scrollLeft = scrollOffset;
|
|
180830
|
+
break;
|
|
180831
|
+
default:
|
|
180832
|
+
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
180833
|
+
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
180834
|
+
break;
|
|
180835
|
+
}
|
|
180836
|
+
} else {
|
|
180837
|
+
outerRef.scrollLeft = scrollOffset;
|
|
180838
|
+
}
|
|
180839
|
+
} else {
|
|
180840
|
+
outerRef.scrollTop = scrollOffset;
|
|
180841
|
+
}
|
|
180842
|
+
}
|
|
180843
|
+
this._callPropsCallbacks();
|
|
180844
|
+
};
|
|
180845
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
180846
|
+
if (this._resetIsScrollingTimeoutId !== null) {
|
|
180847
|
+
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
180848
|
+
}
|
|
180849
|
+
};
|
|
180850
|
+
_proto.render = function render2() {
|
|
180851
|
+
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey2 = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width = _this$props5.width;
|
|
180852
|
+
var isScrolling = this.state.isScrolling;
|
|
180853
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
180854
|
+
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
180855
|
+
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
180856
|
+
var items = [];
|
|
180857
|
+
if (itemCount > 0) {
|
|
180858
|
+
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
180859
|
+
items.push(createElement(children, {
|
|
180860
|
+
data: itemData,
|
|
180861
|
+
key: itemKey2(_index, itemData),
|
|
180862
|
+
index: _index,
|
|
180863
|
+
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
180864
|
+
style: this._getItemStyle(_index)
|
|
180865
|
+
}));
|
|
180866
|
+
}
|
|
180867
|
+
}
|
|
180868
|
+
var estimatedTotalSize = getEstimatedTotalSize4(this.props, this._instanceProps);
|
|
180869
|
+
return createElement(outerElementType || outerTagName || "div", {
|
|
180870
|
+
className,
|
|
180871
|
+
onScroll,
|
|
180872
|
+
ref: this._outerRefSetter,
|
|
180873
|
+
style: _extends$4({
|
|
180874
|
+
position: "relative",
|
|
180875
|
+
height,
|
|
180876
|
+
width,
|
|
180877
|
+
overflow: "auto",
|
|
180878
|
+
WebkitOverflowScrolling: "touch",
|
|
180879
|
+
willChange: "transform",
|
|
180880
|
+
direction
|
|
180881
|
+
}, style2)
|
|
180882
|
+
}, createElement(innerElementType || innerTagName || "div", {
|
|
180883
|
+
children: items,
|
|
180884
|
+
ref: innerRef,
|
|
180885
|
+
style: {
|
|
180886
|
+
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
180887
|
+
pointerEvents: isScrolling ? "none" : void 0,
|
|
180888
|
+
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
180889
|
+
}
|
|
180890
|
+
}));
|
|
180891
|
+
};
|
|
180892
|
+
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
180893
|
+
if (typeof this.props.onItemsRendered === "function") {
|
|
180894
|
+
var itemCount = this.props.itemCount;
|
|
180895
|
+
if (itemCount > 0) {
|
|
180896
|
+
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
180897
|
+
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
180898
|
+
}
|
|
180899
|
+
}
|
|
180900
|
+
if (typeof this.props.onScroll === "function") {
|
|
180901
|
+
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
180902
|
+
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
180903
|
+
}
|
|
180904
|
+
};
|
|
180905
|
+
_proto._getRangeToRender = function _getRangeToRender() {
|
|
180906
|
+
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
180907
|
+
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
180908
|
+
if (itemCount === 0) {
|
|
180909
|
+
return [0, 0, 0, 0];
|
|
180910
|
+
}
|
|
180911
|
+
var startIndex = getStartIndexForOffset3(this.props, scrollOffset, this._instanceProps);
|
|
180912
|
+
var stopIndex = getStopIndexForStartIndex3(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
180913
|
+
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
180914
|
+
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
180915
|
+
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
180916
|
+
};
|
|
180917
|
+
return List2;
|
|
180918
|
+
}(PureComponent), _class.defaultProps = {
|
|
180919
|
+
direction: "ltr",
|
|
180920
|
+
itemData: void 0,
|
|
180921
|
+
layout: "vertical",
|
|
180922
|
+
overscanCount: 2,
|
|
180923
|
+
useIsScrolling: false
|
|
180924
|
+
}, _class;
|
|
180925
|
+
}
|
|
180926
|
+
var validateSharedProps$1 = function validateSharedProps3(_ref2, _ref3) {
|
|
180927
|
+
var children = _ref2.children, direction = _ref2.direction, height = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width = _ref2.width;
|
|
180928
|
+
var instance = _ref3.instance;
|
|
180929
|
+
if (define_process_env_default.NODE_ENV !== "production") {
|
|
180930
|
+
if (innerTagName != null || outerTagName != null) {
|
|
180931
|
+
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
180932
|
+
devWarningsTagName$1.add(instance);
|
|
180933
|
+
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
180934
|
+
}
|
|
180935
|
+
}
|
|
180936
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
180937
|
+
switch (direction) {
|
|
180938
|
+
case "horizontal":
|
|
180939
|
+
case "vertical":
|
|
180940
|
+
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
180941
|
+
devWarningsDirection.add(instance);
|
|
180942
|
+
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
180943
|
+
}
|
|
180944
|
+
break;
|
|
180945
|
+
case "ltr":
|
|
180946
|
+
case "rtl":
|
|
180947
|
+
break;
|
|
180948
|
+
default:
|
|
180949
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
180950
|
+
}
|
|
180951
|
+
switch (layout) {
|
|
180952
|
+
case "horizontal":
|
|
180953
|
+
case "vertical":
|
|
180954
|
+
break;
|
|
180955
|
+
default:
|
|
180956
|
+
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
180957
|
+
}
|
|
180958
|
+
if (children == null) {
|
|
180959
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
180960
|
+
}
|
|
180961
|
+
if (isHorizontal && typeof width !== "number") {
|
|
180962
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width === null ? "null" : typeof width) + '" was specified.'));
|
|
180963
|
+
} else if (!isHorizontal && typeof height !== "number") {
|
|
180964
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height === null ? "null" : typeof height) + '" was specified.'));
|
|
180965
|
+
}
|
|
180966
|
+
}
|
|
180967
|
+
};
|
|
180968
|
+
var FixedSizeList = /* @__PURE__ */ createListComponent({
|
|
180969
|
+
getItemOffset: function getItemOffset2(_ref2, index2) {
|
|
180970
|
+
var itemSize = _ref2.itemSize;
|
|
180971
|
+
return index2 * itemSize;
|
|
180972
|
+
},
|
|
180973
|
+
getItemSize: function getItemSize2(_ref2, index2) {
|
|
180974
|
+
var itemSize = _ref2.itemSize;
|
|
180975
|
+
return itemSize;
|
|
180976
|
+
},
|
|
180977
|
+
getEstimatedTotalSize: function getEstimatedTotalSize3(_ref3) {
|
|
180978
|
+
var itemCount = _ref3.itemCount, itemSize = _ref3.itemSize;
|
|
180979
|
+
return itemSize * itemCount;
|
|
180980
|
+
},
|
|
180981
|
+
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment4(_ref4, index2, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
180982
|
+
var direction = _ref4.direction, height = _ref4.height, itemCount = _ref4.itemCount, itemSize = _ref4.itemSize, layout = _ref4.layout, width = _ref4.width;
|
|
180983
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
180984
|
+
var size2 = isHorizontal ? width : height;
|
|
180985
|
+
var lastItemOffset = Math.max(0, itemCount * itemSize - size2);
|
|
180986
|
+
var maxOffset = Math.min(lastItemOffset, index2 * itemSize);
|
|
180987
|
+
var minOffset = Math.max(0, index2 * itemSize - size2 + itemSize + scrollbarSize);
|
|
180988
|
+
if (align === "smart") {
|
|
180989
|
+
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
180990
|
+
align = "auto";
|
|
180991
|
+
} else {
|
|
180992
|
+
align = "center";
|
|
180993
|
+
}
|
|
180994
|
+
}
|
|
180995
|
+
switch (align) {
|
|
180996
|
+
case "start":
|
|
180997
|
+
return maxOffset;
|
|
180998
|
+
case "end":
|
|
180999
|
+
return minOffset;
|
|
181000
|
+
case "center": {
|
|
181001
|
+
var middleOffset = Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
181002
|
+
if (middleOffset < Math.ceil(size2 / 2)) {
|
|
181003
|
+
return 0;
|
|
181004
|
+
} else if (middleOffset > lastItemOffset + Math.floor(size2 / 2)) {
|
|
181005
|
+
return lastItemOffset;
|
|
181006
|
+
} else {
|
|
181007
|
+
return middleOffset;
|
|
181008
|
+
}
|
|
181009
|
+
}
|
|
181010
|
+
case "auto":
|
|
181011
|
+
default:
|
|
181012
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
181013
|
+
return scrollOffset;
|
|
181014
|
+
} else if (scrollOffset < minOffset) {
|
|
181015
|
+
return minOffset;
|
|
181016
|
+
} else {
|
|
181017
|
+
return maxOffset;
|
|
181018
|
+
}
|
|
181019
|
+
}
|
|
181020
|
+
},
|
|
181021
|
+
getStartIndexForOffset: function getStartIndexForOffset2(_ref5, offset3) {
|
|
181022
|
+
var itemCount = _ref5.itemCount, itemSize = _ref5.itemSize;
|
|
181023
|
+
return Math.max(0, Math.min(itemCount - 1, Math.floor(offset3 / itemSize)));
|
|
181024
|
+
},
|
|
181025
|
+
getStopIndexForStartIndex: function getStopIndexForStartIndex2(_ref6, startIndex, scrollOffset) {
|
|
181026
|
+
var direction = _ref6.direction, height = _ref6.height, itemCount = _ref6.itemCount, itemSize = _ref6.itemSize, layout = _ref6.layout, width = _ref6.width;
|
|
181027
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
181028
|
+
var offset3 = startIndex * itemSize;
|
|
181029
|
+
var size2 = isHorizontal ? width : height;
|
|
181030
|
+
var numVisibleItems = Math.ceil((size2 + scrollOffset - offset3) / itemSize);
|
|
181031
|
+
return Math.max(0, Math.min(
|
|
181032
|
+
itemCount - 1,
|
|
181033
|
+
startIndex + numVisibleItems - 1
|
|
181034
|
+
// -1 is because stop index is inclusive
|
|
181035
|
+
));
|
|
181036
|
+
},
|
|
181037
|
+
initInstanceProps: function initInstanceProps4(props2) {
|
|
181038
|
+
},
|
|
181039
|
+
shouldResetStyleCacheOnItemSizeChange: true,
|
|
181040
|
+
validateProps: function validateProps4(_ref7) {
|
|
181041
|
+
var itemSize = _ref7.itemSize;
|
|
181042
|
+
if (define_process_env_default.NODE_ENV !== "production") {
|
|
181043
|
+
if (typeof itemSize !== "number") {
|
|
181044
|
+
throw Error('An invalid "itemSize" prop has been specified. Value should be a number. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
181045
|
+
}
|
|
181046
|
+
}
|
|
181047
|
+
}
|
|
181048
|
+
});
|
|
180756
181049
|
const TAG_HEIGHT = 26;
|
|
180757
181050
|
const INPUT_SIZE = 36;
|
|
180758
181051
|
const MORE_TAGS_SIZE = 90;
|
|
@@ -198089,4 +198382,4 @@ export {
|
|
|
198089
198382
|
SbTimer as y,
|
|
198090
198383
|
SbApi as z
|
|
198091
198384
|
};
|
|
198092
|
-
//# sourceMappingURL=index-
|
|
198385
|
+
//# sourceMappingURL=index-snr_jI8a.js.map
|