@gobolt/genesis 0.4.12 → 0.4.14
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 -0
- package/dist/components/Table/InfiniteScrollTable/ResizableTitle.d.ts +10 -0
- package/dist/components/Table/Table.d.ts +25 -12
- package/dist/components/Table/__mocks__/TableWithControlsData.d.ts +3 -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 +3004 -724
- package/dist/index.js +3004 -724
- package/package.json +6 -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 hasOwn2 = {}.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 (hasOwn2.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$5() {
|
|
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$5;
|
|
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$5;
|
|
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$4() {
|
|
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$4;
|
|
4919
4919
|
if (enableStatistic && typeof Proxy !== "undefined") {
|
|
4920
4920
|
tokenKeys2 = /* @__PURE__ */ new Set();
|
|
4921
4921
|
proxy = new Proxy(token2, {
|
|
@@ -5276,7 +5276,7 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
5276
5276
|
a: 1
|
|
5277
5277
|
}).toRgbString();
|
|
5278
5278
|
}
|
|
5279
|
-
var __rest$
|
|
5279
|
+
var __rest$_ = function(s, e3) {
|
|
5280
5280
|
var t2 = {};
|
|
5281
5281
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
5282
5282
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5287,7 +5287,7 @@ var __rest$Z = function(s, e3) {
|
|
|
5287
5287
|
function formatToken(derivativeToken) {
|
|
5288
5288
|
const {
|
|
5289
5289
|
override
|
|
5290
|
-
} = derivativeToken, restToken = __rest$
|
|
5290
|
+
} = derivativeToken, restToken = __rest$_(derivativeToken, ["override"]);
|
|
5291
5291
|
const overrideTokens = Object.assign({}, override);
|
|
5292
5292
|
Object.keys(seedToken).forEach((token2) => {
|
|
5293
5293
|
delete overrideTokens[token2];
|
|
@@ -5441,7 +5441,7 @@ function formatToken(derivativeToken) {
|
|
|
5441
5441
|
}), overrideTokens);
|
|
5442
5442
|
return aliasToken;
|
|
5443
5443
|
}
|
|
5444
|
-
var __rest$
|
|
5444
|
+
var __rest$Z = function(s, e3) {
|
|
5445
5445
|
var t2 = {};
|
|
5446
5446
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
5447
5447
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5491,7 +5491,7 @@ const getComputedToken2 = (originToken, overrideToken, theme) => {
|
|
|
5491
5491
|
const derivativeToken = theme.getDerivativeToken(originToken);
|
|
5492
5492
|
const {
|
|
5493
5493
|
override
|
|
5494
|
-
} = overrideToken, components2 = __rest$
|
|
5494
|
+
} = overrideToken, components2 = __rest$Z(overrideToken, ["override"]);
|
|
5495
5495
|
let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
|
|
5496
5496
|
override
|
|
5497
5497
|
});
|
|
@@ -5500,7 +5500,7 @@ const getComputedToken2 = (originToken, overrideToken, theme) => {
|
|
|
5500
5500
|
Object.entries(components2).forEach(([key, value2]) => {
|
|
5501
5501
|
const {
|
|
5502
5502
|
theme: componentTheme
|
|
5503
|
-
} = value2, componentTokens = __rest$
|
|
5503
|
+
} = value2, componentTokens = __rest$Z(value2, ["theme"]);
|
|
5504
5504
|
let mergedComponentToken = componentTokens;
|
|
5505
5505
|
if (componentTheme) {
|
|
5506
5506
|
mergedComponentToken = getComputedToken2(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
|
|
@@ -6455,7 +6455,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
6455
6455
|
PropWarning.displayName = "PropWarning";
|
|
6456
6456
|
}
|
|
6457
6457
|
const PropWarning$1 = process.env.NODE_ENV !== "production" ? PropWarning : () => null;
|
|
6458
|
-
var __rest$
|
|
6458
|
+
var __rest$Y = function(s, e3) {
|
|
6459
6459
|
var t2 = {};
|
|
6460
6460
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
6461
6461
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -6742,7 +6742,7 @@ const ProviderChildren = (props) => {
|
|
|
6742
6742
|
token: token2,
|
|
6743
6743
|
components: components2,
|
|
6744
6744
|
cssVar
|
|
6745
|
-
} = _a, rest = __rest$
|
|
6745
|
+
} = _a, rest = __rest$Y(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
6746
6746
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
6747
6747
|
const parsedComponents = {};
|
|
6748
6748
|
Object.entries(components2 || {}).forEach(([componentName, componentToken]) => {
|
|
@@ -6994,9 +6994,9 @@ var CheckCircleFilled = function CheckCircleFilled2(props, ref) {
|
|
|
6994
6994
|
icon: CheckCircleFilled$1
|
|
6995
6995
|
}));
|
|
6996
6996
|
};
|
|
6997
|
-
var RefIcon$
|
|
6997
|
+
var RefIcon$E = /* @__PURE__ */ React.forwardRef(CheckCircleFilled);
|
|
6998
6998
|
if (process.env.NODE_ENV !== "production") {
|
|
6999
|
-
RefIcon$
|
|
6999
|
+
RefIcon$E.displayName = "CheckCircleFilled";
|
|
7000
7000
|
}
|
|
7001
7001
|
var CloseCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
|
|
7002
7002
|
var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
@@ -7005,9 +7005,9 @@ var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
|
7005
7005
|
icon: CloseCircleFilled$1
|
|
7006
7006
|
}));
|
|
7007
7007
|
};
|
|
7008
|
-
var RefIcon$
|
|
7008
|
+
var RefIcon$D = /* @__PURE__ */ React.forwardRef(CloseCircleFilled);
|
|
7009
7009
|
if (process.env.NODE_ENV !== "production") {
|
|
7010
|
-
RefIcon$
|
|
7010
|
+
RefIcon$D.displayName = "CloseCircleFilled";
|
|
7011
7011
|
}
|
|
7012
7012
|
var CloseOutlined$1 = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
|
|
7013
7013
|
var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
@@ -7016,9 +7016,9 @@ var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
|
7016
7016
|
icon: CloseOutlined$1
|
|
7017
7017
|
}));
|
|
7018
7018
|
};
|
|
7019
|
-
var RefIcon$
|
|
7019
|
+
var RefIcon$C = /* @__PURE__ */ React.forwardRef(CloseOutlined);
|
|
7020
7020
|
if (process.env.NODE_ENV !== "production") {
|
|
7021
|
-
RefIcon$
|
|
7021
|
+
RefIcon$C.displayName = "CloseOutlined";
|
|
7022
7022
|
}
|
|
7023
7023
|
var ExclamationCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
|
|
7024
7024
|
var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
@@ -7027,9 +7027,20 @@ var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
|
7027
7027
|
icon: ExclamationCircleFilled$1
|
|
7028
7028
|
}));
|
|
7029
7029
|
};
|
|
7030
|
-
var RefIcon$
|
|
7030
|
+
var RefIcon$B = /* @__PURE__ */ React.forwardRef(ExclamationCircleFilled);
|
|
7031
7031
|
if (process.env.NODE_ENV !== "production") {
|
|
7032
|
-
RefIcon$
|
|
7032
|
+
RefIcon$B.displayName = "ExclamationCircleFilled";
|
|
7033
|
+
}
|
|
7034
|
+
var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
|
|
7035
|
+
var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
7036
|
+
return /* @__PURE__ */ React.createElement(Icon$3, _extends$1({}, props, {
|
|
7037
|
+
ref,
|
|
7038
|
+
icon: InfoCircleFilled$1
|
|
7039
|
+
}));
|
|
7040
|
+
};
|
|
7041
|
+
var RefIcon$A = /* @__PURE__ */ React.forwardRef(InfoCircleFilled);
|
|
7042
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7043
|
+
RefIcon$A.displayName = "InfoCircleFilled";
|
|
7033
7044
|
}
|
|
7034
7045
|
var attributes = "accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap";
|
|
7035
7046
|
var eventsName = "onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError";
|
|
@@ -7080,6 +7091,433 @@ const replaceElement = (element2, replacement, props) => {
|
|
|
7080
7091
|
function cloneElement(element2, props) {
|
|
7081
7092
|
return replaceElement(element2, element2, props);
|
|
7082
7093
|
}
|
|
7094
|
+
const genAlertTypeStyle = (bgColor, borderColor, iconColor, token2, alertCls) => ({
|
|
7095
|
+
background: bgColor,
|
|
7096
|
+
border: `${unit$2(token2.lineWidth)} ${token2.lineType} ${borderColor}`,
|
|
7097
|
+
[`${alertCls}-icon`]: {
|
|
7098
|
+
color: iconColor
|
|
7099
|
+
}
|
|
7100
|
+
});
|
|
7101
|
+
const genBaseStyle$9 = (token2) => {
|
|
7102
|
+
const {
|
|
7103
|
+
componentCls,
|
|
7104
|
+
motionDurationSlow: duration,
|
|
7105
|
+
marginXS,
|
|
7106
|
+
marginSM,
|
|
7107
|
+
fontSize,
|
|
7108
|
+
fontSizeLG,
|
|
7109
|
+
lineHeight,
|
|
7110
|
+
borderRadiusLG: borderRadius2,
|
|
7111
|
+
motionEaseInOutCirc,
|
|
7112
|
+
withDescriptionIconSize,
|
|
7113
|
+
colorText,
|
|
7114
|
+
colorTextHeading,
|
|
7115
|
+
withDescriptionPadding,
|
|
7116
|
+
defaultPadding
|
|
7117
|
+
} = token2;
|
|
7118
|
+
return {
|
|
7119
|
+
[componentCls]: Object.assign(Object.assign({}, resetComponent(token2)), {
|
|
7120
|
+
position: "relative",
|
|
7121
|
+
display: "flex",
|
|
7122
|
+
alignItems: "center",
|
|
7123
|
+
padding: defaultPadding,
|
|
7124
|
+
wordWrap: "break-word",
|
|
7125
|
+
borderRadius: borderRadius2,
|
|
7126
|
+
[`&${componentCls}-rtl`]: {
|
|
7127
|
+
direction: "rtl"
|
|
7128
|
+
},
|
|
7129
|
+
[`${componentCls}-content`]: {
|
|
7130
|
+
flex: 1,
|
|
7131
|
+
minWidth: 0
|
|
7132
|
+
},
|
|
7133
|
+
[`${componentCls}-icon`]: {
|
|
7134
|
+
marginInlineEnd: marginXS,
|
|
7135
|
+
lineHeight: 0
|
|
7136
|
+
},
|
|
7137
|
+
"&-description": {
|
|
7138
|
+
display: "none",
|
|
7139
|
+
fontSize,
|
|
7140
|
+
lineHeight
|
|
7141
|
+
},
|
|
7142
|
+
"&-message": {
|
|
7143
|
+
color: colorTextHeading
|
|
7144
|
+
},
|
|
7145
|
+
[`&${componentCls}-motion-leave`]: {
|
|
7146
|
+
overflow: "hidden",
|
|
7147
|
+
opacity: 1,
|
|
7148
|
+
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
|
|
7149
|
+
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
|
|
7150
|
+
margin-bottom ${duration} ${motionEaseInOutCirc}`
|
|
7151
|
+
},
|
|
7152
|
+
[`&${componentCls}-motion-leave-active`]: {
|
|
7153
|
+
maxHeight: 0,
|
|
7154
|
+
marginBottom: "0 !important",
|
|
7155
|
+
paddingTop: 0,
|
|
7156
|
+
paddingBottom: 0,
|
|
7157
|
+
opacity: 0
|
|
7158
|
+
}
|
|
7159
|
+
}),
|
|
7160
|
+
[`${componentCls}-with-description`]: {
|
|
7161
|
+
alignItems: "flex-start",
|
|
7162
|
+
padding: withDescriptionPadding,
|
|
7163
|
+
[`${componentCls}-icon`]: {
|
|
7164
|
+
marginInlineEnd: marginSM,
|
|
7165
|
+
fontSize: withDescriptionIconSize,
|
|
7166
|
+
lineHeight: 0
|
|
7167
|
+
},
|
|
7168
|
+
[`${componentCls}-message`]: {
|
|
7169
|
+
display: "block",
|
|
7170
|
+
marginBottom: marginXS,
|
|
7171
|
+
color: colorTextHeading,
|
|
7172
|
+
fontSize: fontSizeLG
|
|
7173
|
+
},
|
|
7174
|
+
[`${componentCls}-description`]: {
|
|
7175
|
+
display: "block",
|
|
7176
|
+
color: colorText
|
|
7177
|
+
}
|
|
7178
|
+
},
|
|
7179
|
+
[`${componentCls}-banner`]: {
|
|
7180
|
+
marginBottom: 0,
|
|
7181
|
+
border: "0 !important",
|
|
7182
|
+
borderRadius: 0
|
|
7183
|
+
}
|
|
7184
|
+
};
|
|
7185
|
+
};
|
|
7186
|
+
const genTypeStyle = (token2) => {
|
|
7187
|
+
const {
|
|
7188
|
+
componentCls,
|
|
7189
|
+
colorSuccess,
|
|
7190
|
+
colorSuccessBorder,
|
|
7191
|
+
colorSuccessBg,
|
|
7192
|
+
colorWarning,
|
|
7193
|
+
colorWarningBorder,
|
|
7194
|
+
colorWarningBg,
|
|
7195
|
+
colorError,
|
|
7196
|
+
colorErrorBorder,
|
|
7197
|
+
colorErrorBg,
|
|
7198
|
+
colorInfo,
|
|
7199
|
+
colorInfoBorder,
|
|
7200
|
+
colorInfoBg
|
|
7201
|
+
} = token2;
|
|
7202
|
+
return {
|
|
7203
|
+
[componentCls]: {
|
|
7204
|
+
"&-success": genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token2, componentCls),
|
|
7205
|
+
"&-info": genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token2, componentCls),
|
|
7206
|
+
"&-warning": genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token2, componentCls),
|
|
7207
|
+
"&-error": Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token2, componentCls)), {
|
|
7208
|
+
[`${componentCls}-description > pre`]: {
|
|
7209
|
+
margin: 0,
|
|
7210
|
+
padding: 0
|
|
7211
|
+
}
|
|
7212
|
+
})
|
|
7213
|
+
}
|
|
7214
|
+
};
|
|
7215
|
+
};
|
|
7216
|
+
const genActionStyle = (token2) => {
|
|
7217
|
+
const {
|
|
7218
|
+
componentCls,
|
|
7219
|
+
iconCls,
|
|
7220
|
+
motionDurationMid,
|
|
7221
|
+
marginXS,
|
|
7222
|
+
fontSizeIcon,
|
|
7223
|
+
colorIcon,
|
|
7224
|
+
colorIconHover
|
|
7225
|
+
} = token2;
|
|
7226
|
+
return {
|
|
7227
|
+
[componentCls]: {
|
|
7228
|
+
"&-action": {
|
|
7229
|
+
marginInlineStart: marginXS
|
|
7230
|
+
},
|
|
7231
|
+
[`${componentCls}-close-icon`]: {
|
|
7232
|
+
marginInlineStart: marginXS,
|
|
7233
|
+
padding: 0,
|
|
7234
|
+
overflow: "hidden",
|
|
7235
|
+
fontSize: fontSizeIcon,
|
|
7236
|
+
lineHeight: unit$2(fontSizeIcon),
|
|
7237
|
+
backgroundColor: "transparent",
|
|
7238
|
+
border: "none",
|
|
7239
|
+
outline: "none",
|
|
7240
|
+
cursor: "pointer",
|
|
7241
|
+
[`${iconCls}-close`]: {
|
|
7242
|
+
color: colorIcon,
|
|
7243
|
+
transition: `color ${motionDurationMid}`,
|
|
7244
|
+
"&:hover": {
|
|
7245
|
+
color: colorIconHover
|
|
7246
|
+
}
|
|
7247
|
+
}
|
|
7248
|
+
},
|
|
7249
|
+
"&-close-text": {
|
|
7250
|
+
color: colorIcon,
|
|
7251
|
+
transition: `color ${motionDurationMid}`,
|
|
7252
|
+
"&:hover": {
|
|
7253
|
+
color: colorIconHover
|
|
7254
|
+
}
|
|
7255
|
+
}
|
|
7256
|
+
}
|
|
7257
|
+
};
|
|
7258
|
+
};
|
|
7259
|
+
const prepareComponentToken$p = (token2) => {
|
|
7260
|
+
const paddingHorizontal = 12;
|
|
7261
|
+
return {
|
|
7262
|
+
withDescriptionIconSize: token2.fontSizeHeading3,
|
|
7263
|
+
defaultPadding: `${token2.paddingContentVerticalSM}px ${paddingHorizontal}px`,
|
|
7264
|
+
withDescriptionPadding: `${token2.paddingMD}px ${token2.paddingContentHorizontalLG}px`
|
|
7265
|
+
};
|
|
7266
|
+
};
|
|
7267
|
+
const useStyle$v = genStyleHooks("Alert", (token2) => [genBaseStyle$9(token2), genTypeStyle(token2), genActionStyle(token2)], prepareComponentToken$p);
|
|
7268
|
+
var __rest$X = function(s, e3) {
|
|
7269
|
+
var t2 = {};
|
|
7270
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
7271
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7272
|
+
if (e3.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t2[p[i]] = s[p[i]];
|
|
7273
|
+
}
|
|
7274
|
+
return t2;
|
|
7275
|
+
};
|
|
7276
|
+
const iconMapFilled = {
|
|
7277
|
+
success: RefIcon$E,
|
|
7278
|
+
info: RefIcon$A,
|
|
7279
|
+
error: RefIcon$D,
|
|
7280
|
+
warning: RefIcon$B
|
|
7281
|
+
};
|
|
7282
|
+
const IconNode = (props) => {
|
|
7283
|
+
const {
|
|
7284
|
+
icon,
|
|
7285
|
+
prefixCls,
|
|
7286
|
+
type: type4
|
|
7287
|
+
} = props;
|
|
7288
|
+
const iconType = iconMapFilled[type4] || null;
|
|
7289
|
+
if (icon) {
|
|
7290
|
+
return replaceElement(icon, /* @__PURE__ */ React.createElement("span", {
|
|
7291
|
+
className: `${prefixCls}-icon`
|
|
7292
|
+
}, icon), () => ({
|
|
7293
|
+
className: classNames(`${prefixCls}-icon`, icon.props.className)
|
|
7294
|
+
}));
|
|
7295
|
+
}
|
|
7296
|
+
return /* @__PURE__ */ React.createElement(iconType, {
|
|
7297
|
+
className: `${prefixCls}-icon`
|
|
7298
|
+
});
|
|
7299
|
+
};
|
|
7300
|
+
const CloseIconNode = (props) => {
|
|
7301
|
+
const {
|
|
7302
|
+
isClosable,
|
|
7303
|
+
prefixCls,
|
|
7304
|
+
closeIcon,
|
|
7305
|
+
handleClose,
|
|
7306
|
+
ariaProps
|
|
7307
|
+
} = props;
|
|
7308
|
+
const mergedCloseIcon = closeIcon === true || closeIcon === void 0 ? /* @__PURE__ */ React.createElement(RefIcon$C, null) : closeIcon;
|
|
7309
|
+
return isClosable ? /* @__PURE__ */ React.createElement("button", Object.assign({
|
|
7310
|
+
type: "button",
|
|
7311
|
+
onClick: handleClose,
|
|
7312
|
+
className: `${prefixCls}-close-icon`,
|
|
7313
|
+
tabIndex: 0
|
|
7314
|
+
}, ariaProps), mergedCloseIcon) : null;
|
|
7315
|
+
};
|
|
7316
|
+
const Alert$1 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
7317
|
+
const {
|
|
7318
|
+
description,
|
|
7319
|
+
prefixCls: customizePrefixCls,
|
|
7320
|
+
message: message2,
|
|
7321
|
+
banner,
|
|
7322
|
+
className,
|
|
7323
|
+
rootClassName,
|
|
7324
|
+
style: style2,
|
|
7325
|
+
onMouseEnter,
|
|
7326
|
+
onMouseLeave,
|
|
7327
|
+
onClick,
|
|
7328
|
+
afterClose,
|
|
7329
|
+
showIcon,
|
|
7330
|
+
closable,
|
|
7331
|
+
closeText,
|
|
7332
|
+
closeIcon,
|
|
7333
|
+
action,
|
|
7334
|
+
id: id2
|
|
7335
|
+
} = props, otherProps = __rest$X(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]);
|
|
7336
|
+
const [closed, setClosed] = React.useState(false);
|
|
7337
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7338
|
+
const warning3 = devUseWarning("Alert");
|
|
7339
|
+
warning3.deprecated(!closeText, "closeText", "closable.closeIcon");
|
|
7340
|
+
}
|
|
7341
|
+
const internalRef = React.useRef(null);
|
|
7342
|
+
React.useImperativeHandle(ref, () => ({
|
|
7343
|
+
nativeElement: internalRef.current
|
|
7344
|
+
}));
|
|
7345
|
+
const {
|
|
7346
|
+
getPrefixCls,
|
|
7347
|
+
direction,
|
|
7348
|
+
closable: contextClosable,
|
|
7349
|
+
closeIcon: contextCloseIcon,
|
|
7350
|
+
className: contextClassName,
|
|
7351
|
+
style: contextStyle
|
|
7352
|
+
} = useComponentConfig("alert");
|
|
7353
|
+
const prefixCls = getPrefixCls("alert", customizePrefixCls);
|
|
7354
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$v(prefixCls);
|
|
7355
|
+
const handleClose = (e3) => {
|
|
7356
|
+
var _a;
|
|
7357
|
+
setClosed(true);
|
|
7358
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e3);
|
|
7359
|
+
};
|
|
7360
|
+
const type4 = React.useMemo(() => {
|
|
7361
|
+
if (props.type !== void 0) {
|
|
7362
|
+
return props.type;
|
|
7363
|
+
}
|
|
7364
|
+
return banner ? "warning" : "info";
|
|
7365
|
+
}, [props.type, banner]);
|
|
7366
|
+
const isClosable = React.useMemo(() => {
|
|
7367
|
+
if (typeof closable === "object" && closable.closeIcon) return true;
|
|
7368
|
+
if (closeText) {
|
|
7369
|
+
return true;
|
|
7370
|
+
}
|
|
7371
|
+
if (typeof closable === "boolean") {
|
|
7372
|
+
return closable;
|
|
7373
|
+
}
|
|
7374
|
+
if (closeIcon !== false && closeIcon !== null && closeIcon !== void 0) {
|
|
7375
|
+
return true;
|
|
7376
|
+
}
|
|
7377
|
+
return !!contextClosable;
|
|
7378
|
+
}, [closeText, closeIcon, closable, contextClosable]);
|
|
7379
|
+
const isShowIcon = banner && showIcon === void 0 ? true : showIcon;
|
|
7380
|
+
const alertCls = classNames(prefixCls, `${prefixCls}-${type4}`, {
|
|
7381
|
+
[`${prefixCls}-with-description`]: !!description,
|
|
7382
|
+
[`${prefixCls}-no-icon`]: !isShowIcon,
|
|
7383
|
+
[`${prefixCls}-banner`]: !!banner,
|
|
7384
|
+
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
7385
|
+
}, contextClassName, className, rootClassName, cssVarCls, hashId);
|
|
7386
|
+
const restProps = pickAttrs(otherProps, {
|
|
7387
|
+
aria: true,
|
|
7388
|
+
data: true
|
|
7389
|
+
});
|
|
7390
|
+
const mergedCloseIcon = React.useMemo(() => {
|
|
7391
|
+
if (typeof closable === "object" && closable.closeIcon) {
|
|
7392
|
+
return closable.closeIcon;
|
|
7393
|
+
}
|
|
7394
|
+
if (closeText) {
|
|
7395
|
+
return closeText;
|
|
7396
|
+
}
|
|
7397
|
+
if (closeIcon !== void 0) {
|
|
7398
|
+
return closeIcon;
|
|
7399
|
+
}
|
|
7400
|
+
if (typeof contextClosable === "object" && contextClosable.closeIcon) {
|
|
7401
|
+
return contextClosable.closeIcon;
|
|
7402
|
+
}
|
|
7403
|
+
return contextCloseIcon;
|
|
7404
|
+
}, [closeIcon, closable, closeText, contextCloseIcon]);
|
|
7405
|
+
const mergedAriaProps = React.useMemo(() => {
|
|
7406
|
+
const merged = closable !== null && closable !== void 0 ? closable : contextClosable;
|
|
7407
|
+
if (typeof merged === "object") {
|
|
7408
|
+
const {
|
|
7409
|
+
closeIcon: _
|
|
7410
|
+
} = merged, ariaProps = __rest$X(merged, ["closeIcon"]);
|
|
7411
|
+
return ariaProps;
|
|
7412
|
+
}
|
|
7413
|
+
return {};
|
|
7414
|
+
}, [closable, contextClosable]);
|
|
7415
|
+
return wrapCSSVar(/* @__PURE__ */ React.createElement(CSSMotion, {
|
|
7416
|
+
visible: !closed,
|
|
7417
|
+
motionName: `${prefixCls}-motion`,
|
|
7418
|
+
motionAppear: false,
|
|
7419
|
+
motionEnter: false,
|
|
7420
|
+
onLeaveStart: (node2) => ({
|
|
7421
|
+
maxHeight: node2.offsetHeight
|
|
7422
|
+
}),
|
|
7423
|
+
onLeaveEnd: afterClose
|
|
7424
|
+
}, ({
|
|
7425
|
+
className: motionClassName,
|
|
7426
|
+
style: motionStyle
|
|
7427
|
+
}, setRef) => /* @__PURE__ */ React.createElement("div", Object.assign({
|
|
7428
|
+
id: id2,
|
|
7429
|
+
ref: composeRef(internalRef, setRef),
|
|
7430
|
+
"data-show": !closed,
|
|
7431
|
+
className: classNames(alertCls, motionClassName),
|
|
7432
|
+
style: Object.assign(Object.assign(Object.assign({}, contextStyle), style2), motionStyle),
|
|
7433
|
+
onMouseEnter,
|
|
7434
|
+
onMouseLeave,
|
|
7435
|
+
onClick,
|
|
7436
|
+
role: "alert"
|
|
7437
|
+
}, restProps), isShowIcon ? /* @__PURE__ */ React.createElement(IconNode, {
|
|
7438
|
+
description,
|
|
7439
|
+
icon: props.icon,
|
|
7440
|
+
prefixCls,
|
|
7441
|
+
type: type4
|
|
7442
|
+
}) : null, /* @__PURE__ */ React.createElement("div", {
|
|
7443
|
+
className: `${prefixCls}-content`
|
|
7444
|
+
}, message2 ? /* @__PURE__ */ React.createElement("div", {
|
|
7445
|
+
className: `${prefixCls}-message`
|
|
7446
|
+
}, message2) : null, description ? /* @__PURE__ */ React.createElement("div", {
|
|
7447
|
+
className: `${prefixCls}-description`
|
|
7448
|
+
}, description) : null), action ? /* @__PURE__ */ React.createElement("div", {
|
|
7449
|
+
className: `${prefixCls}-action`
|
|
7450
|
+
}, action) : null, /* @__PURE__ */ React.createElement(CloseIconNode, {
|
|
7451
|
+
isClosable,
|
|
7452
|
+
prefixCls,
|
|
7453
|
+
closeIcon: mergedCloseIcon,
|
|
7454
|
+
handleClose,
|
|
7455
|
+
ariaProps: mergedAriaProps
|
|
7456
|
+
}))));
|
|
7457
|
+
});
|
|
7458
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7459
|
+
Alert$1.displayName = "Alert";
|
|
7460
|
+
}
|
|
7461
|
+
function _callSuper(t2, o2, e3) {
|
|
7462
|
+
return o2 = _getPrototypeOf(o2), _possibleConstructorReturn(t2, _isNativeReflectConstruct() ? Reflect.construct(o2, e3 || [], _getPrototypeOf(t2).constructor) : o2.apply(t2, e3));
|
|
7463
|
+
}
|
|
7464
|
+
let ErrorBoundary$1 = /* @__PURE__ */ (function(_React$Component) {
|
|
7465
|
+
function ErrorBoundary2() {
|
|
7466
|
+
var _this;
|
|
7467
|
+
_classCallCheck(this, ErrorBoundary2);
|
|
7468
|
+
_this = _callSuper(this, ErrorBoundary2, arguments);
|
|
7469
|
+
_this.state = {
|
|
7470
|
+
error: void 0,
|
|
7471
|
+
info: {
|
|
7472
|
+
componentStack: ""
|
|
7473
|
+
}
|
|
7474
|
+
};
|
|
7475
|
+
return _this;
|
|
7476
|
+
}
|
|
7477
|
+
_inherits(ErrorBoundary2, _React$Component);
|
|
7478
|
+
return _createClass(ErrorBoundary2, [{
|
|
7479
|
+
key: "componentDidCatch",
|
|
7480
|
+
value: function componentDidCatch(error2, info) {
|
|
7481
|
+
this.setState({
|
|
7482
|
+
error: error2,
|
|
7483
|
+
info
|
|
7484
|
+
});
|
|
7485
|
+
}
|
|
7486
|
+
}, {
|
|
7487
|
+
key: "render",
|
|
7488
|
+
value: function render2() {
|
|
7489
|
+
const {
|
|
7490
|
+
message: message2,
|
|
7491
|
+
description,
|
|
7492
|
+
id: id2,
|
|
7493
|
+
children: children2
|
|
7494
|
+
} = this.props;
|
|
7495
|
+
const {
|
|
7496
|
+
error: error2,
|
|
7497
|
+
info
|
|
7498
|
+
} = this.state;
|
|
7499
|
+
const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
|
|
7500
|
+
const errorMessage = typeof message2 === "undefined" ? (error2 || "").toString() : message2;
|
|
7501
|
+
const errorDescription = typeof description === "undefined" ? componentStack : description;
|
|
7502
|
+
if (error2) {
|
|
7503
|
+
return /* @__PURE__ */ React.createElement(Alert$1, {
|
|
7504
|
+
id: id2,
|
|
7505
|
+
type: "error",
|
|
7506
|
+
message: errorMessage,
|
|
7507
|
+
description: /* @__PURE__ */ React.createElement("pre", {
|
|
7508
|
+
style: {
|
|
7509
|
+
fontSize: "0.9em",
|
|
7510
|
+
overflowX: "auto"
|
|
7511
|
+
}
|
|
7512
|
+
}, errorDescription)
|
|
7513
|
+
});
|
|
7514
|
+
}
|
|
7515
|
+
return children2;
|
|
7516
|
+
}
|
|
7517
|
+
}]);
|
|
7518
|
+
})(React.Component);
|
|
7519
|
+
const Alert = Alert$1;
|
|
7520
|
+
Alert.ErrorBoundary = ErrorBoundary$1;
|
|
7083
7521
|
const t = (t2) => "object" == typeof t2 && null != t2 && 1 === t2.nodeType, e$1 = (t2, e3) => (!e3 || "hidden" !== t2) && ("visible" !== t2 && "clip" !== t2), n = (t2, n2) => {
|
|
7084
7522
|
if (t2.clientHeight < t2.scrollHeight || t2.clientWidth < t2.scrollWidth) {
|
|
7085
7523
|
const o2 = getComputedStyle(t2, null);
|
|
@@ -21242,7 +21680,7 @@ function useIcons$1({
|
|
|
21242
21680
|
const warning3 = devUseWarning(componentName);
|
|
21243
21681
|
warning3.deprecated(!clearIcon, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
21244
21682
|
}
|
|
21245
|
-
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$
|
|
21683
|
+
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React.createElement(RefIcon$D, null);
|
|
21246
21684
|
const getSuffixIconNode = (arrowIcon) => {
|
|
21247
21685
|
if (suffixIcon === null && !hasFeedback && !showArrow) {
|
|
21248
21686
|
return null;
|
|
@@ -21284,7 +21722,7 @@ function useIcons$1({
|
|
|
21284
21722
|
if (removeIcon !== void 0) {
|
|
21285
21723
|
mergedRemoveIcon = removeIcon;
|
|
21286
21724
|
} else {
|
|
21287
|
-
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
21725
|
+
mergedRemoveIcon = /* @__PURE__ */ React.createElement(RefIcon$C, null);
|
|
21288
21726
|
}
|
|
21289
21727
|
return {
|
|
21290
21728
|
clearIcon: mergedClearIcon,
|
|
@@ -37870,7 +38308,7 @@ const InternalTabs = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
37870
38308
|
}) => {
|
|
37871
38309
|
onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === "add" ? event : key, editType);
|
|
37872
38310
|
},
|
|
37873
|
-
removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /* @__PURE__ */ React.createElement(RefIcon$
|
|
38311
|
+
removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /* @__PURE__ */ React.createElement(RefIcon$C, null),
|
|
37874
38312
|
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /* @__PURE__ */ React.createElement(RefIcon$r, null),
|
|
37875
38313
|
showAdd: hideAdd !== true
|
|
37876
38314
|
};
|
|
@@ -38552,7 +38990,7 @@ function throttle(delay, callback, options) {
|
|
|
38552
38990
|
wrapper.cancel = cancel;
|
|
38553
38991
|
return wrapper;
|
|
38554
38992
|
}
|
|
38555
|
-
function debounce
|
|
38993
|
+
function debounce(delay, callback, options) {
|
|
38556
38994
|
var _ref = {}, _ref$atBegin = _ref.atBegin, atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
38557
38995
|
return throttle(delay, callback, {
|
|
38558
38996
|
debounceMode: atBegin !== false
|
|
@@ -40567,7 +41005,7 @@ const getAllowClear = (allowClear) => {
|
|
|
40567
41005
|
mergedAllowClear = allowClear;
|
|
40568
41006
|
} else if (allowClear) {
|
|
40569
41007
|
mergedAllowClear = {
|
|
40570
|
-
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$
|
|
41008
|
+
clearIcon: /* @__PURE__ */ React__default.createElement(RefIcon$D, null)
|
|
40571
41009
|
};
|
|
40572
41010
|
}
|
|
40573
41011
|
return mergedAllowClear;
|
|
@@ -42580,9 +43018,9 @@ const FormItemLabel = ({
|
|
|
42580
43018
|
}, labelChildren));
|
|
42581
43019
|
};
|
|
42582
43020
|
const iconMap = {
|
|
42583
|
-
success: RefIcon$
|
|
42584
|
-
warning: RefIcon$
|
|
42585
|
-
error: RefIcon$
|
|
43021
|
+
success: RefIcon$E,
|
|
43022
|
+
warning: RefIcon$B,
|
|
43023
|
+
error: RefIcon$D,
|
|
42586
43024
|
validating: RefIcon$z
|
|
42587
43025
|
};
|
|
42588
43026
|
function StatusProvider({
|
|
@@ -42618,10 +43056,10 @@ function StatusProvider({
|
|
|
42618
43056
|
errors,
|
|
42619
43057
|
warnings
|
|
42620
43058
|
})) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);
|
|
42621
|
-
const
|
|
42622
|
-
feedbackIcon = customIconNode !== false &&
|
|
43059
|
+
const IconNode2 = mergedValidateStatus && iconMap[mergedValidateStatus];
|
|
43060
|
+
feedbackIcon = customIconNode !== false && IconNode2 ? /* @__PURE__ */ React.createElement("span", {
|
|
42623
43061
|
className: classNames(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
|
|
42624
|
-
}, customIconNode || /* @__PURE__ */ React.createElement(
|
|
43062
|
+
}, customIconNode || /* @__PURE__ */ React.createElement(IconNode2, null)) : null;
|
|
42625
43063
|
}
|
|
42626
43064
|
const context = {
|
|
42627
43065
|
status: mergedValidateStatus || "",
|
|
@@ -44445,7 +44883,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
44445
44883
|
var defaultItemRender = function defaultItemRender2(page, type4, element2) {
|
|
44446
44884
|
return element2;
|
|
44447
44885
|
};
|
|
44448
|
-
function noop$
|
|
44886
|
+
function noop$3() {
|
|
44449
44887
|
}
|
|
44450
44888
|
function isInteger(v) {
|
|
44451
44889
|
var value2 = Number(v);
|
|
@@ -44456,7 +44894,7 @@ function calculatePage(p, pageSize, total) {
|
|
|
44456
44894
|
return Math.floor((total - 1) / _pageSize) + 1;
|
|
44457
44895
|
}
|
|
44458
44896
|
var Pagination$1 = function Pagination(props) {
|
|
44459
|
-
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$3 : _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$3 : _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;
|
|
44460
44898
|
var paginationRef = React__default.useRef(null);
|
|
44461
44899
|
var _useMergedState = useMergedState(10, {
|
|
44462
44900
|
value: pageSizeProp,
|
|
@@ -44473,7 +44911,7 @@ var Pagination$1 = function Pagination(props) {
|
|
|
44473
44911
|
useEffect(function() {
|
|
44474
44912
|
setInternalInputVal(current);
|
|
44475
44913
|
}, [current]);
|
|
44476
|
-
var hasOnChange = onChange !== noop$
|
|
44914
|
+
var hasOnChange = onChange !== noop$3;
|
|
44477
44915
|
var hasCurrent = "current" in props;
|
|
44478
44916
|
if (process.env.NODE_ENV !== "production") {
|
|
44479
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.");
|
|
@@ -46033,7 +46471,7 @@ const Spin = (props) => {
|
|
|
46033
46471
|
const mergedPercent = usePercent(spinning, percent);
|
|
46034
46472
|
React.useEffect(() => {
|
|
46035
46473
|
if (customSpinning) {
|
|
46036
|
-
const showSpinning = debounce
|
|
46474
|
+
const showSpinning = debounce(delay, () => {
|
|
46037
46475
|
setSpinning(true);
|
|
46038
46476
|
});
|
|
46039
46477
|
showSpinning();
|
|
@@ -46186,7 +46624,7 @@ const Overlay = (props) => {
|
|
|
46186
46624
|
cancelText,
|
|
46187
46625
|
okText,
|
|
46188
46626
|
okType = "primary",
|
|
46189
|
-
icon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
46627
|
+
icon = /* @__PURE__ */ React.createElement(RefIcon$B, null),
|
|
46190
46628
|
showCancel = true,
|
|
46191
46629
|
close,
|
|
46192
46630
|
onConfirm,
|
|
@@ -46264,7 +46702,7 @@ const InternalPopconfirm = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
46264
46702
|
placement = "top",
|
|
46265
46703
|
trigger = "click",
|
|
46266
46704
|
okType = "primary",
|
|
46267
|
-
icon = /* @__PURE__ */ React.createElement(RefIcon$
|
|
46705
|
+
icon = /* @__PURE__ */ React.createElement(RefIcon$B, null),
|
|
46268
46706
|
children: children2,
|
|
46269
46707
|
overlayClassName,
|
|
46270
46708
|
onOpenChange,
|
|
@@ -47255,9 +47693,9 @@ const Progress$2 = /* @__PURE__ */ React.forwardRef((props, ref) => {
|
|
|
47255
47693
|
if (infoPosition === "inner" || format3 || progressStatus !== "exception" && progressStatus !== "success") {
|
|
47256
47694
|
text2 = textFormatter(validProgress(percent), validProgress(successPercent));
|
|
47257
47695
|
} else if (progressStatus === "exception") {
|
|
47258
|
-
text2 = isLineType ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
47696
|
+
text2 = isLineType ? /* @__PURE__ */ React.createElement(RefIcon$D, null) : /* @__PURE__ */ React.createElement(RefIcon$C, null);
|
|
47259
47697
|
} else if (progressStatus === "success") {
|
|
47260
|
-
text2 = isLineType ? /* @__PURE__ */ React.createElement(RefIcon$
|
|
47698
|
+
text2 = isLineType ? /* @__PURE__ */ React.createElement(RefIcon$E, null) : /* @__PURE__ */ React.createElement(RefIcon$x, null);
|
|
47261
47699
|
}
|
|
47262
47700
|
return /* @__PURE__ */ React.createElement("span", {
|
|
47263
47701
|
className: classNames(`${prefixCls}-text`, {
|
|
@@ -48318,9 +48756,9 @@ const Unauthorized = () => /* @__PURE__ */ React.createElement("svg", {
|
|
|
48318
48756
|
strokeWidth: "1.1"
|
|
48319
48757
|
})));
|
|
48320
48758
|
const IconMap = {
|
|
48321
|
-
success: RefIcon$
|
|
48322
|
-
error: RefIcon$
|
|
48323
|
-
info: RefIcon$
|
|
48759
|
+
success: RefIcon$E,
|
|
48760
|
+
error: RefIcon$D,
|
|
48761
|
+
info: RefIcon$B,
|
|
48324
48762
|
warning: RefIcon
|
|
48325
48763
|
};
|
|
48326
48764
|
const ExceptionMap = {
|
|
@@ -52697,7 +53135,7 @@ var HIDDEN_STYLE = {
|
|
|
52697
53135
|
padding: 0,
|
|
52698
53136
|
margin: 0
|
|
52699
53137
|
};
|
|
52700
|
-
var noop$
|
|
53138
|
+
var noop$2 = function noop() {
|
|
52701
53139
|
};
|
|
52702
53140
|
var MOTION_KEY = "RC_TREE_MOTION_".concat(Math.random());
|
|
52703
53141
|
var MotionNode = {
|
|
@@ -52833,7 +53271,7 @@ var NodeList = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
52833
53271
|
onFocus,
|
|
52834
53272
|
onBlur,
|
|
52835
53273
|
value: "",
|
|
52836
|
-
onChange: noop$
|
|
53274
|
+
onChange: noop$2,
|
|
52837
53275
|
"aria-label": "for screen reader"
|
|
52838
53276
|
})), /* @__PURE__ */ React.createElement("div", {
|
|
52839
53277
|
className: "".concat(prefixCls, "-treenode"),
|
|
@@ -59821,7 +60259,7 @@ const Toast = ({
|
|
|
59821
60259
|
)
|
|
59822
60260
|
}
|
|
59823
60261
|
) : null,
|
|
59824
|
-
close ? /* @__PURE__ */ jsx(ToastCloseButton, { onClick: close, children: /* @__PURE__ */ jsx(RefIcon$
|
|
60262
|
+
close ? /* @__PURE__ */ jsx(ToastCloseButton, { onClick: close, children: /* @__PURE__ */ jsx(RefIcon$C, { style: { fontSize: 18 } }) }) : null
|
|
59825
60263
|
] });
|
|
59826
60264
|
};
|
|
59827
60265
|
const ToastContext = React__default.createContext(
|
|
@@ -71850,7 +72288,7 @@ var hasRequiredExtend;
|
|
|
71850
72288
|
function requireExtend() {
|
|
71851
72289
|
if (hasRequiredExtend) return extend$2;
|
|
71852
72290
|
hasRequiredExtend = 1;
|
|
71853
|
-
var
|
|
72291
|
+
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
71854
72292
|
var toStr = Object.prototype.toString;
|
|
71855
72293
|
var defineProperty = Object.defineProperty;
|
|
71856
72294
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
@@ -71864,15 +72302,15 @@ function requireExtend() {
|
|
|
71864
72302
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
71865
72303
|
return false;
|
|
71866
72304
|
}
|
|
71867
|
-
var hasOwnConstructor =
|
|
71868
|
-
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype &&
|
|
72305
|
+
var hasOwnConstructor = hasOwn2.call(obj, "constructor");
|
|
72306
|
+
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
|
|
71869
72307
|
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
|
71870
72308
|
return false;
|
|
71871
72309
|
}
|
|
71872
72310
|
var key;
|
|
71873
72311
|
for (key in obj) {
|
|
71874
72312
|
}
|
|
71875
|
-
return typeof key === "undefined" ||
|
|
72313
|
+
return typeof key === "undefined" || hasOwn2.call(obj, key);
|
|
71876
72314
|
};
|
|
71877
72315
|
var setProperty = function setProperty2(target, options) {
|
|
71878
72316
|
if (defineProperty && options.name === "__proto__") {
|
|
@@ -71888,7 +72326,7 @@ function requireExtend() {
|
|
|
71888
72326
|
};
|
|
71889
72327
|
var getProperty = function getProperty2(obj, name2) {
|
|
71890
72328
|
if (name2 === "__proto__") {
|
|
71891
|
-
if (!
|
|
72329
|
+
if (!hasOwn2.call(obj, name2)) {
|
|
71892
72330
|
return void 0;
|
|
71893
72331
|
} else if (gOPD) {
|
|
71894
72332
|
return gOPD(obj, name2).value;
|
|
@@ -71938,7 +72376,7 @@ function requireExtend() {
|
|
|
71938
72376
|
}
|
|
71939
72377
|
var extendExports = requireExtend();
|
|
71940
72378
|
const extend$1 = /* @__PURE__ */ getDefaultExportFromCjs(extendExports);
|
|
71941
|
-
function isPlainObject(value2) {
|
|
72379
|
+
function isPlainObject$1(value2) {
|
|
71942
72380
|
if (typeof value2 !== "object" || value2 === null) {
|
|
71943
72381
|
return false;
|
|
71944
72382
|
}
|
|
@@ -73342,7 +73780,7 @@ class Processor extends CallableInstance {
|
|
|
73342
73780
|
} else if (parameters2.length > 0) {
|
|
73343
73781
|
let [primary, ...rest] = parameters2;
|
|
73344
73782
|
const currentPrimary = attachers[entryIndex][1];
|
|
73345
|
-
if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
|
|
73783
|
+
if (isPlainObject$1(currentPrimary) && isPlainObject$1(primary)) {
|
|
73346
73784
|
primary = extend$1(true, currentPrimary, primary);
|
|
73347
73785
|
}
|
|
73348
73786
|
attachers[entryIndex] = [plugin, primary, ...rest];
|
|
@@ -73369,7 +73807,7 @@ function assertUnfrozen(name2, frozen) {
|
|
|
73369
73807
|
}
|
|
73370
73808
|
}
|
|
73371
73809
|
function assertNode(node2) {
|
|
73372
|
-
if (!isPlainObject(node2) || typeof node2.type !== "string") {
|
|
73810
|
+
if (!isPlainObject$1(node2) || typeof node2.type !== "string") {
|
|
73373
73811
|
throw new TypeError("Expected node, got `" + node2 + "`");
|
|
73374
73812
|
}
|
|
73375
73813
|
}
|
|
@@ -74266,7 +74704,7 @@ function range2(start2, stop, step) {
|
|
|
74266
74704
|
}
|
|
74267
74705
|
return range3;
|
|
74268
74706
|
}
|
|
74269
|
-
var
|
|
74707
|
+
var noop$1 = { value: () => {
|
|
74270
74708
|
} };
|
|
74271
74709
|
function dispatch() {
|
|
74272
74710
|
for (var i = 0, n2 = arguments.length, _ = {}, t2; i < n2; ++i) {
|
|
@@ -74326,7 +74764,7 @@ function get$1(type4, name2) {
|
|
|
74326
74764
|
function set$1(type4, name2, callback) {
|
|
74327
74765
|
for (var i = 0, n2 = type4.length; i < n2; ++i) {
|
|
74328
74766
|
if (type4[i].name === name2) {
|
|
74329
|
-
type4[i] =
|
|
74767
|
+
type4[i] = noop$1, type4 = type4.slice(0, i).concat(type4.slice(i + 1));
|
|
74330
74768
|
break;
|
|
74331
74769
|
}
|
|
74332
74770
|
}
|
|
@@ -83875,287 +84313,1579 @@ const CustomPagination = ({
|
|
|
83875
84313
|
}
|
|
83876
84314
|
return null;
|
|
83877
84315
|
};
|
|
83878
|
-
var
|
|
83879
|
-
|
|
83880
|
-
|
|
83881
|
-
|
|
83882
|
-
|
|
83883
|
-
|
|
83884
|
-
|
|
83885
|
-
|
|
83886
|
-
|
|
83887
|
-
|
|
83888
|
-
|
|
83889
|
-
}
|
|
83890
|
-
|
|
83891
|
-
|
|
83892
|
-
|
|
83893
|
-
|
|
83894
|
-
|
|
83895
|
-
|
|
83896
|
-
|
|
83897
|
-
|
|
83898
|
-
|
|
83899
|
-
|
|
83900
|
-
|
|
83901
|
-
|
|
83902
|
-
|
|
83903
|
-
|
|
83904
|
-
|
|
83905
|
-
|
|
83906
|
-
|
|
83907
|
-
|
|
83908
|
-
|
|
83909
|
-
|
|
83910
|
-
|
|
83911
|
-
|
|
83912
|
-
|
|
84316
|
+
var Subscribable = class {
|
|
84317
|
+
constructor() {
|
|
84318
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
84319
|
+
this.subscribe = this.subscribe.bind(this);
|
|
84320
|
+
}
|
|
84321
|
+
subscribe(listener) {
|
|
84322
|
+
this.listeners.add(listener);
|
|
84323
|
+
this.onSubscribe();
|
|
84324
|
+
return () => {
|
|
84325
|
+
this.listeners.delete(listener);
|
|
84326
|
+
this.onUnsubscribe();
|
|
84327
|
+
};
|
|
84328
|
+
}
|
|
84329
|
+
hasListeners() {
|
|
84330
|
+
return this.listeners.size > 0;
|
|
84331
|
+
}
|
|
84332
|
+
onSubscribe() {
|
|
84333
|
+
}
|
|
84334
|
+
onUnsubscribe() {
|
|
84335
|
+
}
|
|
84336
|
+
};
|
|
84337
|
+
var defaultTimeoutProvider = {
|
|
84338
|
+
// We need the wrapper function syntax below instead of direct references to
|
|
84339
|
+
// global setTimeout etc.
|
|
84340
|
+
//
|
|
84341
|
+
// BAD: `setTimeout: setTimeout`
|
|
84342
|
+
// GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
|
|
84343
|
+
//
|
|
84344
|
+
// If we use direct references here, then anything that wants to spy on or
|
|
84345
|
+
// replace the global setTimeout (like tests) won't work since we'll already
|
|
84346
|
+
// have a hard reference to the original implementation at the time when this
|
|
84347
|
+
// file was imported.
|
|
84348
|
+
setTimeout: (callback, delay) => setTimeout(callback, delay),
|
|
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
|
+
);
|
|
83913
84369
|
}
|
|
83914
84370
|
}
|
|
83915
|
-
|
|
83916
|
-
|
|
83917
|
-
|
|
83918
|
-
|
|
83919
|
-
|
|
83920
|
-
|
|
83921
|
-
|
|
83922
|
-
|
|
83923
|
-
|
|
83924
|
-
|
|
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;
|
|
83925
84495
|
}
|
|
83926
|
-
|
|
83927
|
-
|
|
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
|
+
};
|
|
83928
84545
|
}
|
|
83929
|
-
return
|
|
84546
|
+
return;
|
|
83930
84547
|
};
|
|
83931
|
-
|
|
83932
|
-
|
|
83933
|
-
|
|
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();
|
|
83934
84568
|
}
|
|
83935
84569
|
});
|
|
83936
|
-
debounced.clear = () => {
|
|
83937
|
-
if (!timeoutId) {
|
|
83938
|
-
return;
|
|
83939
|
-
}
|
|
83940
|
-
clearTimeout(timeoutId);
|
|
83941
|
-
timeoutId = void 0;
|
|
83942
|
-
};
|
|
83943
|
-
debounced.flush = () => {
|
|
83944
|
-
if (!timeoutId) {
|
|
83945
|
-
return;
|
|
83946
|
-
}
|
|
83947
|
-
debounced.trigger();
|
|
83948
|
-
};
|
|
83949
|
-
debounced.trigger = () => {
|
|
83950
|
-
result = run();
|
|
83951
|
-
debounced.clear();
|
|
83952
|
-
};
|
|
83953
|
-
return debounced;
|
|
83954
84570
|
}
|
|
83955
|
-
|
|
83956
|
-
|
|
83957
|
-
|
|
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;
|
|
83958
84622
|
}
|
|
83959
|
-
var
|
|
83960
|
-
|
|
83961
|
-
|
|
83962
|
-
|
|
83963
|
-
|
|
83964
|
-
|
|
83965
|
-
|
|
83966
|
-
|
|
83967
|
-
|
|
83968
|
-
|
|
83969
|
-
|
|
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
|
+
});
|
|
83970
84652
|
});
|
|
83971
|
-
|
|
84653
|
+
});
|
|
84654
|
+
}
|
|
84655
|
+
};
|
|
84656
|
+
return {
|
|
84657
|
+
batch: (callback) => {
|
|
84658
|
+
let result;
|
|
84659
|
+
transactions++;
|
|
84660
|
+
try {
|
|
84661
|
+
result = callback();
|
|
84662
|
+
} finally {
|
|
84663
|
+
transactions--;
|
|
84664
|
+
if (!transactions) {
|
|
84665
|
+
flush();
|
|
84666
|
+
}
|
|
83972
84667
|
}
|
|
83973
|
-
|
|
83974
|
-
|
|
83975
|
-
|
|
83976
|
-
|
|
84668
|
+
return result;
|
|
84669
|
+
},
|
|
84670
|
+
/**
|
|
84671
|
+
* All calls to the wrapped function will be batched.
|
|
84672
|
+
*/
|
|
84673
|
+
batchCalls: (callback) => {
|
|
84674
|
+
return (...args) => {
|
|
84675
|
+
schedule2(() => {
|
|
84676
|
+
callback(...args);
|
|
83977
84677
|
});
|
|
83978
|
-
|
|
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
|
+
};
|
|
83979
84717
|
}
|
|
84718
|
+
return;
|
|
84719
|
+
};
|
|
84720
|
+
}
|
|
84721
|
+
onSubscribe() {
|
|
84722
|
+
if (!this.#cleanup) {
|
|
84723
|
+
this.setEventListener(this.#setup);
|
|
83980
84724
|
}
|
|
83981
|
-
|
|
83982
|
-
|
|
83983
|
-
if (
|
|
83984
|
-
|
|
83985
|
-
|
|
83986
|
-
|
|
83987
|
-
|
|
83988
|
-
|
|
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);
|
|
83989
84743
|
});
|
|
83990
84744
|
}
|
|
83991
|
-
|
|
84745
|
+
}
|
|
84746
|
+
isOnline() {
|
|
84747
|
+
return this.#online;
|
|
83992
84748
|
}
|
|
83993
84749
|
};
|
|
83994
|
-
|
|
83995
|
-
|
|
83996
|
-
|
|
83997
|
-
|
|
83998
|
-
|
|
83999
|
-
|
|
84000
|
-
|
|
84001
|
-
|
|
84002
|
-
|
|
84003
|
-
|
|
84004
|
-
|
|
84005
|
-
|
|
84006
|
-
enableRowKeyValidation = process.env.NODE_ENV === "development",
|
|
84007
|
-
onRowKeyError,
|
|
84008
|
-
...rest
|
|
84009
|
-
}) {
|
|
84010
|
-
const [materializedData, setMaterializedData] = React.useState([]);
|
|
84011
|
-
const [isLoadingMore, setIsLoadingMore] = React.useState(false);
|
|
84012
|
-
const [hasMoreData, setHasMoreData] = React.useState(true);
|
|
84013
|
-
const [dynamicHeight, setDynamicHeight] = React.useState(
|
|
84014
|
-
400
|
|
84015
|
-
);
|
|
84016
|
-
const [selectedRowKeys, setSelectedRowKeys] = React.useState([]);
|
|
84017
|
-
const [pressedRowKey, setPressedRowKey] = React.useState(
|
|
84018
|
-
null
|
|
84019
|
-
);
|
|
84020
|
-
const tableRef = React.useRef(null);
|
|
84021
|
-
const containerRef = React.useRef(null);
|
|
84022
|
-
React.useEffect(() => {
|
|
84023
|
-
if (isMaterializedView && materializedViewConfig?.height === "dynamic") {
|
|
84024
|
-
const calculateHeight = () => {
|
|
84025
|
-
if (!containerRef.current) return;
|
|
84026
|
-
const container = containerRef.current;
|
|
84027
|
-
const rect = container.getBoundingClientRect();
|
|
84028
|
-
const viewportHeight = window.innerHeight;
|
|
84029
|
-
const availableHeight = viewportHeight - rect.top - 100;
|
|
84030
|
-
const minHeight = typeof materializedViewConfig.minHeight === "number" ? materializedViewConfig.minHeight : 200;
|
|
84031
|
-
const maxHeight = typeof materializedViewConfig.maxHeight === "number" ? materializedViewConfig.maxHeight : availableHeight;
|
|
84032
|
-
const calculatedHeight = Math.max(
|
|
84033
|
-
minHeight,
|
|
84034
|
-
Math.min(maxHeight, availableHeight)
|
|
84035
|
-
);
|
|
84036
|
-
setDynamicHeight(calculatedHeight);
|
|
84037
|
-
};
|
|
84038
|
-
calculateHeight();
|
|
84039
|
-
window.addEventListener("resize", calculateHeight);
|
|
84040
|
-
return () => window.removeEventListener("resize", calculateHeight);
|
|
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"
|
|
84041
84762
|
}
|
|
84042
|
-
}
|
|
84043
|
-
|
|
84044
|
-
|
|
84045
|
-
|
|
84046
|
-
|
|
84047
|
-
|
|
84048
|
-
|
|
84049
|
-
|
|
84050
|
-
|
|
84051
|
-
|
|
84052
|
-
|
|
84053
|
-
|
|
84054
|
-
|
|
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();
|
|
84055
84802
|
}
|
|
84056
|
-
|
|
84057
|
-
|
|
84058
|
-
|
|
84059
|
-
|
|
84060
|
-
|
|
84061
|
-
|
|
84062
|
-
|
|
84063
|
-
|
|
84064
|
-
|
|
84065
|
-
|
|
84066
|
-
|
|
84067
|
-
|
|
84068
|
-
|
|
84069
|
-
|
|
84070
|
-
|
|
84071
|
-
|
|
84072
|
-
|
|
84073
|
-
|
|
84074
|
-
|
|
84075
|
-
|
|
84076
|
-
|
|
84077
|
-
|
|
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
|
+
)
|
|
84078
84890
|
);
|
|
84079
|
-
setMaterializedData((prev2) => [...prev2, ...newData]);
|
|
84080
|
-
setHasMoreData(newData.length === loadSize);
|
|
84081
|
-
setIsLoadingMore(false);
|
|
84082
84891
|
}
|
|
84892
|
+
return Reflect.get(target, key);
|
|
84083
84893
|
}
|
|
84084
|
-
}
|
|
84085
|
-
|
|
84086
|
-
|
|
84087
|
-
|
|
84088
|
-
|
|
84089
|
-
|
|
84090
|
-
|
|
84091
|
-
|
|
84092
|
-
|
|
84093
|
-
|
|
84094
|
-
|
|
84095
|
-
|
|
84096
|
-
|
|
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);
|
|
84097
84929
|
}
|
|
84098
|
-
return
|
|
84099
|
-
|
|
84100
|
-
|
|
84101
|
-
|
|
84102
|
-
|
|
84103
|
-
|
|
84104
|
-
|
|
84105
|
-
|
|
84106
|
-
|
|
84107
|
-
|
|
84108
|
-
)
|
|
84109
|
-
};
|
|
84110
|
-
}, [isMaterializedView, pagination]);
|
|
84111
|
-
const scrollConfig = React.useMemo(() => {
|
|
84112
|
-
if (isMaterializedView) {
|
|
84113
|
-
const height = materializedViewConfig?.height === "dynamic" ? dynamicHeight : materializedViewConfig?.height || 400;
|
|
84114
|
-
return {
|
|
84115
|
-
...rest.scroll,
|
|
84116
|
-
y: height
|
|
84117
|
-
};
|
|
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;
|
|
84118
84940
|
}
|
|
84119
|
-
|
|
84120
|
-
|
|
84121
|
-
|
|
84122
|
-
|
|
84123
|
-
|
|
84124
|
-
const sampleRecord = tableDataSource[0];
|
|
84125
|
-
if (typeof rowKey === "string") {
|
|
84126
|
-
if (!(rowKey in sampleRecord)) {
|
|
84127
|
-
const error2 = new Error(`rowKey "${rowKey}" does not exist in data records`);
|
|
84128
|
-
console.error(`Genesis Table: ${error2.message}. Available keys:`, Object.keys(sampleRecord));
|
|
84129
|
-
onRowKeyError?.({
|
|
84130
|
-
record: sampleRecord,
|
|
84131
|
-
rowKey,
|
|
84132
|
-
index: 0,
|
|
84133
|
-
error: error2
|
|
84134
|
-
});
|
|
84135
|
-
}
|
|
84136
|
-
}
|
|
84137
|
-
const keys2 = tableDataSource.map(
|
|
84138
|
-
(record, index2) => getRowKey(record, rowKey, index2, false)
|
|
84139
|
-
// Don't log individual errors here
|
|
84140
|
-
);
|
|
84141
|
-
const uniqueKeys = [...new Set(keys2)];
|
|
84142
|
-
if (keys2.length !== uniqueKeys.length) {
|
|
84143
|
-
const error2 = new Error(`Duplicate row keys detected`);
|
|
84144
|
-
console.error(`Genesis Table: ${error2.message}!`, {
|
|
84145
|
-
totalKeys: keys2.length,
|
|
84146
|
-
uniqueKeys: uniqueKeys.length,
|
|
84147
|
-
duplicates: keys2.filter((key, index2) => keys2.indexOf(key) !== index2)
|
|
84148
|
-
});
|
|
84149
|
-
onRowKeyError?.({
|
|
84150
|
-
record: tableDataSource[0],
|
|
84151
|
-
rowKey,
|
|
84152
|
-
index: 0,
|
|
84153
|
-
error: error2
|
|
84154
|
-
});
|
|
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();
|
|
84155
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;
|
|
84156
84957
|
}
|
|
84157
|
-
|
|
84158
|
-
|
|
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);
|
|
85091
|
+
}
|
|
85092
|
+
};
|
|
85093
|
+
const recreateThenable = () => {
|
|
85094
|
+
const pending = this.#currentThenable = nextResult.promise = pendingThenable();
|
|
85095
|
+
finalizeThenableIfPossible(pending);
|
|
85096
|
+
};
|
|
85097
|
+
const prevThenable = this.#currentThenable;
|
|
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");
|
|
85144
|
+
}
|
|
85145
|
+
return Object.keys(this.#currentResult).some((key) => {
|
|
85146
|
+
const typedKey = key;
|
|
85147
|
+
const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
|
|
85148
|
+
return changed && includedProps.has(typedKey);
|
|
85149
|
+
});
|
|
85150
|
+
};
|
|
85151
|
+
this.#notify({ listeners: shouldNotifyListeners() });
|
|
85152
|
+
}
|
|
85153
|
+
#updateQuery() {
|
|
85154
|
+
const query = this.#client.getQueryCache().build(this.#client, this.options);
|
|
85155
|
+
if (query === this.#currentQuery) {
|
|
85156
|
+
return;
|
|
85157
|
+
}
|
|
85158
|
+
const prevQuery = this.#currentQuery;
|
|
85159
|
+
this.#currentQuery = query;
|
|
85160
|
+
this.#currentQueryInitialState = query.state;
|
|
85161
|
+
if (this.hasListeners()) {
|
|
85162
|
+
prevQuery?.removeObserver(this);
|
|
85163
|
+
query.addObserver(this);
|
|
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
|
+
}
|
|
85303
|
+
}
|
|
85304
|
+
};
|
|
85305
|
+
}
|
|
85306
|
+
function getNextPageParam(options, { pages, pageParams }) {
|
|
85307
|
+
const lastIndex = pages.length - 1;
|
|
85308
|
+
return pages.length > 0 ? options.getNextPageParam(
|
|
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" }
|
|
85358
|
+
}
|
|
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
|
+
};
|
|
85383
|
+
return result;
|
|
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;
|
|
85401
|
+
return {
|
|
85402
|
+
clearReset: () => {
|
|
85403
|
+
isReset = false;
|
|
85404
|
+
},
|
|
85405
|
+
reset: () => {
|
|
85406
|
+
isReset = true;
|
|
85407
|
+
},
|
|
85408
|
+
isReset: () => {
|
|
85409
|
+
return isReset;
|
|
85410
|
+
}
|
|
85411
|
+
};
|
|
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
|
+
};
|
|
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
|
+
const ResizableTitle = (props) => {
|
|
85542
|
+
const { onResize: onResize2, width, ...restProps } = props;
|
|
85543
|
+
if (!width || !onResize2) {
|
|
85544
|
+
return /* @__PURE__ */ jsx("th", { ...restProps });
|
|
85545
|
+
}
|
|
85546
|
+
return /* @__PURE__ */ jsxs("th", { ...restProps, style: { ...restProps.style, position: "relative" }, children: [
|
|
85547
|
+
restProps.children,
|
|
85548
|
+
/* @__PURE__ */ jsx(
|
|
85549
|
+
"div",
|
|
85550
|
+
{
|
|
85551
|
+
style: {
|
|
85552
|
+
position: "absolute",
|
|
85553
|
+
right: "-5px",
|
|
85554
|
+
top: 0,
|
|
85555
|
+
height: "100%",
|
|
85556
|
+
width: "10px",
|
|
85557
|
+
cursor: "col-resize",
|
|
85558
|
+
zIndex: 1
|
|
85559
|
+
},
|
|
85560
|
+
onClick: (e3) => e3.stopPropagation(),
|
|
85561
|
+
onMouseDown: (e3) => {
|
|
85562
|
+
e3.stopPropagation();
|
|
85563
|
+
e3.preventDefault();
|
|
85564
|
+
const startX = e3.clientX;
|
|
85565
|
+
const startWidth = e3.target.parentElement?.offsetWidth || 150;
|
|
85566
|
+
const doDrag = (dragEvent) => {
|
|
85567
|
+
const newWidth = startWidth + (dragEvent.clientX - startX);
|
|
85568
|
+
if (newWidth > 50) {
|
|
85569
|
+
onResize2(newWidth);
|
|
85570
|
+
}
|
|
85571
|
+
};
|
|
85572
|
+
const stopDrag = () => {
|
|
85573
|
+
document.removeEventListener("mousemove", doDrag);
|
|
85574
|
+
document.removeEventListener("mouseup", stopDrag);
|
|
85575
|
+
};
|
|
85576
|
+
document.addEventListener("mousemove", doDrag);
|
|
85577
|
+
document.addEventListener("mouseup", stopDrag);
|
|
85578
|
+
}
|
|
85579
|
+
}
|
|
85580
|
+
)
|
|
85581
|
+
] });
|
|
85582
|
+
};
|
|
85583
|
+
const InfiniteScrollTable = ({
|
|
85584
|
+
instanceId,
|
|
85585
|
+
columns: initialColumns,
|
|
85586
|
+
fetchService,
|
|
85587
|
+
title,
|
|
85588
|
+
scrollHeight = 600,
|
|
85589
|
+
scrollWidth = 1300
|
|
85590
|
+
}) => {
|
|
85591
|
+
const observer = useRef();
|
|
85592
|
+
const [scrollableNode, setScrollableNode] = useState(
|
|
85593
|
+
null
|
|
85594
|
+
);
|
|
85595
|
+
const tableContainerRef = useCallback((node2) => {
|
|
85596
|
+
if (node2 !== null) {
|
|
85597
|
+
const scrollNode = node2.querySelector(".ant-table-body");
|
|
85598
|
+
setScrollableNode(scrollNode);
|
|
85599
|
+
}
|
|
85600
|
+
}, []);
|
|
85601
|
+
const {
|
|
85602
|
+
data,
|
|
85603
|
+
error: error2,
|
|
85604
|
+
fetchNextPage,
|
|
85605
|
+
hasNextPage: hasNextPage2,
|
|
85606
|
+
isFetchingNextPage,
|
|
85607
|
+
status
|
|
85608
|
+
} = useInfiniteQuery({
|
|
85609
|
+
queryKey: fetchService.queryKey,
|
|
85610
|
+
queryFn: fetchService.fetchData,
|
|
85611
|
+
initialPageParam: 1,
|
|
85612
|
+
getNextPageParam: (lastPage) => lastPage.hasNextPage ? lastPage.nextPage : void 0
|
|
85613
|
+
});
|
|
85614
|
+
const [columns, setColumns] = useState(initialColumns);
|
|
85615
|
+
const handleResize = (index2) => (newWidth) => {
|
|
85616
|
+
setColumns((prevColumns) => {
|
|
85617
|
+
const nextColumns = [...prevColumns];
|
|
85618
|
+
nextColumns[index2] = { ...nextColumns[index2], width: newWidth };
|
|
85619
|
+
return nextColumns;
|
|
85620
|
+
});
|
|
85621
|
+
};
|
|
85622
|
+
const resizableColumns = columns.map((col, index2) => ({
|
|
85623
|
+
...col,
|
|
85624
|
+
onHeaderCell: (column2) => ({
|
|
85625
|
+
width: column2.width,
|
|
85626
|
+
onResize: handleResize(index2)
|
|
85627
|
+
})
|
|
85628
|
+
}));
|
|
85629
|
+
const lastRowRef = useCallback(
|
|
85630
|
+
(node2) => {
|
|
85631
|
+
if (isFetchingNextPage || !scrollableNode) return;
|
|
85632
|
+
if (observer.current) observer.current.disconnect();
|
|
85633
|
+
observer.current = new IntersectionObserver(
|
|
85634
|
+
(entries) => {
|
|
85635
|
+
if (entries[0].isIntersecting && hasNextPage2) {
|
|
85636
|
+
fetchNextPage();
|
|
85637
|
+
}
|
|
85638
|
+
},
|
|
85639
|
+
{ root: scrollableNode, threshold: 0.5 }
|
|
85640
|
+
);
|
|
85641
|
+
if (node2) observer.current.observe(node2);
|
|
85642
|
+
},
|
|
85643
|
+
[isFetchingNextPage, hasNextPage2, fetchNextPage, scrollableNode]
|
|
85644
|
+
);
|
|
85645
|
+
const dataSource = data?.pages.flatMap((page) => page.docs) ?? [];
|
|
85646
|
+
data?.pages?.[0]?.totalDocs ?? 0;
|
|
85647
|
+
if (status === "pending") {
|
|
85648
|
+
return /* @__PURE__ */ jsx(
|
|
85649
|
+
"div",
|
|
85650
|
+
{
|
|
85651
|
+
style: { display: "flex", justifyContent: "center", padding: "50px" },
|
|
85652
|
+
children: /* @__PURE__ */ jsx(Spin, { size: "large" })
|
|
85653
|
+
}
|
|
85654
|
+
);
|
|
85655
|
+
}
|
|
85656
|
+
if (status === "error") {
|
|
85657
|
+
return /* @__PURE__ */ jsx(
|
|
85658
|
+
Alert,
|
|
85659
|
+
{
|
|
85660
|
+
message: "Error",
|
|
85661
|
+
description: error2?.message,
|
|
85662
|
+
type: "error",
|
|
85663
|
+
showIcon: true
|
|
85664
|
+
}
|
|
85665
|
+
);
|
|
85666
|
+
}
|
|
85667
|
+
return /* @__PURE__ */ jsxs(
|
|
85668
|
+
"div",
|
|
85669
|
+
{
|
|
85670
|
+
style: {
|
|
85671
|
+
backgroundColor: "white",
|
|
85672
|
+
padding: "24px",
|
|
85673
|
+
borderRadius: "8px",
|
|
85674
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",
|
|
85675
|
+
marginBottom: "24px"
|
|
85676
|
+
},
|
|
85677
|
+
ref: tableContainerRef,
|
|
85678
|
+
children: [
|
|
85679
|
+
/* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
|
|
85680
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
85681
|
+
.infinite-scroll-table .ant-pagination {
|
|
85682
|
+
display: none !important;
|
|
85683
|
+
}
|
|
85684
|
+
` }),
|
|
85685
|
+
/* @__PURE__ */ jsx("div", { className: "infinite-scroll-table", children: /* @__PURE__ */ jsx(
|
|
85686
|
+
ForwardTable,
|
|
85687
|
+
{
|
|
85688
|
+
dataSource,
|
|
85689
|
+
columns: resizableColumns,
|
|
85690
|
+
components: { header: { cell: ResizableTitle } },
|
|
85691
|
+
rowKey: "id",
|
|
85692
|
+
pagination: false,
|
|
85693
|
+
showSorterTooltip: false,
|
|
85694
|
+
size: "small",
|
|
85695
|
+
scroll: { y: scrollHeight, x: scrollWidth },
|
|
85696
|
+
onChange: () => {
|
|
85697
|
+
},
|
|
85698
|
+
onRow: (record, index2) => {
|
|
85699
|
+
if (index2 === dataSource.length - 1) {
|
|
85700
|
+
return { ref: lastRowRef };
|
|
85701
|
+
}
|
|
85702
|
+
return {};
|
|
85703
|
+
}
|
|
85704
|
+
}
|
|
85705
|
+
) }),
|
|
85706
|
+
isFetchingNextPage && /* @__PURE__ */ jsx(
|
|
85707
|
+
"div",
|
|
85708
|
+
{
|
|
85709
|
+
style: {
|
|
85710
|
+
position: "absolute",
|
|
85711
|
+
bottom: 0,
|
|
85712
|
+
left: 0,
|
|
85713
|
+
width: "100%",
|
|
85714
|
+
padding: "16px",
|
|
85715
|
+
display: "flex",
|
|
85716
|
+
justifyContent: "center",
|
|
85717
|
+
alignItems: "center",
|
|
85718
|
+
backgroundColor: "rgba(255, 255, 255, 0.7)",
|
|
85719
|
+
backdropFilter: "blur(2px)",
|
|
85720
|
+
zIndex: 10
|
|
85721
|
+
},
|
|
85722
|
+
children: /* @__PURE__ */ jsx(Spin, {})
|
|
85723
|
+
}
|
|
85724
|
+
)
|
|
85725
|
+
] }),
|
|
85726
|
+
!hasNextPage2 && /* @__PURE__ */ jsx(
|
|
85727
|
+
"div",
|
|
85728
|
+
{
|
|
85729
|
+
style: {
|
|
85730
|
+
textAlign: "center",
|
|
85731
|
+
padding: "20px",
|
|
85732
|
+
borderTop: "1px solid #f0f0f0"
|
|
85733
|
+
},
|
|
85734
|
+
children: /* @__PURE__ */ jsx(Typography$1.Text, { type: "secondary", children: "No more rows to load." })
|
|
85735
|
+
}
|
|
85736
|
+
)
|
|
85737
|
+
]
|
|
85738
|
+
}
|
|
85739
|
+
);
|
|
85740
|
+
};
|
|
85741
|
+
const getRowKey = (record, rowKey, index2, enableValidation = true) => {
|
|
85742
|
+
try {
|
|
85743
|
+
const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
|
|
85744
|
+
if (enableValidation) {
|
|
85745
|
+
if (key === void 0 || key === null) {
|
|
85746
|
+
console.error(
|
|
85747
|
+
`Genesis Table: rowKey "${String(rowKey)}" returned undefined/null for record at index ${index2}.`,
|
|
85748
|
+
{
|
|
85749
|
+
record,
|
|
85750
|
+
rowKey,
|
|
85751
|
+
availableKeys: Object.keys(record)
|
|
85752
|
+
}
|
|
85753
|
+
);
|
|
85754
|
+
return `fallback-${index2}`;
|
|
85755
|
+
}
|
|
85756
|
+
if (typeof key === "string" && String(key).trim() === "") {
|
|
85757
|
+
console.warn(
|
|
85758
|
+
`Genesis Table: rowKey "${String(rowKey)}" returned empty string for record at index ${index2}.`,
|
|
85759
|
+
{
|
|
85760
|
+
record,
|
|
85761
|
+
rowKey
|
|
85762
|
+
}
|
|
85763
|
+
);
|
|
85764
|
+
return `fallback-${index2}`;
|
|
85765
|
+
}
|
|
85766
|
+
}
|
|
85767
|
+
return key;
|
|
85768
|
+
} catch (error2) {
|
|
85769
|
+
if (enableValidation) {
|
|
85770
|
+
console.error(
|
|
85771
|
+
`Genesis Table: Error accessing rowKey "${String(rowKey)}" for record at index ${index2}.`,
|
|
85772
|
+
{
|
|
85773
|
+
error: error2,
|
|
85774
|
+
record,
|
|
85775
|
+
rowKey,
|
|
85776
|
+
availableKeys: Object.keys(record)
|
|
85777
|
+
}
|
|
85778
|
+
);
|
|
85779
|
+
}
|
|
85780
|
+
return `fallback-${index2}`;
|
|
85781
|
+
}
|
|
85782
|
+
};
|
|
85783
|
+
function Table({
|
|
85784
|
+
columns,
|
|
85785
|
+
dataSource,
|
|
85786
|
+
rowKey = "id",
|
|
85787
|
+
size = "small",
|
|
85788
|
+
onChange,
|
|
85789
|
+
rowSelection,
|
|
85790
|
+
onRowClick,
|
|
85791
|
+
pagination,
|
|
85792
|
+
isMainContentCell = false,
|
|
85793
|
+
isInfiniteScroll = false,
|
|
85794
|
+
infiniteScrollConfig,
|
|
85795
|
+
enableRowKeyValidation = process.env.NODE_ENV === "development",
|
|
85796
|
+
onRowKeyError,
|
|
85797
|
+
...rest
|
|
85798
|
+
}) {
|
|
85799
|
+
const [selectedRowKeys, setSelectedRowKeys] = React.useState([]);
|
|
85800
|
+
const [pressedRowKey, setPressedRowKey] = React.useState(
|
|
85801
|
+
null
|
|
85802
|
+
);
|
|
85803
|
+
const tableRef = React.useRef(null);
|
|
85804
|
+
const containerRef = React.useRef(null);
|
|
85805
|
+
const paginationConfig = React.useMemo(() => {
|
|
85806
|
+
if (!pagination) return false;
|
|
85807
|
+
return {
|
|
85808
|
+
...pagination,
|
|
85809
|
+
showSizeChanger: false,
|
|
85810
|
+
// Disable Ant Design's size changer
|
|
85811
|
+
showQuickJumper: false,
|
|
85812
|
+
// Disable Ant Design's quick jumper
|
|
85813
|
+
showTotal: void 0,
|
|
85814
|
+
// Disable Ant Design's total display
|
|
85815
|
+
itemRender: void 0,
|
|
85816
|
+
// Clear any existing itemRender to avoid conflicts
|
|
85817
|
+
render: (properties) => /* @__PURE__ */ jsx(
|
|
85818
|
+
CustomPagination,
|
|
85819
|
+
{
|
|
85820
|
+
...properties,
|
|
85821
|
+
paginationStyle: pagination && typeof pagination === "object" && "paginationStyle" in pagination ? pagination.paginationStyle : PaginationStyle.SIMPLE
|
|
85822
|
+
}
|
|
85823
|
+
)
|
|
85824
|
+
};
|
|
85825
|
+
}, [pagination]);
|
|
85826
|
+
const scrollConfig = React.useMemo(() => {
|
|
85827
|
+
return rest.scroll;
|
|
85828
|
+
}, [rest.scroll]);
|
|
85829
|
+
if (isInfiniteScroll && infiniteScrollConfig) {
|
|
85830
|
+
const resizableColumns = columns.map((col) => ({
|
|
85831
|
+
title: col.title,
|
|
85832
|
+
key: col.key,
|
|
85833
|
+
dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
|
|
85834
|
+
width: col.width || 150,
|
|
85835
|
+
render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
|
|
85836
|
+
}));
|
|
85837
|
+
return /* @__PURE__ */ jsx(
|
|
85838
|
+
InfiniteScrollTable,
|
|
85839
|
+
{
|
|
85840
|
+
instanceId: infiniteScrollConfig.instanceId,
|
|
85841
|
+
columns: resizableColumns,
|
|
85842
|
+
fetchService: infiniteScrollConfig.fetchService,
|
|
85843
|
+
title: infiniteScrollConfig.title,
|
|
85844
|
+
scrollHeight: infiniteScrollConfig.scrollHeight,
|
|
85845
|
+
scrollWidth: infiniteScrollConfig.scrollWidth
|
|
85846
|
+
}
|
|
85847
|
+
);
|
|
85848
|
+
}
|
|
85849
|
+
React.useEffect(() => {
|
|
85850
|
+
if (enableRowKeyValidation && dataSource.length > 0) {
|
|
85851
|
+
const sampleRecord = dataSource[0];
|
|
85852
|
+
if (typeof rowKey === "string" && !(rowKey in sampleRecord)) {
|
|
85853
|
+
const error2 = new Error(
|
|
85854
|
+
`rowKey "${rowKey}" does not exist in data records`
|
|
85855
|
+
);
|
|
85856
|
+
console.error(
|
|
85857
|
+
`Genesis Table: ${error2.message}. Available keys:`,
|
|
85858
|
+
Object.keys(sampleRecord)
|
|
85859
|
+
);
|
|
85860
|
+
onRowKeyError?.({
|
|
85861
|
+
record: sampleRecord,
|
|
85862
|
+
rowKey,
|
|
85863
|
+
index: 0,
|
|
85864
|
+
error: error2
|
|
85865
|
+
});
|
|
85866
|
+
}
|
|
85867
|
+
const keys2 = dataSource.map(
|
|
85868
|
+
(record, index2) => getRowKey(record, rowKey, index2, false)
|
|
85869
|
+
// Don't log individual errors here
|
|
85870
|
+
);
|
|
85871
|
+
const uniqueKeys = [...new Set(keys2)];
|
|
85872
|
+
if (keys2.length !== uniqueKeys.length) {
|
|
85873
|
+
const error2 = new Error(`Duplicate row keys detected`);
|
|
85874
|
+
console.error(`Genesis Table: ${error2.message}!`, {
|
|
85875
|
+
totalKeys: keys2.length,
|
|
85876
|
+
uniqueKeys: uniqueKeys.length,
|
|
85877
|
+
duplicates: keys2.filter((key, index2) => keys2.indexOf(key) !== index2)
|
|
85878
|
+
});
|
|
85879
|
+
onRowKeyError?.({
|
|
85880
|
+
record: dataSource[0],
|
|
85881
|
+
rowKey,
|
|
85882
|
+
index: 0,
|
|
85883
|
+
error: error2
|
|
85884
|
+
});
|
|
85885
|
+
}
|
|
85886
|
+
}
|
|
85887
|
+
}, [dataSource, rowKey, enableRowKeyValidation, onRowKeyError]);
|
|
85888
|
+
const handleRowMouseDown = React.useCallback(
|
|
84159
85889
|
(record, index2, event) => {
|
|
84160
85890
|
const target = event.target;
|
|
84161
85891
|
const isInteractiveElement = target.closest(
|
|
@@ -84164,7 +85894,12 @@ function Table({
|
|
|
84164
85894
|
if (isInteractiveElement) {
|
|
84165
85895
|
return;
|
|
84166
85896
|
}
|
|
84167
|
-
const recordKey = getRowKey(
|
|
85897
|
+
const recordKey = getRowKey(
|
|
85898
|
+
record,
|
|
85899
|
+
rowKey,
|
|
85900
|
+
index2,
|
|
85901
|
+
enableRowKeyValidation
|
|
85902
|
+
);
|
|
84168
85903
|
setPressedRowKey(recordKey);
|
|
84169
85904
|
},
|
|
84170
85905
|
[rowKey, enableRowKeyValidation]
|
|
@@ -84205,42 +85940,62 @@ function Table({
|
|
|
84205
85940
|
}
|
|
84206
85941
|
};
|
|
84207
85942
|
}, [rowSelection, selectedRowKeys]);
|
|
84208
|
-
return /* @__PURE__ */
|
|
84209
|
-
|
|
84210
|
-
|
|
84211
|
-
|
|
84212
|
-
|
|
84213
|
-
|
|
84214
|
-
|
|
84215
|
-
|
|
84216
|
-
|
|
84217
|
-
|
|
84218
|
-
|
|
84219
|
-
|
|
84220
|
-
|
|
84221
|
-
|
|
84222
|
-
|
|
84223
|
-
|
|
84224
|
-
|
|
84225
|
-
|
|
84226
|
-
|
|
84227
|
-
|
|
84228
|
-
|
|
84229
|
-
|
|
84230
|
-
|
|
84231
|
-
|
|
84232
|
-
|
|
84233
|
-
|
|
84234
|
-
|
|
84235
|
-
|
|
84236
|
-
|
|
84237
|
-
|
|
84238
|
-
|
|
84239
|
-
|
|
84240
|
-
|
|
84241
|
-
|
|
84242
|
-
|
|
84243
|
-
|
|
85943
|
+
return /* @__PURE__ */ jsxs("div", { ref: containerRef, children: [
|
|
85944
|
+
/* @__PURE__ */ jsx("style", { children: `
|
|
85945
|
+
.genesis-table .ant-pagination {
|
|
85946
|
+
display: none !important;
|
|
85947
|
+
}
|
|
85948
|
+
.genesis-table .ant-pagination-item {
|
|
85949
|
+
display: none !important;
|
|
85950
|
+
}
|
|
85951
|
+
.genesis-table .ant-pagination-prev {
|
|
85952
|
+
display: none !important;
|
|
85953
|
+
}
|
|
85954
|
+
.genesis-table .ant-pagination-next {
|
|
85955
|
+
display: none !important;
|
|
85956
|
+
}
|
|
85957
|
+
` }),
|
|
85958
|
+
/* @__PURE__ */ jsx("div", { className: "genesis-table", children: /* @__PURE__ */ jsx(
|
|
85959
|
+
Table$1,
|
|
85960
|
+
{
|
|
85961
|
+
ref: tableRef,
|
|
85962
|
+
"data-testid": "Table",
|
|
85963
|
+
dataSource,
|
|
85964
|
+
columns,
|
|
85965
|
+
rowKey,
|
|
85966
|
+
locale: { emptyText: "No Data" },
|
|
85967
|
+
size,
|
|
85968
|
+
onChange,
|
|
85969
|
+
rowSelection: enhancedRowSelection,
|
|
85970
|
+
onRow: (record, index2) => {
|
|
85971
|
+
const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
|
|
85972
|
+
const recordKey = getRowKey(
|
|
85973
|
+
record,
|
|
85974
|
+
rowKey,
|
|
85975
|
+
index2 ?? 0,
|
|
85976
|
+
enableRowKeyValidation
|
|
85977
|
+
);
|
|
85978
|
+
const isPressed = pressedRowKey === recordKey;
|
|
85979
|
+
return {
|
|
85980
|
+
onClick: (event) => handleRowClick(record, index2 ?? 0, event),
|
|
85981
|
+
onMouseDown: (event) => handleRowMouseDown(record, index2 ?? 0, event),
|
|
85982
|
+
onMouseUp: (event) => handleRowMouseUp(record, index2 ?? 0, event),
|
|
85983
|
+
onMouseLeave: () => setPressedRowKey(null),
|
|
85984
|
+
// Clear pressed state when mouse leaves
|
|
85985
|
+
style: {
|
|
85986
|
+
cursor: onRowClick ? "pointer" : "default",
|
|
85987
|
+
opacity: isDisabled ? 0.6 : 1
|
|
85988
|
+
},
|
|
85989
|
+
className: isPressed ? "ant-table-row-pressed" : ""
|
|
85990
|
+
};
|
|
85991
|
+
},
|
|
85992
|
+
pagination: paginationConfig,
|
|
85993
|
+
scroll: scrollConfig,
|
|
85994
|
+
$isMainContentCell: isMainContentCell,
|
|
85995
|
+
...rest
|
|
85996
|
+
}
|
|
85997
|
+
) })
|
|
85998
|
+
] });
|
|
84244
85999
|
}
|
|
84245
86000
|
const TablePagination = ({
|
|
84246
86001
|
columns,
|
|
@@ -84704,18 +86459,16 @@ const TableWithControls = ({
|
|
|
84704
86459
|
tableData,
|
|
84705
86460
|
tableControlsData: tableControlsData2,
|
|
84706
86461
|
onChange,
|
|
84707
|
-
onRowClick
|
|
86462
|
+
onRowClick,
|
|
86463
|
+
tableType = "table",
|
|
86464
|
+
isInfiniteScroll,
|
|
86465
|
+
// Deprecated: use tableType instead
|
|
86466
|
+
infiniteScrollConfig,
|
|
86467
|
+
paginationStyle
|
|
84708
86468
|
}) => {
|
|
84709
86469
|
const { primaryTableRowData, secondaryTableRowData } = tableControlsData2;
|
|
84710
|
-
const {
|
|
84711
|
-
|
|
84712
|
-
columns,
|
|
84713
|
-
rowSelection,
|
|
84714
|
-
hasSettings,
|
|
84715
|
-
hasFilter,
|
|
84716
|
-
isMaterializedView,
|
|
84717
|
-
materializedViewConfig
|
|
84718
|
-
} = tableData;
|
|
86470
|
+
const { dataSource, columns, rowSelection, hasSettings, hasFilter } = tableData;
|
|
86471
|
+
const actualTableType = isInfiniteScroll ? "infiniteScroll" : tableType;
|
|
84719
86472
|
const onTableControlsChange = (event) => {
|
|
84720
86473
|
onChange(event);
|
|
84721
86474
|
};
|
|
@@ -84725,6 +86478,60 @@ const TableWithControls = ({
|
|
|
84725
86478
|
payload: { value: "tableChange", pagination, filters, sorter }
|
|
84726
86479
|
});
|
|
84727
86480
|
};
|
|
86481
|
+
const renderTable = () => {
|
|
86482
|
+
switch (actualTableType) {
|
|
86483
|
+
case "infiniteScroll": {
|
|
86484
|
+
if (!infiniteScrollConfig) {
|
|
86485
|
+
console.warn("InfiniteScrollTable requires infiniteScrollConfig");
|
|
86486
|
+
return null;
|
|
86487
|
+
}
|
|
86488
|
+
const resizableColumns = columns.map((col) => ({
|
|
86489
|
+
title: col.title,
|
|
86490
|
+
key: col.key,
|
|
86491
|
+
dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
|
|
86492
|
+
width: col.width || 150,
|
|
86493
|
+
render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
|
|
86494
|
+
}));
|
|
86495
|
+
return /* @__PURE__ */ jsx(
|
|
86496
|
+
InfiniteScrollTable,
|
|
86497
|
+
{
|
|
86498
|
+
instanceId: infiniteScrollConfig.instanceId,
|
|
86499
|
+
columns: resizableColumns,
|
|
86500
|
+
fetchService: infiniteScrollConfig.fetchService,
|
|
86501
|
+
title: infiniteScrollConfig.title,
|
|
86502
|
+
scrollHeight: infiniteScrollConfig.scrollHeight,
|
|
86503
|
+
scrollWidth: infiniteScrollConfig.scrollWidth
|
|
86504
|
+
}
|
|
86505
|
+
);
|
|
86506
|
+
}
|
|
86507
|
+
case "pagination": {
|
|
86508
|
+
return /* @__PURE__ */ jsx(
|
|
86509
|
+
TablePagination,
|
|
86510
|
+
{
|
|
86511
|
+
dataSource,
|
|
86512
|
+
columns,
|
|
86513
|
+
rowSelection,
|
|
86514
|
+
onChange: onTableChange,
|
|
86515
|
+
onRowClick,
|
|
86516
|
+
paginationStyle
|
|
86517
|
+
}
|
|
86518
|
+
);
|
|
86519
|
+
}
|
|
86520
|
+
case "table":
|
|
86521
|
+
default: {
|
|
86522
|
+
return /* @__PURE__ */ jsx(
|
|
86523
|
+
Table,
|
|
86524
|
+
{
|
|
86525
|
+
dataSource,
|
|
86526
|
+
columns,
|
|
86527
|
+
rowSelection,
|
|
86528
|
+
onChange: onTableChange,
|
|
86529
|
+
onRowClick
|
|
86530
|
+
}
|
|
86531
|
+
);
|
|
86532
|
+
}
|
|
86533
|
+
}
|
|
86534
|
+
};
|
|
84728
86535
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
84729
86536
|
/* @__PURE__ */ jsx(
|
|
84730
86537
|
TableControls,
|
|
@@ -84734,20 +86541,845 @@ const TableWithControls = ({
|
|
|
84734
86541
|
onChange: onTableControlsChange
|
|
84735
86542
|
}
|
|
84736
86543
|
),
|
|
84737
|
-
|
|
84738
|
-
Table,
|
|
84739
|
-
{
|
|
84740
|
-
dataSource,
|
|
84741
|
-
columns,
|
|
84742
|
-
rowSelection,
|
|
84743
|
-
onChange: onTableChange,
|
|
84744
|
-
onRowClick,
|
|
84745
|
-
isMaterializedView,
|
|
84746
|
-
materializedViewConfig
|
|
84747
|
-
}
|
|
84748
|
-
)
|
|
86544
|
+
renderTable()
|
|
84749
86545
|
] });
|
|
84750
86546
|
};
|
|
86547
|
+
const staticTableData = [
|
|
86548
|
+
{
|
|
86549
|
+
id: "1",
|
|
86550
|
+
number: "1",
|
|
86551
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
86552
|
+
status: "in_progress",
|
|
86553
|
+
address: {
|
|
86554
|
+
nickname: "Home",
|
|
86555
|
+
address: "123 Main St"
|
|
86556
|
+
},
|
|
86557
|
+
job_subtype: "delivery",
|
|
86558
|
+
progress: {
|
|
86559
|
+
firstBarData: {
|
|
86560
|
+
text: "Loading",
|
|
86561
|
+
status: "info",
|
|
86562
|
+
value: 100
|
|
86563
|
+
},
|
|
86564
|
+
secondBarData: {
|
|
86565
|
+
text: "Processing",
|
|
86566
|
+
status: "success",
|
|
86567
|
+
value: 25
|
|
86568
|
+
}
|
|
86569
|
+
}
|
|
86570
|
+
},
|
|
86571
|
+
{
|
|
86572
|
+
id: "2",
|
|
86573
|
+
number: "2",
|
|
86574
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
86575
|
+
status: "scheduled",
|
|
86576
|
+
address: {
|
|
86577
|
+
nickname: "Work",
|
|
86578
|
+
address: "456 Elm St"
|
|
86579
|
+
},
|
|
86580
|
+
job_subtype: "pickup",
|
|
86581
|
+
progress: {
|
|
86582
|
+
firstBarData: {
|
|
86583
|
+
text: "Preparing",
|
|
86584
|
+
status: "info",
|
|
86585
|
+
value: 100
|
|
86586
|
+
},
|
|
86587
|
+
secondBarData: {
|
|
86588
|
+
text: "Final Check",
|
|
86589
|
+
status: "success",
|
|
86590
|
+
value: 0
|
|
86591
|
+
}
|
|
86592
|
+
}
|
|
86593
|
+
},
|
|
86594
|
+
{
|
|
86595
|
+
id: "3",
|
|
86596
|
+
number: "3",
|
|
86597
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
86598
|
+
status: "scheduled",
|
|
86599
|
+
address: {
|
|
86600
|
+
nickname: "Store",
|
|
86601
|
+
address: "789 Oak St"
|
|
86602
|
+
},
|
|
86603
|
+
job_subtype: "delivery",
|
|
86604
|
+
progress: {
|
|
86605
|
+
firstBarData: {
|
|
86606
|
+
text: "Pending",
|
|
86607
|
+
status: "info",
|
|
86608
|
+
value: 0
|
|
86609
|
+
},
|
|
86610
|
+
secondBarData: {
|
|
86611
|
+
text: "Awaiting",
|
|
86612
|
+
status: "success",
|
|
86613
|
+
value: 0
|
|
86614
|
+
}
|
|
86615
|
+
}
|
|
86616
|
+
},
|
|
86617
|
+
{
|
|
86618
|
+
id: "4",
|
|
86619
|
+
number: "4",
|
|
86620
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
86621
|
+
status: "scheduled",
|
|
86622
|
+
address: {
|
|
86623
|
+
nickname: "Office",
|
|
86624
|
+
address: "321 Pine St"
|
|
86625
|
+
},
|
|
86626
|
+
job_subtype: "pickup",
|
|
86627
|
+
progress: {
|
|
86628
|
+
firstBarData: {
|
|
86629
|
+
text: "In Progress",
|
|
86630
|
+
status: "info",
|
|
86631
|
+
value: 100
|
|
86632
|
+
},
|
|
86633
|
+
secondBarData: {
|
|
86634
|
+
text: "Validation",
|
|
86635
|
+
status: "success",
|
|
86636
|
+
value: 30
|
|
86637
|
+
}
|
|
86638
|
+
}
|
|
86639
|
+
},
|
|
86640
|
+
{
|
|
86641
|
+
id: "5",
|
|
86642
|
+
number: "5",
|
|
86643
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
86644
|
+
status: "scheduled",
|
|
86645
|
+
address: {
|
|
86646
|
+
nickname: "Library",
|
|
86647
|
+
address: "555 Book Lane"
|
|
86648
|
+
},
|
|
86649
|
+
job_subtype: "delivery",
|
|
86650
|
+
progress: {
|
|
86651
|
+
firstBarData: {
|
|
86652
|
+
text: "Completed",
|
|
86653
|
+
status: "info",
|
|
86654
|
+
value: 100
|
|
86655
|
+
},
|
|
86656
|
+
secondBarData: {
|
|
86657
|
+
text: "Verified",
|
|
86658
|
+
status: "success",
|
|
86659
|
+
value: 100
|
|
86660
|
+
}
|
|
86661
|
+
}
|
|
86662
|
+
},
|
|
86663
|
+
{
|
|
86664
|
+
id: "6",
|
|
86665
|
+
number: "6",
|
|
86666
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
86667
|
+
status: "scheduled",
|
|
86668
|
+
address: {
|
|
86669
|
+
nickname: "Gym",
|
|
86670
|
+
address: "777 Fitness Ave"
|
|
86671
|
+
},
|
|
86672
|
+
job_subtype: "pickup",
|
|
86673
|
+
progress: {
|
|
86674
|
+
firstBarData: {
|
|
86675
|
+
text: "Phase 1",
|
|
86676
|
+
status: "info",
|
|
86677
|
+
value: 75
|
|
86678
|
+
},
|
|
86679
|
+
secondBarData: {
|
|
86680
|
+
text: "Phase 2",
|
|
86681
|
+
status: "success",
|
|
86682
|
+
value: 50
|
|
86683
|
+
}
|
|
86684
|
+
}
|
|
86685
|
+
},
|
|
86686
|
+
{
|
|
86687
|
+
id: "7",
|
|
86688
|
+
number: "7",
|
|
86689
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
86690
|
+
status: "scheduled",
|
|
86691
|
+
address: {
|
|
86692
|
+
nickname: "Mall",
|
|
86693
|
+
address: "888 Shopping Center"
|
|
86694
|
+
},
|
|
86695
|
+
job_subtype: "delivery",
|
|
86696
|
+
progress: {
|
|
86697
|
+
firstBarData: {
|
|
86698
|
+
text: "Queued",
|
|
86699
|
+
status: "info",
|
|
86700
|
+
value: 0
|
|
86701
|
+
},
|
|
86702
|
+
secondBarData: {
|
|
86703
|
+
text: "Waiting",
|
|
86704
|
+
status: "success",
|
|
86705
|
+
value: 0
|
|
86706
|
+
}
|
|
86707
|
+
}
|
|
86708
|
+
},
|
|
86709
|
+
{
|
|
86710
|
+
id: "8",
|
|
86711
|
+
number: "8",
|
|
86712
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
86713
|
+
status: "completed",
|
|
86714
|
+
address: {
|
|
86715
|
+
nickname: "School",
|
|
86716
|
+
address: "999 Education Rd"
|
|
86717
|
+
},
|
|
86718
|
+
job_subtype: "pickup",
|
|
86719
|
+
progress: {
|
|
86720
|
+
firstBarData: {
|
|
86721
|
+
text: "Delivered",
|
|
86722
|
+
status: "info",
|
|
86723
|
+
value: 100
|
|
86724
|
+
},
|
|
86725
|
+
secondBarData: {
|
|
86726
|
+
text: "Confirmed",
|
|
86727
|
+
status: "success",
|
|
86728
|
+
value: 100
|
|
86729
|
+
}
|
|
86730
|
+
}
|
|
86731
|
+
},
|
|
86732
|
+
{
|
|
86733
|
+
id: "9",
|
|
86734
|
+
number: "9",
|
|
86735
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
86736
|
+
status: "scheduled",
|
|
86737
|
+
address: {
|
|
86738
|
+
nickname: "Restaurant",
|
|
86739
|
+
address: "111 Food Court"
|
|
86740
|
+
},
|
|
86741
|
+
job_subtype: "delivery",
|
|
86742
|
+
progress: {
|
|
86743
|
+
firstBarData: {
|
|
86744
|
+
text: "Preparing",
|
|
86745
|
+
status: "info",
|
|
86746
|
+
value: 100
|
|
86747
|
+
},
|
|
86748
|
+
secondBarData: {
|
|
86749
|
+
text: "Quality Check",
|
|
86750
|
+
status: "success",
|
|
86751
|
+
value: 15
|
|
86752
|
+
}
|
|
86753
|
+
}
|
|
86754
|
+
},
|
|
86755
|
+
{
|
|
86756
|
+
id: "10",
|
|
86757
|
+
number: "10",
|
|
86758
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
86759
|
+
status: "scheduled",
|
|
86760
|
+
address: {
|
|
86761
|
+
nickname: "Park",
|
|
86762
|
+
address: "222 Green Ave"
|
|
86763
|
+
},
|
|
86764
|
+
job_subtype: "pickup",
|
|
86765
|
+
progress: {
|
|
86766
|
+
firstBarData: {
|
|
86767
|
+
text: "Processing",
|
|
86768
|
+
status: "info",
|
|
86769
|
+
value: 80
|
|
86770
|
+
},
|
|
86771
|
+
secondBarData: {
|
|
86772
|
+
text: "Review",
|
|
86773
|
+
status: "success",
|
|
86774
|
+
value: 0
|
|
86775
|
+
}
|
|
86776
|
+
}
|
|
86777
|
+
},
|
|
86778
|
+
{
|
|
86779
|
+
id: "11",
|
|
86780
|
+
number: "11",
|
|
86781
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
86782
|
+
status: "scheduled",
|
|
86783
|
+
address: {
|
|
86784
|
+
nickname: "Beach",
|
|
86785
|
+
address: "333 Shore Dr"
|
|
86786
|
+
},
|
|
86787
|
+
job_subtype: "delivery",
|
|
86788
|
+
progress: {
|
|
86789
|
+
firstBarData: {
|
|
86790
|
+
text: "Planning",
|
|
86791
|
+
status: "info",
|
|
86792
|
+
value: 40
|
|
86793
|
+
},
|
|
86794
|
+
secondBarData: {
|
|
86795
|
+
text: "Route Check",
|
|
86796
|
+
status: "success",
|
|
86797
|
+
value: 20
|
|
86798
|
+
}
|
|
86799
|
+
}
|
|
86800
|
+
},
|
|
86801
|
+
{
|
|
86802
|
+
id: "12",
|
|
86803
|
+
number: "12",
|
|
86804
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
86805
|
+
status: "scheduled",
|
|
86806
|
+
address: {
|
|
86807
|
+
nickname: "Hotel",
|
|
86808
|
+
address: "444 Stay Blvd"
|
|
86809
|
+
},
|
|
86810
|
+
job_subtype: "pickup",
|
|
86811
|
+
progress: {
|
|
86812
|
+
firstBarData: {
|
|
86813
|
+
text: "Scheduled",
|
|
86814
|
+
status: "info",
|
|
86815
|
+
value: 0
|
|
86816
|
+
},
|
|
86817
|
+
secondBarData: {
|
|
86818
|
+
text: "Awaiting",
|
|
86819
|
+
status: "success",
|
|
86820
|
+
value: 0
|
|
86821
|
+
}
|
|
86822
|
+
}
|
|
86823
|
+
},
|
|
86824
|
+
{
|
|
86825
|
+
id: "13",
|
|
86826
|
+
number: "13",
|
|
86827
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
86828
|
+
status: "scheduled",
|
|
86829
|
+
address: {
|
|
86830
|
+
nickname: "Airport",
|
|
86831
|
+
address: "666 Flight Way"
|
|
86832
|
+
},
|
|
86833
|
+
job_subtype: "delivery",
|
|
86834
|
+
progress: {
|
|
86835
|
+
firstBarData: {
|
|
86836
|
+
text: "Pre-flight",
|
|
86837
|
+
status: "info",
|
|
86838
|
+
value: 60
|
|
86839
|
+
},
|
|
86840
|
+
secondBarData: {
|
|
86841
|
+
text: "Security",
|
|
86842
|
+
status: "success",
|
|
86843
|
+
value: 30
|
|
86844
|
+
}
|
|
86845
|
+
}
|
|
86846
|
+
},
|
|
86847
|
+
{
|
|
86848
|
+
id: "14",
|
|
86849
|
+
number: "14",
|
|
86850
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
86851
|
+
status: "cancelled",
|
|
86852
|
+
address: {
|
|
86853
|
+
nickname: "Stadium",
|
|
86854
|
+
address: "777 Sports Complex"
|
|
86855
|
+
},
|
|
86856
|
+
job_subtype: "pickup",
|
|
86857
|
+
progress: {
|
|
86858
|
+
firstBarData: {
|
|
86859
|
+
text: "Cancelled",
|
|
86860
|
+
status: "info",
|
|
86861
|
+
value: 0
|
|
86862
|
+
},
|
|
86863
|
+
secondBarData: {
|
|
86864
|
+
text: "Refund",
|
|
86865
|
+
status: "success",
|
|
86866
|
+
value: 100
|
|
86867
|
+
}
|
|
86868
|
+
}
|
|
86869
|
+
},
|
|
86870
|
+
{
|
|
86871
|
+
id: "15",
|
|
86872
|
+
number: "15",
|
|
86873
|
+
timerange: "9:00 AM - 10:00 AM",
|
|
86874
|
+
status: "scheduled",
|
|
86875
|
+
address: {
|
|
86876
|
+
nickname: "Theater",
|
|
86877
|
+
address: "888 Show Ave"
|
|
86878
|
+
},
|
|
86879
|
+
job_subtype: "delivery",
|
|
86880
|
+
progress: {
|
|
86881
|
+
firstBarData: {
|
|
86882
|
+
text: "Setup",
|
|
86883
|
+
status: "info",
|
|
86884
|
+
value: 25
|
|
86885
|
+
},
|
|
86886
|
+
secondBarData: {
|
|
86887
|
+
text: "Sound Check",
|
|
86888
|
+
status: "success",
|
|
86889
|
+
value: 0
|
|
86890
|
+
}
|
|
86891
|
+
}
|
|
86892
|
+
},
|
|
86893
|
+
{
|
|
86894
|
+
id: "16",
|
|
86895
|
+
number: "16",
|
|
86896
|
+
timerange: "10:00 AM - 11:00 AM",
|
|
86897
|
+
status: "scheduled",
|
|
86898
|
+
address: {
|
|
86899
|
+
nickname: "Museum",
|
|
86900
|
+
address: "999 History Lane"
|
|
86901
|
+
},
|
|
86902
|
+
job_subtype: "pickup",
|
|
86903
|
+
progress: {
|
|
86904
|
+
firstBarData: {
|
|
86905
|
+
text: "Exhibit Prep",
|
|
86906
|
+
status: "info",
|
|
86907
|
+
value: 70
|
|
86908
|
+
},
|
|
86909
|
+
secondBarData: {
|
|
86910
|
+
text: "Documentation",
|
|
86911
|
+
status: "success",
|
|
86912
|
+
value: 45
|
|
86913
|
+
}
|
|
86914
|
+
}
|
|
86915
|
+
},
|
|
86916
|
+
{
|
|
86917
|
+
id: "17",
|
|
86918
|
+
number: "17",
|
|
86919
|
+
timerange: "11:00 AM - 12:00 PM",
|
|
86920
|
+
status: "scheduled",
|
|
86921
|
+
address: {
|
|
86922
|
+
nickname: "Zoo",
|
|
86923
|
+
address: "123 Animal Park"
|
|
86924
|
+
},
|
|
86925
|
+
job_subtype: "delivery",
|
|
86926
|
+
progress: {
|
|
86927
|
+
firstBarData: {
|
|
86928
|
+
text: "Animal Care",
|
|
86929
|
+
status: "info",
|
|
86930
|
+
value: 85
|
|
86931
|
+
},
|
|
86932
|
+
secondBarData: {
|
|
86933
|
+
text: "Feeding",
|
|
86934
|
+
status: "success",
|
|
86935
|
+
value: 90
|
|
86936
|
+
}
|
|
86937
|
+
}
|
|
86938
|
+
},
|
|
86939
|
+
{
|
|
86940
|
+
id: "18",
|
|
86941
|
+
number: "18",
|
|
86942
|
+
timerange: "1:00 PM - 2:00 PM",
|
|
86943
|
+
status: "scheduled",
|
|
86944
|
+
address: {
|
|
86945
|
+
nickname: "Bank",
|
|
86946
|
+
address: "456 Money St"
|
|
86947
|
+
},
|
|
86948
|
+
job_subtype: "pickup",
|
|
86949
|
+
progress: {
|
|
86950
|
+
firstBarData: {
|
|
86951
|
+
text: "Transaction",
|
|
86952
|
+
status: "info",
|
|
86953
|
+
value: 50
|
|
86954
|
+
},
|
|
86955
|
+
secondBarData: {
|
|
86956
|
+
text: "Verification",
|
|
86957
|
+
status: "success",
|
|
86958
|
+
value: 25
|
|
86959
|
+
}
|
|
86960
|
+
}
|
|
86961
|
+
},
|
|
86962
|
+
{
|
|
86963
|
+
id: "19",
|
|
86964
|
+
number: "19",
|
|
86965
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
86966
|
+
status: "scheduled",
|
|
86967
|
+
address: {
|
|
86968
|
+
nickname: "Post Office",
|
|
86969
|
+
address: "789 Mail Road"
|
|
86970
|
+
},
|
|
86971
|
+
job_subtype: "delivery",
|
|
86972
|
+
progress: {
|
|
86973
|
+
firstBarData: {
|
|
86974
|
+
text: "Sorting",
|
|
86975
|
+
status: "info",
|
|
86976
|
+
value: 100
|
|
86977
|
+
},
|
|
86978
|
+
secondBarData: {
|
|
86979
|
+
text: "Dispatch",
|
|
86980
|
+
status: "success",
|
|
86981
|
+
value: 75
|
|
86982
|
+
}
|
|
86983
|
+
}
|
|
86984
|
+
},
|
|
86985
|
+
{
|
|
86986
|
+
id: "20",
|
|
86987
|
+
number: "20",
|
|
86988
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
86989
|
+
status: "scheduled",
|
|
86990
|
+
address: {
|
|
86991
|
+
nickname: "Church",
|
|
86992
|
+
address: "321 Faith Street"
|
|
86993
|
+
},
|
|
86994
|
+
job_subtype: "pickup",
|
|
86995
|
+
progress: {
|
|
86996
|
+
firstBarData: {
|
|
86997
|
+
text: "Service Prep",
|
|
86998
|
+
status: "info",
|
|
86999
|
+
value: 30
|
|
87000
|
+
},
|
|
87001
|
+
secondBarData: {
|
|
87002
|
+
text: "Community",
|
|
87003
|
+
status: "success",
|
|
87004
|
+
value: 10
|
|
87005
|
+
}
|
|
87006
|
+
}
|
|
87007
|
+
},
|
|
87008
|
+
{
|
|
87009
|
+
id: "21",
|
|
87010
|
+
number: "21",
|
|
87011
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
87012
|
+
status: "scheduled",
|
|
87013
|
+
address: {
|
|
87014
|
+
nickname: "Pharmacy",
|
|
87015
|
+
address: "654 Health Ave"
|
|
87016
|
+
},
|
|
87017
|
+
job_subtype: "delivery",
|
|
87018
|
+
progress: {
|
|
87019
|
+
firstBarData: {
|
|
87020
|
+
text: "Prescription",
|
|
87021
|
+
status: "info",
|
|
87022
|
+
value: 90
|
|
87023
|
+
},
|
|
87024
|
+
secondBarData: {
|
|
87025
|
+
text: "Quality Check",
|
|
87026
|
+
status: "success",
|
|
87027
|
+
value: 60
|
|
87028
|
+
}
|
|
87029
|
+
}
|
|
87030
|
+
},
|
|
87031
|
+
{
|
|
87032
|
+
id: "22",
|
|
87033
|
+
number: "22",
|
|
87034
|
+
timerange: "2:00 PM - 3:00 PM",
|
|
87035
|
+
status: "scheduled",
|
|
87036
|
+
address: {
|
|
87037
|
+
nickname: "Office Complex",
|
|
87038
|
+
street: "789 Business Ave",
|
|
87039
|
+
city: "Commerce City",
|
|
87040
|
+
state: "CA",
|
|
87041
|
+
zip: "90210"
|
|
87042
|
+
},
|
|
87043
|
+
progress: {
|
|
87044
|
+
currentStep: 1,
|
|
87045
|
+
totalSteps: 4,
|
|
87046
|
+
steps: {
|
|
87047
|
+
pickup: {
|
|
87048
|
+
text: "Pickup Scheduled",
|
|
87049
|
+
status: "pending",
|
|
87050
|
+
value: 25
|
|
87051
|
+
},
|
|
87052
|
+
transit: {
|
|
87053
|
+
text: "In Transit",
|
|
87054
|
+
status: "pending",
|
|
87055
|
+
value: 0
|
|
87056
|
+
},
|
|
87057
|
+
delivery: {
|
|
87058
|
+
text: "Delivery",
|
|
87059
|
+
status: "pending",
|
|
87060
|
+
value: 0
|
|
87061
|
+
},
|
|
87062
|
+
quality: {
|
|
87063
|
+
text: "Quality Check",
|
|
87064
|
+
status: "pending",
|
|
87065
|
+
value: 0
|
|
87066
|
+
}
|
|
87067
|
+
}
|
|
87068
|
+
}
|
|
87069
|
+
},
|
|
87070
|
+
{
|
|
87071
|
+
id: "23",
|
|
87072
|
+
number: "23",
|
|
87073
|
+
timerange: "3:00 PM - 4:00 PM",
|
|
87074
|
+
status: "completed",
|
|
87075
|
+
address: {
|
|
87076
|
+
nickname: "Retail Store",
|
|
87077
|
+
street: "456 Shopping St",
|
|
87078
|
+
city: "Retail Town",
|
|
87079
|
+
state: "CA",
|
|
87080
|
+
zip: "90211"
|
|
87081
|
+
},
|
|
87082
|
+
progress: {
|
|
87083
|
+
currentStep: 4,
|
|
87084
|
+
totalSteps: 4,
|
|
87085
|
+
steps: {
|
|
87086
|
+
pickup: {
|
|
87087
|
+
text: "Pickup Complete",
|
|
87088
|
+
status: "success",
|
|
87089
|
+
value: 100
|
|
87090
|
+
},
|
|
87091
|
+
transit: {
|
|
87092
|
+
text: "Transit Complete",
|
|
87093
|
+
status: "success",
|
|
87094
|
+
value: 100
|
|
87095
|
+
},
|
|
87096
|
+
delivery: {
|
|
87097
|
+
text: "Delivery Complete",
|
|
87098
|
+
status: "success",
|
|
87099
|
+
value: 100
|
|
87100
|
+
},
|
|
87101
|
+
quality: {
|
|
87102
|
+
text: "Quality Check Complete",
|
|
87103
|
+
status: "success",
|
|
87104
|
+
value: 100
|
|
87105
|
+
}
|
|
87106
|
+
}
|
|
87107
|
+
}
|
|
87108
|
+
},
|
|
87109
|
+
{
|
|
87110
|
+
id: "24",
|
|
87111
|
+
number: "24",
|
|
87112
|
+
timerange: "4:00 PM - 5:00 PM",
|
|
87113
|
+
status: "in_progress",
|
|
87114
|
+
address: {
|
|
87115
|
+
nickname: "Warehouse",
|
|
87116
|
+
street: "321 Storage Blvd",
|
|
87117
|
+
city: "Storage City",
|
|
87118
|
+
state: "CA",
|
|
87119
|
+
zip: "90212"
|
|
87120
|
+
},
|
|
87121
|
+
progress: {
|
|
87122
|
+
currentStep: 2,
|
|
87123
|
+
totalSteps: 4,
|
|
87124
|
+
steps: {
|
|
87125
|
+
pickup: {
|
|
87126
|
+
text: "Pickup Complete",
|
|
87127
|
+
status: "success",
|
|
87128
|
+
value: 100
|
|
87129
|
+
},
|
|
87130
|
+
transit: {
|
|
87131
|
+
text: "In Transit",
|
|
87132
|
+
status: "active",
|
|
87133
|
+
value: 50
|
|
87134
|
+
},
|
|
87135
|
+
delivery: {
|
|
87136
|
+
text: "Delivery",
|
|
87137
|
+
status: "pending",
|
|
87138
|
+
value: 0
|
|
87139
|
+
},
|
|
87140
|
+
quality: {
|
|
87141
|
+
text: "Quality Check",
|
|
87142
|
+
status: "pending",
|
|
87143
|
+
value: 0
|
|
87144
|
+
}
|
|
87145
|
+
}
|
|
87146
|
+
}
|
|
87147
|
+
},
|
|
87148
|
+
{
|
|
87149
|
+
id: "25",
|
|
87150
|
+
number: "25",
|
|
87151
|
+
timerange: "5:00 PM - 6:00 PM",
|
|
87152
|
+
status: "cancelled",
|
|
87153
|
+
address: {
|
|
87154
|
+
nickname: "Canceled Location",
|
|
87155
|
+
street: "999 Cancel St",
|
|
87156
|
+
city: "Cancel City",
|
|
87157
|
+
state: "CA",
|
|
87158
|
+
zip: "90213"
|
|
87159
|
+
},
|
|
87160
|
+
progress: {
|
|
87161
|
+
currentStep: 1,
|
|
87162
|
+
totalSteps: 4,
|
|
87163
|
+
steps: {
|
|
87164
|
+
pickup: {
|
|
87165
|
+
text: "Pickup Cancelled",
|
|
87166
|
+
status: "error",
|
|
87167
|
+
value: 0
|
|
87168
|
+
},
|
|
87169
|
+
transit: {
|
|
87170
|
+
text: "In Transit",
|
|
87171
|
+
status: "pending",
|
|
87172
|
+
value: 0
|
|
87173
|
+
},
|
|
87174
|
+
delivery: {
|
|
87175
|
+
text: "Delivery",
|
|
87176
|
+
status: "pending",
|
|
87177
|
+
value: 0
|
|
87178
|
+
},
|
|
87179
|
+
quality: {
|
|
87180
|
+
text: "Quality Check",
|
|
87181
|
+
status: "pending",
|
|
87182
|
+
value: 0
|
|
87183
|
+
}
|
|
87184
|
+
}
|
|
87185
|
+
}
|
|
87186
|
+
},
|
|
87187
|
+
{
|
|
87188
|
+
id: "26",
|
|
87189
|
+
number: "26",
|
|
87190
|
+
timerange: "6:00 PM - 7:00 PM",
|
|
87191
|
+
status: "scheduled",
|
|
87192
|
+
address: {
|
|
87193
|
+
nickname: "Evening Delivery",
|
|
87194
|
+
street: "555 Evening Ave",
|
|
87195
|
+
city: "Evening City",
|
|
87196
|
+
state: "CA",
|
|
87197
|
+
zip: "90214"
|
|
87198
|
+
},
|
|
87199
|
+
progress: {
|
|
87200
|
+
currentStep: 1,
|
|
87201
|
+
totalSteps: 4,
|
|
87202
|
+
steps: {
|
|
87203
|
+
pickup: {
|
|
87204
|
+
text: "Pickup Scheduled",
|
|
87205
|
+
status: "pending",
|
|
87206
|
+
value: 25
|
|
87207
|
+
},
|
|
87208
|
+
transit: {
|
|
87209
|
+
text: "In Transit",
|
|
87210
|
+
status: "pending",
|
|
87211
|
+
value: 0
|
|
87212
|
+
},
|
|
87213
|
+
delivery: {
|
|
87214
|
+
text: "Delivery",
|
|
87215
|
+
status: "pending",
|
|
87216
|
+
value: 0
|
|
87217
|
+
},
|
|
87218
|
+
quality: {
|
|
87219
|
+
text: "Quality Check",
|
|
87220
|
+
status: "pending",
|
|
87221
|
+
value: 0
|
|
87222
|
+
}
|
|
87223
|
+
}
|
|
87224
|
+
}
|
|
87225
|
+
},
|
|
87226
|
+
{
|
|
87227
|
+
id: "27",
|
|
87228
|
+
number: "27",
|
|
87229
|
+
timerange: "7:00 PM - 8:00 PM",
|
|
87230
|
+
status: "in_progress",
|
|
87231
|
+
address: {
|
|
87232
|
+
nickname: "Night Shift",
|
|
87233
|
+
street: "777 Night St",
|
|
87234
|
+
city: "Night City",
|
|
87235
|
+
state: "CA",
|
|
87236
|
+
zip: "90215"
|
|
87237
|
+
},
|
|
87238
|
+
progress: {
|
|
87239
|
+
currentStep: 3,
|
|
87240
|
+
totalSteps: 4,
|
|
87241
|
+
steps: {
|
|
87242
|
+
pickup: {
|
|
87243
|
+
text: "Pickup Complete",
|
|
87244
|
+
status: "success",
|
|
87245
|
+
value: 100
|
|
87246
|
+
},
|
|
87247
|
+
transit: {
|
|
87248
|
+
text: "Transit Complete",
|
|
87249
|
+
status: "success",
|
|
87250
|
+
value: 100
|
|
87251
|
+
},
|
|
87252
|
+
delivery: {
|
|
87253
|
+
text: "Delivery in Progress",
|
|
87254
|
+
status: "active",
|
|
87255
|
+
value: 75
|
|
87256
|
+
},
|
|
87257
|
+
quality: {
|
|
87258
|
+
text: "Quality Check",
|
|
87259
|
+
status: "pending",
|
|
87260
|
+
value: 0
|
|
87261
|
+
}
|
|
87262
|
+
}
|
|
87263
|
+
}
|
|
87264
|
+
},
|
|
87265
|
+
{
|
|
87266
|
+
id: "28",
|
|
87267
|
+
number: "28",
|
|
87268
|
+
timerange: "8:00 PM - 9:00 PM",
|
|
87269
|
+
status: "completed",
|
|
87270
|
+
address: {
|
|
87271
|
+
nickname: "Final Delivery",
|
|
87272
|
+
street: "888 Final Blvd",
|
|
87273
|
+
city: "Final City",
|
|
87274
|
+
state: "CA",
|
|
87275
|
+
zip: "90216"
|
|
87276
|
+
},
|
|
87277
|
+
progress: {
|
|
87278
|
+
currentStep: 4,
|
|
87279
|
+
totalSteps: 4,
|
|
87280
|
+
steps: {
|
|
87281
|
+
pickup: {
|
|
87282
|
+
text: "Pickup Complete",
|
|
87283
|
+
status: "success",
|
|
87284
|
+
value: 100
|
|
87285
|
+
},
|
|
87286
|
+
transit: {
|
|
87287
|
+
text: "Transit Complete",
|
|
87288
|
+
status: "success",
|
|
87289
|
+
value: 100
|
|
87290
|
+
},
|
|
87291
|
+
delivery: {
|
|
87292
|
+
text: "Delivery Complete",
|
|
87293
|
+
status: "success",
|
|
87294
|
+
value: 100
|
|
87295
|
+
},
|
|
87296
|
+
quality: {
|
|
87297
|
+
text: "Quality Check Complete",
|
|
87298
|
+
status: "success",
|
|
87299
|
+
value: 100
|
|
87300
|
+
}
|
|
87301
|
+
}
|
|
87302
|
+
}
|
|
87303
|
+
},
|
|
87304
|
+
{
|
|
87305
|
+
id: "29",
|
|
87306
|
+
number: "29",
|
|
87307
|
+
timerange: "9:00 PM - 10:00 PM",
|
|
87308
|
+
status: "scheduled",
|
|
87309
|
+
address: {
|
|
87310
|
+
nickname: "Late Night",
|
|
87311
|
+
street: "999 Late St",
|
|
87312
|
+
city: "Late City",
|
|
87313
|
+
state: "CA",
|
|
87314
|
+
zip: "90217"
|
|
87315
|
+
},
|
|
87316
|
+
progress: {
|
|
87317
|
+
currentStep: 1,
|
|
87318
|
+
totalSteps: 4,
|
|
87319
|
+
steps: {
|
|
87320
|
+
pickup: {
|
|
87321
|
+
text: "Pickup Scheduled",
|
|
87322
|
+
status: "pending",
|
|
87323
|
+
value: 25
|
|
87324
|
+
},
|
|
87325
|
+
transit: {
|
|
87326
|
+
text: "In Transit",
|
|
87327
|
+
status: "pending",
|
|
87328
|
+
value: 0
|
|
87329
|
+
},
|
|
87330
|
+
delivery: {
|
|
87331
|
+
text: "Delivery",
|
|
87332
|
+
status: "pending",
|
|
87333
|
+
value: 0
|
|
87334
|
+
},
|
|
87335
|
+
quality: {
|
|
87336
|
+
text: "Quality Check",
|
|
87337
|
+
status: "pending",
|
|
87338
|
+
value: 0
|
|
87339
|
+
}
|
|
87340
|
+
}
|
|
87341
|
+
}
|
|
87342
|
+
},
|
|
87343
|
+
{
|
|
87344
|
+
id: "30",
|
|
87345
|
+
number: "30",
|
|
87346
|
+
timerange: "10:00 PM - 11:00 PM",
|
|
87347
|
+
status: "in_progress",
|
|
87348
|
+
address: {
|
|
87349
|
+
nickname: "Last Stop",
|
|
87350
|
+
street: "000 Last Ave",
|
|
87351
|
+
city: "Last City",
|
|
87352
|
+
state: "CA",
|
|
87353
|
+
zip: "90218"
|
|
87354
|
+
},
|
|
87355
|
+
progress: {
|
|
87356
|
+
currentStep: 2,
|
|
87357
|
+
totalSteps: 4,
|
|
87358
|
+
steps: {
|
|
87359
|
+
pickup: {
|
|
87360
|
+
text: "Pickup Complete",
|
|
87361
|
+
status: "success",
|
|
87362
|
+
value: 100
|
|
87363
|
+
},
|
|
87364
|
+
transit: {
|
|
87365
|
+
text: "In Transit",
|
|
87366
|
+
status: "active",
|
|
87367
|
+
value: 60
|
|
87368
|
+
},
|
|
87369
|
+
delivery: {
|
|
87370
|
+
text: "Delivery",
|
|
87371
|
+
status: "pending",
|
|
87372
|
+
value: 0
|
|
87373
|
+
},
|
|
87374
|
+
quality: {
|
|
87375
|
+
text: "Quality Check",
|
|
87376
|
+
status: "pending",
|
|
87377
|
+
value: 0
|
|
87378
|
+
}
|
|
87379
|
+
}
|
|
87380
|
+
}
|
|
87381
|
+
}
|
|
87382
|
+
];
|
|
84751
87383
|
const startCase = (string_) => {
|
|
84752
87384
|
if (string_) {
|
|
84753
87385
|
return string_.replaceAll(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase());
|
|
@@ -84855,359 +87487,7 @@ mockColumns.map((column2) => ({
|
|
|
84855
87487
|
...column2
|
|
84856
87488
|
}));
|
|
84857
87489
|
const mockDataSource = {
|
|
84858
|
-
appointments:
|
|
84859
|
-
{
|
|
84860
|
-
id: "1",
|
|
84861
|
-
number: "1",
|
|
84862
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
84863
|
-
status: "in_progress",
|
|
84864
|
-
address: {
|
|
84865
|
-
nickname: "Home",
|
|
84866
|
-
address: "123 Main St"
|
|
84867
|
-
},
|
|
84868
|
-
job_subtype: "delivery",
|
|
84869
|
-
progress: {
|
|
84870
|
-
firstBarData: {
|
|
84871
|
-
text: "Loading",
|
|
84872
|
-
status: "info",
|
|
84873
|
-
value: 100
|
|
84874
|
-
},
|
|
84875
|
-
secondBarData: {
|
|
84876
|
-
text: "Processing",
|
|
84877
|
-
status: "success",
|
|
84878
|
-
value: 25
|
|
84879
|
-
}
|
|
84880
|
-
}
|
|
84881
|
-
},
|
|
84882
|
-
{
|
|
84883
|
-
id: "2",
|
|
84884
|
-
number: "2",
|
|
84885
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
84886
|
-
status: "scheduled",
|
|
84887
|
-
address: {
|
|
84888
|
-
nickname: "Work",
|
|
84889
|
-
address: "456 Elm St"
|
|
84890
|
-
},
|
|
84891
|
-
job_subtype: "pickup",
|
|
84892
|
-
progress: {
|
|
84893
|
-
firstBarData: {
|
|
84894
|
-
text: "Preparing",
|
|
84895
|
-
status: "info",
|
|
84896
|
-
value: 100
|
|
84897
|
-
},
|
|
84898
|
-
secondBarData: {
|
|
84899
|
-
text: "Final Check",
|
|
84900
|
-
status: "success",
|
|
84901
|
-
value: 0
|
|
84902
|
-
}
|
|
84903
|
-
}
|
|
84904
|
-
},
|
|
84905
|
-
{
|
|
84906
|
-
id: "3",
|
|
84907
|
-
number: "3",
|
|
84908
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
84909
|
-
status: "scheduled",
|
|
84910
|
-
address: {
|
|
84911
|
-
nickname: "Store",
|
|
84912
|
-
address: "789 Oak St"
|
|
84913
|
-
},
|
|
84914
|
-
job_subtype: "delivery",
|
|
84915
|
-
progress: {
|
|
84916
|
-
firstBarData: {
|
|
84917
|
-
text: "Pending",
|
|
84918
|
-
status: "info",
|
|
84919
|
-
value: 0
|
|
84920
|
-
},
|
|
84921
|
-
secondBarData: {
|
|
84922
|
-
text: "Awaiting",
|
|
84923
|
-
status: "success",
|
|
84924
|
-
value: 0
|
|
84925
|
-
}
|
|
84926
|
-
}
|
|
84927
|
-
},
|
|
84928
|
-
{
|
|
84929
|
-
id: "4",
|
|
84930
|
-
number: "4",
|
|
84931
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
84932
|
-
status: "scheduled",
|
|
84933
|
-
address: {
|
|
84934
|
-
nickname: "Office",
|
|
84935
|
-
address: "321 Pine St"
|
|
84936
|
-
},
|
|
84937
|
-
job_subtype: "pickup",
|
|
84938
|
-
progress: {
|
|
84939
|
-
firstBarData: {
|
|
84940
|
-
text: "In Progress",
|
|
84941
|
-
status: "info",
|
|
84942
|
-
value: 100
|
|
84943
|
-
},
|
|
84944
|
-
secondBarData: {
|
|
84945
|
-
text: "Validation",
|
|
84946
|
-
status: "success",
|
|
84947
|
-
value: 30
|
|
84948
|
-
}
|
|
84949
|
-
}
|
|
84950
|
-
},
|
|
84951
|
-
{
|
|
84952
|
-
id: "5",
|
|
84953
|
-
number: "5",
|
|
84954
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
84955
|
-
status: "scheduled",
|
|
84956
|
-
address: {
|
|
84957
|
-
nickname: "Library",
|
|
84958
|
-
address: "555 Book Lane"
|
|
84959
|
-
},
|
|
84960
|
-
job_subtype: "delivery",
|
|
84961
|
-
progress: {
|
|
84962
|
-
firstBarData: {
|
|
84963
|
-
text: "Completed",
|
|
84964
|
-
status: "info",
|
|
84965
|
-
value: 100
|
|
84966
|
-
},
|
|
84967
|
-
secondBarData: {
|
|
84968
|
-
text: "Verified",
|
|
84969
|
-
status: "success",
|
|
84970
|
-
value: 100
|
|
84971
|
-
}
|
|
84972
|
-
}
|
|
84973
|
-
},
|
|
84974
|
-
{
|
|
84975
|
-
id: "6",
|
|
84976
|
-
number: "6",
|
|
84977
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
84978
|
-
status: "scheduled",
|
|
84979
|
-
address: {
|
|
84980
|
-
nickname: "Gym",
|
|
84981
|
-
address: "777 Fitness Ave"
|
|
84982
|
-
},
|
|
84983
|
-
job_subtype: "pickup",
|
|
84984
|
-
progress: {
|
|
84985
|
-
firstBarData: {
|
|
84986
|
-
text: "Phase 1",
|
|
84987
|
-
status: "info",
|
|
84988
|
-
value: 75
|
|
84989
|
-
},
|
|
84990
|
-
secondBarData: {
|
|
84991
|
-
text: "Phase 2",
|
|
84992
|
-
status: "success",
|
|
84993
|
-
value: 50
|
|
84994
|
-
}
|
|
84995
|
-
}
|
|
84996
|
-
},
|
|
84997
|
-
{
|
|
84998
|
-
id: "7",
|
|
84999
|
-
number: "7",
|
|
85000
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
85001
|
-
status: "scheduled",
|
|
85002
|
-
address: {
|
|
85003
|
-
nickname: "Mall",
|
|
85004
|
-
address: "888 Shopping Center"
|
|
85005
|
-
},
|
|
85006
|
-
job_subtype: "delivery",
|
|
85007
|
-
progress: {
|
|
85008
|
-
firstBarData: {
|
|
85009
|
-
text: "Queued",
|
|
85010
|
-
status: "info",
|
|
85011
|
-
value: 0
|
|
85012
|
-
},
|
|
85013
|
-
secondBarData: {
|
|
85014
|
-
text: "Waiting",
|
|
85015
|
-
status: "success",
|
|
85016
|
-
value: 0
|
|
85017
|
-
}
|
|
85018
|
-
}
|
|
85019
|
-
},
|
|
85020
|
-
{
|
|
85021
|
-
id: "8",
|
|
85022
|
-
number: "8",
|
|
85023
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
85024
|
-
status: "completed",
|
|
85025
|
-
address: {
|
|
85026
|
-
nickname: "School",
|
|
85027
|
-
address: "999 Education Rd"
|
|
85028
|
-
},
|
|
85029
|
-
job_subtype: "pickup",
|
|
85030
|
-
progress: {
|
|
85031
|
-
firstBarData: {
|
|
85032
|
-
text: "Delivered",
|
|
85033
|
-
status: "info",
|
|
85034
|
-
value: 100
|
|
85035
|
-
},
|
|
85036
|
-
secondBarData: {
|
|
85037
|
-
text: "Confirmed",
|
|
85038
|
-
status: "success",
|
|
85039
|
-
value: 100
|
|
85040
|
-
}
|
|
85041
|
-
}
|
|
85042
|
-
},
|
|
85043
|
-
{
|
|
85044
|
-
id: "9",
|
|
85045
|
-
number: "9",
|
|
85046
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
85047
|
-
status: "scheduled",
|
|
85048
|
-
address: {
|
|
85049
|
-
nickname: "Restaurant",
|
|
85050
|
-
address: "111 Food Court"
|
|
85051
|
-
},
|
|
85052
|
-
job_subtype: "delivery",
|
|
85053
|
-
progress: {
|
|
85054
|
-
firstBarData: {
|
|
85055
|
-
text: "Preparing",
|
|
85056
|
-
status: "info",
|
|
85057
|
-
value: 100
|
|
85058
|
-
},
|
|
85059
|
-
secondBarData: {
|
|
85060
|
-
text: "Quality Check",
|
|
85061
|
-
status: "success",
|
|
85062
|
-
value: 15
|
|
85063
|
-
}
|
|
85064
|
-
}
|
|
85065
|
-
},
|
|
85066
|
-
{
|
|
85067
|
-
id: "10",
|
|
85068
|
-
number: "10",
|
|
85069
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
85070
|
-
status: "scheduled",
|
|
85071
|
-
address: {
|
|
85072
|
-
nickname: "Park",
|
|
85073
|
-
address: "222 Green Ave"
|
|
85074
|
-
},
|
|
85075
|
-
job_subtype: "pickup",
|
|
85076
|
-
progress: {
|
|
85077
|
-
firstBarData: {
|
|
85078
|
-
text: "Processing",
|
|
85079
|
-
status: "info",
|
|
85080
|
-
value: 80
|
|
85081
|
-
},
|
|
85082
|
-
secondBarData: {
|
|
85083
|
-
text: "Review",
|
|
85084
|
-
status: "success",
|
|
85085
|
-
value: 0
|
|
85086
|
-
}
|
|
85087
|
-
}
|
|
85088
|
-
},
|
|
85089
|
-
{
|
|
85090
|
-
id: "11",
|
|
85091
|
-
number: "11",
|
|
85092
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
85093
|
-
status: "scheduled",
|
|
85094
|
-
address: {
|
|
85095
|
-
nickname: "Beach",
|
|
85096
|
-
address: "333 Shore Dr"
|
|
85097
|
-
},
|
|
85098
|
-
job_subtype: "delivery"
|
|
85099
|
-
},
|
|
85100
|
-
{
|
|
85101
|
-
id: "12",
|
|
85102
|
-
number: "12",
|
|
85103
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
85104
|
-
status: "scheduled",
|
|
85105
|
-
address: {
|
|
85106
|
-
nickname: "Hotel",
|
|
85107
|
-
address: "444 Stay Blvd"
|
|
85108
|
-
},
|
|
85109
|
-
job_subtype: "pickup"
|
|
85110
|
-
},
|
|
85111
|
-
{
|
|
85112
|
-
id: "13",
|
|
85113
|
-
number: "13",
|
|
85114
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
85115
|
-
status: "scheduled",
|
|
85116
|
-
address: {
|
|
85117
|
-
nickname: "Airport",
|
|
85118
|
-
address: "666 Flight Way"
|
|
85119
|
-
},
|
|
85120
|
-
job_subtype: "delivery"
|
|
85121
|
-
},
|
|
85122
|
-
{
|
|
85123
|
-
id: "14",
|
|
85124
|
-
number: "14",
|
|
85125
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
85126
|
-
status: "cancelled",
|
|
85127
|
-
address: {
|
|
85128
|
-
nickname: "Stadium",
|
|
85129
|
-
address: "777 Sports Complex"
|
|
85130
|
-
},
|
|
85131
|
-
job_subtype: "pickup"
|
|
85132
|
-
},
|
|
85133
|
-
{
|
|
85134
|
-
id: "15",
|
|
85135
|
-
number: "15",
|
|
85136
|
-
timerange: "9:00 AM - 10:00 AM",
|
|
85137
|
-
status: "scheduled",
|
|
85138
|
-
address: {
|
|
85139
|
-
nickname: "Theater",
|
|
85140
|
-
address: "888 Show Ave"
|
|
85141
|
-
},
|
|
85142
|
-
job_subtype: "delivery"
|
|
85143
|
-
},
|
|
85144
|
-
{
|
|
85145
|
-
id: "16",
|
|
85146
|
-
number: "16",
|
|
85147
|
-
timerange: "10:00 AM - 11:00 AM",
|
|
85148
|
-
status: "scheduled",
|
|
85149
|
-
address: {
|
|
85150
|
-
nickname: "Museum",
|
|
85151
|
-
address: "999 History Lane"
|
|
85152
|
-
},
|
|
85153
|
-
job_subtype: "pickup"
|
|
85154
|
-
},
|
|
85155
|
-
{
|
|
85156
|
-
id: "17",
|
|
85157
|
-
number: "17",
|
|
85158
|
-
timerange: "11:00 AM - 12:00 PM",
|
|
85159
|
-
status: "scheduled",
|
|
85160
|
-
address: {
|
|
85161
|
-
nickname: "Zoo",
|
|
85162
|
-
address: "123 Animal Park"
|
|
85163
|
-
},
|
|
85164
|
-
job_subtype: "delivery"
|
|
85165
|
-
},
|
|
85166
|
-
{
|
|
85167
|
-
id: "18",
|
|
85168
|
-
number: "18",
|
|
85169
|
-
timerange: "1:00 PM - 2:00 PM",
|
|
85170
|
-
status: "scheduled",
|
|
85171
|
-
address: {
|
|
85172
|
-
nickname: "Bank",
|
|
85173
|
-
address: "456 Money St"
|
|
85174
|
-
},
|
|
85175
|
-
job_subtype: "pickup"
|
|
85176
|
-
},
|
|
85177
|
-
{
|
|
85178
|
-
id: "19",
|
|
85179
|
-
number: "19",
|
|
85180
|
-
timerange: "2:00 PM - 3:00 PM",
|
|
85181
|
-
status: "scheduled",
|
|
85182
|
-
address: {
|
|
85183
|
-
nickname: "Post Office",
|
|
85184
|
-
address: "789 Mail Road"
|
|
85185
|
-
},
|
|
85186
|
-
job_subtype: "delivery"
|
|
85187
|
-
},
|
|
85188
|
-
{
|
|
85189
|
-
id: "20",
|
|
85190
|
-
number: "20",
|
|
85191
|
-
timerange: "3:00 PM - 4:00 PM",
|
|
85192
|
-
status: "scheduled",
|
|
85193
|
-
address: {
|
|
85194
|
-
nickname: "Church",
|
|
85195
|
-
address: "321 Faith Street"
|
|
85196
|
-
},
|
|
85197
|
-
job_subtype: "pickup"
|
|
85198
|
-
},
|
|
85199
|
-
{
|
|
85200
|
-
id: "21",
|
|
85201
|
-
number: "21",
|
|
85202
|
-
timerange: "4:00 PM - 5:00 PM",
|
|
85203
|
-
status: "scheduled",
|
|
85204
|
-
address: {
|
|
85205
|
-
nickname: "Pharmacy",
|
|
85206
|
-
address: "654 Health Ave"
|
|
85207
|
-
},
|
|
85208
|
-
job_subtype: "delivery"
|
|
85209
|
-
}
|
|
85210
|
-
]
|
|
87490
|
+
appointments: staticTableData
|
|
85211
87491
|
};
|
|
85212
87492
|
const tableControlsData = {
|
|
85213
87493
|
primaryTableRowData: {
|
|
@@ -85253,7 +87533,7 @@ const startingUseTableConfig = {
|
|
|
85253
87533
|
},
|
|
85254
87534
|
hasSettings: true,
|
|
85255
87535
|
hasFilter: true,
|
|
85256
|
-
//
|
|
87536
|
+
// Allow disableAutoFetch to be overridden by the config
|
|
85257
87537
|
disableAutoFetch: true,
|
|
85258
87538
|
dataSource: []
|
|
85259
87539
|
};
|