@gobolt/genesis 0.4.12 → 0.4.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -37,7 +37,7 @@ function requireClassnames() {
37
37
  hasRequiredClassnames = 1;
38
38
  (function(module2) {
39
39
  (function() {
40
- var hasOwn = {}.hasOwnProperty;
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 (hasOwn.call(arg, key) && arg[key]) {
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$4() {
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$4;
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$4;
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$3() {
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$3;
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$Z = function(s, e3) {
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$Z(derivativeToken, ["override"]);
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$Y = function(s, e3) {
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$Y(overrideToken, ["override"]);
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$Y(value2, ["theme"]);
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$X = function(s, e3) {
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$X(_a, ["algorithm", "token", "components", "cssVar"]);
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$D = /* @__PURE__ */ React__namespace.forwardRef(CheckCircleFilled);
7015
+ var RefIcon$E = /* @__PURE__ */ React__namespace.forwardRef(CheckCircleFilled);
7016
7016
  if (process.env.NODE_ENV !== "production") {
7017
- RefIcon$D.displayName = "CheckCircleFilled";
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$C = /* @__PURE__ */ React__namespace.forwardRef(CloseCircleFilled);
7026
+ var RefIcon$D = /* @__PURE__ */ React__namespace.forwardRef(CloseCircleFilled);
7027
7027
  if (process.env.NODE_ENV !== "production") {
7028
- RefIcon$C.displayName = "CloseCircleFilled";
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$B = /* @__PURE__ */ React__namespace.forwardRef(CloseOutlined);
7037
+ var RefIcon$C = /* @__PURE__ */ React__namespace.forwardRef(CloseOutlined);
7038
7038
  if (process.env.NODE_ENV !== "production") {
7039
- RefIcon$B.displayName = "CloseOutlined";
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$A = /* @__PURE__ */ React__namespace.forwardRef(ExclamationCircleFilled);
7048
+ var RefIcon$B = /* @__PURE__ */ React__namespace.forwardRef(ExclamationCircleFilled);
7049
7049
  if (process.env.NODE_ENV !== "production") {
7050
- RefIcon$A.displayName = "ExclamationCircleFilled";
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);
7060
+ if (process.env.NODE_ENV !== "production") {
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$C, null);
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$B, null);
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$B, null),
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$2(delay, callback, options) {
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$C, null)
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$D,
42602
- warning: RefIcon$A,
42603
- error: RefIcon$C,
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 IconNode = mergedValidateStatus && iconMap[mergedValidateStatus];
42640
- feedbackIcon = customIconNode !== false && IconNode ? /* @__PURE__ */ React__namespace.createElement("span", {
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(IconNode, null)) : null;
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$2() {
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$2 : _props$onChange, hideOnSinglePage = props.hideOnSinglePage, align = props.align, _props$showPrevNextJu = props.showPrevNextJumpers, showPrevNextJumpers = _props$showPrevNextJu === void 0 ? true : _props$showPrevNextJu, showQuickJumper = props.showQuickJumper, showLessItems = props.showLessItems, _props$showTitle = props.showTitle, showTitle = _props$showTitle === void 0 ? true : _props$showTitle, _props$onShowSizeChan = props.onShowSizeChange, onShowSizeChange = _props$onShowSizeChan === void 0 ? noop$2 : _props$onShowSizeChan, _props$locale = props.locale, locale2 = _props$locale === void 0 ? locale$1 : _props$locale, style2 = props.style, _props$totalBoundaryS = props.totalBoundaryShowSizeChanger, totalBoundaryShowSizeChanger = _props$totalBoundaryS === void 0 ? 50 : _props$totalBoundaryS, disabled2 = props.disabled, simple = props.simple, showTotal = props.showTotal, _props$showSizeChange = props.showSizeChanger, showSizeChanger = _props$showSizeChange === void 0 ? total > totalBoundaryShowSizeChanger : _props$showSizeChange, sizeChangerRender = props.sizeChangerRender, pageSizeOptions = props.pageSizeOptions, _props$itemRender = props.itemRender, itemRender = _props$itemRender === void 0 ? defaultItemRender : _props$itemRender, jumpPrevIcon = props.jumpPrevIcon, jumpNextIcon = props.jumpNextIcon, prevIcon = props.prevIcon, nextIcon = props.nextIcon;
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$2;
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$2(delay, () => {
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$A, null),
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$A, null),
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$C, null) : /* @__PURE__ */ React__namespace.createElement(RefIcon$B, null);
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$D, null) : /* @__PURE__ */ React__namespace.createElement(RefIcon$x, null);
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$D,
48340
- error: RefIcon$C,
48341
- info: RefIcon$A,
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$1 = function 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$1,
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$B, { style: { fontSize: 18 } }) }) : null
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 hasOwn = Object.prototype.hasOwnProperty;
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 = hasOwn.call(obj, "constructor");
71886
- var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, "isPrototypeOf");
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" || hasOwn.call(obj, key);
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 (!hasOwn.call(obj, name2)) {
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 noop2 = { value: () => {
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] = noop2, type4 = type4.slice(0, i).concat(type4.slice(i + 1));
74785
+ type4[i] = noop$1, type4 = type4.slice(0, i).concat(type4.slice(i + 1));
74348
74786
  break;
74349
74787
  }
74350
74788
  }
@@ -83893,287 +84331,1579 @@ const CustomPagination = ({
83893
84331
  }
83894
84332
  return null;
83895
84333
  };
83896
- var debounce$1 = { exports: {} };
83897
- var hasRequiredDebounce;
83898
- function requireDebounce() {
83899
- if (hasRequiredDebounce) return debounce$1.exports;
83900
- hasRequiredDebounce = 1;
83901
- function debounce2(function_, wait = 100, options = {}) {
83902
- if (typeof function_ !== "function") {
83903
- throw new TypeError(`Expected the first parameter to be a function, got \`${typeof function_}\`.`);
83904
- }
83905
- if (wait < 0) {
83906
- throw new RangeError("`wait` must not be negative.");
83907
- }
83908
- const { immediate } = typeof options === "boolean" ? { immediate: options } : options;
83909
- let storedContext;
83910
- let storedArguments;
83911
- let timeoutId;
83912
- let timestamp;
83913
- let result;
83914
- function run() {
83915
- const callContext = storedContext;
83916
- const callArguments = storedArguments;
83917
- storedContext = void 0;
83918
- storedArguments = void 0;
83919
- result = function_.apply(callContext, callArguments);
83920
- return result;
83921
- }
83922
- function later() {
83923
- const last = Date.now() - timestamp;
83924
- if (last < wait && last >= 0) {
83925
- timeoutId = setTimeout(later, wait - last);
83926
- } else {
83927
- timeoutId = void 0;
83928
- if (!immediate) {
83929
- result = run();
83930
- }
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
+ );
83931
84387
  }
83932
84388
  }
83933
- const debounced = function(...arguments_) {
83934
- if (storedContext && this !== storedContext && Object.getPrototypeOf(this) === Object.getPrototypeOf(storedContext)) {
83935
- throw new Error("Debounced method called with different contexts of the same prototype.");
83936
- }
83937
- storedContext = this;
83938
- storedArguments = arguments_;
83939
- timestamp = Date.now();
83940
- const callNow = immediate && !timeoutId;
83941
- if (!timeoutId) {
83942
- timeoutId = setTimeout(later, wait);
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;
83943
84513
  }
83944
- if (callNow) {
83945
- result = run();
84514
+ }
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
+ };
83946
84563
  }
83947
- return result;
84564
+ return;
83948
84565
  };
83949
- Object.defineProperty(debounced, "isPending", {
83950
- get() {
83951
- return timeoutId !== void 0;
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();
83952
84586
  }
83953
84587
  });
83954
- debounced.clear = () => {
83955
- if (!timeoutId) {
83956
- return;
83957
- }
83958
- clearTimeout(timeoutId);
83959
- timeoutId = void 0;
83960
- };
83961
- debounced.flush = () => {
83962
- if (!timeoutId) {
83963
- return;
83964
- }
83965
- debounced.trigger();
83966
- };
83967
- debounced.trigger = () => {
83968
- result = run();
83969
- debounced.clear();
83970
- };
83971
- return debounced;
83972
84588
  }
83973
- debounce$1.exports.debounce = debounce2;
83974
- debounce$1.exports = debounce2;
83975
- return debounce$1.exports;
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;
83976
84640
  }
83977
- var debounceExports = /* @__PURE__ */ requireDebounce();
83978
- const debounce = /* @__PURE__ */ getDefaultExportFromCjs(debounceExports);
83979
- const getRowKey = (record, rowKey, index2, enableValidation = true) => {
83980
- try {
83981
- const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
83982
- if (enableValidation) {
83983
- if (key === void 0 || key === null) {
83984
- console.error(`Genesis Table: rowKey "${String(rowKey)}" returned undefined/null for record at index ${index2}.`, {
83985
- record,
83986
- rowKey,
83987
- availableKeys: Object.keys(record)
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
+ });
83988
84670
  });
83989
- return `fallback-${index2}`;
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
+ }
83990
84685
  }
83991
- if (typeof key === "string" && String(key).trim() === "") {
83992
- console.warn(`Genesis Table: rowKey "${String(rowKey)}" returned empty string for record at index ${index2}.`, {
83993
- record,
83994
- rowKey
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);
83995
84695
  });
83996
- return `fallback-${index2}`;
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
+ };
83997
84735
  }
84736
+ return;
84737
+ };
84738
+ }
84739
+ onSubscribe() {
84740
+ if (!this.#cleanup) {
84741
+ this.setEventListener(this.#setup);
83998
84742
  }
83999
- return key;
84000
- } catch (error2) {
84001
- if (enableValidation) {
84002
- console.error(`Genesis Table: Error accessing rowKey "${String(rowKey)}" for record at index ${index2}.`, {
84003
- error: error2,
84004
- record,
84005
- rowKey,
84006
- availableKeys: Object.keys(record)
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);
84007
84761
  });
84008
84762
  }
84009
- return `fallback-${index2}`;
84763
+ }
84764
+ isOnline() {
84765
+ return this.#online;
84010
84766
  }
84011
84767
  };
84012
- function Table({
84013
- columns,
84014
- dataSource,
84015
- rowKey = "id",
84016
- size = "small",
84017
- onChange,
84018
- rowSelection,
84019
- onRowClick,
84020
- pagination,
84021
- isMainContentCell = false,
84022
- isMaterializedView = false,
84023
- materializedViewConfig,
84024
- enableRowKeyValidation = process.env.NODE_ENV === "development",
84025
- onRowKeyError,
84026
- ...rest
84027
- }) {
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
- const [selectedRowKeys, setSelectedRowKeys] = React__namespace.useState([]);
84035
- const [pressedRowKey, setPressedRowKey] = React__namespace.useState(
84036
- null
84037
- );
84038
- const tableRef = React__namespace.useRef(null);
84039
- 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);
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"
84059
84780
  }
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;
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();
84073
84820
  }
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
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
+ )
84096
84908
  );
84097
- setMaterializedData((prev2) => [...prev2, ...newData]);
84098
- setHasMoreData(newData.length === loadSize);
84099
- setIsLoadingMore(false);
84100
84909
  }
84910
+ return Reflect.get(target, key);
84101
84911
  }
84102
- }, 200),
84103
- [
84104
- isMaterializedView,
84105
- materializedViewConfig,
84106
- materializedData,
84107
- isLoadingMore,
84108
- hasMoreData,
84109
- dataSource
84110
- ]
84111
- );
84112
- const paginationConfig = React__namespace.useMemo(() => {
84113
- if (isMaterializedView) {
84114
- return false;
84912
+ });
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);
84115
84947
  }
84116
- return pagination === false ? false : {
84117
- ...pagination,
84118
- itemRender: void 0,
84119
- // Clear any existing itemRender to avoid conflicts
84120
- render: (properties) => /* @__PURE__ */ jsxRuntime.jsx(
84121
- CustomPagination,
84122
- {
84123
- ...properties,
84124
- paginationStyle: pagination?.paginationStyle || PaginationStyle.SIMPLE
84125
- }
84126
- )
84127
- };
84128
- }, [isMaterializedView, pagination]);
84129
- 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
- };
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;
84136
84958
  }
84137
- return rest.scroll;
84138
- }, [isMaterializedView, materializedViewConfig, dynamicHeight, rest.scroll]);
84139
- const tableDataSource = isMaterializedView ? materializedData : dataSource;
84140
- React__namespace.useEffect(() => {
84141
- if (enableRowKeyValidation && tableDataSource.length > 0) {
84142
- const sampleRecord = tableDataSource[0];
84143
- if (typeof rowKey === "string") {
84144
- if (!(rowKey in sampleRecord)) {
84145
- const error2 = new Error(`rowKey "${rowKey}" does not exist in data records`);
84146
- console.error(`Genesis Table: ${error2.message}. Available keys:`, Object.keys(sampleRecord));
84147
- onRowKeyError?.({
84148
- record: sampleRecord,
84149
- rowKey,
84150
- index: 0,
84151
- error: error2
84152
- });
84153
- }
84154
- }
84155
- const keys2 = tableDataSource.map(
84156
- (record, index2) => getRowKey(record, rowKey, index2, false)
84157
- // Don't log individual errors here
84158
- );
84159
- const uniqueKeys = [...new Set(keys2)];
84160
- if (keys2.length !== uniqueKeys.length) {
84161
- const error2 = new Error(`Duplicate row keys detected`);
84162
- console.error(`Genesis Table: ${error2.message}!`, {
84163
- totalKeys: keys2.length,
84164
- uniqueKeys: uniqueKeys.length,
84165
- duplicates: keys2.filter((key, index2) => keys2.indexOf(key) !== index2)
84166
- });
84167
- onRowKeyError?.({
84168
- record: tableDataSource[0],
84169
- rowKey,
84170
- index: 0,
84171
- error: error2
84172
- });
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();
84173
84964
  }
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;
84174
84975
  }
84175
- }, [tableDataSource, rowKey, enableRowKeyValidation, onRowKeyError]);
84176
- const handleRowMouseDown = React__namespace.useCallback(
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
85101
+ };
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");
85162
+ }
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
+ });
85168
+ };
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
85400
+ };
85401
+ return result;
85402
+ }
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
+ };
85430
+ }
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
+ 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("div", { style: { position: "relative" }, children: [
85698
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
85699
+ .infinite-scroll-table .ant-pagination {
85700
+ display: none !important;
85701
+ }
85702
+ ` }),
85703
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "infinite-scroll-table", children: /* @__PURE__ */ jsxRuntime.jsx(
85704
+ ForwardTable,
85705
+ {
85706
+ dataSource,
85707
+ columns: resizableColumns,
85708
+ components: { header: { cell: ResizableTitle } },
85709
+ rowKey: "id",
85710
+ pagination: false,
85711
+ showSorterTooltip: false,
85712
+ size: "small",
85713
+ scroll: { y: scrollHeight, x: scrollWidth },
85714
+ onChange: () => {
85715
+ },
85716
+ onRow: (record, index2) => {
85717
+ if (index2 === dataSource.length - 1) {
85718
+ return { ref: lastRowRef };
85719
+ }
85720
+ return {};
85721
+ }
85722
+ }
85723
+ ) }),
85724
+ isFetchingNextPage && /* @__PURE__ */ jsxRuntime.jsx(
85725
+ "div",
85726
+ {
85727
+ style: {
85728
+ position: "absolute",
85729
+ bottom: 0,
85730
+ left: 0,
85731
+ width: "100%",
85732
+ padding: "16px",
85733
+ display: "flex",
85734
+ justifyContent: "center",
85735
+ alignItems: "center",
85736
+ backgroundColor: "rgba(255, 255, 255, 0.7)",
85737
+ backdropFilter: "blur(2px)",
85738
+ zIndex: 10
85739
+ },
85740
+ children: /* @__PURE__ */ jsxRuntime.jsx(Spin, {})
85741
+ }
85742
+ )
85743
+ ] }),
85744
+ !hasNextPage2 && /* @__PURE__ */ jsxRuntime.jsx(
85745
+ "div",
85746
+ {
85747
+ style: {
85748
+ textAlign: "center",
85749
+ padding: "20px",
85750
+ borderTop: "1px solid #f0f0f0"
85751
+ },
85752
+ children: /* @__PURE__ */ jsxRuntime.jsx(Typography$1.Text, { type: "secondary", children: "No more rows to load." })
85753
+ }
85754
+ )
85755
+ ]
85756
+ }
85757
+ );
85758
+ };
85759
+ const getRowKey = (record, rowKey, index2, enableValidation = true) => {
85760
+ try {
85761
+ const key = typeof rowKey === "function" ? rowKey(record) : record[rowKey];
85762
+ if (enableValidation) {
85763
+ if (key === void 0 || key === null) {
85764
+ console.error(
85765
+ `Genesis Table: rowKey "${String(rowKey)}" returned undefined/null for record at index ${index2}.`,
85766
+ {
85767
+ record,
85768
+ rowKey,
85769
+ availableKeys: Object.keys(record)
85770
+ }
85771
+ );
85772
+ return `fallback-${index2}`;
85773
+ }
85774
+ if (typeof key === "string" && String(key).trim() === "") {
85775
+ console.warn(
85776
+ `Genesis Table: rowKey "${String(rowKey)}" returned empty string for record at index ${index2}.`,
85777
+ {
85778
+ record,
85779
+ rowKey
85780
+ }
85781
+ );
85782
+ return `fallback-${index2}`;
85783
+ }
85784
+ }
85785
+ return key;
85786
+ } catch (error2) {
85787
+ if (enableValidation) {
85788
+ console.error(
85789
+ `Genesis Table: Error accessing rowKey "${String(rowKey)}" for record at index ${index2}.`,
85790
+ {
85791
+ error: error2,
85792
+ record,
85793
+ rowKey,
85794
+ availableKeys: Object.keys(record)
85795
+ }
85796
+ );
85797
+ }
85798
+ return `fallback-${index2}`;
85799
+ }
85800
+ };
85801
+ function Table({
85802
+ columns,
85803
+ dataSource,
85804
+ rowKey = "id",
85805
+ size = "small",
85806
+ onChange,
85807
+ rowSelection,
85808
+ onRowClick,
85809
+ pagination,
85810
+ isMainContentCell = false,
85811
+ isInfiniteScroll = false,
85812
+ infiniteScrollConfig,
85813
+ enableRowKeyValidation = process.env.NODE_ENV === "development",
85814
+ onRowKeyError,
85815
+ ...rest
85816
+ }) {
85817
+ const [selectedRowKeys, setSelectedRowKeys] = React__namespace.useState([]);
85818
+ const [pressedRowKey, setPressedRowKey] = React__namespace.useState(
85819
+ null
85820
+ );
85821
+ const tableRef = React__namespace.useRef(null);
85822
+ const containerRef = React__namespace.useRef(null);
85823
+ const paginationConfig = React__namespace.useMemo(() => {
85824
+ if (!pagination) return false;
85825
+ return {
85826
+ ...pagination,
85827
+ showSizeChanger: false,
85828
+ // Disable Ant Design's size changer
85829
+ showQuickJumper: false,
85830
+ // Disable Ant Design's quick jumper
85831
+ showTotal: void 0,
85832
+ // Disable Ant Design's total display
85833
+ itemRender: void 0,
85834
+ // Clear any existing itemRender to avoid conflicts
85835
+ render: (properties) => /* @__PURE__ */ jsxRuntime.jsx(
85836
+ CustomPagination,
85837
+ {
85838
+ ...properties,
85839
+ paginationStyle: pagination && typeof pagination === "object" && "paginationStyle" in pagination ? pagination.paginationStyle : PaginationStyle.SIMPLE
85840
+ }
85841
+ )
85842
+ };
85843
+ }, [pagination]);
85844
+ const scrollConfig = React__namespace.useMemo(() => {
85845
+ return rest.scroll;
85846
+ }, [rest.scroll]);
85847
+ if (isInfiniteScroll && infiniteScrollConfig) {
85848
+ const resizableColumns = columns.map((col) => ({
85849
+ title: col.title,
85850
+ key: col.key,
85851
+ dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
85852
+ width: col.width || 150,
85853
+ render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
85854
+ }));
85855
+ return /* @__PURE__ */ jsxRuntime.jsx(
85856
+ InfiniteScrollTable,
85857
+ {
85858
+ instanceId: infiniteScrollConfig.instanceId,
85859
+ columns: resizableColumns,
85860
+ fetchService: infiniteScrollConfig.fetchService,
85861
+ title: infiniteScrollConfig.title,
85862
+ scrollHeight: infiniteScrollConfig.scrollHeight,
85863
+ scrollWidth: infiniteScrollConfig.scrollWidth
85864
+ }
85865
+ );
85866
+ }
85867
+ React__namespace.useEffect(() => {
85868
+ if (enableRowKeyValidation && dataSource.length > 0) {
85869
+ const sampleRecord = dataSource[0];
85870
+ if (typeof rowKey === "string" && !(rowKey in sampleRecord)) {
85871
+ const error2 = new Error(
85872
+ `rowKey "${rowKey}" does not exist in data records`
85873
+ );
85874
+ console.error(
85875
+ `Genesis Table: ${error2.message}. Available keys:`,
85876
+ Object.keys(sampleRecord)
85877
+ );
85878
+ onRowKeyError?.({
85879
+ record: sampleRecord,
85880
+ rowKey,
85881
+ index: 0,
85882
+ error: error2
85883
+ });
85884
+ }
85885
+ const keys2 = dataSource.map(
85886
+ (record, index2) => getRowKey(record, rowKey, index2, false)
85887
+ // Don't log individual errors here
85888
+ );
85889
+ const uniqueKeys = [...new Set(keys2)];
85890
+ if (keys2.length !== uniqueKeys.length) {
85891
+ const error2 = new Error(`Duplicate row keys detected`);
85892
+ console.error(`Genesis Table: ${error2.message}!`, {
85893
+ totalKeys: keys2.length,
85894
+ uniqueKeys: uniqueKeys.length,
85895
+ duplicates: keys2.filter((key, index2) => keys2.indexOf(key) !== index2)
85896
+ });
85897
+ onRowKeyError?.({
85898
+ record: dataSource[0],
85899
+ rowKey,
85900
+ index: 0,
85901
+ error: error2
85902
+ });
85903
+ }
85904
+ }
85905
+ }, [dataSource, rowKey, enableRowKeyValidation, onRowKeyError]);
85906
+ const handleRowMouseDown = React__namespace.useCallback(
84177
85907
  (record, index2, event) => {
84178
85908
  const target = event.target;
84179
85909
  const isInteractiveElement = target.closest(
@@ -84182,7 +85912,12 @@ function Table({
84182
85912
  if (isInteractiveElement) {
84183
85913
  return;
84184
85914
  }
84185
- const recordKey = getRowKey(record, rowKey, index2, enableRowKeyValidation);
85915
+ const recordKey = getRowKey(
85916
+ record,
85917
+ rowKey,
85918
+ index2,
85919
+ enableRowKeyValidation
85920
+ );
84186
85921
  setPressedRowKey(recordKey);
84187
85922
  },
84188
85923
  [rowKey, enableRowKeyValidation]
@@ -84223,42 +85958,62 @@ function Table({
84223
85958
  }
84224
85959
  };
84225
85960
  }, [rowSelection, selectedRowKeys]);
84226
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx(
84227
- Table$1,
84228
- {
84229
- ref: tableRef,
84230
- "data-testid": "Table",
84231
- dataSource: tableDataSource,
84232
- columns,
84233
- rowKey,
84234
- locale: { emptyText: "No Data" },
84235
- size,
84236
- onChange,
84237
- rowSelection: enhancedRowSelection,
84238
- onRow: (record, index2) => {
84239
- const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
84240
- const recordKey = getRowKey(record, rowKey, index2 ?? 0, enableRowKeyValidation);
84241
- const isPressed = pressedRowKey === recordKey;
84242
- return {
84243
- onClick: (event) => handleRowClick(record, index2 ?? 0, event),
84244
- onMouseDown: (event) => handleRowMouseDown(record, index2 ?? 0, event),
84245
- onMouseUp: (event) => handleRowMouseUp(record, index2 ?? 0, event),
84246
- onMouseLeave: () => setPressedRowKey(null),
84247
- // Clear pressed state when mouse leaves
84248
- style: {
84249
- cursor: onRowClick ? "pointer" : "default",
84250
- opacity: isDisabled ? 0.6 : 1
84251
- },
84252
- className: isPressed ? "ant-table-row-pressed" : ""
84253
- };
84254
- },
84255
- pagination: paginationConfig,
84256
- scroll: scrollConfig,
84257
- onScroll: isMaterializedView ? handleScroll : void 0,
84258
- $isMainContentCell: isMainContentCell,
84259
- ...rest
84260
- }
84261
- ) });
85961
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, children: [
85962
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
85963
+ .genesis-table .ant-pagination {
85964
+ display: none !important;
85965
+ }
85966
+ .genesis-table .ant-pagination-item {
85967
+ display: none !important;
85968
+ }
85969
+ .genesis-table .ant-pagination-prev {
85970
+ display: none !important;
85971
+ }
85972
+ .genesis-table .ant-pagination-next {
85973
+ display: none !important;
85974
+ }
85975
+ ` }),
85976
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "genesis-table", children: /* @__PURE__ */ jsxRuntime.jsx(
85977
+ Table$1,
85978
+ {
85979
+ ref: tableRef,
85980
+ "data-testid": "Table",
85981
+ dataSource,
85982
+ columns,
85983
+ rowKey,
85984
+ locale: { emptyText: "No Data" },
85985
+ size,
85986
+ onChange,
85987
+ rowSelection: enhancedRowSelection,
85988
+ onRow: (record, index2) => {
85989
+ const isDisabled = rowSelection?.getCheckboxProps?.(record)?.disabled ?? false;
85990
+ const recordKey = getRowKey(
85991
+ record,
85992
+ rowKey,
85993
+ index2 ?? 0,
85994
+ enableRowKeyValidation
85995
+ );
85996
+ const isPressed = pressedRowKey === recordKey;
85997
+ return {
85998
+ onClick: (event) => handleRowClick(record, index2 ?? 0, event),
85999
+ onMouseDown: (event) => handleRowMouseDown(record, index2 ?? 0, event),
86000
+ onMouseUp: (event) => handleRowMouseUp(record, index2 ?? 0, event),
86001
+ onMouseLeave: () => setPressedRowKey(null),
86002
+ // Clear pressed state when mouse leaves
86003
+ style: {
86004
+ cursor: onRowClick ? "pointer" : "default",
86005
+ opacity: isDisabled ? 0.6 : 1
86006
+ },
86007
+ className: isPressed ? "ant-table-row-pressed" : ""
86008
+ };
86009
+ },
86010
+ pagination: paginationConfig,
86011
+ scroll: scrollConfig,
86012
+ $isMainContentCell: isMainContentCell,
86013
+ ...rest
86014
+ }
86015
+ ) })
86016
+ ] });
84262
86017
  }
84263
86018
  const TablePagination = ({
84264
86019
  columns,
@@ -84722,18 +86477,16 @@ const TableWithControls = ({
84722
86477
  tableData,
84723
86478
  tableControlsData: tableControlsData2,
84724
86479
  onChange,
84725
- onRowClick
86480
+ onRowClick,
86481
+ tableType = "table",
86482
+ isInfiniteScroll,
86483
+ // Deprecated: use tableType instead
86484
+ infiniteScrollConfig,
86485
+ paginationStyle
84726
86486
  }) => {
84727
86487
  const { primaryTableRowData, secondaryTableRowData } = tableControlsData2;
84728
- const {
84729
- dataSource,
84730
- columns,
84731
- rowSelection,
84732
- hasSettings,
84733
- hasFilter,
84734
- isMaterializedView,
84735
- materializedViewConfig
84736
- } = tableData;
86488
+ const { dataSource, columns, rowSelection, hasSettings, hasFilter } = tableData;
86489
+ const actualTableType = isInfiniteScroll ? "infiniteScroll" : tableType;
84737
86490
  const onTableControlsChange = (event) => {
84738
86491
  onChange(event);
84739
86492
  };
@@ -84743,6 +86496,60 @@ const TableWithControls = ({
84743
86496
  payload: { value: "tableChange", pagination, filters, sorter }
84744
86497
  });
84745
86498
  };
86499
+ const renderTable = () => {
86500
+ switch (actualTableType) {
86501
+ case "infiniteScroll": {
86502
+ if (!infiniteScrollConfig) {
86503
+ console.warn("InfiniteScrollTable requires infiniteScrollConfig");
86504
+ return null;
86505
+ }
86506
+ const resizableColumns = columns.map((col) => ({
86507
+ title: col.title,
86508
+ key: col.key,
86509
+ dataIndex: Array.isArray(col.dataIndex) ? col.dataIndex.join(".") : typeof col.dataIndex === "string" ? col.dataIndex : col.key,
86510
+ width: col.width || 150,
86511
+ render: col.render ? (value2, record, index2) => col.render(value2, record, index2 ?? 0) : void 0
86512
+ }));
86513
+ return /* @__PURE__ */ jsxRuntime.jsx(
86514
+ InfiniteScrollTable,
86515
+ {
86516
+ instanceId: infiniteScrollConfig.instanceId,
86517
+ columns: resizableColumns,
86518
+ fetchService: infiniteScrollConfig.fetchService,
86519
+ title: infiniteScrollConfig.title,
86520
+ scrollHeight: infiniteScrollConfig.scrollHeight,
86521
+ scrollWidth: infiniteScrollConfig.scrollWidth
86522
+ }
86523
+ );
86524
+ }
86525
+ case "pagination": {
86526
+ return /* @__PURE__ */ jsxRuntime.jsx(
86527
+ TablePagination,
86528
+ {
86529
+ dataSource,
86530
+ columns,
86531
+ rowSelection,
86532
+ onChange: onTableChange,
86533
+ onRowClick,
86534
+ paginationStyle
86535
+ }
86536
+ );
86537
+ }
86538
+ case "table":
86539
+ default: {
86540
+ return /* @__PURE__ */ jsxRuntime.jsx(
86541
+ Table,
86542
+ {
86543
+ dataSource,
86544
+ columns,
86545
+ rowSelection,
86546
+ onChange: onTableChange,
86547
+ onRowClick
86548
+ }
86549
+ );
86550
+ }
86551
+ }
86552
+ };
84746
86553
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
84747
86554
  /* @__PURE__ */ jsxRuntime.jsx(
84748
86555
  TableControls,
@@ -84752,20 +86559,845 @@ const TableWithControls = ({
84752
86559
  onChange: onTableControlsChange
84753
86560
  }
84754
86561
  ),
84755
- /* @__PURE__ */ jsxRuntime.jsx(
84756
- Table,
84757
- {
84758
- dataSource,
84759
- columns,
84760
- rowSelection,
84761
- onChange: onTableChange,
84762
- onRowClick,
84763
- isMaterializedView,
84764
- materializedViewConfig
84765
- }
84766
- )
86562
+ renderTable()
84767
86563
  ] });
84768
86564
  };
86565
+ const staticTableData = [
86566
+ {
86567
+ id: "1",
86568
+ number: "1",
86569
+ timerange: "9:00 AM - 10:00 AM",
86570
+ status: "in_progress",
86571
+ address: {
86572
+ nickname: "Home",
86573
+ address: "123 Main St"
86574
+ },
86575
+ job_subtype: "delivery",
86576
+ progress: {
86577
+ firstBarData: {
86578
+ text: "Loading",
86579
+ status: "info",
86580
+ value: 100
86581
+ },
86582
+ secondBarData: {
86583
+ text: "Processing",
86584
+ status: "success",
86585
+ value: 25
86586
+ }
86587
+ }
86588
+ },
86589
+ {
86590
+ id: "2",
86591
+ number: "2",
86592
+ timerange: "10:00 AM - 11:00 AM",
86593
+ status: "scheduled",
86594
+ address: {
86595
+ nickname: "Work",
86596
+ address: "456 Elm St"
86597
+ },
86598
+ job_subtype: "pickup",
86599
+ progress: {
86600
+ firstBarData: {
86601
+ text: "Preparing",
86602
+ status: "info",
86603
+ value: 100
86604
+ },
86605
+ secondBarData: {
86606
+ text: "Final Check",
86607
+ status: "success",
86608
+ value: 0
86609
+ }
86610
+ }
86611
+ },
86612
+ {
86613
+ id: "3",
86614
+ number: "3",
86615
+ timerange: "11:00 AM - 12:00 PM",
86616
+ status: "scheduled",
86617
+ address: {
86618
+ nickname: "Store",
86619
+ address: "789 Oak St"
86620
+ },
86621
+ job_subtype: "delivery",
86622
+ progress: {
86623
+ firstBarData: {
86624
+ text: "Pending",
86625
+ status: "info",
86626
+ value: 0
86627
+ },
86628
+ secondBarData: {
86629
+ text: "Awaiting",
86630
+ status: "success",
86631
+ value: 0
86632
+ }
86633
+ }
86634
+ },
86635
+ {
86636
+ id: "4",
86637
+ number: "4",
86638
+ timerange: "1:00 PM - 2:00 PM",
86639
+ status: "scheduled",
86640
+ address: {
86641
+ nickname: "Office",
86642
+ address: "321 Pine St"
86643
+ },
86644
+ job_subtype: "pickup",
86645
+ progress: {
86646
+ firstBarData: {
86647
+ text: "In Progress",
86648
+ status: "info",
86649
+ value: 100
86650
+ },
86651
+ secondBarData: {
86652
+ text: "Validation",
86653
+ status: "success",
86654
+ value: 30
86655
+ }
86656
+ }
86657
+ },
86658
+ {
86659
+ id: "5",
86660
+ number: "5",
86661
+ timerange: "2:00 PM - 3:00 PM",
86662
+ status: "scheduled",
86663
+ address: {
86664
+ nickname: "Library",
86665
+ address: "555 Book Lane"
86666
+ },
86667
+ job_subtype: "delivery",
86668
+ progress: {
86669
+ firstBarData: {
86670
+ text: "Completed",
86671
+ status: "info",
86672
+ value: 100
86673
+ },
86674
+ secondBarData: {
86675
+ text: "Verified",
86676
+ status: "success",
86677
+ value: 100
86678
+ }
86679
+ }
86680
+ },
86681
+ {
86682
+ id: "6",
86683
+ number: "6",
86684
+ timerange: "3:00 PM - 4:00 PM",
86685
+ status: "scheduled",
86686
+ address: {
86687
+ nickname: "Gym",
86688
+ address: "777 Fitness Ave"
86689
+ },
86690
+ job_subtype: "pickup",
86691
+ progress: {
86692
+ firstBarData: {
86693
+ text: "Phase 1",
86694
+ status: "info",
86695
+ value: 75
86696
+ },
86697
+ secondBarData: {
86698
+ text: "Phase 2",
86699
+ status: "success",
86700
+ value: 50
86701
+ }
86702
+ }
86703
+ },
86704
+ {
86705
+ id: "7",
86706
+ number: "7",
86707
+ timerange: "4:00 PM - 5:00 PM",
86708
+ status: "scheduled",
86709
+ address: {
86710
+ nickname: "Mall",
86711
+ address: "888 Shopping Center"
86712
+ },
86713
+ job_subtype: "delivery",
86714
+ progress: {
86715
+ firstBarData: {
86716
+ text: "Queued",
86717
+ status: "info",
86718
+ value: 0
86719
+ },
86720
+ secondBarData: {
86721
+ text: "Waiting",
86722
+ status: "success",
86723
+ value: 0
86724
+ }
86725
+ }
86726
+ },
86727
+ {
86728
+ id: "8",
86729
+ number: "8",
86730
+ timerange: "9:00 AM - 10:00 AM",
86731
+ status: "completed",
86732
+ address: {
86733
+ nickname: "School",
86734
+ address: "999 Education Rd"
86735
+ },
86736
+ job_subtype: "pickup",
86737
+ progress: {
86738
+ firstBarData: {
86739
+ text: "Delivered",
86740
+ status: "info",
86741
+ value: 100
86742
+ },
86743
+ secondBarData: {
86744
+ text: "Confirmed",
86745
+ status: "success",
86746
+ value: 100
86747
+ }
86748
+ }
86749
+ },
86750
+ {
86751
+ id: "9",
86752
+ number: "9",
86753
+ timerange: "10:00 AM - 11:00 AM",
86754
+ status: "scheduled",
86755
+ address: {
86756
+ nickname: "Restaurant",
86757
+ address: "111 Food Court"
86758
+ },
86759
+ job_subtype: "delivery",
86760
+ progress: {
86761
+ firstBarData: {
86762
+ text: "Preparing",
86763
+ status: "info",
86764
+ value: 100
86765
+ },
86766
+ secondBarData: {
86767
+ text: "Quality Check",
86768
+ status: "success",
86769
+ value: 15
86770
+ }
86771
+ }
86772
+ },
86773
+ {
86774
+ id: "10",
86775
+ number: "10",
86776
+ timerange: "11:00 AM - 12:00 PM",
86777
+ status: "scheduled",
86778
+ address: {
86779
+ nickname: "Park",
86780
+ address: "222 Green Ave"
86781
+ },
86782
+ job_subtype: "pickup",
86783
+ progress: {
86784
+ firstBarData: {
86785
+ text: "Processing",
86786
+ status: "info",
86787
+ value: 80
86788
+ },
86789
+ secondBarData: {
86790
+ text: "Review",
86791
+ status: "success",
86792
+ value: 0
86793
+ }
86794
+ }
86795
+ },
86796
+ {
86797
+ id: "11",
86798
+ number: "11",
86799
+ timerange: "1:00 PM - 2:00 PM",
86800
+ status: "scheduled",
86801
+ address: {
86802
+ nickname: "Beach",
86803
+ address: "333 Shore Dr"
86804
+ },
86805
+ job_subtype: "delivery",
86806
+ progress: {
86807
+ firstBarData: {
86808
+ text: "Planning",
86809
+ status: "info",
86810
+ value: 40
86811
+ },
86812
+ secondBarData: {
86813
+ text: "Route Check",
86814
+ status: "success",
86815
+ value: 20
86816
+ }
86817
+ }
86818
+ },
86819
+ {
86820
+ id: "12",
86821
+ number: "12",
86822
+ timerange: "2:00 PM - 3:00 PM",
86823
+ status: "scheduled",
86824
+ address: {
86825
+ nickname: "Hotel",
86826
+ address: "444 Stay Blvd"
86827
+ },
86828
+ job_subtype: "pickup",
86829
+ progress: {
86830
+ firstBarData: {
86831
+ text: "Scheduled",
86832
+ status: "info",
86833
+ value: 0
86834
+ },
86835
+ secondBarData: {
86836
+ text: "Awaiting",
86837
+ status: "success",
86838
+ value: 0
86839
+ }
86840
+ }
86841
+ },
86842
+ {
86843
+ id: "13",
86844
+ number: "13",
86845
+ timerange: "3:00 PM - 4:00 PM",
86846
+ status: "scheduled",
86847
+ address: {
86848
+ nickname: "Airport",
86849
+ address: "666 Flight Way"
86850
+ },
86851
+ job_subtype: "delivery",
86852
+ progress: {
86853
+ firstBarData: {
86854
+ text: "Pre-flight",
86855
+ status: "info",
86856
+ value: 60
86857
+ },
86858
+ secondBarData: {
86859
+ text: "Security",
86860
+ status: "success",
86861
+ value: 30
86862
+ }
86863
+ }
86864
+ },
86865
+ {
86866
+ id: "14",
86867
+ number: "14",
86868
+ timerange: "4:00 PM - 5:00 PM",
86869
+ status: "cancelled",
86870
+ address: {
86871
+ nickname: "Stadium",
86872
+ address: "777 Sports Complex"
86873
+ },
86874
+ job_subtype: "pickup",
86875
+ progress: {
86876
+ firstBarData: {
86877
+ text: "Cancelled",
86878
+ status: "info",
86879
+ value: 0
86880
+ },
86881
+ secondBarData: {
86882
+ text: "Refund",
86883
+ status: "success",
86884
+ value: 100
86885
+ }
86886
+ }
86887
+ },
86888
+ {
86889
+ id: "15",
86890
+ number: "15",
86891
+ timerange: "9:00 AM - 10:00 AM",
86892
+ status: "scheduled",
86893
+ address: {
86894
+ nickname: "Theater",
86895
+ address: "888 Show Ave"
86896
+ },
86897
+ job_subtype: "delivery",
86898
+ progress: {
86899
+ firstBarData: {
86900
+ text: "Setup",
86901
+ status: "info",
86902
+ value: 25
86903
+ },
86904
+ secondBarData: {
86905
+ text: "Sound Check",
86906
+ status: "success",
86907
+ value: 0
86908
+ }
86909
+ }
86910
+ },
86911
+ {
86912
+ id: "16",
86913
+ number: "16",
86914
+ timerange: "10:00 AM - 11:00 AM",
86915
+ status: "scheduled",
86916
+ address: {
86917
+ nickname: "Museum",
86918
+ address: "999 History Lane"
86919
+ },
86920
+ job_subtype: "pickup",
86921
+ progress: {
86922
+ firstBarData: {
86923
+ text: "Exhibit Prep",
86924
+ status: "info",
86925
+ value: 70
86926
+ },
86927
+ secondBarData: {
86928
+ text: "Documentation",
86929
+ status: "success",
86930
+ value: 45
86931
+ }
86932
+ }
86933
+ },
86934
+ {
86935
+ id: "17",
86936
+ number: "17",
86937
+ timerange: "11:00 AM - 12:00 PM",
86938
+ status: "scheduled",
86939
+ address: {
86940
+ nickname: "Zoo",
86941
+ address: "123 Animal Park"
86942
+ },
86943
+ job_subtype: "delivery",
86944
+ progress: {
86945
+ firstBarData: {
86946
+ text: "Animal Care",
86947
+ status: "info",
86948
+ value: 85
86949
+ },
86950
+ secondBarData: {
86951
+ text: "Feeding",
86952
+ status: "success",
86953
+ value: 90
86954
+ }
86955
+ }
86956
+ },
86957
+ {
86958
+ id: "18",
86959
+ number: "18",
86960
+ timerange: "1:00 PM - 2:00 PM",
86961
+ status: "scheduled",
86962
+ address: {
86963
+ nickname: "Bank",
86964
+ address: "456 Money St"
86965
+ },
86966
+ job_subtype: "pickup",
86967
+ progress: {
86968
+ firstBarData: {
86969
+ text: "Transaction",
86970
+ status: "info",
86971
+ value: 50
86972
+ },
86973
+ secondBarData: {
86974
+ text: "Verification",
86975
+ status: "success",
86976
+ value: 25
86977
+ }
86978
+ }
86979
+ },
86980
+ {
86981
+ id: "19",
86982
+ number: "19",
86983
+ timerange: "2:00 PM - 3:00 PM",
86984
+ status: "scheduled",
86985
+ address: {
86986
+ nickname: "Post Office",
86987
+ address: "789 Mail Road"
86988
+ },
86989
+ job_subtype: "delivery",
86990
+ progress: {
86991
+ firstBarData: {
86992
+ text: "Sorting",
86993
+ status: "info",
86994
+ value: 100
86995
+ },
86996
+ secondBarData: {
86997
+ text: "Dispatch",
86998
+ status: "success",
86999
+ value: 75
87000
+ }
87001
+ }
87002
+ },
87003
+ {
87004
+ id: "20",
87005
+ number: "20",
87006
+ timerange: "3:00 PM - 4:00 PM",
87007
+ status: "scheduled",
87008
+ address: {
87009
+ nickname: "Church",
87010
+ address: "321 Faith Street"
87011
+ },
87012
+ job_subtype: "pickup",
87013
+ progress: {
87014
+ firstBarData: {
87015
+ text: "Service Prep",
87016
+ status: "info",
87017
+ value: 30
87018
+ },
87019
+ secondBarData: {
87020
+ text: "Community",
87021
+ status: "success",
87022
+ value: 10
87023
+ }
87024
+ }
87025
+ },
87026
+ {
87027
+ id: "21",
87028
+ number: "21",
87029
+ timerange: "4:00 PM - 5:00 PM",
87030
+ status: "scheduled",
87031
+ address: {
87032
+ nickname: "Pharmacy",
87033
+ address: "654 Health Ave"
87034
+ },
87035
+ job_subtype: "delivery",
87036
+ progress: {
87037
+ firstBarData: {
87038
+ text: "Prescription",
87039
+ status: "info",
87040
+ value: 90
87041
+ },
87042
+ secondBarData: {
87043
+ text: "Quality Check",
87044
+ status: "success",
87045
+ value: 60
87046
+ }
87047
+ }
87048
+ },
87049
+ {
87050
+ id: "22",
87051
+ number: "22",
87052
+ timerange: "2:00 PM - 3:00 PM",
87053
+ status: "scheduled",
87054
+ address: {
87055
+ nickname: "Office Complex",
87056
+ street: "789 Business Ave",
87057
+ city: "Commerce City",
87058
+ state: "CA",
87059
+ zip: "90210"
87060
+ },
87061
+ progress: {
87062
+ currentStep: 1,
87063
+ totalSteps: 4,
87064
+ steps: {
87065
+ pickup: {
87066
+ text: "Pickup Scheduled",
87067
+ status: "pending",
87068
+ value: 25
87069
+ },
87070
+ transit: {
87071
+ text: "In Transit",
87072
+ status: "pending",
87073
+ value: 0
87074
+ },
87075
+ delivery: {
87076
+ text: "Delivery",
87077
+ status: "pending",
87078
+ value: 0
87079
+ },
87080
+ quality: {
87081
+ text: "Quality Check",
87082
+ status: "pending",
87083
+ value: 0
87084
+ }
87085
+ }
87086
+ }
87087
+ },
87088
+ {
87089
+ id: "23",
87090
+ number: "23",
87091
+ timerange: "3:00 PM - 4:00 PM",
87092
+ status: "completed",
87093
+ address: {
87094
+ nickname: "Retail Store",
87095
+ street: "456 Shopping St",
87096
+ city: "Retail Town",
87097
+ state: "CA",
87098
+ zip: "90211"
87099
+ },
87100
+ progress: {
87101
+ currentStep: 4,
87102
+ totalSteps: 4,
87103
+ steps: {
87104
+ pickup: {
87105
+ text: "Pickup Complete",
87106
+ status: "success",
87107
+ value: 100
87108
+ },
87109
+ transit: {
87110
+ text: "Transit Complete",
87111
+ status: "success",
87112
+ value: 100
87113
+ },
87114
+ delivery: {
87115
+ text: "Delivery Complete",
87116
+ status: "success",
87117
+ value: 100
87118
+ },
87119
+ quality: {
87120
+ text: "Quality Check Complete",
87121
+ status: "success",
87122
+ value: 100
87123
+ }
87124
+ }
87125
+ }
87126
+ },
87127
+ {
87128
+ id: "24",
87129
+ number: "24",
87130
+ timerange: "4:00 PM - 5:00 PM",
87131
+ status: "in_progress",
87132
+ address: {
87133
+ nickname: "Warehouse",
87134
+ street: "321 Storage Blvd",
87135
+ city: "Storage City",
87136
+ state: "CA",
87137
+ zip: "90212"
87138
+ },
87139
+ progress: {
87140
+ currentStep: 2,
87141
+ totalSteps: 4,
87142
+ steps: {
87143
+ pickup: {
87144
+ text: "Pickup Complete",
87145
+ status: "success",
87146
+ value: 100
87147
+ },
87148
+ transit: {
87149
+ text: "In Transit",
87150
+ status: "active",
87151
+ value: 50
87152
+ },
87153
+ delivery: {
87154
+ text: "Delivery",
87155
+ status: "pending",
87156
+ value: 0
87157
+ },
87158
+ quality: {
87159
+ text: "Quality Check",
87160
+ status: "pending",
87161
+ value: 0
87162
+ }
87163
+ }
87164
+ }
87165
+ },
87166
+ {
87167
+ id: "25",
87168
+ number: "25",
87169
+ timerange: "5:00 PM - 6:00 PM",
87170
+ status: "cancelled",
87171
+ address: {
87172
+ nickname: "Canceled Location",
87173
+ street: "999 Cancel St",
87174
+ city: "Cancel City",
87175
+ state: "CA",
87176
+ zip: "90213"
87177
+ },
87178
+ progress: {
87179
+ currentStep: 1,
87180
+ totalSteps: 4,
87181
+ steps: {
87182
+ pickup: {
87183
+ text: "Pickup Cancelled",
87184
+ status: "error",
87185
+ value: 0
87186
+ },
87187
+ transit: {
87188
+ text: "In Transit",
87189
+ status: "pending",
87190
+ value: 0
87191
+ },
87192
+ delivery: {
87193
+ text: "Delivery",
87194
+ status: "pending",
87195
+ value: 0
87196
+ },
87197
+ quality: {
87198
+ text: "Quality Check",
87199
+ status: "pending",
87200
+ value: 0
87201
+ }
87202
+ }
87203
+ }
87204
+ },
87205
+ {
87206
+ id: "26",
87207
+ number: "26",
87208
+ timerange: "6:00 PM - 7:00 PM",
87209
+ status: "scheduled",
87210
+ address: {
87211
+ nickname: "Evening Delivery",
87212
+ street: "555 Evening Ave",
87213
+ city: "Evening City",
87214
+ state: "CA",
87215
+ zip: "90214"
87216
+ },
87217
+ progress: {
87218
+ currentStep: 1,
87219
+ totalSteps: 4,
87220
+ steps: {
87221
+ pickup: {
87222
+ text: "Pickup Scheduled",
87223
+ status: "pending",
87224
+ value: 25
87225
+ },
87226
+ transit: {
87227
+ text: "In Transit",
87228
+ status: "pending",
87229
+ value: 0
87230
+ },
87231
+ delivery: {
87232
+ text: "Delivery",
87233
+ status: "pending",
87234
+ value: 0
87235
+ },
87236
+ quality: {
87237
+ text: "Quality Check",
87238
+ status: "pending",
87239
+ value: 0
87240
+ }
87241
+ }
87242
+ }
87243
+ },
87244
+ {
87245
+ id: "27",
87246
+ number: "27",
87247
+ timerange: "7:00 PM - 8:00 PM",
87248
+ status: "in_progress",
87249
+ address: {
87250
+ nickname: "Night Shift",
87251
+ street: "777 Night St",
87252
+ city: "Night City",
87253
+ state: "CA",
87254
+ zip: "90215"
87255
+ },
87256
+ progress: {
87257
+ currentStep: 3,
87258
+ totalSteps: 4,
87259
+ steps: {
87260
+ pickup: {
87261
+ text: "Pickup Complete",
87262
+ status: "success",
87263
+ value: 100
87264
+ },
87265
+ transit: {
87266
+ text: "Transit Complete",
87267
+ status: "success",
87268
+ value: 100
87269
+ },
87270
+ delivery: {
87271
+ text: "Delivery in Progress",
87272
+ status: "active",
87273
+ value: 75
87274
+ },
87275
+ quality: {
87276
+ text: "Quality Check",
87277
+ status: "pending",
87278
+ value: 0
87279
+ }
87280
+ }
87281
+ }
87282
+ },
87283
+ {
87284
+ id: "28",
87285
+ number: "28",
87286
+ timerange: "8:00 PM - 9:00 PM",
87287
+ status: "completed",
87288
+ address: {
87289
+ nickname: "Final Delivery",
87290
+ street: "888 Final Blvd",
87291
+ city: "Final City",
87292
+ state: "CA",
87293
+ zip: "90216"
87294
+ },
87295
+ progress: {
87296
+ currentStep: 4,
87297
+ totalSteps: 4,
87298
+ steps: {
87299
+ pickup: {
87300
+ text: "Pickup Complete",
87301
+ status: "success",
87302
+ value: 100
87303
+ },
87304
+ transit: {
87305
+ text: "Transit Complete",
87306
+ status: "success",
87307
+ value: 100
87308
+ },
87309
+ delivery: {
87310
+ text: "Delivery Complete",
87311
+ status: "success",
87312
+ value: 100
87313
+ },
87314
+ quality: {
87315
+ text: "Quality Check Complete",
87316
+ status: "success",
87317
+ value: 100
87318
+ }
87319
+ }
87320
+ }
87321
+ },
87322
+ {
87323
+ id: "29",
87324
+ number: "29",
87325
+ timerange: "9:00 PM - 10:00 PM",
87326
+ status: "scheduled",
87327
+ address: {
87328
+ nickname: "Late Night",
87329
+ street: "999 Late St",
87330
+ city: "Late City",
87331
+ state: "CA",
87332
+ zip: "90217"
87333
+ },
87334
+ progress: {
87335
+ currentStep: 1,
87336
+ totalSteps: 4,
87337
+ steps: {
87338
+ pickup: {
87339
+ text: "Pickup Scheduled",
87340
+ status: "pending",
87341
+ value: 25
87342
+ },
87343
+ transit: {
87344
+ text: "In Transit",
87345
+ status: "pending",
87346
+ value: 0
87347
+ },
87348
+ delivery: {
87349
+ text: "Delivery",
87350
+ status: "pending",
87351
+ value: 0
87352
+ },
87353
+ quality: {
87354
+ text: "Quality Check",
87355
+ status: "pending",
87356
+ value: 0
87357
+ }
87358
+ }
87359
+ }
87360
+ },
87361
+ {
87362
+ id: "30",
87363
+ number: "30",
87364
+ timerange: "10:00 PM - 11:00 PM",
87365
+ status: "in_progress",
87366
+ address: {
87367
+ nickname: "Last Stop",
87368
+ street: "000 Last Ave",
87369
+ city: "Last City",
87370
+ state: "CA",
87371
+ zip: "90218"
87372
+ },
87373
+ progress: {
87374
+ currentStep: 2,
87375
+ totalSteps: 4,
87376
+ steps: {
87377
+ pickup: {
87378
+ text: "Pickup Complete",
87379
+ status: "success",
87380
+ value: 100
87381
+ },
87382
+ transit: {
87383
+ text: "In Transit",
87384
+ status: "active",
87385
+ value: 60
87386
+ },
87387
+ delivery: {
87388
+ text: "Delivery",
87389
+ status: "pending",
87390
+ value: 0
87391
+ },
87392
+ quality: {
87393
+ text: "Quality Check",
87394
+ status: "pending",
87395
+ value: 0
87396
+ }
87397
+ }
87398
+ }
87399
+ }
87400
+ ];
84769
87401
  const startCase = (string_) => {
84770
87402
  if (string_) {
84771
87403
  return string_.replaceAll(/([A-Z])/g, " $1").replace(/^./, (s) => s.toUpperCase());
@@ -84873,359 +87505,7 @@ mockColumns.map((column2) => ({
84873
87505
  ...column2
84874
87506
  }));
84875
87507
  const mockDataSource = {
84876
- appointments: [
84877
- {
84878
- id: "1",
84879
- number: "1",
84880
- timerange: "9:00 AM - 10:00 AM",
84881
- status: "in_progress",
84882
- address: {
84883
- nickname: "Home",
84884
- address: "123 Main St"
84885
- },
84886
- job_subtype: "delivery",
84887
- progress: {
84888
- firstBarData: {
84889
- text: "Loading",
84890
- status: "info",
84891
- value: 100
84892
- },
84893
- secondBarData: {
84894
- text: "Processing",
84895
- status: "success",
84896
- value: 25
84897
- }
84898
- }
84899
- },
84900
- {
84901
- id: "2",
84902
- number: "2",
84903
- timerange: "10:00 AM - 11:00 AM",
84904
- status: "scheduled",
84905
- address: {
84906
- nickname: "Work",
84907
- address: "456 Elm St"
84908
- },
84909
- job_subtype: "pickup",
84910
- progress: {
84911
- firstBarData: {
84912
- text: "Preparing",
84913
- status: "info",
84914
- value: 100
84915
- },
84916
- secondBarData: {
84917
- text: "Final Check",
84918
- status: "success",
84919
- value: 0
84920
- }
84921
- }
84922
- },
84923
- {
84924
- id: "3",
84925
- number: "3",
84926
- timerange: "11:00 AM - 12:00 PM",
84927
- status: "scheduled",
84928
- address: {
84929
- nickname: "Store",
84930
- address: "789 Oak St"
84931
- },
84932
- job_subtype: "delivery",
84933
- progress: {
84934
- firstBarData: {
84935
- text: "Pending",
84936
- status: "info",
84937
- value: 0
84938
- },
84939
- secondBarData: {
84940
- text: "Awaiting",
84941
- status: "success",
84942
- value: 0
84943
- }
84944
- }
84945
- },
84946
- {
84947
- id: "4",
84948
- number: "4",
84949
- timerange: "1:00 PM - 2:00 PM",
84950
- status: "scheduled",
84951
- address: {
84952
- nickname: "Office",
84953
- address: "321 Pine St"
84954
- },
84955
- job_subtype: "pickup",
84956
- progress: {
84957
- firstBarData: {
84958
- text: "In Progress",
84959
- status: "info",
84960
- value: 100
84961
- },
84962
- secondBarData: {
84963
- text: "Validation",
84964
- status: "success",
84965
- value: 30
84966
- }
84967
- }
84968
- },
84969
- {
84970
- id: "5",
84971
- number: "5",
84972
- timerange: "2:00 PM - 3:00 PM",
84973
- status: "scheduled",
84974
- address: {
84975
- nickname: "Library",
84976
- address: "555 Book Lane"
84977
- },
84978
- job_subtype: "delivery",
84979
- progress: {
84980
- firstBarData: {
84981
- text: "Completed",
84982
- status: "info",
84983
- value: 100
84984
- },
84985
- secondBarData: {
84986
- text: "Verified",
84987
- status: "success",
84988
- value: 100
84989
- }
84990
- }
84991
- },
84992
- {
84993
- id: "6",
84994
- number: "6",
84995
- timerange: "3:00 PM - 4:00 PM",
84996
- status: "scheduled",
84997
- address: {
84998
- nickname: "Gym",
84999
- address: "777 Fitness Ave"
85000
- },
85001
- job_subtype: "pickup",
85002
- progress: {
85003
- firstBarData: {
85004
- text: "Phase 1",
85005
- status: "info",
85006
- value: 75
85007
- },
85008
- secondBarData: {
85009
- text: "Phase 2",
85010
- status: "success",
85011
- value: 50
85012
- }
85013
- }
85014
- },
85015
- {
85016
- id: "7",
85017
- number: "7",
85018
- timerange: "4:00 PM - 5:00 PM",
85019
- status: "scheduled",
85020
- address: {
85021
- nickname: "Mall",
85022
- address: "888 Shopping Center"
85023
- },
85024
- job_subtype: "delivery",
85025
- progress: {
85026
- firstBarData: {
85027
- text: "Queued",
85028
- status: "info",
85029
- value: 0
85030
- },
85031
- secondBarData: {
85032
- text: "Waiting",
85033
- status: "success",
85034
- value: 0
85035
- }
85036
- }
85037
- },
85038
- {
85039
- id: "8",
85040
- number: "8",
85041
- timerange: "9:00 AM - 10:00 AM",
85042
- status: "completed",
85043
- address: {
85044
- nickname: "School",
85045
- address: "999 Education Rd"
85046
- },
85047
- job_subtype: "pickup",
85048
- progress: {
85049
- firstBarData: {
85050
- text: "Delivered",
85051
- status: "info",
85052
- value: 100
85053
- },
85054
- secondBarData: {
85055
- text: "Confirmed",
85056
- status: "success",
85057
- value: 100
85058
- }
85059
- }
85060
- },
85061
- {
85062
- id: "9",
85063
- number: "9",
85064
- timerange: "10:00 AM - 11:00 AM",
85065
- status: "scheduled",
85066
- address: {
85067
- nickname: "Restaurant",
85068
- address: "111 Food Court"
85069
- },
85070
- job_subtype: "delivery",
85071
- progress: {
85072
- firstBarData: {
85073
- text: "Preparing",
85074
- status: "info",
85075
- value: 100
85076
- },
85077
- secondBarData: {
85078
- text: "Quality Check",
85079
- status: "success",
85080
- value: 15
85081
- }
85082
- }
85083
- },
85084
- {
85085
- id: "10",
85086
- number: "10",
85087
- timerange: "11:00 AM - 12:00 PM",
85088
- status: "scheduled",
85089
- address: {
85090
- nickname: "Park",
85091
- address: "222 Green Ave"
85092
- },
85093
- job_subtype: "pickup",
85094
- progress: {
85095
- firstBarData: {
85096
- text: "Processing",
85097
- status: "info",
85098
- value: 80
85099
- },
85100
- secondBarData: {
85101
- text: "Review",
85102
- status: "success",
85103
- value: 0
85104
- }
85105
- }
85106
- },
85107
- {
85108
- id: "11",
85109
- number: "11",
85110
- timerange: "1:00 PM - 2:00 PM",
85111
- status: "scheduled",
85112
- address: {
85113
- nickname: "Beach",
85114
- address: "333 Shore Dr"
85115
- },
85116
- job_subtype: "delivery"
85117
- },
85118
- {
85119
- id: "12",
85120
- number: "12",
85121
- timerange: "2:00 PM - 3:00 PM",
85122
- status: "scheduled",
85123
- address: {
85124
- nickname: "Hotel",
85125
- address: "444 Stay Blvd"
85126
- },
85127
- job_subtype: "pickup"
85128
- },
85129
- {
85130
- id: "13",
85131
- number: "13",
85132
- timerange: "3:00 PM - 4:00 PM",
85133
- status: "scheduled",
85134
- address: {
85135
- nickname: "Airport",
85136
- address: "666 Flight Way"
85137
- },
85138
- job_subtype: "delivery"
85139
- },
85140
- {
85141
- id: "14",
85142
- number: "14",
85143
- timerange: "4:00 PM - 5:00 PM",
85144
- status: "cancelled",
85145
- address: {
85146
- nickname: "Stadium",
85147
- address: "777 Sports Complex"
85148
- },
85149
- job_subtype: "pickup"
85150
- },
85151
- {
85152
- id: "15",
85153
- number: "15",
85154
- timerange: "9:00 AM - 10:00 AM",
85155
- status: "scheduled",
85156
- address: {
85157
- nickname: "Theater",
85158
- address: "888 Show Ave"
85159
- },
85160
- job_subtype: "delivery"
85161
- },
85162
- {
85163
- id: "16",
85164
- number: "16",
85165
- timerange: "10:00 AM - 11:00 AM",
85166
- status: "scheduled",
85167
- address: {
85168
- nickname: "Museum",
85169
- address: "999 History Lane"
85170
- },
85171
- job_subtype: "pickup"
85172
- },
85173
- {
85174
- id: "17",
85175
- number: "17",
85176
- timerange: "11:00 AM - 12:00 PM",
85177
- status: "scheduled",
85178
- address: {
85179
- nickname: "Zoo",
85180
- address: "123 Animal Park"
85181
- },
85182
- job_subtype: "delivery"
85183
- },
85184
- {
85185
- id: "18",
85186
- number: "18",
85187
- timerange: "1:00 PM - 2:00 PM",
85188
- status: "scheduled",
85189
- address: {
85190
- nickname: "Bank",
85191
- address: "456 Money St"
85192
- },
85193
- job_subtype: "pickup"
85194
- },
85195
- {
85196
- id: "19",
85197
- number: "19",
85198
- timerange: "2:00 PM - 3:00 PM",
85199
- status: "scheduled",
85200
- address: {
85201
- nickname: "Post Office",
85202
- address: "789 Mail Road"
85203
- },
85204
- job_subtype: "delivery"
85205
- },
85206
- {
85207
- id: "20",
85208
- number: "20",
85209
- timerange: "3:00 PM - 4:00 PM",
85210
- status: "scheduled",
85211
- address: {
85212
- nickname: "Church",
85213
- address: "321 Faith Street"
85214
- },
85215
- job_subtype: "pickup"
85216
- },
85217
- {
85218
- id: "21",
85219
- number: "21",
85220
- timerange: "4:00 PM - 5:00 PM",
85221
- status: "scheduled",
85222
- address: {
85223
- nickname: "Pharmacy",
85224
- address: "654 Health Ave"
85225
- },
85226
- job_subtype: "delivery"
85227
- }
85228
- ]
87508
+ appointments: staticTableData
85229
87509
  };
85230
87510
  const tableControlsData = {
85231
87511
  primaryTableRowData: {
@@ -85271,7 +87551,7 @@ const startingUseTableConfig = {
85271
87551
  },
85272
87552
  hasSettings: true,
85273
87553
  hasFilter: true,
85274
- // Disable auto-fetch to allow external data management
87554
+ // Allow disableAutoFetch to be overridden by the config
85275
87555
  disableAutoFetch: true,
85276
87556
  dataSource: []
85277
87557
  };