elseware-ui 2.40.3 → 3.0.0
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/LICENSE +20 -20
- package/dist/index.css +124 -24
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +82 -251
- package/dist/index.d.ts +82 -251
- package/dist/index.js +630 -430
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +320 -123
- package/dist/index.mjs.map +1 -1
- package/dist/index.native.d.mts +7 -0
- package/dist/index.native.d.ts +7 -0
- package/dist/index.native.js +351 -0
- package/dist/index.native.js.map +1 -0
- package/dist/index.native.mjs +346 -0
- package/dist/index.native.mjs.map +1 -0
- package/dist/resolveGlobalConfigs-CcaOIQCE.d.mts +228 -0
- package/dist/resolveGlobalConfigs-CcaOIQCE.d.ts +228 -0
- package/package.json +32 -4
- package/tailwind.preset.js +116 -0
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React26 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var tailwindMerge = require('tailwind-merge');
|
|
6
6
|
var index_js$1 = require('react-icons/ai/index.js');
|
|
@@ -26,7 +26,7 @@ require('@mdxeditor/editor/style.css');
|
|
|
26
26
|
|
|
27
27
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
28
28
|
|
|
29
|
-
var
|
|
29
|
+
var React26__default = /*#__PURE__*/_interopDefault(React26);
|
|
30
30
|
var classNames77__default = /*#__PURE__*/_interopDefault(classNames77);
|
|
31
31
|
var ReactWorldFlags__default = /*#__PURE__*/_interopDefault(ReactWorldFlags);
|
|
32
32
|
var emojiFlags__default = /*#__PURE__*/_interopDefault(emojiFlags);
|
|
@@ -4728,7 +4728,7 @@ var init_python = __esm({
|
|
|
4728
4728
|
});
|
|
4729
4729
|
|
|
4730
4730
|
// node_modules/refractor/lang/jsx.js
|
|
4731
|
-
function
|
|
4731
|
+
function jsx218(Prism2) {
|
|
4732
4732
|
Prism2.register(javascript);
|
|
4733
4733
|
Prism2.register(markup);
|
|
4734
4734
|
(function(Prism3) {
|
|
@@ -4861,14 +4861,14 @@ var init_jsx = __esm({
|
|
|
4861
4861
|
"node_modules/refractor/lang/jsx.js"() {
|
|
4862
4862
|
init_javascript();
|
|
4863
4863
|
init_markup();
|
|
4864
|
-
|
|
4865
|
-
|
|
4864
|
+
jsx218.displayName = "jsx";
|
|
4865
|
+
jsx218.aliases = [];
|
|
4866
4866
|
}
|
|
4867
4867
|
});
|
|
4868
4868
|
|
|
4869
4869
|
// node_modules/refractor/lang/tsx.js
|
|
4870
4870
|
function tsx(Prism2) {
|
|
4871
|
-
Prism2.register(
|
|
4871
|
+
Prism2.register(jsx218);
|
|
4872
4872
|
Prism2.register(typescript);
|
|
4873
4873
|
(function(Prism3) {
|
|
4874
4874
|
var typescript2 = Prism3.util.clone(Prism3.languages.typescript);
|
|
@@ -5030,7 +5030,7 @@ var EUI_ANALYTICS_QUEUE_STORAGE_KEY = "eui.analytics.queue";
|
|
|
5030
5030
|
var DEFAULT_ANALYTICS_CONFIG = {
|
|
5031
5031
|
enabled: true,
|
|
5032
5032
|
trackPageViews: true,
|
|
5033
|
-
trackSession:
|
|
5033
|
+
trackSession: true,
|
|
5034
5034
|
flushIntervalMs: 1e4,
|
|
5035
5035
|
maxBatchSize: 20,
|
|
5036
5036
|
respectDoNotTrack: true,
|
|
@@ -5072,7 +5072,7 @@ var createDefaultConsent = (version) => ({
|
|
|
5072
5072
|
marketing: false
|
|
5073
5073
|
}
|
|
5074
5074
|
});
|
|
5075
|
-
var AnalyticsContext =
|
|
5075
|
+
var AnalyticsContext = React26.createContext(
|
|
5076
5076
|
null
|
|
5077
5077
|
);
|
|
5078
5078
|
|
|
@@ -5143,12 +5143,16 @@ var createAnalyticsEvent = ({
|
|
|
5143
5143
|
type: type2,
|
|
5144
5144
|
appId,
|
|
5145
5145
|
sessionId,
|
|
5146
|
-
anonymousId
|
|
5147
|
-
userId
|
|
5148
|
-
path:
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5146
|
+
anonymousId,
|
|
5147
|
+
userId,
|
|
5148
|
+
path: getCurrentPath(),
|
|
5149
|
+
fullUrl: getCurrentFullUrl(),
|
|
5150
|
+
referrer: getCurrentReferrer(),
|
|
5151
|
+
title: getCurrentTitle(),
|
|
5152
|
+
timestamp: getNowISOString(),
|
|
5153
|
+
viewport: getViewport(),
|
|
5154
|
+
device: getDeviceInfo(),
|
|
5155
|
+
...options,
|
|
5152
5156
|
metadata: {
|
|
5153
5157
|
...options?.metadata
|
|
5154
5158
|
}
|
|
@@ -5229,11 +5233,11 @@ var AnalyticsProvider = ({
|
|
|
5229
5233
|
...DEFAULT_ANALYTICS_CONFIG,
|
|
5230
5234
|
...config
|
|
5231
5235
|
};
|
|
5232
|
-
const defaultConsent =
|
|
5236
|
+
const defaultConsent = React26.useMemo(
|
|
5233
5237
|
() => createDefaultConsent(consentVersion),
|
|
5234
5238
|
[consentVersion]
|
|
5235
5239
|
);
|
|
5236
|
-
const [consent, setConsent] =
|
|
5240
|
+
const [consent, setConsent] = React26.useState(() => {
|
|
5237
5241
|
const storedConsent = readConsentStorage(
|
|
5238
5242
|
resolvedConfig.storageKey,
|
|
5239
5243
|
defaultConsent
|
|
@@ -5243,17 +5247,17 @@ var AnalyticsProvider = ({
|
|
|
5243
5247
|
}
|
|
5244
5248
|
return storedConsent;
|
|
5245
5249
|
});
|
|
5246
|
-
const [anonymousId, setAnonymousId] =
|
|
5250
|
+
const [anonymousId, setAnonymousId] = React26.useState(() => {
|
|
5247
5251
|
if (!consent.categories.analytics) return null;
|
|
5248
5252
|
return ensureAnonymousIdStorage();
|
|
5249
5253
|
});
|
|
5250
|
-
const sessionIdRef =
|
|
5251
|
-
const queueRef =
|
|
5254
|
+
const sessionIdRef = React26.useRef(createAnalyticsId("ses"));
|
|
5255
|
+
const queueRef = React26.useRef(
|
|
5252
5256
|
resolvedConfig.persistQueue ? readAnalyticsQueueStorage() : []
|
|
5253
5257
|
);
|
|
5254
|
-
const flushingRef =
|
|
5258
|
+
const flushingRef = React26.useRef(false);
|
|
5255
5259
|
const hasAnalyticsConsent = consent.categories.analytics;
|
|
5256
|
-
const shouldTrack =
|
|
5260
|
+
const shouldTrack = React26.useCallback(() => {
|
|
5257
5261
|
if (!resolvedConfig.enabled) return false;
|
|
5258
5262
|
if (!hasAnalyticsConsent) return false;
|
|
5259
5263
|
if (resolvedConfig.respectDoNotTrack && getDoNotTrackEnabled()) {
|
|
@@ -5265,17 +5269,17 @@ var AnalyticsProvider = ({
|
|
|
5265
5269
|
resolvedConfig.enabled,
|
|
5266
5270
|
resolvedConfig.respectDoNotTrack
|
|
5267
5271
|
]);
|
|
5268
|
-
const persistQueue =
|
|
5272
|
+
const persistQueue = React26.useCallback(() => {
|
|
5269
5273
|
if (!resolvedConfig.persistQueue) return;
|
|
5270
5274
|
writeAnalyticsQueueStorage(queueRef.current);
|
|
5271
5275
|
}, [resolvedConfig.persistQueue]);
|
|
5272
|
-
const clearQueue =
|
|
5276
|
+
const clearQueue = React26.useCallback(() => {
|
|
5273
5277
|
queueRef.current = [];
|
|
5274
5278
|
if (resolvedConfig.persistQueue) {
|
|
5275
5279
|
clearAnalyticsQueueStorage();
|
|
5276
5280
|
}
|
|
5277
5281
|
}, [resolvedConfig.persistQueue]);
|
|
5278
|
-
const flush =
|
|
5282
|
+
const flush = React26.useCallback(async () => {
|
|
5279
5283
|
if (!transport || flushingRef.current) return;
|
|
5280
5284
|
if (!shouldTrack()) return;
|
|
5281
5285
|
if (queueRef.current.length === 0) return;
|
|
@@ -5293,7 +5297,7 @@ var AnalyticsProvider = ({
|
|
|
5293
5297
|
flushingRef.current = false;
|
|
5294
5298
|
}
|
|
5295
5299
|
}, [persistQueue, resolvedConfig.debug, shouldTrack, transport]);
|
|
5296
|
-
const track =
|
|
5300
|
+
const track = React26.useCallback(
|
|
5297
5301
|
async (type2, options) => {
|
|
5298
5302
|
if (!shouldTrack()) return;
|
|
5299
5303
|
const resolvedAnonymousId = anonymousId ?? ensureAnonymousIdStorage();
|
|
@@ -5326,7 +5330,7 @@ var AnalyticsProvider = ({
|
|
|
5326
5330
|
userId
|
|
5327
5331
|
]
|
|
5328
5332
|
);
|
|
5329
|
-
const applyConsent =
|
|
5333
|
+
const applyConsent = React26.useCallback(
|
|
5330
5334
|
(nextConsent) => {
|
|
5331
5335
|
setConsent(nextConsent);
|
|
5332
5336
|
writeConsentStorage(resolvedConfig.storageKey, nextConsent);
|
|
@@ -5341,7 +5345,7 @@ var AnalyticsProvider = ({
|
|
|
5341
5345
|
},
|
|
5342
5346
|
[clearQueue, onConsentChange, resolvedConfig.storageKey]
|
|
5343
5347
|
);
|
|
5344
|
-
const acceptAll =
|
|
5348
|
+
const acceptAll = React26.useCallback(() => {
|
|
5345
5349
|
applyConsent({
|
|
5346
5350
|
status: "accepted",
|
|
5347
5351
|
version: consentVersion,
|
|
@@ -5354,7 +5358,7 @@ var AnalyticsProvider = ({
|
|
|
5354
5358
|
}
|
|
5355
5359
|
});
|
|
5356
5360
|
}, [applyConsent, consentVersion]);
|
|
5357
|
-
const rejectAll =
|
|
5361
|
+
const rejectAll = React26.useCallback(() => {
|
|
5358
5362
|
applyConsent({
|
|
5359
5363
|
status: "rejected",
|
|
5360
5364
|
version: consentVersion,
|
|
@@ -5367,7 +5371,7 @@ var AnalyticsProvider = ({
|
|
|
5367
5371
|
}
|
|
5368
5372
|
});
|
|
5369
5373
|
}, [applyConsent, consentVersion]);
|
|
5370
|
-
const updateConsent =
|
|
5374
|
+
const updateConsent = React26.useCallback(
|
|
5371
5375
|
(categories) => {
|
|
5372
5376
|
const nextCategories = {
|
|
5373
5377
|
...consent.categories,
|
|
@@ -5383,14 +5387,14 @@ var AnalyticsProvider = ({
|
|
|
5383
5387
|
},
|
|
5384
5388
|
[applyConsent, consent.categories, consentVersion]
|
|
5385
5389
|
);
|
|
5386
|
-
const resetConsent =
|
|
5390
|
+
const resetConsent = React26.useCallback(() => {
|
|
5387
5391
|
setConsent(defaultConsent);
|
|
5388
5392
|
clearConsentStorage(resolvedConfig.storageKey);
|
|
5389
5393
|
clearAnonymousIdStorage();
|
|
5390
5394
|
clearQueue();
|
|
5391
5395
|
setAnonymousId(null);
|
|
5392
5396
|
}, [clearQueue, defaultConsent, resolvedConfig.storageKey]);
|
|
5393
|
-
|
|
5397
|
+
React26.useEffect(() => {
|
|
5394
5398
|
if (!isBrowser()) return;
|
|
5395
5399
|
const interval2 = window.setInterval(() => {
|
|
5396
5400
|
flush();
|
|
@@ -5399,7 +5403,7 @@ var AnalyticsProvider = ({
|
|
|
5399
5403
|
window.clearInterval(interval2);
|
|
5400
5404
|
};
|
|
5401
5405
|
}, [flush, resolvedConfig.flushIntervalMs]);
|
|
5402
|
-
|
|
5406
|
+
React26.useEffect(() => {
|
|
5403
5407
|
if (!isBrowser()) return;
|
|
5404
5408
|
const handleVisibilityChange = () => {
|
|
5405
5409
|
if (document.visibilityState !== "hidden") return;
|
|
@@ -5423,7 +5427,7 @@ var AnalyticsProvider = ({
|
|
|
5423
5427
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
5424
5428
|
};
|
|
5425
5429
|
}, [flush, persistQueue, shouldTrack, transport]);
|
|
5426
|
-
const value =
|
|
5430
|
+
const value = React26.useMemo(
|
|
5427
5431
|
() => ({
|
|
5428
5432
|
appId,
|
|
5429
5433
|
consent,
|
|
@@ -5986,9 +5990,9 @@ function ConfigBootstrap({
|
|
|
5986
5990
|
loadingFallback = null,
|
|
5987
5991
|
showStack = false
|
|
5988
5992
|
}) {
|
|
5989
|
-
const [RootApp, setRootApp] =
|
|
5990
|
-
const [loadError, setLoadError] =
|
|
5991
|
-
|
|
5993
|
+
const [RootApp, setRootApp] = React26.useState(null);
|
|
5994
|
+
const [loadError, setLoadError] = React26.useState(null);
|
|
5995
|
+
React26.useEffect(() => {
|
|
5992
5996
|
if (!config.isValid) {
|
|
5993
5997
|
return;
|
|
5994
5998
|
}
|
|
@@ -6029,16 +6033,16 @@ function ConfigBootstrap({
|
|
|
6029
6033
|
return /* @__PURE__ */ jsxRuntime.jsx(RootApp, {});
|
|
6030
6034
|
}
|
|
6031
6035
|
var ConfigBootstrap_default = ConfigBootstrap;
|
|
6032
|
-
var EUIContext =
|
|
6036
|
+
var EUIContext = React26.createContext(null);
|
|
6033
6037
|
var EUIProvider = ({
|
|
6034
6038
|
config,
|
|
6035
6039
|
children: children3
|
|
6036
6040
|
}) => {
|
|
6037
|
-
const [state, setState] =
|
|
6041
|
+
const [state, setState] = React26.useState(config);
|
|
6038
6042
|
return /* @__PURE__ */ jsxRuntime.jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children: children3 });
|
|
6039
6043
|
};
|
|
6040
6044
|
var useEUIConfig = () => {
|
|
6041
|
-
const ctx =
|
|
6045
|
+
const ctx = React26.useContext(EUIContext);
|
|
6042
6046
|
if (!ctx) {
|
|
6043
6047
|
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
6044
6048
|
}
|
|
@@ -6054,6 +6058,31 @@ function resolveWithGlobal(config, props, defaults) {
|
|
|
6054
6058
|
};
|
|
6055
6059
|
}
|
|
6056
6060
|
|
|
6061
|
+
// src/components/data-entry/button/base/Button.config.ts
|
|
6062
|
+
var buttonModeAppearance = {
|
|
6063
|
+
contained: "solid",
|
|
6064
|
+
"contained-tonal": "lite",
|
|
6065
|
+
outlined: "ghost",
|
|
6066
|
+
text: "ghost"
|
|
6067
|
+
};
|
|
6068
|
+
function useResolvedButtonConfig({
|
|
6069
|
+
compact = false,
|
|
6070
|
+
mode,
|
|
6071
|
+
variant,
|
|
6072
|
+
appearance,
|
|
6073
|
+
shape,
|
|
6074
|
+
size
|
|
6075
|
+
}) {
|
|
6076
|
+
const eui = useEUIConfig();
|
|
6077
|
+
const configuredSize = size ?? eui?.config?.global?.size ?? "md";
|
|
6078
|
+
return {
|
|
6079
|
+
shape: shape ?? eui?.config?.global?.shape ?? "square",
|
|
6080
|
+
size: compact && configuredSize === "md" ? "sm" : configuredSize,
|
|
6081
|
+
variant: variant ?? eui?.config?.global?.variant ?? "success",
|
|
6082
|
+
appearance: appearance ?? (mode ? buttonModeAppearance[mode] : "solid")
|
|
6083
|
+
};
|
|
6084
|
+
}
|
|
6085
|
+
|
|
6057
6086
|
// src/data/enums.ts
|
|
6058
6087
|
var Shape = /* @__PURE__ */ ((Shape2) => {
|
|
6059
6088
|
Shape2["circle"] = "circle";
|
|
@@ -6229,7 +6258,31 @@ var toastShapeStyles = {
|
|
|
6229
6258
|
["softRoundedSquare" /* softRoundedSquare */]: "!rounded-3xl",
|
|
6230
6259
|
["square" /* square */]: "!rounded-none"
|
|
6231
6260
|
};
|
|
6232
|
-
|
|
6261
|
+
|
|
6262
|
+
// src/components/data-entry/button/base/Button.styles.ts
|
|
6263
|
+
var buttonShapes = shapes;
|
|
6264
|
+
var buttonIconSizes = {
|
|
6265
|
+
xs: 14,
|
|
6266
|
+
sm: 16,
|
|
6267
|
+
md: 18,
|
|
6268
|
+
lg: 20,
|
|
6269
|
+
xl: 22
|
|
6270
|
+
};
|
|
6271
|
+
function resolveButtonVariantStyles({
|
|
6272
|
+
appearance,
|
|
6273
|
+
variant
|
|
6274
|
+
}) {
|
|
6275
|
+
return resolveAppearanceStyles({
|
|
6276
|
+
appearance,
|
|
6277
|
+
variant,
|
|
6278
|
+
solid: variantsSolid,
|
|
6279
|
+
lite: variantsLite,
|
|
6280
|
+
ghost: variantsGhost
|
|
6281
|
+
});
|
|
6282
|
+
}
|
|
6283
|
+
|
|
6284
|
+
// src/components/data-entry/button/web/Button.web.styles.ts
|
|
6285
|
+
var webButtonSizes = {
|
|
6233
6286
|
xs: "px-2 py-1 text-xs",
|
|
6234
6287
|
sm: "px-3 py-1.5 text-sm",
|
|
6235
6288
|
md: "px-4 py-2 text-base",
|
|
@@ -6244,24 +6297,54 @@ function Button({
|
|
|
6244
6297
|
loading = false,
|
|
6245
6298
|
disabled = false,
|
|
6246
6299
|
block = false,
|
|
6247
|
-
|
|
6248
|
-
|
|
6300
|
+
compact = false,
|
|
6301
|
+
mode,
|
|
6302
|
+
buttonColor,
|
|
6303
|
+
textColor,
|
|
6304
|
+
contentClassName,
|
|
6305
|
+
labelClassName,
|
|
6306
|
+
variant,
|
|
6307
|
+
appearance,
|
|
6249
6308
|
shape,
|
|
6250
|
-
size
|
|
6309
|
+
size,
|
|
6310
|
+
style: style2,
|
|
6311
|
+
contentStyle,
|
|
6312
|
+
labelStyle,
|
|
6313
|
+
accessibilityLabel,
|
|
6314
|
+
accessibilityRole,
|
|
6315
|
+
accessibilityState,
|
|
6316
|
+
testID,
|
|
6251
6317
|
className,
|
|
6252
6318
|
onMouseMove,
|
|
6319
|
+
onClick,
|
|
6320
|
+
onPress,
|
|
6253
6321
|
...rest
|
|
6254
6322
|
}) {
|
|
6255
|
-
const
|
|
6256
|
-
const
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6323
|
+
const accessibility = accessibilityState;
|
|
6324
|
+
const {
|
|
6325
|
+
shape: resolvedShape,
|
|
6326
|
+
size: resolvedSize,
|
|
6327
|
+
variant: resolvedVariant,
|
|
6328
|
+
appearance: resolvedAppearance
|
|
6329
|
+
} = useResolvedButtonConfig({
|
|
6330
|
+
compact,
|
|
6331
|
+
mode,
|
|
6260
6332
|
variant,
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6333
|
+
appearance,
|
|
6334
|
+
shape,
|
|
6335
|
+
size
|
|
6264
6336
|
});
|
|
6337
|
+
const btnRef = React26.useRef(null);
|
|
6338
|
+
const variantStyles = resolveButtonVariantStyles({
|
|
6339
|
+
appearance: resolvedAppearance,
|
|
6340
|
+
variant: resolvedVariant
|
|
6341
|
+
});
|
|
6342
|
+
const iconSize = buttonIconSizes[resolvedSize];
|
|
6343
|
+
const labelContent = text10 || children3;
|
|
6344
|
+
const resolvedIcon = typeof icon === "function" ? icon({
|
|
6345
|
+
color: textColor ?? "currentColor",
|
|
6346
|
+
size: iconSize
|
|
6347
|
+
}) : icon;
|
|
6265
6348
|
const handleMouseMove = (e) => {
|
|
6266
6349
|
const btn = btnRef.current;
|
|
6267
6350
|
if (!btn) return;
|
|
@@ -6272,6 +6355,12 @@ function Button({
|
|
|
6272
6355
|
btn.style.setProperty("--glow-y", `${y3}px`);
|
|
6273
6356
|
onMouseMove?.(e);
|
|
6274
6357
|
};
|
|
6358
|
+
const handleClick = (e) => {
|
|
6359
|
+
onClick?.(e);
|
|
6360
|
+
if (!e.defaultPrevented) {
|
|
6361
|
+
onPress?.();
|
|
6362
|
+
}
|
|
6363
|
+
};
|
|
6275
6364
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6276
6365
|
"button",
|
|
6277
6366
|
{
|
|
@@ -6279,13 +6368,25 @@ function Button({
|
|
|
6279
6368
|
ref: btnRef,
|
|
6280
6369
|
type: type2,
|
|
6281
6370
|
disabled: disabled || loading,
|
|
6371
|
+
onClick: handleClick,
|
|
6282
6372
|
onMouseMove: handleMouseMove,
|
|
6373
|
+
"aria-disabled": disabled || loading,
|
|
6374
|
+
"aria-label": accessibilityLabel,
|
|
6375
|
+
"aria-pressed": accessibility?.selected === void 0 ? void 0 : Boolean(accessibility.selected),
|
|
6376
|
+
"data-testid": testID,
|
|
6377
|
+
role: accessibilityRole,
|
|
6378
|
+
style: {
|
|
6379
|
+
background: buttonColor,
|
|
6380
|
+
color: textColor,
|
|
6381
|
+
...style2
|
|
6382
|
+
},
|
|
6283
6383
|
className: cn(
|
|
6284
6384
|
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
6285
6385
|
variantStyles,
|
|
6286
|
-
|
|
6287
|
-
|
|
6386
|
+
buttonShapes[resolvedShape],
|
|
6387
|
+
webButtonSizes[resolvedSize],
|
|
6288
6388
|
block && "w-full",
|
|
6389
|
+
mode === "text" && "border-transparent bg-transparent",
|
|
6289
6390
|
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
6290
6391
|
!loading && !disabled && "hover:cursor-pointer",
|
|
6291
6392
|
className
|
|
@@ -6307,14 +6408,41 @@ function Button({
|
|
|
6307
6408
|
}
|
|
6308
6409
|
),
|
|
6309
6410
|
loading && /* @__PURE__ */ jsxRuntime.jsx(index_js$1.AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6411
|
+
resolvedIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6412
|
+
"span",
|
|
6413
|
+
{
|
|
6414
|
+
className: cn(
|
|
6415
|
+
"z-10 inline-flex shrink-0 items-center justify-center leading-none",
|
|
6416
|
+
contentClassName
|
|
6417
|
+
),
|
|
6418
|
+
style: {
|
|
6419
|
+
height: iconSize,
|
|
6420
|
+
lineHeight: 0,
|
|
6421
|
+
width: iconSize,
|
|
6422
|
+
...contentStyle
|
|
6423
|
+
},
|
|
6424
|
+
children: resolvedIcon
|
|
6425
|
+
}
|
|
6426
|
+
),
|
|
6427
|
+
labelContent && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6428
|
+
"span",
|
|
6429
|
+
{
|
|
6430
|
+
className: cn(
|
|
6431
|
+
"z-10 inline-flex items-center justify-center leading-none",
|
|
6432
|
+
labelClassName
|
|
6433
|
+
),
|
|
6434
|
+
style: {
|
|
6435
|
+
minHeight: iconSize,
|
|
6436
|
+
...labelStyle
|
|
6437
|
+
},
|
|
6438
|
+
children: labelContent
|
|
6439
|
+
}
|
|
6440
|
+
)
|
|
6313
6441
|
]
|
|
6314
6442
|
}
|
|
6315
6443
|
);
|
|
6316
6444
|
}
|
|
6317
|
-
var
|
|
6445
|
+
var Button_web_default = Button;
|
|
6318
6446
|
var Backdrop = ({ children: children3, styles }) => {
|
|
6319
6447
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6320
6448
|
"div",
|
|
@@ -6599,17 +6727,17 @@ function useToastTimer({
|
|
|
6599
6727
|
pauseOnHover,
|
|
6600
6728
|
onTimeout
|
|
6601
6729
|
}) {
|
|
6602
|
-
const [isPaused, setIsPaused] =
|
|
6603
|
-
const timeoutRef =
|
|
6604
|
-
const startedAtRef =
|
|
6605
|
-
const remainingRef =
|
|
6606
|
-
const clearTimer =
|
|
6730
|
+
const [isPaused, setIsPaused] = React26.useState(false);
|
|
6731
|
+
const timeoutRef = React26.useRef(null);
|
|
6732
|
+
const startedAtRef = React26.useRef(0);
|
|
6733
|
+
const remainingRef = React26.useRef(typeof duration === "number" ? duration : 0);
|
|
6734
|
+
const clearTimer = React26.useCallback(() => {
|
|
6607
6735
|
if (timeoutRef.current !== null) {
|
|
6608
6736
|
window.clearTimeout(timeoutRef.current);
|
|
6609
6737
|
timeoutRef.current = null;
|
|
6610
6738
|
}
|
|
6611
6739
|
}, []);
|
|
6612
|
-
const startTimer =
|
|
6740
|
+
const startTimer = React26.useCallback(() => {
|
|
6613
6741
|
if (typeof duration !== "number" || duration <= 0) {
|
|
6614
6742
|
return;
|
|
6615
6743
|
}
|
|
@@ -6619,12 +6747,12 @@ function useToastTimer({
|
|
|
6619
6747
|
onTimeout();
|
|
6620
6748
|
}, remainingRef.current);
|
|
6621
6749
|
}, [clearTimer, duration, onTimeout]);
|
|
6622
|
-
|
|
6750
|
+
React26.useEffect(() => {
|
|
6623
6751
|
remainingRef.current = typeof duration === "number" ? duration : 0;
|
|
6624
6752
|
startTimer();
|
|
6625
6753
|
return clearTimer;
|
|
6626
6754
|
}, [clearTimer, duration, startTimer]);
|
|
6627
|
-
const pauseTimer =
|
|
6755
|
+
const pauseTimer = React26.useCallback(() => {
|
|
6628
6756
|
if (!pauseOnHover || typeof duration !== "number") {
|
|
6629
6757
|
return;
|
|
6630
6758
|
}
|
|
@@ -6635,14 +6763,14 @@ function useToastTimer({
|
|
|
6635
6763
|
);
|
|
6636
6764
|
setIsPaused(true);
|
|
6637
6765
|
}, [clearTimer, duration, pauseOnHover]);
|
|
6638
|
-
const resumeTimer =
|
|
6766
|
+
const resumeTimer = React26.useCallback(() => {
|
|
6639
6767
|
if (!pauseOnHover || typeof duration !== "number") {
|
|
6640
6768
|
return;
|
|
6641
6769
|
}
|
|
6642
6770
|
setIsPaused(false);
|
|
6643
6771
|
startTimer();
|
|
6644
6772
|
}, [duration, pauseOnHover, startTimer]);
|
|
6645
|
-
const progressStyle =
|
|
6773
|
+
const progressStyle = React26.useMemo(() => {
|
|
6646
6774
|
if (typeof duration !== "number") {
|
|
6647
6775
|
return void 0;
|
|
6648
6776
|
}
|
|
@@ -6683,7 +6811,7 @@ function ToastItem({
|
|
|
6683
6811
|
const duration = item.duration ?? autoClose;
|
|
6684
6812
|
const variant = toastStatusVariantMap[item.status];
|
|
6685
6813
|
const statusStyles = toastVariantStyles[variant];
|
|
6686
|
-
const dismiss =
|
|
6814
|
+
const dismiss = React26.useCallback(() => {
|
|
6687
6815
|
toastStore.remove(item.id);
|
|
6688
6816
|
}, [item.id]);
|
|
6689
6817
|
const { pauseTimer, resumeTimer, progressStyle } = useToastTimer({
|
|
@@ -6762,16 +6890,16 @@ var Toast = ({
|
|
|
6762
6890
|
...rest
|
|
6763
6891
|
}) => {
|
|
6764
6892
|
const eui = useEUIConfig();
|
|
6765
|
-
const [items, setItems] =
|
|
6893
|
+
const [items, setItems] = React26.useState(() => {
|
|
6766
6894
|
return toastStore.getSnapshot();
|
|
6767
6895
|
});
|
|
6768
|
-
|
|
6896
|
+
React26.useEffect(() => {
|
|
6769
6897
|
return toastStore.subscribe(setItems);
|
|
6770
6898
|
}, []);
|
|
6771
|
-
const safeShape =
|
|
6899
|
+
const safeShape = React26.useMemo(() => {
|
|
6772
6900
|
return normalizeToastShape(shape ?? eui?.config?.global?.shape);
|
|
6773
6901
|
}, [shape, eui?.config?.global?.shape]);
|
|
6774
|
-
const visibleItems =
|
|
6902
|
+
const visibleItems = React26.useMemo(() => {
|
|
6775
6903
|
const orderedItems = newestOnTop ? [...items].reverse() : [...items];
|
|
6776
6904
|
return orderedItems.slice(0, maxToasts);
|
|
6777
6905
|
}, [items, maxToasts, newestOnTop]);
|
|
@@ -6851,12 +6979,12 @@ function sendToast(data = {}) {
|
|
|
6851
6979
|
});
|
|
6852
6980
|
}
|
|
6853
6981
|
function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
6854
|
-
const [mounted, setMounted] =
|
|
6855
|
-
const [active, setActive] =
|
|
6856
|
-
const isInitialRenderRef =
|
|
6857
|
-
const frameOneRef =
|
|
6858
|
-
const frameTwoRef =
|
|
6859
|
-
const timeoutRef =
|
|
6982
|
+
const [mounted, setMounted] = React26.useState(Boolean(visibility));
|
|
6983
|
+
const [active, setActive] = React26.useState(Boolean(visibility));
|
|
6984
|
+
const isInitialRenderRef = React26.useRef(true);
|
|
6985
|
+
const frameOneRef = React26.useRef(null);
|
|
6986
|
+
const frameTwoRef = React26.useRef(null);
|
|
6987
|
+
const timeoutRef = React26.useRef(null);
|
|
6860
6988
|
const clearTimers = () => {
|
|
6861
6989
|
if (frameOneRef.current) {
|
|
6862
6990
|
cancelAnimationFrame(frameOneRef.current);
|
|
@@ -6871,7 +6999,7 @@ function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
|
6871
6999
|
timeoutRef.current = null;
|
|
6872
7000
|
}
|
|
6873
7001
|
};
|
|
6874
|
-
|
|
7002
|
+
React26.useEffect(() => {
|
|
6875
7003
|
clearTimers();
|
|
6876
7004
|
if (isInitialRenderRef.current) {
|
|
6877
7005
|
isInitialRenderRef.current = false;
|
|
@@ -6899,16 +7027,16 @@ function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
|
6899
7027
|
};
|
|
6900
7028
|
}
|
|
6901
7029
|
function renderTransitionChild(children3, className) {
|
|
6902
|
-
const childCount =
|
|
7030
|
+
const childCount = React26.Children.count(children3);
|
|
6903
7031
|
if (childCount !== 1) {
|
|
6904
7032
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: children3 });
|
|
6905
7033
|
}
|
|
6906
|
-
const child =
|
|
6907
|
-
if (!
|
|
7034
|
+
const child = React26.Children.only(children3);
|
|
7035
|
+
if (!React26__default.default.isValidElement(child)) {
|
|
6908
7036
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: child });
|
|
6909
7037
|
}
|
|
6910
7038
|
const element7 = child;
|
|
6911
|
-
return
|
|
7039
|
+
return React26__default.default.cloneElement(element7, {
|
|
6912
7040
|
className: classNames77__default.default(element7.props.className, className)
|
|
6913
7041
|
});
|
|
6914
7042
|
}
|
|
@@ -7127,7 +7255,7 @@ var toggleType = (visibility) => {
|
|
|
7127
7255
|
var PasswordVisibilityToggler = ({
|
|
7128
7256
|
onClick
|
|
7129
7257
|
}) => {
|
|
7130
|
-
const [passwordVisibility, setPasswordVisibilty] =
|
|
7258
|
+
const [passwordVisibility, setPasswordVisibilty] = React26.useState(false);
|
|
7131
7259
|
const handleOnClick = (visibility) => {
|
|
7132
7260
|
onClick(visibility);
|
|
7133
7261
|
setPasswordVisibilty(visibility);
|
|
@@ -7152,7 +7280,7 @@ var Input = ({
|
|
|
7152
7280
|
const eui = useEUIConfig();
|
|
7153
7281
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
7154
7282
|
const [field, meta] = formik.useField(props);
|
|
7155
|
-
const [passwordVisibility, setPasswordVisibilty] =
|
|
7283
|
+
const [passwordVisibility, setPasswordVisibilty] = React26.useState(false);
|
|
7156
7284
|
const inputType = type2 === "password" ? toggleType(passwordVisibility) : type2;
|
|
7157
7285
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full", children: [
|
|
7158
7286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7197,7 +7325,7 @@ var InputFile = ({
|
|
|
7197
7325
|
styles,
|
|
7198
7326
|
...props
|
|
7199
7327
|
}) => {
|
|
7200
|
-
const fileInputRef =
|
|
7328
|
+
const fileInputRef = React26.useRef(null);
|
|
7201
7329
|
const [field, meta, helpers] = formik.useField(props);
|
|
7202
7330
|
const handleFileChange = (e) => {
|
|
7203
7331
|
const file = e.target.files?.[0] || null;
|
|
@@ -7725,8 +7853,8 @@ var DateSelector = ({
|
|
|
7725
7853
|
};
|
|
7726
7854
|
var DateSelector_default = DateSelector;
|
|
7727
7855
|
var FormObserver = ({ formik, onChange }) => {
|
|
7728
|
-
const prevValuesRef =
|
|
7729
|
-
|
|
7856
|
+
const prevValuesRef = React26.useRef(formik.values);
|
|
7857
|
+
React26.useEffect(() => {
|
|
7730
7858
|
if (!onChange) return;
|
|
7731
7859
|
const currentValues = formik.values;
|
|
7732
7860
|
const prevValues = prevValuesRef.current;
|
|
@@ -7745,7 +7873,7 @@ var FormObserver = ({ formik, onChange }) => {
|
|
|
7745
7873
|
};
|
|
7746
7874
|
var FormObserver_default = FormObserver;
|
|
7747
7875
|
var DirtyObserver = ({ formik, onDirtyChange }) => {
|
|
7748
|
-
|
|
7876
|
+
React26.useEffect(() => {
|
|
7749
7877
|
if (onDirtyChange) {
|
|
7750
7878
|
onDirtyChange(formik.dirty);
|
|
7751
7879
|
}
|
|
@@ -7754,7 +7882,7 @@ var DirtyObserver = ({ formik, onDirtyChange }) => {
|
|
|
7754
7882
|
};
|
|
7755
7883
|
var DirtyObserver_default = DirtyObserver;
|
|
7756
7884
|
var UnsavedChangesGuard = ({ formik, enabled }) => {
|
|
7757
|
-
|
|
7885
|
+
React26.useEffect(() => {
|
|
7758
7886
|
if (!enabled) return;
|
|
7759
7887
|
const handleBeforeUnload = (e) => {
|
|
7760
7888
|
if (!formik.dirty) return;
|
|
@@ -7798,7 +7926,7 @@ var Form = ({
|
|
|
7798
7926
|
}
|
|
7799
7927
|
);
|
|
7800
7928
|
};
|
|
7801
|
-
var
|
|
7929
|
+
var sizes = {
|
|
7802
7930
|
xs: "px-2 py-1 text-xs",
|
|
7803
7931
|
sm: "px-3 py-2 text-sm",
|
|
7804
7932
|
md: "px-4 py-2 text-base",
|
|
@@ -7819,7 +7947,7 @@ function FormResponse({
|
|
|
7819
7947
|
"font-poppins font-light text-sm": true,
|
|
7820
7948
|
[`${variantsLite[variant]}`]: variant,
|
|
7821
7949
|
[`${shapes[shape]}`]: shape,
|
|
7822
|
-
[`${
|
|
7950
|
+
[`${sizes[size]}`]: size,
|
|
7823
7951
|
[`${styles}`]: styles
|
|
7824
7952
|
}),
|
|
7825
7953
|
children: text10
|
|
@@ -7840,7 +7968,7 @@ function ImageView({ imageUrl, secure = true, alt = "image" }) {
|
|
|
7840
7968
|
) }) });
|
|
7841
7969
|
}
|
|
7842
7970
|
var ImageView_default = ImageView;
|
|
7843
|
-
var ImageInput =
|
|
7971
|
+
var ImageInput = React26.forwardRef(
|
|
7844
7972
|
({
|
|
7845
7973
|
title = "Upload Image",
|
|
7846
7974
|
uploadDir = "eg-frontend-admin-temp",
|
|
@@ -7852,10 +7980,10 @@ var ImageInput = React25.forwardRef(
|
|
|
7852
7980
|
const [field, meta, helpers] = formik.useField(props);
|
|
7853
7981
|
const { value: imageUrl } = field;
|
|
7854
7982
|
const { setValue } = helpers;
|
|
7855
|
-
const [image3, setImage] =
|
|
7856
|
-
const [url, setUrl] =
|
|
7857
|
-
const [loading, setLoading] =
|
|
7858
|
-
const [preview, setPreview] =
|
|
7983
|
+
const [image3, setImage] = React26.useState(null);
|
|
7984
|
+
const [url, setUrl] = React26.useState(imageUrl);
|
|
7985
|
+
const [loading, setLoading] = React26.useState(false);
|
|
7986
|
+
const [preview, setPreview] = React26.useState(null);
|
|
7859
7987
|
const uploadImage = async () => {
|
|
7860
7988
|
if (!image3) return;
|
|
7861
7989
|
setLoading(true);
|
|
@@ -7901,10 +8029,10 @@ var ImageInput = React25.forwardRef(
|
|
|
7901
8029
|
if (!disableSetValue) setValue("");
|
|
7902
8030
|
setLoading(false);
|
|
7903
8031
|
};
|
|
7904
|
-
|
|
8032
|
+
React26.useImperativeHandle(ref, () => ({
|
|
7905
8033
|
handleResetClick
|
|
7906
8034
|
}));
|
|
7907
|
-
|
|
8035
|
+
React26.useEffect(() => {
|
|
7908
8036
|
if (!disableSetValue) setValue(url);
|
|
7909
8037
|
}, [url, setValue, disableSetValue]);
|
|
7910
8038
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
@@ -7989,14 +8117,14 @@ function MultiImageInput({
|
|
|
7989
8117
|
const [field, meta, helpers] = formik.useField(props);
|
|
7990
8118
|
const { value: imageUrls } = field;
|
|
7991
8119
|
const { setValue } = helpers;
|
|
7992
|
-
const imageInputRef =
|
|
8120
|
+
const imageInputRef = React26.useRef(null);
|
|
7993
8121
|
const onValueChanged = (url) => {
|
|
7994
8122
|
setValue([...imageUrls, url]);
|
|
7995
8123
|
if (imageInputRef.current) {
|
|
7996
8124
|
imageInputRef.current.handleResetClick();
|
|
7997
8125
|
}
|
|
7998
8126
|
};
|
|
7999
|
-
|
|
8127
|
+
React26.useEffect(() => {
|
|
8000
8128
|
}, [imageUrls]);
|
|
8001
8129
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
8002
8130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap gap-5 w-ful", children: [
|
|
@@ -8096,9 +8224,9 @@ function StarRatingInput({
|
|
|
8096
8224
|
const { name: name2 } = props;
|
|
8097
8225
|
const [field, meta] = formik.useField(props);
|
|
8098
8226
|
const formikContext = formik.useFormikContext();
|
|
8099
|
-
const [rating, setRating] =
|
|
8100
|
-
const [hover, setHover] =
|
|
8101
|
-
|
|
8227
|
+
const [rating, setRating] = React26.useState(Number(field.value) || 0);
|
|
8228
|
+
const [hover, setHover] = React26.useState(null);
|
|
8229
|
+
React26.useEffect(() => {
|
|
8102
8230
|
setRating(Number(field.value));
|
|
8103
8231
|
}, [field.value]);
|
|
8104
8232
|
const handleOnClick = (index3) => {
|
|
@@ -8247,7 +8375,7 @@ function Tags({
|
|
|
8247
8375
|
...props
|
|
8248
8376
|
}) {
|
|
8249
8377
|
const [field, meta, helpers] = formik.useField({ ...props });
|
|
8250
|
-
const [input, setInput] =
|
|
8378
|
+
const [input, setInput] = React26.useState("");
|
|
8251
8379
|
const handleAddTag = () => {
|
|
8252
8380
|
const trimmed = input.trim();
|
|
8253
8381
|
if (trimmed && !field.value.includes(trimmed) && field.value.length < limit) {
|
|
@@ -8458,7 +8586,7 @@ var Breadcrumb = ({
|
|
|
8458
8586
|
const { config } = useEUIConfig();
|
|
8459
8587
|
const pathname = currentPath || (typeof window !== "undefined" ? window.location.pathname : "/");
|
|
8460
8588
|
const resolvedRoutes = routes || config?.routes || [];
|
|
8461
|
-
const resolvedData =
|
|
8589
|
+
const resolvedData = React26.useMemo(() => {
|
|
8462
8590
|
if (resolvedRoutes && resolvedRoutes.length > 0) {
|
|
8463
8591
|
return buildFromRoutes(resolvedRoutes, pathname);
|
|
8464
8592
|
}
|
|
@@ -8475,7 +8603,7 @@ var Breadcrumb = ({
|
|
|
8475
8603
|
navigate(item.href);
|
|
8476
8604
|
}
|
|
8477
8605
|
};
|
|
8478
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8606
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
|
|
8479
8607
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8480
8608
|
BreadcrumbItem_default,
|
|
8481
8609
|
{
|
|
@@ -8511,8 +8639,8 @@ var Breadcrumb = ({
|
|
|
8511
8639
|
);
|
|
8512
8640
|
};
|
|
8513
8641
|
var useIsMobile = (breakpoint = 768) => {
|
|
8514
|
-
const [isMobile, setIsMobile] =
|
|
8515
|
-
|
|
8642
|
+
const [isMobile, setIsMobile] = React26.useState(window.innerWidth < breakpoint);
|
|
8643
|
+
React26.useEffect(() => {
|
|
8516
8644
|
const handleResize = () => {
|
|
8517
8645
|
setIsMobile(window.innerWidth < breakpoint);
|
|
8518
8646
|
};
|
|
@@ -8824,7 +8952,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
8824
8952
|
}
|
|
8825
8953
|
var HeaderNav_default = HeaderNav;
|
|
8826
8954
|
function useClickOutside(ref, fun) {
|
|
8827
|
-
|
|
8955
|
+
React26.useEffect(() => {
|
|
8828
8956
|
const listener = (e) => {
|
|
8829
8957
|
if (!ref.current || ref.current.contains(e.target)) {
|
|
8830
8958
|
return;
|
|
@@ -8865,8 +8993,8 @@ var HeaderNavGroup = ({
|
|
|
8865
8993
|
styles,
|
|
8866
8994
|
children: children3
|
|
8867
8995
|
}) => {
|
|
8868
|
-
const [collapsed, setCollapsed] =
|
|
8869
|
-
const headerNavGroupRef =
|
|
8996
|
+
const [collapsed, setCollapsed] = React26.useState(true);
|
|
8997
|
+
const headerNavGroupRef = React26.useRef(null);
|
|
8870
8998
|
useClickOutside(headerNavGroupRef, () => setCollapsed(true));
|
|
8871
8999
|
const handleNavigation = () => {
|
|
8872
9000
|
if (to) {
|
|
@@ -9089,8 +9217,8 @@ var MenuGroup = ({
|
|
|
9089
9217
|
style: style2,
|
|
9090
9218
|
...rest
|
|
9091
9219
|
}) => {
|
|
9092
|
-
const [collapsed, setCollapsed] =
|
|
9093
|
-
|
|
9220
|
+
const [collapsed, setCollapsed] = React26.useState(!defaultOpen);
|
|
9221
|
+
React26.useEffect(() => {
|
|
9094
9222
|
if (defaultOpen !== void 0) {
|
|
9095
9223
|
setCollapsed(!defaultOpen);
|
|
9096
9224
|
}
|
|
@@ -9207,12 +9335,12 @@ var Menu = ({
|
|
|
9207
9335
|
defaultMenuElements,
|
|
9208
9336
|
currentPath
|
|
9209
9337
|
}) => {
|
|
9210
|
-
const normalizedItems =
|
|
9211
|
-
const selected =
|
|
9338
|
+
const normalizedItems = React26.useMemo(() => assignKeys(items), [items]);
|
|
9339
|
+
const selected = React26.useMemo(() => {
|
|
9212
9340
|
if (!currentPath) return void 0;
|
|
9213
9341
|
return findSelectedKey(normalizedItems, currentPath);
|
|
9214
9342
|
}, [currentPath, normalizedItems]);
|
|
9215
|
-
const parentMap =
|
|
9343
|
+
const parentMap = React26.useMemo(
|
|
9216
9344
|
() => buildParentMap(normalizedItems),
|
|
9217
9345
|
[normalizedItems]
|
|
9218
9346
|
);
|
|
@@ -9365,8 +9493,8 @@ function RouteTabs({
|
|
|
9365
9493
|
const currentPath = window.location.pathname;
|
|
9366
9494
|
return navData.find((tab2) => tab2.to === currentPath)?.to || navData[0]?.to;
|
|
9367
9495
|
};
|
|
9368
|
-
const [activeTab, setActiveTab] =
|
|
9369
|
-
|
|
9496
|
+
const [activeTab, setActiveTab] = React26.useState(getActiveTab);
|
|
9497
|
+
React26.useEffect(() => {
|
|
9370
9498
|
if (mode !== "route") return;
|
|
9371
9499
|
const handlePopState = () => {
|
|
9372
9500
|
setActiveTab(getActiveTab());
|
|
@@ -9670,7 +9798,7 @@ var CHART_LIGHT_THEME = {
|
|
|
9670
9798
|
},
|
|
9671
9799
|
colors: CHART_COLOR_PALETTE
|
|
9672
9800
|
};
|
|
9673
|
-
var ChartContext =
|
|
9801
|
+
var ChartContext = React26.createContext({
|
|
9674
9802
|
data: [],
|
|
9675
9803
|
loading: false,
|
|
9676
9804
|
error: null,
|
|
@@ -9689,7 +9817,7 @@ var ChartContext = React25.createContext({
|
|
|
9689
9817
|
|
|
9690
9818
|
// src/components/data-display/charts/context/useChartContext.ts
|
|
9691
9819
|
function useChartContext() {
|
|
9692
|
-
return
|
|
9820
|
+
return React26.useContext(ChartContext);
|
|
9693
9821
|
}
|
|
9694
9822
|
function mergeChartTheme(baseTheme, customTheme) {
|
|
9695
9823
|
if (!customTheme) {
|
|
@@ -9717,7 +9845,7 @@ function mergeChartTheme(baseTheme, customTheme) {
|
|
|
9717
9845
|
}
|
|
9718
9846
|
function useChartTheme({ mode, theme } = {}) {
|
|
9719
9847
|
const context = useChartContext();
|
|
9720
|
-
return
|
|
9848
|
+
return React26.useMemo(() => {
|
|
9721
9849
|
const baseTheme = mode === "light" ? CHART_LIGHT_THEME : mode === "dark" ? CHART_DARK_THEME : context.theme;
|
|
9722
9850
|
return mergeChartTheme(baseTheme, theme);
|
|
9723
9851
|
}, [context.theme, mode, theme]);
|
|
@@ -10259,7 +10387,7 @@ function ChartLegend({
|
|
|
10259
10387
|
...rest
|
|
10260
10388
|
}) {
|
|
10261
10389
|
const theme = useChartTheme();
|
|
10262
|
-
const legendItems =
|
|
10390
|
+
const legendItems = React26.useMemo(() => {
|
|
10263
10391
|
if (items?.length) {
|
|
10264
10392
|
return items;
|
|
10265
10393
|
}
|
|
@@ -10479,14 +10607,14 @@ function useChartData({
|
|
|
10479
10607
|
onDataChange,
|
|
10480
10608
|
onError
|
|
10481
10609
|
} = {}) {
|
|
10482
|
-
const [state, setState] =
|
|
10610
|
+
const [state, setState] = React26.useState({
|
|
10483
10611
|
data: data ?? [],
|
|
10484
10612
|
loading: false,
|
|
10485
10613
|
error: null,
|
|
10486
10614
|
status: data?.length ? "success" : "idle",
|
|
10487
10615
|
lastUpdatedAt: data?.length ? /* @__PURE__ */ new Date() : void 0
|
|
10488
10616
|
});
|
|
10489
|
-
const prepareData =
|
|
10617
|
+
const prepareData = React26.useCallback(
|
|
10490
10618
|
(nextData) => {
|
|
10491
10619
|
if (!normalize4) {
|
|
10492
10620
|
return nextData;
|
|
@@ -10495,7 +10623,7 @@ function useChartData({
|
|
|
10495
10623
|
},
|
|
10496
10624
|
[normalize4]
|
|
10497
10625
|
);
|
|
10498
|
-
const replaceData =
|
|
10626
|
+
const replaceData = React26.useCallback(
|
|
10499
10627
|
(nextData) => {
|
|
10500
10628
|
const normalizedData = prepareData(nextData);
|
|
10501
10629
|
setState({
|
|
@@ -10509,7 +10637,7 @@ function useChartData({
|
|
|
10509
10637
|
},
|
|
10510
10638
|
[onDataChange, prepareData]
|
|
10511
10639
|
);
|
|
10512
|
-
const appendData =
|
|
10640
|
+
const appendData = React26.useCallback(
|
|
10513
10641
|
(nextData) => {
|
|
10514
10642
|
setState((currentState) => {
|
|
10515
10643
|
const incomingData = Array.isArray(nextData) ? nextData : [nextData];
|
|
@@ -10533,7 +10661,7 @@ function useChartData({
|
|
|
10533
10661
|
},
|
|
10534
10662
|
[maxDataPoints, onDataChange, prepareData]
|
|
10535
10663
|
);
|
|
10536
|
-
const clearData =
|
|
10664
|
+
const clearData = React26.useCallback(() => {
|
|
10537
10665
|
setState({
|
|
10538
10666
|
data: [],
|
|
10539
10667
|
loading: false,
|
|
@@ -10543,7 +10671,7 @@ function useChartData({
|
|
|
10543
10671
|
});
|
|
10544
10672
|
onDataChange?.([]);
|
|
10545
10673
|
}, [onDataChange]);
|
|
10546
|
-
const handleError =
|
|
10674
|
+
const handleError = React26.useCallback(
|
|
10547
10675
|
(error) => {
|
|
10548
10676
|
setState((currentState) => ({
|
|
10549
10677
|
...currentState,
|
|
@@ -10555,7 +10683,7 @@ function useChartData({
|
|
|
10555
10683
|
},
|
|
10556
10684
|
[onError]
|
|
10557
10685
|
);
|
|
10558
|
-
const refresh =
|
|
10686
|
+
const refresh = React26.useCallback(async () => {
|
|
10559
10687
|
const resolvedDataSource = dataSource;
|
|
10560
10688
|
if (!resolvedDataSource?.refresh && !resolvedDataSource?.getInitialData) {
|
|
10561
10689
|
return;
|
|
@@ -10574,13 +10702,13 @@ function useChartData({
|
|
|
10574
10702
|
handleError(error instanceof Error ? error : new Error(String(error)));
|
|
10575
10703
|
}
|
|
10576
10704
|
}, [dataSource, handleError, replaceData]);
|
|
10577
|
-
|
|
10705
|
+
React26.useEffect(() => {
|
|
10578
10706
|
if (!data) {
|
|
10579
10707
|
return;
|
|
10580
10708
|
}
|
|
10581
10709
|
replaceData(data);
|
|
10582
10710
|
}, [data, replaceData]);
|
|
10583
|
-
|
|
10711
|
+
React26.useEffect(() => {
|
|
10584
10712
|
if (!dataSource || !autoLoad) {
|
|
10585
10713
|
return;
|
|
10586
10714
|
}
|
|
@@ -10619,7 +10747,7 @@ function useChartData({
|
|
|
10619
10747
|
unsubscribe?.();
|
|
10620
10748
|
};
|
|
10621
10749
|
}, [appendData, autoLoad, dataSource, handleError, replaceData]);
|
|
10622
|
-
return
|
|
10750
|
+
return React26.useMemo(
|
|
10623
10751
|
() => ({
|
|
10624
10752
|
...state,
|
|
10625
10753
|
refresh,
|
|
@@ -10638,11 +10766,11 @@ function useChartRealtime({
|
|
|
10638
10766
|
onData,
|
|
10639
10767
|
onError
|
|
10640
10768
|
}) {
|
|
10641
|
-
const [data, setData] =
|
|
10642
|
-
const [error, setError] =
|
|
10643
|
-
const [connected, setConnected] =
|
|
10644
|
-
const [lastUpdatedAt, setLastUpdatedAt] =
|
|
10645
|
-
|
|
10769
|
+
const [data, setData] = React26.useState([]);
|
|
10770
|
+
const [error, setError] = React26.useState(null);
|
|
10771
|
+
const [connected, setConnected] = React26.useState(false);
|
|
10772
|
+
const [lastUpdatedAt, setLastUpdatedAt] = React26.useState();
|
|
10773
|
+
React26.useEffect(() => {
|
|
10646
10774
|
if (!enabled) {
|
|
10647
10775
|
setConnected(false);
|
|
10648
10776
|
return;
|
|
@@ -10676,7 +10804,7 @@ function useChartRealtime({
|
|
|
10676
10804
|
setConnected(false);
|
|
10677
10805
|
};
|
|
10678
10806
|
}, [connect, enabled, maxDataPoints, normalize4, onData, onError]);
|
|
10679
|
-
return
|
|
10807
|
+
return React26.useMemo(
|
|
10680
10808
|
() => ({
|
|
10681
10809
|
data,
|
|
10682
10810
|
error,
|
|
@@ -10698,13 +10826,13 @@ function useChartPolling({
|
|
|
10698
10826
|
onData,
|
|
10699
10827
|
onError
|
|
10700
10828
|
}) {
|
|
10701
|
-
const isMountedRef =
|
|
10702
|
-
const isFetchingRef =
|
|
10703
|
-
const [data, setData] =
|
|
10704
|
-
const [error, setError] =
|
|
10705
|
-
const [loading, setLoading] =
|
|
10706
|
-
const [lastUpdatedAt, setLastUpdatedAt] =
|
|
10707
|
-
const refresh =
|
|
10829
|
+
const isMountedRef = React26.useRef(false);
|
|
10830
|
+
const isFetchingRef = React26.useRef(false);
|
|
10831
|
+
const [data, setData] = React26.useState([]);
|
|
10832
|
+
const [error, setError] = React26.useState(null);
|
|
10833
|
+
const [loading, setLoading] = React26.useState(immediate);
|
|
10834
|
+
const [lastUpdatedAt, setLastUpdatedAt] = React26.useState();
|
|
10835
|
+
const refresh = React26.useCallback(async () => {
|
|
10708
10836
|
if (isFetchingRef.current) {
|
|
10709
10837
|
return;
|
|
10710
10838
|
}
|
|
@@ -10733,13 +10861,13 @@ function useChartPolling({
|
|
|
10733
10861
|
isFetchingRef.current = false;
|
|
10734
10862
|
}
|
|
10735
10863
|
}, [fetcher, normalize4, onData, onError]);
|
|
10736
|
-
|
|
10864
|
+
React26.useEffect(() => {
|
|
10737
10865
|
isMountedRef.current = true;
|
|
10738
10866
|
return () => {
|
|
10739
10867
|
isMountedRef.current = false;
|
|
10740
10868
|
};
|
|
10741
10869
|
}, []);
|
|
10742
|
-
|
|
10870
|
+
React26.useEffect(() => {
|
|
10743
10871
|
if (!enabled) {
|
|
10744
10872
|
setLoading(false);
|
|
10745
10873
|
return;
|
|
@@ -10754,7 +10882,7 @@ function useChartPolling({
|
|
|
10754
10882
|
window.clearInterval(timer2);
|
|
10755
10883
|
};
|
|
10756
10884
|
}, [enabled, immediate, interval2, refresh]);
|
|
10757
|
-
return
|
|
10885
|
+
return React26.useMemo(
|
|
10758
10886
|
() => ({
|
|
10759
10887
|
data,
|
|
10760
10888
|
error,
|
|
@@ -10788,7 +10916,7 @@ function useChartSeries({
|
|
|
10788
10916
|
xKey,
|
|
10789
10917
|
excludeKeys
|
|
10790
10918
|
}) {
|
|
10791
|
-
return
|
|
10919
|
+
return React26.useMemo(() => {
|
|
10792
10920
|
const resolvedData = data ?? [];
|
|
10793
10921
|
const resolvedExcludeKeys = excludeKeys ?? [];
|
|
10794
10922
|
const normalizedSeries = series && series.length > 0 ? series : inferSeriesKeys(
|
|
@@ -10946,7 +11074,7 @@ function AreaPlot({
|
|
|
10946
11074
|
...rest
|
|
10947
11075
|
}) {
|
|
10948
11076
|
const theme = useChartTheme();
|
|
10949
|
-
const chartId =
|
|
11077
|
+
const chartId = React26.useId().replace(/:/g, "");
|
|
10950
11078
|
const chart = useResolvedChartState(data, loading, error);
|
|
10951
11079
|
const resolvedSeries = useChartSeries({
|
|
10952
11080
|
data: chart.data,
|
|
@@ -11160,7 +11288,7 @@ function PiePlot({
|
|
|
11160
11288
|
}) {
|
|
11161
11289
|
const theme = useChartTheme();
|
|
11162
11290
|
const chart = useResolvedChartState(data, loading, error);
|
|
11163
|
-
const segments =
|
|
11291
|
+
const segments = React26.useMemo(
|
|
11164
11292
|
() => chart.data.map((item, index3) => {
|
|
11165
11293
|
const label = String(item[String(nameKey)] ?? index3);
|
|
11166
11294
|
return {
|
|
@@ -11551,7 +11679,7 @@ function ChartProvider({
|
|
|
11551
11679
|
onError
|
|
11552
11680
|
});
|
|
11553
11681
|
const resolvedTheme = useChartTheme({ mode: themeMode, theme });
|
|
11554
|
-
const value =
|
|
11682
|
+
const value = React26.useMemo(
|
|
11555
11683
|
() => ({
|
|
11556
11684
|
...chartData,
|
|
11557
11685
|
mode: dataSource?.mode,
|
|
@@ -11995,7 +12123,7 @@ var Chip = ({
|
|
|
11995
12123
|
}
|
|
11996
12124
|
) });
|
|
11997
12125
|
};
|
|
11998
|
-
var DataViewContext =
|
|
12126
|
+
var DataViewContext = React26.createContext(null);
|
|
11999
12127
|
|
|
12000
12128
|
// src/components/data-display/data-view/utils/searchData.ts
|
|
12001
12129
|
function searchData(data, search3) {
|
|
@@ -12039,19 +12167,19 @@ var DataViewProvider = ({
|
|
|
12039
12167
|
defaultPageSize = 9,
|
|
12040
12168
|
sortConfig = {}
|
|
12041
12169
|
}) => {
|
|
12042
|
-
const [search3, setSearch] =
|
|
12043
|
-
const [filters, setFilters] =
|
|
12044
|
-
const [sort, setSort] =
|
|
12045
|
-
const [page, setPage] =
|
|
12046
|
-
const [pageSize, setPageSize] =
|
|
12047
|
-
const processedData =
|
|
12170
|
+
const [search3, setSearch] = React26.useState("");
|
|
12171
|
+
const [filters, setFilters] = React26.useState({});
|
|
12172
|
+
const [sort, setSort] = React26.useState("suggested");
|
|
12173
|
+
const [page, setPage] = React26.useState(1);
|
|
12174
|
+
const [pageSize, setPageSize] = React26.useState(defaultPageSize);
|
|
12175
|
+
const processedData = React26.useMemo(() => {
|
|
12048
12176
|
let result = searchData(data, search3);
|
|
12049
12177
|
result = filterData(result, filters);
|
|
12050
12178
|
result = sortData(result, sort, sortConfig);
|
|
12051
12179
|
return result;
|
|
12052
12180
|
}, [data, search3, filters, sort, sortConfig]);
|
|
12053
12181
|
const totalPages = pageSize === "All" ? 1 : Math.ceil(processedData.length / pageSize);
|
|
12054
|
-
const paginatedData =
|
|
12182
|
+
const paginatedData = React26.useMemo(() => {
|
|
12055
12183
|
if (pageSize === "All") return processedData;
|
|
12056
12184
|
const size = pageSize;
|
|
12057
12185
|
const start3 = (page - 1) * size;
|
|
@@ -12104,7 +12232,7 @@ var DataViewSidebar = ({
|
|
|
12104
12232
|
return /* @__PURE__ */ jsxRuntime.jsx("aside", { ...rest, className: cn("w-[220px] shrink-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: children3 }) });
|
|
12105
12233
|
};
|
|
12106
12234
|
function useDataView() {
|
|
12107
|
-
const ctx =
|
|
12235
|
+
const ctx = React26.useContext(DataViewContext);
|
|
12108
12236
|
if (!ctx) {
|
|
12109
12237
|
throw new Error("useDataView must be used within DataViewProvider");
|
|
12110
12238
|
}
|
|
@@ -12201,7 +12329,7 @@ function Accordion({
|
|
|
12201
12329
|
toggleOnSummaryClick = false,
|
|
12202
12330
|
enableChildrenPadding = true
|
|
12203
12331
|
}) {
|
|
12204
|
-
const [collapse, setCollapse] =
|
|
12332
|
+
const [collapse, setCollapse] = React26.useState(defaultCollapse);
|
|
12205
12333
|
const handleToggle = () => {
|
|
12206
12334
|
setCollapse((prev) => !prev);
|
|
12207
12335
|
};
|
|
@@ -12675,8 +12803,8 @@ var Flag = ({
|
|
|
12675
12803
|
className,
|
|
12676
12804
|
...rest
|
|
12677
12805
|
}) => {
|
|
12678
|
-
const [pos, setPos] =
|
|
12679
|
-
const [showTooltip, setShowTooltip] =
|
|
12806
|
+
const [pos, setPos] = React26.useState({ x: 0, y: 0 });
|
|
12807
|
+
const [showTooltip, setShowTooltip] = React26.useState(false);
|
|
12680
12808
|
const upperCode = code4.toUpperCase();
|
|
12681
12809
|
const country = emojiFlags__default.default.countryCode(upperCode);
|
|
12682
12810
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -15804,16 +15932,16 @@ var GraphRenderer = ({
|
|
|
15804
15932
|
width = 1e3,
|
|
15805
15933
|
height = 700
|
|
15806
15934
|
}) => {
|
|
15807
|
-
const [nodes, setNodes] =
|
|
15935
|
+
const [nodes, setNodes] = React26.useState([]);
|
|
15808
15936
|
const edges = data.edges;
|
|
15809
|
-
const simulationRef =
|
|
15810
|
-
const [offset, setOffset] =
|
|
15811
|
-
const isDragging =
|
|
15812
|
-
const lastPos =
|
|
15813
|
-
const nodeMap =
|
|
15937
|
+
const simulationRef = React26.useRef(null);
|
|
15938
|
+
const [offset, setOffset] = React26.useState({ x: 0, y: 0 });
|
|
15939
|
+
const isDragging = React26.useRef(false);
|
|
15940
|
+
const lastPos = React26.useRef({ x: 0, y: 0 });
|
|
15941
|
+
const nodeMap = React26.useMemo(() => {
|
|
15814
15942
|
return new Map(nodes.map((n) => [n.id, n]));
|
|
15815
15943
|
}, [nodes]);
|
|
15816
|
-
|
|
15944
|
+
React26.useEffect(() => {
|
|
15817
15945
|
simulationRef.current?.stop?.();
|
|
15818
15946
|
const positionedNodes = data.nodes.map((n) => ({
|
|
15819
15947
|
...n,
|
|
@@ -15894,13 +16022,13 @@ var Graph = ({
|
|
|
15894
16022
|
}
|
|
15895
16023
|
);
|
|
15896
16024
|
};
|
|
15897
|
-
var CloudinaryContext =
|
|
16025
|
+
var CloudinaryContext = React26.createContext(null);
|
|
15898
16026
|
var CloudinaryProvider = ({
|
|
15899
16027
|
cloudName,
|
|
15900
16028
|
children: children3
|
|
15901
16029
|
}) => /* @__PURE__ */ jsxRuntime.jsx(CloudinaryContext.Provider, { value: { cloudName }, children: children3 });
|
|
15902
16030
|
var useCloudinaryConfig = () => {
|
|
15903
|
-
const ctx =
|
|
16031
|
+
const ctx = React26.useContext(CloudinaryContext);
|
|
15904
16032
|
if (!ctx) {
|
|
15905
16033
|
throw new Error(
|
|
15906
16034
|
"CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />"
|
|
@@ -16419,7 +16547,7 @@ var ListItem = ({
|
|
|
16419
16547
|
children: bullet
|
|
16420
16548
|
}
|
|
16421
16549
|
),
|
|
16422
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ?
|
|
16550
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: TypographyComponent ? React26__default.default.cloneElement(
|
|
16423
16551
|
TypographyComponent,
|
|
16424
16552
|
{
|
|
16425
16553
|
className: cn(
|
|
@@ -16453,7 +16581,7 @@ function normalizeItem(item, defaultBulletType) {
|
|
|
16453
16581
|
bulletType: defaultBulletType
|
|
16454
16582
|
};
|
|
16455
16583
|
}
|
|
16456
|
-
if (
|
|
16584
|
+
if (React26__default.default.isValidElement(item)) {
|
|
16457
16585
|
return {
|
|
16458
16586
|
content: item,
|
|
16459
16587
|
bulletType: defaultBulletType
|
|
@@ -16758,7 +16886,7 @@ var ProgressBar = ({
|
|
|
16758
16886
|
hasBottomLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: labelNode })
|
|
16759
16887
|
] });
|
|
16760
16888
|
};
|
|
16761
|
-
var
|
|
16889
|
+
var sizes2 = {
|
|
16762
16890
|
["xs" /* xs */]: "text-[10px]",
|
|
16763
16891
|
["sm" /* sm */]: "text-xs",
|
|
16764
16892
|
["md" /* md */]: "text-sm",
|
|
@@ -16788,7 +16916,7 @@ var StarRating = ({
|
|
|
16788
16916
|
className: cn(
|
|
16789
16917
|
"inline-flex items-center gap-[2px]",
|
|
16790
16918
|
"text-yellow-500 dark:text-yellow-400",
|
|
16791
|
-
|
|
16919
|
+
sizes2[size],
|
|
16792
16920
|
iconClassName
|
|
16793
16921
|
),
|
|
16794
16922
|
children: [
|
|
@@ -16801,7 +16929,7 @@ var StarRating = ({
|
|
|
16801
16929
|
showValue && valuePosition === "end" && ratingValue
|
|
16802
16930
|
] });
|
|
16803
16931
|
};
|
|
16804
|
-
var
|
|
16932
|
+
var sizes3 = {
|
|
16805
16933
|
["xs" /* xs */]: {
|
|
16806
16934
|
value: "text-2xl",
|
|
16807
16935
|
review: "text-xs"
|
|
@@ -16833,7 +16961,7 @@ var NumericRating = ({
|
|
|
16833
16961
|
className,
|
|
16834
16962
|
...rest
|
|
16835
16963
|
}) => {
|
|
16836
|
-
const sizeStyles =
|
|
16964
|
+
const sizeStyles = sizes3[size];
|
|
16837
16965
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16838
16966
|
"div",
|
|
16839
16967
|
{
|
|
@@ -17265,8 +17393,8 @@ var Table = ({
|
|
|
17265
17393
|
}) => {
|
|
17266
17394
|
const eui = useEUIConfig();
|
|
17267
17395
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
17268
|
-
const [sortKey, setSortKey] =
|
|
17269
|
-
const [sortOrder, setSortOrder] =
|
|
17396
|
+
const [sortKey, setSortKey] = React26.useState(null);
|
|
17397
|
+
const [sortOrder, setSortOrder] = React26.useState("asc");
|
|
17270
17398
|
const toggleSort = (key) => {
|
|
17271
17399
|
if (sortKey === key) {
|
|
17272
17400
|
setSortOrder((prev) => prev === "asc" ? "desc" : "asc");
|
|
@@ -17275,7 +17403,7 @@ var Table = ({
|
|
|
17275
17403
|
setSortOrder("asc");
|
|
17276
17404
|
}
|
|
17277
17405
|
};
|
|
17278
|
-
const sortedData =
|
|
17406
|
+
const sortedData = React26.useMemo(() => {
|
|
17279
17407
|
if (!sortKey) return data;
|
|
17280
17408
|
return [...data].sort((a2, b) => {
|
|
17281
17409
|
const aVal = a2[sortKey];
|
|
@@ -17356,8 +17484,8 @@ var Tooltip6 = ({
|
|
|
17356
17484
|
style: style2,
|
|
17357
17485
|
...rest
|
|
17358
17486
|
}) => {
|
|
17359
|
-
const [pos, setPos] =
|
|
17360
|
-
|
|
17487
|
+
const [pos, setPos] = React26.useState({ x: 0, y: 0 });
|
|
17488
|
+
React26.useEffect(() => {
|
|
17361
17489
|
if (!show) return;
|
|
17362
17490
|
const handleMove = (e) => {
|
|
17363
17491
|
setPos({ x: e.clientX + offsetX, y: e.clientY + offsetY });
|
|
@@ -17547,17 +17675,17 @@ var YoutubeVideo = ({
|
|
|
17547
17675
|
}
|
|
17548
17676
|
) });
|
|
17549
17677
|
};
|
|
17550
|
-
var ThemeContext =
|
|
17678
|
+
var ThemeContext = React26.createContext(
|
|
17551
17679
|
void 0
|
|
17552
17680
|
);
|
|
17553
17681
|
var ThemeProvider = ({
|
|
17554
17682
|
defaultTheme = "dark",
|
|
17555
17683
|
children: children3
|
|
17556
17684
|
}) => {
|
|
17557
|
-
const [theme, setTheme] =
|
|
17685
|
+
const [theme, setTheme] = React26.useState(() => {
|
|
17558
17686
|
return localStorage.getItem("theme") || defaultTheme;
|
|
17559
17687
|
});
|
|
17560
|
-
|
|
17688
|
+
React26.useEffect(() => {
|
|
17561
17689
|
if (theme === "dark") {
|
|
17562
17690
|
document.documentElement.classList.add("dark");
|
|
17563
17691
|
} else {
|
|
@@ -17571,7 +17699,7 @@ var ThemeProvider = ({
|
|
|
17571
17699
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: children3 });
|
|
17572
17700
|
};
|
|
17573
17701
|
var ThemeSwitch = () => {
|
|
17574
|
-
const themeContext =
|
|
17702
|
+
const themeContext = React26.useContext(ThemeContext);
|
|
17575
17703
|
if (!themeContext) return null;
|
|
17576
17704
|
const { theme, toggleTheme } = themeContext;
|
|
17577
17705
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17607,11 +17735,44 @@ var ThemeSwitch = () => {
|
|
|
17607
17735
|
}
|
|
17608
17736
|
);
|
|
17609
17737
|
};
|
|
17738
|
+
function ThemeSelect({
|
|
17739
|
+
ariaLabel,
|
|
17740
|
+
label,
|
|
17741
|
+
onChange,
|
|
17742
|
+
options,
|
|
17743
|
+
value
|
|
17744
|
+
}) {
|
|
17745
|
+
const id2 = React26.useId();
|
|
17746
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17747
|
+
"label",
|
|
17748
|
+
{
|
|
17749
|
+
className: "inline-flex w-fit min-w-[112px] flex-col rounded-md border border-gray-300 bg-white px-2 py-1 shadow-sm dark:bg-gray-800",
|
|
17750
|
+
htmlFor: id2,
|
|
17751
|
+
children: [
|
|
17752
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-medium leading-3 text-gray-500 dark:text-gray-300", children: label }),
|
|
17753
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17754
|
+
"select",
|
|
17755
|
+
{
|
|
17756
|
+
"aria-label": ariaLabel ?? label,
|
|
17757
|
+
className: "h-5 bg-transparent p-0 text-sm leading-5 text-gray-900 outline-none dark:text-gray-100",
|
|
17758
|
+
id: id2,
|
|
17759
|
+
onChange: (event) => onChange?.(event.target.value),
|
|
17760
|
+
value,
|
|
17761
|
+
children: options.map((option) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))
|
|
17762
|
+
}
|
|
17763
|
+
)
|
|
17764
|
+
]
|
|
17765
|
+
}
|
|
17766
|
+
);
|
|
17767
|
+
}
|
|
17768
|
+
var shapeOptions = Object.keys(Shape).map((shape) => ({
|
|
17769
|
+
label: shape,
|
|
17770
|
+
value: shape
|
|
17771
|
+
}));
|
|
17610
17772
|
var ShapeSwitch = () => {
|
|
17611
17773
|
const { config, setConfig } = useEUIConfig();
|
|
17612
17774
|
const currentShape = config.global?.shape ?? "square";
|
|
17613
|
-
const handleChange = (
|
|
17614
|
-
const shape = e.target.value;
|
|
17775
|
+
const handleChange = (shape) => {
|
|
17615
17776
|
setConfig((prev) => ({
|
|
17616
17777
|
...prev,
|
|
17617
17778
|
global: {
|
|
@@ -17620,20 +17781,46 @@ var ShapeSwitch = () => {
|
|
|
17620
17781
|
}
|
|
17621
17782
|
}));
|
|
17622
17783
|
};
|
|
17623
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17624
|
-
|
|
17784
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17785
|
+
ThemeSelect,
|
|
17625
17786
|
{
|
|
17626
|
-
|
|
17787
|
+
ariaLabel: "Global shape",
|
|
17788
|
+
label: "Shape",
|
|
17627
17789
|
onChange: handleChange,
|
|
17628
|
-
|
|
17629
|
-
|
|
17790
|
+
options: shapeOptions,
|
|
17791
|
+
value: currentShape
|
|
17630
17792
|
}
|
|
17631
|
-
)
|
|
17793
|
+
);
|
|
17794
|
+
};
|
|
17795
|
+
var previewOptions = [
|
|
17796
|
+
{
|
|
17797
|
+
label: "Web",
|
|
17798
|
+
value: "web"
|
|
17799
|
+
},
|
|
17800
|
+
{
|
|
17801
|
+
label: "Native",
|
|
17802
|
+
value: "native"
|
|
17803
|
+
}
|
|
17804
|
+
];
|
|
17805
|
+
var PreviewSwitch = ({
|
|
17806
|
+
onChange,
|
|
17807
|
+
value = "web"
|
|
17808
|
+
}) => {
|
|
17809
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17810
|
+
ThemeSelect,
|
|
17811
|
+
{
|
|
17812
|
+
ariaLabel: "Preview platform",
|
|
17813
|
+
label: "Preview",
|
|
17814
|
+
onChange,
|
|
17815
|
+
options: previewOptions,
|
|
17816
|
+
value
|
|
17817
|
+
}
|
|
17818
|
+
);
|
|
17632
17819
|
};
|
|
17633
17820
|
|
|
17634
17821
|
// src/hooks/theme/useCurrentTheme.ts
|
|
17635
17822
|
var useCurrentTheme = () => {
|
|
17636
|
-
const context =
|
|
17823
|
+
const context = React26.useContext(ThemeContext);
|
|
17637
17824
|
if (!context) {
|
|
17638
17825
|
throw new Error("useCurrentTheme must be used within a ThemeProvider");
|
|
17639
17826
|
}
|
|
@@ -28976,7 +29163,7 @@ var WorldMap = ({
|
|
|
28976
29163
|
}
|
|
28977
29164
|
};
|
|
28978
29165
|
const mode = isDarkMode ? mapStyles.dark : mapStyles.light;
|
|
28979
|
-
const resolvedData =
|
|
29166
|
+
const resolvedData = React26.useMemo(() => {
|
|
28980
29167
|
return data.map((item) => {
|
|
28981
29168
|
const c3 = COUNTRIES.find((x3) => x3.code === item.code);
|
|
28982
29169
|
if (!c3) return null;
|
|
@@ -28988,8 +29175,8 @@ var WorldMap = ({
|
|
|
28988
29175
|
}).filter(Boolean);
|
|
28989
29176
|
}, [data]);
|
|
28990
29177
|
const maxValue = resolvedData.length > 0 ? Math.max(...resolvedData.map((d) => d.value)) : 0;
|
|
28991
|
-
const [showTooltip, setShowTooltip] =
|
|
28992
|
-
const [tooltipContent, setTooltipContent] =
|
|
29178
|
+
const [showTooltip, setShowTooltip] = React26.useState(false);
|
|
29179
|
+
const [tooltipContent, setTooltipContent] = React26.useState(null);
|
|
28993
29180
|
const handleMouseMove = (_event, point5) => {
|
|
28994
29181
|
setTooltipContent(
|
|
28995
29182
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -29086,7 +29273,7 @@ function AsyncStateCard({
|
|
|
29086
29273
|
isError ? /* @__PURE__ */ jsxRuntime.jsx(FormResponse_default, { text: message, variant: "danger" }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-eui-dark-500 dark:text-eui-light-400", children: message })
|
|
29087
29274
|
] }),
|
|
29088
29275
|
onAction && actionText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29089
|
-
|
|
29276
|
+
Button_web_default,
|
|
29090
29277
|
{
|
|
29091
29278
|
type: "button",
|
|
29092
29279
|
text: actionText,
|
|
@@ -29101,7 +29288,7 @@ function AsyncStateCard({
|
|
|
29101
29288
|
}
|
|
29102
29289
|
);
|
|
29103
29290
|
}
|
|
29104
|
-
var AsyncStateCard_default =
|
|
29291
|
+
var AsyncStateCard_default = React26__default.default.memo(AsyncStateCard);
|
|
29105
29292
|
|
|
29106
29293
|
// src/components/utils/async-component-wrapper/asyncError.utils.ts
|
|
29107
29294
|
var getDefaultErrorMessage = (error) => {
|
|
@@ -29160,22 +29347,22 @@ function AsyncComponentWrapper({
|
|
|
29160
29347
|
contentClassName,
|
|
29161
29348
|
stateClassName
|
|
29162
29349
|
}) {
|
|
29163
|
-
const [isRetrying, setIsRetrying] =
|
|
29164
|
-
const retryTimerRef =
|
|
29165
|
-
const errorMessage =
|
|
29350
|
+
const [isRetrying, setIsRetrying] = React26.useState(false);
|
|
29351
|
+
const retryTimerRef = React26.useRef(null);
|
|
29352
|
+
const errorMessage = React26.useMemo(() => {
|
|
29166
29353
|
if (!isError) return "";
|
|
29167
29354
|
return errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error);
|
|
29168
29355
|
}, [isError, error, errorFormatter]);
|
|
29169
29356
|
const hasSuccess = isSuccess ?? (!isLoading && !isError && !isUninitialized);
|
|
29170
29357
|
const shouldShowRetryLoading = showLoadingOnRetry && (isRetrying || isFetching && isError);
|
|
29171
29358
|
const shouldShowLoading = isLoading || shouldShowRetryLoading;
|
|
29172
|
-
const clearRetryTimer =
|
|
29359
|
+
const clearRetryTimer = React26.useCallback(() => {
|
|
29173
29360
|
if (retryTimerRef.current) {
|
|
29174
29361
|
clearTimeout(retryTimerRef.current);
|
|
29175
29362
|
retryTimerRef.current = null;
|
|
29176
29363
|
}
|
|
29177
29364
|
}, []);
|
|
29178
|
-
const handleRetry =
|
|
29365
|
+
const handleRetry = React26.useCallback(() => {
|
|
29179
29366
|
if (!onRetry) return;
|
|
29180
29367
|
clearRetryTimer();
|
|
29181
29368
|
setIsRetrying(true);
|
|
@@ -29195,12 +29382,12 @@ function AsyncComponentWrapper({
|
|
|
29195
29382
|
throw retryError;
|
|
29196
29383
|
}
|
|
29197
29384
|
}, [onRetry, clearRetryTimer, retryLoadingFallbackMs]);
|
|
29198
|
-
|
|
29385
|
+
React26.useEffect(() => {
|
|
29199
29386
|
if (!isLoading && !isFetching && !isError) {
|
|
29200
29387
|
setIsRetrying(false);
|
|
29201
29388
|
}
|
|
29202
29389
|
}, [isLoading, isFetching, isError]);
|
|
29203
|
-
|
|
29390
|
+
React26.useEffect(() => {
|
|
29204
29391
|
return () => {
|
|
29205
29392
|
clearRetryTimer();
|
|
29206
29393
|
};
|
|
@@ -29282,7 +29469,7 @@ function AsyncComponentWrapper({
|
|
|
29282
29469
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(contentClassName), children: children3 })
|
|
29283
29470
|
] });
|
|
29284
29471
|
}
|
|
29285
|
-
var AsyncComponentWrapper_default =
|
|
29472
|
+
var AsyncComponentWrapper_default = React26__default.default.memo(AsyncComponentWrapper);
|
|
29286
29473
|
function Modal({
|
|
29287
29474
|
title,
|
|
29288
29475
|
show = false,
|
|
@@ -29298,7 +29485,7 @@ function Modal({
|
|
|
29298
29485
|
}) {
|
|
29299
29486
|
const eui = useEUIConfig();
|
|
29300
29487
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
29301
|
-
const modalRef =
|
|
29488
|
+
const modalRef = React26.useRef(null);
|
|
29302
29489
|
useClickOutside(
|
|
29303
29490
|
modalRef,
|
|
29304
29491
|
enableCloseOnClickOutside ? handleOnClose : void 0
|
|
@@ -29344,7 +29531,7 @@ function Modal({
|
|
|
29344
29531
|
}
|
|
29345
29532
|
var Modal_default = Modal;
|
|
29346
29533
|
var useAnalytics = () => {
|
|
29347
|
-
const context =
|
|
29534
|
+
const context = React26.useContext(AnalyticsContext);
|
|
29348
29535
|
if (!context) {
|
|
29349
29536
|
throw new Error("useAnalytics must be used within an AnalyticsProvider.");
|
|
29350
29537
|
}
|
|
@@ -29384,10 +29571,10 @@ var CookiePreferencesModal = ({
|
|
|
29384
29571
|
...rest
|
|
29385
29572
|
}) => {
|
|
29386
29573
|
const { consent, updateConsent } = useCookieConsent();
|
|
29387
|
-
const [selectedCategories, setSelectedCategories] =
|
|
29574
|
+
const [selectedCategories, setSelectedCategories] = React26.useState(
|
|
29388
29575
|
consent.categories
|
|
29389
29576
|
);
|
|
29390
|
-
|
|
29577
|
+
React26.useEffect(() => {
|
|
29391
29578
|
setSelectedCategories(consent.categories);
|
|
29392
29579
|
}, [consent.categories, open]);
|
|
29393
29580
|
const saveLabel = labels?.save ?? "Save preferences";
|
|
@@ -29449,7 +29636,7 @@ var CookiePreferencesModal = ({
|
|
|
29449
29636
|
}) }),
|
|
29450
29637
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-5 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
29451
29638
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29452
|
-
|
|
29639
|
+
Button_web_default,
|
|
29453
29640
|
{
|
|
29454
29641
|
type: "button",
|
|
29455
29642
|
text: cancelLabel,
|
|
@@ -29461,7 +29648,7 @@ var CookiePreferencesModal = ({
|
|
|
29461
29648
|
}
|
|
29462
29649
|
),
|
|
29463
29650
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29464
|
-
|
|
29651
|
+
Button_web_default,
|
|
29465
29652
|
{
|
|
29466
29653
|
type: "button",
|
|
29467
29654
|
text: saveLabel,
|
|
@@ -29499,8 +29686,8 @@ var CookieBanner = ({
|
|
|
29499
29686
|
...rest
|
|
29500
29687
|
}) => {
|
|
29501
29688
|
const { consent, acceptAll, rejectAll } = useCookieConsent();
|
|
29502
|
-
const [preferencesOpen, setPreferencesOpen] =
|
|
29503
|
-
const shouldRender =
|
|
29689
|
+
const [preferencesOpen, setPreferencesOpen] = React26.useState(false);
|
|
29690
|
+
const shouldRender = React26.useMemo(() => consent.status === "unset", [consent]);
|
|
29504
29691
|
if (!shouldRender) return null;
|
|
29505
29692
|
const acceptAllLabel = labels?.acceptAll ?? "Accept all";
|
|
29506
29693
|
const rejectAllLabel = labels?.rejectAll ?? "Reject optional";
|
|
@@ -29553,7 +29740,7 @@ var CookieBanner = ({
|
|
|
29553
29740
|
] }),
|
|
29554
29741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
29555
29742
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29556
|
-
|
|
29743
|
+
Button_web_default,
|
|
29557
29744
|
{
|
|
29558
29745
|
type: "button",
|
|
29559
29746
|
text: acceptAllLabel,
|
|
@@ -29565,7 +29752,7 @@ var CookieBanner = ({
|
|
|
29565
29752
|
}
|
|
29566
29753
|
),
|
|
29567
29754
|
showCustomize ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29568
|
-
|
|
29755
|
+
Button_web_default,
|
|
29569
29756
|
{
|
|
29570
29757
|
type: "button",
|
|
29571
29758
|
text: customizeLabel,
|
|
@@ -29577,7 +29764,7 @@ var CookieBanner = ({
|
|
|
29577
29764
|
}
|
|
29578
29765
|
) : null,
|
|
29579
29766
|
showRejectAll ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29580
|
-
|
|
29767
|
+
Button_web_default,
|
|
29581
29768
|
{
|
|
29582
29769
|
type: "button",
|
|
29583
29770
|
text: rejectAllLabel,
|
|
@@ -29617,15 +29804,15 @@ var usePageTracking = ({
|
|
|
29617
29804
|
dedupe = true
|
|
29618
29805
|
}) => {
|
|
29619
29806
|
const { track } = useAnalytics();
|
|
29620
|
-
const trackRef =
|
|
29621
|
-
const enteredAtRef =
|
|
29622
|
-
const previousPathRef =
|
|
29623
|
-
const trackedPathsRef =
|
|
29624
|
-
|
|
29807
|
+
const trackRef = React26.useRef(track);
|
|
29808
|
+
const enteredAtRef = React26.useRef(Date.now());
|
|
29809
|
+
const previousPathRef = React26.useRef(null);
|
|
29810
|
+
const trackedPathsRef = React26.useRef(/* @__PURE__ */ new Set());
|
|
29811
|
+
React26.useEffect(() => {
|
|
29625
29812
|
trackRef.current = track;
|
|
29626
29813
|
}, [track]);
|
|
29627
|
-
const metadataKey =
|
|
29628
|
-
|
|
29814
|
+
const metadataKey = React26.useMemo(() => JSON.stringify(metadata ?? {}), [metadata]);
|
|
29815
|
+
React26.useEffect(() => {
|
|
29629
29816
|
if (!enabled) return;
|
|
29630
29817
|
const nextPath = `${path2}${search3}`;
|
|
29631
29818
|
if (!nextPath) return;
|
|
@@ -29634,13 +29821,10 @@ var usePageTracking = ({
|
|
|
29634
29821
|
}
|
|
29635
29822
|
if (trackPageLeave && previousPathRef.current) {
|
|
29636
29823
|
const durationMs = Date.now() - enteredAtRef.current;
|
|
29637
|
-
trackRef.current("
|
|
29824
|
+
trackRef.current("page_leave", {
|
|
29638
29825
|
path: previousPathRef.current,
|
|
29639
|
-
|
|
29640
|
-
|
|
29641
|
-
durationMs,
|
|
29642
|
-
...metadata
|
|
29643
|
-
}
|
|
29826
|
+
durationMs,
|
|
29827
|
+
metadata
|
|
29644
29828
|
});
|
|
29645
29829
|
}
|
|
29646
29830
|
enteredAtRef.current = Date.now();
|
|
@@ -29648,24 +29832,17 @@ var usePageTracking = ({
|
|
|
29648
29832
|
trackedPathsRef.current.add(nextPath);
|
|
29649
29833
|
trackRef.current("page_view", {
|
|
29650
29834
|
path: nextPath,
|
|
29651
|
-
|
|
29652
|
-
|
|
29653
|
-
|
|
29654
|
-
...metadata
|
|
29655
|
-
}
|
|
29835
|
+
title,
|
|
29836
|
+
fullUrl,
|
|
29837
|
+
metadata
|
|
29656
29838
|
});
|
|
29657
29839
|
return () => {
|
|
29658
29840
|
if (!trackPageLeave) return;
|
|
29659
29841
|
const durationMs = Date.now() - enteredAtRef.current;
|
|
29660
|
-
trackRef.current("
|
|
29842
|
+
trackRef.current("page_leave", {
|
|
29661
29843
|
path: nextPath,
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
durationMs,
|
|
29665
|
-
title,
|
|
29666
|
-
fullUrl,
|
|
29667
|
-
...metadata
|
|
29668
|
-
}
|
|
29844
|
+
durationMs,
|
|
29845
|
+
metadata
|
|
29669
29846
|
});
|
|
29670
29847
|
};
|
|
29671
29848
|
}, [
|
|
@@ -29684,32 +29861,21 @@ var useSessionTracking = ({
|
|
|
29684
29861
|
metadata
|
|
29685
29862
|
} = {}) => {
|
|
29686
29863
|
const { track } = useAnalytics();
|
|
29687
|
-
const
|
|
29688
|
-
const
|
|
29689
|
-
|
|
29690
|
-
React25.useEffect(() => {
|
|
29691
|
-
trackRef.current = track;
|
|
29692
|
-
}, [track]);
|
|
29693
|
-
const metadataKey = React25.useMemo(() => JSON.stringify(metadata ?? {}), [metadata]);
|
|
29694
|
-
React25.useEffect(() => {
|
|
29864
|
+
const startedAtRef = React26.useRef(Date.now());
|
|
29865
|
+
const endedRef = React26.useRef(false);
|
|
29866
|
+
React26.useEffect(() => {
|
|
29695
29867
|
if (!enabled || !isBrowser()) return;
|
|
29696
29868
|
startedAtRef.current = Date.now();
|
|
29697
29869
|
endedRef.current = false;
|
|
29698
|
-
|
|
29699
|
-
metadata
|
|
29700
|
-
eventName: "session_start",
|
|
29701
|
-
...metadata
|
|
29702
|
-
}
|
|
29870
|
+
track("session_start", {
|
|
29871
|
+
metadata
|
|
29703
29872
|
});
|
|
29704
29873
|
const endSession = () => {
|
|
29705
29874
|
if (endedRef.current) return;
|
|
29706
29875
|
endedRef.current = true;
|
|
29707
|
-
|
|
29708
|
-
|
|
29709
|
-
|
|
29710
|
-
durationMs: Date.now() - startedAtRef.current,
|
|
29711
|
-
...metadata
|
|
29712
|
-
}
|
|
29876
|
+
track("session_end", {
|
|
29877
|
+
durationMs: Date.now() - startedAtRef.current,
|
|
29878
|
+
metadata
|
|
29713
29879
|
});
|
|
29714
29880
|
};
|
|
29715
29881
|
const handleVisibilityChange = () => {
|
|
@@ -29724,9 +29890,9 @@ var useSessionTracking = ({
|
|
|
29724
29890
|
window.removeEventListener("pagehide", endSession);
|
|
29725
29891
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
29726
29892
|
};
|
|
29727
|
-
}, [enabled,
|
|
29893
|
+
}, [enabled, metadata, track]);
|
|
29728
29894
|
};
|
|
29729
|
-
var ContentArea =
|
|
29895
|
+
var ContentArea = React26.forwardRef(
|
|
29730
29896
|
({ children: children3, styles, enablePadding = false }, ref) => {
|
|
29731
29897
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29732
29898
|
"div",
|
|
@@ -29812,6 +29978,9 @@ var Layout = ({
|
|
|
29812
29978
|
var Header = ({
|
|
29813
29979
|
position: position4 = "static",
|
|
29814
29980
|
children: children3,
|
|
29981
|
+
onPreviewPlatformChange,
|
|
29982
|
+
previewPlatform = "web",
|
|
29983
|
+
showPreviewPlatformSelector = false,
|
|
29815
29984
|
styles
|
|
29816
29985
|
}) => {
|
|
29817
29986
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29826,9 +29995,16 @@ var Header = ({
|
|
|
29826
29995
|
[`${styles}`]: styles
|
|
29827
29996
|
}),
|
|
29828
29997
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: children3 ? children3 : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row w-full items-center justify-between px-4", children: [
|
|
29829
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "
|
|
29998
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "elseware UI" }),
|
|
29830
29999
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
29831
30000
|
/* @__PURE__ */ jsxRuntime.jsx(ThemeSwitch, {}),
|
|
30001
|
+
showPreviewPlatformSelector ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30002
|
+
PreviewSwitch,
|
|
30003
|
+
{
|
|
30004
|
+
onChange: onPreviewPlatformChange,
|
|
30005
|
+
value: previewPlatform
|
|
30006
|
+
}
|
|
30007
|
+
) : null,
|
|
29832
30008
|
/* @__PURE__ */ jsxRuntime.jsx(ShapeSwitch, {})
|
|
29833
30009
|
] })
|
|
29834
30010
|
] }) })
|
|
@@ -29946,8 +30122,8 @@ var GlowWrapper = ({
|
|
|
29946
30122
|
className = "",
|
|
29947
30123
|
hideOnLeave = true
|
|
29948
30124
|
}) => {
|
|
29949
|
-
const ref =
|
|
29950
|
-
const handleMove =
|
|
30125
|
+
const ref = React26.useRef(null);
|
|
30126
|
+
const handleMove = React26.useCallback(
|
|
29951
30127
|
(e) => {
|
|
29952
30128
|
const el = ref.current;
|
|
29953
30129
|
if (!el) return;
|
|
@@ -29969,7 +30145,7 @@ var GlowWrapper = ({
|
|
|
29969
30145
|
},
|
|
29970
30146
|
[glowSize, glowColor]
|
|
29971
30147
|
);
|
|
29972
|
-
const handleLeave =
|
|
30148
|
+
const handleLeave = React26.useCallback(() => {
|
|
29973
30149
|
const el = ref.current;
|
|
29974
30150
|
if (!el || !hideOnLeave) return;
|
|
29975
30151
|
el.style.setProperty("--glow-x", `-999px`);
|
|
@@ -30014,8 +30190,8 @@ function InfiniteScrollTrigger({
|
|
|
30014
30190
|
threshold = 0,
|
|
30015
30191
|
onLoadMore
|
|
30016
30192
|
}) {
|
|
30017
|
-
const triggerRef =
|
|
30018
|
-
|
|
30193
|
+
const triggerRef = React26.useRef(null);
|
|
30194
|
+
React26.useEffect(() => {
|
|
30019
30195
|
const element7 = triggerRef.current;
|
|
30020
30196
|
if (!element7 || !hasMore || isLoading) {
|
|
30021
30197
|
return;
|
|
@@ -30041,7 +30217,7 @@ function InfiniteScrollTrigger({
|
|
|
30041
30217
|
}
|
|
30042
30218
|
var InfiniteScrollTrigger_default = InfiniteScrollTrigger;
|
|
30043
30219
|
function ShowMore({ text: text10, limit }) {
|
|
30044
|
-
const [showMore, setShowMore] =
|
|
30220
|
+
const [showMore, setShowMore] = React26.useState(false);
|
|
30045
30221
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
30046
30222
|
showMore ? text10 : `${text10.substring(0, limit)}`,
|
|
30047
30223
|
text10.length > limit && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -30076,8 +30252,8 @@ function CommentComposer({
|
|
|
30076
30252
|
loading,
|
|
30077
30253
|
onSubmit
|
|
30078
30254
|
}) {
|
|
30079
|
-
const [value, setValue] =
|
|
30080
|
-
const [focused, setFocused] =
|
|
30255
|
+
const [value, setValue] = React26.useState("");
|
|
30256
|
+
const [focused, setFocused] = React26.useState(false);
|
|
30081
30257
|
async function handleSubmit() {
|
|
30082
30258
|
const content3 = value.trim();
|
|
30083
30259
|
if (!content3) {
|
|
@@ -30107,7 +30283,7 @@ function CommentComposer({
|
|
|
30107
30283
|
),
|
|
30108
30284
|
(focused || value.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
30109
30285
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30110
|
-
|
|
30286
|
+
Button_web_default,
|
|
30111
30287
|
{
|
|
30112
30288
|
text: "Cancel",
|
|
30113
30289
|
variant: "secondary",
|
|
@@ -30117,7 +30293,7 @@ function CommentComposer({
|
|
|
30117
30293
|
}
|
|
30118
30294
|
),
|
|
30119
30295
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30120
|
-
|
|
30296
|
+
Button_web_default,
|
|
30121
30297
|
{
|
|
30122
30298
|
text: submitLabel,
|
|
30123
30299
|
variant: "primary",
|
|
@@ -30332,14 +30508,14 @@ function CommentHeader({ comment: comment4, config }) {
|
|
|
30332
30508
|
}
|
|
30333
30509
|
var CommentHeader_default = CommentHeader;
|
|
30334
30510
|
var useDrawer = (defaultVisibility = true) => {
|
|
30335
|
-
const [show, setShow] =
|
|
30336
|
-
const openDrawer =
|
|
30511
|
+
const [show, setShow] = React26.useState(defaultVisibility);
|
|
30512
|
+
const openDrawer = React26.useCallback(() => {
|
|
30337
30513
|
setShow(true);
|
|
30338
30514
|
}, []);
|
|
30339
|
-
const closeDrawer =
|
|
30515
|
+
const closeDrawer = React26.useCallback(() => {
|
|
30340
30516
|
setShow(false);
|
|
30341
30517
|
}, []);
|
|
30342
|
-
const toggleDrawer =
|
|
30518
|
+
const toggleDrawer = React26.useCallback(() => {
|
|
30343
30519
|
setShow((prev) => !prev);
|
|
30344
30520
|
}, []);
|
|
30345
30521
|
return {
|
|
@@ -30351,7 +30527,7 @@ var useDrawer = (defaultVisibility = true) => {
|
|
|
30351
30527
|
};
|
|
30352
30528
|
var useDrawer_default = useDrawer;
|
|
30353
30529
|
var useModal = () => {
|
|
30354
|
-
const [show, setShow] =
|
|
30530
|
+
const [show, setShow] = React26.useState(false);
|
|
30355
30531
|
const handleOpenModal = () => {
|
|
30356
30532
|
setShow(true);
|
|
30357
30533
|
};
|
|
@@ -30366,7 +30542,7 @@ var useModal = () => {
|
|
|
30366
30542
|
};
|
|
30367
30543
|
var useModal_default = useModal;
|
|
30368
30544
|
var useTheme = () => {
|
|
30369
|
-
const context =
|
|
30545
|
+
const context = React26.useContext(ThemeContext);
|
|
30370
30546
|
if (!context) {
|
|
30371
30547
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
30372
30548
|
}
|
|
@@ -30407,7 +30583,7 @@ function CommentMenu({
|
|
|
30407
30583
|
onDelete,
|
|
30408
30584
|
onReport
|
|
30409
30585
|
}) {
|
|
30410
|
-
const ref =
|
|
30586
|
+
const ref = React26.useRef(null);
|
|
30411
30587
|
useClickOutside(ref, () => setOpen(false));
|
|
30412
30588
|
const items = [];
|
|
30413
30589
|
if (canEdit) {
|
|
@@ -30535,11 +30711,11 @@ function CommentItem({
|
|
|
30535
30711
|
onDelete,
|
|
30536
30712
|
onReport
|
|
30537
30713
|
}) {
|
|
30538
|
-
const [collapsed, setCollapsed] =
|
|
30539
|
-
const [isReplying, setIsReplying] =
|
|
30540
|
-
const [menuOpen, setMenuOpen] =
|
|
30541
|
-
const [loadingReplies, setLoadingReplies] =
|
|
30542
|
-
const [repliesLoaded, setRepliesLoaded] =
|
|
30714
|
+
const [collapsed, setCollapsed] = React26.useState(true);
|
|
30715
|
+
const [isReplying, setIsReplying] = React26.useState(false);
|
|
30716
|
+
const [menuOpen, setMenuOpen] = React26.useState(false);
|
|
30717
|
+
const [loadingReplies, setLoadingReplies] = React26.useState(false);
|
|
30718
|
+
const [repliesLoaded, setRepliesLoaded] = React26.useState(false);
|
|
30543
30719
|
const resolvedDepth = Math.min(depth, config.maxDepth);
|
|
30544
30720
|
const {
|
|
30545
30721
|
Header: HeaderComponent = CommentHeader_default,
|
|
@@ -30703,18 +30879,18 @@ function CommentThread({
|
|
|
30703
30879
|
onDelete,
|
|
30704
30880
|
onReport
|
|
30705
30881
|
}) {
|
|
30706
|
-
const [comments, setComments] =
|
|
30707
|
-
const [isLoadingComments, setIsLoadingComments] =
|
|
30708
|
-
const [replyCache, setReplyCache] =
|
|
30882
|
+
const [comments, setComments] = React26.useState([]);
|
|
30883
|
+
const [isLoadingComments, setIsLoadingComments] = React26.useState(true);
|
|
30884
|
+
const [replyCache, setReplyCache] = React26.useState(
|
|
30709
30885
|
{}
|
|
30710
30886
|
);
|
|
30711
|
-
const replyCacheRef =
|
|
30887
|
+
const replyCacheRef = React26.useRef(replyCache);
|
|
30712
30888
|
const ComposerComponent = components?.Composer ?? CommentComposer_default;
|
|
30713
30889
|
const resolvedConfig = {
|
|
30714
30890
|
...DEFAULT_COMMENT_THREAD_CONFIG,
|
|
30715
30891
|
...config
|
|
30716
30892
|
};
|
|
30717
|
-
|
|
30893
|
+
React26.useEffect(() => {
|
|
30718
30894
|
async function loadComments() {
|
|
30719
30895
|
try {
|
|
30720
30896
|
const result = await dataSource.getComments({
|
|
@@ -30728,10 +30904,10 @@ function CommentThread({
|
|
|
30728
30904
|
}
|
|
30729
30905
|
void loadComments();
|
|
30730
30906
|
}, [dataSource, resolvedConfig.commentsPerPage]);
|
|
30731
|
-
|
|
30907
|
+
React26.useEffect(() => {
|
|
30732
30908
|
replyCacheRef.current = replyCache;
|
|
30733
30909
|
}, [replyCache]);
|
|
30734
|
-
|
|
30910
|
+
React26.useEffect(() => {
|
|
30735
30911
|
let cancelled = false;
|
|
30736
30912
|
async function refreshLoadedReplies() {
|
|
30737
30913
|
const parentIds = Object.keys(replyCacheRef.current);
|
|
@@ -30767,13 +30943,13 @@ function CommentThread({
|
|
|
30767
30943
|
cancelled = true;
|
|
30768
30944
|
};
|
|
30769
30945
|
}, [dataSource, resolvedConfig.repliesPerPage]);
|
|
30770
|
-
|
|
30946
|
+
React26.useEffect(() => {
|
|
30771
30947
|
if (!updatedComment) {
|
|
30772
30948
|
return;
|
|
30773
30949
|
}
|
|
30774
30950
|
updateCommentEverywhere(updatedComment.id, () => updatedComment);
|
|
30775
30951
|
}, [updatedComment]);
|
|
30776
|
-
|
|
30952
|
+
React26.useEffect(() => {
|
|
30777
30953
|
if (!deletedComment) {
|
|
30778
30954
|
return;
|
|
30779
30955
|
}
|
|
@@ -31054,13 +31230,13 @@ function SliderItem({
|
|
|
31054
31230
|
}
|
|
31055
31231
|
var SliderItem_default = SliderItem;
|
|
31056
31232
|
function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
31057
|
-
const [images, setImages] =
|
|
31233
|
+
const [images, setImages] = React26.useState([
|
|
31058
31234
|
{
|
|
31059
31235
|
img: coverArt,
|
|
31060
31236
|
selected: true
|
|
31061
31237
|
}
|
|
31062
31238
|
]);
|
|
31063
|
-
|
|
31239
|
+
React26.useEffect(() => {
|
|
31064
31240
|
setImages([
|
|
31065
31241
|
{
|
|
31066
31242
|
img: coverArt,
|
|
@@ -31068,7 +31244,7 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
31068
31244
|
}
|
|
31069
31245
|
]);
|
|
31070
31246
|
}, [isSuccess]);
|
|
31071
|
-
|
|
31247
|
+
React26.useEffect(() => {
|
|
31072
31248
|
if (screenshots) {
|
|
31073
31249
|
const selectableScreenshots = [];
|
|
31074
31250
|
screenshots.forEach((item) => {
|
|
@@ -31080,8 +31256,8 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
31080
31256
|
setImages((prev) => [...prev, ...selectableScreenshots]);
|
|
31081
31257
|
}
|
|
31082
31258
|
}, [isSuccess]);
|
|
31083
|
-
const [displayImg, setDisplayImg] =
|
|
31084
|
-
|
|
31259
|
+
const [displayImg, setDisplayImg] = React26.useState(coverArt);
|
|
31260
|
+
React26.useEffect(() => {
|
|
31085
31261
|
setDisplayImg(coverArt);
|
|
31086
31262
|
}, [coverArt]);
|
|
31087
31263
|
const displayImageHandler = (itemIndex, img) => {
|
|
@@ -31193,7 +31369,7 @@ function WorldMapCountryTable({
|
|
|
31193
31369
|
title = "Country Breakdown",
|
|
31194
31370
|
data
|
|
31195
31371
|
}) {
|
|
31196
|
-
const enrichedData =
|
|
31372
|
+
const enrichedData = React26.useMemo(() => {
|
|
31197
31373
|
const mapped = data.map((item) => {
|
|
31198
31374
|
const countryMeta = COUNTRIES.find((c3) => c3.code === item.code);
|
|
31199
31375
|
return {
|
|
@@ -31206,11 +31382,11 @@ function WorldMapCountryTable({
|
|
|
31206
31382
|
});
|
|
31207
31383
|
return mapped.sort((a2, b) => b.value - a2.value);
|
|
31208
31384
|
}, [data]);
|
|
31209
|
-
const total =
|
|
31385
|
+
const total = React26.useMemo(
|
|
31210
31386
|
() => enrichedData.reduce((sum, i) => sum + i.value, 0),
|
|
31211
31387
|
[enrichedData]
|
|
31212
31388
|
);
|
|
31213
|
-
const finalData =
|
|
31389
|
+
const finalData = React26.useMemo(() => {
|
|
31214
31390
|
return enrichedData.map((item) => ({
|
|
31215
31391
|
...item,
|
|
31216
31392
|
percent: total > 0 ? item.value / total * 100 : 0
|
|
@@ -31455,7 +31631,7 @@ var TNDropdownGroup = ({
|
|
|
31455
31631
|
navigate,
|
|
31456
31632
|
className
|
|
31457
31633
|
}) => {
|
|
31458
|
-
const [open, setOpen] =
|
|
31634
|
+
const [open, setOpen] = React26.useState(true);
|
|
31459
31635
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
31460
31636
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
31461
31637
|
"div",
|
|
@@ -31544,8 +31720,8 @@ var TNGroup = ({
|
|
|
31544
31720
|
components,
|
|
31545
31721
|
selected
|
|
31546
31722
|
}) => {
|
|
31547
|
-
const [open, setOpen] =
|
|
31548
|
-
const timeoutRef =
|
|
31723
|
+
const [open, setOpen] = React26.useState(false);
|
|
31724
|
+
const timeoutRef = React26.useRef(null);
|
|
31549
31725
|
const handleEnter = () => {
|
|
31550
31726
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
31551
31727
|
setOpen(true);
|
|
@@ -31649,14 +31825,14 @@ function ReviewForm({
|
|
|
31649
31825
|
onSubmit,
|
|
31650
31826
|
onCancel
|
|
31651
31827
|
}) {
|
|
31652
|
-
const [content3, setContent] =
|
|
31653
|
-
const [rating, setRating] =
|
|
31654
|
-
const [isRecommended, setIsRecommended] =
|
|
31828
|
+
const [content3, setContent] = React26.useState(initialValues?.content ?? "");
|
|
31829
|
+
const [rating, setRating] = React26.useState(initialValues?.rating ?? 0);
|
|
31830
|
+
const [isRecommended, setIsRecommended] = React26.useState(
|
|
31655
31831
|
initialValues?.isRecommended ?? true
|
|
31656
31832
|
);
|
|
31657
|
-
const [error, setError] =
|
|
31833
|
+
const [error, setError] = React26.useState("");
|
|
31658
31834
|
const contentLength = content3.trim().length;
|
|
31659
|
-
const ratingItems =
|
|
31835
|
+
const ratingItems = React26.useMemo(() => {
|
|
31660
31836
|
return Array.from(
|
|
31661
31837
|
{
|
|
31662
31838
|
length: config.maxRating
|
|
@@ -31664,7 +31840,7 @@ function ReviewForm({
|
|
|
31664
31840
|
(_2, index3) => index3 + 1
|
|
31665
31841
|
);
|
|
31666
31842
|
}, [config.maxRating]);
|
|
31667
|
-
|
|
31843
|
+
React26.useEffect(() => {
|
|
31668
31844
|
setContent(initialValues?.content ?? "");
|
|
31669
31845
|
setRating(initialValues?.rating ?? 0);
|
|
31670
31846
|
setIsRecommended(initialValues?.isRecommended ?? true);
|
|
@@ -31780,7 +31956,7 @@ function ReviewForm({
|
|
|
31780
31956
|
] }),
|
|
31781
31957
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
31782
31958
|
onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31783
|
-
|
|
31959
|
+
Button_web_default,
|
|
31784
31960
|
{
|
|
31785
31961
|
text: cancelLabel,
|
|
31786
31962
|
variant: "secondary",
|
|
@@ -31790,7 +31966,7 @@ function ReviewForm({
|
|
|
31790
31966
|
}
|
|
31791
31967
|
),
|
|
31792
31968
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31793
|
-
|
|
31969
|
+
Button_web_default,
|
|
31794
31970
|
{
|
|
31795
31971
|
text: submitLabel,
|
|
31796
31972
|
variant: "primary",
|
|
@@ -31816,7 +31992,7 @@ function ReviewComposer({
|
|
|
31816
31992
|
if (!currentUser) {
|
|
31817
31993
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-gray-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-3", children: [
|
|
31818
31994
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Please login to post your review." }),
|
|
31819
|
-
onLoginClick && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31995
|
+
onLoginClick && /* @__PURE__ */ jsxRuntime.jsx(Button_web_default, { text: "Login", variant: "primary", onClick: onLoginClick })
|
|
31820
31996
|
] }) });
|
|
31821
31997
|
}
|
|
31822
31998
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-xl border border-gray-200 bg-white p-4 dark:border-neutral-800 dark:bg-neutral-900", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4", children: [
|
|
@@ -32108,7 +32284,7 @@ function MyReviewPanel({
|
|
|
32108
32284
|
onEditReview,
|
|
32109
32285
|
onDeleteReview
|
|
32110
32286
|
}) {
|
|
32111
|
-
const [editing, setEditing] =
|
|
32287
|
+
const [editing, setEditing] = React26.useState(false);
|
|
32112
32288
|
const ComposerComponent = components?.Composer ?? ReviewComposer_default;
|
|
32113
32289
|
const FormComponent = components?.Form ?? ReviewForm_default;
|
|
32114
32290
|
const HeaderComponent = components?.Header ?? ReviewHeader_default;
|
|
@@ -32192,7 +32368,7 @@ function MyReviewPanel({
|
|
|
32192
32368
|
/* @__PURE__ */ jsxRuntime.jsx(HeaderComponent, { review: myReview, config }),
|
|
32193
32369
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
32194
32370
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32195
|
-
|
|
32371
|
+
Button_web_default,
|
|
32196
32372
|
{
|
|
32197
32373
|
text: "Edit",
|
|
32198
32374
|
variant: "secondary",
|
|
@@ -32202,7 +32378,7 @@ function MyReviewPanel({
|
|
|
32202
32378
|
}
|
|
32203
32379
|
),
|
|
32204
32380
|
onDeleteReview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32205
|
-
|
|
32381
|
+
Button_web_default,
|
|
32206
32382
|
{
|
|
32207
32383
|
text: "Delete",
|
|
32208
32384
|
variant: "danger",
|
|
@@ -32264,7 +32440,7 @@ function ReviewMenu({
|
|
|
32264
32440
|
onReport,
|
|
32265
32441
|
onReply
|
|
32266
32442
|
}) {
|
|
32267
|
-
const ref =
|
|
32443
|
+
const ref = React26.useRef(null);
|
|
32268
32444
|
useClickOutside(ref, () => setOpen(false));
|
|
32269
32445
|
const items = [];
|
|
32270
32446
|
if (canEdit) {
|
|
@@ -32415,7 +32591,7 @@ function ReviewReplyMenu({
|
|
|
32415
32591
|
onDelete,
|
|
32416
32592
|
onReport
|
|
32417
32593
|
}) {
|
|
32418
|
-
const ref =
|
|
32594
|
+
const ref = React26.useRef(null);
|
|
32419
32595
|
useClickOutside(ref, () => setOpen(false));
|
|
32420
32596
|
const items = [];
|
|
32421
32597
|
if (canEdit) {
|
|
@@ -32484,7 +32660,7 @@ function ReviewReplyItem({
|
|
|
32484
32660
|
onDeleteReviewReply,
|
|
32485
32661
|
onReportReviewReply
|
|
32486
32662
|
}) {
|
|
32487
|
-
const [menuOpen, setMenuOpen] =
|
|
32663
|
+
const [menuOpen, setMenuOpen] = React26.useState(false);
|
|
32488
32664
|
const HeaderComponent = components?.ReplyHeader ?? ReviewReplyHeader_default;
|
|
32489
32665
|
const ContentComponent = components?.ReplyContent ?? ReviewReplyContent_default;
|
|
32490
32666
|
const MenuComponent = components?.ReplyMenu ?? ReviewReplyMenu_default;
|
|
@@ -32561,7 +32737,7 @@ function ReviewItem({
|
|
|
32561
32737
|
onDeleteReviewReply,
|
|
32562
32738
|
onReportReviewReply
|
|
32563
32739
|
}) {
|
|
32564
|
-
const [menuOpen, setMenuOpen] =
|
|
32740
|
+
const [menuOpen, setMenuOpen] = React26.useState(false);
|
|
32565
32741
|
const HeaderComponent = components?.Header ?? ReviewHeader_default;
|
|
32566
32742
|
const ContentComponent = components?.Content ?? ReviewContent_default;
|
|
32567
32743
|
const RatingComponent = components?.Rating ?? ReviewRating_default;
|
|
@@ -32711,28 +32887,28 @@ function useReviewThreadState({
|
|
|
32711
32887
|
onReviewUpdated,
|
|
32712
32888
|
onReviewDeleted
|
|
32713
32889
|
}) {
|
|
32714
|
-
const [reviews, setReviews] =
|
|
32715
|
-
const [myReview, setMyReview] =
|
|
32716
|
-
const [isLoadingReviews, setIsLoadingReviews] =
|
|
32717
|
-
const [isLoadingMyReview, setIsLoadingMyReview] =
|
|
32890
|
+
const [reviews, setReviews] = React26.useState([]);
|
|
32891
|
+
const [myReview, setMyReview] = React26.useState(null);
|
|
32892
|
+
const [isLoadingReviews, setIsLoadingReviews] = React26.useState(true);
|
|
32893
|
+
const [isLoadingMyReview, setIsLoadingMyReview] = React26.useState(
|
|
32718
32894
|
Boolean(dataSource.getMyReview && shouldLoadMyReview)
|
|
32719
32895
|
);
|
|
32720
|
-
const [isCreatingReview, setIsCreatingReview] =
|
|
32721
|
-
const [isUpdatingReview, setIsUpdatingReview] =
|
|
32722
|
-
const [isDeletingReview, setIsDeletingReview] =
|
|
32723
|
-
const [isCreatingReviewReply, setIsCreatingReviewReply] =
|
|
32724
|
-
const [isUpdatingReviewReply, setIsUpdatingReviewReply] =
|
|
32725
|
-
const [isDeletingReviewReply, setIsDeletingReviewReply] =
|
|
32726
|
-
const [reviewsError, setReviewsError] =
|
|
32727
|
-
const [myReviewError, setMyReviewError] =
|
|
32896
|
+
const [isCreatingReview, setIsCreatingReview] = React26.useState(false);
|
|
32897
|
+
const [isUpdatingReview, setIsUpdatingReview] = React26.useState(false);
|
|
32898
|
+
const [isDeletingReview, setIsDeletingReview] = React26.useState(false);
|
|
32899
|
+
const [isCreatingReviewReply, setIsCreatingReviewReply] = React26.useState(false);
|
|
32900
|
+
const [isUpdatingReviewReply, setIsUpdatingReviewReply] = React26.useState(false);
|
|
32901
|
+
const [isDeletingReviewReply, setIsDeletingReviewReply] = React26.useState(false);
|
|
32902
|
+
const [reviewsError, setReviewsError] = React26.useState(null);
|
|
32903
|
+
const [myReviewError, setMyReviewError] = React26.useState(null);
|
|
32728
32904
|
const error = reviewsError ?? myReviewError;
|
|
32729
|
-
const visibleReviews =
|
|
32905
|
+
const visibleReviews = React26.useMemo(() => {
|
|
32730
32906
|
if (config.showMyReviewInList || !myReview) {
|
|
32731
32907
|
return reviews;
|
|
32732
32908
|
}
|
|
32733
32909
|
return reviews.filter((review) => review.id !== myReview.id);
|
|
32734
32910
|
}, [config.showMyReviewInList, myReview, reviews]);
|
|
32735
|
-
const applyReview =
|
|
32911
|
+
const applyReview = React26.useCallback((review) => {
|
|
32736
32912
|
setReviews((prev) => upsertReview(prev, review));
|
|
32737
32913
|
setMyReview((prev) => {
|
|
32738
32914
|
if (!prev || prev.id !== review.id) {
|
|
@@ -32741,7 +32917,7 @@ function useReviewThreadState({
|
|
|
32741
32917
|
return review;
|
|
32742
32918
|
});
|
|
32743
32919
|
}, []);
|
|
32744
|
-
const applyReviewUpdater =
|
|
32920
|
+
const applyReviewUpdater = React26.useCallback(
|
|
32745
32921
|
(reviewId, updater) => {
|
|
32746
32922
|
setReviews((prev) => updateReview(prev, reviewId, updater));
|
|
32747
32923
|
setMyReview((prev) => {
|
|
@@ -32753,7 +32929,7 @@ function useReviewThreadState({
|
|
|
32753
32929
|
},
|
|
32754
32930
|
[]
|
|
32755
32931
|
);
|
|
32756
|
-
const removeReviewById =
|
|
32932
|
+
const removeReviewById = React26.useCallback((reviewId) => {
|
|
32757
32933
|
setReviews((prev) => removeReview(prev, reviewId));
|
|
32758
32934
|
setMyReview((prev) => {
|
|
32759
32935
|
if (!prev || prev.id !== reviewId) {
|
|
@@ -32762,7 +32938,7 @@ function useReviewThreadState({
|
|
|
32762
32938
|
return null;
|
|
32763
32939
|
});
|
|
32764
32940
|
}, []);
|
|
32765
|
-
const loadReviews =
|
|
32941
|
+
const loadReviews = React26.useCallback(async () => {
|
|
32766
32942
|
try {
|
|
32767
32943
|
setIsLoadingReviews(true);
|
|
32768
32944
|
setReviewsError(null);
|
|
@@ -32776,7 +32952,7 @@ function useReviewThreadState({
|
|
|
32776
32952
|
setIsLoadingReviews(false);
|
|
32777
32953
|
}
|
|
32778
32954
|
}, [config.reviewsPerPage, dataSource, targetId]);
|
|
32779
|
-
const loadMyReview =
|
|
32955
|
+
const loadMyReview = React26.useCallback(async () => {
|
|
32780
32956
|
if (!dataSource.getMyReview || !shouldLoadMyReview) {
|
|
32781
32957
|
setMyReview(null);
|
|
32782
32958
|
setIsLoadingMyReview(false);
|
|
@@ -32795,10 +32971,10 @@ function useReviewThreadState({
|
|
|
32795
32971
|
setIsLoadingMyReview(false);
|
|
32796
32972
|
}
|
|
32797
32973
|
}, [dataSource, shouldLoadMyReview, targetId]);
|
|
32798
|
-
const reload =
|
|
32974
|
+
const reload = React26.useCallback(async () => {
|
|
32799
32975
|
await Promise.all([loadReviews(), loadMyReview()]);
|
|
32800
32976
|
}, [loadReviews, loadMyReview]);
|
|
32801
|
-
const createReview =
|
|
32977
|
+
const createReview = React26.useCallback(
|
|
32802
32978
|
async (values) => {
|
|
32803
32979
|
try {
|
|
32804
32980
|
setIsCreatingReview(true);
|
|
@@ -32817,7 +32993,7 @@ function useReviewThreadState({
|
|
|
32817
32993
|
},
|
|
32818
32994
|
[dataSource, onReviewCreated]
|
|
32819
32995
|
);
|
|
32820
|
-
const updateReview2 =
|
|
32996
|
+
const updateReview2 = React26.useCallback(
|
|
32821
32997
|
async (review, values) => {
|
|
32822
32998
|
try {
|
|
32823
32999
|
setIsUpdatingReview(true);
|
|
@@ -32842,7 +33018,7 @@ function useReviewThreadState({
|
|
|
32842
33018
|
},
|
|
32843
33019
|
[dataSource, onReviewUpdated]
|
|
32844
33020
|
);
|
|
32845
|
-
const deleteReview =
|
|
33021
|
+
const deleteReview = React26.useCallback(
|
|
32846
33022
|
async (review) => {
|
|
32847
33023
|
try {
|
|
32848
33024
|
setIsDeletingReview(true);
|
|
@@ -32855,7 +33031,7 @@ function useReviewThreadState({
|
|
|
32855
33031
|
},
|
|
32856
33032
|
[dataSource, onReviewDeleted, removeReviewById]
|
|
32857
33033
|
);
|
|
32858
|
-
const createReviewReply =
|
|
33034
|
+
const createReviewReply = React26.useCallback(
|
|
32859
33035
|
async (input) => {
|
|
32860
33036
|
if (!dataSource.createReviewReply) {
|
|
32861
33037
|
throw new Error("createReviewReply is not implemented by dataSource.");
|
|
@@ -32878,7 +33054,7 @@ function useReviewThreadState({
|
|
|
32878
33054
|
},
|
|
32879
33055
|
[applyReview, applyReviewUpdater, config.maxRepliesPerReview, dataSource]
|
|
32880
33056
|
);
|
|
32881
|
-
const updateReviewReply2 =
|
|
33057
|
+
const updateReviewReply2 = React26.useCallback(
|
|
32882
33058
|
async (input) => {
|
|
32883
33059
|
if (!dataSource.updateReviewReply) {
|
|
32884
33060
|
throw new Error("updateReviewReply is not implemented by dataSource.");
|
|
@@ -32901,7 +33077,7 @@ function useReviewThreadState({
|
|
|
32901
33077
|
},
|
|
32902
33078
|
[applyReview, applyReviewUpdater, dataSource]
|
|
32903
33079
|
);
|
|
32904
|
-
const deleteReviewReply =
|
|
33080
|
+
const deleteReviewReply = React26.useCallback(
|
|
32905
33081
|
async (reviewId, replyId) => {
|
|
32906
33082
|
if (!dataSource.deleteReviewReply) {
|
|
32907
33083
|
throw new Error("deleteReviewReply is not implemented by dataSource.");
|
|
@@ -32924,7 +33100,7 @@ function useReviewThreadState({
|
|
|
32924
33100
|
},
|
|
32925
33101
|
[applyReview, applyReviewUpdater, dataSource]
|
|
32926
33102
|
);
|
|
32927
|
-
|
|
33103
|
+
React26.useEffect(() => {
|
|
32928
33104
|
let cancelled = false;
|
|
32929
33105
|
async function run() {
|
|
32930
33106
|
try {
|
|
@@ -32951,7 +33127,7 @@ function useReviewThreadState({
|
|
|
32951
33127
|
cancelled = true;
|
|
32952
33128
|
};
|
|
32953
33129
|
}, [config.reviewsPerPage, dataSource, targetId]);
|
|
32954
|
-
|
|
33130
|
+
React26.useEffect(() => {
|
|
32955
33131
|
let cancelled = false;
|
|
32956
33132
|
async function run() {
|
|
32957
33133
|
if (!dataSource.getMyReview || !shouldLoadMyReview) {
|
|
@@ -32983,19 +33159,19 @@ function useReviewThreadState({
|
|
|
32983
33159
|
cancelled = true;
|
|
32984
33160
|
};
|
|
32985
33161
|
}, [dataSource, shouldLoadMyReview, targetId]);
|
|
32986
|
-
|
|
33162
|
+
React26.useEffect(() => {
|
|
32987
33163
|
if (!updatedReview) {
|
|
32988
33164
|
return;
|
|
32989
33165
|
}
|
|
32990
33166
|
applyReview(updatedReview);
|
|
32991
33167
|
}, [applyReview, updatedReview]);
|
|
32992
|
-
|
|
33168
|
+
React26.useEffect(() => {
|
|
32993
33169
|
if (!deletedReview) {
|
|
32994
33170
|
return;
|
|
32995
33171
|
}
|
|
32996
33172
|
removeReviewById(deletedReview.id);
|
|
32997
33173
|
}, [deletedReview, removeReviewById]);
|
|
32998
|
-
|
|
33174
|
+
React26.useEffect(() => {
|
|
32999
33175
|
if (!updatedReviewReply) {
|
|
33000
33176
|
return;
|
|
33001
33177
|
}
|
|
@@ -33022,7 +33198,7 @@ function useReviewThreadState({
|
|
|
33022
33198
|
config.maxRepliesPerReview,
|
|
33023
33199
|
updatedReviewReply
|
|
33024
33200
|
]);
|
|
33025
|
-
|
|
33201
|
+
React26.useEffect(() => {
|
|
33026
33202
|
if (!deletedReviewReply) {
|
|
33027
33203
|
return;
|
|
33028
33204
|
}
|
|
@@ -33147,7 +33323,7 @@ function ReviewThread({
|
|
|
33147
33323
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-red-600/80 dark:text-red-300/80", children: "Something went wrong while loading the review thread." })
|
|
33148
33324
|
] }),
|
|
33149
33325
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33150
|
-
|
|
33326
|
+
Button_web_default,
|
|
33151
33327
|
{
|
|
33152
33328
|
text: "Retry",
|
|
33153
33329
|
variant: "danger",
|
|
@@ -33194,7 +33370,7 @@ function ReviewThread({
|
|
|
33194
33370
|
] });
|
|
33195
33371
|
}
|
|
33196
33372
|
var ReviewThread_default = ReviewThread;
|
|
33197
|
-
var MarkdownContext =
|
|
33373
|
+
var MarkdownContext = React26.createContext(null);
|
|
33198
33374
|
|
|
33199
33375
|
// src/compositions/markdown/utils/sanitizeHeading.ts
|
|
33200
33376
|
function sanitizeHeading(text10, options = {}) {
|
|
@@ -33415,30 +33591,30 @@ function MarkdownProvider({
|
|
|
33415
33591
|
onActiveHeadingChange
|
|
33416
33592
|
}) {
|
|
33417
33593
|
const resolvedMarkdown = value ?? markdown ?? "";
|
|
33418
|
-
const [internalActiveHeading, setInternalActiveHeading] =
|
|
33419
|
-
const headings =
|
|
33594
|
+
const [internalActiveHeading, setInternalActiveHeading] = React26.useState(defaultActiveHeading);
|
|
33595
|
+
const headings = React26.useMemo(() => {
|
|
33420
33596
|
if (externalHeadings) {
|
|
33421
33597
|
return externalHeadings;
|
|
33422
33598
|
}
|
|
33423
33599
|
return extractHeadings(resolvedMarkdown);
|
|
33424
33600
|
}, [externalHeadings, resolvedMarkdown]);
|
|
33425
|
-
const numberedHeadings =
|
|
33601
|
+
const numberedHeadings = React26.useMemo(() => {
|
|
33426
33602
|
return generateHeadingNumbers(headings);
|
|
33427
33603
|
}, [headings]);
|
|
33428
|
-
const headingMap =
|
|
33604
|
+
const headingMap = React26.useMemo(() => {
|
|
33429
33605
|
return headings.reduce((acc, heading3) => {
|
|
33430
33606
|
acc[heading3.id] = heading3;
|
|
33431
33607
|
return acc;
|
|
33432
33608
|
}, {});
|
|
33433
33609
|
}, [headings]);
|
|
33434
33610
|
const activeHeading = controlledActiveHeading ?? internalActiveHeading;
|
|
33435
|
-
const getHeadingById =
|
|
33611
|
+
const getHeadingById = React26.useCallback(
|
|
33436
33612
|
(id2) => {
|
|
33437
33613
|
return headingMap[id2];
|
|
33438
33614
|
},
|
|
33439
33615
|
[headingMap]
|
|
33440
33616
|
);
|
|
33441
|
-
const setActiveHeading =
|
|
33617
|
+
const setActiveHeading = React26.useCallback(
|
|
33442
33618
|
(id2) => {
|
|
33443
33619
|
if (controlledActiveHeading === void 0) {
|
|
33444
33620
|
setInternalActiveHeading(id2);
|
|
@@ -33447,7 +33623,7 @@ function MarkdownProvider({
|
|
|
33447
33623
|
},
|
|
33448
33624
|
[controlledActiveHeading, headingMap, onActiveHeadingChange]
|
|
33449
33625
|
);
|
|
33450
|
-
const contextValue =
|
|
33626
|
+
const contextValue = React26.useMemo(
|
|
33451
33627
|
() => ({
|
|
33452
33628
|
markdown: resolvedMarkdown,
|
|
33453
33629
|
headings,
|
|
@@ -33472,7 +33648,7 @@ function MarkdownProvider({
|
|
|
33472
33648
|
var MarkdownProvider_default = MarkdownProvider;
|
|
33473
33649
|
function useMarkdown(options = {}) {
|
|
33474
33650
|
const { required = false, errorMessage } = options;
|
|
33475
|
-
const context =
|
|
33651
|
+
const context = React26.useContext(MarkdownContext);
|
|
33476
33652
|
if (!context && required) {
|
|
33477
33653
|
throw new Error(
|
|
33478
33654
|
errorMessage || "useMarkdown must be used inside a MarkdownProvider."
|
|
@@ -33495,15 +33671,15 @@ function useActiveHeading(options = {}) {
|
|
|
33495
33671
|
onActiveHeadingChange
|
|
33496
33672
|
} = options;
|
|
33497
33673
|
const headings = externalHeadings ?? context?.headings ?? [];
|
|
33498
|
-
const [internalActiveHeading, setInternalActiveHeading] =
|
|
33674
|
+
const [internalActiveHeading, setInternalActiveHeading] = React26.useState(defaultActiveHeading);
|
|
33499
33675
|
const activeHeading = controlledActiveHeading ?? context?.activeHeading ?? internalActiveHeading;
|
|
33500
|
-
const headingMap =
|
|
33676
|
+
const headingMap = React26.useMemo(() => {
|
|
33501
33677
|
return headings.reduce((acc, heading3) => {
|
|
33502
33678
|
acc[heading3.id] = heading3;
|
|
33503
33679
|
return acc;
|
|
33504
33680
|
}, {});
|
|
33505
33681
|
}, [headings]);
|
|
33506
|
-
const setActiveHeading =
|
|
33682
|
+
const setActiveHeading = React26.useCallback(
|
|
33507
33683
|
(id2) => {
|
|
33508
33684
|
if (controlledActiveHeading === void 0 && !context) {
|
|
33509
33685
|
setInternalActiveHeading(id2);
|
|
@@ -33513,7 +33689,7 @@ function useActiveHeading(options = {}) {
|
|
|
33513
33689
|
},
|
|
33514
33690
|
[context, controlledActiveHeading, headingMap, onActiveHeadingChange]
|
|
33515
33691
|
);
|
|
33516
|
-
const scrollToHeading =
|
|
33692
|
+
const scrollToHeading = React26.useCallback(
|
|
33517
33693
|
(id2) => {
|
|
33518
33694
|
if (typeof document === "undefined") return;
|
|
33519
33695
|
const element7 = document.getElementById(id2);
|
|
@@ -33526,10 +33702,10 @@ function useActiveHeading(options = {}) {
|
|
|
33526
33702
|
},
|
|
33527
33703
|
[scrollBehavior, scrollBlock, setActiveHeading]
|
|
33528
33704
|
);
|
|
33529
|
-
const observedHeadingIds =
|
|
33705
|
+
const observedHeadingIds = React26.useMemo(() => {
|
|
33530
33706
|
return headings.map((heading3) => heading3.id).join("|");
|
|
33531
33707
|
}, [headings]);
|
|
33532
|
-
|
|
33708
|
+
React26.useEffect(() => {
|
|
33533
33709
|
if (!enabled) return;
|
|
33534
33710
|
if (typeof window === "undefined") return;
|
|
33535
33711
|
if (!("IntersectionObserver" in window)) return;
|
|
@@ -33578,7 +33754,7 @@ function useMarkdownHeadings(options = {}) {
|
|
|
33578
33754
|
minDepth = 1,
|
|
33579
33755
|
maxDepth = 6
|
|
33580
33756
|
} = options;
|
|
33581
|
-
const baseHeadings =
|
|
33757
|
+
const baseHeadings = React26.useMemo(() => {
|
|
33582
33758
|
if (externalHeadings) {
|
|
33583
33759
|
return externalHeadings;
|
|
33584
33760
|
}
|
|
@@ -33587,15 +33763,15 @@ function useMarkdownHeadings(options = {}) {
|
|
|
33587
33763
|
}
|
|
33588
33764
|
return context?.headings ?? [];
|
|
33589
33765
|
}, [context?.headings, externalHeadings, markdown]);
|
|
33590
|
-
const headings =
|
|
33766
|
+
const headings = React26.useMemo(() => {
|
|
33591
33767
|
return baseHeadings.filter((heading3) => {
|
|
33592
33768
|
return heading3.level >= minDepth && heading3.level <= maxDepth;
|
|
33593
33769
|
});
|
|
33594
33770
|
}, [baseHeadings, minDepth, maxDepth]);
|
|
33595
|
-
const numberedHeadings =
|
|
33771
|
+
const numberedHeadings = React26.useMemo(() => {
|
|
33596
33772
|
return generateHeadingNumbers(headings);
|
|
33597
33773
|
}, [headings]);
|
|
33598
|
-
const headingMap =
|
|
33774
|
+
const headingMap = React26.useMemo(() => {
|
|
33599
33775
|
return headings.reduce((acc, heading3) => {
|
|
33600
33776
|
acc[heading3.id] = heading3;
|
|
33601
33777
|
return acc;
|
|
@@ -33987,11 +34163,11 @@ function addChildren(props, children3) {
|
|
|
33987
34163
|
}
|
|
33988
34164
|
}
|
|
33989
34165
|
}
|
|
33990
|
-
function productionCreate(_2,
|
|
34166
|
+
function productionCreate(_2, jsx257, jsxs129) {
|
|
33991
34167
|
return create3;
|
|
33992
34168
|
function create3(_3, type2, props, key) {
|
|
33993
34169
|
const isStaticChildren = Array.isArray(props.children);
|
|
33994
|
-
const fn = isStaticChildren ?
|
|
34170
|
+
const fn = isStaticChildren ? jsxs129 : jsx257;
|
|
33995
34171
|
return key ? fn(type2, props, key) : fn(type2, props);
|
|
33996
34172
|
}
|
|
33997
34173
|
}
|
|
@@ -42381,7 +42557,7 @@ function markdownTable(table2, options) {
|
|
|
42381
42557
|
let rowIndex = -1;
|
|
42382
42558
|
while (++rowIndex < table2.length) {
|
|
42383
42559
|
const row2 = [];
|
|
42384
|
-
const
|
|
42560
|
+
const sizes5 = [];
|
|
42385
42561
|
let columnIndex2 = -1;
|
|
42386
42562
|
if (table2[rowIndex].length > mostCellsPerRow) {
|
|
42387
42563
|
mostCellsPerRow = table2[rowIndex].length;
|
|
@@ -42390,7 +42566,7 @@ function markdownTable(table2, options) {
|
|
|
42390
42566
|
const cell = serialize2(table2[rowIndex][columnIndex2]);
|
|
42391
42567
|
if (settings.alignDelimiters !== false) {
|
|
42392
42568
|
const size = stringLength(cell);
|
|
42393
|
-
|
|
42569
|
+
sizes5[columnIndex2] = size;
|
|
42394
42570
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
42395
42571
|
longestCellByColumn[columnIndex2] = size;
|
|
42396
42572
|
}
|
|
@@ -42398,7 +42574,7 @@ function markdownTable(table2, options) {
|
|
|
42398
42574
|
row2.push(cell);
|
|
42399
42575
|
}
|
|
42400
42576
|
cellMatrix[rowIndex] = row2;
|
|
42401
|
-
sizeMatrix[rowIndex] =
|
|
42577
|
+
sizeMatrix[rowIndex] = sizes5;
|
|
42402
42578
|
}
|
|
42403
42579
|
let columnIndex = -1;
|
|
42404
42580
|
if (typeof align === "object" && "length" in align) {
|
|
@@ -42413,7 +42589,7 @@ function markdownTable(table2, options) {
|
|
|
42413
42589
|
}
|
|
42414
42590
|
columnIndex = -1;
|
|
42415
42591
|
const row = [];
|
|
42416
|
-
const
|
|
42592
|
+
const sizes4 = [];
|
|
42417
42593
|
while (++columnIndex < mostCellsPerRow) {
|
|
42418
42594
|
const code4 = alignments[columnIndex];
|
|
42419
42595
|
let before = "";
|
|
@@ -42436,17 +42612,17 @@ function markdownTable(table2, options) {
|
|
|
42436
42612
|
if (size > longestCellByColumn[columnIndex]) {
|
|
42437
42613
|
longestCellByColumn[columnIndex] = size;
|
|
42438
42614
|
}
|
|
42439
|
-
|
|
42615
|
+
sizes4[columnIndex] = size;
|
|
42440
42616
|
}
|
|
42441
42617
|
row[columnIndex] = cell;
|
|
42442
42618
|
}
|
|
42443
42619
|
cellMatrix.splice(1, 0, row);
|
|
42444
|
-
sizeMatrix.splice(1, 0,
|
|
42620
|
+
sizeMatrix.splice(1, 0, sizes4);
|
|
42445
42621
|
rowIndex = -1;
|
|
42446
42622
|
const lines = [];
|
|
42447
42623
|
while (++rowIndex < cellMatrix.length) {
|
|
42448
42624
|
const row2 = cellMatrix[rowIndex];
|
|
42449
|
-
const
|
|
42625
|
+
const sizes5 = sizeMatrix[rowIndex];
|
|
42450
42626
|
columnIndex = -1;
|
|
42451
42627
|
const line = [];
|
|
42452
42628
|
while (++columnIndex < mostCellsPerRow) {
|
|
@@ -42454,7 +42630,7 @@ function markdownTable(table2, options) {
|
|
|
42454
42630
|
let before = "";
|
|
42455
42631
|
let after = "";
|
|
42456
42632
|
if (settings.alignDelimiters !== false) {
|
|
42457
|
-
const size = longestCellByColumn[columnIndex] - (
|
|
42633
|
+
const size = longestCellByColumn[columnIndex] - (sizes5[columnIndex] || 0);
|
|
42458
42634
|
const code4 = alignments[columnIndex];
|
|
42459
42635
|
if (code4 === 114) {
|
|
42460
42636
|
before = " ".repeat(size);
|
|
@@ -54015,7 +54191,7 @@ function MarkdownHeading({
|
|
|
54015
54191
|
const normalizedLevel = Math.min(Math.max(level, 1), 6);
|
|
54016
54192
|
const TypographyComponent = normalizedLevel <= 3 ? Chapter : Section;
|
|
54017
54193
|
const typographyLevel = normalizedLevel <= 3 ? normalizedLevel : normalizedLevel - 3;
|
|
54018
|
-
return
|
|
54194
|
+
return React26.createElement(
|
|
54019
54195
|
TypographyComponent,
|
|
54020
54196
|
{
|
|
54021
54197
|
...props,
|
|
@@ -54250,7 +54426,7 @@ function createElement2(_ref) {
|
|
|
54250
54426
|
});
|
|
54251
54427
|
}
|
|
54252
54428
|
var children3 = childrenCreator(node2.children);
|
|
54253
|
-
return /* @__PURE__ */
|
|
54429
|
+
return /* @__PURE__ */ React26__default.default.createElement(TagName, _extends({
|
|
54254
54430
|
key
|
|
54255
54431
|
}, props), children3);
|
|
54256
54432
|
}
|
|
@@ -54293,7 +54469,7 @@ function getAllLineNumbers(_ref) {
|
|
|
54293
54469
|
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style2 = _ref.style;
|
|
54294
54470
|
return lines.map(function(_2, i) {
|
|
54295
54471
|
var number3 = i + startingLineNumber;
|
|
54296
|
-
return /* @__PURE__ */
|
|
54472
|
+
return /* @__PURE__ */ React26__default.default.createElement("span", {
|
|
54297
54473
|
key: "line-".concat(i),
|
|
54298
54474
|
className: "react-syntax-highlighter-line-number",
|
|
54299
54475
|
style: typeof style2 === "function" ? style2(number3) : style2
|
|
@@ -54305,7 +54481,7 @@ function AllLineNumbers(_ref2) {
|
|
|
54305
54481
|
"float": "left",
|
|
54306
54482
|
paddingRight: "10px"
|
|
54307
54483
|
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
|
54308
|
-
return /* @__PURE__ */
|
|
54484
|
+
return /* @__PURE__ */ React26__default.default.createElement("code", {
|
|
54309
54485
|
style: Object.assign({}, codeStyle, containerStyle)
|
|
54310
54486
|
}, getAllLineNumbers({
|
|
54311
54487
|
lines: codeString.replace(/\n$/, "").split("\n"),
|
|
@@ -54526,7 +54702,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54526
54702
|
style: _objectSpread2(_objectSpread2({}, style2['code[class*="language-"]']), style2['code[class*="language-'.concat(language, '"]')])
|
|
54527
54703
|
} : _ref7$codeTagProps, _ref7$useInlineStyles = _ref7.useInlineStyles, useInlineStyles = _ref7$useInlineStyles === void 0 ? true : _ref7$useInlineStyles, _ref7$showLineNumbers = _ref7.showLineNumbers, showLineNumbers = _ref7$showLineNumbers === void 0 ? false : _ref7$showLineNumbers, _ref7$showInlineLineN = _ref7.showInlineLineNumbers, showInlineLineNumbers = _ref7$showInlineLineN === void 0 ? true : _ref7$showInlineLineN, _ref7$startingLineNum = _ref7.startingLineNumber, startingLineNumber = _ref7$startingLineNum === void 0 ? 1 : _ref7$startingLineNum, lineNumberContainerStyle = _ref7.lineNumberContainerStyle, _ref7$lineNumberStyle = _ref7.lineNumberStyle, lineNumberStyle = _ref7$lineNumberStyle === void 0 ? {} : _ref7$lineNumberStyle, wrapLines = _ref7.wrapLines, _ref7$wrapLongLines = _ref7.wrapLongLines, wrapLongLines = _ref7$wrapLongLines === void 0 ? false : _ref7$wrapLongLines, _ref7$lineProps = _ref7.lineProps, lineProps = _ref7$lineProps === void 0 ? {} : _ref7$lineProps, renderer = _ref7.renderer, _ref7$PreTag = _ref7.PreTag, PreTag = _ref7$PreTag === void 0 ? "pre" : _ref7$PreTag, _ref7$CodeTag = _ref7.CodeTag, CodeTag = _ref7$CodeTag === void 0 ? "code" : _ref7$CodeTag, _ref7$code = _ref7.code, code4 = _ref7$code === void 0 ? (Array.isArray(children3) ? children3[0] : children3) || "" : _ref7$code, astGenerator = _ref7.astGenerator, rest = _objectWithoutProperties(_ref7, _excluded);
|
|
54528
54704
|
astGenerator = astGenerator || defaultAstGenerator;
|
|
54529
|
-
var allLineNumbers = showLineNumbers ? /* @__PURE__ */
|
|
54705
|
+
var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React26__default.default.createElement(AllLineNumbers, {
|
|
54530
54706
|
containerStyle: lineNumberContainerStyle,
|
|
54531
54707
|
codeStyle: codeTagProps.style || {},
|
|
54532
54708
|
numberStyle: lineNumberStyle,
|
|
@@ -54553,7 +54729,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54553
54729
|
}, codeTagProps.style);
|
|
54554
54730
|
}
|
|
54555
54731
|
if (!astGenerator) {
|
|
54556
|
-
return /* @__PURE__ */
|
|
54732
|
+
return /* @__PURE__ */ React26__default.default.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ React26__default.default.createElement(CodeTag, codeTagProps, code4));
|
|
54557
54733
|
}
|
|
54558
54734
|
if (wrapLines === void 0 && renderer || wrapLongLines) wrapLines = true;
|
|
54559
54735
|
renderer = renderer || defaultRenderer;
|
|
@@ -54573,7 +54749,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54573
54749
|
var lineBreakCount = (_code$match$length = (_code$match = code4.match(/\n/g)) === null || _code$match === void 0 ? void 0 : _code$match.length) !== null && _code$match$length !== void 0 ? _code$match$length : 0;
|
|
54574
54750
|
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
54575
54751
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
54576
|
-
return /* @__PURE__ */
|
|
54752
|
+
return /* @__PURE__ */ React26__default.default.createElement(PreTag, preProps, /* @__PURE__ */ React26__default.default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
54577
54753
|
rows,
|
|
54578
54754
|
stylesheet: style2,
|
|
54579
54755
|
useInlineStyles
|
|
@@ -54910,7 +55086,7 @@ var json_default = json;
|
|
|
54910
55086
|
|
|
54911
55087
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
|
|
54912
55088
|
init_jsx();
|
|
54913
|
-
var jsx_default =
|
|
55089
|
+
var jsx_default = jsx218;
|
|
54914
55090
|
|
|
54915
55091
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
|
|
54916
55092
|
init_markup();
|
|
@@ -55001,19 +55177,19 @@ function MarkdownCodeBlock({
|
|
|
55001
55177
|
wrapLongLines = false,
|
|
55002
55178
|
...props
|
|
55003
55179
|
}) {
|
|
55004
|
-
const [copied, setCopied] =
|
|
55005
|
-
const timeoutRef =
|
|
55180
|
+
const [copied, setCopied] = React26.useState(false);
|
|
55181
|
+
const timeoutRef = React26.useRef(null);
|
|
55006
55182
|
const title = meta?.title ?? meta?.filename;
|
|
55007
|
-
const resolvedLanguage =
|
|
55183
|
+
const resolvedLanguage = React26.useMemo(() => {
|
|
55008
55184
|
return normalizeLanguage(language);
|
|
55009
55185
|
}, [language]);
|
|
55010
55186
|
const languageLabel = language || resolvedLanguage;
|
|
55011
55187
|
const showHeader = Boolean(title || languageLabel || showCopy);
|
|
55012
|
-
const highlightLines =
|
|
55188
|
+
const highlightLines = React26.useMemo(() => {
|
|
55013
55189
|
return new Set(meta?.highlightLines ?? []);
|
|
55014
55190
|
}, [meta?.highlightLines]);
|
|
55015
55191
|
const showLineNumbers = Boolean(meta?.showLineNumbers);
|
|
55016
|
-
|
|
55192
|
+
React26.useEffect(() => {
|
|
55017
55193
|
return () => {
|
|
55018
55194
|
if (timeoutRef.current) {
|
|
55019
55195
|
window.clearTimeout(timeoutRef.current);
|
|
@@ -55503,7 +55679,7 @@ function getTextContent(node2) {
|
|
|
55503
55679
|
if (Array.isArray(node2)) {
|
|
55504
55680
|
return node2.map(getTextContent).join("");
|
|
55505
55681
|
}
|
|
55506
|
-
if (
|
|
55682
|
+
if (React26.isValidElement(node2)) {
|
|
55507
55683
|
return getTextContent(node2.props.children);
|
|
55508
55684
|
}
|
|
55509
55685
|
return "";
|
|
@@ -55923,7 +56099,7 @@ function MarkdownViewer({
|
|
|
55923
56099
|
}) {
|
|
55924
56100
|
const context = useMarkdown();
|
|
55925
56101
|
const markdown = value ?? context?.markdown ?? "";
|
|
55926
|
-
const headings =
|
|
56102
|
+
const headings = React26.useMemo(() => {
|
|
55927
56103
|
if (externalHeadings) {
|
|
55928
56104
|
return externalHeadings;
|
|
55929
56105
|
}
|
|
@@ -56015,14 +56191,14 @@ function MarkdownTOC({
|
|
|
56015
56191
|
onHeadingClick
|
|
56016
56192
|
}) {
|
|
56017
56193
|
const context = useMarkdown();
|
|
56018
|
-
const [collapsed, setCollapsed] =
|
|
56194
|
+
const [collapsed, setCollapsed] = React26.useState(defaultCollapsed);
|
|
56019
56195
|
const { headings, numberedHeadings, hasHeadings } = useMarkdownHeadings({
|
|
56020
56196
|
markdown,
|
|
56021
56197
|
headings: externalHeadings,
|
|
56022
56198
|
minDepth,
|
|
56023
56199
|
maxDepth
|
|
56024
56200
|
});
|
|
56025
|
-
const tocHeadings =
|
|
56201
|
+
const tocHeadings = React26.useMemo(() => {
|
|
56026
56202
|
return numbered ? numberedHeadings : headings;
|
|
56027
56203
|
}, [headings, numbered, numberedHeadings]);
|
|
56028
56204
|
const { activeHeading, scrollToHeading, setActiveHeading } = useActiveHeading(
|
|
@@ -56443,20 +56619,20 @@ function MarkdownSourceEditor({
|
|
|
56443
56619
|
onKeyDown,
|
|
56444
56620
|
...props
|
|
56445
56621
|
}) {
|
|
56446
|
-
const textareaRef =
|
|
56622
|
+
const textareaRef = React26.useRef(null);
|
|
56447
56623
|
const isControlled = value !== void 0;
|
|
56448
56624
|
const isViewModeControlled = viewMode !== void 0;
|
|
56449
|
-
const [internalValue, setInternalValue] =
|
|
56450
|
-
const [internalViewMode, setInternalViewMode] =
|
|
56625
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56626
|
+
const [internalViewMode, setInternalViewMode] = React26.useState(defaultViewMode);
|
|
56451
56627
|
const currentValue = isControlled ? value : internalValue;
|
|
56452
56628
|
const currentViewMode = isViewModeControlled ? viewMode : internalViewMode;
|
|
56453
56629
|
const resolvedValue = currentValue ?? "";
|
|
56454
|
-
|
|
56630
|
+
React26.useEffect(() => {
|
|
56455
56631
|
if (!isControlled) {
|
|
56456
56632
|
setInternalValue(defaultValue);
|
|
56457
56633
|
}
|
|
56458
56634
|
}, [defaultValue, isControlled]);
|
|
56459
|
-
|
|
56635
|
+
React26.useEffect(() => {
|
|
56460
56636
|
if (!isViewModeControlled) {
|
|
56461
56637
|
setInternalViewMode(defaultViewMode);
|
|
56462
56638
|
}
|
|
@@ -56624,9 +56800,9 @@ function MarkdownSplitEditor({
|
|
|
56624
56800
|
...sourceEditorProps
|
|
56625
56801
|
}) {
|
|
56626
56802
|
const isControlled = value !== void 0;
|
|
56627
|
-
const [internalValue, setInternalValue] =
|
|
56803
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56628
56804
|
const currentValue = isControlled ? value : internalValue;
|
|
56629
|
-
|
|
56805
|
+
React26.useEffect(() => {
|
|
56630
56806
|
if (!isControlled) {
|
|
56631
56807
|
setInternalValue(defaultValue);
|
|
56632
56808
|
}
|
|
@@ -56705,9 +56881,9 @@ function MarkdownEditor({
|
|
|
56705
56881
|
...sourceEditorProps
|
|
56706
56882
|
}) {
|
|
56707
56883
|
const isControlled = value !== void 0;
|
|
56708
|
-
const [internalValue, setInternalValue] =
|
|
56884
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56709
56885
|
const currentValue = isControlled ? value : internalValue;
|
|
56710
|
-
|
|
56886
|
+
React26.useEffect(() => {
|
|
56711
56887
|
if (!isControlled) {
|
|
56712
56888
|
setInternalValue(defaultValue);
|
|
56713
56889
|
}
|
|
@@ -56837,9 +57013,9 @@ function CodeMirrorMarkdownEditor({
|
|
|
56837
57013
|
extensions
|
|
56838
57014
|
}) {
|
|
56839
57015
|
const isControlled = value !== void 0;
|
|
56840
|
-
const [internalValue, setInternalValue] =
|
|
57016
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56841
57017
|
const currentValue = isControlled ? value : internalValue;
|
|
56842
|
-
|
|
57018
|
+
React26.useEffect(() => {
|
|
56843
57019
|
if (!isControlled) {
|
|
56844
57020
|
setInternalValue(defaultValue);
|
|
56845
57021
|
}
|
|
@@ -56993,7 +57169,7 @@ function createDefaultPlugins({
|
|
|
56993
57169
|
] : []
|
|
56994
57170
|
];
|
|
56995
57171
|
}
|
|
56996
|
-
var MDXMarkdownEditor =
|
|
57172
|
+
var MDXMarkdownEditor = React26.forwardRef(
|
|
56997
57173
|
function MDXMarkdownEditor2({
|
|
56998
57174
|
value,
|
|
56999
57175
|
defaultValue = "",
|
|
@@ -57024,11 +57200,11 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
57024
57200
|
linkDialogOptions,
|
|
57025
57201
|
...props
|
|
57026
57202
|
}, forwardedRef) {
|
|
57027
|
-
const editorRef =
|
|
57203
|
+
const editorRef = React26.useRef(null);
|
|
57028
57204
|
const isControlled = value !== void 0;
|
|
57029
|
-
const [internalValue, setInternalValue] =
|
|
57205
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
57030
57206
|
const currentValue = isControlled ? value : internalValue;
|
|
57031
|
-
const defaultPlugins =
|
|
57207
|
+
const defaultPlugins = React26.useMemo(
|
|
57032
57208
|
() => createDefaultPlugins({
|
|
57033
57209
|
showToolbar,
|
|
57034
57210
|
toolbarPosition,
|
|
@@ -57050,7 +57226,7 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
57050
57226
|
toolbarPosition
|
|
57051
57227
|
]
|
|
57052
57228
|
);
|
|
57053
|
-
|
|
57229
|
+
React26.useImperativeHandle(
|
|
57054
57230
|
forwardedRef,
|
|
57055
57231
|
() => ({
|
|
57056
57232
|
focus: (callbackFn, options) => editorRef.current?.focus(callbackFn, options),
|
|
@@ -57062,7 +57238,7 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
57062
57238
|
}),
|
|
57063
57239
|
[currentValue]
|
|
57064
57240
|
);
|
|
57065
|
-
|
|
57241
|
+
React26.useEffect(() => {
|
|
57066
57242
|
if (!isControlled || !editorRef.current) return;
|
|
57067
57243
|
const nextValue = value ?? "";
|
|
57068
57244
|
if (editorRef.current.getMarkdown() !== nextValue) {
|
|
@@ -57144,7 +57320,7 @@ function MDXMarkdownField({
|
|
|
57144
57320
|
helperTextClassName,
|
|
57145
57321
|
...editorProps
|
|
57146
57322
|
}) {
|
|
57147
|
-
const editorRef =
|
|
57323
|
+
const editorRef = React26.useRef(null);
|
|
57148
57324
|
const [field, meta, helpers] = formik.useField({
|
|
57149
57325
|
name: name2,
|
|
57150
57326
|
validate
|
|
@@ -57551,7 +57727,7 @@ function SidebarLayout({
|
|
|
57551
57727
|
header = /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
|
|
57552
57728
|
footer: footer2 = /* @__PURE__ */ jsxRuntime.jsx(Footer, {})
|
|
57553
57729
|
}) {
|
|
57554
|
-
const [showSidebar, setShowSidebar] =
|
|
57730
|
+
const [showSidebar, setShowSidebar] = React26.useState(true);
|
|
57555
57731
|
return /* @__PURE__ */ jsxRuntime.jsx(GenericLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsx(Layout, { children: /* @__PURE__ */ jsxRuntime.jsx(Layout, { flexDirection: "horizontal", children: /* @__PURE__ */ jsxRuntime.jsxs(Content, { sidebarVisible: showSidebar, styles: "theme-bg-md pt-[60px]", children: [
|
|
57556
57732
|
/* @__PURE__ */ jsxRuntime.jsx(ContentArea_default, { children: children3 }),
|
|
57557
57733
|
footer2
|
|
@@ -57576,11 +57752,32 @@ function SidemenuLayout({ data, children: children3 }) {
|
|
|
57576
57752
|
) });
|
|
57577
57753
|
}
|
|
57578
57754
|
var SidemenuLayout_default = SidemenuLayout;
|
|
57755
|
+
var EUIDevPreviewPlatformContext = React26.createContext({
|
|
57756
|
+
platform: "web",
|
|
57757
|
+
setPlatform: () => void 0
|
|
57758
|
+
});
|
|
57759
|
+
var useEUIDevPreviewPlatform = () => React26.useContext(EUIDevPreviewPlatformContext);
|
|
57579
57760
|
function EUIDevLayout({
|
|
57580
57761
|
children: children3,
|
|
57581
|
-
header
|
|
57762
|
+
header,
|
|
57582
57763
|
footer: footer2 = /* @__PURE__ */ jsxRuntime.jsx(Footer, {})
|
|
57583
57764
|
}) {
|
|
57765
|
+
const [platform, setPlatform] = React26.useState("web");
|
|
57766
|
+
const previewPlatform = React26.useMemo(
|
|
57767
|
+
() => ({
|
|
57768
|
+
platform,
|
|
57769
|
+
setPlatform
|
|
57770
|
+
}),
|
|
57771
|
+
[platform]
|
|
57772
|
+
);
|
|
57773
|
+
const resolvedHeader = header ?? /* @__PURE__ */ jsxRuntime.jsx(
|
|
57774
|
+
Header,
|
|
57775
|
+
{
|
|
57776
|
+
onPreviewPlatformChange: setPlatform,
|
|
57777
|
+
previewPlatform: platform,
|
|
57778
|
+
showPreviewPlatformSelector: true
|
|
57779
|
+
}
|
|
57780
|
+
);
|
|
57584
57781
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57585
57782
|
EUIProvider,
|
|
57586
57783
|
{
|
|
@@ -57592,8 +57789,8 @@ function EUIDevLayout({
|
|
|
57592
57789
|
}
|
|
57593
57790
|
},
|
|
57594
57791
|
children: /* @__PURE__ */ jsxRuntime.jsx(GenericLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsxs(Layout, { children: [
|
|
57595
|
-
|
|
57596
|
-
/* @__PURE__ */ jsxRuntime.jsx(Content, { styles: "pt-[60px]", children: /* @__PURE__ */ jsxRuntime.jsx(ContentArea_default, { enablePadding: true, children: children3 }) }),
|
|
57792
|
+
resolvedHeader,
|
|
57793
|
+
/* @__PURE__ */ jsxRuntime.jsx(EUIDevPreviewPlatformContext.Provider, { value: previewPlatform, children: /* @__PURE__ */ jsxRuntime.jsx(Content, { styles: "pt-[60px]", children: /* @__PURE__ */ jsxRuntime.jsx(ContentArea_default, { enablePadding: true, children: children3 }) }) }),
|
|
57597
57794
|
footer2
|
|
57598
57795
|
] }) })
|
|
57599
57796
|
}
|
|
@@ -57605,7 +57802,7 @@ function ScrollToTop({
|
|
|
57605
57802
|
behavior = "smooth",
|
|
57606
57803
|
target
|
|
57607
57804
|
}) {
|
|
57608
|
-
|
|
57805
|
+
React26.useEffect(() => {
|
|
57609
57806
|
if (target) {
|
|
57610
57807
|
target.scrollTo({
|
|
57611
57808
|
top: 0,
|
|
@@ -57639,7 +57836,7 @@ exports.BoxNavItem = BoxNavItem_default;
|
|
|
57639
57836
|
exports.Brand = Brand;
|
|
57640
57837
|
exports.Breadcrumb = Breadcrumb;
|
|
57641
57838
|
exports.BreadcrumbItem = BreadcrumbItem_default;
|
|
57642
|
-
exports.Button =
|
|
57839
|
+
exports.Button = Button_web_default;
|
|
57643
57840
|
exports.CHART_COLOR_PALETTE = CHART_COLOR_PALETTE;
|
|
57644
57841
|
exports.CHART_DARK_THEME = CHART_DARK_THEME;
|
|
57645
57842
|
exports.CHART_DATA_MODES = CHART_DATA_MODES;
|
|
@@ -57820,6 +58017,7 @@ exports.Overline = Overline;
|
|
|
57820
58017
|
exports.Paragraph = Paragraph;
|
|
57821
58018
|
exports.PiePlot = PiePlot;
|
|
57822
58019
|
exports.PollingChartDataSource = PollingChartDataSource;
|
|
58020
|
+
exports.PreviewSwitch = PreviewSwitch;
|
|
57823
58021
|
exports.PriceTag = PriceTag;
|
|
57824
58022
|
exports.ProgressBar = ProgressBar;
|
|
57825
58023
|
exports.ProgressBarRating = ProgressBarRating;
|
|
@@ -57864,6 +58062,7 @@ exports.Tags = Tags_default;
|
|
|
57864
58062
|
exports.TextArea = TextArea_default;
|
|
57865
58063
|
exports.ThemeContext = ThemeContext;
|
|
57866
58064
|
exports.ThemeProvider = ThemeProvider;
|
|
58065
|
+
exports.ThemeSelect = ThemeSelect;
|
|
57867
58066
|
exports.ThemeSwitch = ThemeSwitch;
|
|
57868
58067
|
exports.TitleBanner = TitleBanner;
|
|
57869
58068
|
exports.Toast = Toast;
|
|
@@ -58000,6 +58199,7 @@ exports.useCookieConsent = useCookieConsent;
|
|
|
58000
58199
|
exports.useCurrentTheme = useCurrentTheme_default;
|
|
58001
58200
|
exports.useDrawer = useDrawer_default;
|
|
58002
58201
|
exports.useEUIConfig = useEUIConfig;
|
|
58202
|
+
exports.useEUIDevPreviewPlatform = useEUIDevPreviewPlatform;
|
|
58003
58203
|
exports.useIsMobile = useIsMobile_default;
|
|
58004
58204
|
exports.useMarkdown = useMarkdown;
|
|
58005
58205
|
exports.useMarkdownHeadings = useMarkdownHeadings;
|