@gobolt/genesis 0.4.12 → 0.4.13
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/index.cjs +2215 -310
- package/dist/index.js +2215 -310
- package/package.json +6 -2
package/dist/index.cjs
CHANGED
|
@@ -37,7 +37,7 @@ function requireClassnames() {
|
|
|
37
37
|
hasRequiredClassnames = 1;
|
|
38
38
|
(function(module2) {
|
|
39
39
|
(function() {
|
|
40
|
-
var
|
|
40
|
+
var hasOwn2 = {}.hasOwnProperty;
|
|
41
41
|
function classNames2() {
|
|
42
42
|
var classes = "";
|
|
43
43
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -63,7 +63,7 @@ function requireClassnames() {
|
|
|
63
63
|
}
|
|
64
64
|
var classes = "";
|
|
65
65
|
for (var key in arg) {
|
|
66
|
-
if (
|
|
66
|
+
if (hasOwn2.call(arg, key) && arg[key]) {
|
|
67
67
|
classes = appendClass(classes, key);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -3172,14 +3172,14 @@ function merge$2() {
|
|
|
3172
3172
|
});
|
|
3173
3173
|
return clone;
|
|
3174
3174
|
}
|
|
3175
|
-
function noop$
|
|
3175
|
+
function noop$5() {
|
|
3176
3176
|
}
|
|
3177
3177
|
let deprecatedWarnList = null;
|
|
3178
3178
|
function resetWarned() {
|
|
3179
3179
|
deprecatedWarnList = null;
|
|
3180
3180
|
resetWarned$1();
|
|
3181
3181
|
}
|
|
3182
|
-
let _warning = noop$
|
|
3182
|
+
let _warning = noop$5;
|
|
3183
3183
|
if (process.env.NODE_ENV !== "production") {
|
|
3184
3184
|
_warning = (valid2, component, message2) => {
|
|
3185
3185
|
warningOnce(valid2, `[antd: ${component}] ${message2}`);
|
|
@@ -3220,7 +3220,7 @@ const devUseWarning = process.env.NODE_ENV !== "production" ? (component) => {
|
|
|
3220
3220
|
} : () => {
|
|
3221
3221
|
const noopWarning = () => {
|
|
3222
3222
|
};
|
|
3223
|
-
noopWarning.deprecated = noop$
|
|
3223
|
+
noopWarning.deprecated = noop$5;
|
|
3224
3224
|
return noopWarning;
|
|
3225
3225
|
};
|
|
3226
3226
|
const ValidateMessagesContext = /* @__PURE__ */ React.createContext(void 0);
|
|
@@ -4928,12 +4928,12 @@ function merge$1() {
|
|
|
4928
4928
|
return ret;
|
|
4929
4929
|
}
|
|
4930
4930
|
var statistic = {};
|
|
4931
|
-
function noop$
|
|
4931
|
+
function noop$4() {
|
|
4932
4932
|
}
|
|
4933
4933
|
var statisticToken = function statisticToken2(token2) {
|
|
4934
4934
|
var tokenKeys2;
|
|
4935
4935
|
var proxy = token2;
|
|
4936
|
-
var flush = noop$
|
|
4936
|
+
var flush = noop$4;
|
|
4937
4937
|
if (enableStatistic && typeof Proxy !== "undefined") {
|
|
4938
4938
|
tokenKeys2 = /* @__PURE__ */ new Set();
|
|
4939
4939
|
proxy = new Proxy(token2, {
|
|
@@ -5294,7 +5294,7 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
5294
5294
|
a: 1
|
|
5295
5295
|
}).toRgbString();
|
|
5296
5296
|
}
|
|
5297
|
-
var __rest$
|
|
5297
|
+
var __rest$_ = function(s, e3) {
|
|
5298
5298
|
var t2 = {};
|
|
5299
5299
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
5300
5300
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5305,7 +5305,7 @@ var __rest$Z = function(s, e3) {
|
|
|
5305
5305
|
function formatToken(derivativeToken) {
|
|
5306
5306
|
const {
|
|
5307
5307
|
override
|
|
5308
|
-
} = derivativeToken, restToken = __rest$
|
|
5308
|
+
} = derivativeToken, restToken = __rest$_(derivativeToken, ["override"]);
|
|
5309
5309
|
const overrideTokens = Object.assign({}, override);
|
|
5310
5310
|
Object.keys(seedToken).forEach((token2) => {
|
|
5311
5311
|
delete overrideTokens[token2];
|
|
@@ -5459,7 +5459,7 @@ function formatToken(derivativeToken) {
|
|
|
5459
5459
|
}), overrideTokens);
|
|
5460
5460
|
return aliasToken;
|
|
5461
5461
|
}
|
|
5462
|
-
var __rest$
|
|
5462
|
+
var __rest$Z = function(s, e3) {
|
|
5463
5463
|
var t2 = {};
|
|
5464
5464
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
5465
5465
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -5509,7 +5509,7 @@ const getComputedToken2 = (originToken, overrideToken, theme) => {
|
|
|
5509
5509
|
const derivativeToken = theme.getDerivativeToken(originToken);
|
|
5510
5510
|
const {
|
|
5511
5511
|
override
|
|
5512
|
-
} = overrideToken, components2 = __rest$
|
|
5512
|
+
} = overrideToken, components2 = __rest$Z(overrideToken, ["override"]);
|
|
5513
5513
|
let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
|
|
5514
5514
|
override
|
|
5515
5515
|
});
|
|
@@ -5518,7 +5518,7 @@ const getComputedToken2 = (originToken, overrideToken, theme) => {
|
|
|
5518
5518
|
Object.entries(components2).forEach(([key, value2]) => {
|
|
5519
5519
|
const {
|
|
5520
5520
|
theme: componentTheme
|
|
5521
|
-
} = value2, componentTokens = __rest$
|
|
5521
|
+
} = value2, componentTokens = __rest$Z(value2, ["theme"]);
|
|
5522
5522
|
let mergedComponentToken = componentTokens;
|
|
5523
5523
|
if (componentTheme) {
|
|
5524
5524
|
mergedComponentToken = getComputedToken2(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
|
|
@@ -6473,7 +6473,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
6473
6473
|
PropWarning.displayName = "PropWarning";
|
|
6474
6474
|
}
|
|
6475
6475
|
const PropWarning$1 = process.env.NODE_ENV !== "production" ? PropWarning : () => null;
|
|
6476
|
-
var __rest$
|
|
6476
|
+
var __rest$Y = function(s, e3) {
|
|
6477
6477
|
var t2 = {};
|
|
6478
6478
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
6479
6479
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
@@ -6760,7 +6760,7 @@ const ProviderChildren = (props) => {
|
|
|
6760
6760
|
token: token2,
|
|
6761
6761
|
components: components2,
|
|
6762
6762
|
cssVar
|
|
6763
|
-
} = _a, rest = __rest$
|
|
6763
|
+
} = _a, rest = __rest$Y(_a, ["algorithm", "token", "components", "cssVar"]);
|
|
6764
6764
|
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? createTheme(algorithm) : defaultTheme;
|
|
6765
6765
|
const parsedComponents = {};
|
|
6766
6766
|
Object.entries(components2 || {}).forEach(([componentName, componentToken]) => {
|
|
@@ -7012,9 +7012,9 @@ var CheckCircleFilled = function CheckCircleFilled2(props, ref) {
|
|
|
7012
7012
|
icon: CheckCircleFilled$1
|
|
7013
7013
|
}));
|
|
7014
7014
|
};
|
|
7015
|
-
var RefIcon$
|
|
7015
|
+
var RefIcon$E = /* @__PURE__ */ React__namespace.forwardRef(CheckCircleFilled);
|
|
7016
7016
|
if (process.env.NODE_ENV !== "production") {
|
|
7017
|
-
RefIcon$
|
|
7017
|
+
RefIcon$E.displayName = "CheckCircleFilled";
|
|
7018
7018
|
}
|
|
7019
7019
|
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" };
|
|
7020
7020
|
var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
@@ -7023,9 +7023,9 @@ var CloseCircleFilled = function CloseCircleFilled2(props, ref) {
|
|
|
7023
7023
|
icon: CloseCircleFilled$1
|
|
7024
7024
|
}));
|
|
7025
7025
|
};
|
|
7026
|
-
var RefIcon$
|
|
7026
|
+
var RefIcon$D = /* @__PURE__ */ React__namespace.forwardRef(CloseCircleFilled);
|
|
7027
7027
|
if (process.env.NODE_ENV !== "production") {
|
|
7028
|
-
RefIcon$
|
|
7028
|
+
RefIcon$D.displayName = "CloseCircleFilled";
|
|
7029
7029
|
}
|
|
7030
7030
|
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" };
|
|
7031
7031
|
var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
@@ -7034,9 +7034,9 @@ var CloseOutlined = function CloseOutlined2(props, ref) {
|
|
|
7034
7034
|
icon: CloseOutlined$1
|
|
7035
7035
|
}));
|
|
7036
7036
|
};
|
|
7037
|
-
var RefIcon$
|
|
7037
|
+
var RefIcon$C = /* @__PURE__ */ React__namespace.forwardRef(CloseOutlined);
|
|
7038
7038
|
if (process.env.NODE_ENV !== "production") {
|
|
7039
|
-
RefIcon$
|
|
7039
|
+
RefIcon$C.displayName = "CloseOutlined";
|
|
7040
7040
|
}
|
|
7041
7041
|
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" };
|
|
7042
7042
|
var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
@@ -7045,9 +7045,20 @@ var ExclamationCircleFilled = function ExclamationCircleFilled2(props, ref) {
|
|
|
7045
7045
|
icon: ExclamationCircleFilled$1
|
|
7046
7046
|
}));
|
|
7047
7047
|
};
|
|
7048
|
-
var RefIcon$
|
|
7048
|
+
var RefIcon$B = /* @__PURE__ */ React__namespace.forwardRef(ExclamationCircleFilled);
|
|
7049
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7050
|
+
RefIcon$B.displayName = "ExclamationCircleFilled";
|
|
7051
|
+
}
|
|
7052
|
+
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" };
|
|
7053
|
+
var InfoCircleFilled = function InfoCircleFilled2(props, ref) {
|
|
7054
|
+
return /* @__PURE__ */ React__namespace.createElement(Icon$3, _extends$1({}, props, {
|
|
7055
|
+
ref,
|
|
7056
|
+
icon: InfoCircleFilled$1
|
|
7057
|
+
}));
|
|
7058
|
+
};
|
|
7059
|
+
var RefIcon$A = /* @__PURE__ */ React__namespace.forwardRef(InfoCircleFilled);
|
|
7049
7060
|
if (process.env.NODE_ENV !== "production") {
|
|
7050
|
-
RefIcon$A.displayName = "
|
|
7061
|
+
RefIcon$A.displayName = "InfoCircleFilled";
|
|
7051
7062
|
}
|
|
7052
7063
|
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";
|
|
7053
7064
|
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";
|
|
@@ -7098,6 +7109,433 @@ const replaceElement = (element2, replacement, props) => {
|
|
|
7098
7109
|
function cloneElement(element2, props) {
|
|
7099
7110
|
return replaceElement(element2, element2, props);
|
|
7100
7111
|
}
|
|
7112
|
+
const genAlertTypeStyle = (bgColor, borderColor, iconColor, token2, alertCls) => ({
|
|
7113
|
+
background: bgColor,
|
|
7114
|
+
border: `${unit$2(token2.lineWidth)} ${token2.lineType} ${borderColor}`,
|
|
7115
|
+
[`${alertCls}-icon`]: {
|
|
7116
|
+
color: iconColor
|
|
7117
|
+
}
|
|
7118
|
+
});
|
|
7119
|
+
const genBaseStyle$9 = (token2) => {
|
|
7120
|
+
const {
|
|
7121
|
+
componentCls,
|
|
7122
|
+
motionDurationSlow: duration,
|
|
7123
|
+
marginXS,
|
|
7124
|
+
marginSM,
|
|
7125
|
+
fontSize,
|
|
7126
|
+
fontSizeLG,
|
|
7127
|
+
lineHeight,
|
|
7128
|
+
borderRadiusLG: borderRadius2,
|
|
7129
|
+
motionEaseInOutCirc,
|
|
7130
|
+
withDescriptionIconSize,
|
|
7131
|
+
colorText,
|
|
7132
|
+
colorTextHeading,
|
|
7133
|
+
withDescriptionPadding,
|
|
7134
|
+
defaultPadding
|
|
7135
|
+
} = token2;
|
|
7136
|
+
return {
|
|
7137
|
+
[componentCls]: Object.assign(Object.assign({}, resetComponent(token2)), {
|
|
7138
|
+
position: "relative",
|
|
7139
|
+
display: "flex",
|
|
7140
|
+
alignItems: "center",
|
|
7141
|
+
padding: defaultPadding,
|
|
7142
|
+
wordWrap: "break-word",
|
|
7143
|
+
borderRadius: borderRadius2,
|
|
7144
|
+
[`&${componentCls}-rtl`]: {
|
|
7145
|
+
direction: "rtl"
|
|
7146
|
+
},
|
|
7147
|
+
[`${componentCls}-content`]: {
|
|
7148
|
+
flex: 1,
|
|
7149
|
+
minWidth: 0
|
|
7150
|
+
},
|
|
7151
|
+
[`${componentCls}-icon`]: {
|
|
7152
|
+
marginInlineEnd: marginXS,
|
|
7153
|
+
lineHeight: 0
|
|
7154
|
+
},
|
|
7155
|
+
"&-description": {
|
|
7156
|
+
display: "none",
|
|
7157
|
+
fontSize,
|
|
7158
|
+
lineHeight
|
|
7159
|
+
},
|
|
7160
|
+
"&-message": {
|
|
7161
|
+
color: colorTextHeading
|
|
7162
|
+
},
|
|
7163
|
+
[`&${componentCls}-motion-leave`]: {
|
|
7164
|
+
overflow: "hidden",
|
|
7165
|
+
opacity: 1,
|
|
7166
|
+
transition: `max-height ${duration} ${motionEaseInOutCirc}, opacity ${duration} ${motionEaseInOutCirc},
|
|
7167
|
+
padding-top ${duration} ${motionEaseInOutCirc}, padding-bottom ${duration} ${motionEaseInOutCirc},
|
|
7168
|
+
margin-bottom ${duration} ${motionEaseInOutCirc}`
|
|
7169
|
+
},
|
|
7170
|
+
[`&${componentCls}-motion-leave-active`]: {
|
|
7171
|
+
maxHeight: 0,
|
|
7172
|
+
marginBottom: "0 !important",
|
|
7173
|
+
paddingTop: 0,
|
|
7174
|
+
paddingBottom: 0,
|
|
7175
|
+
opacity: 0
|
|
7176
|
+
}
|
|
7177
|
+
}),
|
|
7178
|
+
[`${componentCls}-with-description`]: {
|
|
7179
|
+
alignItems: "flex-start",
|
|
7180
|
+
padding: withDescriptionPadding,
|
|
7181
|
+
[`${componentCls}-icon`]: {
|
|
7182
|
+
marginInlineEnd: marginSM,
|
|
7183
|
+
fontSize: withDescriptionIconSize,
|
|
7184
|
+
lineHeight: 0
|
|
7185
|
+
},
|
|
7186
|
+
[`${componentCls}-message`]: {
|
|
7187
|
+
display: "block",
|
|
7188
|
+
marginBottom: marginXS,
|
|
7189
|
+
color: colorTextHeading,
|
|
7190
|
+
fontSize: fontSizeLG
|
|
7191
|
+
},
|
|
7192
|
+
[`${componentCls}-description`]: {
|
|
7193
|
+
display: "block",
|
|
7194
|
+
color: colorText
|
|
7195
|
+
}
|
|
7196
|
+
},
|
|
7197
|
+
[`${componentCls}-banner`]: {
|
|
7198
|
+
marginBottom: 0,
|
|
7199
|
+
border: "0 !important",
|
|
7200
|
+
borderRadius: 0
|
|
7201
|
+
}
|
|
7202
|
+
};
|
|
7203
|
+
};
|
|
7204
|
+
const genTypeStyle = (token2) => {
|
|
7205
|
+
const {
|
|
7206
|
+
componentCls,
|
|
7207
|
+
colorSuccess,
|
|
7208
|
+
colorSuccessBorder,
|
|
7209
|
+
colorSuccessBg,
|
|
7210
|
+
colorWarning,
|
|
7211
|
+
colorWarningBorder,
|
|
7212
|
+
colorWarningBg,
|
|
7213
|
+
colorError,
|
|
7214
|
+
colorErrorBorder,
|
|
7215
|
+
colorErrorBg,
|
|
7216
|
+
colorInfo,
|
|
7217
|
+
colorInfoBorder,
|
|
7218
|
+
colorInfoBg
|
|
7219
|
+
} = token2;
|
|
7220
|
+
return {
|
|
7221
|
+
[componentCls]: {
|
|
7222
|
+
"&-success": genAlertTypeStyle(colorSuccessBg, colorSuccessBorder, colorSuccess, token2, componentCls),
|
|
7223
|
+
"&-info": genAlertTypeStyle(colorInfoBg, colorInfoBorder, colorInfo, token2, componentCls),
|
|
7224
|
+
"&-warning": genAlertTypeStyle(colorWarningBg, colorWarningBorder, colorWarning, token2, componentCls),
|
|
7225
|
+
"&-error": Object.assign(Object.assign({}, genAlertTypeStyle(colorErrorBg, colorErrorBorder, colorError, token2, componentCls)), {
|
|
7226
|
+
[`${componentCls}-description > pre`]: {
|
|
7227
|
+
margin: 0,
|
|
7228
|
+
padding: 0
|
|
7229
|
+
}
|
|
7230
|
+
})
|
|
7231
|
+
}
|
|
7232
|
+
};
|
|
7233
|
+
};
|
|
7234
|
+
const genActionStyle = (token2) => {
|
|
7235
|
+
const {
|
|
7236
|
+
componentCls,
|
|
7237
|
+
iconCls,
|
|
7238
|
+
motionDurationMid,
|
|
7239
|
+
marginXS,
|
|
7240
|
+
fontSizeIcon,
|
|
7241
|
+
colorIcon,
|
|
7242
|
+
colorIconHover
|
|
7243
|
+
} = token2;
|
|
7244
|
+
return {
|
|
7245
|
+
[componentCls]: {
|
|
7246
|
+
"&-action": {
|
|
7247
|
+
marginInlineStart: marginXS
|
|
7248
|
+
},
|
|
7249
|
+
[`${componentCls}-close-icon`]: {
|
|
7250
|
+
marginInlineStart: marginXS,
|
|
7251
|
+
padding: 0,
|
|
7252
|
+
overflow: "hidden",
|
|
7253
|
+
fontSize: fontSizeIcon,
|
|
7254
|
+
lineHeight: unit$2(fontSizeIcon),
|
|
7255
|
+
backgroundColor: "transparent",
|
|
7256
|
+
border: "none",
|
|
7257
|
+
outline: "none",
|
|
7258
|
+
cursor: "pointer",
|
|
7259
|
+
[`${iconCls}-close`]: {
|
|
7260
|
+
color: colorIcon,
|
|
7261
|
+
transition: `color ${motionDurationMid}`,
|
|
7262
|
+
"&:hover": {
|
|
7263
|
+
color: colorIconHover
|
|
7264
|
+
}
|
|
7265
|
+
}
|
|
7266
|
+
},
|
|
7267
|
+
"&-close-text": {
|
|
7268
|
+
color: colorIcon,
|
|
7269
|
+
transition: `color ${motionDurationMid}`,
|
|
7270
|
+
"&:hover": {
|
|
7271
|
+
color: colorIconHover
|
|
7272
|
+
}
|
|
7273
|
+
}
|
|
7274
|
+
}
|
|
7275
|
+
};
|
|
7276
|
+
};
|
|
7277
|
+
const prepareComponentToken$p = (token2) => {
|
|
7278
|
+
const paddingHorizontal = 12;
|
|
7279
|
+
return {
|
|
7280
|
+
withDescriptionIconSize: token2.fontSizeHeading3,
|
|
7281
|
+
defaultPadding: `${token2.paddingContentVerticalSM}px ${paddingHorizontal}px`,
|
|
7282
|
+
withDescriptionPadding: `${token2.paddingMD}px ${token2.paddingContentHorizontalLG}px`
|
|
7283
|
+
};
|
|
7284
|
+
};
|
|
7285
|
+
const useStyle$v = genStyleHooks("Alert", (token2) => [genBaseStyle$9(token2), genTypeStyle(token2), genActionStyle(token2)], prepareComponentToken$p);
|
|
7286
|
+
var __rest$X = function(s, e3) {
|
|
7287
|
+
var t2 = {};
|
|
7288
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e3.indexOf(p) < 0) t2[p] = s[p];
|
|
7289
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7290
|
+
if (e3.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t2[p[i]] = s[p[i]];
|
|
7291
|
+
}
|
|
7292
|
+
return t2;
|
|
7293
|
+
};
|
|
7294
|
+
const iconMapFilled = {
|
|
7295
|
+
success: RefIcon$E,
|
|
7296
|
+
info: RefIcon$A,
|
|
7297
|
+
error: RefIcon$D,
|
|
7298
|
+
warning: RefIcon$B
|
|
7299
|
+
};
|
|
7300
|
+
const IconNode = (props) => {
|
|
7301
|
+
const {
|
|
7302
|
+
icon,
|
|
7303
|
+
prefixCls,
|
|
7304
|
+
type: type4
|
|
7305
|
+
} = props;
|
|
7306
|
+
const iconType = iconMapFilled[type4] || null;
|
|
7307
|
+
if (icon) {
|
|
7308
|
+
return replaceElement(icon, /* @__PURE__ */ React__namespace.createElement("span", {
|
|
7309
|
+
className: `${prefixCls}-icon`
|
|
7310
|
+
}, icon), () => ({
|
|
7311
|
+
className: classNames(`${prefixCls}-icon`, icon.props.className)
|
|
7312
|
+
}));
|
|
7313
|
+
}
|
|
7314
|
+
return /* @__PURE__ */ React__namespace.createElement(iconType, {
|
|
7315
|
+
className: `${prefixCls}-icon`
|
|
7316
|
+
});
|
|
7317
|
+
};
|
|
7318
|
+
const CloseIconNode = (props) => {
|
|
7319
|
+
const {
|
|
7320
|
+
isClosable,
|
|
7321
|
+
prefixCls,
|
|
7322
|
+
closeIcon,
|
|
7323
|
+
handleClose,
|
|
7324
|
+
ariaProps
|
|
7325
|
+
} = props;
|
|
7326
|
+
const mergedCloseIcon = closeIcon === true || closeIcon === void 0 ? /* @__PURE__ */ React__namespace.createElement(RefIcon$C, null) : closeIcon;
|
|
7327
|
+
return isClosable ? /* @__PURE__ */ React__namespace.createElement("button", Object.assign({
|
|
7328
|
+
type: "button",
|
|
7329
|
+
onClick: handleClose,
|
|
7330
|
+
className: `${prefixCls}-close-icon`,
|
|
7331
|
+
tabIndex: 0
|
|
7332
|
+
}, ariaProps), mergedCloseIcon) : null;
|
|
7333
|
+
};
|
|
7334
|
+
const Alert$1 = /* @__PURE__ */ React__namespace.forwardRef((props, ref) => {
|
|
7335
|
+
const {
|
|
7336
|
+
description,
|
|
7337
|
+
prefixCls: customizePrefixCls,
|
|
7338
|
+
message: message2,
|
|
7339
|
+
banner,
|
|
7340
|
+
className,
|
|
7341
|
+
rootClassName,
|
|
7342
|
+
style: style2,
|
|
7343
|
+
onMouseEnter,
|
|
7344
|
+
onMouseLeave,
|
|
7345
|
+
onClick,
|
|
7346
|
+
afterClose,
|
|
7347
|
+
showIcon,
|
|
7348
|
+
closable,
|
|
7349
|
+
closeText,
|
|
7350
|
+
closeIcon,
|
|
7351
|
+
action,
|
|
7352
|
+
id: id2
|
|
7353
|
+
} = props, otherProps = __rest$X(props, ["description", "prefixCls", "message", "banner", "className", "rootClassName", "style", "onMouseEnter", "onMouseLeave", "onClick", "afterClose", "showIcon", "closable", "closeText", "closeIcon", "action", "id"]);
|
|
7354
|
+
const [closed, setClosed] = React__namespace.useState(false);
|
|
7355
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7356
|
+
const warning3 = devUseWarning("Alert");
|
|
7357
|
+
warning3.deprecated(!closeText, "closeText", "closable.closeIcon");
|
|
7358
|
+
}
|
|
7359
|
+
const internalRef = React__namespace.useRef(null);
|
|
7360
|
+
React__namespace.useImperativeHandle(ref, () => ({
|
|
7361
|
+
nativeElement: internalRef.current
|
|
7362
|
+
}));
|
|
7363
|
+
const {
|
|
7364
|
+
getPrefixCls,
|
|
7365
|
+
direction,
|
|
7366
|
+
closable: contextClosable,
|
|
7367
|
+
closeIcon: contextCloseIcon,
|
|
7368
|
+
className: contextClassName,
|
|
7369
|
+
style: contextStyle
|
|
7370
|
+
} = useComponentConfig("alert");
|
|
7371
|
+
const prefixCls = getPrefixCls("alert", customizePrefixCls);
|
|
7372
|
+
const [wrapCSSVar, hashId, cssVarCls] = useStyle$v(prefixCls);
|
|
7373
|
+
const handleClose = (e3) => {
|
|
7374
|
+
var _a;
|
|
7375
|
+
setClosed(true);
|
|
7376
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e3);
|
|
7377
|
+
};
|
|
7378
|
+
const type4 = React__namespace.useMemo(() => {
|
|
7379
|
+
if (props.type !== void 0) {
|
|
7380
|
+
return props.type;
|
|
7381
|
+
}
|
|
7382
|
+
return banner ? "warning" : "info";
|
|
7383
|
+
}, [props.type, banner]);
|
|
7384
|
+
const isClosable = React__namespace.useMemo(() => {
|
|
7385
|
+
if (typeof closable === "object" && closable.closeIcon) return true;
|
|
7386
|
+
if (closeText) {
|
|
7387
|
+
return true;
|
|
7388
|
+
}
|
|
7389
|
+
if (typeof closable === "boolean") {
|
|
7390
|
+
return closable;
|
|
7391
|
+
}
|
|
7392
|
+
if (closeIcon !== false && closeIcon !== null && closeIcon !== void 0) {
|
|
7393
|
+
return true;
|
|
7394
|
+
}
|
|
7395
|
+
return !!contextClosable;
|
|
7396
|
+
}, [closeText, closeIcon, closable, contextClosable]);
|
|
7397
|
+
const isShowIcon = banner && showIcon === void 0 ? true : showIcon;
|
|
7398
|
+
const alertCls = classNames(prefixCls, `${prefixCls}-${type4}`, {
|
|
7399
|
+
[`${prefixCls}-with-description`]: !!description,
|
|
7400
|
+
[`${prefixCls}-no-icon`]: !isShowIcon,
|
|
7401
|
+
[`${prefixCls}-banner`]: !!banner,
|
|
7402
|
+
[`${prefixCls}-rtl`]: direction === "rtl"
|
|
7403
|
+
}, contextClassName, className, rootClassName, cssVarCls, hashId);
|
|
7404
|
+
const restProps = pickAttrs(otherProps, {
|
|
7405
|
+
aria: true,
|
|
7406
|
+
data: true
|
|
7407
|
+
});
|
|
7408
|
+
const mergedCloseIcon = React__namespace.useMemo(() => {
|
|
7409
|
+
if (typeof closable === "object" && closable.closeIcon) {
|
|
7410
|
+
return closable.closeIcon;
|
|
7411
|
+
}
|
|
7412
|
+
if (closeText) {
|
|
7413
|
+
return closeText;
|
|
7414
|
+
}
|
|
7415
|
+
if (closeIcon !== void 0) {
|
|
7416
|
+
return closeIcon;
|
|
7417
|
+
}
|
|
7418
|
+
if (typeof contextClosable === "object" && contextClosable.closeIcon) {
|
|
7419
|
+
return contextClosable.closeIcon;
|
|
7420
|
+
}
|
|
7421
|
+
return contextCloseIcon;
|
|
7422
|
+
}, [closeIcon, closable, closeText, contextCloseIcon]);
|
|
7423
|
+
const mergedAriaProps = React__namespace.useMemo(() => {
|
|
7424
|
+
const merged = closable !== null && closable !== void 0 ? closable : contextClosable;
|
|
7425
|
+
if (typeof merged === "object") {
|
|
7426
|
+
const {
|
|
7427
|
+
closeIcon: _
|
|
7428
|
+
} = merged, ariaProps = __rest$X(merged, ["closeIcon"]);
|
|
7429
|
+
return ariaProps;
|
|
7430
|
+
}
|
|
7431
|
+
return {};
|
|
7432
|
+
}, [closable, contextClosable]);
|
|
7433
|
+
return wrapCSSVar(/* @__PURE__ */ React__namespace.createElement(CSSMotion, {
|
|
7434
|
+
visible: !closed,
|
|
7435
|
+
motionName: `${prefixCls}-motion`,
|
|
7436
|
+
motionAppear: false,
|
|
7437
|
+
motionEnter: false,
|
|
7438
|
+
onLeaveStart: (node2) => ({
|
|
7439
|
+
maxHeight: node2.offsetHeight
|
|
7440
|
+
}),
|
|
7441
|
+
onLeaveEnd: afterClose
|
|
7442
|
+
}, ({
|
|
7443
|
+
className: motionClassName,
|
|
7444
|
+
style: motionStyle
|
|
7445
|
+
}, setRef) => /* @__PURE__ */ React__namespace.createElement("div", Object.assign({
|
|
7446
|
+
id: id2,
|
|
7447
|
+
ref: composeRef(internalRef, setRef),
|
|
7448
|
+
"data-show": !closed,
|
|
7449
|
+
className: classNames(alertCls, motionClassName),
|
|
7450
|
+
style: Object.assign(Object.assign(Object.assign({}, contextStyle), style2), motionStyle),
|
|
7451
|
+
onMouseEnter,
|
|
7452
|
+
onMouseLeave,
|
|
7453
|
+
onClick,
|
|
7454
|
+
role: "alert"
|
|
7455
|
+
}, restProps), isShowIcon ? /* @__PURE__ */ React__namespace.createElement(IconNode, {
|
|
7456
|
+
description,
|
|
7457
|
+
icon: props.icon,
|
|
7458
|
+
prefixCls,
|
|
7459
|
+
type: type4
|
|
7460
|
+
}) : null, /* @__PURE__ */ React__namespace.createElement("div", {
|
|
7461
|
+
className: `${prefixCls}-content`
|
|
7462
|
+
}, message2 ? /* @__PURE__ */ React__namespace.createElement("div", {
|
|
7463
|
+
className: `${prefixCls}-message`
|
|
7464
|
+
}, message2) : null, description ? /* @__PURE__ */ React__namespace.createElement("div", {
|
|
7465
|
+
className: `${prefixCls}-description`
|
|
7466
|
+
}, description) : null), action ? /* @__PURE__ */ React__namespace.createElement("div", {
|
|
7467
|
+
className: `${prefixCls}-action`
|
|
7468
|
+
}, action) : null, /* @__PURE__ */ React__namespace.createElement(CloseIconNode, {
|
|
7469
|
+
isClosable,
|
|
7470
|
+
prefixCls,
|
|
7471
|
+
closeIcon: mergedCloseIcon,
|
|
7472
|
+
handleClose,
|
|
7473
|
+
ariaProps: mergedAriaProps
|
|
7474
|
+
}))));
|
|
7475
|
+
});
|
|
7476
|
+
if (process.env.NODE_ENV !== "production") {
|
|
7477
|
+
Alert$1.displayName = "Alert";
|
|
7478
|
+
}
|
|
7479
|
+
function _callSuper(t2, o2, e3) {
|
|
7480
|
+
return o2 = _getPrototypeOf(o2), _possibleConstructorReturn(t2, _isNativeReflectConstruct() ? Reflect.construct(o2, e3 || [], _getPrototypeOf(t2).constructor) : o2.apply(t2, e3));
|
|
7481
|
+
}
|
|
7482
|
+
let ErrorBoundary$1 = /* @__PURE__ */ (function(_React$Component) {
|
|
7483
|
+
function ErrorBoundary2() {
|
|
7484
|
+
var _this;
|
|
7485
|
+
_classCallCheck(this, ErrorBoundary2);
|
|
7486
|
+
_this = _callSuper(this, ErrorBoundary2, arguments);
|
|
7487
|
+
_this.state = {
|
|
7488
|
+
error: void 0,
|
|
7489
|
+
info: {
|
|
7490
|
+
componentStack: ""
|
|
7491
|
+
}
|
|
7492
|
+
};
|
|
7493
|
+
return _this;
|
|
7494
|
+
}
|
|
7495
|
+
_inherits(ErrorBoundary2, _React$Component);
|
|
7496
|
+
return _createClass(ErrorBoundary2, [{
|
|
7497
|
+
key: "componentDidCatch",
|
|
7498
|
+
value: function componentDidCatch(error2, info) {
|
|
7499
|
+
this.setState({
|
|
7500
|
+
error: error2,
|
|
7501
|
+
info
|
|
7502
|
+
});
|
|
7503
|
+
}
|
|
7504
|
+
}, {
|
|
7505
|
+
key: "render",
|
|
7506
|
+
value: function render2() {
|
|
7507
|
+
const {
|
|
7508
|
+
message: message2,
|
|
7509
|
+
description,
|
|
7510
|
+
id: id2,
|
|
7511
|
+
children: children2
|
|
7512
|
+
} = this.props;
|
|
7513
|
+
const {
|
|
7514
|
+
error: error2,
|
|
7515
|
+
info
|
|
7516
|
+
} = this.state;
|
|
7517
|
+
const componentStack = (info === null || info === void 0 ? void 0 : info.componentStack) || null;
|
|
7518
|
+
const errorMessage = typeof message2 === "undefined" ? (error2 || "").toString() : message2;
|
|
7519
|
+
const errorDescription = typeof description === "undefined" ? componentStack : description;
|
|
7520
|
+
if (error2) {
|
|
7521
|
+
return /* @__PURE__ */ React__namespace.createElement(Alert$1, {
|
|
7522
|
+
id: id2,
|
|
7523
|
+
type: "error",
|
|
7524
|
+
message: errorMessage,
|
|
7525
|
+
description: /* @__PURE__ */ React__namespace.createElement("pre", {
|
|
7526
|
+
style: {
|
|
7527
|
+
fontSize: "0.9em",
|
|
7528
|
+
overflowX: "auto"
|
|
7529
|
+
}
|
|
7530
|
+
}, errorDescription)
|
|
7531
|
+
});
|
|
7532
|
+
}
|
|
7533
|
+
return children2;
|
|
7534
|
+
}
|
|
7535
|
+
}]);
|
|
7536
|
+
})(React__namespace.Component);
|
|
7537
|
+
const Alert = Alert$1;
|
|
7538
|
+
Alert.ErrorBoundary = ErrorBoundary$1;
|
|
7101
7539
|
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) => {
|
|
7102
7540
|
if (t2.clientHeight < t2.scrollHeight || t2.clientWidth < t2.scrollWidth) {
|
|
7103
7541
|
const o2 = getComputedStyle(t2, null);
|
|
@@ -21260,7 +21698,7 @@ function useIcons$1({
|
|
|
21260
21698
|
const warning3 = devUseWarning(componentName);
|
|
21261
21699
|
warning3.deprecated(!clearIcon, "clearIcon", "allowClear={{ clearIcon: React.ReactNode }}");
|
|
21262
21700
|
}
|
|
21263
|
-
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
21701
|
+
const mergedClearIcon = clearIcon !== null && clearIcon !== void 0 ? clearIcon : /* @__PURE__ */ React__namespace.createElement(RefIcon$D, null);
|
|
21264
21702
|
const getSuffixIconNode = (arrowIcon) => {
|
|
21265
21703
|
if (suffixIcon === null && !hasFeedback && !showArrow) {
|
|
21266
21704
|
return null;
|
|
@@ -21302,7 +21740,7 @@ function useIcons$1({
|
|
|
21302
21740
|
if (removeIcon !== void 0) {
|
|
21303
21741
|
mergedRemoveIcon = removeIcon;
|
|
21304
21742
|
} else {
|
|
21305
|
-
mergedRemoveIcon = /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
21743
|
+
mergedRemoveIcon = /* @__PURE__ */ React__namespace.createElement(RefIcon$C, null);
|
|
21306
21744
|
}
|
|
21307
21745
|
return {
|
|
21308
21746
|
clearIcon: mergedClearIcon,
|
|
@@ -37888,7 +38326,7 @@ const InternalTabs = /* @__PURE__ */ React__namespace.forwardRef((props, ref) =>
|
|
|
37888
38326
|
}) => {
|
|
37889
38327
|
onEdit === null || onEdit === void 0 ? void 0 : onEdit(editType === "add" ? event : key, editType);
|
|
37890
38328
|
},
|
|
37891
|
-
removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
38329
|
+
removeIcon: (_a = removeIcon !== null && removeIcon !== void 0 ? removeIcon : tabs === null || tabs === void 0 ? void 0 : tabs.removeIcon) !== null && _a !== void 0 ? _a : /* @__PURE__ */ React__namespace.createElement(RefIcon$C, null),
|
|
37892
38330
|
addIcon: (addIcon !== null && addIcon !== void 0 ? addIcon : tabs === null || tabs === void 0 ? void 0 : tabs.addIcon) || /* @__PURE__ */ React__namespace.createElement(RefIcon$r, null),
|
|
37893
38331
|
showAdd: hideAdd !== true
|
|
37894
38332
|
};
|
|
@@ -38570,7 +39008,7 @@ function throttle(delay, callback, options) {
|
|
|
38570
39008
|
wrapper.cancel = cancel;
|
|
38571
39009
|
return wrapper;
|
|
38572
39010
|
}
|
|
38573
|
-
function debounce
|
|
39011
|
+
function debounce(delay, callback, options) {
|
|
38574
39012
|
var _ref = {}, _ref$atBegin = _ref.atBegin, atBegin = _ref$atBegin === void 0 ? false : _ref$atBegin;
|
|
38575
39013
|
return throttle(delay, callback, {
|
|
38576
39014
|
debounceMode: atBegin !== false
|
|
@@ -40585,7 +41023,7 @@ const getAllowClear = (allowClear) => {
|
|
|
40585
41023
|
mergedAllowClear = allowClear;
|
|
40586
41024
|
} else if (allowClear) {
|
|
40587
41025
|
mergedAllowClear = {
|
|
40588
|
-
clearIcon: /* @__PURE__ */ React.createElement(RefIcon$
|
|
41026
|
+
clearIcon: /* @__PURE__ */ React.createElement(RefIcon$D, null)
|
|
40589
41027
|
};
|
|
40590
41028
|
}
|
|
40591
41029
|
return mergedAllowClear;
|
|
@@ -42598,9 +43036,9 @@ const FormItemLabel = ({
|
|
|
42598
43036
|
}, labelChildren));
|
|
42599
43037
|
};
|
|
42600
43038
|
const iconMap = {
|
|
42601
|
-
success: RefIcon$
|
|
42602
|
-
warning: RefIcon$
|
|
42603
|
-
error: RefIcon$
|
|
43039
|
+
success: RefIcon$E,
|
|
43040
|
+
warning: RefIcon$B,
|
|
43041
|
+
error: RefIcon$D,
|
|
42604
43042
|
validating: RefIcon$z
|
|
42605
43043
|
};
|
|
42606
43044
|
function StatusProvider({
|
|
@@ -42636,10 +43074,10 @@ function StatusProvider({
|
|
|
42636
43074
|
errors,
|
|
42637
43075
|
warnings
|
|
42638
43076
|
})) === null || _a === void 0 ? void 0 : _a[mergedValidateStatus]);
|
|
42639
|
-
const
|
|
42640
|
-
feedbackIcon = customIconNode !== false &&
|
|
43077
|
+
const IconNode2 = mergedValidateStatus && iconMap[mergedValidateStatus];
|
|
43078
|
+
feedbackIcon = customIconNode !== false && IconNode2 ? /* @__PURE__ */ React__namespace.createElement("span", {
|
|
42641
43079
|
className: classNames(`${itemPrefixCls}-feedback-icon`, `${itemPrefixCls}-feedback-icon-${mergedValidateStatus}`)
|
|
42642
|
-
}, customIconNode || /* @__PURE__ */ React__namespace.createElement(
|
|
43080
|
+
}, customIconNode || /* @__PURE__ */ React__namespace.createElement(IconNode2, null)) : null;
|
|
42643
43081
|
}
|
|
42644
43082
|
const context = {
|
|
42645
43083
|
status: mergedValidateStatus || "",
|
|
@@ -44463,7 +44901,7 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
44463
44901
|
var defaultItemRender = function defaultItemRender2(page, type4, element2) {
|
|
44464
44902
|
return element2;
|
|
44465
44903
|
};
|
|
44466
|
-
function noop$
|
|
44904
|
+
function noop$3() {
|
|
44467
44905
|
}
|
|
44468
44906
|
function isInteger(v) {
|
|
44469
44907
|
var value2 = Number(v);
|
|
@@ -44474,7 +44912,7 @@ function calculatePage(p, pageSize, total) {
|
|
|
44474
44912
|
return Math.floor((total - 1) / _pageSize) + 1;
|
|
44475
44913
|
}
|
|
44476
44914
|
var Pagination$1 = function Pagination(props) {
|
|
44477
|
-
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$
|
|
44915
|
+
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;
|
|
44478
44916
|
var paginationRef = React.useRef(null);
|
|
44479
44917
|
var _useMergedState = useMergedState(10, {
|
|
44480
44918
|
value: pageSizeProp,
|
|
@@ -44491,7 +44929,7 @@ var Pagination$1 = function Pagination(props) {
|
|
|
44491
44929
|
React.useEffect(function() {
|
|
44492
44930
|
setInternalInputVal(current);
|
|
44493
44931
|
}, [current]);
|
|
44494
|
-
var hasOnChange = onChange !== noop$
|
|
44932
|
+
var hasOnChange = onChange !== noop$3;
|
|
44495
44933
|
var hasCurrent = "current" in props;
|
|
44496
44934
|
if (process.env.NODE_ENV !== "production") {
|
|
44497
44935
|
warningOnce(hasCurrent ? hasOnChange : true, "You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");
|
|
@@ -46051,7 +46489,7 @@ const Spin = (props) => {
|
|
|
46051
46489
|
const mergedPercent = usePercent(spinning, percent);
|
|
46052
46490
|
React__namespace.useEffect(() => {
|
|
46053
46491
|
if (customSpinning) {
|
|
46054
|
-
const showSpinning = debounce
|
|
46492
|
+
const showSpinning = debounce(delay, () => {
|
|
46055
46493
|
setSpinning(true);
|
|
46056
46494
|
});
|
|
46057
46495
|
showSpinning();
|
|
@@ -46204,7 +46642,7 @@ const Overlay = (props) => {
|
|
|
46204
46642
|
cancelText,
|
|
46205
46643
|
okText,
|
|
46206
46644
|
okType = "primary",
|
|
46207
|
-
icon = /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
46645
|
+
icon = /* @__PURE__ */ React__namespace.createElement(RefIcon$B, null),
|
|
46208
46646
|
showCancel = true,
|
|
46209
46647
|
close,
|
|
46210
46648
|
onConfirm,
|
|
@@ -46282,7 +46720,7 @@ const InternalPopconfirm = /* @__PURE__ */ React__namespace.forwardRef((props, r
|
|
|
46282
46720
|
placement = "top",
|
|
46283
46721
|
trigger = "click",
|
|
46284
46722
|
okType = "primary",
|
|
46285
|
-
icon = /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
46723
|
+
icon = /* @__PURE__ */ React__namespace.createElement(RefIcon$B, null),
|
|
46286
46724
|
children: children2,
|
|
46287
46725
|
overlayClassName,
|
|
46288
46726
|
onOpenChange,
|
|
@@ -47273,9 +47711,9 @@ const Progress$2 = /* @__PURE__ */ React__namespace.forwardRef((props, ref) => {
|
|
|
47273
47711
|
if (infoPosition === "inner" || format3 || progressStatus !== "exception" && progressStatus !== "success") {
|
|
47274
47712
|
text2 = textFormatter(validProgress(percent), validProgress(successPercent));
|
|
47275
47713
|
} else if (progressStatus === "exception") {
|
|
47276
|
-
text2 = isLineType ? /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
47714
|
+
text2 = isLineType ? /* @__PURE__ */ React__namespace.createElement(RefIcon$D, null) : /* @__PURE__ */ React__namespace.createElement(RefIcon$C, null);
|
|
47277
47715
|
} else if (progressStatus === "success") {
|
|
47278
|
-
text2 = isLineType ? /* @__PURE__ */ React__namespace.createElement(RefIcon$
|
|
47716
|
+
text2 = isLineType ? /* @__PURE__ */ React__namespace.createElement(RefIcon$E, null) : /* @__PURE__ */ React__namespace.createElement(RefIcon$x, null);
|
|
47279
47717
|
}
|
|
47280
47718
|
return /* @__PURE__ */ React__namespace.createElement("span", {
|
|
47281
47719
|
className: classNames(`${prefixCls}-text`, {
|
|
@@ -48336,9 +48774,9 @@ const Unauthorized = () => /* @__PURE__ */ React__namespace.createElement("svg",
|
|
|
48336
48774
|
strokeWidth: "1.1"
|
|
48337
48775
|
})));
|
|
48338
48776
|
const IconMap = {
|
|
48339
|
-
success: RefIcon$
|
|
48340
|
-
error: RefIcon$
|
|
48341
|
-
info: RefIcon$
|
|
48777
|
+
success: RefIcon$E,
|
|
48778
|
+
error: RefIcon$D,
|
|
48779
|
+
info: RefIcon$B,
|
|
48342
48780
|
warning: RefIcon
|
|
48343
48781
|
};
|
|
48344
48782
|
const ExceptionMap = {
|
|
@@ -52715,7 +53153,7 @@ var HIDDEN_STYLE = {
|
|
|
52715
53153
|
padding: 0,
|
|
52716
53154
|
margin: 0
|
|
52717
53155
|
};
|
|
52718
|
-
var noop$
|
|
53156
|
+
var noop$2 = function noop() {
|
|
52719
53157
|
};
|
|
52720
53158
|
var MOTION_KEY = "RC_TREE_MOTION_".concat(Math.random());
|
|
52721
53159
|
var MotionNode = {
|
|
@@ -52851,7 +53289,7 @@ var NodeList = /* @__PURE__ */ React__namespace.forwardRef(function(props, ref)
|
|
|
52851
53289
|
onFocus,
|
|
52852
53290
|
onBlur,
|
|
52853
53291
|
value: "",
|
|
52854
|
-
onChange: noop$
|
|
53292
|
+
onChange: noop$2,
|
|
52855
53293
|
"aria-label": "for screen reader"
|
|
52856
53294
|
})), /* @__PURE__ */ React__namespace.createElement("div", {
|
|
52857
53295
|
className: "".concat(prefixCls, "-treenode"),
|
|
@@ -59839,7 +60277,7 @@ const Toast = ({
|
|
|
59839
60277
|
)
|
|
59840
60278
|
}
|
|
59841
60279
|
) : null,
|
|
59842
|
-
close ? /* @__PURE__ */ jsxRuntime.jsx(ToastCloseButton, { onClick: close, children: /* @__PURE__ */ jsxRuntime.jsx(RefIcon$
|
|
60280
|
+
close ? /* @__PURE__ */ jsxRuntime.jsx(ToastCloseButton, { onClick: close, children: /* @__PURE__ */ jsxRuntime.jsx(RefIcon$C, { style: { fontSize: 18 } }) }) : null
|
|
59843
60281
|
] });
|
|
59844
60282
|
};
|
|
59845
60283
|
const ToastContext = React.createContext(
|
|
@@ -71868,7 +72306,7 @@ var hasRequiredExtend;
|
|
|
71868
72306
|
function requireExtend() {
|
|
71869
72307
|
if (hasRequiredExtend) return extend$2;
|
|
71870
72308
|
hasRequiredExtend = 1;
|
|
71871
|
-
var
|
|
72309
|
+
var hasOwn2 = Object.prototype.hasOwnProperty;
|
|
71872
72310
|
var toStr = Object.prototype.toString;
|
|
71873
72311
|
var defineProperty = Object.defineProperty;
|
|
71874
72312
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
@@ -71882,15 +72320,15 @@ function requireExtend() {
|
|
|
71882
72320
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
71883
72321
|
return false;
|
|
71884
72322
|
}
|
|
71885
|
-
var hasOwnConstructor =
|
|
71886
|
-
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype &&
|
|
72323
|
+
var hasOwnConstructor = hasOwn2.call(obj, "constructor");
|
|
72324
|
+
var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn2.call(obj.constructor.prototype, "isPrototypeOf");
|
|
71887
72325
|
if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
|
|
71888
72326
|
return false;
|
|
71889
72327
|
}
|
|
71890
72328
|
var key;
|
|
71891
72329
|
for (key in obj) {
|
|
71892
72330
|
}
|
|
71893
|
-
return typeof key === "undefined" ||
|
|
72331
|
+
return typeof key === "undefined" || hasOwn2.call(obj, key);
|
|
71894
72332
|
};
|
|
71895
72333
|
var setProperty = function setProperty2(target, options) {
|
|
71896
72334
|
if (defineProperty && options.name === "__proto__") {
|
|
@@ -71906,7 +72344,7 @@ function requireExtend() {
|
|
|
71906
72344
|
};
|
|
71907
72345
|
var getProperty = function getProperty2(obj, name2) {
|
|
71908
72346
|
if (name2 === "__proto__") {
|
|
71909
|
-
if (!
|
|
72347
|
+
if (!hasOwn2.call(obj, name2)) {
|
|
71910
72348
|
return void 0;
|
|
71911
72349
|
} else if (gOPD) {
|
|
71912
72350
|
return gOPD(obj, name2).value;
|
|
@@ -71956,7 +72394,7 @@ function requireExtend() {
|
|
|
71956
72394
|
}
|
|
71957
72395
|
var extendExports = requireExtend();
|
|
71958
72396
|
const extend$1 = /* @__PURE__ */ getDefaultExportFromCjs(extendExports);
|
|
71959
|
-
function isPlainObject(value2) {
|
|
72397
|
+
function isPlainObject$1(value2) {
|
|
71960
72398
|
if (typeof value2 !== "object" || value2 === null) {
|
|
71961
72399
|
return false;
|
|
71962
72400
|
}
|
|
@@ -73360,7 +73798,7 @@ class Processor extends CallableInstance {
|
|
|
73360
73798
|
} else if (parameters2.length > 0) {
|
|
73361
73799
|
let [primary, ...rest] = parameters2;
|
|
73362
73800
|
const currentPrimary = attachers[entryIndex][1];
|
|
73363
|
-
if (isPlainObject(currentPrimary) && isPlainObject(primary)) {
|
|
73801
|
+
if (isPlainObject$1(currentPrimary) && isPlainObject$1(primary)) {
|
|
73364
73802
|
primary = extend$1(true, currentPrimary, primary);
|
|
73365
73803
|
}
|
|
73366
73804
|
attachers[entryIndex] = [plugin, primary, ...rest];
|
|
@@ -73387,7 +73825,7 @@ function assertUnfrozen(name2, frozen) {
|
|
|
73387
73825
|
}
|
|
73388
73826
|
}
|
|
73389
73827
|
function assertNode(node2) {
|
|
73390
|
-
if (!isPlainObject(node2) || typeof node2.type !== "string") {
|
|
73828
|
+
if (!isPlainObject$1(node2) || typeof node2.type !== "string") {
|
|
73391
73829
|
throw new TypeError("Expected node, got `" + node2 + "`");
|
|
73392
73830
|
}
|
|
73393
73831
|
}
|
|
@@ -74284,7 +74722,7 @@ function range2(start2, stop, step) {
|
|
|
74284
74722
|
}
|
|
74285
74723
|
return range3;
|
|
74286
74724
|
}
|
|
74287
|
-
var
|
|
74725
|
+
var noop$1 = { value: () => {
|
|
74288
74726
|
} };
|
|
74289
74727
|
function dispatch() {
|
|
74290
74728
|
for (var i = 0, n2 = arguments.length, _ = {}, t2; i < n2; ++i) {
|
|
@@ -74344,7 +74782,7 @@ function get$1(type4, name2) {
|
|
|
74344
74782
|
function set$1(type4, name2, callback) {
|
|
74345
74783
|
for (var i = 0, n2 = type4.length; i < n2; ++i) {
|
|
74346
74784
|
if (type4[i].name === name2) {
|
|
74347
|
-
type4[i] =
|
|
74785
|
+
type4[i] = noop$1, type4 = type4.slice(0, i).concat(type4.slice(i + 1));
|
|
74348
74786
|
break;
|
|
74349
74787
|
}
|
|
74350
74788
|
}
|
|
@@ -83893,118 +84331,1497 @@ const CustomPagination = ({
|
|
|
83893
84331
|
}
|
|
83894
84332
|
return null;
|
|
83895
84333
|
};
|
|
83896
|
-
var
|
|
83897
|
-
|
|
83898
|
-
|
|
83899
|
-
|
|
83900
|
-
|
|
83901
|
-
|
|
83902
|
-
|
|
83903
|
-
|
|
83904
|
-
|
|
83905
|
-
|
|
83906
|
-
|
|
83907
|
-
}
|
|
83908
|
-
|
|
83909
|
-
|
|
83910
|
-
|
|
83911
|
-
|
|
83912
|
-
|
|
83913
|
-
|
|
83914
|
-
|
|
83915
|
-
|
|
83916
|
-
|
|
83917
|
-
|
|
83918
|
-
|
|
83919
|
-
|
|
83920
|
-
|
|
84334
|
+
var Subscribable = class {
|
|
84335
|
+
constructor() {
|
|
84336
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
84337
|
+
this.subscribe = this.subscribe.bind(this);
|
|
84338
|
+
}
|
|
84339
|
+
subscribe(listener) {
|
|
84340
|
+
this.listeners.add(listener);
|
|
84341
|
+
this.onSubscribe();
|
|
84342
|
+
return () => {
|
|
84343
|
+
this.listeners.delete(listener);
|
|
84344
|
+
this.onUnsubscribe();
|
|
84345
|
+
};
|
|
84346
|
+
}
|
|
84347
|
+
hasListeners() {
|
|
84348
|
+
return this.listeners.size > 0;
|
|
84349
|
+
}
|
|
84350
|
+
onSubscribe() {
|
|
84351
|
+
}
|
|
84352
|
+
onUnsubscribe() {
|
|
84353
|
+
}
|
|
84354
|
+
};
|
|
84355
|
+
var defaultTimeoutProvider = {
|
|
84356
|
+
// We need the wrapper function syntax below instead of direct references to
|
|
84357
|
+
// global setTimeout etc.
|
|
84358
|
+
//
|
|
84359
|
+
// BAD: `setTimeout: setTimeout`
|
|
84360
|
+
// GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
|
|
84361
|
+
//
|
|
84362
|
+
// If we use direct references here, then anything that wants to spy on or
|
|
84363
|
+
// replace the global setTimeout (like tests) won't work since we'll already
|
|
84364
|
+
// have a hard reference to the original implementation at the time when this
|
|
84365
|
+
// file was imported.
|
|
84366
|
+
setTimeout: (callback, delay) => setTimeout(callback, delay),
|
|
84367
|
+
clearTimeout: (timeoutId) => clearTimeout(timeoutId),
|
|
84368
|
+
setInterval: (callback, delay) => setInterval(callback, delay),
|
|
84369
|
+
clearInterval: (intervalId) => clearInterval(intervalId)
|
|
84370
|
+
};
|
|
84371
|
+
var TimeoutManager = class {
|
|
84372
|
+
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
84373
|
+
// type at app boot; and if we leave that type, then any new timer provider
|
|
84374
|
+
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
84375
|
+
//
|
|
84376
|
+
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
84377
|
+
// this class is unsafe internally to allow for extension.
|
|
84378
|
+
#provider = defaultTimeoutProvider;
|
|
84379
|
+
#providerCalled = false;
|
|
84380
|
+
setTimeoutProvider(provider) {
|
|
84381
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84382
|
+
if (this.#providerCalled && provider !== this.#provider) {
|
|
84383
|
+
console.error(
|
|
84384
|
+
`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,
|
|
84385
|
+
{ previous: this.#provider, provider }
|
|
84386
|
+
);
|
|
84387
|
+
}
|
|
83921
84388
|
}
|
|
83922
|
-
|
|
83923
|
-
|
|
83924
|
-
|
|
83925
|
-
|
|
83926
|
-
|
|
83927
|
-
|
|
83928
|
-
|
|
83929
|
-
|
|
83930
|
-
|
|
84389
|
+
this.#provider = provider;
|
|
84390
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84391
|
+
this.#providerCalled = false;
|
|
84392
|
+
}
|
|
84393
|
+
}
|
|
84394
|
+
setTimeout(callback, delay) {
|
|
84395
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84396
|
+
this.#providerCalled = true;
|
|
84397
|
+
}
|
|
84398
|
+
return this.#provider.setTimeout(callback, delay);
|
|
84399
|
+
}
|
|
84400
|
+
clearTimeout(timeoutId) {
|
|
84401
|
+
this.#provider.clearTimeout(timeoutId);
|
|
84402
|
+
}
|
|
84403
|
+
setInterval(callback, delay) {
|
|
84404
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84405
|
+
this.#providerCalled = true;
|
|
84406
|
+
}
|
|
84407
|
+
return this.#provider.setInterval(callback, delay);
|
|
84408
|
+
}
|
|
84409
|
+
clearInterval(intervalId) {
|
|
84410
|
+
this.#provider.clearInterval(intervalId);
|
|
84411
|
+
}
|
|
84412
|
+
};
|
|
84413
|
+
var timeoutManager = new TimeoutManager();
|
|
84414
|
+
function systemSetTimeoutZero(callback) {
|
|
84415
|
+
setTimeout(callback, 0);
|
|
84416
|
+
}
|
|
84417
|
+
var isServer = typeof window === "undefined" || "Deno" in globalThis;
|
|
84418
|
+
function noop2() {
|
|
84419
|
+
}
|
|
84420
|
+
function isValidTimeout(value2) {
|
|
84421
|
+
return typeof value2 === "number" && value2 >= 0 && value2 !== Infinity;
|
|
84422
|
+
}
|
|
84423
|
+
function timeUntilStale(updatedAt, staleTime) {
|
|
84424
|
+
return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
|
|
84425
|
+
}
|
|
84426
|
+
function resolveStaleTime(staleTime, query) {
|
|
84427
|
+
return typeof staleTime === "function" ? staleTime(query) : staleTime;
|
|
84428
|
+
}
|
|
84429
|
+
function resolveEnabled(enabled, query) {
|
|
84430
|
+
return typeof enabled === "function" ? enabled(query) : enabled;
|
|
84431
|
+
}
|
|
84432
|
+
var hasOwn = Object.prototype.hasOwnProperty;
|
|
84433
|
+
function replaceEqualDeep(a, b) {
|
|
84434
|
+
if (a === b) {
|
|
84435
|
+
return a;
|
|
84436
|
+
}
|
|
84437
|
+
const array4 = isPlainArray(a) && isPlainArray(b);
|
|
84438
|
+
if (!array4 && !(isPlainObject(a) && isPlainObject(b))) return b;
|
|
84439
|
+
const aItems = array4 ? a : Object.keys(a);
|
|
84440
|
+
const aSize = aItems.length;
|
|
84441
|
+
const bItems = array4 ? b : Object.keys(b);
|
|
84442
|
+
const bSize = bItems.length;
|
|
84443
|
+
const copy2 = array4 ? new Array(bSize) : {};
|
|
84444
|
+
let equalItems = 0;
|
|
84445
|
+
for (let i = 0; i < bSize; i++) {
|
|
84446
|
+
const key = array4 ? i : bItems[i];
|
|
84447
|
+
const aItem = a[key];
|
|
84448
|
+
const bItem = b[key];
|
|
84449
|
+
if (aItem === bItem) {
|
|
84450
|
+
copy2[key] = aItem;
|
|
84451
|
+
if (array4 ? i < aSize : hasOwn.call(a, key)) equalItems++;
|
|
84452
|
+
continue;
|
|
84453
|
+
}
|
|
84454
|
+
if (aItem === null || bItem === null || typeof aItem !== "object" || typeof bItem !== "object") {
|
|
84455
|
+
copy2[key] = bItem;
|
|
84456
|
+
continue;
|
|
84457
|
+
}
|
|
84458
|
+
const v = replaceEqualDeep(aItem, bItem);
|
|
84459
|
+
copy2[key] = v;
|
|
84460
|
+
if (v === aItem) equalItems++;
|
|
84461
|
+
}
|
|
84462
|
+
return aSize === bSize && equalItems === aSize ? a : copy2;
|
|
84463
|
+
}
|
|
84464
|
+
function shallowEqualObjects(a, b) {
|
|
84465
|
+
if (!b || Object.keys(a).length !== Object.keys(b).length) {
|
|
84466
|
+
return false;
|
|
84467
|
+
}
|
|
84468
|
+
for (const key in a) {
|
|
84469
|
+
if (a[key] !== b[key]) {
|
|
84470
|
+
return false;
|
|
84471
|
+
}
|
|
84472
|
+
}
|
|
84473
|
+
return true;
|
|
84474
|
+
}
|
|
84475
|
+
function isPlainArray(value2) {
|
|
84476
|
+
return Array.isArray(value2) && value2.length === Object.keys(value2).length;
|
|
84477
|
+
}
|
|
84478
|
+
function isPlainObject(o2) {
|
|
84479
|
+
if (!hasObjectPrototype(o2)) {
|
|
84480
|
+
return false;
|
|
84481
|
+
}
|
|
84482
|
+
const ctor = o2.constructor;
|
|
84483
|
+
if (ctor === void 0) {
|
|
84484
|
+
return true;
|
|
84485
|
+
}
|
|
84486
|
+
const prot = ctor.prototype;
|
|
84487
|
+
if (!hasObjectPrototype(prot)) {
|
|
84488
|
+
return false;
|
|
84489
|
+
}
|
|
84490
|
+
if (!prot.hasOwnProperty("isPrototypeOf")) {
|
|
84491
|
+
return false;
|
|
84492
|
+
}
|
|
84493
|
+
if (Object.getPrototypeOf(o2) !== Object.prototype) {
|
|
84494
|
+
return false;
|
|
84495
|
+
}
|
|
84496
|
+
return true;
|
|
84497
|
+
}
|
|
84498
|
+
function hasObjectPrototype(o2) {
|
|
84499
|
+
return Object.prototype.toString.call(o2) === "[object Object]";
|
|
84500
|
+
}
|
|
84501
|
+
function replaceData(prevData, data, options) {
|
|
84502
|
+
if (typeof options.structuralSharing === "function") {
|
|
84503
|
+
return options.structuralSharing(prevData, data);
|
|
84504
|
+
} else if (options.structuralSharing !== false) {
|
|
84505
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84506
|
+
try {
|
|
84507
|
+
return replaceEqualDeep(prevData, data);
|
|
84508
|
+
} catch (error2) {
|
|
84509
|
+
console.error(
|
|
84510
|
+
`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}`
|
|
84511
|
+
);
|
|
84512
|
+
throw error2;
|
|
83931
84513
|
}
|
|
83932
84514
|
}
|
|
83933
|
-
|
|
83934
|
-
|
|
83935
|
-
|
|
84515
|
+
return replaceEqualDeep(prevData, data);
|
|
84516
|
+
}
|
|
84517
|
+
return data;
|
|
84518
|
+
}
|
|
84519
|
+
function addToEnd(items, item, max2 = 0) {
|
|
84520
|
+
const newItems = [...items, item];
|
|
84521
|
+
return max2 && newItems.length > max2 ? newItems.slice(1) : newItems;
|
|
84522
|
+
}
|
|
84523
|
+
function addToStart(items, item, max2 = 0) {
|
|
84524
|
+
const newItems = [item, ...items];
|
|
84525
|
+
return max2 && newItems.length > max2 ? newItems.slice(0, -1) : newItems;
|
|
84526
|
+
}
|
|
84527
|
+
var skipToken = Symbol();
|
|
84528
|
+
function ensureQueryFn(options, fetchOptions) {
|
|
84529
|
+
if (process.env.NODE_ENV !== "production") {
|
|
84530
|
+
if (options.queryFn === skipToken) {
|
|
84531
|
+
console.error(
|
|
84532
|
+
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
|
|
84533
|
+
);
|
|
84534
|
+
}
|
|
84535
|
+
}
|
|
84536
|
+
if (!options.queryFn && fetchOptions?.initialPromise) {
|
|
84537
|
+
return () => fetchOptions.initialPromise;
|
|
84538
|
+
}
|
|
84539
|
+
if (!options.queryFn || options.queryFn === skipToken) {
|
|
84540
|
+
return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
|
|
84541
|
+
}
|
|
84542
|
+
return options.queryFn;
|
|
84543
|
+
}
|
|
84544
|
+
function shouldThrowError(throwOnError, params) {
|
|
84545
|
+
if (typeof throwOnError === "function") {
|
|
84546
|
+
return throwOnError(...params);
|
|
84547
|
+
}
|
|
84548
|
+
return !!throwOnError;
|
|
84549
|
+
}
|
|
84550
|
+
var FocusManager = class extends Subscribable {
|
|
84551
|
+
#focused;
|
|
84552
|
+
#cleanup;
|
|
84553
|
+
#setup;
|
|
84554
|
+
constructor() {
|
|
84555
|
+
super();
|
|
84556
|
+
this.#setup = (onFocus) => {
|
|
84557
|
+
if (!isServer && window.addEventListener) {
|
|
84558
|
+
const listener = () => onFocus();
|
|
84559
|
+
window.addEventListener("visibilitychange", listener, false);
|
|
84560
|
+
return () => {
|
|
84561
|
+
window.removeEventListener("visibilitychange", listener);
|
|
84562
|
+
};
|
|
83936
84563
|
}
|
|
83937
|
-
|
|
83938
|
-
|
|
83939
|
-
|
|
83940
|
-
|
|
83941
|
-
|
|
83942
|
-
|
|
84564
|
+
return;
|
|
84565
|
+
};
|
|
84566
|
+
}
|
|
84567
|
+
onSubscribe() {
|
|
84568
|
+
if (!this.#cleanup) {
|
|
84569
|
+
this.setEventListener(this.#setup);
|
|
84570
|
+
}
|
|
84571
|
+
}
|
|
84572
|
+
onUnsubscribe() {
|
|
84573
|
+
if (!this.hasListeners()) {
|
|
84574
|
+
this.#cleanup?.();
|
|
84575
|
+
this.#cleanup = void 0;
|
|
84576
|
+
}
|
|
84577
|
+
}
|
|
84578
|
+
setEventListener(setup) {
|
|
84579
|
+
this.#setup = setup;
|
|
84580
|
+
this.#cleanup?.();
|
|
84581
|
+
this.#cleanup = setup((focused) => {
|
|
84582
|
+
if (typeof focused === "boolean") {
|
|
84583
|
+
this.setFocused(focused);
|
|
84584
|
+
} else {
|
|
84585
|
+
this.onFocus();
|
|
83943
84586
|
}
|
|
83944
|
-
|
|
83945
|
-
|
|
84587
|
+
});
|
|
84588
|
+
}
|
|
84589
|
+
setFocused(focused) {
|
|
84590
|
+
const changed = this.#focused !== focused;
|
|
84591
|
+
if (changed) {
|
|
84592
|
+
this.#focused = focused;
|
|
84593
|
+
this.onFocus();
|
|
84594
|
+
}
|
|
84595
|
+
}
|
|
84596
|
+
onFocus() {
|
|
84597
|
+
const isFocused = this.isFocused();
|
|
84598
|
+
this.listeners.forEach((listener) => {
|
|
84599
|
+
listener(isFocused);
|
|
84600
|
+
});
|
|
84601
|
+
}
|
|
84602
|
+
isFocused() {
|
|
84603
|
+
if (typeof this.#focused === "boolean") {
|
|
84604
|
+
return this.#focused;
|
|
84605
|
+
}
|
|
84606
|
+
return globalThis.document?.visibilityState !== "hidden";
|
|
84607
|
+
}
|
|
84608
|
+
};
|
|
84609
|
+
var focusManager = new FocusManager();
|
|
84610
|
+
function pendingThenable() {
|
|
84611
|
+
let resolve;
|
|
84612
|
+
let reject;
|
|
84613
|
+
const thenable = new Promise((_resolve, _reject) => {
|
|
84614
|
+
resolve = _resolve;
|
|
84615
|
+
reject = _reject;
|
|
84616
|
+
});
|
|
84617
|
+
thenable.status = "pending";
|
|
84618
|
+
thenable.catch(() => {
|
|
84619
|
+
});
|
|
84620
|
+
function finalize(data) {
|
|
84621
|
+
Object.assign(thenable, data);
|
|
84622
|
+
delete thenable.resolve;
|
|
84623
|
+
delete thenable.reject;
|
|
84624
|
+
}
|
|
84625
|
+
thenable.resolve = (value2) => {
|
|
84626
|
+
finalize({
|
|
84627
|
+
status: "fulfilled",
|
|
84628
|
+
value: value2
|
|
84629
|
+
});
|
|
84630
|
+
resolve(value2);
|
|
84631
|
+
};
|
|
84632
|
+
thenable.reject = (reason) => {
|
|
84633
|
+
finalize({
|
|
84634
|
+
status: "rejected",
|
|
84635
|
+
reason
|
|
84636
|
+
});
|
|
84637
|
+
reject(reason);
|
|
84638
|
+
};
|
|
84639
|
+
return thenable;
|
|
84640
|
+
}
|
|
84641
|
+
var defaultScheduler = systemSetTimeoutZero;
|
|
84642
|
+
function createNotifyManager() {
|
|
84643
|
+
let queue = [];
|
|
84644
|
+
let transactions = 0;
|
|
84645
|
+
let notifyFn = (callback) => {
|
|
84646
|
+
callback();
|
|
84647
|
+
};
|
|
84648
|
+
let batchNotifyFn = (callback) => {
|
|
84649
|
+
callback();
|
|
84650
|
+
};
|
|
84651
|
+
let scheduleFn = defaultScheduler;
|
|
84652
|
+
const schedule2 = (callback) => {
|
|
84653
|
+
if (transactions) {
|
|
84654
|
+
queue.push(callback);
|
|
84655
|
+
} else {
|
|
84656
|
+
scheduleFn(() => {
|
|
84657
|
+
notifyFn(callback);
|
|
84658
|
+
});
|
|
84659
|
+
}
|
|
84660
|
+
};
|
|
84661
|
+
const flush = () => {
|
|
84662
|
+
const originalQueue = queue;
|
|
84663
|
+
queue = [];
|
|
84664
|
+
if (originalQueue.length) {
|
|
84665
|
+
scheduleFn(() => {
|
|
84666
|
+
batchNotifyFn(() => {
|
|
84667
|
+
originalQueue.forEach((callback) => {
|
|
84668
|
+
notifyFn(callback);
|
|
84669
|
+
});
|
|
84670
|
+
});
|
|
84671
|
+
});
|
|
84672
|
+
}
|
|
84673
|
+
};
|
|
84674
|
+
return {
|
|
84675
|
+
batch: (callback) => {
|
|
84676
|
+
let result;
|
|
84677
|
+
transactions++;
|
|
84678
|
+
try {
|
|
84679
|
+
result = callback();
|
|
84680
|
+
} finally {
|
|
84681
|
+
transactions--;
|
|
84682
|
+
if (!transactions) {
|
|
84683
|
+
flush();
|
|
84684
|
+
}
|
|
83946
84685
|
}
|
|
83947
84686
|
return result;
|
|
84687
|
+
},
|
|
84688
|
+
/**
|
|
84689
|
+
* All calls to the wrapped function will be batched.
|
|
84690
|
+
*/
|
|
84691
|
+
batchCalls: (callback) => {
|
|
84692
|
+
return (...args) => {
|
|
84693
|
+
schedule2(() => {
|
|
84694
|
+
callback(...args);
|
|
84695
|
+
});
|
|
84696
|
+
};
|
|
84697
|
+
},
|
|
84698
|
+
schedule: schedule2,
|
|
84699
|
+
/**
|
|
84700
|
+
* Use this method to set a custom notify function.
|
|
84701
|
+
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
84702
|
+
*/
|
|
84703
|
+
setNotifyFunction: (fn) => {
|
|
84704
|
+
notifyFn = fn;
|
|
84705
|
+
},
|
|
84706
|
+
/**
|
|
84707
|
+
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
84708
|
+
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
84709
|
+
*/
|
|
84710
|
+
setBatchNotifyFunction: (fn) => {
|
|
84711
|
+
batchNotifyFn = fn;
|
|
84712
|
+
},
|
|
84713
|
+
setScheduler: (fn) => {
|
|
84714
|
+
scheduleFn = fn;
|
|
84715
|
+
}
|
|
84716
|
+
};
|
|
84717
|
+
}
|
|
84718
|
+
var notifyManager = createNotifyManager();
|
|
84719
|
+
var OnlineManager = class extends Subscribable {
|
|
84720
|
+
#online = true;
|
|
84721
|
+
#cleanup;
|
|
84722
|
+
#setup;
|
|
84723
|
+
constructor() {
|
|
84724
|
+
super();
|
|
84725
|
+
this.#setup = (onOnline) => {
|
|
84726
|
+
if (!isServer && window.addEventListener) {
|
|
84727
|
+
const onlineListener = () => onOnline(true);
|
|
84728
|
+
const offlineListener = () => onOnline(false);
|
|
84729
|
+
window.addEventListener("online", onlineListener, false);
|
|
84730
|
+
window.addEventListener("offline", offlineListener, false);
|
|
84731
|
+
return () => {
|
|
84732
|
+
window.removeEventListener("online", onlineListener);
|
|
84733
|
+
window.removeEventListener("offline", offlineListener);
|
|
84734
|
+
};
|
|
84735
|
+
}
|
|
84736
|
+
return;
|
|
83948
84737
|
};
|
|
83949
|
-
|
|
83950
|
-
|
|
83951
|
-
|
|
84738
|
+
}
|
|
84739
|
+
onSubscribe() {
|
|
84740
|
+
if (!this.#cleanup) {
|
|
84741
|
+
this.setEventListener(this.#setup);
|
|
84742
|
+
}
|
|
84743
|
+
}
|
|
84744
|
+
onUnsubscribe() {
|
|
84745
|
+
if (!this.hasListeners()) {
|
|
84746
|
+
this.#cleanup?.();
|
|
84747
|
+
this.#cleanup = void 0;
|
|
84748
|
+
}
|
|
84749
|
+
}
|
|
84750
|
+
setEventListener(setup) {
|
|
84751
|
+
this.#setup = setup;
|
|
84752
|
+
this.#cleanup?.();
|
|
84753
|
+
this.#cleanup = setup(this.setOnline.bind(this));
|
|
84754
|
+
}
|
|
84755
|
+
setOnline(online) {
|
|
84756
|
+
const changed = this.#online !== online;
|
|
84757
|
+
if (changed) {
|
|
84758
|
+
this.#online = online;
|
|
84759
|
+
this.listeners.forEach((listener) => {
|
|
84760
|
+
listener(online);
|
|
84761
|
+
});
|
|
84762
|
+
}
|
|
84763
|
+
}
|
|
84764
|
+
isOnline() {
|
|
84765
|
+
return this.#online;
|
|
84766
|
+
}
|
|
84767
|
+
};
|
|
84768
|
+
var onlineManager = new OnlineManager();
|
|
84769
|
+
function canFetch(networkMode) {
|
|
84770
|
+
return (networkMode ?? "online") === "online" ? onlineManager.isOnline() : true;
|
|
84771
|
+
}
|
|
84772
|
+
function fetchState(data, options) {
|
|
84773
|
+
return {
|
|
84774
|
+
fetchFailureCount: 0,
|
|
84775
|
+
fetchFailureReason: null,
|
|
84776
|
+
fetchStatus: canFetch(options.networkMode) ? "fetching" : "paused",
|
|
84777
|
+
...data === void 0 && {
|
|
84778
|
+
error: null,
|
|
84779
|
+
status: "pending"
|
|
84780
|
+
}
|
|
84781
|
+
};
|
|
84782
|
+
}
|
|
84783
|
+
var QueryObserver = class extends Subscribable {
|
|
84784
|
+
constructor(client, options) {
|
|
84785
|
+
super();
|
|
84786
|
+
this.options = options;
|
|
84787
|
+
this.#client = client;
|
|
84788
|
+
this.#selectError = null;
|
|
84789
|
+
this.#currentThenable = pendingThenable();
|
|
84790
|
+
this.bindMethods();
|
|
84791
|
+
this.setOptions(options);
|
|
84792
|
+
}
|
|
84793
|
+
#client;
|
|
84794
|
+
#currentQuery = void 0;
|
|
84795
|
+
#currentQueryInitialState = void 0;
|
|
84796
|
+
#currentResult = void 0;
|
|
84797
|
+
#currentResultState;
|
|
84798
|
+
#currentResultOptions;
|
|
84799
|
+
#currentThenable;
|
|
84800
|
+
#selectError;
|
|
84801
|
+
#selectFn;
|
|
84802
|
+
#selectResult;
|
|
84803
|
+
// This property keeps track of the last query with defined data.
|
|
84804
|
+
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
84805
|
+
#lastQueryWithDefinedData;
|
|
84806
|
+
#staleTimeoutId;
|
|
84807
|
+
#refetchIntervalId;
|
|
84808
|
+
#currentRefetchInterval;
|
|
84809
|
+
#trackedProps = /* @__PURE__ */ new Set();
|
|
84810
|
+
bindMethods() {
|
|
84811
|
+
this.refetch = this.refetch.bind(this);
|
|
84812
|
+
}
|
|
84813
|
+
onSubscribe() {
|
|
84814
|
+
if (this.listeners.size === 1) {
|
|
84815
|
+
this.#currentQuery.addObserver(this);
|
|
84816
|
+
if (shouldFetchOnMount(this.#currentQuery, this.options)) {
|
|
84817
|
+
this.#executeFetch();
|
|
84818
|
+
} else {
|
|
84819
|
+
this.updateResult();
|
|
84820
|
+
}
|
|
84821
|
+
this.#updateTimers();
|
|
84822
|
+
}
|
|
84823
|
+
}
|
|
84824
|
+
onUnsubscribe() {
|
|
84825
|
+
if (!this.hasListeners()) {
|
|
84826
|
+
this.destroy();
|
|
84827
|
+
}
|
|
84828
|
+
}
|
|
84829
|
+
shouldFetchOnReconnect() {
|
|
84830
|
+
return shouldFetchOn(
|
|
84831
|
+
this.#currentQuery,
|
|
84832
|
+
this.options,
|
|
84833
|
+
this.options.refetchOnReconnect
|
|
84834
|
+
);
|
|
84835
|
+
}
|
|
84836
|
+
shouldFetchOnWindowFocus() {
|
|
84837
|
+
return shouldFetchOn(
|
|
84838
|
+
this.#currentQuery,
|
|
84839
|
+
this.options,
|
|
84840
|
+
this.options.refetchOnWindowFocus
|
|
84841
|
+
);
|
|
84842
|
+
}
|
|
84843
|
+
destroy() {
|
|
84844
|
+
this.listeners = /* @__PURE__ */ new Set();
|
|
84845
|
+
this.#clearStaleTimeout();
|
|
84846
|
+
this.#clearRefetchInterval();
|
|
84847
|
+
this.#currentQuery.removeObserver(this);
|
|
84848
|
+
}
|
|
84849
|
+
setOptions(options) {
|
|
84850
|
+
const prevOptions = this.options;
|
|
84851
|
+
const prevQuery = this.#currentQuery;
|
|
84852
|
+
this.options = this.#client.defaultQueryOptions(options);
|
|
84853
|
+
if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof resolveEnabled(this.options.enabled, this.#currentQuery) !== "boolean") {
|
|
84854
|
+
throw new Error(
|
|
84855
|
+
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
84856
|
+
);
|
|
84857
|
+
}
|
|
84858
|
+
this.#updateQuery();
|
|
84859
|
+
this.#currentQuery.setOptions(this.options);
|
|
84860
|
+
if (prevOptions._defaulted && !shallowEqualObjects(this.options, prevOptions)) {
|
|
84861
|
+
this.#client.getQueryCache().notify({
|
|
84862
|
+
type: "observerOptionsUpdated",
|
|
84863
|
+
query: this.#currentQuery,
|
|
84864
|
+
observer: this
|
|
84865
|
+
});
|
|
84866
|
+
}
|
|
84867
|
+
const mounted = this.hasListeners();
|
|
84868
|
+
if (mounted && shouldFetchOptionally(
|
|
84869
|
+
this.#currentQuery,
|
|
84870
|
+
prevQuery,
|
|
84871
|
+
this.options,
|
|
84872
|
+
prevOptions
|
|
84873
|
+
)) {
|
|
84874
|
+
this.#executeFetch();
|
|
84875
|
+
}
|
|
84876
|
+
this.updateResult();
|
|
84877
|
+
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))) {
|
|
84878
|
+
this.#updateStaleTimeout();
|
|
84879
|
+
}
|
|
84880
|
+
const nextRefetchInterval = this.#computeRefetchInterval();
|
|
84881
|
+
if (mounted && (this.#currentQuery !== prevQuery || resolveEnabled(this.options.enabled, this.#currentQuery) !== resolveEnabled(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
|
|
84882
|
+
this.#updateRefetchInterval(nextRefetchInterval);
|
|
84883
|
+
}
|
|
84884
|
+
}
|
|
84885
|
+
getOptimisticResult(options) {
|
|
84886
|
+
const query = this.#client.getQueryCache().build(this.#client, options);
|
|
84887
|
+
const result = this.createResult(query, options);
|
|
84888
|
+
if (shouldAssignObserverCurrentProperties(this, result)) {
|
|
84889
|
+
this.#currentResult = result;
|
|
84890
|
+
this.#currentResultOptions = this.options;
|
|
84891
|
+
this.#currentResultState = this.#currentQuery.state;
|
|
84892
|
+
}
|
|
84893
|
+
return result;
|
|
84894
|
+
}
|
|
84895
|
+
getCurrentResult() {
|
|
84896
|
+
return this.#currentResult;
|
|
84897
|
+
}
|
|
84898
|
+
trackResult(result, onPropTracked) {
|
|
84899
|
+
return new Proxy(result, {
|
|
84900
|
+
get: (target, key) => {
|
|
84901
|
+
this.trackProp(key);
|
|
84902
|
+
onPropTracked?.(key);
|
|
84903
|
+
if (key === "promise" && !this.options.experimental_prefetchInRender && this.#currentThenable.status === "pending") {
|
|
84904
|
+
this.#currentThenable.reject(
|
|
84905
|
+
new Error(
|
|
84906
|
+
"experimental_prefetchInRender feature flag is not enabled"
|
|
84907
|
+
)
|
|
84908
|
+
);
|
|
84909
|
+
}
|
|
84910
|
+
return Reflect.get(target, key);
|
|
83952
84911
|
}
|
|
83953
84912
|
});
|
|
83954
|
-
|
|
83955
|
-
|
|
83956
|
-
|
|
84913
|
+
}
|
|
84914
|
+
trackProp(key) {
|
|
84915
|
+
this.#trackedProps.add(key);
|
|
84916
|
+
}
|
|
84917
|
+
getCurrentQuery() {
|
|
84918
|
+
return this.#currentQuery;
|
|
84919
|
+
}
|
|
84920
|
+
refetch({ ...options } = {}) {
|
|
84921
|
+
return this.fetch({
|
|
84922
|
+
...options
|
|
84923
|
+
});
|
|
84924
|
+
}
|
|
84925
|
+
fetchOptimistic(options) {
|
|
84926
|
+
const defaultedOptions = this.#client.defaultQueryOptions(options);
|
|
84927
|
+
const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
|
|
84928
|
+
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
|
84929
|
+
}
|
|
84930
|
+
fetch(fetchOptions) {
|
|
84931
|
+
return this.#executeFetch({
|
|
84932
|
+
...fetchOptions,
|
|
84933
|
+
cancelRefetch: fetchOptions.cancelRefetch ?? true
|
|
84934
|
+
}).then(() => {
|
|
84935
|
+
this.updateResult();
|
|
84936
|
+
return this.#currentResult;
|
|
84937
|
+
});
|
|
84938
|
+
}
|
|
84939
|
+
#executeFetch(fetchOptions) {
|
|
84940
|
+
this.#updateQuery();
|
|
84941
|
+
let promise = this.#currentQuery.fetch(
|
|
84942
|
+
this.options,
|
|
84943
|
+
fetchOptions
|
|
84944
|
+
);
|
|
84945
|
+
if (!fetchOptions?.throwOnError) {
|
|
84946
|
+
promise = promise.catch(noop2);
|
|
84947
|
+
}
|
|
84948
|
+
return promise;
|
|
84949
|
+
}
|
|
84950
|
+
#updateStaleTimeout() {
|
|
84951
|
+
this.#clearStaleTimeout();
|
|
84952
|
+
const staleTime = resolveStaleTime(
|
|
84953
|
+
this.options.staleTime,
|
|
84954
|
+
this.#currentQuery
|
|
84955
|
+
);
|
|
84956
|
+
if (isServer || this.#currentResult.isStale || !isValidTimeout(staleTime)) {
|
|
84957
|
+
return;
|
|
84958
|
+
}
|
|
84959
|
+
const time = timeUntilStale(this.#currentResult.dataUpdatedAt, staleTime);
|
|
84960
|
+
const timeout2 = time + 1;
|
|
84961
|
+
this.#staleTimeoutId = timeoutManager.setTimeout(() => {
|
|
84962
|
+
if (!this.#currentResult.isStale) {
|
|
84963
|
+
this.updateResult();
|
|
83957
84964
|
}
|
|
83958
|
-
|
|
83959
|
-
|
|
84965
|
+
}, timeout2);
|
|
84966
|
+
}
|
|
84967
|
+
#computeRefetchInterval() {
|
|
84968
|
+
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
|
|
84969
|
+
}
|
|
84970
|
+
#updateRefetchInterval(nextInterval) {
|
|
84971
|
+
this.#clearRefetchInterval();
|
|
84972
|
+
this.#currentRefetchInterval = nextInterval;
|
|
84973
|
+
if (isServer || resolveEnabled(this.options.enabled, this.#currentQuery) === false || !isValidTimeout(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
|
|
84974
|
+
return;
|
|
84975
|
+
}
|
|
84976
|
+
this.#refetchIntervalId = timeoutManager.setInterval(() => {
|
|
84977
|
+
if (this.options.refetchIntervalInBackground || focusManager.isFocused()) {
|
|
84978
|
+
this.#executeFetch();
|
|
84979
|
+
}
|
|
84980
|
+
}, this.#currentRefetchInterval);
|
|
84981
|
+
}
|
|
84982
|
+
#updateTimers() {
|
|
84983
|
+
this.#updateStaleTimeout();
|
|
84984
|
+
this.#updateRefetchInterval(this.#computeRefetchInterval());
|
|
84985
|
+
}
|
|
84986
|
+
#clearStaleTimeout() {
|
|
84987
|
+
if (this.#staleTimeoutId) {
|
|
84988
|
+
timeoutManager.clearTimeout(this.#staleTimeoutId);
|
|
84989
|
+
this.#staleTimeoutId = void 0;
|
|
84990
|
+
}
|
|
84991
|
+
}
|
|
84992
|
+
#clearRefetchInterval() {
|
|
84993
|
+
if (this.#refetchIntervalId) {
|
|
84994
|
+
timeoutManager.clearInterval(this.#refetchIntervalId);
|
|
84995
|
+
this.#refetchIntervalId = void 0;
|
|
84996
|
+
}
|
|
84997
|
+
}
|
|
84998
|
+
createResult(query, options) {
|
|
84999
|
+
const prevQuery = this.#currentQuery;
|
|
85000
|
+
const prevOptions = this.options;
|
|
85001
|
+
const prevResult = this.#currentResult;
|
|
85002
|
+
const prevResultState = this.#currentResultState;
|
|
85003
|
+
const prevResultOptions = this.#currentResultOptions;
|
|
85004
|
+
const queryChange = query !== prevQuery;
|
|
85005
|
+
const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
|
|
85006
|
+
const { state } = query;
|
|
85007
|
+
let newState = { ...state };
|
|
85008
|
+
let isPlaceholderData = false;
|
|
85009
|
+
let data;
|
|
85010
|
+
if (options._optimisticResults) {
|
|
85011
|
+
const mounted = this.hasListeners();
|
|
85012
|
+
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
|
85013
|
+
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
|
85014
|
+
if (fetchOnMount || fetchOptionally) {
|
|
85015
|
+
newState = {
|
|
85016
|
+
...newState,
|
|
85017
|
+
...fetchState(state.data, query.options)
|
|
85018
|
+
};
|
|
85019
|
+
}
|
|
85020
|
+
if (options._optimisticResults === "isRestoring") {
|
|
85021
|
+
newState.fetchStatus = "idle";
|
|
85022
|
+
}
|
|
85023
|
+
}
|
|
85024
|
+
let { error: error2, errorUpdatedAt, status } = newState;
|
|
85025
|
+
data = newState.data;
|
|
85026
|
+
let skipSelect = false;
|
|
85027
|
+
if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
|
|
85028
|
+
let placeholderData;
|
|
85029
|
+
if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
|
|
85030
|
+
placeholderData = prevResult.data;
|
|
85031
|
+
skipSelect = true;
|
|
85032
|
+
} else {
|
|
85033
|
+
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
|
|
85034
|
+
this.#lastQueryWithDefinedData?.state.data,
|
|
85035
|
+
this.#lastQueryWithDefinedData
|
|
85036
|
+
) : options.placeholderData;
|
|
85037
|
+
}
|
|
85038
|
+
if (placeholderData !== void 0) {
|
|
85039
|
+
status = "success";
|
|
85040
|
+
data = replaceData(
|
|
85041
|
+
prevResult?.data,
|
|
85042
|
+
placeholderData,
|
|
85043
|
+
options
|
|
85044
|
+
);
|
|
85045
|
+
isPlaceholderData = true;
|
|
85046
|
+
}
|
|
85047
|
+
}
|
|
85048
|
+
if (options.select && data !== void 0 && !skipSelect) {
|
|
85049
|
+
if (prevResult && data === prevResultState?.data && options.select === this.#selectFn) {
|
|
85050
|
+
data = this.#selectResult;
|
|
85051
|
+
} else {
|
|
85052
|
+
try {
|
|
85053
|
+
this.#selectFn = options.select;
|
|
85054
|
+
data = options.select(data);
|
|
85055
|
+
data = replaceData(prevResult?.data, data, options);
|
|
85056
|
+
this.#selectResult = data;
|
|
85057
|
+
this.#selectError = null;
|
|
85058
|
+
} catch (selectError) {
|
|
85059
|
+
this.#selectError = selectError;
|
|
85060
|
+
}
|
|
85061
|
+
}
|
|
85062
|
+
}
|
|
85063
|
+
if (this.#selectError) {
|
|
85064
|
+
error2 = this.#selectError;
|
|
85065
|
+
data = this.#selectResult;
|
|
85066
|
+
errorUpdatedAt = Date.now();
|
|
85067
|
+
status = "error";
|
|
85068
|
+
}
|
|
85069
|
+
const isFetching = newState.fetchStatus === "fetching";
|
|
85070
|
+
const isPending = status === "pending";
|
|
85071
|
+
const isError = status === "error";
|
|
85072
|
+
const isLoading = isPending && isFetching;
|
|
85073
|
+
const hasData = data !== void 0;
|
|
85074
|
+
const result = {
|
|
85075
|
+
status,
|
|
85076
|
+
fetchStatus: newState.fetchStatus,
|
|
85077
|
+
isPending,
|
|
85078
|
+
isSuccess: status === "success",
|
|
85079
|
+
isError,
|
|
85080
|
+
isInitialLoading: isLoading,
|
|
85081
|
+
isLoading,
|
|
85082
|
+
data,
|
|
85083
|
+
dataUpdatedAt: newState.dataUpdatedAt,
|
|
85084
|
+
error: error2,
|
|
85085
|
+
errorUpdatedAt,
|
|
85086
|
+
failureCount: newState.fetchFailureCount,
|
|
85087
|
+
failureReason: newState.fetchFailureReason,
|
|
85088
|
+
errorUpdateCount: newState.errorUpdateCount,
|
|
85089
|
+
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
|
|
85090
|
+
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
|
|
85091
|
+
isFetching,
|
|
85092
|
+
isRefetching: isFetching && !isPending,
|
|
85093
|
+
isLoadingError: isError && !hasData,
|
|
85094
|
+
isPaused: newState.fetchStatus === "paused",
|
|
85095
|
+
isPlaceholderData,
|
|
85096
|
+
isRefetchError: isError && hasData,
|
|
85097
|
+
isStale: isStale(query, options),
|
|
85098
|
+
refetch: this.refetch,
|
|
85099
|
+
promise: this.#currentThenable,
|
|
85100
|
+
isEnabled: resolveEnabled(options.enabled, query) !== false
|
|
83960
85101
|
};
|
|
83961
|
-
|
|
83962
|
-
|
|
83963
|
-
|
|
85102
|
+
const nextResult = result;
|
|
85103
|
+
if (this.options.experimental_prefetchInRender) {
|
|
85104
|
+
const finalizeThenableIfPossible = (thenable) => {
|
|
85105
|
+
if (nextResult.status === "error") {
|
|
85106
|
+
thenable.reject(nextResult.error);
|
|
85107
|
+
} else if (nextResult.data !== void 0) {
|
|
85108
|
+
thenable.resolve(nextResult.data);
|
|
85109
|
+
}
|
|
85110
|
+
};
|
|
85111
|
+
const recreateThenable = () => {
|
|
85112
|
+
const pending = this.#currentThenable = nextResult.promise = pendingThenable();
|
|
85113
|
+
finalizeThenableIfPossible(pending);
|
|
85114
|
+
};
|
|
85115
|
+
const prevThenable = this.#currentThenable;
|
|
85116
|
+
switch (prevThenable.status) {
|
|
85117
|
+
case "pending":
|
|
85118
|
+
if (query.queryHash === prevQuery.queryHash) {
|
|
85119
|
+
finalizeThenableIfPossible(prevThenable);
|
|
85120
|
+
}
|
|
85121
|
+
break;
|
|
85122
|
+
case "fulfilled":
|
|
85123
|
+
if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
|
|
85124
|
+
recreateThenable();
|
|
85125
|
+
}
|
|
85126
|
+
break;
|
|
85127
|
+
case "rejected":
|
|
85128
|
+
if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
|
|
85129
|
+
recreateThenable();
|
|
85130
|
+
}
|
|
85131
|
+
break;
|
|
85132
|
+
}
|
|
85133
|
+
}
|
|
85134
|
+
return nextResult;
|
|
85135
|
+
}
|
|
85136
|
+
updateResult() {
|
|
85137
|
+
const prevResult = this.#currentResult;
|
|
85138
|
+
const nextResult = this.createResult(this.#currentQuery, this.options);
|
|
85139
|
+
this.#currentResultState = this.#currentQuery.state;
|
|
85140
|
+
this.#currentResultOptions = this.options;
|
|
85141
|
+
if (this.#currentResultState.data !== void 0) {
|
|
85142
|
+
this.#lastQueryWithDefinedData = this.#currentQuery;
|
|
85143
|
+
}
|
|
85144
|
+
if (shallowEqualObjects(nextResult, prevResult)) {
|
|
85145
|
+
return;
|
|
85146
|
+
}
|
|
85147
|
+
this.#currentResult = nextResult;
|
|
85148
|
+
const shouldNotifyListeners = () => {
|
|
85149
|
+
if (!prevResult) {
|
|
85150
|
+
return true;
|
|
85151
|
+
}
|
|
85152
|
+
const { notifyOnChangeProps } = this.options;
|
|
85153
|
+
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
|
85154
|
+
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
|
|
85155
|
+
return true;
|
|
85156
|
+
}
|
|
85157
|
+
const includedProps = new Set(
|
|
85158
|
+
notifyOnChangePropsValue ?? this.#trackedProps
|
|
85159
|
+
);
|
|
85160
|
+
if (this.options.throwOnError) {
|
|
85161
|
+
includedProps.add("error");
|
|
83964
85162
|
}
|
|
83965
|
-
|
|
85163
|
+
return Object.keys(this.#currentResult).some((key) => {
|
|
85164
|
+
const typedKey = key;
|
|
85165
|
+
const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
|
|
85166
|
+
return changed && includedProps.has(typedKey);
|
|
85167
|
+
});
|
|
83966
85168
|
};
|
|
83967
|
-
|
|
83968
|
-
|
|
83969
|
-
|
|
85169
|
+
this.#notify({ listeners: shouldNotifyListeners() });
|
|
85170
|
+
}
|
|
85171
|
+
#updateQuery() {
|
|
85172
|
+
const query = this.#client.getQueryCache().build(this.#client, this.options);
|
|
85173
|
+
if (query === this.#currentQuery) {
|
|
85174
|
+
return;
|
|
85175
|
+
}
|
|
85176
|
+
const prevQuery = this.#currentQuery;
|
|
85177
|
+
this.#currentQuery = query;
|
|
85178
|
+
this.#currentQueryInitialState = query.state;
|
|
85179
|
+
if (this.hasListeners()) {
|
|
85180
|
+
prevQuery?.removeObserver(this);
|
|
85181
|
+
query.addObserver(this);
|
|
85182
|
+
}
|
|
85183
|
+
}
|
|
85184
|
+
onQueryUpdate() {
|
|
85185
|
+
this.updateResult();
|
|
85186
|
+
if (this.hasListeners()) {
|
|
85187
|
+
this.#updateTimers();
|
|
85188
|
+
}
|
|
85189
|
+
}
|
|
85190
|
+
#notify(notifyOptions) {
|
|
85191
|
+
notifyManager.batch(() => {
|
|
85192
|
+
if (notifyOptions.listeners) {
|
|
85193
|
+
this.listeners.forEach((listener) => {
|
|
85194
|
+
listener(this.#currentResult);
|
|
85195
|
+
});
|
|
85196
|
+
}
|
|
85197
|
+
this.#client.getQueryCache().notify({
|
|
85198
|
+
query: this.#currentQuery,
|
|
85199
|
+
type: "observerResultsUpdated"
|
|
85200
|
+
});
|
|
85201
|
+
});
|
|
85202
|
+
}
|
|
85203
|
+
};
|
|
85204
|
+
function shouldLoadOnMount(query, options) {
|
|
85205
|
+
return resolveEnabled(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
|
|
85206
|
+
}
|
|
85207
|
+
function shouldFetchOnMount(query, options) {
|
|
85208
|
+
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
|
85209
|
+
}
|
|
85210
|
+
function shouldFetchOn(query, options, field) {
|
|
85211
|
+
if (resolveEnabled(options.enabled, query) !== false && resolveStaleTime(options.staleTime, query) !== "static") {
|
|
85212
|
+
const value2 = typeof field === "function" ? field(query) : field;
|
|
85213
|
+
return value2 === "always" || value2 !== false && isStale(query, options);
|
|
85214
|
+
}
|
|
85215
|
+
return false;
|
|
85216
|
+
}
|
|
85217
|
+
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
|
85218
|
+
return (query !== prevQuery || resolveEnabled(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
|
85219
|
+
}
|
|
85220
|
+
function isStale(query, options) {
|
|
85221
|
+
return resolveEnabled(options.enabled, query) !== false && query.isStaleByTime(resolveStaleTime(options.staleTime, query));
|
|
85222
|
+
}
|
|
85223
|
+
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
|
85224
|
+
if (!shallowEqualObjects(observer.getCurrentResult(), optimisticResult)) {
|
|
85225
|
+
return true;
|
|
85226
|
+
}
|
|
85227
|
+
return false;
|
|
85228
|
+
}
|
|
85229
|
+
function infiniteQueryBehavior(pages) {
|
|
85230
|
+
return {
|
|
85231
|
+
onFetch: (context, query) => {
|
|
85232
|
+
const options = context.options;
|
|
85233
|
+
const direction = context.fetchOptions?.meta?.fetchMore?.direction;
|
|
85234
|
+
const oldPages = context.state.data?.pages || [];
|
|
85235
|
+
const oldPageParams = context.state.data?.pageParams || [];
|
|
85236
|
+
let result = { pages: [], pageParams: [] };
|
|
85237
|
+
let currentPage = 0;
|
|
85238
|
+
const fetchFn = async () => {
|
|
85239
|
+
let cancelled = false;
|
|
85240
|
+
const addSignalProperty = (object4) => {
|
|
85241
|
+
Object.defineProperty(object4, "signal", {
|
|
85242
|
+
enumerable: true,
|
|
85243
|
+
get: () => {
|
|
85244
|
+
if (context.signal.aborted) {
|
|
85245
|
+
cancelled = true;
|
|
85246
|
+
} else {
|
|
85247
|
+
context.signal.addEventListener("abort", () => {
|
|
85248
|
+
cancelled = true;
|
|
85249
|
+
});
|
|
85250
|
+
}
|
|
85251
|
+
return context.signal;
|
|
85252
|
+
}
|
|
85253
|
+
});
|
|
85254
|
+
};
|
|
85255
|
+
const queryFn = ensureQueryFn(context.options, context.fetchOptions);
|
|
85256
|
+
const fetchPage = async (data, param, previous2) => {
|
|
85257
|
+
if (cancelled) {
|
|
85258
|
+
return Promise.reject();
|
|
85259
|
+
}
|
|
85260
|
+
if (param == null && data.pages.length) {
|
|
85261
|
+
return Promise.resolve(data);
|
|
85262
|
+
}
|
|
85263
|
+
const createQueryFnContext = () => {
|
|
85264
|
+
const queryFnContext2 = {
|
|
85265
|
+
client: context.client,
|
|
85266
|
+
queryKey: context.queryKey,
|
|
85267
|
+
pageParam: param,
|
|
85268
|
+
direction: previous2 ? "backward" : "forward",
|
|
85269
|
+
meta: context.options.meta
|
|
85270
|
+
};
|
|
85271
|
+
addSignalProperty(queryFnContext2);
|
|
85272
|
+
return queryFnContext2;
|
|
85273
|
+
};
|
|
85274
|
+
const queryFnContext = createQueryFnContext();
|
|
85275
|
+
const page = await queryFn(queryFnContext);
|
|
85276
|
+
const { maxPages } = context.options;
|
|
85277
|
+
const addTo = previous2 ? addToStart : addToEnd;
|
|
85278
|
+
return {
|
|
85279
|
+
pages: addTo(data.pages, page, maxPages),
|
|
85280
|
+
pageParams: addTo(data.pageParams, param, maxPages)
|
|
85281
|
+
};
|
|
85282
|
+
};
|
|
85283
|
+
if (direction && oldPages.length) {
|
|
85284
|
+
const previous2 = direction === "backward";
|
|
85285
|
+
const pageParamFn = previous2 ? getPreviousPageParam : getNextPageParam;
|
|
85286
|
+
const oldData = {
|
|
85287
|
+
pages: oldPages,
|
|
85288
|
+
pageParams: oldPageParams
|
|
85289
|
+
};
|
|
85290
|
+
const param = pageParamFn(options, oldData);
|
|
85291
|
+
result = await fetchPage(oldData, param, previous2);
|
|
85292
|
+
} else {
|
|
85293
|
+
const remainingPages = oldPages.length;
|
|
85294
|
+
do {
|
|
85295
|
+
const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
|
|
85296
|
+
if (currentPage > 0 && param == null) {
|
|
85297
|
+
break;
|
|
85298
|
+
}
|
|
85299
|
+
result = await fetchPage(result, param);
|
|
85300
|
+
currentPage++;
|
|
85301
|
+
} while (currentPage < remainingPages);
|
|
85302
|
+
}
|
|
85303
|
+
return result;
|
|
85304
|
+
};
|
|
85305
|
+
if (context.options.persister) {
|
|
85306
|
+
context.fetchFn = () => {
|
|
85307
|
+
return context.options.persister?.(
|
|
85308
|
+
fetchFn,
|
|
85309
|
+
{
|
|
85310
|
+
client: context.client,
|
|
85311
|
+
queryKey: context.queryKey,
|
|
85312
|
+
meta: context.options.meta,
|
|
85313
|
+
signal: context.signal
|
|
85314
|
+
},
|
|
85315
|
+
query
|
|
85316
|
+
);
|
|
85317
|
+
};
|
|
85318
|
+
} else {
|
|
85319
|
+
context.fetchFn = fetchFn;
|
|
85320
|
+
}
|
|
85321
|
+
}
|
|
85322
|
+
};
|
|
85323
|
+
}
|
|
85324
|
+
function getNextPageParam(options, { pages, pageParams }) {
|
|
85325
|
+
const lastIndex = pages.length - 1;
|
|
85326
|
+
return pages.length > 0 ? options.getNextPageParam(
|
|
85327
|
+
pages[lastIndex],
|
|
85328
|
+
pages,
|
|
85329
|
+
pageParams[lastIndex],
|
|
85330
|
+
pageParams
|
|
85331
|
+
) : void 0;
|
|
85332
|
+
}
|
|
85333
|
+
function getPreviousPageParam(options, { pages, pageParams }) {
|
|
85334
|
+
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
|
|
85335
|
+
}
|
|
85336
|
+
function hasNextPage(options, data) {
|
|
85337
|
+
if (!data) return false;
|
|
85338
|
+
return getNextPageParam(options, data) != null;
|
|
85339
|
+
}
|
|
85340
|
+
function hasPreviousPage(options, data) {
|
|
85341
|
+
if (!data || !options.getPreviousPageParam) return false;
|
|
85342
|
+
return getPreviousPageParam(options, data) != null;
|
|
85343
|
+
}
|
|
85344
|
+
var InfiniteQueryObserver = class extends QueryObserver {
|
|
85345
|
+
constructor(client, options) {
|
|
85346
|
+
super(client, options);
|
|
85347
|
+
}
|
|
85348
|
+
bindMethods() {
|
|
85349
|
+
super.bindMethods();
|
|
85350
|
+
this.fetchNextPage = this.fetchNextPage.bind(this);
|
|
85351
|
+
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
|
|
85352
|
+
}
|
|
85353
|
+
setOptions(options) {
|
|
85354
|
+
super.setOptions({
|
|
85355
|
+
...options,
|
|
85356
|
+
behavior: infiniteQueryBehavior()
|
|
85357
|
+
});
|
|
85358
|
+
}
|
|
85359
|
+
getOptimisticResult(options) {
|
|
85360
|
+
options.behavior = infiniteQueryBehavior();
|
|
85361
|
+
return super.getOptimisticResult(options);
|
|
85362
|
+
}
|
|
85363
|
+
fetchNextPage(options) {
|
|
85364
|
+
return this.fetch({
|
|
85365
|
+
...options,
|
|
85366
|
+
meta: {
|
|
85367
|
+
fetchMore: { direction: "forward" }
|
|
85368
|
+
}
|
|
85369
|
+
});
|
|
85370
|
+
}
|
|
85371
|
+
fetchPreviousPage(options) {
|
|
85372
|
+
return this.fetch({
|
|
85373
|
+
...options,
|
|
85374
|
+
meta: {
|
|
85375
|
+
fetchMore: { direction: "backward" }
|
|
85376
|
+
}
|
|
85377
|
+
});
|
|
85378
|
+
}
|
|
85379
|
+
createResult(query, options) {
|
|
85380
|
+
const { state } = query;
|
|
85381
|
+
const parentResult = super.createResult(query, options);
|
|
85382
|
+
const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
|
|
85383
|
+
const fetchDirection = state.fetchMeta?.fetchMore?.direction;
|
|
85384
|
+
const isFetchNextPageError = isError && fetchDirection === "forward";
|
|
85385
|
+
const isFetchingNextPage = isFetching && fetchDirection === "forward";
|
|
85386
|
+
const isFetchPreviousPageError = isError && fetchDirection === "backward";
|
|
85387
|
+
const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
|
|
85388
|
+
const result = {
|
|
85389
|
+
...parentResult,
|
|
85390
|
+
fetchNextPage: this.fetchNextPage,
|
|
85391
|
+
fetchPreviousPage: this.fetchPreviousPage,
|
|
85392
|
+
hasNextPage: hasNextPage(options, state.data),
|
|
85393
|
+
hasPreviousPage: hasPreviousPage(options, state.data),
|
|
85394
|
+
isFetchNextPageError,
|
|
85395
|
+
isFetchingNextPage,
|
|
85396
|
+
isFetchPreviousPageError,
|
|
85397
|
+
isFetchingPreviousPage,
|
|
85398
|
+
isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
|
|
85399
|
+
isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
|
|
83970
85400
|
};
|
|
83971
|
-
return
|
|
85401
|
+
return result;
|
|
83972
85402
|
}
|
|
83973
|
-
|
|
83974
|
-
|
|
83975
|
-
|
|
85403
|
+
};
|
|
85404
|
+
var QueryClientContext = React__namespace.createContext(
|
|
85405
|
+
void 0
|
|
85406
|
+
);
|
|
85407
|
+
var useQueryClient = (queryClient) => {
|
|
85408
|
+
const client = React__namespace.useContext(QueryClientContext);
|
|
85409
|
+
if (!client) {
|
|
85410
|
+
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
85411
|
+
}
|
|
85412
|
+
return client;
|
|
85413
|
+
};
|
|
85414
|
+
var IsRestoringContext = React__namespace.createContext(false);
|
|
85415
|
+
var useIsRestoring = () => React__namespace.useContext(IsRestoringContext);
|
|
85416
|
+
IsRestoringContext.Provider;
|
|
85417
|
+
function createValue() {
|
|
85418
|
+
let isReset = false;
|
|
85419
|
+
return {
|
|
85420
|
+
clearReset: () => {
|
|
85421
|
+
isReset = false;
|
|
85422
|
+
},
|
|
85423
|
+
reset: () => {
|
|
85424
|
+
isReset = true;
|
|
85425
|
+
},
|
|
85426
|
+
isReset: () => {
|
|
85427
|
+
return isReset;
|
|
85428
|
+
}
|
|
85429
|
+
};
|
|
83976
85430
|
}
|
|
83977
|
-
var
|
|
83978
|
-
|
|
85431
|
+
var QueryErrorResetBoundaryContext = React__namespace.createContext(createValue());
|
|
85432
|
+
var useQueryErrorResetBoundary = () => React__namespace.useContext(QueryErrorResetBoundaryContext);
|
|
85433
|
+
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
|
85434
|
+
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
|
|
85435
|
+
if (!errorResetBoundary.isReset()) {
|
|
85436
|
+
options.retryOnMount = false;
|
|
85437
|
+
}
|
|
85438
|
+
}
|
|
85439
|
+
};
|
|
85440
|
+
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
85441
|
+
React__namespace.useEffect(() => {
|
|
85442
|
+
errorResetBoundary.clearReset();
|
|
85443
|
+
}, [errorResetBoundary]);
|
|
85444
|
+
};
|
|
85445
|
+
var getHasError = ({
|
|
85446
|
+
result,
|
|
85447
|
+
errorResetBoundary,
|
|
85448
|
+
throwOnError,
|
|
85449
|
+
query,
|
|
85450
|
+
suspense
|
|
85451
|
+
}) => {
|
|
85452
|
+
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
85453
|
+
};
|
|
85454
|
+
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
85455
|
+
if (defaultedOptions.suspense) {
|
|
85456
|
+
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
85457
|
+
const clamp = (value2) => value2 === "static" ? value2 : Math.max(value2 ?? MIN_SUSPENSE_TIME_MS, MIN_SUSPENSE_TIME_MS);
|
|
85458
|
+
const originalStaleTime = defaultedOptions.staleTime;
|
|
85459
|
+
defaultedOptions.staleTime = typeof originalStaleTime === "function" ? (...args) => clamp(originalStaleTime(...args)) : clamp(originalStaleTime);
|
|
85460
|
+
if (typeof defaultedOptions.gcTime === "number") {
|
|
85461
|
+
defaultedOptions.gcTime = Math.max(
|
|
85462
|
+
defaultedOptions.gcTime,
|
|
85463
|
+
MIN_SUSPENSE_TIME_MS
|
|
85464
|
+
);
|
|
85465
|
+
}
|
|
85466
|
+
}
|
|
85467
|
+
};
|
|
85468
|
+
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
|
85469
|
+
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
|
|
85470
|
+
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
|
85471
|
+
errorResetBoundary.clearReset();
|
|
85472
|
+
});
|
|
85473
|
+
function useBaseQuery(options, Observer, queryClient) {
|
|
85474
|
+
if (process.env.NODE_ENV !== "production") {
|
|
85475
|
+
if (typeof options !== "object" || Array.isArray(options)) {
|
|
85476
|
+
throw new Error(
|
|
85477
|
+
'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'
|
|
85478
|
+
);
|
|
85479
|
+
}
|
|
85480
|
+
}
|
|
85481
|
+
const isRestoring = useIsRestoring();
|
|
85482
|
+
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
85483
|
+
const client = useQueryClient();
|
|
85484
|
+
const defaultedOptions = client.defaultQueryOptions(options);
|
|
85485
|
+
client.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
85486
|
+
defaultedOptions
|
|
85487
|
+
);
|
|
85488
|
+
if (process.env.NODE_ENV !== "production") {
|
|
85489
|
+
if (!defaultedOptions.queryFn) {
|
|
85490
|
+
console.error(
|
|
85491
|
+
`[${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`
|
|
85492
|
+
);
|
|
85493
|
+
}
|
|
85494
|
+
}
|
|
85495
|
+
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
|
85496
|
+
ensureSuspenseTimers(defaultedOptions);
|
|
85497
|
+
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary);
|
|
85498
|
+
useClearResetErrorBoundary(errorResetBoundary);
|
|
85499
|
+
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
|
85500
|
+
const [observer] = React__namespace.useState(
|
|
85501
|
+
() => new Observer(
|
|
85502
|
+
client,
|
|
85503
|
+
defaultedOptions
|
|
85504
|
+
)
|
|
85505
|
+
);
|
|
85506
|
+
const result = observer.getOptimisticResult(defaultedOptions);
|
|
85507
|
+
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
|
85508
|
+
React__namespace.useSyncExternalStore(
|
|
85509
|
+
React__namespace.useCallback(
|
|
85510
|
+
(onStoreChange) => {
|
|
85511
|
+
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop2;
|
|
85512
|
+
observer.updateResult();
|
|
85513
|
+
return unsubscribe;
|
|
85514
|
+
},
|
|
85515
|
+
[observer, shouldSubscribe]
|
|
85516
|
+
),
|
|
85517
|
+
() => observer.getCurrentResult(),
|
|
85518
|
+
() => observer.getCurrentResult()
|
|
85519
|
+
);
|
|
85520
|
+
React__namespace.useEffect(() => {
|
|
85521
|
+
observer.setOptions(defaultedOptions);
|
|
85522
|
+
}, [defaultedOptions, observer]);
|
|
85523
|
+
if (shouldSuspend(defaultedOptions, result)) {
|
|
85524
|
+
throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
85525
|
+
}
|
|
85526
|
+
if (getHasError({
|
|
85527
|
+
result,
|
|
85528
|
+
errorResetBoundary,
|
|
85529
|
+
throwOnError: defaultedOptions.throwOnError,
|
|
85530
|
+
query: client.getQueryCache().get(defaultedOptions.queryHash),
|
|
85531
|
+
suspense: defaultedOptions.suspense
|
|
85532
|
+
})) {
|
|
85533
|
+
throw result.error;
|
|
85534
|
+
}
|
|
85535
|
+
client.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
85536
|
+
defaultedOptions,
|
|
85537
|
+
result
|
|
85538
|
+
);
|
|
85539
|
+
if (defaultedOptions.experimental_prefetchInRender && !isServer && willFetch(result, isRestoring)) {
|
|
85540
|
+
const promise = isNewCacheEntry ? (
|
|
85541
|
+
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
85542
|
+
fetchOptimistic(defaultedOptions, observer, errorResetBoundary)
|
|
85543
|
+
) : (
|
|
85544
|
+
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
85545
|
+
client.getQueryCache().get(defaultedOptions.queryHash)?.promise
|
|
85546
|
+
);
|
|
85547
|
+
promise?.catch(noop2).finally(() => {
|
|
85548
|
+
observer.updateResult();
|
|
85549
|
+
});
|
|
85550
|
+
}
|
|
85551
|
+
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
85552
|
+
}
|
|
85553
|
+
function useInfiniteQuery(options, queryClient) {
|
|
85554
|
+
return useBaseQuery(
|
|
85555
|
+
options,
|
|
85556
|
+
InfiniteQueryObserver
|
|
85557
|
+
);
|
|
85558
|
+
}
|
|
85559
|
+
const ResizableTitle = (props) => {
|
|
85560
|
+
const { onResize: onResize2, width, ...restProps } = props;
|
|
85561
|
+
if (!width || !onResize2) {
|
|
85562
|
+
return /* @__PURE__ */ jsxRuntime.jsx("th", { ...restProps });
|
|
85563
|
+
}
|
|
85564
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("th", { ...restProps, style: { ...restProps.style, position: "relative" }, children: [
|
|
85565
|
+
restProps.children,
|
|
85566
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85567
|
+
"div",
|
|
85568
|
+
{
|
|
85569
|
+
style: {
|
|
85570
|
+
position: "absolute",
|
|
85571
|
+
right: "-5px",
|
|
85572
|
+
top: 0,
|
|
85573
|
+
height: "100%",
|
|
85574
|
+
width: "10px",
|
|
85575
|
+
cursor: "col-resize",
|
|
85576
|
+
zIndex: 1
|
|
85577
|
+
},
|
|
85578
|
+
onClick: (e3) => e3.stopPropagation(),
|
|
85579
|
+
onMouseDown: (e3) => {
|
|
85580
|
+
e3.stopPropagation();
|
|
85581
|
+
e3.preventDefault();
|
|
85582
|
+
const startX = e3.clientX;
|
|
85583
|
+
const startWidth = e3.target.parentElement?.offsetWidth || 150;
|
|
85584
|
+
const doDrag = (dragEvent) => {
|
|
85585
|
+
const newWidth = startWidth + (dragEvent.clientX - startX);
|
|
85586
|
+
if (newWidth > 50) {
|
|
85587
|
+
onResize2(newWidth);
|
|
85588
|
+
}
|
|
85589
|
+
};
|
|
85590
|
+
const stopDrag = () => {
|
|
85591
|
+
document.removeEventListener("mousemove", doDrag);
|
|
85592
|
+
document.removeEventListener("mouseup", stopDrag);
|
|
85593
|
+
};
|
|
85594
|
+
document.addEventListener("mousemove", doDrag);
|
|
85595
|
+
document.addEventListener("mouseup", stopDrag);
|
|
85596
|
+
}
|
|
85597
|
+
}
|
|
85598
|
+
)
|
|
85599
|
+
] });
|
|
85600
|
+
};
|
|
85601
|
+
const InfiniteScrollTable = ({
|
|
85602
|
+
instanceId,
|
|
85603
|
+
columns: initialColumns,
|
|
85604
|
+
fetchService,
|
|
85605
|
+
title,
|
|
85606
|
+
scrollHeight = 600,
|
|
85607
|
+
scrollWidth = 1300
|
|
85608
|
+
}) => {
|
|
85609
|
+
const observer = React.useRef();
|
|
85610
|
+
const [scrollableNode, setScrollableNode] = React.useState(
|
|
85611
|
+
null
|
|
85612
|
+
);
|
|
85613
|
+
const tableContainerRef = React.useCallback((node2) => {
|
|
85614
|
+
if (node2 !== null) {
|
|
85615
|
+
const scrollNode = node2.querySelector(".ant-table-body");
|
|
85616
|
+
setScrollableNode(scrollNode);
|
|
85617
|
+
}
|
|
85618
|
+
}, []);
|
|
85619
|
+
const {
|
|
85620
|
+
data,
|
|
85621
|
+
error: error2,
|
|
85622
|
+
fetchNextPage,
|
|
85623
|
+
hasNextPage: hasNextPage2,
|
|
85624
|
+
isFetchingNextPage,
|
|
85625
|
+
status
|
|
85626
|
+
} = useInfiniteQuery({
|
|
85627
|
+
queryKey: fetchService.queryKey,
|
|
85628
|
+
queryFn: fetchService.fetchData,
|
|
85629
|
+
initialPageParam: 1,
|
|
85630
|
+
getNextPageParam: (lastPage) => lastPage.hasNextPage ? lastPage.nextPage : void 0
|
|
85631
|
+
});
|
|
85632
|
+
const [columns, setColumns] = React.useState(initialColumns);
|
|
85633
|
+
const handleResize = (index2) => (newWidth) => {
|
|
85634
|
+
setColumns((prevColumns) => {
|
|
85635
|
+
const nextColumns = [...prevColumns];
|
|
85636
|
+
nextColumns[index2] = { ...nextColumns[index2], width: newWidth };
|
|
85637
|
+
return nextColumns;
|
|
85638
|
+
});
|
|
85639
|
+
};
|
|
85640
|
+
const resizableColumns = columns.map((col, index2) => ({
|
|
85641
|
+
...col,
|
|
85642
|
+
onHeaderCell: (column2) => ({
|
|
85643
|
+
width: column2.width,
|
|
85644
|
+
onResize: handleResize(index2)
|
|
85645
|
+
})
|
|
85646
|
+
}));
|
|
85647
|
+
const lastRowRef = React.useCallback(
|
|
85648
|
+
(node2) => {
|
|
85649
|
+
if (isFetchingNextPage || !scrollableNode) return;
|
|
85650
|
+
if (observer.current) observer.current.disconnect();
|
|
85651
|
+
observer.current = new IntersectionObserver(
|
|
85652
|
+
(entries) => {
|
|
85653
|
+
if (entries[0].isIntersecting && hasNextPage2) {
|
|
85654
|
+
fetchNextPage();
|
|
85655
|
+
}
|
|
85656
|
+
},
|
|
85657
|
+
{ root: scrollableNode, threshold: 0.5 }
|
|
85658
|
+
);
|
|
85659
|
+
if (node2) observer.current.observe(node2);
|
|
85660
|
+
},
|
|
85661
|
+
[isFetchingNextPage, hasNextPage2, fetchNextPage, scrollableNode]
|
|
85662
|
+
);
|
|
85663
|
+
const dataSource = data?.pages.flatMap((page) => page.docs) ?? [];
|
|
85664
|
+
const totalDocs = data?.pages?.[0]?.totalDocs ?? 0;
|
|
85665
|
+
if (status === "pending") {
|
|
85666
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85667
|
+
"div",
|
|
85668
|
+
{
|
|
85669
|
+
style: { display: "flex", justifyContent: "center", padding: "50px" },
|
|
85670
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Spin, { size: "large" })
|
|
85671
|
+
}
|
|
85672
|
+
);
|
|
85673
|
+
}
|
|
85674
|
+
if (status === "error") {
|
|
85675
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85676
|
+
Alert,
|
|
85677
|
+
{
|
|
85678
|
+
message: "Error",
|
|
85679
|
+
description: error2?.message,
|
|
85680
|
+
type: "error",
|
|
85681
|
+
showIcon: true
|
|
85682
|
+
}
|
|
85683
|
+
);
|
|
85684
|
+
}
|
|
85685
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
85686
|
+
"div",
|
|
85687
|
+
{
|
|
85688
|
+
style: {
|
|
85689
|
+
backgroundColor: "white",
|
|
85690
|
+
padding: "24px",
|
|
85691
|
+
borderRadius: "8px",
|
|
85692
|
+
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.1)",
|
|
85693
|
+
marginBottom: "24px"
|
|
85694
|
+
},
|
|
85695
|
+
ref: tableContainerRef,
|
|
85696
|
+
children: [
|
|
85697
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
85698
|
+
Typography$1.Title,
|
|
85699
|
+
{
|
|
85700
|
+
level: 2,
|
|
85701
|
+
style: { marginBottom: "24px", textAlign: "center" },
|
|
85702
|
+
children: [
|
|
85703
|
+
title,
|
|
85704
|
+
" (Table ",
|
|
85705
|
+
instanceId,
|
|
85706
|
+
")"
|
|
85707
|
+
]
|
|
85708
|
+
}
|
|
85709
|
+
),
|
|
85710
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85711
|
+
Alert,
|
|
85712
|
+
{
|
|
85713
|
+
message: /* @__PURE__ */ jsxRuntime.jsxs(Typography$1.Text, { children: [
|
|
85714
|
+
"Showing ",
|
|
85715
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: dataSource.length }),
|
|
85716
|
+
" of",
|
|
85717
|
+
" ",
|
|
85718
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: totalDocs }),
|
|
85719
|
+
" total launches"
|
|
85720
|
+
] }),
|
|
85721
|
+
type: "info",
|
|
85722
|
+
style: { marginBottom: "16px", textAlign: "center" }
|
|
85723
|
+
}
|
|
85724
|
+
),
|
|
85725
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative" }, children: [
|
|
85726
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
85727
|
+
.infinite-scroll-table .ant-pagination {
|
|
85728
|
+
display: none !important;
|
|
85729
|
+
}
|
|
85730
|
+
` }),
|
|
85731
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "infinite-scroll-table", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
85732
|
+
ForwardTable,
|
|
85733
|
+
{
|
|
85734
|
+
dataSource,
|
|
85735
|
+
columns: resizableColumns,
|
|
85736
|
+
components: { header: { cell: ResizableTitle } },
|
|
85737
|
+
rowKey: "id",
|
|
85738
|
+
pagination: false,
|
|
85739
|
+
showSorterTooltip: false,
|
|
85740
|
+
size: "small",
|
|
85741
|
+
scroll: { y: scrollHeight, x: scrollWidth },
|
|
85742
|
+
onChange: () => {
|
|
85743
|
+
},
|
|
85744
|
+
onRow: (record, index2) => {
|
|
85745
|
+
if (index2 === dataSource.length - 1) {
|
|
85746
|
+
return { ref: lastRowRef };
|
|
85747
|
+
}
|
|
85748
|
+
return {};
|
|
85749
|
+
}
|
|
85750
|
+
}
|
|
85751
|
+
) }),
|
|
85752
|
+
isFetchingNextPage && /* @__PURE__ */ jsxRuntime.jsx(
|
|
85753
|
+
"div",
|
|
85754
|
+
{
|
|
85755
|
+
style: {
|
|
85756
|
+
position: "absolute",
|
|
85757
|
+
bottom: 0,
|
|
85758
|
+
left: 0,
|
|
85759
|
+
width: "100%",
|
|
85760
|
+
padding: "16px",
|
|
85761
|
+
display: "flex",
|
|
85762
|
+
justifyContent: "center",
|
|
85763
|
+
alignItems: "center",
|
|
85764
|
+
backgroundColor: "rgba(255, 255, 255, 0.7)",
|
|
85765
|
+
backdropFilter: "blur(2px)",
|
|
85766
|
+
zIndex: 10
|
|
85767
|
+
},
|
|
85768
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Spin, {})
|
|
85769
|
+
}
|
|
85770
|
+
)
|
|
85771
|
+
] }),
|
|
85772
|
+
!hasNextPage2 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
85773
|
+
"div",
|
|
85774
|
+
{
|
|
85775
|
+
style: {
|
|
85776
|
+
textAlign: "center",
|
|
85777
|
+
padding: "20px",
|
|
85778
|
+
borderTop: "1px solid #f0f0f0"
|
|
85779
|
+
},
|
|
85780
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Typography$1.Text, { type: "secondary", children: "You've reached the end of the launch history." })
|
|
85781
|
+
}
|
|
85782
|
+
)
|
|
85783
|
+
]
|
|
85784
|
+
}
|
|
85785
|
+
);
|
|
85786
|
+
};
|
|
83979
85787
|
const getRowKey = (record, rowKey, index2, enableValidation = true) => {
|
|
83980
85788
|
try {
|
|
83981
85789
|
const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
|
|
83982
85790
|
if (enableValidation) {
|
|
83983
85791
|
if (key === void 0 || key === null) {
|
|
83984
|
-
console.error(
|
|
83985
|
-
record
|
|
83986
|
-
|
|
83987
|
-
|
|
83988
|
-
|
|
85792
|
+
console.error(
|
|
85793
|
+
`Genesis Table: rowKey "${String(rowKey)}" returned undefined/null for record at index ${index2}.`,
|
|
85794
|
+
{
|
|
85795
|
+
record,
|
|
85796
|
+
rowKey,
|
|
85797
|
+
availableKeys: Object.keys(record)
|
|
85798
|
+
}
|
|
85799
|
+
);
|
|
83989
85800
|
return `fallback-${index2}`;
|
|
83990
85801
|
}
|
|
83991
85802
|
if (typeof key === "string" && String(key).trim() === "") {
|
|
83992
|
-
console.warn(
|
|
83993
|
-
record
|
|
83994
|
-
|
|
83995
|
-
|
|
85803
|
+
console.warn(
|
|
85804
|
+
`Genesis Table: rowKey "${String(rowKey)}" returned empty string for record at index ${index2}.`,
|
|
85805
|
+
{
|
|
85806
|
+
record,
|
|
85807
|
+
rowKey
|
|
85808
|
+
}
|
|
85809
|
+
);
|
|
83996
85810
|
return `fallback-${index2}`;
|
|
83997
85811
|
}
|
|
83998
85812
|
}
|
|
83999
85813
|
return key;
|
|
84000
85814
|
} catch (error2) {
|
|
84001
85815
|
if (enableValidation) {
|
|
84002
|
-
console.error(
|
|
84003
|
-
|
|
84004
|
-
|
|
84005
|
-
|
|
84006
|
-
|
|
84007
|
-
|
|
85816
|
+
console.error(
|
|
85817
|
+
`Genesis Table: Error accessing rowKey "${String(rowKey)}" for record at index ${index2}.`,
|
|
85818
|
+
{
|
|
85819
|
+
error: error2,
|
|
85820
|
+
record,
|
|
85821
|
+
rowKey,
|
|
85822
|
+
availableKeys: Object.keys(record)
|
|
85823
|
+
}
|
|
85824
|
+
);
|
|
84008
85825
|
}
|
|
84009
85826
|
return `fallback-${index2}`;
|
|
84010
85827
|
}
|
|
@@ -84019,140 +85836,81 @@ function Table({
|
|
|
84019
85836
|
onRowClick,
|
|
84020
85837
|
pagination,
|
|
84021
85838
|
isMainContentCell = false,
|
|
84022
|
-
|
|
84023
|
-
|
|
85839
|
+
isInfiniteScroll = false,
|
|
85840
|
+
infiniteScrollConfig,
|
|
84024
85841
|
enableRowKeyValidation = process.env.NODE_ENV === "development",
|
|
84025
85842
|
onRowKeyError,
|
|
84026
85843
|
...rest
|
|
84027
85844
|
}) {
|
|
84028
|
-
const [materializedData, setMaterializedData] = React__namespace.useState([]);
|
|
84029
|
-
const [isLoadingMore, setIsLoadingMore] = React__namespace.useState(false);
|
|
84030
|
-
const [hasMoreData, setHasMoreData] = React__namespace.useState(true);
|
|
84031
|
-
const [dynamicHeight, setDynamicHeight] = React__namespace.useState(
|
|
84032
|
-
400
|
|
84033
|
-
);
|
|
84034
85845
|
const [selectedRowKeys, setSelectedRowKeys] = React__namespace.useState([]);
|
|
84035
85846
|
const [pressedRowKey, setPressedRowKey] = React__namespace.useState(
|
|
84036
85847
|
null
|
|
84037
85848
|
);
|
|
84038
85849
|
const tableRef = React__namespace.useRef(null);
|
|
84039
85850
|
const containerRef = React__namespace.useRef(null);
|
|
84040
|
-
React__namespace.useEffect(() => {
|
|
84041
|
-
if (isMaterializedView && materializedViewConfig?.height === "dynamic") {
|
|
84042
|
-
const calculateHeight = () => {
|
|
84043
|
-
if (!containerRef.current) return;
|
|
84044
|
-
const container = containerRef.current;
|
|
84045
|
-
const rect = container.getBoundingClientRect();
|
|
84046
|
-
const viewportHeight = window.innerHeight;
|
|
84047
|
-
const availableHeight = viewportHeight - rect.top - 100;
|
|
84048
|
-
const minHeight = typeof materializedViewConfig.minHeight === "number" ? materializedViewConfig.minHeight : 200;
|
|
84049
|
-
const maxHeight = typeof materializedViewConfig.maxHeight === "number" ? materializedViewConfig.maxHeight : availableHeight;
|
|
84050
|
-
const calculatedHeight = Math.max(
|
|
84051
|
-
minHeight,
|
|
84052
|
-
Math.min(maxHeight, availableHeight)
|
|
84053
|
-
);
|
|
84054
|
-
setDynamicHeight(calculatedHeight);
|
|
84055
|
-
};
|
|
84056
|
-
calculateHeight();
|
|
84057
|
-
window.addEventListener("resize", calculateHeight);
|
|
84058
|
-
return () => window.removeEventListener("resize", calculateHeight);
|
|
84059
|
-
}
|
|
84060
|
-
}, [isMaterializedView, materializedViewConfig]);
|
|
84061
|
-
React__namespace.useEffect(() => {
|
|
84062
|
-
if (isMaterializedView) {
|
|
84063
|
-
const initialSize = materializedViewConfig?.initialLoadSize || 50;
|
|
84064
|
-
const initialData = dataSource.slice(0, initialSize);
|
|
84065
|
-
setMaterializedData(initialData);
|
|
84066
|
-
setHasMoreData(dataSource.length > initialSize);
|
|
84067
|
-
}
|
|
84068
|
-
}, [dataSource, isMaterializedView, materializedViewConfig]);
|
|
84069
|
-
const handleScroll = React__namespace.useCallback(
|
|
84070
|
-
debounce((e3) => {
|
|
84071
|
-
if (!isMaterializedView || !materializedViewConfig?.onLoadMore || isLoadingMore || !hasMoreData) {
|
|
84072
|
-
return;
|
|
84073
|
-
}
|
|
84074
|
-
const { target } = e3;
|
|
84075
|
-
const { scrollTop, scrollHeight, clientHeight } = target;
|
|
84076
|
-
const threshold = materializedViewConfig?.loadMoreThreshold || 100;
|
|
84077
|
-
if (scrollTop + clientHeight >= scrollHeight - threshold) {
|
|
84078
|
-
setIsLoadingMore(true);
|
|
84079
|
-
const currentLength = materializedData.length;
|
|
84080
|
-
const loadSize = materializedViewConfig?.initialLoadSize || 50;
|
|
84081
|
-
if (materializedViewConfig?.onLoadMore) {
|
|
84082
|
-
Promise.resolve(
|
|
84083
|
-
materializedViewConfig.onLoadMore(currentLength, loadSize)
|
|
84084
|
-
).then((newData) => {
|
|
84085
|
-
setMaterializedData((prev2) => [...prev2, ...newData]);
|
|
84086
|
-
setHasMoreData(newData.length === loadSize);
|
|
84087
|
-
}).catch((error2) => {
|
|
84088
|
-
console.error("Error loading more data:", error2);
|
|
84089
|
-
}).finally(() => {
|
|
84090
|
-
setIsLoadingMore(false);
|
|
84091
|
-
});
|
|
84092
|
-
} else {
|
|
84093
|
-
const newData = dataSource.slice(
|
|
84094
|
-
currentLength,
|
|
84095
|
-
currentLength + loadSize
|
|
84096
|
-
);
|
|
84097
|
-
setMaterializedData((prev2) => [...prev2, ...newData]);
|
|
84098
|
-
setHasMoreData(newData.length === loadSize);
|
|
84099
|
-
setIsLoadingMore(false);
|
|
84100
|
-
}
|
|
84101
|
-
}
|
|
84102
|
-
}, 200),
|
|
84103
|
-
[
|
|
84104
|
-
isMaterializedView,
|
|
84105
|
-
materializedViewConfig,
|
|
84106
|
-
materializedData,
|
|
84107
|
-
isLoadingMore,
|
|
84108
|
-
hasMoreData,
|
|
84109
|
-
dataSource
|
|
84110
|
-
]
|
|
84111
|
-
);
|
|
84112
85851
|
const paginationConfig = React__namespace.useMemo(() => {
|
|
84113
|
-
if (
|
|
84114
|
-
|
|
84115
|
-
}
|
|
84116
|
-
return pagination === false ? false : {
|
|
85852
|
+
if (!pagination) return false;
|
|
85853
|
+
return {
|
|
84117
85854
|
...pagination,
|
|
85855
|
+
showSizeChanger: false,
|
|
85856
|
+
// Disable Ant Design's size changer
|
|
85857
|
+
showQuickJumper: false,
|
|
85858
|
+
// Disable Ant Design's quick jumper
|
|
85859
|
+
showTotal: void 0,
|
|
85860
|
+
// Disable Ant Design's total display
|
|
84118
85861
|
itemRender: void 0,
|
|
84119
85862
|
// Clear any existing itemRender to avoid conflicts
|
|
84120
85863
|
render: (properties) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
84121
85864
|
CustomPagination,
|
|
84122
85865
|
{
|
|
84123
85866
|
...properties,
|
|
84124
|
-
paginationStyle: pagination
|
|
85867
|
+
paginationStyle: pagination && typeof pagination === "object" && "paginationStyle" in pagination ? pagination.paginationStyle : PaginationStyle.SIMPLE
|
|
84125
85868
|
}
|
|
84126
85869
|
)
|
|
84127
85870
|
};
|
|
84128
|
-
}, [
|
|
85871
|
+
}, [pagination]);
|
|
84129
85872
|
const scrollConfig = React__namespace.useMemo(() => {
|
|
84130
|
-
if (isMaterializedView) {
|
|
84131
|
-
const height = materializedViewConfig?.height === "dynamic" ? dynamicHeight : materializedViewConfig?.height || 400;
|
|
84132
|
-
return {
|
|
84133
|
-
...rest.scroll,
|
|
84134
|
-
y: height
|
|
84135
|
-
};
|
|
84136
|
-
}
|
|
84137
85873
|
return rest.scroll;
|
|
84138
|
-
}, [
|
|
84139
|
-
|
|
85874
|
+
}, [rest.scroll]);
|
|
85875
|
+
if (isInfiniteScroll && infiniteScrollConfig) {
|
|
85876
|
+
const resizableColumns = columns.map((col) => ({
|
|
85877
|
+
title: col.title,
|
|
85878
|
+
key: col.key,
|
|
85879
|
+
dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
|
|
85880
|
+
width: col.width || 150,
|
|
85881
|
+
render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
|
|
85882
|
+
}));
|
|
85883
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85884
|
+
InfiniteScrollTable,
|
|
85885
|
+
{
|
|
85886
|
+
instanceId: infiniteScrollConfig.instanceId,
|
|
85887
|
+
columns: resizableColumns,
|
|
85888
|
+
fetchService: infiniteScrollConfig.fetchService,
|
|
85889
|
+
title: infiniteScrollConfig.title,
|
|
85890
|
+
scrollHeight: infiniteScrollConfig.scrollHeight,
|
|
85891
|
+
scrollWidth: infiniteScrollConfig.scrollWidth
|
|
85892
|
+
}
|
|
85893
|
+
);
|
|
85894
|
+
}
|
|
84140
85895
|
React__namespace.useEffect(() => {
|
|
84141
|
-
if (enableRowKeyValidation &&
|
|
84142
|
-
const sampleRecord =
|
|
84143
|
-
if (typeof rowKey === "string") {
|
|
84144
|
-
|
|
84145
|
-
|
|
84146
|
-
|
|
84147
|
-
|
|
84148
|
-
|
|
84149
|
-
|
|
84150
|
-
|
|
84151
|
-
|
|
84152
|
-
|
|
84153
|
-
|
|
85896
|
+
if (enableRowKeyValidation && dataSource.length > 0) {
|
|
85897
|
+
const sampleRecord = dataSource[0];
|
|
85898
|
+
if (typeof rowKey === "string" && !(rowKey in sampleRecord)) {
|
|
85899
|
+
const error2 = new Error(
|
|
85900
|
+
`rowKey "${rowKey}" does not exist in data records`
|
|
85901
|
+
);
|
|
85902
|
+
console.error(
|
|
85903
|
+
`Genesis Table: ${error2.message}. Available keys:`,
|
|
85904
|
+
Object.keys(sampleRecord)
|
|
85905
|
+
);
|
|
85906
|
+
onRowKeyError?.({
|
|
85907
|
+
record: sampleRecord,
|
|
85908
|
+
rowKey,
|
|
85909
|
+
index: 0,
|
|
85910
|
+
error: error2
|
|
85911
|
+
});
|
|
84154
85912
|
}
|
|
84155
|
-
const keys2 =
|
|
85913
|
+
const keys2 = dataSource.map(
|
|
84156
85914
|
(record, index2) => getRowKey(record, rowKey, index2, false)
|
|
84157
85915
|
// Don't log individual errors here
|
|
84158
85916
|
);
|
|
@@ -84165,14 +85923,14 @@ function Table({
|
|
|
84165
85923
|
duplicates: keys2.filter((key, index2) => keys2.indexOf(key) !== index2)
|
|
84166
85924
|
});
|
|
84167
85925
|
onRowKeyError?.({
|
|
84168
|
-
record:
|
|
85926
|
+
record: dataSource[0],
|
|
84169
85927
|
rowKey,
|
|
84170
85928
|
index: 0,
|
|
84171
85929
|
error: error2
|
|
84172
85930
|
});
|
|
84173
85931
|
}
|
|
84174
85932
|
}
|
|
84175
|
-
}, [
|
|
85933
|
+
}, [dataSource, rowKey, enableRowKeyValidation, onRowKeyError]);
|
|
84176
85934
|
const handleRowMouseDown = React__namespace.useCallback(
|
|
84177
85935
|
(record, index2, event) => {
|
|
84178
85936
|
const target = event.target;
|
|
@@ -84182,7 +85940,12 @@ function Table({
|
|
|
84182
85940
|
if (isInteractiveElement) {
|
|
84183
85941
|
return;
|
|
84184
85942
|
}
|
|
84185
|
-
const recordKey = getRowKey(
|
|
85943
|
+
const recordKey = getRowKey(
|
|
85944
|
+
record,
|
|
85945
|
+
rowKey,
|
|
85946
|
+
index2,
|
|
85947
|
+
enableRowKeyValidation
|
|
85948
|
+
);
|
|
84186
85949
|
setPressedRowKey(recordKey);
|
|
84187
85950
|
},
|
|
84188
85951
|
[rowKey, enableRowKeyValidation]
|
|
@@ -84223,42 +85986,62 @@ function Table({
|
|
|
84223
85986
|
}
|
|
84224
85987
|
};
|
|
84225
85988
|
}, [rowSelection, selectedRowKeys]);
|
|
84226
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
84227
|
-
|
|
84228
|
-
|
|
84229
|
-
|
|
84230
|
-
|
|
84231
|
-
|
|
84232
|
-
|
|
84233
|
-
|
|
84234
|
-
|
|
84235
|
-
|
|
84236
|
-
|
|
84237
|
-
|
|
84238
|
-
|
|
84239
|
-
|
|
84240
|
-
|
|
84241
|
-
|
|
84242
|
-
|
|
84243
|
-
|
|
84244
|
-
|
|
84245
|
-
|
|
84246
|
-
|
|
84247
|
-
|
|
84248
|
-
|
|
84249
|
-
|
|
84250
|
-
|
|
84251
|
-
|
|
84252
|
-
|
|
84253
|
-
|
|
84254
|
-
|
|
84255
|
-
|
|
84256
|
-
|
|
84257
|
-
|
|
84258
|
-
|
|
84259
|
-
|
|
84260
|
-
|
|
84261
|
-
|
|
85989
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, children: [
|
|
85990
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
85991
|
+
.genesis-table .ant-pagination {
|
|
85992
|
+
display: none !important;
|
|
85993
|
+
}
|
|
85994
|
+
.genesis-table .ant-pagination-item {
|
|
85995
|
+
display: none !important;
|
|
85996
|
+
}
|
|
85997
|
+
.genesis-table .ant-pagination-prev {
|
|
85998
|
+
display: none !important;
|
|
85999
|
+
}
|
|
86000
|
+
.genesis-table .ant-pagination-next {
|
|
86001
|
+
display: none !important;
|
|
86002
|
+
}
|
|
86003
|
+
` }),
|
|
86004
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "genesis-table", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
86005
|
+
Table$1,
|
|
86006
|
+
{
|
|
86007
|
+
ref: tableRef,
|
|
86008
|
+
"data-testid": "Table",
|
|
86009
|
+
dataSource,
|
|
86010
|
+
columns,
|
|
86011
|
+
rowKey,
|
|
86012
|
+
locale: { emptyText: "No Data" },
|
|
86013
|
+
size,
|
|
86014
|
+
onChange,
|
|
86015
|
+
rowSelection: enhancedRowSelection,
|
|
86016
|
+
onRow: (record, index2) => {
|
|
86017
|
+
const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
|
|
86018
|
+
const recordKey = getRowKey(
|
|
86019
|
+
record,
|
|
86020
|
+
rowKey,
|
|
86021
|
+
index2 ?? 0,
|
|
86022
|
+
enableRowKeyValidation
|
|
86023
|
+
);
|
|
86024
|
+
const isPressed = pressedRowKey === recordKey;
|
|
86025
|
+
return {
|
|
86026
|
+
onClick: (event) => handleRowClick(record, index2 ?? 0, event),
|
|
86027
|
+
onMouseDown: (event) => handleRowMouseDown(record, index2 ?? 0, event),
|
|
86028
|
+
onMouseUp: (event) => handleRowMouseUp(record, index2 ?? 0, event),
|
|
86029
|
+
onMouseLeave: () => setPressedRowKey(null),
|
|
86030
|
+
// Clear pressed state when mouse leaves
|
|
86031
|
+
style: {
|
|
86032
|
+
cursor: onRowClick ? "pointer" : "default",
|
|
86033
|
+
opacity: isDisabled ? 0.6 : 1
|
|
86034
|
+
},
|
|
86035
|
+
className: isPressed ? "ant-table-row-pressed" : ""
|
|
86036
|
+
};
|
|
86037
|
+
},
|
|
86038
|
+
pagination: paginationConfig,
|
|
86039
|
+
scroll: scrollConfig,
|
|
86040
|
+
$isMainContentCell: isMainContentCell,
|
|
86041
|
+
...rest
|
|
86042
|
+
}
|
|
86043
|
+
) })
|
|
86044
|
+
] });
|
|
84262
86045
|
}
|
|
84263
86046
|
const TablePagination = ({
|
|
84264
86047
|
columns,
|
|
@@ -84725,15 +86508,7 @@ const TableWithControls = ({
|
|
|
84725
86508
|
onRowClick
|
|
84726
86509
|
}) => {
|
|
84727
86510
|
const { primaryTableRowData, secondaryTableRowData } = tableControlsData2;
|
|
84728
|
-
const {
|
|
84729
|
-
dataSource,
|
|
84730
|
-
columns,
|
|
84731
|
-
rowSelection,
|
|
84732
|
-
hasSettings,
|
|
84733
|
-
hasFilter,
|
|
84734
|
-
isMaterializedView,
|
|
84735
|
-
materializedViewConfig
|
|
84736
|
-
} = tableData;
|
|
86511
|
+
const { dataSource, columns, rowSelection, hasSettings, hasFilter } = tableData;
|
|
84737
86512
|
const onTableControlsChange = (event) => {
|
|
84738
86513
|
onChange(event);
|
|
84739
86514
|
};
|
|
@@ -84759,9 +86534,7 @@ const TableWithControls = ({
|
|
|
84759
86534
|
columns,
|
|
84760
86535
|
rowSelection,
|
|
84761
86536
|
onChange: onTableChange,
|
|
84762
|
-
onRowClick
|
|
84763
|
-
isMaterializedView,
|
|
84764
|
-
materializedViewConfig
|
|
86537
|
+
onRowClick
|
|
84765
86538
|
}
|
|
84766
86539
|
)
|
|
84767
86540
|
] });
|
|
@@ -85113,7 +86886,19 @@ const mockDataSource = {
|
|
|
85113
86886
|
nickname: "Beach",
|
|
85114
86887
|
address: "333 Shore Dr"
|
|
85115
86888
|
},
|
|
85116
|
-
job_subtype: "delivery"
|
|
86889
|
+
job_subtype: "delivery",
|
|
86890
|
+
progress: {
|
|
86891
|
+
firstBarData: {
|
|
86892
|
+
text: "Planning",
|
|
86893
|
+
status: "info",
|
|
86894
|
+
value: 40
|
|
86895
|
+
},
|
|
86896
|
+
secondBarData: {
|
|
86897
|
+
text: "Route Check",
|
|
86898
|
+
status: "success",
|
|
86899
|
+
value: 20
|
|
86900
|
+
}
|
|
86901
|
+
}
|
|
85117
86902
|
},
|
|
85118
86903
|
{
|
|
85119
86904
|
id: "12",
|
|
@@ -85124,7 +86909,19 @@ const mockDataSource = {
|
|
|
85124
86909
|
nickname: "Hotel",
|
|
85125
86910
|
address: "444 Stay Blvd"
|
|
85126
86911
|
},
|
|
85127
|
-
job_subtype: "pickup"
|
|
86912
|
+
job_subtype: "pickup",
|
|
86913
|
+
progress: {
|
|
86914
|
+
firstBarData: {
|
|
86915
|
+
text: "Scheduled",
|
|
86916
|
+
status: "info",
|
|
86917
|
+
value: 0
|
|
86918
|
+
},
|
|
86919
|
+
secondBarData: {
|
|
86920
|
+
text: "Awaiting",
|
|
86921
|
+
status: "success",
|
|
86922
|
+
value: 0
|
|
86923
|
+
}
|
|
86924
|
+
}
|
|
85128
86925
|
},
|
|
85129
86926
|
{
|
|
85130
86927
|
id: "13",
|
|
@@ -85135,7 +86932,19 @@ const mockDataSource = {
|
|
|
85135
86932
|
nickname: "Airport",
|
|
85136
86933
|
address: "666 Flight Way"
|
|
85137
86934
|
},
|
|
85138
|
-
job_subtype: "delivery"
|
|
86935
|
+
job_subtype: "delivery",
|
|
86936
|
+
progress: {
|
|
86937
|
+
firstBarData: {
|
|
86938
|
+
text: "Pre-flight",
|
|
86939
|
+
status: "info",
|
|
86940
|
+
value: 60
|
|
86941
|
+
},
|
|
86942
|
+
secondBarData: {
|
|
86943
|
+
text: "Security",
|
|
86944
|
+
status: "success",
|
|
86945
|
+
value: 30
|
|
86946
|
+
}
|
|
86947
|
+
}
|
|
85139
86948
|
},
|
|
85140
86949
|
{
|
|
85141
86950
|
id: "14",
|
|
@@ -85146,7 +86955,19 @@ const mockDataSource = {
|
|
|
85146
86955
|
nickname: "Stadium",
|
|
85147
86956
|
address: "777 Sports Complex"
|
|
85148
86957
|
},
|
|
85149
|
-
job_subtype: "pickup"
|
|
86958
|
+
job_subtype: "pickup",
|
|
86959
|
+
progress: {
|
|
86960
|
+
firstBarData: {
|
|
86961
|
+
text: "Cancelled",
|
|
86962
|
+
status: "info",
|
|
86963
|
+
value: 0
|
|
86964
|
+
},
|
|
86965
|
+
secondBarData: {
|
|
86966
|
+
text: "Refund",
|
|
86967
|
+
status: "success",
|
|
86968
|
+
value: 100
|
|
86969
|
+
}
|
|
86970
|
+
}
|
|
85150
86971
|
},
|
|
85151
86972
|
{
|
|
85152
86973
|
id: "15",
|
|
@@ -85157,7 +86978,19 @@ const mockDataSource = {
|
|
|
85157
86978
|
nickname: "Theater",
|
|
85158
86979
|
address: "888 Show Ave"
|
|
85159
86980
|
},
|
|
85160
|
-
job_subtype: "delivery"
|
|
86981
|
+
job_subtype: "delivery",
|
|
86982
|
+
progress: {
|
|
86983
|
+
firstBarData: {
|
|
86984
|
+
text: "Setup",
|
|
86985
|
+
status: "info",
|
|
86986
|
+
value: 25
|
|
86987
|
+
},
|
|
86988
|
+
secondBarData: {
|
|
86989
|
+
text: "Sound Check",
|
|
86990
|
+
status: "success",
|
|
86991
|
+
value: 0
|
|
86992
|
+
}
|
|
86993
|
+
}
|
|
85161
86994
|
},
|
|
85162
86995
|
{
|
|
85163
86996
|
id: "16",
|
|
@@ -85168,7 +87001,19 @@ const mockDataSource = {
|
|
|
85168
87001
|
nickname: "Museum",
|
|
85169
87002
|
address: "999 History Lane"
|
|
85170
87003
|
},
|
|
85171
|
-
job_subtype: "pickup"
|
|
87004
|
+
job_subtype: "pickup",
|
|
87005
|
+
progress: {
|
|
87006
|
+
firstBarData: {
|
|
87007
|
+
text: "Exhibit Prep",
|
|
87008
|
+
status: "info",
|
|
87009
|
+
value: 70
|
|
87010
|
+
},
|
|
87011
|
+
secondBarData: {
|
|
87012
|
+
text: "Documentation",
|
|
87013
|
+
status: "success",
|
|
87014
|
+
value: 45
|
|
87015
|
+
}
|
|
87016
|
+
}
|
|
85172
87017
|
},
|
|
85173
87018
|
{
|
|
85174
87019
|
id: "17",
|
|
@@ -85179,7 +87024,19 @@ const mockDataSource = {
|
|
|
85179
87024
|
nickname: "Zoo",
|
|
85180
87025
|
address: "123 Animal Park"
|
|
85181
87026
|
},
|
|
85182
|
-
job_subtype: "delivery"
|
|
87027
|
+
job_subtype: "delivery",
|
|
87028
|
+
progress: {
|
|
87029
|
+
firstBarData: {
|
|
87030
|
+
text: "Animal Care",
|
|
87031
|
+
status: "info",
|
|
87032
|
+
value: 85
|
|
87033
|
+
},
|
|
87034
|
+
secondBarData: {
|
|
87035
|
+
text: "Feeding",
|
|
87036
|
+
status: "success",
|
|
87037
|
+
value: 90
|
|
87038
|
+
}
|
|
87039
|
+
}
|
|
85183
87040
|
},
|
|
85184
87041
|
{
|
|
85185
87042
|
id: "18",
|
|
@@ -85190,7 +87047,19 @@ const mockDataSource = {
|
|
|
85190
87047
|
nickname: "Bank",
|
|
85191
87048
|
address: "456 Money St"
|
|
85192
87049
|
},
|
|
85193
|
-
job_subtype: "pickup"
|
|
87050
|
+
job_subtype: "pickup",
|
|
87051
|
+
progress: {
|
|
87052
|
+
firstBarData: {
|
|
87053
|
+
text: "Transaction",
|
|
87054
|
+
status: "info",
|
|
87055
|
+
value: 50
|
|
87056
|
+
},
|
|
87057
|
+
secondBarData: {
|
|
87058
|
+
text: "Verification",
|
|
87059
|
+
status: "success",
|
|
87060
|
+
value: 25
|
|
87061
|
+
}
|
|
87062
|
+
}
|
|
85194
87063
|
},
|
|
85195
87064
|
{
|
|
85196
87065
|
id: "19",
|
|
@@ -85201,7 +87070,19 @@ const mockDataSource = {
|
|
|
85201
87070
|
nickname: "Post Office",
|
|
85202
87071
|
address: "789 Mail Road"
|
|
85203
87072
|
},
|
|
85204
|
-
job_subtype: "delivery"
|
|
87073
|
+
job_subtype: "delivery",
|
|
87074
|
+
progress: {
|
|
87075
|
+
firstBarData: {
|
|
87076
|
+
text: "Sorting",
|
|
87077
|
+
status: "info",
|
|
87078
|
+
value: 100
|
|
87079
|
+
},
|
|
87080
|
+
secondBarData: {
|
|
87081
|
+
text: "Dispatch",
|
|
87082
|
+
status: "success",
|
|
87083
|
+
value: 75
|
|
87084
|
+
}
|
|
87085
|
+
}
|
|
85205
87086
|
},
|
|
85206
87087
|
{
|
|
85207
87088
|
id: "20",
|
|
@@ -85212,7 +87093,19 @@ const mockDataSource = {
|
|
|
85212
87093
|
nickname: "Church",
|
|
85213
87094
|
address: "321 Faith Street"
|
|
85214
87095
|
},
|
|
85215
|
-
job_subtype: "pickup"
|
|
87096
|
+
job_subtype: "pickup",
|
|
87097
|
+
progress: {
|
|
87098
|
+
firstBarData: {
|
|
87099
|
+
text: "Service Prep",
|
|
87100
|
+
status: "info",
|
|
87101
|
+
value: 30
|
|
87102
|
+
},
|
|
87103
|
+
secondBarData: {
|
|
87104
|
+
text: "Community",
|
|
87105
|
+
status: "success",
|
|
87106
|
+
value: 10
|
|
87107
|
+
}
|
|
87108
|
+
}
|
|
85216
87109
|
},
|
|
85217
87110
|
{
|
|
85218
87111
|
id: "21",
|
|
@@ -85223,7 +87116,19 @@ const mockDataSource = {
|
|
|
85223
87116
|
nickname: "Pharmacy",
|
|
85224
87117
|
address: "654 Health Ave"
|
|
85225
87118
|
},
|
|
85226
|
-
job_subtype: "delivery"
|
|
87119
|
+
job_subtype: "delivery",
|
|
87120
|
+
progress: {
|
|
87121
|
+
firstBarData: {
|
|
87122
|
+
text: "Prescription",
|
|
87123
|
+
status: "info",
|
|
87124
|
+
value: 90
|
|
87125
|
+
},
|
|
87126
|
+
secondBarData: {
|
|
87127
|
+
text: "Quality Check",
|
|
87128
|
+
status: "success",
|
|
87129
|
+
value: 60
|
|
87130
|
+
}
|
|
87131
|
+
}
|
|
85227
87132
|
}
|
|
85228
87133
|
]
|
|
85229
87134
|
};
|
|
@@ -85271,7 +87176,7 @@ const startingUseTableConfig = {
|
|
|
85271
87176
|
},
|
|
85272
87177
|
hasSettings: true,
|
|
85273
87178
|
hasFilter: true,
|
|
85274
|
-
//
|
|
87179
|
+
// Allow disableAutoFetch to be overridden by the config
|
|
85275
87180
|
disableAutoFetch: true,
|
|
85276
87181
|
dataSource: []
|
|
85277
87182
|
};
|