@gobolt/genesis 0.4.13 → 0.4.17
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/components/Table/InfiniteScrollTable/InfiniteScrollTable.d.ts +2 -1
- package/dist/components/Table/InfiniteScrollTable/index.d.ts +2 -0
- package/dist/components/Table/InfiniteScrollTable/useInfiniteQuery.d.ts +21 -0
- package/dist/components/Table/TableControls/SecondaryTableControlsRow.d.ts +3 -1
- package/dist/components/Table/__mocks__/TableWithControlsData.d.ts +3 -0
- package/dist/components/Table/__mocks__/table-mocks.d.ts +31 -0
- package/dist/components/Table/useTable.d.ts +8 -2
- package/dist/components/TableWithControls/TableWithControls.d.ts +8 -1
- package/dist/components/TableWithControls/useTableWithControls.d.ts +4 -1
- package/dist/index.cjs +1080 -1775
- package/dist/index.js +1080 -1775
- package/package.json +1 -2
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ function requireClassnames() {
|
|
|
19
19
|
hasRequiredClassnames = 1;
|
|
20
20
|
(function(module2) {
|
|
21
21
|
(function() {
|
|
22
|
-
var
|
|
22
|
+
var hasOwn = {}.hasOwnProperty;
|
|
23
23
|
function classNames2() {
|
|
24
24
|
var classes = "";
|
|
25
25
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -45,7 +45,7 @@ function requireClassnames() {
|
|
|
45
45
|
}
|
|
46
46
|
var classes = "";
|
|
47
47
|
for (var key in arg) {
|
|
48
|
-
if (
|
|
48
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
49
49
|
classes = appendClass(classes, key);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -3154,14 +3154,14 @@ function merge$2() {
|
|
|
3154
3154
|
});
|
|
3155
3155
|
return clone;
|
|
3156
3156
|
}
|
|
3157
|
-
function noop$
|
|
3157
|
+
function noop$4() {
|
|
3158
3158
|
}
|
|
3159
3159
|
let deprecatedWarnList = null;
|
|
3160
3160
|
function resetWarned() {
|
|
3161
3161
|
deprecatedWarnList = null;
|
|
3162
3162
|
resetWarned$1();
|
|
3163
3163
|
}
|
|
3164
|
-
let _warning = noop$
|
|
3164
|
+
let _warning = noop$4;
|
|
3165
3165
|
if (process.env.NODE_ENV !== "production") {
|
|
3166
3166
|
_warning = (valid2, component, message2) => {
|
|
3167
3167
|
warningOnce(valid2, `[antd: ${component}] ${message2}`);
|
|
@@ -3202,7 +3202,7 @@ const devUseWarning = process.env.NODE_ENV !== "production" ? (component) => {
|
|
|
3202
3202
|
} : () => {
|
|
3203
3203
|
const noopWarning = () => {
|
|
3204
3204
|
};
|
|
3205
|
-
noopWarning.deprecated = noop$
|
|
3205
|
+
noopWarning.deprecated = noop$4;
|
|
3206
3206
|
return noopWarning;
|
|
3207
3207
|
};
|
|
3208
3208
|
const ValidateMessagesContext = /* @__PURE__ */ createContext$1(void 0);
|
|
@@ -4910,12 +4910,12 @@ function merge$1() {
|
|
|
4910
4910
|
return ret;
|
|
4911
4911
|
}
|
|
4912
4912
|
var statistic = {};
|
|
4913
|
-
function noop$
|
|
4913
|
+
function noop$3() {
|
|
4914
4914
|
}
|
|
4915
4915
|
var statisticToken = function statisticToken2(token2) {
|
|
4916
4916
|
var tokenKeys2;
|
|
4917
4917
|
var proxy = token2;
|
|
4918
|
-
var flush = noop$
|
|
4918
|
+
var flush = noop$3;
|
|
4919
4919
|
if (enableStatistic && typeof Proxy !== "undefined") {
|
|
4920
4920
|
tokenKeys2 = /* @__PURE__ */ new Set();
|
|
4921
4921
|
proxy = new Proxy(token2, {
|
|
@@ -44883,7 +44883,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
44883
44883
|
var defaultItemRender = function defaultItemRender2(page, type4, element2) {
|
|
44884
44884
|
return element2;
|
|
44885
44885
|
};
|
|
44886
|
-
function noop$
|
|
44886
|
+
function noop$2() {
|
|
44887
44887
|
}
|
|
44888
44888
|
function isInteger(v) {
|
|
44889
44889
|
var value2 = Number(v);
|
|
@@ -44894,7 +44894,7 @@ function calculatePage(p, pageSize, total) {
|
|
|
44894
44894
|
return Math.floor((total - 1) / _pageSize) + 1;
|
|
44895
44895
|
}
|
|
44896
44896
|
var Pagination$1 = function Pagination(props) {
|
|
44897
|
-
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-pagination" : _props$prefixCls, _props$selectPrefixCl = props.selectPrefixCls, selectPrefixCls = _props$selectPrefixCl === void 0 ? "rc-select" : _props$selectPrefixCl, className = props.className, currentProp = props.current, _props$defaultCurrent = props.defaultCurrent, defaultCurrent = _props$defaultCurrent === void 0 ? 1 : _props$defaultCurrent, _props$total = props.total, total = _props$total === void 0 ? 0 : _props$total, pageSizeProp = props.pageSize, _props$defaultPageSiz = props.defaultPageSize, defaultPageSize = _props$defaultPageSiz === void 0 ? 10 : _props$defaultPageSiz, _props$onChange = props.onChange, onChange = _props$onChange === void 0 ? noop$
|
|
44897
|
+
var _props$prefixCls = props.prefixCls, prefixCls = _props$prefixCls === void 0 ? "rc-pagination" : _props$prefixCls, _props$selectPrefixCl = props.selectPrefixCls, selectPrefixCls = _props$selectPrefixCl === void 0 ? "rc-select" : _props$selectPrefixCl, className = props.className, currentProp = props.current, _props$defaultCurrent = props.defaultCurrent, defaultCurrent = _props$defaultCurrent === void 0 ? 1 : _props$defaultCurrent, _props$total = props.total, total = _props$total === void 0 ? 0 : _props$total, pageSizeProp = props.pageSize, _props$defaultPageSiz = props.defaultPageSize, defaultPageSize = _props$defaultPageSiz === void 0 ? 10 : _props$defaultPageSiz, _props$onChange = props.onChange, onChange = _props$onChange === void 0 ? noop$2 : _props$onChange, hideOnSinglePage = props.hideOnSinglePage, align = props.align, _props$showPrevNextJu = props.showPrevNextJumpers, showPrevNextJumpers = _props$showPrevNextJu === void 0 ? true : _props$showPrevNextJu, showQuickJumper = props.showQuickJumper, showLessItems = props.showLessItems, _props$showTitle = props.showTitle, showTitle = _props$showTitle === void 0 ? true : _props$showTitle, _props$onShowSizeChan = props.onShowSizeChange, onShowSizeChange = _props$onShowSizeChan === void 0 ? noop$2 : _props$onShowSizeChan, _props$locale = props.locale, locale2 = _props$locale === void 0 ? locale$1 : _props$locale, style2 = props.style, _props$totalBoundaryS = props.totalBoundaryShowSizeChanger, totalBoundaryShowSizeChanger = _props$totalBoundaryS === void 0 ? 50 : _props$totalBoundaryS, disabled2 = props.disabled, simple = props.simple, showTotal = props.showTotal, _props$showSizeChange = props.showSizeChanger, showSizeChanger = _props$showSizeChange === void 0 ? total > totalBoundaryShowSizeChanger : _props$showSizeChange, sizeChangerRender = props.sizeChangerRender, pageSizeOptions = props.pageSizeOptions, _props$itemRender = props.itemRender, itemRender = _props$itemRender === void 0 ? defaultItemRender : _props$itemRender, jumpPrevIcon = props.jumpPrevIcon, jumpNextIcon = props.jumpNextIcon, prevIcon = props.prevIcon, nextIcon = props.nextIcon;
|
|
44898
44898
|
var paginationRef = React__default.useRef(null);
|
|
44899
44899
|
var _useMergedState = useMergedState(10, {
|
|
44900
44900
|
value: pageSizeProp,
|
|
@@ -44911,7 +44911,7 @@ var Pagination$1 = function Pagination(props) {
|
|
|
44911
44911
|
useEffect(function() {
|
|
44912
44912
|
setInternalInputVal(current);
|
|
44913
44913
|
}, [current]);
|
|
44914
|
-
var hasOnChange = onChange !== noop$
|
|
44914
|
+
var hasOnChange = onChange !== noop$2;
|
|
44915
44915
|
var hasCurrent = "current" in props;
|
|
44916
44916
|
if (process.env.NODE_ENV !== "production") {
|
|
44917
44917
|
warningOnce(hasCurrent ? hasOnChange : true, "You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");
|
|
@@ -53135,7 +53135,7 @@ var HIDDEN_STYLE = {
|
|
|
53135
53135
|
padding: 0,
|
|
53136
53136
|
margin: 0
|
|
53137
53137
|
};
|
|
53138
|
-
var noop$
|
|
53138
|
+
var noop$1 = function noop() {
|
|
53139
53139
|
};
|
|
53140
53140
|
var MOTION_KEY = "RC_TREE_MOTION_".concat(Math.random());
|
|
53141
53141
|
var MotionNode = {
|
|
@@ -53271,7 +53271,7 @@ var NodeList = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
53271
53271
|
onFocus,
|
|
53272
53272
|
onBlur,
|
|
53273
53273
|
value: "",
|
|
53274
|
-
onChange: noop$
|
|
53274
|
+
onChange: noop$1,
|
|
53275
53275
|
"aria-label": "for screen reader"
|
|
53276
53276
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
53277
53277
|
className: "".concat(prefixCls, "-treenode"),
|
|
@@ -72288,7 +72288,7 @@ var hasRequiredExtend;
|
|
|
72288
72288
|
function requireExtend() {
|
|
72289
72289
|
if (hasRequiredExtend) return extend$2;
|
|
72290
72290
|
hasRequiredExtend = 1;
|
|
72291
|
-
var
|
|
72291
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
72292
72292
|
var toStr = Object.prototype.toString;
|
|
72293
72293
|
var defineProperty = Object.defineProperty;
|
|
72294
72294
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
@@ -72302,15 +72302,15 @@ function requireExtend() {
|
|
|
72302
72302
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
72303
72303
|
return false;
|
|
72304
72304
|
}
|
|
72305
|
-
var hasOwnConstructor =
|
|
72306
|
-
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype &&
|
|
72305
|
+
var hasOwnConstructor = hasOwn.call(obj, "constructor");
|
|
72306
|
+
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
|
|
72307
72307
|
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
|
72308
72308
|
return false;
|
|
72309
72309
|
}
|
|
72310
72310
|
var key;
|
|
72311
72311
|
for (key in obj) {
|
|
72312
72312
|
}
|
|
72313
|
-
return typeof key === "undefined" ||
|
|
72313
|
+
return typeof key === "undefined" || hasOwn.call(obj, key);
|
|
72314
72314
|
};
|
|
72315
72315
|
var setProperty = function setProperty2(target, options) {
|
|
72316
72316
|
if (defineProperty && options.name === "__proto__") {
|
|
@@ -72326,7 +72326,7 @@ function requireExtend() {
|
|
|
72326
72326
|
};
|
|
72327
72327
|
var getProperty = function getProperty2(obj, name2) {
|
|
72328
72328
|
if (name2 === "__proto__") {
|
|
72329
|
-
if (!
|
|
72329
|
+
if (!hasOwn.call(obj, name2)) {
|
|
72330
72330
|
return void 0;
|
|
72331
72331
|
} else if (gOPD) {
|
|
72332
72332
|
return gOPD(obj, name2).value;
|
|
@@ -72376,7 +72376,7 @@ function requireExtend() {
|
|
|
72376
72376
|
}
|
|
72377
72377
|
var extendExports = requireExtend();
|
|
72378
72378
|
const extend$1 = /* @__PURE__ */ getDefaultExportFromCjs(extendExports);
|
|
72379
|
-
function isPlainObject
|
|
72379
|
+
function isPlainObject(value2) {
|
|
72380
72380
|
if (typeof value2 !== "object" || value2 === null) {
|
|
72381
72381
|
return false;
|
|
72382
72382
|
}
|
|
@@ -73780,7 +73780,7 @@ class Processor extends CallableInstance {
|
|
|
73780
73780
|
} else if (parameters2.length > 0) {
|
|
73781
73781
|
let [primary, ...rest] = parameters2;
|
|
73782
73782
|
const currentPrimary = attachers[entryIndex][1];
|
|
73783
|
-
if (isPlainObject
|
|
73783
|
+
if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
|
|
73784
73784
|
primary = extend$1(true, currentPrimary, primary);
|
|
73785
73785
|
}
|
|
73786
73786
|
attachers[entryIndex] = [plugin, primary, ...rest];
|
|
@@ -73807,7 +73807,7 @@ function assertUnfrozen(name2, frozen) {
|
|
|
73807
73807
|
}
|
|
73808
73808
|
}
|
|
73809
73809
|
function assertNode(node2) {
|
|
73810
|
-
if (!isPlainObject
|
|
73810
|
+
if (!isPlainObject(node2) || typeof node2.type !== "string") {
|
|
73811
73811
|
throw new TypeError("Expected node, got `" + node2 + "`");
|
|
73812
73812
|
}
|
|
73813
73813
|
}
|
|
@@ -74704,7 +74704,7 @@ function range2(start2, stop, step) {
|
|
|
74704
74704
|
}
|
|
74705
74705
|
return range3;
|
|
74706
74706
|
}
|
|
74707
|
-
var
|
|
74707
|
+
var noop2 = { value: () => {
|
|
74708
74708
|
} };
|
|
74709
74709
|
function dispatch() {
|
|
74710
74710
|
for (var i = 0, n2 = arguments.length, _ = {}, t2; i < n2; ++i) {
|
|
@@ -74764,7 +74764,7 @@ function get$1(type4, name2) {
|
|
|
74764
74764
|
function set$1(type4, name2, callback) {
|
|
74765
74765
|
for (var i = 0, n2 = type4.length; i < n2; ++i) {
|
|
74766
74766
|
if (type4[i].name === name2) {
|
|
74767
|
-
type4[i] =
|
|
74767
|
+
type4[i] = noop2, type4 = type4.slice(0, i).concat(type4.slice(i + 1));
|
|
74768
74768
|
break;
|
|
74769
74769
|
}
|
|
74770
74770
|
}
|
|
@@ -80896,16 +80896,21 @@ const OverflowMenuContainer = styled.div`
|
|
|
80896
80896
|
animation: ${({ $placement, $isAnimating }) => {
|
|
80897
80897
|
if (!$isAnimating) return "none";
|
|
80898
80898
|
switch ($placement) {
|
|
80899
|
-
case "bottom":
|
|
80899
|
+
case "bottom": {
|
|
80900
80900
|
return slideDown;
|
|
80901
|
-
|
|
80901
|
+
}
|
|
80902
|
+
case "top": {
|
|
80902
80903
|
return slideUp;
|
|
80903
|
-
|
|
80904
|
+
}
|
|
80905
|
+
case "left": {
|
|
80904
80906
|
return slideLeft;
|
|
80905
|
-
|
|
80907
|
+
}
|
|
80908
|
+
case "right": {
|
|
80906
80909
|
return slideRight;
|
|
80907
|
-
|
|
80910
|
+
}
|
|
80911
|
+
default: {
|
|
80908
80912
|
return slideDown;
|
|
80913
|
+
}
|
|
80909
80914
|
}
|
|
80910
80915
|
}}
|
|
80911
80916
|
0.15s cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -84313,1231 +84318,105 @@ const CustomPagination = ({
|
|
|
84313
84318
|
}
|
|
84314
84319
|
return null;
|
|
84315
84320
|
};
|
|
84316
|
-
|
|
84317
|
-
|
|
84318
|
-
|
|
84319
|
-
|
|
84320
|
-
|
|
84321
|
-
|
|
84322
|
-
|
|
84323
|
-
|
|
84324
|
-
|
|
84325
|
-
|
|
84326
|
-
|
|
84327
|
-
|
|
84328
|
-
|
|
84329
|
-
|
|
84330
|
-
|
|
84331
|
-
|
|
84332
|
-
|
|
84333
|
-
|
|
84334
|
-
|
|
84335
|
-
|
|
84336
|
-
|
|
84337
|
-
|
|
84338
|
-
|
|
84339
|
-
|
|
84340
|
-
|
|
84341
|
-
|
|
84342
|
-
|
|
84343
|
-
|
|
84344
|
-
|
|
84345
|
-
|
|
84346
|
-
|
|
84347
|
-
|
|
84348
|
-
|
|
84349
|
-
clearTimeout: (timeoutId) => clearTimeout(timeoutId),
|
|
84350
|
-
setInterval: (callback, delay) => setInterval(callback, delay),
|
|
84351
|
-
clearInterval: (intervalId) => clearInterval(intervalId)
|
|
84352
|
-
};
|
|
84353
|
-
var TimeoutManager = class {
|
|
84354
|
-
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
84355
|
-
// type at app boot; and if we leave that type, then any new timer provider
|
|
84356
|
-
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
84357
|
-
//
|
|
84358
|
-
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
84359
|
-
// this class is unsafe internally to allow for extension.
|
|
84360
|
-
#provider = defaultTimeoutProvider;
|
|
84361
|
-
#providerCalled = false;
|
|
84362
|
-
setTimeoutProvider(provider) {
|
|
84363
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84364
|
-
if (this.#providerCalled && provider !== this.#provider) {
|
|
84365
|
-
console.error(
|
|
84366
|
-
`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
|
|
84367
|
-
{ previous: this.#provider, provider }
|
|
84368
|
-
);
|
|
84369
|
-
}
|
|
84370
|
-
}
|
|
84371
|
-
this.#provider = provider;
|
|
84372
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84373
|
-
this.#providerCalled = false;
|
|
84374
|
-
}
|
|
84375
|
-
}
|
|
84376
|
-
setTimeout(callback, delay) {
|
|
84377
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84378
|
-
this.#providerCalled = true;
|
|
84379
|
-
}
|
|
84380
|
-
return this.#provider.setTimeout(callback, delay);
|
|
84381
|
-
}
|
|
84382
|
-
clearTimeout(timeoutId) {
|
|
84383
|
-
this.#provider.clearTimeout(timeoutId);
|
|
84384
|
-
}
|
|
84385
|
-
setInterval(callback, delay) {
|
|
84386
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84387
|
-
this.#providerCalled = true;
|
|
84388
|
-
}
|
|
84389
|
-
return this.#provider.setInterval(callback, delay);
|
|
84390
|
-
}
|
|
84391
|
-
clearInterval(intervalId) {
|
|
84392
|
-
this.#provider.clearInterval(intervalId);
|
|
84393
|
-
}
|
|
84394
|
-
};
|
|
84395
|
-
var timeoutManager = new TimeoutManager();
|
|
84396
|
-
function systemSetTimeoutZero(callback) {
|
|
84397
|
-
setTimeout(callback, 0);
|
|
84398
|
-
}
|
|
84399
|
-
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
84400
|
-
function noop2() {
|
|
84401
|
-
}
|
|
84402
|
-
function isValidTimeout(value2) {
|
|
84403
|
-
return typeof value2 === "number" && value2 >= 0 && value2 !== Infinity;
|
|
84404
|
-
}
|
|
84405
|
-
function timeUntilStale(updatedAt, staleTime) {
|
|
84406
|
-
return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
|
|
84407
|
-
}
|
|
84408
|
-
function resolveStaleTime(staleTime, query) {
|
|
84409
|
-
return typeof staleTime === "function" ? staleTime(query) : staleTime;
|
|
84410
|
-
}
|
|
84411
|
-
function resolveEnabled(enabled, query) {
|
|
84412
|
-
return typeof enabled === "function" ? enabled(query) : enabled;
|
|
84413
|
-
}
|
|
84414
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
84415
|
-
function replaceEqualDeep(a, b) {
|
|
84416
|
-
if (a === b) {
|
|
84417
|
-
return a;
|
|
84418
|
-
}
|
|
84419
|
-
const array4 = isPlainArray(a) && isPlainArray(b);
|
|
84420
|
-
if (!array4 && !(isPlainObject(a) && isPlainObject(b))) return b;
|
|
84421
|
-
const aItems = array4 ? a : Object.keys(a);
|
|
84422
|
-
const aSize = aItems.length;
|
|
84423
|
-
const bItems = array4 ? b : Object.keys(b);
|
|
84424
|
-
const bSize = bItems.length;
|
|
84425
|
-
const copy2 = array4 ? new Array(bSize) : {};
|
|
84426
|
-
let equalItems = 0;
|
|
84427
|
-
for (let i = 0; i < bSize; i++) {
|
|
84428
|
-
const key = array4 ? i : bItems[i];
|
|
84429
|
-
const aItem = a[key];
|
|
84430
|
-
const bItem = b[key];
|
|
84431
|
-
if (aItem === bItem) {
|
|
84432
|
-
copy2[key] = aItem;
|
|
84433
|
-
if (array4 ? i < aSize : hasOwn.call(a, key)) equalItems++;
|
|
84434
|
-
continue;
|
|
84435
|
-
}
|
|
84436
|
-
if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
|
|
84437
|
-
copy2[key] = bItem;
|
|
84438
|
-
continue;
|
|
84439
|
-
}
|
|
84440
|
-
const v = replaceEqualDeep(aItem, bItem);
|
|
84441
|
-
copy2[key] = v;
|
|
84442
|
-
if (v === aItem) equalItems++;
|
|
84443
|
-
}
|
|
84444
|
-
return aSize === bSize && equalItems === aSize ? a : copy2;
|
|
84445
|
-
}
|
|
84446
|
-
function shallowEqualObjects(a, b) {
|
|
84447
|
-
if (!b || Object.keys(a).length !== Object.keys(b).length) {
|
|
84448
|
-
return false;
|
|
84449
|
-
}
|
|
84450
|
-
for (const key in a) {
|
|
84451
|
-
if (a[key] !== b[key]) {
|
|
84452
|
-
return false;
|
|
84453
|
-
}
|
|
84454
|
-
}
|
|
84455
|
-
return true;
|
|
84456
|
-
}
|
|
84457
|
-
function isPlainArray(value2) {
|
|
84458
|
-
return Array.isArray(value2) && value2.length === Object.keys(value2).length;
|
|
84459
|
-
}
|
|
84460
|
-
function isPlainObject(o2) {
|
|
84461
|
-
if (!hasObjectPrototype(o2)) {
|
|
84462
|
-
return false;
|
|
84463
|
-
}
|
|
84464
|
-
const ctor = o2.constructor;
|
|
84465
|
-
if (ctor === void 0) {
|
|
84466
|
-
return true;
|
|
84467
|
-
}
|
|
84468
|
-
const prot = ctor.prototype;
|
|
84469
|
-
if (!hasObjectPrototype(prot)) {
|
|
84470
|
-
return false;
|
|
84471
|
-
}
|
|
84472
|
-
if (!prot.hasOwnProperty("isPrototypeOf")) {
|
|
84473
|
-
return false;
|
|
84474
|
-
}
|
|
84475
|
-
if (Object.getPrototypeOf(o2) !== Object.prototype) {
|
|
84476
|
-
return false;
|
|
84477
|
-
}
|
|
84478
|
-
return true;
|
|
84479
|
-
}
|
|
84480
|
-
function hasObjectPrototype(o2) {
|
|
84481
|
-
return Object.prototype.toString.call(o2) === "[object Object]";
|
|
84482
|
-
}
|
|
84483
|
-
function replaceData(prevData, data, options) {
|
|
84484
|
-
if (typeof options.structuralSharing === "function") {
|
|
84485
|
-
return options.structuralSharing(prevData, data);
|
|
84486
|
-
} else if (options.structuralSharing !== false) {
|
|
84487
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84488
|
-
try {
|
|
84489
|
-
return replaceEqualDeep(prevData, data);
|
|
84490
|
-
} catch (error2) {
|
|
84491
|
-
console.error(
|
|
84492
|
-
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error2}`
|
|
84493
|
-
);
|
|
84494
|
-
throw error2;
|
|
84495
|
-
}
|
|
84496
|
-
}
|
|
84497
|
-
return replaceEqualDeep(prevData, data);
|
|
84498
|
-
}
|
|
84499
|
-
return data;
|
|
84500
|
-
}
|
|
84501
|
-
function addToEnd(items, item, max2 = 0) {
|
|
84502
|
-
const newItems = [...items, item];
|
|
84503
|
-
return max2 && newItems.length > max2 ? newItems.slice(1) : newItems;
|
|
84504
|
-
}
|
|
84505
|
-
function addToStart(items, item, max2 = 0) {
|
|
84506
|
-
const newItems = [item, ...items];
|
|
84507
|
-
return max2 && newItems.length > max2 ? newItems.slice(0, -1) : newItems;
|
|
84508
|
-
}
|
|
84509
|
-
var skipToken = Symbol();
|
|
84510
|
-
function ensureQueryFn(options, fetchOptions) {
|
|
84511
|
-
if (process.env.NODE_ENV !== "production") {
|
|
84512
|
-
if (options.queryFn === skipToken) {
|
|
84513
|
-
console.error(
|
|
84514
|
-
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
|
|
84515
|
-
);
|
|
84516
|
-
}
|
|
84517
|
-
}
|
|
84518
|
-
if (!options.queryFn && fetchOptions?.initialPromise) {
|
|
84519
|
-
return () => fetchOptions.initialPromise;
|
|
84520
|
-
}
|
|
84521
|
-
if (!options.queryFn || options.queryFn === skipToken) {
|
|
84522
|
-
return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
|
|
84523
|
-
}
|
|
84524
|
-
return options.queryFn;
|
|
84525
|
-
}
|
|
84526
|
-
function shouldThrowError(throwOnError, params) {
|
|
84527
|
-
if (typeof throwOnError === "function") {
|
|
84528
|
-
return throwOnError(...params);
|
|
84529
|
-
}
|
|
84530
|
-
return !!throwOnError;
|
|
84531
|
-
}
|
|
84532
|
-
var FocusManager = class extends Subscribable {
|
|
84533
|
-
#focused;
|
|
84534
|
-
#cleanup;
|
|
84535
|
-
#setup;
|
|
84536
|
-
constructor() {
|
|
84537
|
-
super();
|
|
84538
|
-
this.#setup = (onFocus) => {
|
|
84539
|
-
if (!isServer && window.addEventListener) {
|
|
84540
|
-
const listener = () => onFocus();
|
|
84541
|
-
window.addEventListener("visibilitychange", listener, false);
|
|
84542
|
-
return () => {
|
|
84543
|
-
window.removeEventListener("visibilitychange", listener);
|
|
84544
|
-
};
|
|
84545
|
-
}
|
|
84546
|
-
return;
|
|
84547
|
-
};
|
|
84548
|
-
}
|
|
84549
|
-
onSubscribe() {
|
|
84550
|
-
if (!this.#cleanup) {
|
|
84551
|
-
this.setEventListener(this.#setup);
|
|
84552
|
-
}
|
|
84553
|
-
}
|
|
84554
|
-
onUnsubscribe() {
|
|
84555
|
-
if (!this.hasListeners()) {
|
|
84556
|
-
this.#cleanup?.();
|
|
84557
|
-
this.#cleanup = void 0;
|
|
84558
|
-
}
|
|
84559
|
-
}
|
|
84560
|
-
setEventListener(setup) {
|
|
84561
|
-
this.#setup = setup;
|
|
84562
|
-
this.#cleanup?.();
|
|
84563
|
-
this.#cleanup = setup((focused) => {
|
|
84564
|
-
if (typeof focused === "boolean") {
|
|
84565
|
-
this.setFocused(focused);
|
|
84566
|
-
} else {
|
|
84567
|
-
this.onFocus();
|
|
84568
|
-
}
|
|
84569
|
-
});
|
|
84570
|
-
}
|
|
84571
|
-
setFocused(focused) {
|
|
84572
|
-
const changed = this.#focused !== focused;
|
|
84573
|
-
if (changed) {
|
|
84574
|
-
this.#focused = focused;
|
|
84575
|
-
this.onFocus();
|
|
84576
|
-
}
|
|
84577
|
-
}
|
|
84578
|
-
onFocus() {
|
|
84579
|
-
const isFocused = this.isFocused();
|
|
84580
|
-
this.listeners.forEach((listener) => {
|
|
84581
|
-
listener(isFocused);
|
|
84582
|
-
});
|
|
84583
|
-
}
|
|
84584
|
-
isFocused() {
|
|
84585
|
-
if (typeof this.#focused === "boolean") {
|
|
84586
|
-
return this.#focused;
|
|
84587
|
-
}
|
|
84588
|
-
return globalThis.document?.visibilityState !== "hidden";
|
|
84589
|
-
}
|
|
84590
|
-
};
|
|
84591
|
-
var focusManager = new FocusManager();
|
|
84592
|
-
function pendingThenable() {
|
|
84593
|
-
let resolve;
|
|
84594
|
-
let reject;
|
|
84595
|
-
const thenable = new Promise((_resolve, _reject) => {
|
|
84596
|
-
resolve = _resolve;
|
|
84597
|
-
reject = _reject;
|
|
84598
|
-
});
|
|
84599
|
-
thenable.status = "pending";
|
|
84600
|
-
thenable.catch(() => {
|
|
84601
|
-
});
|
|
84602
|
-
function finalize(data) {
|
|
84603
|
-
Object.assign(thenable, data);
|
|
84604
|
-
delete thenable.resolve;
|
|
84605
|
-
delete thenable.reject;
|
|
84606
|
-
}
|
|
84607
|
-
thenable.resolve = (value2) => {
|
|
84608
|
-
finalize({
|
|
84609
|
-
status: "fulfilled",
|
|
84610
|
-
value: value2
|
|
84611
|
-
});
|
|
84612
|
-
resolve(value2);
|
|
84613
|
-
};
|
|
84614
|
-
thenable.reject = (reason) => {
|
|
84615
|
-
finalize({
|
|
84616
|
-
status: "rejected",
|
|
84617
|
-
reason
|
|
84618
|
-
});
|
|
84619
|
-
reject(reason);
|
|
84620
|
-
};
|
|
84621
|
-
return thenable;
|
|
84622
|
-
}
|
|
84623
|
-
var defaultScheduler = systemSetTimeoutZero;
|
|
84624
|
-
function createNotifyManager() {
|
|
84625
|
-
let queue = [];
|
|
84626
|
-
let transactions = 0;
|
|
84627
|
-
let notifyFn = (callback) => {
|
|
84628
|
-
callback();
|
|
84629
|
-
};
|
|
84630
|
-
let batchNotifyFn = (callback) => {
|
|
84631
|
-
callback();
|
|
84632
|
-
};
|
|
84633
|
-
let scheduleFn = defaultScheduler;
|
|
84634
|
-
const schedule2 = (callback) => {
|
|
84635
|
-
if (transactions) {
|
|
84636
|
-
queue.push(callback);
|
|
84637
|
-
} else {
|
|
84638
|
-
scheduleFn(() => {
|
|
84639
|
-
notifyFn(callback);
|
|
84640
|
-
});
|
|
84641
|
-
}
|
|
84642
|
-
};
|
|
84643
|
-
const flush = () => {
|
|
84644
|
-
const originalQueue = queue;
|
|
84645
|
-
queue = [];
|
|
84646
|
-
if (originalQueue.length) {
|
|
84647
|
-
scheduleFn(() => {
|
|
84648
|
-
batchNotifyFn(() => {
|
|
84649
|
-
originalQueue.forEach((callback) => {
|
|
84650
|
-
notifyFn(callback);
|
|
84651
|
-
});
|
|
84652
|
-
});
|
|
84653
|
-
});
|
|
84654
|
-
}
|
|
84655
|
-
};
|
|
84656
|
-
return {
|
|
84657
|
-
batch: (callback) => {
|
|
84658
|
-
let result;
|
|
84659
|
-
transactions++;
|
|
84321
|
+
const useInfiniteQuery = ({
|
|
84322
|
+
queryKey: queryKey2,
|
|
84323
|
+
queryFn,
|
|
84324
|
+
initialPageParam,
|
|
84325
|
+
getNextPageParam
|
|
84326
|
+
}) => {
|
|
84327
|
+
const [pages, setPages] = useState([]);
|
|
84328
|
+
const [error2, setError] = useState(null);
|
|
84329
|
+
const [isFetchingNextPage, setIsFetchingNextPage] = useState(false);
|
|
84330
|
+
const [status, setStatus] = useState(
|
|
84331
|
+
"pending"
|
|
84332
|
+
);
|
|
84333
|
+
const [hasNextPage, setHasNextPage] = useState(true);
|
|
84334
|
+
const [isInitialLoad, setIsInitialLoad] = useState(true);
|
|
84335
|
+
const abortControllerRef = useRef(null);
|
|
84336
|
+
const isFetchingRef = useRef(false);
|
|
84337
|
+
useEffect(() => {
|
|
84338
|
+
setPages([]);
|
|
84339
|
+
setError(null);
|
|
84340
|
+
setStatus("pending");
|
|
84341
|
+
setHasNextPage(true);
|
|
84342
|
+
setIsInitialLoad(true);
|
|
84343
|
+
isFetchingRef.current = false;
|
|
84344
|
+
}, [queryKey2]);
|
|
84345
|
+
const fetchPage = useCallback(
|
|
84346
|
+
async (pageParam) => {
|
|
84347
|
+
if (isFetchingRef.current) return;
|
|
84348
|
+
isFetchingRef.current = true;
|
|
84349
|
+
setError(null);
|
|
84350
|
+
if (abortControllerRef.current) {
|
|
84351
|
+
abortControllerRef.current.abort();
|
|
84352
|
+
}
|
|
84353
|
+
abortControllerRef.current = new AbortController();
|
|
84660
84354
|
try {
|
|
84661
|
-
result =
|
|
84662
|
-
|
|
84663
|
-
|
|
84664
|
-
if (!transactions) {
|
|
84665
|
-
flush();
|
|
84355
|
+
const result = await queryFn({ pageParam });
|
|
84356
|
+
if (abortControllerRef.current?.signal.aborted) {
|
|
84357
|
+
return;
|
|
84666
84358
|
}
|
|
84667
|
-
|
|
84668
|
-
|
|
84669
|
-
|
|
84670
|
-
/**
|
|
84671
|
-
* All calls to the wrapped function will be batched.
|
|
84672
|
-
*/
|
|
84673
|
-
batchCalls: (callback) => {
|
|
84674
|
-
return (...args) => {
|
|
84675
|
-
schedule2(() => {
|
|
84676
|
-
callback(...args);
|
|
84677
|
-
});
|
|
84678
|
-
};
|
|
84679
|
-
},
|
|
84680
|
-
schedule: schedule2,
|
|
84681
|
-
/**
|
|
84682
|
-
* Use this method to set a custom notify function.
|
|
84683
|
-
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
84684
|
-
*/
|
|
84685
|
-
setNotifyFunction: (fn) => {
|
|
84686
|
-
notifyFn = fn;
|
|
84687
|
-
},
|
|
84688
|
-
/**
|
|
84689
|
-
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
84690
|
-
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
84691
|
-
*/
|
|
84692
|
-
setBatchNotifyFunction: (fn) => {
|
|
84693
|
-
batchNotifyFn = fn;
|
|
84694
|
-
},
|
|
84695
|
-
setScheduler: (fn) => {
|
|
84696
|
-
scheduleFn = fn;
|
|
84697
|
-
}
|
|
84698
|
-
};
|
|
84699
|
-
}
|
|
84700
|
-
var notifyManager = createNotifyManager();
|
|
84701
|
-
var OnlineManager = class extends Subscribable {
|
|
84702
|
-
#online = true;
|
|
84703
|
-
#cleanup;
|
|
84704
|
-
#setup;
|
|
84705
|
-
constructor() {
|
|
84706
|
-
super();
|
|
84707
|
-
this.#setup = (onOnline) => {
|
|
84708
|
-
if (!isServer && window.addEventListener) {
|
|
84709
|
-
const onlineListener = () => onOnline(true);
|
|
84710
|
-
const offlineListener = () => onOnline(false);
|
|
84711
|
-
window.addEventListener("online", onlineListener, false);
|
|
84712
|
-
window.addEventListener("offline", offlineListener, false);
|
|
84713
|
-
return () => {
|
|
84714
|
-
window.removeEventListener("online", onlineListener);
|
|
84715
|
-
window.removeEventListener("offline", offlineListener);
|
|
84716
|
-
};
|
|
84717
|
-
}
|
|
84718
|
-
return;
|
|
84719
|
-
};
|
|
84720
|
-
}
|
|
84721
|
-
onSubscribe() {
|
|
84722
|
-
if (!this.#cleanup) {
|
|
84723
|
-
this.setEventListener(this.#setup);
|
|
84724
|
-
}
|
|
84725
|
-
}
|
|
84726
|
-
onUnsubscribe() {
|
|
84727
|
-
if (!this.hasListeners()) {
|
|
84728
|
-
this.#cleanup?.();
|
|
84729
|
-
this.#cleanup = void 0;
|
|
84730
|
-
}
|
|
84731
|
-
}
|
|
84732
|
-
setEventListener(setup) {
|
|
84733
|
-
this.#setup = setup;
|
|
84734
|
-
this.#cleanup?.();
|
|
84735
|
-
this.#cleanup = setup(this.setOnline.bind(this));
|
|
84736
|
-
}
|
|
84737
|
-
setOnline(online) {
|
|
84738
|
-
const changed = this.#online !== online;
|
|
84739
|
-
if (changed) {
|
|
84740
|
-
this.#online = online;
|
|
84741
|
-
this.listeners.forEach((listener) => {
|
|
84742
|
-
listener(online);
|
|
84743
|
-
});
|
|
84744
|
-
}
|
|
84745
|
-
}
|
|
84746
|
-
isOnline() {
|
|
84747
|
-
return this.#online;
|
|
84748
|
-
}
|
|
84749
|
-
};
|
|
84750
|
-
var onlineManager = new OnlineManager();
|
|
84751
|
-
function canFetch(networkMode) {
|
|
84752
|
-
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
|
|
84753
|
-
}
|
|
84754
|
-
function fetchState(data, options) {
|
|
84755
|
-
return {
|
|
84756
|
-
fetchFailureCount: 0,
|
|
84757
|
-
fetchFailureReason: null,
|
|
84758
|
-
fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused",
|
|
84759
|
-
...data === void 0 && {
|
|
84760
|
-
error: null,
|
|
84761
|
-
status: "pending"
|
|
84762
|
-
}
|
|
84763
|
-
};
|
|
84764
|
-
}
|
|
84765
|
-
var QueryObserver = class extends Subscribable {
|
|
84766
|
-
constructor(client, options) {
|
|
84767
|
-
super();
|
|
84768
|
-
this.options = options;
|
|
84769
|
-
this.#client = client;
|
|
84770
|
-
this.#selectError = null;
|
|
84771
|
-
this.#currentThenable = pendingThenable();
|
|
84772
|
-
this.bindMethods();
|
|
84773
|
-
this.setOptions(options);
|
|
84774
|
-
}
|
|
84775
|
-
#client;
|
|
84776
|
-
#currentQuery = void 0;
|
|
84777
|
-
#currentQueryInitialState = void 0;
|
|
84778
|
-
#currentResult = void 0;
|
|
84779
|
-
#currentResultState;
|
|
84780
|
-
#currentResultOptions;
|
|
84781
|
-
#currentThenable;
|
|
84782
|
-
#selectError;
|
|
84783
|
-
#selectFn;
|
|
84784
|
-
#selectResult;
|
|
84785
|
-
// This property keeps track of the last query with defined data.
|
|
84786
|
-
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
84787
|
-
#lastQueryWithDefinedData;
|
|
84788
|
-
#staleTimeoutId;
|
|
84789
|
-
#refetchIntervalId;
|
|
84790
|
-
#currentRefetchInterval;
|
|
84791
|
-
#trackedProps = /* @__PURE__ */ new Set();
|
|
84792
|
-
bindMethods() {
|
|
84793
|
-
this.refetch = this.refetch.bind(this);
|
|
84794
|
-
}
|
|
84795
|
-
onSubscribe() {
|
|
84796
|
-
if (this.listeners.size === 1) {
|
|
84797
|
-
this.#currentQuery.addObserver(this);
|
|
84798
|
-
if (shouldFetchOnMount(this.#currentQuery, this.options)) {
|
|
84799
|
-
this.#executeFetch();
|
|
84800
|
-
} else {
|
|
84801
|
-
this.updateResult();
|
|
84802
|
-
}
|
|
84803
|
-
this.#updateTimers();
|
|
84804
|
-
}
|
|
84805
|
-
}
|
|
84806
|
-
onUnsubscribe() {
|
|
84807
|
-
if (!this.hasListeners()) {
|
|
84808
|
-
this.destroy();
|
|
84809
|
-
}
|
|
84810
|
-
}
|
|
84811
|
-
shouldFetchOnReconnect() {
|
|
84812
|
-
return shouldFetchOn(
|
|
84813
|
-
this.#currentQuery,
|
|
84814
|
-
this.options,
|
|
84815
|
-
this.options.refetchOnReconnect
|
|
84816
|
-
);
|
|
84817
|
-
}
|
|
84818
|
-
shouldFetchOnWindowFocus() {
|
|
84819
|
-
return shouldFetchOn(
|
|
84820
|
-
this.#currentQuery,
|
|
84821
|
-
this.options,
|
|
84822
|
-
this.options.refetchOnWindowFocus
|
|
84823
|
-
);
|
|
84824
|
-
}
|
|
84825
|
-
destroy() {
|
|
84826
|
-
this.listeners = /* @__PURE__ */ new Set();
|
|
84827
|
-
this.#clearStaleTimeout();
|
|
84828
|
-
this.#clearRefetchInterval();
|
|
84829
|
-
this.#currentQuery.removeObserver(this);
|
|
84830
|
-
}
|
|
84831
|
-
setOptions(options) {
|
|
84832
|
-
const prevOptions = this.options;
|
|
84833
|
-
const prevQuery = this.#currentQuery;
|
|
84834
|
-
this.options = this.#client.defaultQueryOptions(options);
|
|
84835
|
-
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== "boolean") {
|
|
84836
|
-
throw new Error(
|
|
84837
|
-
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
84838
|
-
);
|
|
84839
|
-
}
|
|
84840
|
-
this.#updateQuery();
|
|
84841
|
-
this.#currentQuery.setOptions(this.options);
|
|
84842
|
-
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
|
|
84843
|
-
this.#client.getQueryCache().notify({
|
|
84844
|
-
type: "observerOptionsUpdated",
|
|
84845
|
-
query: this.#currentQuery,
|
|
84846
|
-
observer: this
|
|
84847
|
-
});
|
|
84848
|
-
}
|
|
84849
|
-
const mounted = this.hasListeners();
|
|
84850
|
-
if (mounted && shouldFetchOptionally(
|
|
84851
|
-
this.#currentQuery,
|
|
84852
|
-
prevQuery,
|
|
84853
|
-
this.options,
|
|
84854
|
-
prevOptions
|
|
84855
|
-
)) {
|
|
84856
|
-
this.#executeFetch();
|
|
84857
|
-
}
|
|
84858
|
-
this.updateResult();
|
|
84859
|
-
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || resolveStaleTime(this.options.staleTime, this.#currentQuery) !== resolveStaleTime(prevOptions.staleTime, this.#currentQuery))) {
|
|
84860
|
-
this.#updateStaleTimeout();
|
|
84861
|
-
}
|
|
84862
|
-
const nextRefetchInterval = this.#computeRefetchInterval();
|
|
84863
|
-
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
|
|
84864
|
-
this.#updateRefetchInterval(nextRefetchInterval);
|
|
84865
|
-
}
|
|
84866
|
-
}
|
|
84867
|
-
getOptimisticResult(options) {
|
|
84868
|
-
const query = this.#client.getQueryCache().build(this.#client, options);
|
|
84869
|
-
const result = this.createResult(query, options);
|
|
84870
|
-
if (shouldAssignObserverCurrentProperties(this, result)) {
|
|
84871
|
-
this.#currentResult = result;
|
|
84872
|
-
this.#currentResultOptions = this.options;
|
|
84873
|
-
this.#currentResultState = this.#currentQuery.state;
|
|
84874
|
-
}
|
|
84875
|
-
return result;
|
|
84876
|
-
}
|
|
84877
|
-
getCurrentResult() {
|
|
84878
|
-
return this.#currentResult;
|
|
84879
|
-
}
|
|
84880
|
-
trackResult(result, onPropTracked) {
|
|
84881
|
-
return new Proxy(result, {
|
|
84882
|
-
get: (target, key) => {
|
|
84883
|
-
this.trackProp(key);
|
|
84884
|
-
onPropTracked?.(key);
|
|
84885
|
-
if (key === "promise" && !this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") {
|
|
84886
|
-
this.#currentThenable.reject(
|
|
84887
|
-
new Error(
|
|
84888
|
-
"experimental_prefetchInRender feature flag is not enabled"
|
|
84889
|
-
)
|
|
84359
|
+
setPages((prevPages) => {
|
|
84360
|
+
const pageExists = prevPages.some(
|
|
84361
|
+
(page) => page.page === result.page
|
|
84890
84362
|
);
|
|
84363
|
+
if (pageExists) {
|
|
84364
|
+
return prevPages;
|
|
84365
|
+
}
|
|
84366
|
+
return [...prevPages, result];
|
|
84367
|
+
});
|
|
84368
|
+
setStatus("success");
|
|
84369
|
+
setHasNextPage(result.hasNextPage);
|
|
84370
|
+
if (isInitialLoad) {
|
|
84371
|
+
setIsInitialLoad(false);
|
|
84891
84372
|
}
|
|
84892
|
-
|
|
84893
|
-
|
|
84894
|
-
|
|
84895
|
-
}
|
|
84896
|
-
trackProp(key) {
|
|
84897
|
-
this.#trackedProps.add(key);
|
|
84898
|
-
}
|
|
84899
|
-
getCurrentQuery() {
|
|
84900
|
-
return this.#currentQuery;
|
|
84901
|
-
}
|
|
84902
|
-
refetch({ ...options } = {}) {
|
|
84903
|
-
return this.fetch({
|
|
84904
|
-
...options
|
|
84905
|
-
});
|
|
84906
|
-
}
|
|
84907
|
-
fetchOptimistic(options) {
|
|
84908
|
-
const defaultedOptions = this.#client.defaultQueryOptions(options);
|
|
84909
|
-
const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
|
|
84910
|
-
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
|
84911
|
-
}
|
|
84912
|
-
fetch(fetchOptions) {
|
|
84913
|
-
return this.#executeFetch({
|
|
84914
|
-
...fetchOptions,
|
|
84915
|
-
cancelRefetch: fetchOptions.cancelRefetch ?? true
|
|
84916
|
-
}).then(() => {
|
|
84917
|
-
this.updateResult();
|
|
84918
|
-
return this.#currentResult;
|
|
84919
|
-
});
|
|
84920
|
-
}
|
|
84921
|
-
#executeFetch(fetchOptions) {
|
|
84922
|
-
this.#updateQuery();
|
|
84923
|
-
let promise = this.#currentQuery.fetch(
|
|
84924
|
-
this.options,
|
|
84925
|
-
fetchOptions
|
|
84926
|
-
);
|
|
84927
|
-
if (!fetchOptions?.throwOnError) {
|
|
84928
|
-
promise = promise.catch(noop2);
|
|
84929
|
-
}
|
|
84930
|
-
return promise;
|
|
84931
|
-
}
|
|
84932
|
-
#updateStaleTimeout() {
|
|
84933
|
-
this.#clearStaleTimeout();
|
|
84934
|
-
const staleTime = resolveStaleTime(
|
|
84935
|
-
this.options.staleTime,
|
|
84936
|
-
this.#currentQuery
|
|
84937
|
-
);
|
|
84938
|
-
if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {
|
|
84939
|
-
return;
|
|
84940
|
-
}
|
|
84941
|
-
const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);
|
|
84942
|
-
const timeout2 = time + 1;
|
|
84943
|
-
this.#staleTimeoutId = timeoutManager.setTimeout(() => {
|
|
84944
|
-
if (!this.#currentResult.isStale) {
|
|
84945
|
-
this.updateResult();
|
|
84946
|
-
}
|
|
84947
|
-
}, timeout2);
|
|
84948
|
-
}
|
|
84949
|
-
#computeRefetchInterval() {
|
|
84950
|
-
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
|
|
84951
|
-
}
|
|
84952
|
-
#updateRefetchInterval(nextInterval) {
|
|
84953
|
-
this.#clearRefetchInterval();
|
|
84954
|
-
this.#currentRefetchInterval = nextInterval;
|
|
84955
|
-
if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
|
|
84956
|
-
return;
|
|
84957
|
-
}
|
|
84958
|
-
this.#refetchIntervalId = timeoutManager.setInterval(() => {
|
|
84959
|
-
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
|
|
84960
|
-
this.#executeFetch();
|
|
84961
|
-
}
|
|
84962
|
-
}, this.#currentRefetchInterval);
|
|
84963
|
-
}
|
|
84964
|
-
#updateTimers() {
|
|
84965
|
-
this.#updateStaleTimeout();
|
|
84966
|
-
this.#updateRefetchInterval(this.#computeRefetchInterval());
|
|
84967
|
-
}
|
|
84968
|
-
#clearStaleTimeout() {
|
|
84969
|
-
if (this.#staleTimeoutId) {
|
|
84970
|
-
timeoutManager.clearTimeout(this.#staleTimeoutId);
|
|
84971
|
-
this.#staleTimeoutId = void 0;
|
|
84972
|
-
}
|
|
84973
|
-
}
|
|
84974
|
-
#clearRefetchInterval() {
|
|
84975
|
-
if (this.#refetchIntervalId) {
|
|
84976
|
-
timeoutManager.clearInterval(this.#refetchIntervalId);
|
|
84977
|
-
this.#refetchIntervalId = void 0;
|
|
84978
|
-
}
|
|
84979
|
-
}
|
|
84980
|
-
createResult(query, options) {
|
|
84981
|
-
const prevQuery = this.#currentQuery;
|
|
84982
|
-
const prevOptions = this.options;
|
|
84983
|
-
const prevResult = this.#currentResult;
|
|
84984
|
-
const prevResultState = this.#currentResultState;
|
|
84985
|
-
const prevResultOptions = this.#currentResultOptions;
|
|
84986
|
-
const queryChange = query !== prevQuery;
|
|
84987
|
-
const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
|
|
84988
|
-
const { state } = query;
|
|
84989
|
-
let newState = { ...state };
|
|
84990
|
-
let isPlaceholderData = false;
|
|
84991
|
-
let data;
|
|
84992
|
-
if (options._optimisticResults) {
|
|
84993
|
-
const mounted = this.hasListeners();
|
|
84994
|
-
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
|
84995
|
-
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
|
84996
|
-
if (fetchOnMount || fetchOptionally) {
|
|
84997
|
-
newState = {
|
|
84998
|
-
...newState,
|
|
84999
|
-
...fetchState(state.data, query.options)
|
|
85000
|
-
};
|
|
85001
|
-
}
|
|
85002
|
-
if (options._optimisticResults === "isRestoring") {
|
|
85003
|
-
newState.fetchStatus = "idle";
|
|
85004
|
-
}
|
|
85005
|
-
}
|
|
85006
|
-
let { error: error2, errorUpdatedAt, status } = newState;
|
|
85007
|
-
data = newState.data;
|
|
85008
|
-
let skipSelect = false;
|
|
85009
|
-
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
|
|
85010
|
-
let placeholderData;
|
|
85011
|
-
if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
|
|
85012
|
-
placeholderData = prevResult.data;
|
|
85013
|
-
skipSelect = true;
|
|
85014
|
-
} else {
|
|
85015
|
-
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
|
|
85016
|
-
this.#lastQueryWithDefinedData?.state.data,
|
|
85017
|
-
this.#lastQueryWithDefinedData
|
|
85018
|
-
) : options.placeholderData;
|
|
85019
|
-
}
|
|
85020
|
-
if (placeholderData !== void 0) {
|
|
85021
|
-
status = "success";
|
|
85022
|
-
data = replaceData(
|
|
85023
|
-
prevResult?.data,
|
|
85024
|
-
placeholderData,
|
|
85025
|
-
options
|
|
85026
|
-
);
|
|
85027
|
-
isPlaceholderData = true;
|
|
85028
|
-
}
|
|
85029
|
-
}
|
|
85030
|
-
if (options.select && data !== void 0 && !skipSelect) {
|
|
85031
|
-
if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {
|
|
85032
|
-
data = this.#selectResult;
|
|
85033
|
-
} else {
|
|
85034
|
-
try {
|
|
85035
|
-
this.#selectFn = options.select;
|
|
85036
|
-
data = options.select(data);
|
|
85037
|
-
data = replaceData(prevResult?.data, data, options);
|
|
85038
|
-
this.#selectResult = data;
|
|
85039
|
-
this.#selectError = null;
|
|
85040
|
-
} catch (selectError) {
|
|
85041
|
-
this.#selectError = selectError;
|
|
85042
|
-
}
|
|
85043
|
-
}
|
|
85044
|
-
}
|
|
85045
|
-
if (this.#selectError) {
|
|
85046
|
-
error2 = this.#selectError;
|
|
85047
|
-
data = this.#selectResult;
|
|
85048
|
-
errorUpdatedAt = Date.now();
|
|
85049
|
-
status = "error";
|
|
85050
|
-
}
|
|
85051
|
-
const isFetching = newState.fetchStatus === "fetching";
|
|
85052
|
-
const isPending = status === "pending";
|
|
85053
|
-
const isError = status === "error";
|
|
85054
|
-
const isLoading = isPending && isFetching;
|
|
85055
|
-
const hasData = data !== void 0;
|
|
85056
|
-
const result = {
|
|
85057
|
-
status,
|
|
85058
|
-
fetchStatus: newState.fetchStatus,
|
|
85059
|
-
isPending,
|
|
85060
|
-
isSuccess: status === "success",
|
|
85061
|
-
isError,
|
|
85062
|
-
isInitialLoading: isLoading,
|
|
85063
|
-
isLoading,
|
|
85064
|
-
data,
|
|
85065
|
-
dataUpdatedAt: newState.dataUpdatedAt,
|
|
85066
|
-
error: error2,
|
|
85067
|
-
errorUpdatedAt,
|
|
85068
|
-
failureCount: newState.fetchFailureCount,
|
|
85069
|
-
failureReason: newState.fetchFailureReason,
|
|
85070
|
-
errorUpdateCount: newState.errorUpdateCount,
|
|
85071
|
-
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
|
|
85072
|
-
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
85073
|
-
isFetching,
|
|
85074
|
-
isRefetching: isFetching && !isPending,
|
|
85075
|
-
isLoadingError: isError && !hasData,
|
|
85076
|
-
isPaused: newState.fetchStatus === "paused",
|
|
85077
|
-
isPlaceholderData,
|
|
85078
|
-
isRefetchError: isError && hasData,
|
|
85079
|
-
isStale: isStale(query, options),
|
|
85080
|
-
refetch: this.refetch,
|
|
85081
|
-
promise: this.#currentThenable,
|
|
85082
|
-
isEnabled: resolveEnabled(options.enabled, query) !== false
|
|
85083
|
-
};
|
|
85084
|
-
const nextResult = result;
|
|
85085
|
-
if (this.options.experimental_prefetchInRender) {
|
|
85086
|
-
const finalizeThenableIfPossible = (thenable) => {
|
|
85087
|
-
if (nextResult.status === "error") {
|
|
85088
|
-
thenable.reject(nextResult.error);
|
|
85089
|
-
} else if (nextResult.data !== void 0) {
|
|
85090
|
-
thenable.resolve(nextResult.data);
|
|
84373
|
+
} catch (error_) {
|
|
84374
|
+
if (abortControllerRef.current?.signal.aborted) {
|
|
84375
|
+
return;
|
|
85091
84376
|
}
|
|
85092
|
-
|
|
85093
|
-
|
|
85094
|
-
|
|
85095
|
-
|
|
85096
|
-
|
|
85097
|
-
|
|
85098
|
-
switch (prevThenable.status) {
|
|
85099
|
-
case "pending":
|
|
85100
|
-
if (query.queryHash === prevQuery.queryHash) {
|
|
85101
|
-
finalizeThenableIfPossible(prevThenable);
|
|
85102
|
-
}
|
|
85103
|
-
break;
|
|
85104
|
-
case "fulfilled":
|
|
85105
|
-
if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
|
|
85106
|
-
recreateThenable();
|
|
85107
|
-
}
|
|
85108
|
-
break;
|
|
85109
|
-
case "rejected":
|
|
85110
|
-
if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
|
|
85111
|
-
recreateThenable();
|
|
85112
|
-
}
|
|
85113
|
-
break;
|
|
85114
|
-
}
|
|
85115
|
-
}
|
|
85116
|
-
return nextResult;
|
|
85117
|
-
}
|
|
85118
|
-
updateResult() {
|
|
85119
|
-
const prevResult = this.#currentResult;
|
|
85120
|
-
const nextResult = this.createResult(this.#currentQuery, this.options);
|
|
85121
|
-
this.#currentResultState = this.#currentQuery.state;
|
|
85122
|
-
this.#currentResultOptions = this.options;
|
|
85123
|
-
if (this.#currentResultState.data !== void 0) {
|
|
85124
|
-
this.#lastQueryWithDefinedData = this.#currentQuery;
|
|
85125
|
-
}
|
|
85126
|
-
if (shallowEqualObjects(nextResult, prevResult)) {
|
|
85127
|
-
return;
|
|
85128
|
-
}
|
|
85129
|
-
this.#currentResult = nextResult;
|
|
85130
|
-
const shouldNotifyListeners = () => {
|
|
85131
|
-
if (!prevResult) {
|
|
85132
|
-
return true;
|
|
85133
|
-
}
|
|
85134
|
-
const { notifyOnChangeProps } = this.options;
|
|
85135
|
-
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
|
85136
|
-
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
|
|
85137
|
-
return true;
|
|
85138
|
-
}
|
|
85139
|
-
const includedProps = new Set(
|
|
85140
|
-
notifyOnChangePropsValue ?? this.#trackedProps
|
|
85141
|
-
);
|
|
85142
|
-
if (this.options.throwOnError) {
|
|
85143
|
-
includedProps.add("error");
|
|
84377
|
+
const error22 = error_ instanceof Error ? error_ : new Error("Unknown error occurred");
|
|
84378
|
+
setError(error22);
|
|
84379
|
+
setStatus("error");
|
|
84380
|
+
} finally {
|
|
84381
|
+
isFetchingRef.current = false;
|
|
84382
|
+
setIsFetchingNextPage(false);
|
|
85144
84383
|
}
|
|
85145
|
-
|
|
85146
|
-
|
|
85147
|
-
|
|
85148
|
-
|
|
85149
|
-
|
|
85150
|
-
|
|
85151
|
-
|
|
85152
|
-
|
|
85153
|
-
|
|
85154
|
-
|
|
85155
|
-
if (query === this.#currentQuery) {
|
|
84384
|
+
},
|
|
84385
|
+
[queryFn, isInitialLoad]
|
|
84386
|
+
);
|
|
84387
|
+
const fetchNextPage = useCallback(() => {
|
|
84388
|
+
if (isFetchingRef.current || !hasNextPage) return;
|
|
84389
|
+
const lastPage = pages.at(-1);
|
|
84390
|
+
if (!lastPage) return;
|
|
84391
|
+
const nextPageParam = getNextPageParam(lastPage);
|
|
84392
|
+
if (nextPageParam === void 0) {
|
|
84393
|
+
setHasNextPage(false);
|
|
85156
84394
|
return;
|
|
85157
84395
|
}
|
|
85158
|
-
|
|
85159
|
-
|
|
85160
|
-
|
|
85161
|
-
|
|
85162
|
-
|
|
85163
|
-
|
|
85164
|
-
}
|
|
85165
|
-
}
|
|
85166
|
-
onQueryUpdate() {
|
|
85167
|
-
this.updateResult();
|
|
85168
|
-
if (this.hasListeners()) {
|
|
85169
|
-
this.#updateTimers();
|
|
85170
|
-
}
|
|
85171
|
-
}
|
|
85172
|
-
#notify(notifyOptions) {
|
|
85173
|
-
notifyManager.batch(() => {
|
|
85174
|
-
if (notifyOptions.listeners) {
|
|
85175
|
-
this.listeners.forEach((listener) => {
|
|
85176
|
-
listener(this.#currentResult);
|
|
85177
|
-
});
|
|
85178
|
-
}
|
|
85179
|
-
this.#client.getQueryCache().notify({
|
|
85180
|
-
query: this.#currentQuery,
|
|
85181
|
-
type: "observerResultsUpdated"
|
|
85182
|
-
});
|
|
85183
|
-
});
|
|
85184
|
-
}
|
|
85185
|
-
};
|
|
85186
|
-
function shouldLoadOnMount(query, options) {
|
|
85187
|
-
return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
|
|
85188
|
-
}
|
|
85189
|
-
function shouldFetchOnMount(query, options) {
|
|
85190
|
-
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
|
85191
|
-
}
|
|
85192
|
-
function shouldFetchOn(query, options, field) {
|
|
85193
|
-
if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
|
|
85194
|
-
const value2 = typeof field === "function" ? field(query) : field;
|
|
85195
|
-
return value2 === "always" || value2 !== false && isStale(query, options);
|
|
85196
|
-
}
|
|
85197
|
-
return false;
|
|
85198
|
-
}
|
|
85199
|
-
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
|
85200
|
-
return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
|
85201
|
-
}
|
|
85202
|
-
function isStale(query, options) {
|
|
85203
|
-
return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
|
|
85204
|
-
}
|
|
85205
|
-
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
85206
|
-
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
|
|
85207
|
-
return true;
|
|
85208
|
-
}
|
|
85209
|
-
return false;
|
|
85210
|
-
}
|
|
85211
|
-
function infiniteQueryBehavior(pages) {
|
|
85212
|
-
return {
|
|
85213
|
-
onFetch: (context, query) => {
|
|
85214
|
-
const options = context.options;
|
|
85215
|
-
const direction = context.fetchOptions?.meta?.fetchMore?.direction;
|
|
85216
|
-
const oldPages = context.state.data?.pages || [];
|
|
85217
|
-
const oldPageParams = context.state.data?.pageParams || [];
|
|
85218
|
-
let result = { pages: [], pageParams: [] };
|
|
85219
|
-
let currentPage = 0;
|
|
85220
|
-
const fetchFn = async () => {
|
|
85221
|
-
let cancelled = false;
|
|
85222
|
-
const addSignalProperty = (object4) => {
|
|
85223
|
-
Object.defineProperty(object4, "signal", {
|
|
85224
|
-
enumerable: true,
|
|
85225
|
-
get: () => {
|
|
85226
|
-
if (context.signal.aborted) {
|
|
85227
|
-
cancelled = true;
|
|
85228
|
-
} else {
|
|
85229
|
-
context.signal.addEventListener("abort", () => {
|
|
85230
|
-
cancelled = true;
|
|
85231
|
-
});
|
|
85232
|
-
}
|
|
85233
|
-
return context.signal;
|
|
85234
|
-
}
|
|
85235
|
-
});
|
|
85236
|
-
};
|
|
85237
|
-
const queryFn = ensureQueryFn(context.options, context.fetchOptions);
|
|
85238
|
-
const fetchPage = async (data, param, previous2) => {
|
|
85239
|
-
if (cancelled) {
|
|
85240
|
-
return Promise.reject();
|
|
85241
|
-
}
|
|
85242
|
-
if (param == null && data.pages.length) {
|
|
85243
|
-
return Promise.resolve(data);
|
|
85244
|
-
}
|
|
85245
|
-
const createQueryFnContext = () => {
|
|
85246
|
-
const queryFnContext2 = {
|
|
85247
|
-
client: context.client,
|
|
85248
|
-
queryKey: context.queryKey,
|
|
85249
|
-
pageParam: param,
|
|
85250
|
-
direction: previous2 ? "backward" : "forward",
|
|
85251
|
-
meta: context.options.meta
|
|
85252
|
-
};
|
|
85253
|
-
addSignalProperty(queryFnContext2);
|
|
85254
|
-
return queryFnContext2;
|
|
85255
|
-
};
|
|
85256
|
-
const queryFnContext = createQueryFnContext();
|
|
85257
|
-
const page = await queryFn(queryFnContext);
|
|
85258
|
-
const { maxPages } = context.options;
|
|
85259
|
-
const addTo = previous2 ? addToStart : addToEnd;
|
|
85260
|
-
return {
|
|
85261
|
-
pages: addTo(data.pages, page, maxPages),
|
|
85262
|
-
pageParams: addTo(data.pageParams, param, maxPages)
|
|
85263
|
-
};
|
|
85264
|
-
};
|
|
85265
|
-
if (direction && oldPages.length) {
|
|
85266
|
-
const previous2 = direction === "backward";
|
|
85267
|
-
const pageParamFn = previous2 ? getPreviousPageParam : getNextPageParam;
|
|
85268
|
-
const oldData = {
|
|
85269
|
-
pages: oldPages,
|
|
85270
|
-
pageParams: oldPageParams
|
|
85271
|
-
};
|
|
85272
|
-
const param = pageParamFn(options, oldData);
|
|
85273
|
-
result = await fetchPage(oldData, param, previous2);
|
|
85274
|
-
} else {
|
|
85275
|
-
const remainingPages = oldPages.length;
|
|
85276
|
-
do {
|
|
85277
|
-
const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
|
|
85278
|
-
if (currentPage > 0 && param == null) {
|
|
85279
|
-
break;
|
|
85280
|
-
}
|
|
85281
|
-
result = await fetchPage(result, param);
|
|
85282
|
-
currentPage++;
|
|
85283
|
-
} while (currentPage < remainingPages);
|
|
85284
|
-
}
|
|
85285
|
-
return result;
|
|
85286
|
-
};
|
|
85287
|
-
if (context.options.persister) {
|
|
85288
|
-
context.fetchFn = () => {
|
|
85289
|
-
return context.options.persister?.(
|
|
85290
|
-
fetchFn,
|
|
85291
|
-
{
|
|
85292
|
-
client: context.client,
|
|
85293
|
-
queryKey: context.queryKey,
|
|
85294
|
-
meta: context.options.meta,
|
|
85295
|
-
signal: context.signal
|
|
85296
|
-
},
|
|
85297
|
-
query
|
|
85298
|
-
);
|
|
85299
|
-
};
|
|
85300
|
-
} else {
|
|
85301
|
-
context.fetchFn = fetchFn;
|
|
85302
|
-
}
|
|
84396
|
+
setIsFetchingNextPage(true);
|
|
84397
|
+
fetchPage(nextPageParam);
|
|
84398
|
+
}, [pages, hasNextPage, getNextPageParam, fetchPage]);
|
|
84399
|
+
useEffect(() => {
|
|
84400
|
+
if (isInitialLoad && pages.length === 0) {
|
|
84401
|
+
fetchPage(initialPageParam);
|
|
85303
84402
|
}
|
|
85304
|
-
};
|
|
85305
|
-
|
|
85306
|
-
|
|
85307
|
-
|
|
85308
|
-
|
|
85309
|
-
pages[lastIndex],
|
|
85310
|
-
pages,
|
|
85311
|
-
pageParams[lastIndex],
|
|
85312
|
-
pageParams
|
|
85313
|
-
) : void 0;
|
|
85314
|
-
}
|
|
85315
|
-
function getPreviousPageParam(options, { pages, pageParams }) {
|
|
85316
|
-
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
85317
|
-
}
|
|
85318
|
-
function hasNextPage(options, data) {
|
|
85319
|
-
if (!data) return false;
|
|
85320
|
-
return getNextPageParam(options, data) != null;
|
|
85321
|
-
}
|
|
85322
|
-
function hasPreviousPage(options, data) {
|
|
85323
|
-
if (!data || !options.getPreviousPageParam) return false;
|
|
85324
|
-
return getPreviousPageParam(options, data) != null;
|
|
85325
|
-
}
|
|
85326
|
-
var InfiniteQueryObserver = class extends QueryObserver {
|
|
85327
|
-
constructor(client, options) {
|
|
85328
|
-
super(client, options);
|
|
85329
|
-
}
|
|
85330
|
-
bindMethods() {
|
|
85331
|
-
super.bindMethods();
|
|
85332
|
-
this.fetchNextPage = this.fetchNextPage.bind(this);
|
|
85333
|
-
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
|
|
85334
|
-
}
|
|
85335
|
-
setOptions(options) {
|
|
85336
|
-
super.setOptions({
|
|
85337
|
-
...options,
|
|
85338
|
-
behavior: infiniteQueryBehavior()
|
|
85339
|
-
});
|
|
85340
|
-
}
|
|
85341
|
-
getOptimisticResult(options) {
|
|
85342
|
-
options.behavior = infiniteQueryBehavior();
|
|
85343
|
-
return super.getOptimisticResult(options);
|
|
85344
|
-
}
|
|
85345
|
-
fetchNextPage(options) {
|
|
85346
|
-
return this.fetch({
|
|
85347
|
-
...options,
|
|
85348
|
-
meta: {
|
|
85349
|
-
fetchMore: { direction: "forward" }
|
|
85350
|
-
}
|
|
85351
|
-
});
|
|
85352
|
-
}
|
|
85353
|
-
fetchPreviousPage(options) {
|
|
85354
|
-
return this.fetch({
|
|
85355
|
-
...options,
|
|
85356
|
-
meta: {
|
|
85357
|
-
fetchMore: { direction: "backward" }
|
|
84403
|
+
}, [isInitialLoad, pages.length, fetchPage, initialPageParam]);
|
|
84404
|
+
useEffect(() => {
|
|
84405
|
+
return () => {
|
|
84406
|
+
if (abortControllerRef.current) {
|
|
84407
|
+
abortControllerRef.current.abort();
|
|
85358
84408
|
}
|
|
85359
|
-
});
|
|
85360
|
-
}
|
|
85361
|
-
createResult(query, options) {
|
|
85362
|
-
const { state } = query;
|
|
85363
|
-
const parentResult = super.createResult(query, options);
|
|
85364
|
-
const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
|
|
85365
|
-
const fetchDirection = state.fetchMeta?.fetchMore?.direction;
|
|
85366
|
-
const isFetchNextPageError = isError && fetchDirection === "forward";
|
|
85367
|
-
const isFetchingNextPage = isFetching && fetchDirection === "forward";
|
|
85368
|
-
const isFetchPreviousPageError = isError && fetchDirection === "backward";
|
|
85369
|
-
const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
|
|
85370
|
-
const result = {
|
|
85371
|
-
...parentResult,
|
|
85372
|
-
fetchNextPage: this.fetchNextPage,
|
|
85373
|
-
fetchPreviousPage: this.fetchPreviousPage,
|
|
85374
|
-
hasNextPage: hasNextPage(options, state.data),
|
|
85375
|
-
hasPreviousPage: hasPreviousPage(options, state.data),
|
|
85376
|
-
isFetchNextPageError,
|
|
85377
|
-
isFetchingNextPage,
|
|
85378
|
-
isFetchPreviousPageError,
|
|
85379
|
-
isFetchingPreviousPage,
|
|
85380
|
-
isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
|
|
85381
|
-
isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
|
|
85382
84409
|
};
|
|
85383
|
-
|
|
85384
|
-
}
|
|
85385
|
-
};
|
|
85386
|
-
var QueryClientContext = React.createContext(
|
|
85387
|
-
void 0
|
|
85388
|
-
);
|
|
85389
|
-
var useQueryClient = (queryClient) => {
|
|
85390
|
-
const client = React.useContext(QueryClientContext);
|
|
85391
|
-
if (!client) {
|
|
85392
|
-
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
85393
|
-
}
|
|
85394
|
-
return client;
|
|
85395
|
-
};
|
|
85396
|
-
var IsRestoringContext = React.createContext(false);
|
|
85397
|
-
var useIsRestoring = () => React.useContext(IsRestoringContext);
|
|
85398
|
-
IsRestoringContext.Provider;
|
|
85399
|
-
function createValue() {
|
|
85400
|
-
let isReset = false;
|
|
84410
|
+
}, []);
|
|
85401
84411
|
return {
|
|
85402
|
-
|
|
85403
|
-
|
|
85404
|
-
|
|
85405
|
-
|
|
85406
|
-
|
|
85407
|
-
|
|
85408
|
-
isReset: () => {
|
|
85409
|
-
return isReset;
|
|
85410
|
-
}
|
|
84412
|
+
data: pages.length > 0 ? { pages } : void 0,
|
|
84413
|
+
error: error2,
|
|
84414
|
+
fetchNextPage,
|
|
84415
|
+
hasNextPage,
|
|
84416
|
+
isFetchingNextPage,
|
|
84417
|
+
status
|
|
85411
84418
|
};
|
|
85412
|
-
}
|
|
85413
|
-
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
|
85414
|
-
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
85415
|
-
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
85416
|
-
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
85417
|
-
if (!errorResetBoundary.isReset()) {
|
|
85418
|
-
options.retryOnMount = false;
|
|
85419
|
-
}
|
|
85420
|
-
}
|
|
85421
|
-
};
|
|
85422
|
-
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
85423
|
-
React.useEffect(() => {
|
|
85424
|
-
errorResetBoundary.clearReset();
|
|
85425
|
-
}, [errorResetBoundary]);
|
|
85426
|
-
};
|
|
85427
|
-
var getHasError = ({
|
|
85428
|
-
result,
|
|
85429
|
-
errorResetBoundary,
|
|
85430
|
-
throwOnError,
|
|
85431
|
-
query,
|
|
85432
|
-
suspense
|
|
85433
|
-
}) => {
|
|
85434
|
-
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
85435
|
-
};
|
|
85436
|
-
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
85437
|
-
if (defaultedOptions.suspense) {
|
|
85438
|
-
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
85439
|
-
const clamp = (value2) => value2 === "static" ? value2 : Math.max(value2 ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
|
85440
|
-
const originalStaleTime = defaultedOptions.staleTime;
|
|
85441
|
-
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
|
85442
|
-
if (typeof defaultedOptions.gcTime === "number") {
|
|
85443
|
-
defaultedOptions.gcTime = Math.max(
|
|
85444
|
-
defaultedOptions.gcTime,
|
|
85445
|
-
MIN_SUSPENSE_TIME_MS
|
|
85446
|
-
);
|
|
85447
|
-
}
|
|
85448
|
-
}
|
|
85449
84419
|
};
|
|
85450
|
-
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
|
85451
|
-
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
|
|
85452
|
-
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
|
85453
|
-
errorResetBoundary.clearReset();
|
|
85454
|
-
});
|
|
85455
|
-
function useBaseQuery(options, Observer, queryClient) {
|
|
85456
|
-
if (process.env.NODE_ENV !== "production") {
|
|
85457
|
-
if (typeof options !== "object" || Array.isArray(options)) {
|
|
85458
|
-
throw new Error(
|
|
85459
|
-
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
85460
|
-
);
|
|
85461
|
-
}
|
|
85462
|
-
}
|
|
85463
|
-
const isRestoring = useIsRestoring();
|
|
85464
|
-
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
85465
|
-
const client = useQueryClient();
|
|
85466
|
-
const defaultedOptions = client.defaultQueryOptions(options);
|
|
85467
|
-
client.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
85468
|
-
defaultedOptions
|
|
85469
|
-
);
|
|
85470
|
-
if (process.env.NODE_ENV !== "production") {
|
|
85471
|
-
if (!defaultedOptions.queryFn) {
|
|
85472
|
-
console.error(
|
|
85473
|
-
`[${defaultedOptions.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
85474
|
-
);
|
|
85475
|
-
}
|
|
85476
|
-
}
|
|
85477
|
-
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
|
85478
|
-
ensureSuspenseTimers(defaultedOptions);
|
|
85479
|
-
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
|
|
85480
|
-
useClearResetErrorBoundary(errorResetBoundary);
|
|
85481
|
-
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
|
85482
|
-
const [observer] = React.useState(
|
|
85483
|
-
() => new Observer(
|
|
85484
|
-
client,
|
|
85485
|
-
defaultedOptions
|
|
85486
|
-
)
|
|
85487
|
-
);
|
|
85488
|
-
const result = observer.getOptimisticResult(defaultedOptions);
|
|
85489
|
-
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
|
85490
|
-
React.useSyncExternalStore(
|
|
85491
|
-
React.useCallback(
|
|
85492
|
-
(onStoreChange) => {
|
|
85493
|
-
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop2;
|
|
85494
|
-
observer.updateResult();
|
|
85495
|
-
return unsubscribe;
|
|
85496
|
-
},
|
|
85497
|
-
[observer, shouldSubscribe]
|
|
85498
|
-
),
|
|
85499
|
-
() => observer.getCurrentResult(),
|
|
85500
|
-
() => observer.getCurrentResult()
|
|
85501
|
-
);
|
|
85502
|
-
React.useEffect(() => {
|
|
85503
|
-
observer.setOptions(defaultedOptions);
|
|
85504
|
-
}, [defaultedOptions, observer]);
|
|
85505
|
-
if (shouldSuspend(defaultedOptions, result)) {
|
|
85506
|
-
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
85507
|
-
}
|
|
85508
|
-
if (getHasError({
|
|
85509
|
-
result,
|
|
85510
|
-
errorResetBoundary,
|
|
85511
|
-
throwOnError: defaultedOptions.throwOnError,
|
|
85512
|
-
query: client.getQueryCache().get(defaultedOptions.queryHash),
|
|
85513
|
-
suspense: defaultedOptions.suspense
|
|
85514
|
-
})) {
|
|
85515
|
-
throw result.error;
|
|
85516
|
-
}
|
|
85517
|
-
client.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
85518
|
-
defaultedOptions,
|
|
85519
|
-
result
|
|
85520
|
-
);
|
|
85521
|
-
if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {
|
|
85522
|
-
const promise = isNewCacheEntry ? (
|
|
85523
|
-
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
85524
|
-
fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
|
|
85525
|
-
) : (
|
|
85526
|
-
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
85527
|
-
client.getQueryCache().get(defaultedOptions.queryHash)?.promise
|
|
85528
|
-
);
|
|
85529
|
-
promise?.catch(noop2).finally(() => {
|
|
85530
|
-
observer.updateResult();
|
|
85531
|
-
});
|
|
85532
|
-
}
|
|
85533
|
-
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
85534
|
-
}
|
|
85535
|
-
function useInfiniteQuery(options, queryClient) {
|
|
85536
|
-
return useBaseQuery(
|
|
85537
|
-
options,
|
|
85538
|
-
InfiniteQueryObserver
|
|
85539
|
-
);
|
|
85540
|
-
}
|
|
85541
84420
|
const ResizableTitle = (props) => {
|
|
85542
84421
|
const { onResize: onResize2, width, ...restProps } = props;
|
|
85543
84422
|
if (!width || !onResize2) {
|
|
@@ -85581,12 +84460,11 @@ const ResizableTitle = (props) => {
|
|
|
85581
84460
|
] });
|
|
85582
84461
|
};
|
|
85583
84462
|
const InfiniteScrollTable = ({
|
|
85584
|
-
instanceId,
|
|
85585
84463
|
columns: initialColumns,
|
|
85586
84464
|
fetchService,
|
|
85587
|
-
title,
|
|
85588
84465
|
scrollHeight = 600,
|
|
85589
|
-
scrollWidth = 1300
|
|
84466
|
+
scrollWidth = 1300,
|
|
84467
|
+
onChange
|
|
85590
84468
|
}) => {
|
|
85591
84469
|
const observer = useRef();
|
|
85592
84470
|
const [scrollableNode, setScrollableNode] = useState(
|
|
@@ -85602,7 +84480,7 @@ const InfiniteScrollTable = ({
|
|
|
85602
84480
|
data,
|
|
85603
84481
|
error: error2,
|
|
85604
84482
|
fetchNextPage,
|
|
85605
|
-
hasNextPage
|
|
84483
|
+
hasNextPage,
|
|
85606
84484
|
isFetchingNextPage,
|
|
85607
84485
|
status
|
|
85608
84486
|
} = useInfiniteQuery({
|
|
@@ -85632,7 +84510,7 @@ const InfiniteScrollTable = ({
|
|
|
85632
84510
|
if (observer.current) observer.current.disconnect();
|
|
85633
84511
|
observer.current = new IntersectionObserver(
|
|
85634
84512
|
(entries) => {
|
|
85635
|
-
if (entries[0].isIntersecting &&
|
|
84513
|
+
if (entries[0].isIntersecting && hasNextPage) {
|
|
85636
84514
|
fetchNextPage();
|
|
85637
84515
|
}
|
|
85638
84516
|
},
|
|
@@ -85640,10 +84518,21 @@ const InfiniteScrollTable = ({
|
|
|
85640
84518
|
);
|
|
85641
84519
|
if (node2) observer.current.observe(node2);
|
|
85642
84520
|
},
|
|
85643
|
-
[isFetchingNextPage,
|
|
84521
|
+
[isFetchingNextPage, hasNextPage, fetchNextPage, scrollableNode]
|
|
85644
84522
|
);
|
|
85645
84523
|
const dataSource = data?.pages.flatMap((page) => page.docs) ?? [];
|
|
85646
84524
|
const totalDocs = data?.pages?.[0]?.totalDocs ?? 0;
|
|
84525
|
+
useEffect(() => {
|
|
84526
|
+
if (onChange) {
|
|
84527
|
+
const dataChangeEvent = {
|
|
84528
|
+
totalPages: data?.pages?.length ?? 0,
|
|
84529
|
+
currentPage: data?.pages?.[0]?.page ?? 0,
|
|
84530
|
+
resultsShown: dataSource.length,
|
|
84531
|
+
totalResults: totalDocs
|
|
84532
|
+
};
|
|
84533
|
+
onChange(dataChangeEvent);
|
|
84534
|
+
}
|
|
84535
|
+
}, [data]);
|
|
85647
84536
|
if (status === "pending") {
|
|
85648
84537
|
return /* @__PURE__ */ jsx(
|
|
85649
84538
|
"div",
|
|
@@ -85676,34 +84565,6 @@ const InfiniteScrollTable = ({
|
|
|
85676
84565
|
},
|
|
85677
84566
|
ref: tableContainerRef,
|
|
85678
84567
|
children: [
|
|
85679
|
-
/* @__PURE__ */ jsxs(
|
|
85680
|
-
Typography$1.Title,
|
|
85681
|
-
{
|
|
85682
|
-
level: 2,
|
|
85683
|
-
style: { marginBottom: "24px", textAlign: "center" },
|
|
85684
|
-
children: [
|
|
85685
|
-
title,
|
|
85686
|
-
" (Table ",
|
|
85687
|
-
instanceId,
|
|
85688
|
-
")"
|
|
85689
|
-
]
|
|
85690
|
-
}
|
|
85691
|
-
),
|
|
85692
|
-
/* @__PURE__ */ jsx(
|
|
85693
|
-
Alert,
|
|
85694
|
-
{
|
|
85695
|
-
message: /* @__PURE__ */ jsxs(Typography$1.Text, { children: [
|
|
85696
|
-
"Showing ",
|
|
85697
|
-
/* @__PURE__ */ jsx("strong", { children: dataSource.length }),
|
|
85698
|
-
" of",
|
|
85699
|
-
" ",
|
|
85700
|
-
/* @__PURE__ */ jsx("strong", { children: totalDocs }),
|
|
85701
|
-
" total launches"
|
|
85702
|
-
] }),
|
|
85703
|
-
type: "info",
|
|
85704
|
-
style: { marginBottom: "16px", textAlign: "center" }
|
|
85705
|
-
}
|
|
85706
|
-
),
|
|
85707
84568
|
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
85708
84569
|
/* @__PURE__ */ jsx("style", { children: `
|
|
85709
84570
|
.infinite-scroll-table .ant-pagination {
|
|
@@ -85751,7 +84612,7 @@ const InfiniteScrollTable = ({
|
|
|
85751
84612
|
}
|
|
85752
84613
|
)
|
|
85753
84614
|
] }),
|
|
85754
|
-
!
|
|
84615
|
+
!hasNextPage && /* @__PURE__ */ jsx(
|
|
85755
84616
|
"div",
|
|
85756
84617
|
{
|
|
85757
84618
|
style: {
|
|
@@ -85759,7 +84620,7 @@ const InfiniteScrollTable = ({
|
|
|
85759
84620
|
padding: "20px",
|
|
85760
84621
|
borderTop: "1px solid #f0f0f0"
|
|
85761
84622
|
},
|
|
85762
|
-
children: /* @__PURE__ */ jsx(Typography$1.Text, { type: "secondary", children: "
|
|
84623
|
+
children: /* @__PURE__ */ jsx(Typography$1.Text, { type: "secondary", children: "No more rows to load." })
|
|
85763
84624
|
}
|
|
85764
84625
|
)
|
|
85765
84626
|
]
|
|
@@ -86423,7 +85284,8 @@ const GroupsRow = ({ groups, onGroupItemClick }) => {
|
|
|
86423
85284
|
const SecondaryTableControlsRow = ({
|
|
86424
85285
|
groups,
|
|
86425
85286
|
totalRecords,
|
|
86426
|
-
onChange
|
|
85287
|
+
onChange,
|
|
85288
|
+
infiniteScrollData
|
|
86427
85289
|
}) => {
|
|
86428
85290
|
const onGroupItemClick = (title, item) => {
|
|
86429
85291
|
const groupItemClickEvent = {
|
|
@@ -86443,7 +85305,8 @@ const SecondaryTableControlsRow = ({
|
|
|
86443
85305
|
},
|
|
86444
85306
|
children: [
|
|
86445
85307
|
/* @__PURE__ */ jsx(GroupsRow, { groups, onGroupItemClick }),
|
|
86446
|
-
(totalRecords ?? 0) > 0 ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null
|
|
85308
|
+
(totalRecords ?? 0) > 0 && !infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `${totalRecords} results` }) : null,
|
|
85309
|
+
infiniteScrollData ? /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "#6C6C6C", children: `Loaded ${infiniteScrollData.resultsShown} of ${infiniteScrollData.totalResults} Results` }) : null
|
|
86447
85310
|
]
|
|
86448
85311
|
}
|
|
86449
85312
|
);
|
|
@@ -86478,7 +85341,8 @@ const TableControls = ({
|
|
|
86478
85341
|
{
|
|
86479
85342
|
groups: secondaryTableRowData.groups,
|
|
86480
85343
|
totalRecords: secondaryTableRowData.totalRecords,
|
|
86481
|
-
onChange: onSecondaryChange
|
|
85344
|
+
onChange: onSecondaryChange,
|
|
85345
|
+
infiniteScrollData: secondaryTableRowData.infiniteScrollData
|
|
86482
85346
|
}
|
|
86483
85347
|
) : null
|
|
86484
85348
|
] });
|
|
@@ -86487,10 +85351,22 @@ const TableWithControls = ({
|
|
|
86487
85351
|
tableData,
|
|
86488
85352
|
tableControlsData: tableControlsData2,
|
|
86489
85353
|
onChange,
|
|
86490
|
-
onRowClick
|
|
85354
|
+
onRowClick,
|
|
85355
|
+
tableType = "table",
|
|
85356
|
+
isInfiniteScroll,
|
|
85357
|
+
// Deprecated: use tableType instead
|
|
85358
|
+
infiniteScrollConfig,
|
|
85359
|
+
paginationStyle
|
|
86491
85360
|
}) => {
|
|
85361
|
+
const [infiniteScrollData, setInfiniteScrollData] = useState({
|
|
85362
|
+
totalPages: 0,
|
|
85363
|
+
currentPage: 0,
|
|
85364
|
+
resultsShown: 0,
|
|
85365
|
+
totalResults: 0
|
|
85366
|
+
});
|
|
86492
85367
|
const { primaryTableRowData, secondaryTableRowData } = tableControlsData2;
|
|
86493
85368
|
const { dataSource, columns, rowSelection, hasSettings, hasFilter } = tableData;
|
|
85369
|
+
const actualTableType = isInfiniteScroll ? "infiniteScroll" : tableType;
|
|
86494
85370
|
const onTableControlsChange = (event) => {
|
|
86495
85371
|
onChange(event);
|
|
86496
85372
|
};
|
|
@@ -86500,6 +85376,67 @@ const TableWithControls = ({
|
|
|
86500
85376
|
payload: { value: "tableChange", pagination, filters, sorter }
|
|
86501
85377
|
});
|
|
86502
85378
|
};
|
|
85379
|
+
const onInfiniteScrollTableChange = (event) => {
|
|
85380
|
+
onChange({
|
|
85381
|
+
event: "infiniteScrollTableChange",
|
|
85382
|
+
payload: { value: "infiniteScrollTableChange", event }
|
|
85383
|
+
});
|
|
85384
|
+
};
|
|
85385
|
+
const renderTable = () => {
|
|
85386
|
+
switch (actualTableType) {
|
|
85387
|
+
case "infiniteScroll": {
|
|
85388
|
+
if (!infiniteScrollConfig) {
|
|
85389
|
+
console.warn("InfiniteScrollTable requires infiniteScrollConfig");
|
|
85390
|
+
return null;
|
|
85391
|
+
}
|
|
85392
|
+
const resizableColumns = columns.map((col) => ({
|
|
85393
|
+
title: col.title,
|
|
85394
|
+
key: col.key,
|
|
85395
|
+
dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
|
|
85396
|
+
width: col.width || 150,
|
|
85397
|
+
render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
|
|
85398
|
+
}));
|
|
85399
|
+
return /* @__PURE__ */ jsx(
|
|
85400
|
+
InfiniteScrollTable,
|
|
85401
|
+
{
|
|
85402
|
+
instanceId: infiniteScrollConfig.instanceId,
|
|
85403
|
+
columns: resizableColumns,
|
|
85404
|
+
fetchService: infiniteScrollConfig.fetchService,
|
|
85405
|
+
title: infiniteScrollConfig.title,
|
|
85406
|
+
scrollHeight: infiniteScrollConfig.scrollHeight,
|
|
85407
|
+
scrollWidth: infiniteScrollConfig.scrollWidth,
|
|
85408
|
+
onChange: onInfiniteScrollTableChange
|
|
85409
|
+
}
|
|
85410
|
+
);
|
|
85411
|
+
}
|
|
85412
|
+
case "pagination": {
|
|
85413
|
+
return /* @__PURE__ */ jsx(
|
|
85414
|
+
TablePagination,
|
|
85415
|
+
{
|
|
85416
|
+
dataSource,
|
|
85417
|
+
columns,
|
|
85418
|
+
rowSelection,
|
|
85419
|
+
onChange: onTableChange,
|
|
85420
|
+
onRowClick,
|
|
85421
|
+
paginationStyle
|
|
85422
|
+
}
|
|
85423
|
+
);
|
|
85424
|
+
}
|
|
85425
|
+
case "table":
|
|
85426
|
+
default: {
|
|
85427
|
+
return /* @__PURE__ */ jsx(
|
|
85428
|
+
Table,
|
|
85429
|
+
{
|
|
85430
|
+
dataSource,
|
|
85431
|
+
columns,
|
|
85432
|
+
rowSelection,
|
|
85433
|
+
onChange: onTableChange,
|
|
85434
|
+
onRowClick
|
|
85435
|
+
}
|
|
85436
|
+
);
|
|
85437
|
+
}
|
|
85438
|
+
}
|
|
85439
|
+
};
|
|
86503
85440
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
86504
85441
|
/* @__PURE__ */ jsx(
|
|
86505
85442
|
TableControls,
|
|
@@ -86509,18 +85446,854 @@ const TableWithControls = ({
|
|
|
86509
85446
|
onChange: onTableControlsChange
|
|
86510
85447
|
}
|
|
86511
85448
|
),
|
|
86512
|
-
|
|
86513
|
-
Table,
|
|
86514
|
-
{
|
|
86515
|
-
dataSource,
|
|
86516
|
-
columns,
|
|
86517
|
-
rowSelection,
|
|
86518
|
-
onChange: onTableChange,
|
|
86519
|
-
onRowClick
|
|
86520
|
-
}
|
|
86521
|
-
)
|
|
85449
|
+
renderTable()
|
|
86522
85450
|
] });
|
|
86523
85451
|
};
|
|
85452
|
+
const staticTableData = [
|
|
85453
|
+
{
|
|
85454
|
+
id: "1",
|
|
85455
|
+
number: "1",
|
|
85456
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
85457
|
+
status: "in_progress",
|
|
85458
|
+
address: {
|
|
85459
|
+
nickname: "Home",
|
|
85460
|
+
address: "123 Main St"
|
|
85461
|
+
},
|
|
85462
|
+
job_subtype: "delivery",
|
|
85463
|
+
progress: {
|
|
85464
|
+
firstBarData: {
|
|
85465
|
+
text: "Loading",
|
|
85466
|
+
status: "info",
|
|
85467
|
+
value: 100
|
|
85468
|
+
},
|
|
85469
|
+
secondBarData: {
|
|
85470
|
+
text: "Processing",
|
|
85471
|
+
status: "success",
|
|
85472
|
+
value: 25
|
|
85473
|
+
}
|
|
85474
|
+
}
|
|
85475
|
+
},
|
|
85476
|
+
{
|
|
85477
|
+
id: "2",
|
|
85478
|
+
number: "2",
|
|
85479
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
85480
|
+
status: "scheduled",
|
|
85481
|
+
address: {
|
|
85482
|
+
nickname: "Work",
|
|
85483
|
+
address: "456 Elm St"
|
|
85484
|
+
},
|
|
85485
|
+
job_subtype: "pickup",
|
|
85486
|
+
progress: {
|
|
85487
|
+
firstBarData: {
|
|
85488
|
+
text: "Preparing",
|
|
85489
|
+
status: "info",
|
|
85490
|
+
value: 100
|
|
85491
|
+
},
|
|
85492
|
+
secondBarData: {
|
|
85493
|
+
text: "Final Check",
|
|
85494
|
+
status: "success",
|
|
85495
|
+
value: 0
|
|
85496
|
+
}
|
|
85497
|
+
}
|
|
85498
|
+
},
|
|
85499
|
+
{
|
|
85500
|
+
id: "3",
|
|
85501
|
+
number: "3",
|
|
85502
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
85503
|
+
status: "scheduled",
|
|
85504
|
+
address: {
|
|
85505
|
+
nickname: "Store",
|
|
85506
|
+
address: "789 Oak St"
|
|
85507
|
+
},
|
|
85508
|
+
job_subtype: "delivery",
|
|
85509
|
+
progress: {
|
|
85510
|
+
firstBarData: {
|
|
85511
|
+
text: "Pending",
|
|
85512
|
+
status: "info",
|
|
85513
|
+
value: 0
|
|
85514
|
+
},
|
|
85515
|
+
secondBarData: {
|
|
85516
|
+
text: "Awaiting",
|
|
85517
|
+
status: "success",
|
|
85518
|
+
value: 0
|
|
85519
|
+
}
|
|
85520
|
+
}
|
|
85521
|
+
},
|
|
85522
|
+
{
|
|
85523
|
+
id: "4",
|
|
85524
|
+
number: "4",
|
|
85525
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
85526
|
+
status: "scheduled",
|
|
85527
|
+
address: {
|
|
85528
|
+
nickname: "Office",
|
|
85529
|
+
address: "321 Pine St"
|
|
85530
|
+
},
|
|
85531
|
+
job_subtype: "pickup",
|
|
85532
|
+
progress: {
|
|
85533
|
+
firstBarData: {
|
|
85534
|
+
text: "In Progress",
|
|
85535
|
+
status: "info",
|
|
85536
|
+
value: 100
|
|
85537
|
+
},
|
|
85538
|
+
secondBarData: {
|
|
85539
|
+
text: "Validation",
|
|
85540
|
+
status: "success",
|
|
85541
|
+
value: 30
|
|
85542
|
+
}
|
|
85543
|
+
}
|
|
85544
|
+
},
|
|
85545
|
+
{
|
|
85546
|
+
id: "5",
|
|
85547
|
+
number: "5",
|
|
85548
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
85549
|
+
status: "scheduled",
|
|
85550
|
+
address: {
|
|
85551
|
+
nickname: "Library",
|
|
85552
|
+
address: "555 Book Lane"
|
|
85553
|
+
},
|
|
85554
|
+
job_subtype: "delivery",
|
|
85555
|
+
progress: {
|
|
85556
|
+
firstBarData: {
|
|
85557
|
+
text: "Completed",
|
|
85558
|
+
status: "info",
|
|
85559
|
+
value: 100
|
|
85560
|
+
},
|
|
85561
|
+
secondBarData: {
|
|
85562
|
+
text: "Verified",
|
|
85563
|
+
status: "success",
|
|
85564
|
+
value: 100
|
|
85565
|
+
}
|
|
85566
|
+
}
|
|
85567
|
+
},
|
|
85568
|
+
{
|
|
85569
|
+
id: "6",
|
|
85570
|
+
number: "6",
|
|
85571
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
85572
|
+
status: "scheduled",
|
|
85573
|
+
address: {
|
|
85574
|
+
nickname: "Gym",
|
|
85575
|
+
address: "777 Fitness Ave"
|
|
85576
|
+
},
|
|
85577
|
+
job_subtype: "pickup",
|
|
85578
|
+
progress: {
|
|
85579
|
+
firstBarData: {
|
|
85580
|
+
text: "Phase 1",
|
|
85581
|
+
status: "info",
|
|
85582
|
+
value: 75
|
|
85583
|
+
},
|
|
85584
|
+
secondBarData: {
|
|
85585
|
+
text: "Phase 2",
|
|
85586
|
+
status: "success",
|
|
85587
|
+
value: 50
|
|
85588
|
+
}
|
|
85589
|
+
}
|
|
85590
|
+
},
|
|
85591
|
+
{
|
|
85592
|
+
id: "7",
|
|
85593
|
+
number: "7",
|
|
85594
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
85595
|
+
status: "scheduled",
|
|
85596
|
+
address: {
|
|
85597
|
+
nickname: "Mall",
|
|
85598
|
+
address: "888 Shopping Center"
|
|
85599
|
+
},
|
|
85600
|
+
job_subtype: "delivery",
|
|
85601
|
+
progress: {
|
|
85602
|
+
firstBarData: {
|
|
85603
|
+
text: "Queued",
|
|
85604
|
+
status: "info",
|
|
85605
|
+
value: 0
|
|
85606
|
+
},
|
|
85607
|
+
secondBarData: {
|
|
85608
|
+
text: "Waiting",
|
|
85609
|
+
status: "success",
|
|
85610
|
+
value: 0
|
|
85611
|
+
}
|
|
85612
|
+
}
|
|
85613
|
+
},
|
|
85614
|
+
{
|
|
85615
|
+
id: "8",
|
|
85616
|
+
number: "8",
|
|
85617
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
85618
|
+
status: "completed",
|
|
85619
|
+
address: {
|
|
85620
|
+
nickname: "School",
|
|
85621
|
+
address: "999 Education Rd"
|
|
85622
|
+
},
|
|
85623
|
+
job_subtype: "pickup",
|
|
85624
|
+
progress: {
|
|
85625
|
+
firstBarData: {
|
|
85626
|
+
text: "Delivered",
|
|
85627
|
+
status: "info",
|
|
85628
|
+
value: 100
|
|
85629
|
+
},
|
|
85630
|
+
secondBarData: {
|
|
85631
|
+
text: "Confirmed",
|
|
85632
|
+
status: "success",
|
|
85633
|
+
value: 100
|
|
85634
|
+
}
|
|
85635
|
+
}
|
|
85636
|
+
},
|
|
85637
|
+
{
|
|
85638
|
+
id: "9",
|
|
85639
|
+
number: "9",
|
|
85640
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
85641
|
+
status: "scheduled",
|
|
85642
|
+
address: {
|
|
85643
|
+
nickname: "Restaurant",
|
|
85644
|
+
address: "111 Food Court"
|
|
85645
|
+
},
|
|
85646
|
+
job_subtype: "delivery",
|
|
85647
|
+
progress: {
|
|
85648
|
+
firstBarData: {
|
|
85649
|
+
text: "Preparing",
|
|
85650
|
+
status: "info",
|
|
85651
|
+
value: 100
|
|
85652
|
+
},
|
|
85653
|
+
secondBarData: {
|
|
85654
|
+
text: "Quality Check",
|
|
85655
|
+
status: "success",
|
|
85656
|
+
value: 15
|
|
85657
|
+
}
|
|
85658
|
+
}
|
|
85659
|
+
},
|
|
85660
|
+
{
|
|
85661
|
+
id: "10",
|
|
85662
|
+
number: "10",
|
|
85663
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
85664
|
+
status: "scheduled",
|
|
85665
|
+
address: {
|
|
85666
|
+
nickname: "Park",
|
|
85667
|
+
address: "222 Green Ave"
|
|
85668
|
+
},
|
|
85669
|
+
job_subtype: "pickup",
|
|
85670
|
+
progress: {
|
|
85671
|
+
firstBarData: {
|
|
85672
|
+
text: "Processing",
|
|
85673
|
+
status: "info",
|
|
85674
|
+
value: 80
|
|
85675
|
+
},
|
|
85676
|
+
secondBarData: {
|
|
85677
|
+
text: "Review",
|
|
85678
|
+
status: "success",
|
|
85679
|
+
value: 0
|
|
85680
|
+
}
|
|
85681
|
+
}
|
|
85682
|
+
},
|
|
85683
|
+
{
|
|
85684
|
+
id: "11",
|
|
85685
|
+
number: "11",
|
|
85686
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
85687
|
+
status: "scheduled",
|
|
85688
|
+
address: {
|
|
85689
|
+
nickname: "Beach",
|
|
85690
|
+
address: "333 Shore Dr"
|
|
85691
|
+
},
|
|
85692
|
+
job_subtype: "delivery",
|
|
85693
|
+
progress: {
|
|
85694
|
+
firstBarData: {
|
|
85695
|
+
text: "Planning",
|
|
85696
|
+
status: "info",
|
|
85697
|
+
value: 40
|
|
85698
|
+
},
|
|
85699
|
+
secondBarData: {
|
|
85700
|
+
text: "Route Check",
|
|
85701
|
+
status: "success",
|
|
85702
|
+
value: 20
|
|
85703
|
+
}
|
|
85704
|
+
}
|
|
85705
|
+
},
|
|
85706
|
+
{
|
|
85707
|
+
id: "12",
|
|
85708
|
+
number: "12",
|
|
85709
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
85710
|
+
status: "scheduled",
|
|
85711
|
+
address: {
|
|
85712
|
+
nickname: "Hotel",
|
|
85713
|
+
address: "444 Stay Blvd"
|
|
85714
|
+
},
|
|
85715
|
+
job_subtype: "pickup",
|
|
85716
|
+
progress: {
|
|
85717
|
+
firstBarData: {
|
|
85718
|
+
text: "Scheduled",
|
|
85719
|
+
status: "info",
|
|
85720
|
+
value: 0
|
|
85721
|
+
},
|
|
85722
|
+
secondBarData: {
|
|
85723
|
+
text: "Awaiting",
|
|
85724
|
+
status: "success",
|
|
85725
|
+
value: 0
|
|
85726
|
+
}
|
|
85727
|
+
}
|
|
85728
|
+
},
|
|
85729
|
+
{
|
|
85730
|
+
id: "13",
|
|
85731
|
+
number: "13",
|
|
85732
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
85733
|
+
status: "scheduled",
|
|
85734
|
+
address: {
|
|
85735
|
+
nickname: "Airport",
|
|
85736
|
+
address: "666 Flight Way"
|
|
85737
|
+
},
|
|
85738
|
+
job_subtype: "delivery",
|
|
85739
|
+
progress: {
|
|
85740
|
+
firstBarData: {
|
|
85741
|
+
text: "Pre-flight",
|
|
85742
|
+
status: "info",
|
|
85743
|
+
value: 60
|
|
85744
|
+
},
|
|
85745
|
+
secondBarData: {
|
|
85746
|
+
text: "Security",
|
|
85747
|
+
status: "success",
|
|
85748
|
+
value: 30
|
|
85749
|
+
}
|
|
85750
|
+
}
|
|
85751
|
+
},
|
|
85752
|
+
{
|
|
85753
|
+
id: "14",
|
|
85754
|
+
number: "14",
|
|
85755
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
85756
|
+
status: "cancelled",
|
|
85757
|
+
address: {
|
|
85758
|
+
nickname: "Stadium",
|
|
85759
|
+
address: "777 Sports Complex"
|
|
85760
|
+
},
|
|
85761
|
+
job_subtype: "pickup",
|
|
85762
|
+
progress: {
|
|
85763
|
+
firstBarData: {
|
|
85764
|
+
text: "Cancelled",
|
|
85765
|
+
status: "info",
|
|
85766
|
+
value: 0
|
|
85767
|
+
},
|
|
85768
|
+
secondBarData: {
|
|
85769
|
+
text: "Refund",
|
|
85770
|
+
status: "success",
|
|
85771
|
+
value: 100
|
|
85772
|
+
}
|
|
85773
|
+
}
|
|
85774
|
+
},
|
|
85775
|
+
{
|
|
85776
|
+
id: "15",
|
|
85777
|
+
number: "15",
|
|
85778
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
85779
|
+
status: "scheduled",
|
|
85780
|
+
address: {
|
|
85781
|
+
nickname: "Theater",
|
|
85782
|
+
address: "888 Show Ave"
|
|
85783
|
+
},
|
|
85784
|
+
job_subtype: "delivery",
|
|
85785
|
+
progress: {
|
|
85786
|
+
firstBarData: {
|
|
85787
|
+
text: "Setup",
|
|
85788
|
+
status: "info",
|
|
85789
|
+
value: 25
|
|
85790
|
+
},
|
|
85791
|
+
secondBarData: {
|
|
85792
|
+
text: "Sound Check",
|
|
85793
|
+
status: "success",
|
|
85794
|
+
value: 0
|
|
85795
|
+
}
|
|
85796
|
+
}
|
|
85797
|
+
},
|
|
85798
|
+
{
|
|
85799
|
+
id: "16",
|
|
85800
|
+
number: "16",
|
|
85801
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
85802
|
+
status: "scheduled",
|
|
85803
|
+
address: {
|
|
85804
|
+
nickname: "Museum",
|
|
85805
|
+
address: "999 History Lane"
|
|
85806
|
+
},
|
|
85807
|
+
job_subtype: "pickup",
|
|
85808
|
+
progress: {
|
|
85809
|
+
firstBarData: {
|
|
85810
|
+
text: "Exhibit Prep",
|
|
85811
|
+
status: "info",
|
|
85812
|
+
value: 70
|
|
85813
|
+
},
|
|
85814
|
+
secondBarData: {
|
|
85815
|
+
text: "Documentation",
|
|
85816
|
+
status: "success",
|
|
85817
|
+
value: 45
|
|
85818
|
+
}
|
|
85819
|
+
}
|
|
85820
|
+
},
|
|
85821
|
+
{
|
|
85822
|
+
id: "17",
|
|
85823
|
+
number: "17",
|
|
85824
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
85825
|
+
status: "scheduled",
|
|
85826
|
+
address: {
|
|
85827
|
+
nickname: "Zoo",
|
|
85828
|
+
address: "123 Animal Park"
|
|
85829
|
+
},
|
|
85830
|
+
job_subtype: "delivery",
|
|
85831
|
+
progress: {
|
|
85832
|
+
firstBarData: {
|
|
85833
|
+
text: "Animal Care",
|
|
85834
|
+
status: "info",
|
|
85835
|
+
value: 85
|
|
85836
|
+
},
|
|
85837
|
+
secondBarData: {
|
|
85838
|
+
text: "Feeding",
|
|
85839
|
+
status: "success",
|
|
85840
|
+
value: 90
|
|
85841
|
+
}
|
|
85842
|
+
}
|
|
85843
|
+
},
|
|
85844
|
+
{
|
|
85845
|
+
id: "18",
|
|
85846
|
+
number: "18",
|
|
85847
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
85848
|
+
status: "scheduled",
|
|
85849
|
+
address: {
|
|
85850
|
+
nickname: "Bank",
|
|
85851
|
+
address: "456 Money St"
|
|
85852
|
+
},
|
|
85853
|
+
job_subtype: "pickup",
|
|
85854
|
+
progress: {
|
|
85855
|
+
firstBarData: {
|
|
85856
|
+
text: "Transaction",
|
|
85857
|
+
status: "info",
|
|
85858
|
+
value: 50
|
|
85859
|
+
},
|
|
85860
|
+
secondBarData: {
|
|
85861
|
+
text: "Verification",
|
|
85862
|
+
status: "success",
|
|
85863
|
+
value: 25
|
|
85864
|
+
}
|
|
85865
|
+
}
|
|
85866
|
+
},
|
|
85867
|
+
{
|
|
85868
|
+
id: "19",
|
|
85869
|
+
number: "19",
|
|
85870
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
85871
|
+
status: "scheduled",
|
|
85872
|
+
address: {
|
|
85873
|
+
nickname: "Post Office",
|
|
85874
|
+
address: "789 Mail Road"
|
|
85875
|
+
},
|
|
85876
|
+
job_subtype: "delivery",
|
|
85877
|
+
progress: {
|
|
85878
|
+
firstBarData: {
|
|
85879
|
+
text: "Sorting",
|
|
85880
|
+
status: "info",
|
|
85881
|
+
value: 100
|
|
85882
|
+
},
|
|
85883
|
+
secondBarData: {
|
|
85884
|
+
text: "Dispatch",
|
|
85885
|
+
status: "success",
|
|
85886
|
+
value: 75
|
|
85887
|
+
}
|
|
85888
|
+
}
|
|
85889
|
+
},
|
|
85890
|
+
{
|
|
85891
|
+
id: "20",
|
|
85892
|
+
number: "20",
|
|
85893
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
85894
|
+
status: "scheduled",
|
|
85895
|
+
address: {
|
|
85896
|
+
nickname: "Church",
|
|
85897
|
+
address: "321 Faith Street"
|
|
85898
|
+
},
|
|
85899
|
+
job_subtype: "pickup",
|
|
85900
|
+
progress: {
|
|
85901
|
+
firstBarData: {
|
|
85902
|
+
text: "Service Prep",
|
|
85903
|
+
status: "info",
|
|
85904
|
+
value: 30
|
|
85905
|
+
},
|
|
85906
|
+
secondBarData: {
|
|
85907
|
+
text: "Community",
|
|
85908
|
+
status: "success",
|
|
85909
|
+
value: 10
|
|
85910
|
+
}
|
|
85911
|
+
}
|
|
85912
|
+
},
|
|
85913
|
+
{
|
|
85914
|
+
id: "21",
|
|
85915
|
+
number: "21",
|
|
85916
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
85917
|
+
status: "scheduled",
|
|
85918
|
+
address: {
|
|
85919
|
+
nickname: "Pharmacy",
|
|
85920
|
+
address: "654 Health Ave"
|
|
85921
|
+
},
|
|
85922
|
+
job_subtype: "delivery",
|
|
85923
|
+
progress: {
|
|
85924
|
+
firstBarData: {
|
|
85925
|
+
text: "Prescription",
|
|
85926
|
+
status: "info",
|
|
85927
|
+
value: 90
|
|
85928
|
+
},
|
|
85929
|
+
secondBarData: {
|
|
85930
|
+
text: "Quality Check",
|
|
85931
|
+
status: "success",
|
|
85932
|
+
value: 60
|
|
85933
|
+
}
|
|
85934
|
+
}
|
|
85935
|
+
},
|
|
85936
|
+
{
|
|
85937
|
+
id: "22",
|
|
85938
|
+
number: "22",
|
|
85939
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
85940
|
+
status: "scheduled",
|
|
85941
|
+
address: {
|
|
85942
|
+
nickname: "Office Complex",
|
|
85943
|
+
street: "789 Business Ave",
|
|
85944
|
+
city: "Commerce City",
|
|
85945
|
+
state: "CA",
|
|
85946
|
+
zip: "90210"
|
|
85947
|
+
},
|
|
85948
|
+
job_subtype: "delivery",
|
|
85949
|
+
progress: {
|
|
85950
|
+
currentStep: 1,
|
|
85951
|
+
totalSteps: 4,
|
|
85952
|
+
steps: {
|
|
85953
|
+
pickup: {
|
|
85954
|
+
text: "Pickup Scheduled",
|
|
85955
|
+
status: "pending",
|
|
85956
|
+
value: 25
|
|
85957
|
+
},
|
|
85958
|
+
transit: {
|
|
85959
|
+
text: "In Transit",
|
|
85960
|
+
status: "pending",
|
|
85961
|
+
value: 0
|
|
85962
|
+
},
|
|
85963
|
+
delivery: {
|
|
85964
|
+
text: "Delivery",
|
|
85965
|
+
status: "pending",
|
|
85966
|
+
value: 0
|
|
85967
|
+
},
|
|
85968
|
+
quality: {
|
|
85969
|
+
text: "Quality Check",
|
|
85970
|
+
status: "pending",
|
|
85971
|
+
value: 0
|
|
85972
|
+
}
|
|
85973
|
+
}
|
|
85974
|
+
}
|
|
85975
|
+
},
|
|
85976
|
+
{
|
|
85977
|
+
id: "23",
|
|
85978
|
+
number: "23",
|
|
85979
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
85980
|
+
status: "completed",
|
|
85981
|
+
address: {
|
|
85982
|
+
nickname: "Retail Store",
|
|
85983
|
+
street: "456 Shopping St",
|
|
85984
|
+
city: "Retail Town",
|
|
85985
|
+
state: "CA",
|
|
85986
|
+
zip: "90211"
|
|
85987
|
+
},
|
|
85988
|
+
job_subtype: "delivery",
|
|
85989
|
+
progress: {
|
|
85990
|
+
currentStep: 4,
|
|
85991
|
+
totalSteps: 4,
|
|
85992
|
+
steps: {
|
|
85993
|
+
pickup: {
|
|
85994
|
+
text: "Pickup Complete",
|
|
85995
|
+
status: "success",
|
|
85996
|
+
value: 100
|
|
85997
|
+
},
|
|
85998
|
+
transit: {
|
|
85999
|
+
text: "Transit Complete",
|
|
86000
|
+
status: "success",
|
|
86001
|
+
value: 100
|
|
86002
|
+
},
|
|
86003
|
+
delivery: {
|
|
86004
|
+
text: "Delivery Complete",
|
|
86005
|
+
status: "success",
|
|
86006
|
+
value: 100
|
|
86007
|
+
},
|
|
86008
|
+
quality: {
|
|
86009
|
+
text: "Quality Check Complete",
|
|
86010
|
+
status: "success",
|
|
86011
|
+
value: 100
|
|
86012
|
+
}
|
|
86013
|
+
}
|
|
86014
|
+
}
|
|
86015
|
+
},
|
|
86016
|
+
{
|
|
86017
|
+
id: "24",
|
|
86018
|
+
number: "24",
|
|
86019
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
86020
|
+
status: "in_progress",
|
|
86021
|
+
address: {
|
|
86022
|
+
nickname: "Warehouse",
|
|
86023
|
+
street: "321 Storage Blvd",
|
|
86024
|
+
city: "Storage City",
|
|
86025
|
+
state: "CA",
|
|
86026
|
+
zip: "90212"
|
|
86027
|
+
},
|
|
86028
|
+
job_subtype: "delivery",
|
|
86029
|
+
progress: {
|
|
86030
|
+
currentStep: 2,
|
|
86031
|
+
totalSteps: 4,
|
|
86032
|
+
steps: {
|
|
86033
|
+
pickup: {
|
|
86034
|
+
text: "Pickup Complete",
|
|
86035
|
+
status: "success",
|
|
86036
|
+
value: 100
|
|
86037
|
+
},
|
|
86038
|
+
transit: {
|
|
86039
|
+
text: "In Transit",
|
|
86040
|
+
status: "active",
|
|
86041
|
+
value: 50
|
|
86042
|
+
},
|
|
86043
|
+
delivery: {
|
|
86044
|
+
text: "Delivery",
|
|
86045
|
+
status: "pending",
|
|
86046
|
+
value: 0
|
|
86047
|
+
},
|
|
86048
|
+
quality: {
|
|
86049
|
+
text: "Quality Check",
|
|
86050
|
+
status: "pending",
|
|
86051
|
+
value: 0
|
|
86052
|
+
}
|
|
86053
|
+
}
|
|
86054
|
+
}
|
|
86055
|
+
},
|
|
86056
|
+
{
|
|
86057
|
+
id: "25",
|
|
86058
|
+
number: "25",
|
|
86059
|
+
timerange: "5:00 PM - 6:00 PM",
|
|
86060
|
+
status: "cancelled",
|
|
86061
|
+
address: {
|
|
86062
|
+
nickname: "Canceled Location",
|
|
86063
|
+
street: "999 Cancel St",
|
|
86064
|
+
city: "Cancel City",
|
|
86065
|
+
state: "CA",
|
|
86066
|
+
zip: "90213"
|
|
86067
|
+
},
|
|
86068
|
+
job_subtype: "pickup",
|
|
86069
|
+
progress: {
|
|
86070
|
+
currentStep: 1,
|
|
86071
|
+
totalSteps: 4,
|
|
86072
|
+
steps: {
|
|
86073
|
+
pickup: {
|
|
86074
|
+
text: "Pickup Cancelled",
|
|
86075
|
+
status: "error",
|
|
86076
|
+
value: 0
|
|
86077
|
+
},
|
|
86078
|
+
transit: {
|
|
86079
|
+
text: "In Transit",
|
|
86080
|
+
status: "pending",
|
|
86081
|
+
value: 0
|
|
86082
|
+
},
|
|
86083
|
+
delivery: {
|
|
86084
|
+
text: "Delivery",
|
|
86085
|
+
status: "pending",
|
|
86086
|
+
value: 0
|
|
86087
|
+
},
|
|
86088
|
+
quality: {
|
|
86089
|
+
text: "Quality Check",
|
|
86090
|
+
status: "pending",
|
|
86091
|
+
value: 0
|
|
86092
|
+
}
|
|
86093
|
+
}
|
|
86094
|
+
}
|
|
86095
|
+
},
|
|
86096
|
+
{
|
|
86097
|
+
id: "26",
|
|
86098
|
+
number: "26",
|
|
86099
|
+
timerange: "6:00 PM - 7:00 PM",
|
|
86100
|
+
status: "scheduled",
|
|
86101
|
+
address: {
|
|
86102
|
+
nickname: "Evening Delivery",
|
|
86103
|
+
street: "555 Evening Ave",
|
|
86104
|
+
city: "Evening City",
|
|
86105
|
+
state: "CA",
|
|
86106
|
+
zip: "90214"
|
|
86107
|
+
},
|
|
86108
|
+
job_subtype: "delivery",
|
|
86109
|
+
progress: {
|
|
86110
|
+
currentStep: 1,
|
|
86111
|
+
totalSteps: 4,
|
|
86112
|
+
steps: {
|
|
86113
|
+
pickup: {
|
|
86114
|
+
text: "Pickup Scheduled",
|
|
86115
|
+
status: "pending",
|
|
86116
|
+
value: 25
|
|
86117
|
+
},
|
|
86118
|
+
transit: {
|
|
86119
|
+
text: "In Transit",
|
|
86120
|
+
status: "pending",
|
|
86121
|
+
value: 0
|
|
86122
|
+
},
|
|
86123
|
+
delivery: {
|
|
86124
|
+
text: "Delivery",
|
|
86125
|
+
status: "pending",
|
|
86126
|
+
value: 0
|
|
86127
|
+
},
|
|
86128
|
+
quality: {
|
|
86129
|
+
text: "Quality Check",
|
|
86130
|
+
status: "pending",
|
|
86131
|
+
value: 0
|
|
86132
|
+
}
|
|
86133
|
+
}
|
|
86134
|
+
}
|
|
86135
|
+
},
|
|
86136
|
+
{
|
|
86137
|
+
id: "27",
|
|
86138
|
+
number: "27",
|
|
86139
|
+
timerange: "7:00 PM - 8:00 PM",
|
|
86140
|
+
status: "in_progress",
|
|
86141
|
+
address: {
|
|
86142
|
+
nickname: "Night Shift",
|
|
86143
|
+
street: "777 Night St",
|
|
86144
|
+
city: "Night City",
|
|
86145
|
+
state: "CA",
|
|
86146
|
+
zip: "90215"
|
|
86147
|
+
},
|
|
86148
|
+
job_subtype: "delivery",
|
|
86149
|
+
progress: {
|
|
86150
|
+
currentStep: 3,
|
|
86151
|
+
totalSteps: 4,
|
|
86152
|
+
steps: {
|
|
86153
|
+
pickup: {
|
|
86154
|
+
text: "Pickup Complete",
|
|
86155
|
+
status: "success",
|
|
86156
|
+
value: 100
|
|
86157
|
+
},
|
|
86158
|
+
transit: {
|
|
86159
|
+
text: "Transit Complete",
|
|
86160
|
+
status: "success",
|
|
86161
|
+
value: 100
|
|
86162
|
+
},
|
|
86163
|
+
delivery: {
|
|
86164
|
+
text: "Delivery in Progress",
|
|
86165
|
+
status: "active",
|
|
86166
|
+
value: 75
|
|
86167
|
+
},
|
|
86168
|
+
quality: {
|
|
86169
|
+
text: "Quality Check",
|
|
86170
|
+
status: "pending",
|
|
86171
|
+
value: 0
|
|
86172
|
+
}
|
|
86173
|
+
}
|
|
86174
|
+
}
|
|
86175
|
+
},
|
|
86176
|
+
{
|
|
86177
|
+
id: "28",
|
|
86178
|
+
number: "28",
|
|
86179
|
+
timerange: "8:00 PM - 9:00 PM",
|
|
86180
|
+
status: "completed",
|
|
86181
|
+
address: {
|
|
86182
|
+
nickname: "Final Delivery",
|
|
86183
|
+
street: "888 Final Blvd",
|
|
86184
|
+
city: "Final City",
|
|
86185
|
+
state: "CA",
|
|
86186
|
+
zip: "90216"
|
|
86187
|
+
},
|
|
86188
|
+
job_subtype: "delivery",
|
|
86189
|
+
progress: {
|
|
86190
|
+
currentStep: 4,
|
|
86191
|
+
totalSteps: 4,
|
|
86192
|
+
steps: {
|
|
86193
|
+
pickup: {
|
|
86194
|
+
text: "Pickup Complete",
|
|
86195
|
+
status: "success",
|
|
86196
|
+
value: 100
|
|
86197
|
+
},
|
|
86198
|
+
transit: {
|
|
86199
|
+
text: "Transit Complete",
|
|
86200
|
+
status: "success",
|
|
86201
|
+
value: 100
|
|
86202
|
+
},
|
|
86203
|
+
delivery: {
|
|
86204
|
+
text: "Delivery Complete",
|
|
86205
|
+
status: "success",
|
|
86206
|
+
value: 100
|
|
86207
|
+
},
|
|
86208
|
+
quality: {
|
|
86209
|
+
text: "Quality Check Complete",
|
|
86210
|
+
status: "success",
|
|
86211
|
+
value: 100
|
|
86212
|
+
}
|
|
86213
|
+
}
|
|
86214
|
+
}
|
|
86215
|
+
},
|
|
86216
|
+
{
|
|
86217
|
+
id: "29",
|
|
86218
|
+
number: "29",
|
|
86219
|
+
timerange: "9:00 PM - 10:00 PM",
|
|
86220
|
+
status: "scheduled",
|
|
86221
|
+
address: {
|
|
86222
|
+
nickname: "Late Night",
|
|
86223
|
+
street: "999 Late St",
|
|
86224
|
+
city: "Late City",
|
|
86225
|
+
state: "CA",
|
|
86226
|
+
zip: "90217"
|
|
86227
|
+
},
|
|
86228
|
+
job_subtype: "delivery",
|
|
86229
|
+
progress: {
|
|
86230
|
+
currentStep: 1,
|
|
86231
|
+
totalSteps: 4,
|
|
86232
|
+
steps: {
|
|
86233
|
+
pickup: {
|
|
86234
|
+
text: "Pickup Scheduled",
|
|
86235
|
+
status: "pending",
|
|
86236
|
+
value: 25
|
|
86237
|
+
},
|
|
86238
|
+
transit: {
|
|
86239
|
+
text: "In Transit",
|
|
86240
|
+
status: "pending",
|
|
86241
|
+
value: 0
|
|
86242
|
+
},
|
|
86243
|
+
delivery: {
|
|
86244
|
+
text: "Delivery",
|
|
86245
|
+
status: "pending",
|
|
86246
|
+
value: 0
|
|
86247
|
+
},
|
|
86248
|
+
quality: {
|
|
86249
|
+
text: "Quality Check",
|
|
86250
|
+
status: "pending",
|
|
86251
|
+
value: 0
|
|
86252
|
+
}
|
|
86253
|
+
}
|
|
86254
|
+
}
|
|
86255
|
+
},
|
|
86256
|
+
{
|
|
86257
|
+
id: "30",
|
|
86258
|
+
number: "30",
|
|
86259
|
+
timerange: "10:00 PM - 11:00 PM",
|
|
86260
|
+
status: "in_progress",
|
|
86261
|
+
address: {
|
|
86262
|
+
nickname: "Last Stop",
|
|
86263
|
+
street: "000 Last Ave",
|
|
86264
|
+
city: "Last City",
|
|
86265
|
+
state: "CA",
|
|
86266
|
+
zip: "90218"
|
|
86267
|
+
},
|
|
86268
|
+
job_subtype: "delivery",
|
|
86269
|
+
progress: {
|
|
86270
|
+
currentStep: 2,
|
|
86271
|
+
totalSteps: 4,
|
|
86272
|
+
steps: {
|
|
86273
|
+
pickup: {
|
|
86274
|
+
text: "Pickup Complete",
|
|
86275
|
+
status: "success",
|
|
86276
|
+
value: 100
|
|
86277
|
+
},
|
|
86278
|
+
transit: {
|
|
86279
|
+
text: "In Transit",
|
|
86280
|
+
status: "active",
|
|
86281
|
+
value: 60
|
|
86282
|
+
},
|
|
86283
|
+
delivery: {
|
|
86284
|
+
text: "Delivery",
|
|
86285
|
+
status: "pending",
|
|
86286
|
+
value: 0
|
|
86287
|
+
},
|
|
86288
|
+
quality: {
|
|
86289
|
+
text: "Quality Check",
|
|
86290
|
+
status: "pending",
|
|
86291
|
+
value: 0
|
|
86292
|
+
}
|
|
86293
|
+
}
|
|
86294
|
+
}
|
|
86295
|
+
}
|
|
86296
|
+
];
|
|
86524
86297
|
const startCase = (string_) => {
|
|
86525
86298
|
if (string_) {
|
|
86526
86299
|
return string_.replaceAll(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase());
|
|
@@ -86584,9 +86357,25 @@ const mockColumns = [
|
|
|
86584
86357
|
dataIndex: "progress",
|
|
86585
86358
|
render: (progress) => {
|
|
86586
86359
|
if (!progress) return null;
|
|
86360
|
+
let firstBarData, secondBarData;
|
|
86361
|
+
if ("firstBarData" in progress) {
|
|
86362
|
+
firstBarData = progress.firstBarData;
|
|
86363
|
+
secondBarData = progress.secondBarData;
|
|
86364
|
+
} else {
|
|
86365
|
+
firstBarData = {
|
|
86366
|
+
text: progress.steps.pickup.text,
|
|
86367
|
+
status: progress.steps.pickup.status,
|
|
86368
|
+
value: progress.steps.pickup.value
|
|
86369
|
+
};
|
|
86370
|
+
secondBarData = {
|
|
86371
|
+
text: progress.steps.transit.text,
|
|
86372
|
+
status: progress.steps.transit.status,
|
|
86373
|
+
value: progress.steps.transit.value
|
|
86374
|
+
};
|
|
86375
|
+
}
|
|
86587
86376
|
return React__default.createElement(Progress, {
|
|
86588
|
-
firstBarData
|
|
86589
|
-
secondBarData
|
|
86377
|
+
firstBarData,
|
|
86378
|
+
secondBarData,
|
|
86590
86379
|
width: 150,
|
|
86591
86380
|
height: 20,
|
|
86592
86381
|
isProgressCombined: true
|
|
@@ -86628,491 +86417,7 @@ mockColumns.map((column2) => ({
|
|
|
86628
86417
|
...column2
|
|
86629
86418
|
}));
|
|
86630
86419
|
const mockDataSource = {
|
|
86631
|
-
appointments:
|
|
86632
|
-
{
|
|
86633
|
-
id: "1",
|
|
86634
|
-
number: "1",
|
|
86635
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
86636
|
-
status: "in_progress",
|
|
86637
|
-
address: {
|
|
86638
|
-
nickname: "Home",
|
|
86639
|
-
address: "123 Main St"
|
|
86640
|
-
},
|
|
86641
|
-
job_subtype: "delivery",
|
|
86642
|
-
progress: {
|
|
86643
|
-
firstBarData: {
|
|
86644
|
-
text: "Loading",
|
|
86645
|
-
status: "info",
|
|
86646
|
-
value: 100
|
|
86647
|
-
},
|
|
86648
|
-
secondBarData: {
|
|
86649
|
-
text: "Processing",
|
|
86650
|
-
status: "success",
|
|
86651
|
-
value: 25
|
|
86652
|
-
}
|
|
86653
|
-
}
|
|
86654
|
-
},
|
|
86655
|
-
{
|
|
86656
|
-
id: "2",
|
|
86657
|
-
number: "2",
|
|
86658
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
86659
|
-
status: "scheduled",
|
|
86660
|
-
address: {
|
|
86661
|
-
nickname: "Work",
|
|
86662
|
-
address: "456 Elm St"
|
|
86663
|
-
},
|
|
86664
|
-
job_subtype: "pickup",
|
|
86665
|
-
progress: {
|
|
86666
|
-
firstBarData: {
|
|
86667
|
-
text: "Preparing",
|
|
86668
|
-
status: "info",
|
|
86669
|
-
value: 100
|
|
86670
|
-
},
|
|
86671
|
-
secondBarData: {
|
|
86672
|
-
text: "Final Check",
|
|
86673
|
-
status: "success",
|
|
86674
|
-
value: 0
|
|
86675
|
-
}
|
|
86676
|
-
}
|
|
86677
|
-
},
|
|
86678
|
-
{
|
|
86679
|
-
id: "3",
|
|
86680
|
-
number: "3",
|
|
86681
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
86682
|
-
status: "scheduled",
|
|
86683
|
-
address: {
|
|
86684
|
-
nickname: "Store",
|
|
86685
|
-
address: "789 Oak St"
|
|
86686
|
-
},
|
|
86687
|
-
job_subtype: "delivery",
|
|
86688
|
-
progress: {
|
|
86689
|
-
firstBarData: {
|
|
86690
|
-
text: "Pending",
|
|
86691
|
-
status: "info",
|
|
86692
|
-
value: 0
|
|
86693
|
-
},
|
|
86694
|
-
secondBarData: {
|
|
86695
|
-
text: "Awaiting",
|
|
86696
|
-
status: "success",
|
|
86697
|
-
value: 0
|
|
86698
|
-
}
|
|
86699
|
-
}
|
|
86700
|
-
},
|
|
86701
|
-
{
|
|
86702
|
-
id: "4",
|
|
86703
|
-
number: "4",
|
|
86704
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
86705
|
-
status: "scheduled",
|
|
86706
|
-
address: {
|
|
86707
|
-
nickname: "Office",
|
|
86708
|
-
address: "321 Pine St"
|
|
86709
|
-
},
|
|
86710
|
-
job_subtype: "pickup",
|
|
86711
|
-
progress: {
|
|
86712
|
-
firstBarData: {
|
|
86713
|
-
text: "In Progress",
|
|
86714
|
-
status: "info",
|
|
86715
|
-
value: 100
|
|
86716
|
-
},
|
|
86717
|
-
secondBarData: {
|
|
86718
|
-
text: "Validation",
|
|
86719
|
-
status: "success",
|
|
86720
|
-
value: 30
|
|
86721
|
-
}
|
|
86722
|
-
}
|
|
86723
|
-
},
|
|
86724
|
-
{
|
|
86725
|
-
id: "5",
|
|
86726
|
-
number: "5",
|
|
86727
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
86728
|
-
status: "scheduled",
|
|
86729
|
-
address: {
|
|
86730
|
-
nickname: "Library",
|
|
86731
|
-
address: "555 Book Lane"
|
|
86732
|
-
},
|
|
86733
|
-
job_subtype: "delivery",
|
|
86734
|
-
progress: {
|
|
86735
|
-
firstBarData: {
|
|
86736
|
-
text: "Completed",
|
|
86737
|
-
status: "info",
|
|
86738
|
-
value: 100
|
|
86739
|
-
},
|
|
86740
|
-
secondBarData: {
|
|
86741
|
-
text: "Verified",
|
|
86742
|
-
status: "success",
|
|
86743
|
-
value: 100
|
|
86744
|
-
}
|
|
86745
|
-
}
|
|
86746
|
-
},
|
|
86747
|
-
{
|
|
86748
|
-
id: "6",
|
|
86749
|
-
number: "6",
|
|
86750
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
86751
|
-
status: "scheduled",
|
|
86752
|
-
address: {
|
|
86753
|
-
nickname: "Gym",
|
|
86754
|
-
address: "777 Fitness Ave"
|
|
86755
|
-
},
|
|
86756
|
-
job_subtype: "pickup",
|
|
86757
|
-
progress: {
|
|
86758
|
-
firstBarData: {
|
|
86759
|
-
text: "Phase 1",
|
|
86760
|
-
status: "info",
|
|
86761
|
-
value: 75
|
|
86762
|
-
},
|
|
86763
|
-
secondBarData: {
|
|
86764
|
-
text: "Phase 2",
|
|
86765
|
-
status: "success",
|
|
86766
|
-
value: 50
|
|
86767
|
-
}
|
|
86768
|
-
}
|
|
86769
|
-
},
|
|
86770
|
-
{
|
|
86771
|
-
id: "7",
|
|
86772
|
-
number: "7",
|
|
86773
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
86774
|
-
status: "scheduled",
|
|
86775
|
-
address: {
|
|
86776
|
-
nickname: "Mall",
|
|
86777
|
-
address: "888 Shopping Center"
|
|
86778
|
-
},
|
|
86779
|
-
job_subtype: "delivery",
|
|
86780
|
-
progress: {
|
|
86781
|
-
firstBarData: {
|
|
86782
|
-
text: "Queued",
|
|
86783
|
-
status: "info",
|
|
86784
|
-
value: 0
|
|
86785
|
-
},
|
|
86786
|
-
secondBarData: {
|
|
86787
|
-
text: "Waiting",
|
|
86788
|
-
status: "success",
|
|
86789
|
-
value: 0
|
|
86790
|
-
}
|
|
86791
|
-
}
|
|
86792
|
-
},
|
|
86793
|
-
{
|
|
86794
|
-
id: "8",
|
|
86795
|
-
number: "8",
|
|
86796
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
86797
|
-
status: "completed",
|
|
86798
|
-
address: {
|
|
86799
|
-
nickname: "School",
|
|
86800
|
-
address: "999 Education Rd"
|
|
86801
|
-
},
|
|
86802
|
-
job_subtype: "pickup",
|
|
86803
|
-
progress: {
|
|
86804
|
-
firstBarData: {
|
|
86805
|
-
text: "Delivered",
|
|
86806
|
-
status: "info",
|
|
86807
|
-
value: 100
|
|
86808
|
-
},
|
|
86809
|
-
secondBarData: {
|
|
86810
|
-
text: "Confirmed",
|
|
86811
|
-
status: "success",
|
|
86812
|
-
value: 100
|
|
86813
|
-
}
|
|
86814
|
-
}
|
|
86815
|
-
},
|
|
86816
|
-
{
|
|
86817
|
-
id: "9",
|
|
86818
|
-
number: "9",
|
|
86819
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
86820
|
-
status: "scheduled",
|
|
86821
|
-
address: {
|
|
86822
|
-
nickname: "Restaurant",
|
|
86823
|
-
address: "111 Food Court"
|
|
86824
|
-
},
|
|
86825
|
-
job_subtype: "delivery",
|
|
86826
|
-
progress: {
|
|
86827
|
-
firstBarData: {
|
|
86828
|
-
text: "Preparing",
|
|
86829
|
-
status: "info",
|
|
86830
|
-
value: 100
|
|
86831
|
-
},
|
|
86832
|
-
secondBarData: {
|
|
86833
|
-
text: "Quality Check",
|
|
86834
|
-
status: "success",
|
|
86835
|
-
value: 15
|
|
86836
|
-
}
|
|
86837
|
-
}
|
|
86838
|
-
},
|
|
86839
|
-
{
|
|
86840
|
-
id: "10",
|
|
86841
|
-
number: "10",
|
|
86842
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
86843
|
-
status: "scheduled",
|
|
86844
|
-
address: {
|
|
86845
|
-
nickname: "Park",
|
|
86846
|
-
address: "222 Green Ave"
|
|
86847
|
-
},
|
|
86848
|
-
job_subtype: "pickup",
|
|
86849
|
-
progress: {
|
|
86850
|
-
firstBarData: {
|
|
86851
|
-
text: "Processing",
|
|
86852
|
-
status: "info",
|
|
86853
|
-
value: 80
|
|
86854
|
-
},
|
|
86855
|
-
secondBarData: {
|
|
86856
|
-
text: "Review",
|
|
86857
|
-
status: "success",
|
|
86858
|
-
value: 0
|
|
86859
|
-
}
|
|
86860
|
-
}
|
|
86861
|
-
},
|
|
86862
|
-
{
|
|
86863
|
-
id: "11",
|
|
86864
|
-
number: "11",
|
|
86865
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
86866
|
-
status: "scheduled",
|
|
86867
|
-
address: {
|
|
86868
|
-
nickname: "Beach",
|
|
86869
|
-
address: "333 Shore Dr"
|
|
86870
|
-
},
|
|
86871
|
-
job_subtype: "delivery",
|
|
86872
|
-
progress: {
|
|
86873
|
-
firstBarData: {
|
|
86874
|
-
text: "Planning",
|
|
86875
|
-
status: "info",
|
|
86876
|
-
value: 40
|
|
86877
|
-
},
|
|
86878
|
-
secondBarData: {
|
|
86879
|
-
text: "Route Check",
|
|
86880
|
-
status: "success",
|
|
86881
|
-
value: 20
|
|
86882
|
-
}
|
|
86883
|
-
}
|
|
86884
|
-
},
|
|
86885
|
-
{
|
|
86886
|
-
id: "12",
|
|
86887
|
-
number: "12",
|
|
86888
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
86889
|
-
status: "scheduled",
|
|
86890
|
-
address: {
|
|
86891
|
-
nickname: "Hotel",
|
|
86892
|
-
address: "444 Stay Blvd"
|
|
86893
|
-
},
|
|
86894
|
-
job_subtype: "pickup",
|
|
86895
|
-
progress: {
|
|
86896
|
-
firstBarData: {
|
|
86897
|
-
text: "Scheduled",
|
|
86898
|
-
status: "info",
|
|
86899
|
-
value: 0
|
|
86900
|
-
},
|
|
86901
|
-
secondBarData: {
|
|
86902
|
-
text: "Awaiting",
|
|
86903
|
-
status: "success",
|
|
86904
|
-
value: 0
|
|
86905
|
-
}
|
|
86906
|
-
}
|
|
86907
|
-
},
|
|
86908
|
-
{
|
|
86909
|
-
id: "13",
|
|
86910
|
-
number: "13",
|
|
86911
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
86912
|
-
status: "scheduled",
|
|
86913
|
-
address: {
|
|
86914
|
-
nickname: "Airport",
|
|
86915
|
-
address: "666 Flight Way"
|
|
86916
|
-
},
|
|
86917
|
-
job_subtype: "delivery",
|
|
86918
|
-
progress: {
|
|
86919
|
-
firstBarData: {
|
|
86920
|
-
text: "Pre-flight",
|
|
86921
|
-
status: "info",
|
|
86922
|
-
value: 60
|
|
86923
|
-
},
|
|
86924
|
-
secondBarData: {
|
|
86925
|
-
text: "Security",
|
|
86926
|
-
status: "success",
|
|
86927
|
-
value: 30
|
|
86928
|
-
}
|
|
86929
|
-
}
|
|
86930
|
-
},
|
|
86931
|
-
{
|
|
86932
|
-
id: "14",
|
|
86933
|
-
number: "14",
|
|
86934
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
86935
|
-
status: "cancelled",
|
|
86936
|
-
address: {
|
|
86937
|
-
nickname: "Stadium",
|
|
86938
|
-
address: "777 Sports Complex"
|
|
86939
|
-
},
|
|
86940
|
-
job_subtype: "pickup",
|
|
86941
|
-
progress: {
|
|
86942
|
-
firstBarData: {
|
|
86943
|
-
text: "Cancelled",
|
|
86944
|
-
status: "info",
|
|
86945
|
-
value: 0
|
|
86946
|
-
},
|
|
86947
|
-
secondBarData: {
|
|
86948
|
-
text: "Refund",
|
|
86949
|
-
status: "success",
|
|
86950
|
-
value: 100
|
|
86951
|
-
}
|
|
86952
|
-
}
|
|
86953
|
-
},
|
|
86954
|
-
{
|
|
86955
|
-
id: "15",
|
|
86956
|
-
number: "15",
|
|
86957
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
86958
|
-
status: "scheduled",
|
|
86959
|
-
address: {
|
|
86960
|
-
nickname: "Theater",
|
|
86961
|
-
address: "888 Show Ave"
|
|
86962
|
-
},
|
|
86963
|
-
job_subtype: "delivery",
|
|
86964
|
-
progress: {
|
|
86965
|
-
firstBarData: {
|
|
86966
|
-
text: "Setup",
|
|
86967
|
-
status: "info",
|
|
86968
|
-
value: 25
|
|
86969
|
-
},
|
|
86970
|
-
secondBarData: {
|
|
86971
|
-
text: "Sound Check",
|
|
86972
|
-
status: "success",
|
|
86973
|
-
value: 0
|
|
86974
|
-
}
|
|
86975
|
-
}
|
|
86976
|
-
},
|
|
86977
|
-
{
|
|
86978
|
-
id: "16",
|
|
86979
|
-
number: "16",
|
|
86980
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
86981
|
-
status: "scheduled",
|
|
86982
|
-
address: {
|
|
86983
|
-
nickname: "Museum",
|
|
86984
|
-
address: "999 History Lane"
|
|
86985
|
-
},
|
|
86986
|
-
job_subtype: "pickup",
|
|
86987
|
-
progress: {
|
|
86988
|
-
firstBarData: {
|
|
86989
|
-
text: "Exhibit Prep",
|
|
86990
|
-
status: "info",
|
|
86991
|
-
value: 70
|
|
86992
|
-
},
|
|
86993
|
-
secondBarData: {
|
|
86994
|
-
text: "Documentation",
|
|
86995
|
-
status: "success",
|
|
86996
|
-
value: 45
|
|
86997
|
-
}
|
|
86998
|
-
}
|
|
86999
|
-
},
|
|
87000
|
-
{
|
|
87001
|
-
id: "17",
|
|
87002
|
-
number: "17",
|
|
87003
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
87004
|
-
status: "scheduled",
|
|
87005
|
-
address: {
|
|
87006
|
-
nickname: "Zoo",
|
|
87007
|
-
address: "123 Animal Park"
|
|
87008
|
-
},
|
|
87009
|
-
job_subtype: "delivery",
|
|
87010
|
-
progress: {
|
|
87011
|
-
firstBarData: {
|
|
87012
|
-
text: "Animal Care",
|
|
87013
|
-
status: "info",
|
|
87014
|
-
value: 85
|
|
87015
|
-
},
|
|
87016
|
-
secondBarData: {
|
|
87017
|
-
text: "Feeding",
|
|
87018
|
-
status: "success",
|
|
87019
|
-
value: 90
|
|
87020
|
-
}
|
|
87021
|
-
}
|
|
87022
|
-
},
|
|
87023
|
-
{
|
|
87024
|
-
id: "18",
|
|
87025
|
-
number: "18",
|
|
87026
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
87027
|
-
status: "scheduled",
|
|
87028
|
-
address: {
|
|
87029
|
-
nickname: "Bank",
|
|
87030
|
-
address: "456 Money St"
|
|
87031
|
-
},
|
|
87032
|
-
job_subtype: "pickup",
|
|
87033
|
-
progress: {
|
|
87034
|
-
firstBarData: {
|
|
87035
|
-
text: "Transaction",
|
|
87036
|
-
status: "info",
|
|
87037
|
-
value: 50
|
|
87038
|
-
},
|
|
87039
|
-
secondBarData: {
|
|
87040
|
-
text: "Verification",
|
|
87041
|
-
status: "success",
|
|
87042
|
-
value: 25
|
|
87043
|
-
}
|
|
87044
|
-
}
|
|
87045
|
-
},
|
|
87046
|
-
{
|
|
87047
|
-
id: "19",
|
|
87048
|
-
number: "19",
|
|
87049
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
87050
|
-
status: "scheduled",
|
|
87051
|
-
address: {
|
|
87052
|
-
nickname: "Post Office",
|
|
87053
|
-
address: "789 Mail Road"
|
|
87054
|
-
},
|
|
87055
|
-
job_subtype: "delivery",
|
|
87056
|
-
progress: {
|
|
87057
|
-
firstBarData: {
|
|
87058
|
-
text: "Sorting",
|
|
87059
|
-
status: "info",
|
|
87060
|
-
value: 100
|
|
87061
|
-
},
|
|
87062
|
-
secondBarData: {
|
|
87063
|
-
text: "Dispatch",
|
|
87064
|
-
status: "success",
|
|
87065
|
-
value: 75
|
|
87066
|
-
}
|
|
87067
|
-
}
|
|
87068
|
-
},
|
|
87069
|
-
{
|
|
87070
|
-
id: "20",
|
|
87071
|
-
number: "20",
|
|
87072
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
87073
|
-
status: "scheduled",
|
|
87074
|
-
address: {
|
|
87075
|
-
nickname: "Church",
|
|
87076
|
-
address: "321 Faith Street"
|
|
87077
|
-
},
|
|
87078
|
-
job_subtype: "pickup",
|
|
87079
|
-
progress: {
|
|
87080
|
-
firstBarData: {
|
|
87081
|
-
text: "Service Prep",
|
|
87082
|
-
status: "info",
|
|
87083
|
-
value: 30
|
|
87084
|
-
},
|
|
87085
|
-
secondBarData: {
|
|
87086
|
-
text: "Community",
|
|
87087
|
-
status: "success",
|
|
87088
|
-
value: 10
|
|
87089
|
-
}
|
|
87090
|
-
}
|
|
87091
|
-
},
|
|
87092
|
-
{
|
|
87093
|
-
id: "21",
|
|
87094
|
-
number: "21",
|
|
87095
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
87096
|
-
status: "scheduled",
|
|
87097
|
-
address: {
|
|
87098
|
-
nickname: "Pharmacy",
|
|
87099
|
-
address: "654 Health Ave"
|
|
87100
|
-
},
|
|
87101
|
-
job_subtype: "delivery",
|
|
87102
|
-
progress: {
|
|
87103
|
-
firstBarData: {
|
|
87104
|
-
text: "Prescription",
|
|
87105
|
-
status: "info",
|
|
87106
|
-
value: 90
|
|
87107
|
-
},
|
|
87108
|
-
secondBarData: {
|
|
87109
|
-
text: "Quality Check",
|
|
87110
|
-
status: "success",
|
|
87111
|
-
value: 60
|
|
87112
|
-
}
|
|
87113
|
-
}
|
|
87114
|
-
}
|
|
87115
|
-
]
|
|
86420
|
+
appointments: staticTableData
|
|
87116
86421
|
};
|
|
87117
86422
|
const tableControlsData = {
|
|
87118
86423
|
primaryTableRowData: {
|