elseware-ui 2.40.4 → 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 +95 -252
- package/dist/index.d.ts +95 -252
- package/dist/index.js +696 -395
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +390 -94
- 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
|
|
|
@@ -5110,10 +5110,18 @@ var getCurrentPath = () => {
|
|
|
5110
5110
|
if (!isBrowser()) return void 0;
|
|
5111
5111
|
return `${window.location.pathname}${window.location.search}`;
|
|
5112
5112
|
};
|
|
5113
|
+
var getCurrentFullUrl = () => {
|
|
5114
|
+
if (!isBrowser()) return void 0;
|
|
5115
|
+
return window.location.href;
|
|
5116
|
+
};
|
|
5113
5117
|
var getCurrentReferrer = () => {
|
|
5114
5118
|
if (!isBrowser()) return void 0;
|
|
5115
5119
|
return document.referrer || void 0;
|
|
5116
5120
|
};
|
|
5121
|
+
var getCurrentTitle = () => {
|
|
5122
|
+
if (!isBrowser()) return void 0;
|
|
5123
|
+
return document.title || void 0;
|
|
5124
|
+
};
|
|
5117
5125
|
var getConsentStatusFromCategories = (categories) => {
|
|
5118
5126
|
const optionalCategories = Object.entries(categories).filter(
|
|
5119
5127
|
([key]) => key !== "necessary"
|
|
@@ -5135,12 +5143,19 @@ var createAnalyticsEvent = ({
|
|
|
5135
5143
|
type: type2,
|
|
5136
5144
|
appId,
|
|
5137
5145
|
sessionId,
|
|
5138
|
-
anonymousId
|
|
5139
|
-
userId
|
|
5140
|
-
path:
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
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,
|
|
5156
|
+
metadata: {
|
|
5157
|
+
...options?.metadata
|
|
5158
|
+
}
|
|
5144
5159
|
});
|
|
5145
5160
|
|
|
5146
5161
|
// src/components/analytics/analytics.storage.ts
|
|
@@ -5218,11 +5233,11 @@ var AnalyticsProvider = ({
|
|
|
5218
5233
|
...DEFAULT_ANALYTICS_CONFIG,
|
|
5219
5234
|
...config
|
|
5220
5235
|
};
|
|
5221
|
-
const defaultConsent =
|
|
5236
|
+
const defaultConsent = React26.useMemo(
|
|
5222
5237
|
() => createDefaultConsent(consentVersion),
|
|
5223
5238
|
[consentVersion]
|
|
5224
5239
|
);
|
|
5225
|
-
const [consent, setConsent] =
|
|
5240
|
+
const [consent, setConsent] = React26.useState(() => {
|
|
5226
5241
|
const storedConsent = readConsentStorage(
|
|
5227
5242
|
resolvedConfig.storageKey,
|
|
5228
5243
|
defaultConsent
|
|
@@ -5232,17 +5247,17 @@ var AnalyticsProvider = ({
|
|
|
5232
5247
|
}
|
|
5233
5248
|
return storedConsent;
|
|
5234
5249
|
});
|
|
5235
|
-
const [anonymousId, setAnonymousId] =
|
|
5250
|
+
const [anonymousId, setAnonymousId] = React26.useState(() => {
|
|
5236
5251
|
if (!consent.categories.analytics) return null;
|
|
5237
5252
|
return ensureAnonymousIdStorage();
|
|
5238
5253
|
});
|
|
5239
|
-
const sessionIdRef =
|
|
5240
|
-
const queueRef =
|
|
5254
|
+
const sessionIdRef = React26.useRef(createAnalyticsId("ses"));
|
|
5255
|
+
const queueRef = React26.useRef(
|
|
5241
5256
|
resolvedConfig.persistQueue ? readAnalyticsQueueStorage() : []
|
|
5242
5257
|
);
|
|
5243
|
-
const flushingRef =
|
|
5258
|
+
const flushingRef = React26.useRef(false);
|
|
5244
5259
|
const hasAnalyticsConsent = consent.categories.analytics;
|
|
5245
|
-
const shouldTrack =
|
|
5260
|
+
const shouldTrack = React26.useCallback(() => {
|
|
5246
5261
|
if (!resolvedConfig.enabled) return false;
|
|
5247
5262
|
if (!hasAnalyticsConsent) return false;
|
|
5248
5263
|
if (resolvedConfig.respectDoNotTrack && getDoNotTrackEnabled()) {
|
|
@@ -5254,17 +5269,17 @@ var AnalyticsProvider = ({
|
|
|
5254
5269
|
resolvedConfig.enabled,
|
|
5255
5270
|
resolvedConfig.respectDoNotTrack
|
|
5256
5271
|
]);
|
|
5257
|
-
const persistQueue =
|
|
5272
|
+
const persistQueue = React26.useCallback(() => {
|
|
5258
5273
|
if (!resolvedConfig.persistQueue) return;
|
|
5259
5274
|
writeAnalyticsQueueStorage(queueRef.current);
|
|
5260
5275
|
}, [resolvedConfig.persistQueue]);
|
|
5261
|
-
const clearQueue =
|
|
5276
|
+
const clearQueue = React26.useCallback(() => {
|
|
5262
5277
|
queueRef.current = [];
|
|
5263
5278
|
if (resolvedConfig.persistQueue) {
|
|
5264
5279
|
clearAnalyticsQueueStorage();
|
|
5265
5280
|
}
|
|
5266
5281
|
}, [resolvedConfig.persistQueue]);
|
|
5267
|
-
const flush =
|
|
5282
|
+
const flush = React26.useCallback(async () => {
|
|
5268
5283
|
if (!transport || flushingRef.current) return;
|
|
5269
5284
|
if (!shouldTrack()) return;
|
|
5270
5285
|
if (queueRef.current.length === 0) return;
|
|
@@ -5282,7 +5297,7 @@ var AnalyticsProvider = ({
|
|
|
5282
5297
|
flushingRef.current = false;
|
|
5283
5298
|
}
|
|
5284
5299
|
}, [persistQueue, resolvedConfig.debug, shouldTrack, transport]);
|
|
5285
|
-
const track =
|
|
5300
|
+
const track = React26.useCallback(
|
|
5286
5301
|
async (type2, options) => {
|
|
5287
5302
|
if (!shouldTrack()) return;
|
|
5288
5303
|
const resolvedAnonymousId = anonymousId ?? ensureAnonymousIdStorage();
|
|
@@ -5315,7 +5330,7 @@ var AnalyticsProvider = ({
|
|
|
5315
5330
|
userId
|
|
5316
5331
|
]
|
|
5317
5332
|
);
|
|
5318
|
-
const applyConsent =
|
|
5333
|
+
const applyConsent = React26.useCallback(
|
|
5319
5334
|
(nextConsent) => {
|
|
5320
5335
|
setConsent(nextConsent);
|
|
5321
5336
|
writeConsentStorage(resolvedConfig.storageKey, nextConsent);
|
|
@@ -5330,7 +5345,7 @@ var AnalyticsProvider = ({
|
|
|
5330
5345
|
},
|
|
5331
5346
|
[clearQueue, onConsentChange, resolvedConfig.storageKey]
|
|
5332
5347
|
);
|
|
5333
|
-
const acceptAll =
|
|
5348
|
+
const acceptAll = React26.useCallback(() => {
|
|
5334
5349
|
applyConsent({
|
|
5335
5350
|
status: "accepted",
|
|
5336
5351
|
version: consentVersion,
|
|
@@ -5343,7 +5358,7 @@ var AnalyticsProvider = ({
|
|
|
5343
5358
|
}
|
|
5344
5359
|
});
|
|
5345
5360
|
}, [applyConsent, consentVersion]);
|
|
5346
|
-
const rejectAll =
|
|
5361
|
+
const rejectAll = React26.useCallback(() => {
|
|
5347
5362
|
applyConsent({
|
|
5348
5363
|
status: "rejected",
|
|
5349
5364
|
version: consentVersion,
|
|
@@ -5356,7 +5371,7 @@ var AnalyticsProvider = ({
|
|
|
5356
5371
|
}
|
|
5357
5372
|
});
|
|
5358
5373
|
}, [applyConsent, consentVersion]);
|
|
5359
|
-
const updateConsent =
|
|
5374
|
+
const updateConsent = React26.useCallback(
|
|
5360
5375
|
(categories) => {
|
|
5361
5376
|
const nextCategories = {
|
|
5362
5377
|
...consent.categories,
|
|
@@ -5372,14 +5387,14 @@ var AnalyticsProvider = ({
|
|
|
5372
5387
|
},
|
|
5373
5388
|
[applyConsent, consent.categories, consentVersion]
|
|
5374
5389
|
);
|
|
5375
|
-
const resetConsent =
|
|
5390
|
+
const resetConsent = React26.useCallback(() => {
|
|
5376
5391
|
setConsent(defaultConsent);
|
|
5377
5392
|
clearConsentStorage(resolvedConfig.storageKey);
|
|
5378
5393
|
clearAnonymousIdStorage();
|
|
5379
5394
|
clearQueue();
|
|
5380
5395
|
setAnonymousId(null);
|
|
5381
5396
|
}, [clearQueue, defaultConsent, resolvedConfig.storageKey]);
|
|
5382
|
-
|
|
5397
|
+
React26.useEffect(() => {
|
|
5383
5398
|
if (!isBrowser()) return;
|
|
5384
5399
|
const interval2 = window.setInterval(() => {
|
|
5385
5400
|
flush();
|
|
@@ -5388,7 +5403,7 @@ var AnalyticsProvider = ({
|
|
|
5388
5403
|
window.clearInterval(interval2);
|
|
5389
5404
|
};
|
|
5390
5405
|
}, [flush, resolvedConfig.flushIntervalMs]);
|
|
5391
|
-
|
|
5406
|
+
React26.useEffect(() => {
|
|
5392
5407
|
if (!isBrowser()) return;
|
|
5393
5408
|
const handleVisibilityChange = () => {
|
|
5394
5409
|
if (document.visibilityState !== "hidden") return;
|
|
@@ -5412,7 +5427,7 @@ var AnalyticsProvider = ({
|
|
|
5412
5427
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
5413
5428
|
};
|
|
5414
5429
|
}, [flush, persistQueue, shouldTrack, transport]);
|
|
5415
|
-
const value =
|
|
5430
|
+
const value = React26.useMemo(
|
|
5416
5431
|
() => ({
|
|
5417
5432
|
appId,
|
|
5418
5433
|
consent,
|
|
@@ -5975,9 +5990,9 @@ function ConfigBootstrap({
|
|
|
5975
5990
|
loadingFallback = null,
|
|
5976
5991
|
showStack = false
|
|
5977
5992
|
}) {
|
|
5978
|
-
const [RootApp, setRootApp] =
|
|
5979
|
-
const [loadError, setLoadError] =
|
|
5980
|
-
|
|
5993
|
+
const [RootApp, setRootApp] = React26.useState(null);
|
|
5994
|
+
const [loadError, setLoadError] = React26.useState(null);
|
|
5995
|
+
React26.useEffect(() => {
|
|
5981
5996
|
if (!config.isValid) {
|
|
5982
5997
|
return;
|
|
5983
5998
|
}
|
|
@@ -6018,16 +6033,16 @@ function ConfigBootstrap({
|
|
|
6018
6033
|
return /* @__PURE__ */ jsxRuntime.jsx(RootApp, {});
|
|
6019
6034
|
}
|
|
6020
6035
|
var ConfigBootstrap_default = ConfigBootstrap;
|
|
6021
|
-
var EUIContext =
|
|
6036
|
+
var EUIContext = React26.createContext(null);
|
|
6022
6037
|
var EUIProvider = ({
|
|
6023
6038
|
config,
|
|
6024
6039
|
children: children3
|
|
6025
6040
|
}) => {
|
|
6026
|
-
const [state, setState] =
|
|
6041
|
+
const [state, setState] = React26.useState(config);
|
|
6027
6042
|
return /* @__PURE__ */ jsxRuntime.jsx(EUIContext.Provider, { value: { config: state, setConfig: setState }, children: children3 });
|
|
6028
6043
|
};
|
|
6029
6044
|
var useEUIConfig = () => {
|
|
6030
|
-
const ctx =
|
|
6045
|
+
const ctx = React26.useContext(EUIContext);
|
|
6031
6046
|
if (!ctx) {
|
|
6032
6047
|
throw new Error("useEUIConfig must be used inside EUIProvider");
|
|
6033
6048
|
}
|
|
@@ -6043,6 +6058,31 @@ function resolveWithGlobal(config, props, defaults) {
|
|
|
6043
6058
|
};
|
|
6044
6059
|
}
|
|
6045
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
|
+
|
|
6046
6086
|
// src/data/enums.ts
|
|
6047
6087
|
var Shape = /* @__PURE__ */ ((Shape2) => {
|
|
6048
6088
|
Shape2["circle"] = "circle";
|
|
@@ -6218,7 +6258,31 @@ var toastShapeStyles = {
|
|
|
6218
6258
|
["softRoundedSquare" /* softRoundedSquare */]: "!rounded-3xl",
|
|
6219
6259
|
["square" /* square */]: "!rounded-none"
|
|
6220
6260
|
};
|
|
6221
|
-
|
|
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 = {
|
|
6222
6286
|
xs: "px-2 py-1 text-xs",
|
|
6223
6287
|
sm: "px-3 py-1.5 text-sm",
|
|
6224
6288
|
md: "px-4 py-2 text-base",
|
|
@@ -6233,24 +6297,54 @@ function Button({
|
|
|
6233
6297
|
loading = false,
|
|
6234
6298
|
disabled = false,
|
|
6235
6299
|
block = false,
|
|
6236
|
-
|
|
6237
|
-
|
|
6300
|
+
compact = false,
|
|
6301
|
+
mode,
|
|
6302
|
+
buttonColor,
|
|
6303
|
+
textColor,
|
|
6304
|
+
contentClassName,
|
|
6305
|
+
labelClassName,
|
|
6306
|
+
variant,
|
|
6307
|
+
appearance,
|
|
6238
6308
|
shape,
|
|
6239
|
-
size
|
|
6309
|
+
size,
|
|
6310
|
+
style: style2,
|
|
6311
|
+
contentStyle,
|
|
6312
|
+
labelStyle,
|
|
6313
|
+
accessibilityLabel,
|
|
6314
|
+
accessibilityRole,
|
|
6315
|
+
accessibilityState,
|
|
6316
|
+
testID,
|
|
6240
6317
|
className,
|
|
6241
6318
|
onMouseMove,
|
|
6319
|
+
onClick,
|
|
6320
|
+
onPress,
|
|
6242
6321
|
...rest
|
|
6243
6322
|
}) {
|
|
6244
|
-
const
|
|
6245
|
-
const
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6323
|
+
const accessibility = accessibilityState;
|
|
6324
|
+
const {
|
|
6325
|
+
shape: resolvedShape,
|
|
6326
|
+
size: resolvedSize,
|
|
6327
|
+
variant: resolvedVariant,
|
|
6328
|
+
appearance: resolvedAppearance
|
|
6329
|
+
} = useResolvedButtonConfig({
|
|
6330
|
+
compact,
|
|
6331
|
+
mode,
|
|
6249
6332
|
variant,
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6333
|
+
appearance,
|
|
6334
|
+
shape,
|
|
6335
|
+
size
|
|
6253
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;
|
|
6254
6348
|
const handleMouseMove = (e) => {
|
|
6255
6349
|
const btn = btnRef.current;
|
|
6256
6350
|
if (!btn) return;
|
|
@@ -6261,6 +6355,12 @@ function Button({
|
|
|
6261
6355
|
btn.style.setProperty("--glow-y", `${y3}px`);
|
|
6262
6356
|
onMouseMove?.(e);
|
|
6263
6357
|
};
|
|
6358
|
+
const handleClick = (e) => {
|
|
6359
|
+
onClick?.(e);
|
|
6360
|
+
if (!e.defaultPrevented) {
|
|
6361
|
+
onPress?.();
|
|
6362
|
+
}
|
|
6363
|
+
};
|
|
6264
6364
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6265
6365
|
"button",
|
|
6266
6366
|
{
|
|
@@ -6268,13 +6368,25 @@ function Button({
|
|
|
6268
6368
|
ref: btnRef,
|
|
6269
6369
|
type: type2,
|
|
6270
6370
|
disabled: disabled || loading,
|
|
6371
|
+
onClick: handleClick,
|
|
6271
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
|
+
},
|
|
6272
6383
|
className: cn(
|
|
6273
6384
|
"relative overflow-hidden group inline-flex items-center justify-center gap-2 transition-all duration-300",
|
|
6274
6385
|
variantStyles,
|
|
6275
|
-
|
|
6276
|
-
|
|
6386
|
+
buttonShapes[resolvedShape],
|
|
6387
|
+
webButtonSizes[resolvedSize],
|
|
6277
6388
|
block && "w-full",
|
|
6389
|
+
mode === "text" && "border-transparent bg-transparent",
|
|
6278
6390
|
(loading || disabled) && "brightness-75 grayscale cursor-not-allowed",
|
|
6279
6391
|
!loading && !disabled && "hover:cursor-pointer",
|
|
6280
6392
|
className
|
|
@@ -6296,14 +6408,41 @@ function Button({
|
|
|
6296
6408
|
}
|
|
6297
6409
|
),
|
|
6298
6410
|
loading && /* @__PURE__ */ jsxRuntime.jsx(index_js$1.AiOutlineLoading, { className: "animate-spin z-10" }),
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
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
|
+
)
|
|
6302
6441
|
]
|
|
6303
6442
|
}
|
|
6304
6443
|
);
|
|
6305
6444
|
}
|
|
6306
|
-
var
|
|
6445
|
+
var Button_web_default = Button;
|
|
6307
6446
|
var Backdrop = ({ children: children3, styles }) => {
|
|
6308
6447
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6309
6448
|
"div",
|
|
@@ -6588,17 +6727,17 @@ function useToastTimer({
|
|
|
6588
6727
|
pauseOnHover,
|
|
6589
6728
|
onTimeout
|
|
6590
6729
|
}) {
|
|
6591
|
-
const [isPaused, setIsPaused] =
|
|
6592
|
-
const timeoutRef =
|
|
6593
|
-
const startedAtRef =
|
|
6594
|
-
const remainingRef =
|
|
6595
|
-
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(() => {
|
|
6596
6735
|
if (timeoutRef.current !== null) {
|
|
6597
6736
|
window.clearTimeout(timeoutRef.current);
|
|
6598
6737
|
timeoutRef.current = null;
|
|
6599
6738
|
}
|
|
6600
6739
|
}, []);
|
|
6601
|
-
const startTimer =
|
|
6740
|
+
const startTimer = React26.useCallback(() => {
|
|
6602
6741
|
if (typeof duration !== "number" || duration <= 0) {
|
|
6603
6742
|
return;
|
|
6604
6743
|
}
|
|
@@ -6608,12 +6747,12 @@ function useToastTimer({
|
|
|
6608
6747
|
onTimeout();
|
|
6609
6748
|
}, remainingRef.current);
|
|
6610
6749
|
}, [clearTimer, duration, onTimeout]);
|
|
6611
|
-
|
|
6750
|
+
React26.useEffect(() => {
|
|
6612
6751
|
remainingRef.current = typeof duration === "number" ? duration : 0;
|
|
6613
6752
|
startTimer();
|
|
6614
6753
|
return clearTimer;
|
|
6615
6754
|
}, [clearTimer, duration, startTimer]);
|
|
6616
|
-
const pauseTimer =
|
|
6755
|
+
const pauseTimer = React26.useCallback(() => {
|
|
6617
6756
|
if (!pauseOnHover || typeof duration !== "number") {
|
|
6618
6757
|
return;
|
|
6619
6758
|
}
|
|
@@ -6624,14 +6763,14 @@ function useToastTimer({
|
|
|
6624
6763
|
);
|
|
6625
6764
|
setIsPaused(true);
|
|
6626
6765
|
}, [clearTimer, duration, pauseOnHover]);
|
|
6627
|
-
const resumeTimer =
|
|
6766
|
+
const resumeTimer = React26.useCallback(() => {
|
|
6628
6767
|
if (!pauseOnHover || typeof duration !== "number") {
|
|
6629
6768
|
return;
|
|
6630
6769
|
}
|
|
6631
6770
|
setIsPaused(false);
|
|
6632
6771
|
startTimer();
|
|
6633
6772
|
}, [duration, pauseOnHover, startTimer]);
|
|
6634
|
-
const progressStyle =
|
|
6773
|
+
const progressStyle = React26.useMemo(() => {
|
|
6635
6774
|
if (typeof duration !== "number") {
|
|
6636
6775
|
return void 0;
|
|
6637
6776
|
}
|
|
@@ -6672,7 +6811,7 @@ function ToastItem({
|
|
|
6672
6811
|
const duration = item.duration ?? autoClose;
|
|
6673
6812
|
const variant = toastStatusVariantMap[item.status];
|
|
6674
6813
|
const statusStyles = toastVariantStyles[variant];
|
|
6675
|
-
const dismiss =
|
|
6814
|
+
const dismiss = React26.useCallback(() => {
|
|
6676
6815
|
toastStore.remove(item.id);
|
|
6677
6816
|
}, [item.id]);
|
|
6678
6817
|
const { pauseTimer, resumeTimer, progressStyle } = useToastTimer({
|
|
@@ -6751,16 +6890,16 @@ var Toast = ({
|
|
|
6751
6890
|
...rest
|
|
6752
6891
|
}) => {
|
|
6753
6892
|
const eui = useEUIConfig();
|
|
6754
|
-
const [items, setItems] =
|
|
6893
|
+
const [items, setItems] = React26.useState(() => {
|
|
6755
6894
|
return toastStore.getSnapshot();
|
|
6756
6895
|
});
|
|
6757
|
-
|
|
6896
|
+
React26.useEffect(() => {
|
|
6758
6897
|
return toastStore.subscribe(setItems);
|
|
6759
6898
|
}, []);
|
|
6760
|
-
const safeShape =
|
|
6899
|
+
const safeShape = React26.useMemo(() => {
|
|
6761
6900
|
return normalizeToastShape(shape ?? eui?.config?.global?.shape);
|
|
6762
6901
|
}, [shape, eui?.config?.global?.shape]);
|
|
6763
|
-
const visibleItems =
|
|
6902
|
+
const visibleItems = React26.useMemo(() => {
|
|
6764
6903
|
const orderedItems = newestOnTop ? [...items].reverse() : [...items];
|
|
6765
6904
|
return orderedItems.slice(0, maxToasts);
|
|
6766
6905
|
}, [items, maxToasts, newestOnTop]);
|
|
@@ -6840,12 +6979,12 @@ function sendToast(data = {}) {
|
|
|
6840
6979
|
});
|
|
6841
6980
|
}
|
|
6842
6981
|
function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
6843
|
-
const [mounted, setMounted] =
|
|
6844
|
-
const [active, setActive] =
|
|
6845
|
-
const isInitialRenderRef =
|
|
6846
|
-
const frameOneRef =
|
|
6847
|
-
const frameTwoRef =
|
|
6848
|
-
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);
|
|
6849
6988
|
const clearTimers = () => {
|
|
6850
6989
|
if (frameOneRef.current) {
|
|
6851
6990
|
cancelAnimationFrame(frameOneRef.current);
|
|
@@ -6860,7 +6999,7 @@ function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
|
6860
6999
|
timeoutRef.current = null;
|
|
6861
7000
|
}
|
|
6862
7001
|
};
|
|
6863
|
-
|
|
7002
|
+
React26.useEffect(() => {
|
|
6864
7003
|
clearTimers();
|
|
6865
7004
|
if (isInitialRenderRef.current) {
|
|
6866
7005
|
isInitialRenderRef.current = false;
|
|
@@ -6888,16 +7027,16 @@ function useTransitionVisibility(visibility, leaveDuration = 150) {
|
|
|
6888
7027
|
};
|
|
6889
7028
|
}
|
|
6890
7029
|
function renderTransitionChild(children3, className) {
|
|
6891
|
-
const childCount =
|
|
7030
|
+
const childCount = React26.Children.count(children3);
|
|
6892
7031
|
if (childCount !== 1) {
|
|
6893
7032
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: children3 });
|
|
6894
7033
|
}
|
|
6895
|
-
const child =
|
|
6896
|
-
if (!
|
|
7034
|
+
const child = React26.Children.only(children3);
|
|
7035
|
+
if (!React26__default.default.isValidElement(child)) {
|
|
6897
7036
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children: child });
|
|
6898
7037
|
}
|
|
6899
7038
|
const element7 = child;
|
|
6900
|
-
return
|
|
7039
|
+
return React26__default.default.cloneElement(element7, {
|
|
6901
7040
|
className: classNames77__default.default(element7.props.className, className)
|
|
6902
7041
|
});
|
|
6903
7042
|
}
|
|
@@ -7116,7 +7255,7 @@ var toggleType = (visibility) => {
|
|
|
7116
7255
|
var PasswordVisibilityToggler = ({
|
|
7117
7256
|
onClick
|
|
7118
7257
|
}) => {
|
|
7119
|
-
const [passwordVisibility, setPasswordVisibilty] =
|
|
7258
|
+
const [passwordVisibility, setPasswordVisibilty] = React26.useState(false);
|
|
7120
7259
|
const handleOnClick = (visibility) => {
|
|
7121
7260
|
onClick(visibility);
|
|
7122
7261
|
setPasswordVisibilty(visibility);
|
|
@@ -7141,7 +7280,7 @@ var Input = ({
|
|
|
7141
7280
|
const eui = useEUIConfig();
|
|
7142
7281
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
7143
7282
|
const [field, meta] = formik.useField(props);
|
|
7144
|
-
const [passwordVisibility, setPasswordVisibilty] =
|
|
7283
|
+
const [passwordVisibility, setPasswordVisibilty] = React26.useState(false);
|
|
7145
7284
|
const inputType = type2 === "password" ? toggleType(passwordVisibility) : type2;
|
|
7146
7285
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-full", children: [
|
|
7147
7286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7186,7 +7325,7 @@ var InputFile = ({
|
|
|
7186
7325
|
styles,
|
|
7187
7326
|
...props
|
|
7188
7327
|
}) => {
|
|
7189
|
-
const fileInputRef =
|
|
7328
|
+
const fileInputRef = React26.useRef(null);
|
|
7190
7329
|
const [field, meta, helpers] = formik.useField(props);
|
|
7191
7330
|
const handleFileChange = (e) => {
|
|
7192
7331
|
const file = e.target.files?.[0] || null;
|
|
@@ -7714,8 +7853,8 @@ var DateSelector = ({
|
|
|
7714
7853
|
};
|
|
7715
7854
|
var DateSelector_default = DateSelector;
|
|
7716
7855
|
var FormObserver = ({ formik, onChange }) => {
|
|
7717
|
-
const prevValuesRef =
|
|
7718
|
-
|
|
7856
|
+
const prevValuesRef = React26.useRef(formik.values);
|
|
7857
|
+
React26.useEffect(() => {
|
|
7719
7858
|
if (!onChange) return;
|
|
7720
7859
|
const currentValues = formik.values;
|
|
7721
7860
|
const prevValues = prevValuesRef.current;
|
|
@@ -7734,7 +7873,7 @@ var FormObserver = ({ formik, onChange }) => {
|
|
|
7734
7873
|
};
|
|
7735
7874
|
var FormObserver_default = FormObserver;
|
|
7736
7875
|
var DirtyObserver = ({ formik, onDirtyChange }) => {
|
|
7737
|
-
|
|
7876
|
+
React26.useEffect(() => {
|
|
7738
7877
|
if (onDirtyChange) {
|
|
7739
7878
|
onDirtyChange(formik.dirty);
|
|
7740
7879
|
}
|
|
@@ -7743,7 +7882,7 @@ var DirtyObserver = ({ formik, onDirtyChange }) => {
|
|
|
7743
7882
|
};
|
|
7744
7883
|
var DirtyObserver_default = DirtyObserver;
|
|
7745
7884
|
var UnsavedChangesGuard = ({ formik, enabled }) => {
|
|
7746
|
-
|
|
7885
|
+
React26.useEffect(() => {
|
|
7747
7886
|
if (!enabled) return;
|
|
7748
7887
|
const handleBeforeUnload = (e) => {
|
|
7749
7888
|
if (!formik.dirty) return;
|
|
@@ -7787,7 +7926,7 @@ var Form = ({
|
|
|
7787
7926
|
}
|
|
7788
7927
|
);
|
|
7789
7928
|
};
|
|
7790
|
-
var
|
|
7929
|
+
var sizes = {
|
|
7791
7930
|
xs: "px-2 py-1 text-xs",
|
|
7792
7931
|
sm: "px-3 py-2 text-sm",
|
|
7793
7932
|
md: "px-4 py-2 text-base",
|
|
@@ -7808,7 +7947,7 @@ function FormResponse({
|
|
|
7808
7947
|
"font-poppins font-light text-sm": true,
|
|
7809
7948
|
[`${variantsLite[variant]}`]: variant,
|
|
7810
7949
|
[`${shapes[shape]}`]: shape,
|
|
7811
|
-
[`${
|
|
7950
|
+
[`${sizes[size]}`]: size,
|
|
7812
7951
|
[`${styles}`]: styles
|
|
7813
7952
|
}),
|
|
7814
7953
|
children: text10
|
|
@@ -7829,7 +7968,7 @@ function ImageView({ imageUrl, secure = true, alt = "image" }) {
|
|
|
7829
7968
|
) }) });
|
|
7830
7969
|
}
|
|
7831
7970
|
var ImageView_default = ImageView;
|
|
7832
|
-
var ImageInput =
|
|
7971
|
+
var ImageInput = React26.forwardRef(
|
|
7833
7972
|
({
|
|
7834
7973
|
title = "Upload Image",
|
|
7835
7974
|
uploadDir = "eg-frontend-admin-temp",
|
|
@@ -7841,10 +7980,10 @@ var ImageInput = React25.forwardRef(
|
|
|
7841
7980
|
const [field, meta, helpers] = formik.useField(props);
|
|
7842
7981
|
const { value: imageUrl } = field;
|
|
7843
7982
|
const { setValue } = helpers;
|
|
7844
|
-
const [image3, setImage] =
|
|
7845
|
-
const [url, setUrl] =
|
|
7846
|
-
const [loading, setLoading] =
|
|
7847
|
-
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);
|
|
7848
7987
|
const uploadImage = async () => {
|
|
7849
7988
|
if (!image3) return;
|
|
7850
7989
|
setLoading(true);
|
|
@@ -7890,10 +8029,10 @@ var ImageInput = React25.forwardRef(
|
|
|
7890
8029
|
if (!disableSetValue) setValue("");
|
|
7891
8030
|
setLoading(false);
|
|
7892
8031
|
};
|
|
7893
|
-
|
|
8032
|
+
React26.useImperativeHandle(ref, () => ({
|
|
7894
8033
|
handleResetClick
|
|
7895
8034
|
}));
|
|
7896
|
-
|
|
8035
|
+
React26.useEffect(() => {
|
|
7897
8036
|
if (!disableSetValue) setValue(url);
|
|
7898
8037
|
}, [url, setValue, disableSetValue]);
|
|
7899
8038
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full", children: [
|
|
@@ -7978,14 +8117,14 @@ function MultiImageInput({
|
|
|
7978
8117
|
const [field, meta, helpers] = formik.useField(props);
|
|
7979
8118
|
const { value: imageUrls } = field;
|
|
7980
8119
|
const { setValue } = helpers;
|
|
7981
|
-
const imageInputRef =
|
|
8120
|
+
const imageInputRef = React26.useRef(null);
|
|
7982
8121
|
const onValueChanged = (url) => {
|
|
7983
8122
|
setValue([...imageUrls, url]);
|
|
7984
8123
|
if (imageInputRef.current) {
|
|
7985
8124
|
imageInputRef.current.handleResetClick();
|
|
7986
8125
|
}
|
|
7987
8126
|
};
|
|
7988
|
-
|
|
8127
|
+
React26.useEffect(() => {
|
|
7989
8128
|
}, [imageUrls]);
|
|
7990
8129
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
7991
8130
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row flex-wrap gap-5 w-ful", children: [
|
|
@@ -8085,9 +8224,9 @@ function StarRatingInput({
|
|
|
8085
8224
|
const { name: name2 } = props;
|
|
8086
8225
|
const [field, meta] = formik.useField(props);
|
|
8087
8226
|
const formikContext = formik.useFormikContext();
|
|
8088
|
-
const [rating, setRating] =
|
|
8089
|
-
const [hover, setHover] =
|
|
8090
|
-
|
|
8227
|
+
const [rating, setRating] = React26.useState(Number(field.value) || 0);
|
|
8228
|
+
const [hover, setHover] = React26.useState(null);
|
|
8229
|
+
React26.useEffect(() => {
|
|
8091
8230
|
setRating(Number(field.value));
|
|
8092
8231
|
}, [field.value]);
|
|
8093
8232
|
const handleOnClick = (index3) => {
|
|
@@ -8236,7 +8375,7 @@ function Tags({
|
|
|
8236
8375
|
...props
|
|
8237
8376
|
}) {
|
|
8238
8377
|
const [field, meta, helpers] = formik.useField({ ...props });
|
|
8239
|
-
const [input, setInput] =
|
|
8378
|
+
const [input, setInput] = React26.useState("");
|
|
8240
8379
|
const handleAddTag = () => {
|
|
8241
8380
|
const trimmed = input.trim();
|
|
8242
8381
|
if (trimmed && !field.value.includes(trimmed) && field.value.length < limit) {
|
|
@@ -8447,7 +8586,7 @@ var Breadcrumb = ({
|
|
|
8447
8586
|
const { config } = useEUIConfig();
|
|
8448
8587
|
const pathname = currentPath || (typeof window !== "undefined" ? window.location.pathname : "/");
|
|
8449
8588
|
const resolvedRoutes = routes || config?.routes || [];
|
|
8450
|
-
const resolvedData =
|
|
8589
|
+
const resolvedData = React26.useMemo(() => {
|
|
8451
8590
|
if (resolvedRoutes && resolvedRoutes.length > 0) {
|
|
8452
8591
|
return buildFromRoutes(resolvedRoutes, pathname);
|
|
8453
8592
|
}
|
|
@@ -8464,7 +8603,7 @@ var Breadcrumb = ({
|
|
|
8464
8603
|
navigate(item.href);
|
|
8465
8604
|
}
|
|
8466
8605
|
};
|
|
8467
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8606
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React26__default.default.Fragment, { children: [
|
|
8468
8607
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8469
8608
|
BreadcrumbItem_default,
|
|
8470
8609
|
{
|
|
@@ -8500,8 +8639,8 @@ var Breadcrumb = ({
|
|
|
8500
8639
|
);
|
|
8501
8640
|
};
|
|
8502
8641
|
var useIsMobile = (breakpoint = 768) => {
|
|
8503
|
-
const [isMobile, setIsMobile] =
|
|
8504
|
-
|
|
8642
|
+
const [isMobile, setIsMobile] = React26.useState(window.innerWidth < breakpoint);
|
|
8643
|
+
React26.useEffect(() => {
|
|
8505
8644
|
const handleResize = () => {
|
|
8506
8645
|
setIsMobile(window.innerWidth < breakpoint);
|
|
8507
8646
|
};
|
|
@@ -8813,7 +8952,7 @@ function HeaderNav({ data = [], styles }) {
|
|
|
8813
8952
|
}
|
|
8814
8953
|
var HeaderNav_default = HeaderNav;
|
|
8815
8954
|
function useClickOutside(ref, fun) {
|
|
8816
|
-
|
|
8955
|
+
React26.useEffect(() => {
|
|
8817
8956
|
const listener = (e) => {
|
|
8818
8957
|
if (!ref.current || ref.current.contains(e.target)) {
|
|
8819
8958
|
return;
|
|
@@ -8854,8 +8993,8 @@ var HeaderNavGroup = ({
|
|
|
8854
8993
|
styles,
|
|
8855
8994
|
children: children3
|
|
8856
8995
|
}) => {
|
|
8857
|
-
const [collapsed, setCollapsed] =
|
|
8858
|
-
const headerNavGroupRef =
|
|
8996
|
+
const [collapsed, setCollapsed] = React26.useState(true);
|
|
8997
|
+
const headerNavGroupRef = React26.useRef(null);
|
|
8859
8998
|
useClickOutside(headerNavGroupRef, () => setCollapsed(true));
|
|
8860
8999
|
const handleNavigation = () => {
|
|
8861
9000
|
if (to) {
|
|
@@ -9078,8 +9217,8 @@ var MenuGroup = ({
|
|
|
9078
9217
|
style: style2,
|
|
9079
9218
|
...rest
|
|
9080
9219
|
}) => {
|
|
9081
|
-
const [collapsed, setCollapsed] =
|
|
9082
|
-
|
|
9220
|
+
const [collapsed, setCollapsed] = React26.useState(!defaultOpen);
|
|
9221
|
+
React26.useEffect(() => {
|
|
9083
9222
|
if (defaultOpen !== void 0) {
|
|
9084
9223
|
setCollapsed(!defaultOpen);
|
|
9085
9224
|
}
|
|
@@ -9196,12 +9335,12 @@ var Menu = ({
|
|
|
9196
9335
|
defaultMenuElements,
|
|
9197
9336
|
currentPath
|
|
9198
9337
|
}) => {
|
|
9199
|
-
const normalizedItems =
|
|
9200
|
-
const selected =
|
|
9338
|
+
const normalizedItems = React26.useMemo(() => assignKeys(items), [items]);
|
|
9339
|
+
const selected = React26.useMemo(() => {
|
|
9201
9340
|
if (!currentPath) return void 0;
|
|
9202
9341
|
return findSelectedKey(normalizedItems, currentPath);
|
|
9203
9342
|
}, [currentPath, normalizedItems]);
|
|
9204
|
-
const parentMap =
|
|
9343
|
+
const parentMap = React26.useMemo(
|
|
9205
9344
|
() => buildParentMap(normalizedItems),
|
|
9206
9345
|
[normalizedItems]
|
|
9207
9346
|
);
|
|
@@ -9354,8 +9493,8 @@ function RouteTabs({
|
|
|
9354
9493
|
const currentPath = window.location.pathname;
|
|
9355
9494
|
return navData.find((tab2) => tab2.to === currentPath)?.to || navData[0]?.to;
|
|
9356
9495
|
};
|
|
9357
|
-
const [activeTab, setActiveTab] =
|
|
9358
|
-
|
|
9496
|
+
const [activeTab, setActiveTab] = React26.useState(getActiveTab);
|
|
9497
|
+
React26.useEffect(() => {
|
|
9359
9498
|
if (mode !== "route") return;
|
|
9360
9499
|
const handlePopState = () => {
|
|
9361
9500
|
setActiveTab(getActiveTab());
|
|
@@ -9659,7 +9798,7 @@ var CHART_LIGHT_THEME = {
|
|
|
9659
9798
|
},
|
|
9660
9799
|
colors: CHART_COLOR_PALETTE
|
|
9661
9800
|
};
|
|
9662
|
-
var ChartContext =
|
|
9801
|
+
var ChartContext = React26.createContext({
|
|
9663
9802
|
data: [],
|
|
9664
9803
|
loading: false,
|
|
9665
9804
|
error: null,
|
|
@@ -9678,7 +9817,7 @@ var ChartContext = React25.createContext({
|
|
|
9678
9817
|
|
|
9679
9818
|
// src/components/data-display/charts/context/useChartContext.ts
|
|
9680
9819
|
function useChartContext() {
|
|
9681
|
-
return
|
|
9820
|
+
return React26.useContext(ChartContext);
|
|
9682
9821
|
}
|
|
9683
9822
|
function mergeChartTheme(baseTheme, customTheme) {
|
|
9684
9823
|
if (!customTheme) {
|
|
@@ -9706,7 +9845,7 @@ function mergeChartTheme(baseTheme, customTheme) {
|
|
|
9706
9845
|
}
|
|
9707
9846
|
function useChartTheme({ mode, theme } = {}) {
|
|
9708
9847
|
const context = useChartContext();
|
|
9709
|
-
return
|
|
9848
|
+
return React26.useMemo(() => {
|
|
9710
9849
|
const baseTheme = mode === "light" ? CHART_LIGHT_THEME : mode === "dark" ? CHART_DARK_THEME : context.theme;
|
|
9711
9850
|
return mergeChartTheme(baseTheme, theme);
|
|
9712
9851
|
}, [context.theme, mode, theme]);
|
|
@@ -10248,7 +10387,7 @@ function ChartLegend({
|
|
|
10248
10387
|
...rest
|
|
10249
10388
|
}) {
|
|
10250
10389
|
const theme = useChartTheme();
|
|
10251
|
-
const legendItems =
|
|
10390
|
+
const legendItems = React26.useMemo(() => {
|
|
10252
10391
|
if (items?.length) {
|
|
10253
10392
|
return items;
|
|
10254
10393
|
}
|
|
@@ -10468,14 +10607,14 @@ function useChartData({
|
|
|
10468
10607
|
onDataChange,
|
|
10469
10608
|
onError
|
|
10470
10609
|
} = {}) {
|
|
10471
|
-
const [state, setState] =
|
|
10610
|
+
const [state, setState] = React26.useState({
|
|
10472
10611
|
data: data ?? [],
|
|
10473
10612
|
loading: false,
|
|
10474
10613
|
error: null,
|
|
10475
10614
|
status: data?.length ? "success" : "idle",
|
|
10476
10615
|
lastUpdatedAt: data?.length ? /* @__PURE__ */ new Date() : void 0
|
|
10477
10616
|
});
|
|
10478
|
-
const prepareData =
|
|
10617
|
+
const prepareData = React26.useCallback(
|
|
10479
10618
|
(nextData) => {
|
|
10480
10619
|
if (!normalize4) {
|
|
10481
10620
|
return nextData;
|
|
@@ -10484,7 +10623,7 @@ function useChartData({
|
|
|
10484
10623
|
},
|
|
10485
10624
|
[normalize4]
|
|
10486
10625
|
);
|
|
10487
|
-
const replaceData =
|
|
10626
|
+
const replaceData = React26.useCallback(
|
|
10488
10627
|
(nextData) => {
|
|
10489
10628
|
const normalizedData = prepareData(nextData);
|
|
10490
10629
|
setState({
|
|
@@ -10498,7 +10637,7 @@ function useChartData({
|
|
|
10498
10637
|
},
|
|
10499
10638
|
[onDataChange, prepareData]
|
|
10500
10639
|
);
|
|
10501
|
-
const appendData =
|
|
10640
|
+
const appendData = React26.useCallback(
|
|
10502
10641
|
(nextData) => {
|
|
10503
10642
|
setState((currentState) => {
|
|
10504
10643
|
const incomingData = Array.isArray(nextData) ? nextData : [nextData];
|
|
@@ -10522,7 +10661,7 @@ function useChartData({
|
|
|
10522
10661
|
},
|
|
10523
10662
|
[maxDataPoints, onDataChange, prepareData]
|
|
10524
10663
|
);
|
|
10525
|
-
const clearData =
|
|
10664
|
+
const clearData = React26.useCallback(() => {
|
|
10526
10665
|
setState({
|
|
10527
10666
|
data: [],
|
|
10528
10667
|
loading: false,
|
|
@@ -10532,7 +10671,7 @@ function useChartData({
|
|
|
10532
10671
|
});
|
|
10533
10672
|
onDataChange?.([]);
|
|
10534
10673
|
}, [onDataChange]);
|
|
10535
|
-
const handleError =
|
|
10674
|
+
const handleError = React26.useCallback(
|
|
10536
10675
|
(error) => {
|
|
10537
10676
|
setState((currentState) => ({
|
|
10538
10677
|
...currentState,
|
|
@@ -10544,7 +10683,7 @@ function useChartData({
|
|
|
10544
10683
|
},
|
|
10545
10684
|
[onError]
|
|
10546
10685
|
);
|
|
10547
|
-
const refresh =
|
|
10686
|
+
const refresh = React26.useCallback(async () => {
|
|
10548
10687
|
const resolvedDataSource = dataSource;
|
|
10549
10688
|
if (!resolvedDataSource?.refresh && !resolvedDataSource?.getInitialData) {
|
|
10550
10689
|
return;
|
|
@@ -10563,13 +10702,13 @@ function useChartData({
|
|
|
10563
10702
|
handleError(error instanceof Error ? error : new Error(String(error)));
|
|
10564
10703
|
}
|
|
10565
10704
|
}, [dataSource, handleError, replaceData]);
|
|
10566
|
-
|
|
10705
|
+
React26.useEffect(() => {
|
|
10567
10706
|
if (!data) {
|
|
10568
10707
|
return;
|
|
10569
10708
|
}
|
|
10570
10709
|
replaceData(data);
|
|
10571
10710
|
}, [data, replaceData]);
|
|
10572
|
-
|
|
10711
|
+
React26.useEffect(() => {
|
|
10573
10712
|
if (!dataSource || !autoLoad) {
|
|
10574
10713
|
return;
|
|
10575
10714
|
}
|
|
@@ -10608,7 +10747,7 @@ function useChartData({
|
|
|
10608
10747
|
unsubscribe?.();
|
|
10609
10748
|
};
|
|
10610
10749
|
}, [appendData, autoLoad, dataSource, handleError, replaceData]);
|
|
10611
|
-
return
|
|
10750
|
+
return React26.useMemo(
|
|
10612
10751
|
() => ({
|
|
10613
10752
|
...state,
|
|
10614
10753
|
refresh,
|
|
@@ -10627,11 +10766,11 @@ function useChartRealtime({
|
|
|
10627
10766
|
onData,
|
|
10628
10767
|
onError
|
|
10629
10768
|
}) {
|
|
10630
|
-
const [data, setData] =
|
|
10631
|
-
const [error, setError] =
|
|
10632
|
-
const [connected, setConnected] =
|
|
10633
|
-
const [lastUpdatedAt, setLastUpdatedAt] =
|
|
10634
|
-
|
|
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(() => {
|
|
10635
10774
|
if (!enabled) {
|
|
10636
10775
|
setConnected(false);
|
|
10637
10776
|
return;
|
|
@@ -10665,7 +10804,7 @@ function useChartRealtime({
|
|
|
10665
10804
|
setConnected(false);
|
|
10666
10805
|
};
|
|
10667
10806
|
}, [connect, enabled, maxDataPoints, normalize4, onData, onError]);
|
|
10668
|
-
return
|
|
10807
|
+
return React26.useMemo(
|
|
10669
10808
|
() => ({
|
|
10670
10809
|
data,
|
|
10671
10810
|
error,
|
|
@@ -10687,13 +10826,13 @@ function useChartPolling({
|
|
|
10687
10826
|
onData,
|
|
10688
10827
|
onError
|
|
10689
10828
|
}) {
|
|
10690
|
-
const isMountedRef =
|
|
10691
|
-
const isFetchingRef =
|
|
10692
|
-
const [data, setData] =
|
|
10693
|
-
const [error, setError] =
|
|
10694
|
-
const [loading, setLoading] =
|
|
10695
|
-
const [lastUpdatedAt, setLastUpdatedAt] =
|
|
10696
|
-
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 () => {
|
|
10697
10836
|
if (isFetchingRef.current) {
|
|
10698
10837
|
return;
|
|
10699
10838
|
}
|
|
@@ -10722,13 +10861,13 @@ function useChartPolling({
|
|
|
10722
10861
|
isFetchingRef.current = false;
|
|
10723
10862
|
}
|
|
10724
10863
|
}, [fetcher, normalize4, onData, onError]);
|
|
10725
|
-
|
|
10864
|
+
React26.useEffect(() => {
|
|
10726
10865
|
isMountedRef.current = true;
|
|
10727
10866
|
return () => {
|
|
10728
10867
|
isMountedRef.current = false;
|
|
10729
10868
|
};
|
|
10730
10869
|
}, []);
|
|
10731
|
-
|
|
10870
|
+
React26.useEffect(() => {
|
|
10732
10871
|
if (!enabled) {
|
|
10733
10872
|
setLoading(false);
|
|
10734
10873
|
return;
|
|
@@ -10743,7 +10882,7 @@ function useChartPolling({
|
|
|
10743
10882
|
window.clearInterval(timer2);
|
|
10744
10883
|
};
|
|
10745
10884
|
}, [enabled, immediate, interval2, refresh]);
|
|
10746
|
-
return
|
|
10885
|
+
return React26.useMemo(
|
|
10747
10886
|
() => ({
|
|
10748
10887
|
data,
|
|
10749
10888
|
error,
|
|
@@ -10777,7 +10916,7 @@ function useChartSeries({
|
|
|
10777
10916
|
xKey,
|
|
10778
10917
|
excludeKeys
|
|
10779
10918
|
}) {
|
|
10780
|
-
return
|
|
10919
|
+
return React26.useMemo(() => {
|
|
10781
10920
|
const resolvedData = data ?? [];
|
|
10782
10921
|
const resolvedExcludeKeys = excludeKeys ?? [];
|
|
10783
10922
|
const normalizedSeries = series && series.length > 0 ? series : inferSeriesKeys(
|
|
@@ -10935,7 +11074,7 @@ function AreaPlot({
|
|
|
10935
11074
|
...rest
|
|
10936
11075
|
}) {
|
|
10937
11076
|
const theme = useChartTheme();
|
|
10938
|
-
const chartId =
|
|
11077
|
+
const chartId = React26.useId().replace(/:/g, "");
|
|
10939
11078
|
const chart = useResolvedChartState(data, loading, error);
|
|
10940
11079
|
const resolvedSeries = useChartSeries({
|
|
10941
11080
|
data: chart.data,
|
|
@@ -11149,7 +11288,7 @@ function PiePlot({
|
|
|
11149
11288
|
}) {
|
|
11150
11289
|
const theme = useChartTheme();
|
|
11151
11290
|
const chart = useResolvedChartState(data, loading, error);
|
|
11152
|
-
const segments =
|
|
11291
|
+
const segments = React26.useMemo(
|
|
11153
11292
|
() => chart.data.map((item, index3) => {
|
|
11154
11293
|
const label = String(item[String(nameKey)] ?? index3);
|
|
11155
11294
|
return {
|
|
@@ -11540,7 +11679,7 @@ function ChartProvider({
|
|
|
11540
11679
|
onError
|
|
11541
11680
|
});
|
|
11542
11681
|
const resolvedTheme = useChartTheme({ mode: themeMode, theme });
|
|
11543
|
-
const value =
|
|
11682
|
+
const value = React26.useMemo(
|
|
11544
11683
|
() => ({
|
|
11545
11684
|
...chartData,
|
|
11546
11685
|
mode: dataSource?.mode,
|
|
@@ -11984,7 +12123,7 @@ var Chip = ({
|
|
|
11984
12123
|
}
|
|
11985
12124
|
) });
|
|
11986
12125
|
};
|
|
11987
|
-
var DataViewContext =
|
|
12126
|
+
var DataViewContext = React26.createContext(null);
|
|
11988
12127
|
|
|
11989
12128
|
// src/components/data-display/data-view/utils/searchData.ts
|
|
11990
12129
|
function searchData(data, search3) {
|
|
@@ -12028,19 +12167,19 @@ var DataViewProvider = ({
|
|
|
12028
12167
|
defaultPageSize = 9,
|
|
12029
12168
|
sortConfig = {}
|
|
12030
12169
|
}) => {
|
|
12031
|
-
const [search3, setSearch] =
|
|
12032
|
-
const [filters, setFilters] =
|
|
12033
|
-
const [sort, setSort] =
|
|
12034
|
-
const [page, setPage] =
|
|
12035
|
-
const [pageSize, setPageSize] =
|
|
12036
|
-
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(() => {
|
|
12037
12176
|
let result = searchData(data, search3);
|
|
12038
12177
|
result = filterData(result, filters);
|
|
12039
12178
|
result = sortData(result, sort, sortConfig);
|
|
12040
12179
|
return result;
|
|
12041
12180
|
}, [data, search3, filters, sort, sortConfig]);
|
|
12042
12181
|
const totalPages = pageSize === "All" ? 1 : Math.ceil(processedData.length / pageSize);
|
|
12043
|
-
const paginatedData =
|
|
12182
|
+
const paginatedData = React26.useMemo(() => {
|
|
12044
12183
|
if (pageSize === "All") return processedData;
|
|
12045
12184
|
const size = pageSize;
|
|
12046
12185
|
const start3 = (page - 1) * size;
|
|
@@ -12093,7 +12232,7 @@ var DataViewSidebar = ({
|
|
|
12093
12232
|
return /* @__PURE__ */ jsxRuntime.jsx("aside", { ...rest, className: cn("w-[220px] shrink-0", className), children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: children3 }) });
|
|
12094
12233
|
};
|
|
12095
12234
|
function useDataView() {
|
|
12096
|
-
const ctx =
|
|
12235
|
+
const ctx = React26.useContext(DataViewContext);
|
|
12097
12236
|
if (!ctx) {
|
|
12098
12237
|
throw new Error("useDataView must be used within DataViewProvider");
|
|
12099
12238
|
}
|
|
@@ -12190,7 +12329,7 @@ function Accordion({
|
|
|
12190
12329
|
toggleOnSummaryClick = false,
|
|
12191
12330
|
enableChildrenPadding = true
|
|
12192
12331
|
}) {
|
|
12193
|
-
const [collapse, setCollapse] =
|
|
12332
|
+
const [collapse, setCollapse] = React26.useState(defaultCollapse);
|
|
12194
12333
|
const handleToggle = () => {
|
|
12195
12334
|
setCollapse((prev) => !prev);
|
|
12196
12335
|
};
|
|
@@ -12664,8 +12803,8 @@ var Flag = ({
|
|
|
12664
12803
|
className,
|
|
12665
12804
|
...rest
|
|
12666
12805
|
}) => {
|
|
12667
|
-
const [pos, setPos] =
|
|
12668
|
-
const [showTooltip, setShowTooltip] =
|
|
12806
|
+
const [pos, setPos] = React26.useState({ x: 0, y: 0 });
|
|
12807
|
+
const [showTooltip, setShowTooltip] = React26.useState(false);
|
|
12669
12808
|
const upperCode = code4.toUpperCase();
|
|
12670
12809
|
const country = emojiFlags__default.default.countryCode(upperCode);
|
|
12671
12810
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -15793,16 +15932,16 @@ var GraphRenderer = ({
|
|
|
15793
15932
|
width = 1e3,
|
|
15794
15933
|
height = 700
|
|
15795
15934
|
}) => {
|
|
15796
|
-
const [nodes, setNodes] =
|
|
15935
|
+
const [nodes, setNodes] = React26.useState([]);
|
|
15797
15936
|
const edges = data.edges;
|
|
15798
|
-
const simulationRef =
|
|
15799
|
-
const [offset, setOffset] =
|
|
15800
|
-
const isDragging =
|
|
15801
|
-
const lastPos =
|
|
15802
|
-
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(() => {
|
|
15803
15942
|
return new Map(nodes.map((n) => [n.id, n]));
|
|
15804
15943
|
}, [nodes]);
|
|
15805
|
-
|
|
15944
|
+
React26.useEffect(() => {
|
|
15806
15945
|
simulationRef.current?.stop?.();
|
|
15807
15946
|
const positionedNodes = data.nodes.map((n) => ({
|
|
15808
15947
|
...n,
|
|
@@ -15883,13 +16022,13 @@ var Graph = ({
|
|
|
15883
16022
|
}
|
|
15884
16023
|
);
|
|
15885
16024
|
};
|
|
15886
|
-
var CloudinaryContext =
|
|
16025
|
+
var CloudinaryContext = React26.createContext(null);
|
|
15887
16026
|
var CloudinaryProvider = ({
|
|
15888
16027
|
cloudName,
|
|
15889
16028
|
children: children3
|
|
15890
16029
|
}) => /* @__PURE__ */ jsxRuntime.jsx(CloudinaryContext.Provider, { value: { cloudName }, children: children3 });
|
|
15891
16030
|
var useCloudinaryConfig = () => {
|
|
15892
|
-
const ctx =
|
|
16031
|
+
const ctx = React26.useContext(CloudinaryContext);
|
|
15893
16032
|
if (!ctx) {
|
|
15894
16033
|
throw new Error(
|
|
15895
16034
|
"CloudinaryProvider is missing. Wrap your app with <CloudinaryProvider />"
|
|
@@ -16408,7 +16547,7 @@ var ListItem = ({
|
|
|
16408
16547
|
children: bullet
|
|
16409
16548
|
}
|
|
16410
16549
|
),
|
|
16411
|
-
/* @__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(
|
|
16412
16551
|
TypographyComponent,
|
|
16413
16552
|
{
|
|
16414
16553
|
className: cn(
|
|
@@ -16442,7 +16581,7 @@ function normalizeItem(item, defaultBulletType) {
|
|
|
16442
16581
|
bulletType: defaultBulletType
|
|
16443
16582
|
};
|
|
16444
16583
|
}
|
|
16445
|
-
if (
|
|
16584
|
+
if (React26__default.default.isValidElement(item)) {
|
|
16446
16585
|
return {
|
|
16447
16586
|
content: item,
|
|
16448
16587
|
bulletType: defaultBulletType
|
|
@@ -16747,7 +16886,7 @@ var ProgressBar = ({
|
|
|
16747
16886
|
hasBottomLabel && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2", children: labelNode })
|
|
16748
16887
|
] });
|
|
16749
16888
|
};
|
|
16750
|
-
var
|
|
16889
|
+
var sizes2 = {
|
|
16751
16890
|
["xs" /* xs */]: "text-[10px]",
|
|
16752
16891
|
["sm" /* sm */]: "text-xs",
|
|
16753
16892
|
["md" /* md */]: "text-sm",
|
|
@@ -16777,7 +16916,7 @@ var StarRating = ({
|
|
|
16777
16916
|
className: cn(
|
|
16778
16917
|
"inline-flex items-center gap-[2px]",
|
|
16779
16918
|
"text-yellow-500 dark:text-yellow-400",
|
|
16780
|
-
|
|
16919
|
+
sizes2[size],
|
|
16781
16920
|
iconClassName
|
|
16782
16921
|
),
|
|
16783
16922
|
children: [
|
|
@@ -16790,7 +16929,7 @@ var StarRating = ({
|
|
|
16790
16929
|
showValue && valuePosition === "end" && ratingValue
|
|
16791
16930
|
] });
|
|
16792
16931
|
};
|
|
16793
|
-
var
|
|
16932
|
+
var sizes3 = {
|
|
16794
16933
|
["xs" /* xs */]: {
|
|
16795
16934
|
value: "text-2xl",
|
|
16796
16935
|
review: "text-xs"
|
|
@@ -16822,7 +16961,7 @@ var NumericRating = ({
|
|
|
16822
16961
|
className,
|
|
16823
16962
|
...rest
|
|
16824
16963
|
}) => {
|
|
16825
|
-
const sizeStyles =
|
|
16964
|
+
const sizeStyles = sizes3[size];
|
|
16826
16965
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
16827
16966
|
"div",
|
|
16828
16967
|
{
|
|
@@ -17254,8 +17393,8 @@ var Table = ({
|
|
|
17254
17393
|
}) => {
|
|
17255
17394
|
const eui = useEUIConfig();
|
|
17256
17395
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
17257
|
-
const [sortKey, setSortKey] =
|
|
17258
|
-
const [sortOrder, setSortOrder] =
|
|
17396
|
+
const [sortKey, setSortKey] = React26.useState(null);
|
|
17397
|
+
const [sortOrder, setSortOrder] = React26.useState("asc");
|
|
17259
17398
|
const toggleSort = (key) => {
|
|
17260
17399
|
if (sortKey === key) {
|
|
17261
17400
|
setSortOrder((prev) => prev === "asc" ? "desc" : "asc");
|
|
@@ -17264,7 +17403,7 @@ var Table = ({
|
|
|
17264
17403
|
setSortOrder("asc");
|
|
17265
17404
|
}
|
|
17266
17405
|
};
|
|
17267
|
-
const sortedData =
|
|
17406
|
+
const sortedData = React26.useMemo(() => {
|
|
17268
17407
|
if (!sortKey) return data;
|
|
17269
17408
|
return [...data].sort((a2, b) => {
|
|
17270
17409
|
const aVal = a2[sortKey];
|
|
@@ -17345,8 +17484,8 @@ var Tooltip6 = ({
|
|
|
17345
17484
|
style: style2,
|
|
17346
17485
|
...rest
|
|
17347
17486
|
}) => {
|
|
17348
|
-
const [pos, setPos] =
|
|
17349
|
-
|
|
17487
|
+
const [pos, setPos] = React26.useState({ x: 0, y: 0 });
|
|
17488
|
+
React26.useEffect(() => {
|
|
17350
17489
|
if (!show) return;
|
|
17351
17490
|
const handleMove = (e) => {
|
|
17352
17491
|
setPos({ x: e.clientX + offsetX, y: e.clientY + offsetY });
|
|
@@ -17536,17 +17675,17 @@ var YoutubeVideo = ({
|
|
|
17536
17675
|
}
|
|
17537
17676
|
) });
|
|
17538
17677
|
};
|
|
17539
|
-
var ThemeContext =
|
|
17678
|
+
var ThemeContext = React26.createContext(
|
|
17540
17679
|
void 0
|
|
17541
17680
|
);
|
|
17542
17681
|
var ThemeProvider = ({
|
|
17543
17682
|
defaultTheme = "dark",
|
|
17544
17683
|
children: children3
|
|
17545
17684
|
}) => {
|
|
17546
|
-
const [theme, setTheme] =
|
|
17685
|
+
const [theme, setTheme] = React26.useState(() => {
|
|
17547
17686
|
return localStorage.getItem("theme") || defaultTheme;
|
|
17548
17687
|
});
|
|
17549
|
-
|
|
17688
|
+
React26.useEffect(() => {
|
|
17550
17689
|
if (theme === "dark") {
|
|
17551
17690
|
document.documentElement.classList.add("dark");
|
|
17552
17691
|
} else {
|
|
@@ -17560,7 +17699,7 @@ var ThemeProvider = ({
|
|
|
17560
17699
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: children3 });
|
|
17561
17700
|
};
|
|
17562
17701
|
var ThemeSwitch = () => {
|
|
17563
|
-
const themeContext =
|
|
17702
|
+
const themeContext = React26.useContext(ThemeContext);
|
|
17564
17703
|
if (!themeContext) return null;
|
|
17565
17704
|
const { theme, toggleTheme } = themeContext;
|
|
17566
17705
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -17596,11 +17735,44 @@ var ThemeSwitch = () => {
|
|
|
17596
17735
|
}
|
|
17597
17736
|
);
|
|
17598
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
|
+
}));
|
|
17599
17772
|
var ShapeSwitch = () => {
|
|
17600
17773
|
const { config, setConfig } = useEUIConfig();
|
|
17601
17774
|
const currentShape = config.global?.shape ?? "square";
|
|
17602
|
-
const handleChange = (
|
|
17603
|
-
const shape = e.target.value;
|
|
17775
|
+
const handleChange = (shape) => {
|
|
17604
17776
|
setConfig((prev) => ({
|
|
17605
17777
|
...prev,
|
|
17606
17778
|
global: {
|
|
@@ -17609,20 +17781,46 @@ var ShapeSwitch = () => {
|
|
|
17609
17781
|
}
|
|
17610
17782
|
}));
|
|
17611
17783
|
};
|
|
17612
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17613
|
-
|
|
17784
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17785
|
+
ThemeSelect,
|
|
17614
17786
|
{
|
|
17615
|
-
|
|
17787
|
+
ariaLabel: "Global shape",
|
|
17788
|
+
label: "Shape",
|
|
17616
17789
|
onChange: handleChange,
|
|
17617
|
-
|
|
17618
|
-
|
|
17790
|
+
options: shapeOptions,
|
|
17791
|
+
value: currentShape
|
|
17619
17792
|
}
|
|
17620
|
-
)
|
|
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
|
+
);
|
|
17621
17819
|
};
|
|
17622
17820
|
|
|
17623
17821
|
// src/hooks/theme/useCurrentTheme.ts
|
|
17624
17822
|
var useCurrentTheme = () => {
|
|
17625
|
-
const context =
|
|
17823
|
+
const context = React26.useContext(ThemeContext);
|
|
17626
17824
|
if (!context) {
|
|
17627
17825
|
throw new Error("useCurrentTheme must be used within a ThemeProvider");
|
|
17628
17826
|
}
|
|
@@ -28965,7 +29163,7 @@ var WorldMap = ({
|
|
|
28965
29163
|
}
|
|
28966
29164
|
};
|
|
28967
29165
|
const mode = isDarkMode ? mapStyles.dark : mapStyles.light;
|
|
28968
|
-
const resolvedData =
|
|
29166
|
+
const resolvedData = React26.useMemo(() => {
|
|
28969
29167
|
return data.map((item) => {
|
|
28970
29168
|
const c3 = COUNTRIES.find((x3) => x3.code === item.code);
|
|
28971
29169
|
if (!c3) return null;
|
|
@@ -28977,8 +29175,8 @@ var WorldMap = ({
|
|
|
28977
29175
|
}).filter(Boolean);
|
|
28978
29176
|
}, [data]);
|
|
28979
29177
|
const maxValue = resolvedData.length > 0 ? Math.max(...resolvedData.map((d) => d.value)) : 0;
|
|
28980
|
-
const [showTooltip, setShowTooltip] =
|
|
28981
|
-
const [tooltipContent, setTooltipContent] =
|
|
29178
|
+
const [showTooltip, setShowTooltip] = React26.useState(false);
|
|
29179
|
+
const [tooltipContent, setTooltipContent] = React26.useState(null);
|
|
28982
29180
|
const handleMouseMove = (_event, point5) => {
|
|
28983
29181
|
setTooltipContent(
|
|
28984
29182
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
@@ -29075,7 +29273,7 @@ function AsyncStateCard({
|
|
|
29075
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 })
|
|
29076
29274
|
] }),
|
|
29077
29275
|
onAction && actionText && /* @__PURE__ */ jsxRuntime.jsx(
|
|
29078
|
-
|
|
29276
|
+
Button_web_default,
|
|
29079
29277
|
{
|
|
29080
29278
|
type: "button",
|
|
29081
29279
|
text: actionText,
|
|
@@ -29090,7 +29288,7 @@ function AsyncStateCard({
|
|
|
29090
29288
|
}
|
|
29091
29289
|
);
|
|
29092
29290
|
}
|
|
29093
|
-
var AsyncStateCard_default =
|
|
29291
|
+
var AsyncStateCard_default = React26__default.default.memo(AsyncStateCard);
|
|
29094
29292
|
|
|
29095
29293
|
// src/components/utils/async-component-wrapper/asyncError.utils.ts
|
|
29096
29294
|
var getDefaultErrorMessage = (error) => {
|
|
@@ -29149,22 +29347,22 @@ function AsyncComponentWrapper({
|
|
|
29149
29347
|
contentClassName,
|
|
29150
29348
|
stateClassName
|
|
29151
29349
|
}) {
|
|
29152
|
-
const [isRetrying, setIsRetrying] =
|
|
29153
|
-
const retryTimerRef =
|
|
29154
|
-
const errorMessage =
|
|
29350
|
+
const [isRetrying, setIsRetrying] = React26.useState(false);
|
|
29351
|
+
const retryTimerRef = React26.useRef(null);
|
|
29352
|
+
const errorMessage = React26.useMemo(() => {
|
|
29155
29353
|
if (!isError) return "";
|
|
29156
29354
|
return errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error);
|
|
29157
29355
|
}, [isError, error, errorFormatter]);
|
|
29158
29356
|
const hasSuccess = isSuccess ?? (!isLoading && !isError && !isUninitialized);
|
|
29159
29357
|
const shouldShowRetryLoading = showLoadingOnRetry && (isRetrying || isFetching && isError);
|
|
29160
29358
|
const shouldShowLoading = isLoading || shouldShowRetryLoading;
|
|
29161
|
-
const clearRetryTimer =
|
|
29359
|
+
const clearRetryTimer = React26.useCallback(() => {
|
|
29162
29360
|
if (retryTimerRef.current) {
|
|
29163
29361
|
clearTimeout(retryTimerRef.current);
|
|
29164
29362
|
retryTimerRef.current = null;
|
|
29165
29363
|
}
|
|
29166
29364
|
}, []);
|
|
29167
|
-
const handleRetry =
|
|
29365
|
+
const handleRetry = React26.useCallback(() => {
|
|
29168
29366
|
if (!onRetry) return;
|
|
29169
29367
|
clearRetryTimer();
|
|
29170
29368
|
setIsRetrying(true);
|
|
@@ -29184,12 +29382,12 @@ function AsyncComponentWrapper({
|
|
|
29184
29382
|
throw retryError;
|
|
29185
29383
|
}
|
|
29186
29384
|
}, [onRetry, clearRetryTimer, retryLoadingFallbackMs]);
|
|
29187
|
-
|
|
29385
|
+
React26.useEffect(() => {
|
|
29188
29386
|
if (!isLoading && !isFetching && !isError) {
|
|
29189
29387
|
setIsRetrying(false);
|
|
29190
29388
|
}
|
|
29191
29389
|
}, [isLoading, isFetching, isError]);
|
|
29192
|
-
|
|
29390
|
+
React26.useEffect(() => {
|
|
29193
29391
|
return () => {
|
|
29194
29392
|
clearRetryTimer();
|
|
29195
29393
|
};
|
|
@@ -29271,7 +29469,7 @@ function AsyncComponentWrapper({
|
|
|
29271
29469
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(contentClassName), children: children3 })
|
|
29272
29470
|
] });
|
|
29273
29471
|
}
|
|
29274
|
-
var AsyncComponentWrapper_default =
|
|
29472
|
+
var AsyncComponentWrapper_default = React26__default.default.memo(AsyncComponentWrapper);
|
|
29275
29473
|
function Modal({
|
|
29276
29474
|
title,
|
|
29277
29475
|
show = false,
|
|
@@ -29287,7 +29485,7 @@ function Modal({
|
|
|
29287
29485
|
}) {
|
|
29288
29486
|
const eui = useEUIConfig();
|
|
29289
29487
|
const resolvedShape = shape ?? eui?.config?.global?.shape ?? "square";
|
|
29290
|
-
const modalRef =
|
|
29488
|
+
const modalRef = React26.useRef(null);
|
|
29291
29489
|
useClickOutside(
|
|
29292
29490
|
modalRef,
|
|
29293
29491
|
enableCloseOnClickOutside ? handleOnClose : void 0
|
|
@@ -29333,7 +29531,7 @@ function Modal({
|
|
|
29333
29531
|
}
|
|
29334
29532
|
var Modal_default = Modal;
|
|
29335
29533
|
var useAnalytics = () => {
|
|
29336
|
-
const context =
|
|
29534
|
+
const context = React26.useContext(AnalyticsContext);
|
|
29337
29535
|
if (!context) {
|
|
29338
29536
|
throw new Error("useAnalytics must be used within an AnalyticsProvider.");
|
|
29339
29537
|
}
|
|
@@ -29373,10 +29571,10 @@ var CookiePreferencesModal = ({
|
|
|
29373
29571
|
...rest
|
|
29374
29572
|
}) => {
|
|
29375
29573
|
const { consent, updateConsent } = useCookieConsent();
|
|
29376
|
-
const [selectedCategories, setSelectedCategories] =
|
|
29574
|
+
const [selectedCategories, setSelectedCategories] = React26.useState(
|
|
29377
29575
|
consent.categories
|
|
29378
29576
|
);
|
|
29379
|
-
|
|
29577
|
+
React26.useEffect(() => {
|
|
29380
29578
|
setSelectedCategories(consent.categories);
|
|
29381
29579
|
}, [consent.categories, open]);
|
|
29382
29580
|
const saveLabel = labels?.save ?? "Save preferences";
|
|
@@ -29438,7 +29636,7 @@ var CookiePreferencesModal = ({
|
|
|
29438
29636
|
}) }),
|
|
29439
29637
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-5 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", children: [
|
|
29440
29638
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29441
|
-
|
|
29639
|
+
Button_web_default,
|
|
29442
29640
|
{
|
|
29443
29641
|
type: "button",
|
|
29444
29642
|
text: cancelLabel,
|
|
@@ -29450,7 +29648,7 @@ var CookiePreferencesModal = ({
|
|
|
29450
29648
|
}
|
|
29451
29649
|
),
|
|
29452
29650
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29453
|
-
|
|
29651
|
+
Button_web_default,
|
|
29454
29652
|
{
|
|
29455
29653
|
type: "button",
|
|
29456
29654
|
text: saveLabel,
|
|
@@ -29488,8 +29686,8 @@ var CookieBanner = ({
|
|
|
29488
29686
|
...rest
|
|
29489
29687
|
}) => {
|
|
29490
29688
|
const { consent, acceptAll, rejectAll } = useCookieConsent();
|
|
29491
|
-
const [preferencesOpen, setPreferencesOpen] =
|
|
29492
|
-
const shouldRender =
|
|
29689
|
+
const [preferencesOpen, setPreferencesOpen] = React26.useState(false);
|
|
29690
|
+
const shouldRender = React26.useMemo(() => consent.status === "unset", [consent]);
|
|
29493
29691
|
if (!shouldRender) return null;
|
|
29494
29692
|
const acceptAllLabel = labels?.acceptAll ?? "Accept all";
|
|
29495
29693
|
const rejectAllLabel = labels?.rejectAll ?? "Reject optional";
|
|
@@ -29542,7 +29740,7 @@ var CookieBanner = ({
|
|
|
29542
29740
|
] }),
|
|
29543
29741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
29544
29742
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
29545
|
-
|
|
29743
|
+
Button_web_default,
|
|
29546
29744
|
{
|
|
29547
29745
|
type: "button",
|
|
29548
29746
|
text: acceptAllLabel,
|
|
@@ -29554,7 +29752,7 @@ var CookieBanner = ({
|
|
|
29554
29752
|
}
|
|
29555
29753
|
),
|
|
29556
29754
|
showCustomize ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29557
|
-
|
|
29755
|
+
Button_web_default,
|
|
29558
29756
|
{
|
|
29559
29757
|
type: "button",
|
|
29560
29758
|
text: customizeLabel,
|
|
@@ -29566,7 +29764,7 @@ var CookieBanner = ({
|
|
|
29566
29764
|
}
|
|
29567
29765
|
) : null,
|
|
29568
29766
|
showRejectAll ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
29569
|
-
|
|
29767
|
+
Button_web_default,
|
|
29570
29768
|
{
|
|
29571
29769
|
type: "button",
|
|
29572
29770
|
text: rejectAllLabel,
|
|
@@ -29598,36 +29796,103 @@ var CookieBanner = ({
|
|
|
29598
29796
|
var usePageTracking = ({
|
|
29599
29797
|
path: path2,
|
|
29600
29798
|
search: search3 = "",
|
|
29799
|
+
title,
|
|
29800
|
+
fullUrl,
|
|
29801
|
+
metadata,
|
|
29601
29802
|
enabled = true,
|
|
29803
|
+
trackPageLeave = false,
|
|
29602
29804
|
dedupe = true
|
|
29603
29805
|
}) => {
|
|
29604
29806
|
const { track } = useAnalytics();
|
|
29605
|
-
const trackRef =
|
|
29606
|
-
const
|
|
29607
|
-
|
|
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(() => {
|
|
29608
29812
|
trackRef.current = track;
|
|
29609
29813
|
}, [track]);
|
|
29610
|
-
|
|
29814
|
+
const metadataKey = React26.useMemo(() => JSON.stringify(metadata ?? {}), [metadata]);
|
|
29815
|
+
React26.useEffect(() => {
|
|
29611
29816
|
if (!enabled) return;
|
|
29612
29817
|
const nextPath = `${path2}${search3}`;
|
|
29613
29818
|
if (!nextPath) return;
|
|
29614
|
-
if (dedupe &&
|
|
29819
|
+
if (dedupe && trackedPathsRef.current.has(nextPath)) {
|
|
29615
29820
|
return;
|
|
29616
29821
|
}
|
|
29822
|
+
if (trackPageLeave && previousPathRef.current) {
|
|
29823
|
+
const durationMs = Date.now() - enteredAtRef.current;
|
|
29824
|
+
trackRef.current("page_leave", {
|
|
29825
|
+
path: previousPathRef.current,
|
|
29826
|
+
durationMs,
|
|
29827
|
+
metadata
|
|
29828
|
+
});
|
|
29829
|
+
}
|
|
29830
|
+
enteredAtRef.current = Date.now();
|
|
29617
29831
|
previousPathRef.current = nextPath;
|
|
29832
|
+
trackedPathsRef.current.add(nextPath);
|
|
29618
29833
|
trackRef.current("page_view", {
|
|
29619
|
-
path: nextPath
|
|
29834
|
+
path: nextPath,
|
|
29835
|
+
title,
|
|
29836
|
+
fullUrl,
|
|
29837
|
+
metadata
|
|
29620
29838
|
});
|
|
29621
|
-
|
|
29839
|
+
return () => {
|
|
29840
|
+
if (!trackPageLeave) return;
|
|
29841
|
+
const durationMs = Date.now() - enteredAtRef.current;
|
|
29842
|
+
trackRef.current("page_leave", {
|
|
29843
|
+
path: nextPath,
|
|
29844
|
+
durationMs,
|
|
29845
|
+
metadata
|
|
29846
|
+
});
|
|
29847
|
+
};
|
|
29848
|
+
}, [
|
|
29849
|
+
dedupe,
|
|
29850
|
+
enabled,
|
|
29851
|
+
fullUrl,
|
|
29852
|
+
metadataKey,
|
|
29853
|
+
path2,
|
|
29854
|
+
search3,
|
|
29855
|
+
title,
|
|
29856
|
+
trackPageLeave
|
|
29857
|
+
]);
|
|
29622
29858
|
};
|
|
29623
|
-
|
|
29624
|
-
// src/components/analytics/hooks/useSessionTracking.ts
|
|
29625
29859
|
var useSessionTracking = ({
|
|
29626
|
-
enabled = true
|
|
29860
|
+
enabled = true,
|
|
29861
|
+
metadata
|
|
29627
29862
|
} = {}) => {
|
|
29628
|
-
|
|
29863
|
+
const { track } = useAnalytics();
|
|
29864
|
+
const startedAtRef = React26.useRef(Date.now());
|
|
29865
|
+
const endedRef = React26.useRef(false);
|
|
29866
|
+
React26.useEffect(() => {
|
|
29867
|
+
if (!enabled || !isBrowser()) return;
|
|
29868
|
+
startedAtRef.current = Date.now();
|
|
29869
|
+
endedRef.current = false;
|
|
29870
|
+
track("session_start", {
|
|
29871
|
+
metadata
|
|
29872
|
+
});
|
|
29873
|
+
const endSession = () => {
|
|
29874
|
+
if (endedRef.current) return;
|
|
29875
|
+
endedRef.current = true;
|
|
29876
|
+
track("session_end", {
|
|
29877
|
+
durationMs: Date.now() - startedAtRef.current,
|
|
29878
|
+
metadata
|
|
29879
|
+
});
|
|
29880
|
+
};
|
|
29881
|
+
const handleVisibilityChange = () => {
|
|
29882
|
+
if (document.visibilityState === "hidden") {
|
|
29883
|
+
endSession();
|
|
29884
|
+
}
|
|
29885
|
+
};
|
|
29886
|
+
window.addEventListener("pagehide", endSession);
|
|
29887
|
+
document.addEventListener("visibilitychange", handleVisibilityChange);
|
|
29888
|
+
return () => {
|
|
29889
|
+
endSession();
|
|
29890
|
+
window.removeEventListener("pagehide", endSession);
|
|
29891
|
+
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
29892
|
+
};
|
|
29893
|
+
}, [enabled, metadata, track]);
|
|
29629
29894
|
};
|
|
29630
|
-
var ContentArea =
|
|
29895
|
+
var ContentArea = React26.forwardRef(
|
|
29631
29896
|
({ children: children3, styles, enablePadding = false }, ref) => {
|
|
29632
29897
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
29633
29898
|
"div",
|
|
@@ -29713,6 +29978,9 @@ var Layout = ({
|
|
|
29713
29978
|
var Header = ({
|
|
29714
29979
|
position: position4 = "static",
|
|
29715
29980
|
children: children3,
|
|
29981
|
+
onPreviewPlatformChange,
|
|
29982
|
+
previewPlatform = "web",
|
|
29983
|
+
showPreviewPlatformSelector = false,
|
|
29716
29984
|
styles
|
|
29717
29985
|
}) => {
|
|
29718
29986
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29727,9 +29995,16 @@ var Header = ({
|
|
|
29727
29995
|
[`${styles}`]: styles
|
|
29728
29996
|
}),
|
|
29729
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: [
|
|
29730
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "
|
|
29998
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "elseware UI" }),
|
|
29731
29999
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-3 items-center", children: [
|
|
29732
30000
|
/* @__PURE__ */ jsxRuntime.jsx(ThemeSwitch, {}),
|
|
30001
|
+
showPreviewPlatformSelector ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30002
|
+
PreviewSwitch,
|
|
30003
|
+
{
|
|
30004
|
+
onChange: onPreviewPlatformChange,
|
|
30005
|
+
value: previewPlatform
|
|
30006
|
+
}
|
|
30007
|
+
) : null,
|
|
29733
30008
|
/* @__PURE__ */ jsxRuntime.jsx(ShapeSwitch, {})
|
|
29734
30009
|
] })
|
|
29735
30010
|
] }) })
|
|
@@ -29847,8 +30122,8 @@ var GlowWrapper = ({
|
|
|
29847
30122
|
className = "",
|
|
29848
30123
|
hideOnLeave = true
|
|
29849
30124
|
}) => {
|
|
29850
|
-
const ref =
|
|
29851
|
-
const handleMove =
|
|
30125
|
+
const ref = React26.useRef(null);
|
|
30126
|
+
const handleMove = React26.useCallback(
|
|
29852
30127
|
(e) => {
|
|
29853
30128
|
const el = ref.current;
|
|
29854
30129
|
if (!el) return;
|
|
@@ -29870,7 +30145,7 @@ var GlowWrapper = ({
|
|
|
29870
30145
|
},
|
|
29871
30146
|
[glowSize, glowColor]
|
|
29872
30147
|
);
|
|
29873
|
-
const handleLeave =
|
|
30148
|
+
const handleLeave = React26.useCallback(() => {
|
|
29874
30149
|
const el = ref.current;
|
|
29875
30150
|
if (!el || !hideOnLeave) return;
|
|
29876
30151
|
el.style.setProperty("--glow-x", `-999px`);
|
|
@@ -29915,8 +30190,8 @@ function InfiniteScrollTrigger({
|
|
|
29915
30190
|
threshold = 0,
|
|
29916
30191
|
onLoadMore
|
|
29917
30192
|
}) {
|
|
29918
|
-
const triggerRef =
|
|
29919
|
-
|
|
30193
|
+
const triggerRef = React26.useRef(null);
|
|
30194
|
+
React26.useEffect(() => {
|
|
29920
30195
|
const element7 = triggerRef.current;
|
|
29921
30196
|
if (!element7 || !hasMore || isLoading) {
|
|
29922
30197
|
return;
|
|
@@ -29942,7 +30217,7 @@ function InfiniteScrollTrigger({
|
|
|
29942
30217
|
}
|
|
29943
30218
|
var InfiniteScrollTrigger_default = InfiniteScrollTrigger;
|
|
29944
30219
|
function ShowMore({ text: text10, limit }) {
|
|
29945
|
-
const [showMore, setShowMore] =
|
|
30220
|
+
const [showMore, setShowMore] = React26.useState(false);
|
|
29946
30221
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
29947
30222
|
showMore ? text10 : `${text10.substring(0, limit)}`,
|
|
29948
30223
|
text10.length > limit && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
@@ -29977,8 +30252,8 @@ function CommentComposer({
|
|
|
29977
30252
|
loading,
|
|
29978
30253
|
onSubmit
|
|
29979
30254
|
}) {
|
|
29980
|
-
const [value, setValue] =
|
|
29981
|
-
const [focused, setFocused] =
|
|
30255
|
+
const [value, setValue] = React26.useState("");
|
|
30256
|
+
const [focused, setFocused] = React26.useState(false);
|
|
29982
30257
|
async function handleSubmit() {
|
|
29983
30258
|
const content3 = value.trim();
|
|
29984
30259
|
if (!content3) {
|
|
@@ -30008,7 +30283,7 @@ function CommentComposer({
|
|
|
30008
30283
|
),
|
|
30009
30284
|
(focused || value.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
30010
30285
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30011
|
-
|
|
30286
|
+
Button_web_default,
|
|
30012
30287
|
{
|
|
30013
30288
|
text: "Cancel",
|
|
30014
30289
|
variant: "secondary",
|
|
@@ -30018,7 +30293,7 @@ function CommentComposer({
|
|
|
30018
30293
|
}
|
|
30019
30294
|
),
|
|
30020
30295
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30021
|
-
|
|
30296
|
+
Button_web_default,
|
|
30022
30297
|
{
|
|
30023
30298
|
text: submitLabel,
|
|
30024
30299
|
variant: "primary",
|
|
@@ -30233,14 +30508,14 @@ function CommentHeader({ comment: comment4, config }) {
|
|
|
30233
30508
|
}
|
|
30234
30509
|
var CommentHeader_default = CommentHeader;
|
|
30235
30510
|
var useDrawer = (defaultVisibility = true) => {
|
|
30236
|
-
const [show, setShow] =
|
|
30237
|
-
const openDrawer =
|
|
30511
|
+
const [show, setShow] = React26.useState(defaultVisibility);
|
|
30512
|
+
const openDrawer = React26.useCallback(() => {
|
|
30238
30513
|
setShow(true);
|
|
30239
30514
|
}, []);
|
|
30240
|
-
const closeDrawer =
|
|
30515
|
+
const closeDrawer = React26.useCallback(() => {
|
|
30241
30516
|
setShow(false);
|
|
30242
30517
|
}, []);
|
|
30243
|
-
const toggleDrawer =
|
|
30518
|
+
const toggleDrawer = React26.useCallback(() => {
|
|
30244
30519
|
setShow((prev) => !prev);
|
|
30245
30520
|
}, []);
|
|
30246
30521
|
return {
|
|
@@ -30252,7 +30527,7 @@ var useDrawer = (defaultVisibility = true) => {
|
|
|
30252
30527
|
};
|
|
30253
30528
|
var useDrawer_default = useDrawer;
|
|
30254
30529
|
var useModal = () => {
|
|
30255
|
-
const [show, setShow] =
|
|
30530
|
+
const [show, setShow] = React26.useState(false);
|
|
30256
30531
|
const handleOpenModal = () => {
|
|
30257
30532
|
setShow(true);
|
|
30258
30533
|
};
|
|
@@ -30267,7 +30542,7 @@ var useModal = () => {
|
|
|
30267
30542
|
};
|
|
30268
30543
|
var useModal_default = useModal;
|
|
30269
30544
|
var useTheme = () => {
|
|
30270
|
-
const context =
|
|
30545
|
+
const context = React26.useContext(ThemeContext);
|
|
30271
30546
|
if (!context) {
|
|
30272
30547
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
30273
30548
|
}
|
|
@@ -30308,7 +30583,7 @@ function CommentMenu({
|
|
|
30308
30583
|
onDelete,
|
|
30309
30584
|
onReport
|
|
30310
30585
|
}) {
|
|
30311
|
-
const ref =
|
|
30586
|
+
const ref = React26.useRef(null);
|
|
30312
30587
|
useClickOutside(ref, () => setOpen(false));
|
|
30313
30588
|
const items = [];
|
|
30314
30589
|
if (canEdit) {
|
|
@@ -30436,11 +30711,11 @@ function CommentItem({
|
|
|
30436
30711
|
onDelete,
|
|
30437
30712
|
onReport
|
|
30438
30713
|
}) {
|
|
30439
|
-
const [collapsed, setCollapsed] =
|
|
30440
|
-
const [isReplying, setIsReplying] =
|
|
30441
|
-
const [menuOpen, setMenuOpen] =
|
|
30442
|
-
const [loadingReplies, setLoadingReplies] =
|
|
30443
|
-
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);
|
|
30444
30719
|
const resolvedDepth = Math.min(depth, config.maxDepth);
|
|
30445
30720
|
const {
|
|
30446
30721
|
Header: HeaderComponent = CommentHeader_default,
|
|
@@ -30604,18 +30879,18 @@ function CommentThread({
|
|
|
30604
30879
|
onDelete,
|
|
30605
30880
|
onReport
|
|
30606
30881
|
}) {
|
|
30607
|
-
const [comments, setComments] =
|
|
30608
|
-
const [isLoadingComments, setIsLoadingComments] =
|
|
30609
|
-
const [replyCache, setReplyCache] =
|
|
30882
|
+
const [comments, setComments] = React26.useState([]);
|
|
30883
|
+
const [isLoadingComments, setIsLoadingComments] = React26.useState(true);
|
|
30884
|
+
const [replyCache, setReplyCache] = React26.useState(
|
|
30610
30885
|
{}
|
|
30611
30886
|
);
|
|
30612
|
-
const replyCacheRef =
|
|
30887
|
+
const replyCacheRef = React26.useRef(replyCache);
|
|
30613
30888
|
const ComposerComponent = components?.Composer ?? CommentComposer_default;
|
|
30614
30889
|
const resolvedConfig = {
|
|
30615
30890
|
...DEFAULT_COMMENT_THREAD_CONFIG,
|
|
30616
30891
|
...config
|
|
30617
30892
|
};
|
|
30618
|
-
|
|
30893
|
+
React26.useEffect(() => {
|
|
30619
30894
|
async function loadComments() {
|
|
30620
30895
|
try {
|
|
30621
30896
|
const result = await dataSource.getComments({
|
|
@@ -30629,10 +30904,10 @@ function CommentThread({
|
|
|
30629
30904
|
}
|
|
30630
30905
|
void loadComments();
|
|
30631
30906
|
}, [dataSource, resolvedConfig.commentsPerPage]);
|
|
30632
|
-
|
|
30907
|
+
React26.useEffect(() => {
|
|
30633
30908
|
replyCacheRef.current = replyCache;
|
|
30634
30909
|
}, [replyCache]);
|
|
30635
|
-
|
|
30910
|
+
React26.useEffect(() => {
|
|
30636
30911
|
let cancelled = false;
|
|
30637
30912
|
async function refreshLoadedReplies() {
|
|
30638
30913
|
const parentIds = Object.keys(replyCacheRef.current);
|
|
@@ -30668,13 +30943,13 @@ function CommentThread({
|
|
|
30668
30943
|
cancelled = true;
|
|
30669
30944
|
};
|
|
30670
30945
|
}, [dataSource, resolvedConfig.repliesPerPage]);
|
|
30671
|
-
|
|
30946
|
+
React26.useEffect(() => {
|
|
30672
30947
|
if (!updatedComment) {
|
|
30673
30948
|
return;
|
|
30674
30949
|
}
|
|
30675
30950
|
updateCommentEverywhere(updatedComment.id, () => updatedComment);
|
|
30676
30951
|
}, [updatedComment]);
|
|
30677
|
-
|
|
30952
|
+
React26.useEffect(() => {
|
|
30678
30953
|
if (!deletedComment) {
|
|
30679
30954
|
return;
|
|
30680
30955
|
}
|
|
@@ -30955,13 +31230,13 @@ function SliderItem({
|
|
|
30955
31230
|
}
|
|
30956
31231
|
var SliderItem_default = SliderItem;
|
|
30957
31232
|
function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
30958
|
-
const [images, setImages] =
|
|
31233
|
+
const [images, setImages] = React26.useState([
|
|
30959
31234
|
{
|
|
30960
31235
|
img: coverArt,
|
|
30961
31236
|
selected: true
|
|
30962
31237
|
}
|
|
30963
31238
|
]);
|
|
30964
|
-
|
|
31239
|
+
React26.useEffect(() => {
|
|
30965
31240
|
setImages([
|
|
30966
31241
|
{
|
|
30967
31242
|
img: coverArt,
|
|
@@ -30969,7 +31244,7 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
30969
31244
|
}
|
|
30970
31245
|
]);
|
|
30971
31246
|
}, [isSuccess]);
|
|
30972
|
-
|
|
31247
|
+
React26.useEffect(() => {
|
|
30973
31248
|
if (screenshots) {
|
|
30974
31249
|
const selectableScreenshots = [];
|
|
30975
31250
|
screenshots.forEach((item) => {
|
|
@@ -30981,8 +31256,8 @@ function Slider({ isLoading, isSuccess, coverArt, screenshots }) {
|
|
|
30981
31256
|
setImages((prev) => [...prev, ...selectableScreenshots]);
|
|
30982
31257
|
}
|
|
30983
31258
|
}, [isSuccess]);
|
|
30984
|
-
const [displayImg, setDisplayImg] =
|
|
30985
|
-
|
|
31259
|
+
const [displayImg, setDisplayImg] = React26.useState(coverArt);
|
|
31260
|
+
React26.useEffect(() => {
|
|
30986
31261
|
setDisplayImg(coverArt);
|
|
30987
31262
|
}, [coverArt]);
|
|
30988
31263
|
const displayImageHandler = (itemIndex, img) => {
|
|
@@ -31094,7 +31369,7 @@ function WorldMapCountryTable({
|
|
|
31094
31369
|
title = "Country Breakdown",
|
|
31095
31370
|
data
|
|
31096
31371
|
}) {
|
|
31097
|
-
const enrichedData =
|
|
31372
|
+
const enrichedData = React26.useMemo(() => {
|
|
31098
31373
|
const mapped = data.map((item) => {
|
|
31099
31374
|
const countryMeta = COUNTRIES.find((c3) => c3.code === item.code);
|
|
31100
31375
|
return {
|
|
@@ -31107,11 +31382,11 @@ function WorldMapCountryTable({
|
|
|
31107
31382
|
});
|
|
31108
31383
|
return mapped.sort((a2, b) => b.value - a2.value);
|
|
31109
31384
|
}, [data]);
|
|
31110
|
-
const total =
|
|
31385
|
+
const total = React26.useMemo(
|
|
31111
31386
|
() => enrichedData.reduce((sum, i) => sum + i.value, 0),
|
|
31112
31387
|
[enrichedData]
|
|
31113
31388
|
);
|
|
31114
|
-
const finalData =
|
|
31389
|
+
const finalData = React26.useMemo(() => {
|
|
31115
31390
|
return enrichedData.map((item) => ({
|
|
31116
31391
|
...item,
|
|
31117
31392
|
percent: total > 0 ? item.value / total * 100 : 0
|
|
@@ -31356,7 +31631,7 @@ var TNDropdownGroup = ({
|
|
|
31356
31631
|
navigate,
|
|
31357
31632
|
className
|
|
31358
31633
|
}) => {
|
|
31359
|
-
const [open, setOpen] =
|
|
31634
|
+
const [open, setOpen] = React26.useState(true);
|
|
31360
31635
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
31361
31636
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
31362
31637
|
"div",
|
|
@@ -31445,8 +31720,8 @@ var TNGroup = ({
|
|
|
31445
31720
|
components,
|
|
31446
31721
|
selected
|
|
31447
31722
|
}) => {
|
|
31448
|
-
const [open, setOpen] =
|
|
31449
|
-
const timeoutRef =
|
|
31723
|
+
const [open, setOpen] = React26.useState(false);
|
|
31724
|
+
const timeoutRef = React26.useRef(null);
|
|
31450
31725
|
const handleEnter = () => {
|
|
31451
31726
|
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
31452
31727
|
setOpen(true);
|
|
@@ -31550,14 +31825,14 @@ function ReviewForm({
|
|
|
31550
31825
|
onSubmit,
|
|
31551
31826
|
onCancel
|
|
31552
31827
|
}) {
|
|
31553
|
-
const [content3, setContent] =
|
|
31554
|
-
const [rating, setRating] =
|
|
31555
|
-
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(
|
|
31556
31831
|
initialValues?.isRecommended ?? true
|
|
31557
31832
|
);
|
|
31558
|
-
const [error, setError] =
|
|
31833
|
+
const [error, setError] = React26.useState("");
|
|
31559
31834
|
const contentLength = content3.trim().length;
|
|
31560
|
-
const ratingItems =
|
|
31835
|
+
const ratingItems = React26.useMemo(() => {
|
|
31561
31836
|
return Array.from(
|
|
31562
31837
|
{
|
|
31563
31838
|
length: config.maxRating
|
|
@@ -31565,7 +31840,7 @@ function ReviewForm({
|
|
|
31565
31840
|
(_2, index3) => index3 + 1
|
|
31566
31841
|
);
|
|
31567
31842
|
}, [config.maxRating]);
|
|
31568
|
-
|
|
31843
|
+
React26.useEffect(() => {
|
|
31569
31844
|
setContent(initialValues?.content ?? "");
|
|
31570
31845
|
setRating(initialValues?.rating ?? 0);
|
|
31571
31846
|
setIsRecommended(initialValues?.isRecommended ?? true);
|
|
@@ -31681,7 +31956,7 @@ function ReviewForm({
|
|
|
31681
31956
|
] }),
|
|
31682
31957
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
31683
31958
|
onCancel && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31684
|
-
|
|
31959
|
+
Button_web_default,
|
|
31685
31960
|
{
|
|
31686
31961
|
text: cancelLabel,
|
|
31687
31962
|
variant: "secondary",
|
|
@@ -31691,7 +31966,7 @@ function ReviewForm({
|
|
|
31691
31966
|
}
|
|
31692
31967
|
),
|
|
31693
31968
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31694
|
-
|
|
31969
|
+
Button_web_default,
|
|
31695
31970
|
{
|
|
31696
31971
|
text: submitLabel,
|
|
31697
31972
|
variant: "primary",
|
|
@@ -31717,7 +31992,7 @@ function ReviewComposer({
|
|
|
31717
31992
|
if (!currentUser) {
|
|
31718
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: [
|
|
31719
31994
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400", children: "Please login to post your review." }),
|
|
31720
|
-
onLoginClick && /* @__PURE__ */ jsxRuntime.jsx(
|
|
31995
|
+
onLoginClick && /* @__PURE__ */ jsxRuntime.jsx(Button_web_default, { text: "Login", variant: "primary", onClick: onLoginClick })
|
|
31721
31996
|
] }) });
|
|
31722
31997
|
}
|
|
31723
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: [
|
|
@@ -32009,7 +32284,7 @@ function MyReviewPanel({
|
|
|
32009
32284
|
onEditReview,
|
|
32010
32285
|
onDeleteReview
|
|
32011
32286
|
}) {
|
|
32012
|
-
const [editing, setEditing] =
|
|
32287
|
+
const [editing, setEditing] = React26.useState(false);
|
|
32013
32288
|
const ComposerComponent = components?.Composer ?? ReviewComposer_default;
|
|
32014
32289
|
const FormComponent = components?.Form ?? ReviewForm_default;
|
|
32015
32290
|
const HeaderComponent = components?.Header ?? ReviewHeader_default;
|
|
@@ -32093,7 +32368,7 @@ function MyReviewPanel({
|
|
|
32093
32368
|
/* @__PURE__ */ jsxRuntime.jsx(HeaderComponent, { review: myReview, config }),
|
|
32094
32369
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
32095
32370
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32096
|
-
|
|
32371
|
+
Button_web_default,
|
|
32097
32372
|
{
|
|
32098
32373
|
text: "Edit",
|
|
32099
32374
|
variant: "secondary",
|
|
@@ -32103,7 +32378,7 @@ function MyReviewPanel({
|
|
|
32103
32378
|
}
|
|
32104
32379
|
),
|
|
32105
32380
|
onDeleteReview && /* @__PURE__ */ jsxRuntime.jsx(
|
|
32106
|
-
|
|
32381
|
+
Button_web_default,
|
|
32107
32382
|
{
|
|
32108
32383
|
text: "Delete",
|
|
32109
32384
|
variant: "danger",
|
|
@@ -32165,7 +32440,7 @@ function ReviewMenu({
|
|
|
32165
32440
|
onReport,
|
|
32166
32441
|
onReply
|
|
32167
32442
|
}) {
|
|
32168
|
-
const ref =
|
|
32443
|
+
const ref = React26.useRef(null);
|
|
32169
32444
|
useClickOutside(ref, () => setOpen(false));
|
|
32170
32445
|
const items = [];
|
|
32171
32446
|
if (canEdit) {
|
|
@@ -32316,7 +32591,7 @@ function ReviewReplyMenu({
|
|
|
32316
32591
|
onDelete,
|
|
32317
32592
|
onReport
|
|
32318
32593
|
}) {
|
|
32319
|
-
const ref =
|
|
32594
|
+
const ref = React26.useRef(null);
|
|
32320
32595
|
useClickOutside(ref, () => setOpen(false));
|
|
32321
32596
|
const items = [];
|
|
32322
32597
|
if (canEdit) {
|
|
@@ -32385,7 +32660,7 @@ function ReviewReplyItem({
|
|
|
32385
32660
|
onDeleteReviewReply,
|
|
32386
32661
|
onReportReviewReply
|
|
32387
32662
|
}) {
|
|
32388
|
-
const [menuOpen, setMenuOpen] =
|
|
32663
|
+
const [menuOpen, setMenuOpen] = React26.useState(false);
|
|
32389
32664
|
const HeaderComponent = components?.ReplyHeader ?? ReviewReplyHeader_default;
|
|
32390
32665
|
const ContentComponent = components?.ReplyContent ?? ReviewReplyContent_default;
|
|
32391
32666
|
const MenuComponent = components?.ReplyMenu ?? ReviewReplyMenu_default;
|
|
@@ -32462,7 +32737,7 @@ function ReviewItem({
|
|
|
32462
32737
|
onDeleteReviewReply,
|
|
32463
32738
|
onReportReviewReply
|
|
32464
32739
|
}) {
|
|
32465
|
-
const [menuOpen, setMenuOpen] =
|
|
32740
|
+
const [menuOpen, setMenuOpen] = React26.useState(false);
|
|
32466
32741
|
const HeaderComponent = components?.Header ?? ReviewHeader_default;
|
|
32467
32742
|
const ContentComponent = components?.Content ?? ReviewContent_default;
|
|
32468
32743
|
const RatingComponent = components?.Rating ?? ReviewRating_default;
|
|
@@ -32612,28 +32887,28 @@ function useReviewThreadState({
|
|
|
32612
32887
|
onReviewUpdated,
|
|
32613
32888
|
onReviewDeleted
|
|
32614
32889
|
}) {
|
|
32615
|
-
const [reviews, setReviews] =
|
|
32616
|
-
const [myReview, setMyReview] =
|
|
32617
|
-
const [isLoadingReviews, setIsLoadingReviews] =
|
|
32618
|
-
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(
|
|
32619
32894
|
Boolean(dataSource.getMyReview && shouldLoadMyReview)
|
|
32620
32895
|
);
|
|
32621
|
-
const [isCreatingReview, setIsCreatingReview] =
|
|
32622
|
-
const [isUpdatingReview, setIsUpdatingReview] =
|
|
32623
|
-
const [isDeletingReview, setIsDeletingReview] =
|
|
32624
|
-
const [isCreatingReviewReply, setIsCreatingReviewReply] =
|
|
32625
|
-
const [isUpdatingReviewReply, setIsUpdatingReviewReply] =
|
|
32626
|
-
const [isDeletingReviewReply, setIsDeletingReviewReply] =
|
|
32627
|
-
const [reviewsError, setReviewsError] =
|
|
32628
|
-
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);
|
|
32629
32904
|
const error = reviewsError ?? myReviewError;
|
|
32630
|
-
const visibleReviews =
|
|
32905
|
+
const visibleReviews = React26.useMemo(() => {
|
|
32631
32906
|
if (config.showMyReviewInList || !myReview) {
|
|
32632
32907
|
return reviews;
|
|
32633
32908
|
}
|
|
32634
32909
|
return reviews.filter((review) => review.id !== myReview.id);
|
|
32635
32910
|
}, [config.showMyReviewInList, myReview, reviews]);
|
|
32636
|
-
const applyReview =
|
|
32911
|
+
const applyReview = React26.useCallback((review) => {
|
|
32637
32912
|
setReviews((prev) => upsertReview(prev, review));
|
|
32638
32913
|
setMyReview((prev) => {
|
|
32639
32914
|
if (!prev || prev.id !== review.id) {
|
|
@@ -32642,7 +32917,7 @@ function useReviewThreadState({
|
|
|
32642
32917
|
return review;
|
|
32643
32918
|
});
|
|
32644
32919
|
}, []);
|
|
32645
|
-
const applyReviewUpdater =
|
|
32920
|
+
const applyReviewUpdater = React26.useCallback(
|
|
32646
32921
|
(reviewId, updater) => {
|
|
32647
32922
|
setReviews((prev) => updateReview(prev, reviewId, updater));
|
|
32648
32923
|
setMyReview((prev) => {
|
|
@@ -32654,7 +32929,7 @@ function useReviewThreadState({
|
|
|
32654
32929
|
},
|
|
32655
32930
|
[]
|
|
32656
32931
|
);
|
|
32657
|
-
const removeReviewById =
|
|
32932
|
+
const removeReviewById = React26.useCallback((reviewId) => {
|
|
32658
32933
|
setReviews((prev) => removeReview(prev, reviewId));
|
|
32659
32934
|
setMyReview((prev) => {
|
|
32660
32935
|
if (!prev || prev.id !== reviewId) {
|
|
@@ -32663,7 +32938,7 @@ function useReviewThreadState({
|
|
|
32663
32938
|
return null;
|
|
32664
32939
|
});
|
|
32665
32940
|
}, []);
|
|
32666
|
-
const loadReviews =
|
|
32941
|
+
const loadReviews = React26.useCallback(async () => {
|
|
32667
32942
|
try {
|
|
32668
32943
|
setIsLoadingReviews(true);
|
|
32669
32944
|
setReviewsError(null);
|
|
@@ -32677,7 +32952,7 @@ function useReviewThreadState({
|
|
|
32677
32952
|
setIsLoadingReviews(false);
|
|
32678
32953
|
}
|
|
32679
32954
|
}, [config.reviewsPerPage, dataSource, targetId]);
|
|
32680
|
-
const loadMyReview =
|
|
32955
|
+
const loadMyReview = React26.useCallback(async () => {
|
|
32681
32956
|
if (!dataSource.getMyReview || !shouldLoadMyReview) {
|
|
32682
32957
|
setMyReview(null);
|
|
32683
32958
|
setIsLoadingMyReview(false);
|
|
@@ -32696,10 +32971,10 @@ function useReviewThreadState({
|
|
|
32696
32971
|
setIsLoadingMyReview(false);
|
|
32697
32972
|
}
|
|
32698
32973
|
}, [dataSource, shouldLoadMyReview, targetId]);
|
|
32699
|
-
const reload =
|
|
32974
|
+
const reload = React26.useCallback(async () => {
|
|
32700
32975
|
await Promise.all([loadReviews(), loadMyReview()]);
|
|
32701
32976
|
}, [loadReviews, loadMyReview]);
|
|
32702
|
-
const createReview =
|
|
32977
|
+
const createReview = React26.useCallback(
|
|
32703
32978
|
async (values) => {
|
|
32704
32979
|
try {
|
|
32705
32980
|
setIsCreatingReview(true);
|
|
@@ -32718,7 +32993,7 @@ function useReviewThreadState({
|
|
|
32718
32993
|
},
|
|
32719
32994
|
[dataSource, onReviewCreated]
|
|
32720
32995
|
);
|
|
32721
|
-
const updateReview2 =
|
|
32996
|
+
const updateReview2 = React26.useCallback(
|
|
32722
32997
|
async (review, values) => {
|
|
32723
32998
|
try {
|
|
32724
32999
|
setIsUpdatingReview(true);
|
|
@@ -32743,7 +33018,7 @@ function useReviewThreadState({
|
|
|
32743
33018
|
},
|
|
32744
33019
|
[dataSource, onReviewUpdated]
|
|
32745
33020
|
);
|
|
32746
|
-
const deleteReview =
|
|
33021
|
+
const deleteReview = React26.useCallback(
|
|
32747
33022
|
async (review) => {
|
|
32748
33023
|
try {
|
|
32749
33024
|
setIsDeletingReview(true);
|
|
@@ -32756,7 +33031,7 @@ function useReviewThreadState({
|
|
|
32756
33031
|
},
|
|
32757
33032
|
[dataSource, onReviewDeleted, removeReviewById]
|
|
32758
33033
|
);
|
|
32759
|
-
const createReviewReply =
|
|
33034
|
+
const createReviewReply = React26.useCallback(
|
|
32760
33035
|
async (input) => {
|
|
32761
33036
|
if (!dataSource.createReviewReply) {
|
|
32762
33037
|
throw new Error("createReviewReply is not implemented by dataSource.");
|
|
@@ -32779,7 +33054,7 @@ function useReviewThreadState({
|
|
|
32779
33054
|
},
|
|
32780
33055
|
[applyReview, applyReviewUpdater, config.maxRepliesPerReview, dataSource]
|
|
32781
33056
|
);
|
|
32782
|
-
const updateReviewReply2 =
|
|
33057
|
+
const updateReviewReply2 = React26.useCallback(
|
|
32783
33058
|
async (input) => {
|
|
32784
33059
|
if (!dataSource.updateReviewReply) {
|
|
32785
33060
|
throw new Error("updateReviewReply is not implemented by dataSource.");
|
|
@@ -32802,7 +33077,7 @@ function useReviewThreadState({
|
|
|
32802
33077
|
},
|
|
32803
33078
|
[applyReview, applyReviewUpdater, dataSource]
|
|
32804
33079
|
);
|
|
32805
|
-
const deleteReviewReply =
|
|
33080
|
+
const deleteReviewReply = React26.useCallback(
|
|
32806
33081
|
async (reviewId, replyId) => {
|
|
32807
33082
|
if (!dataSource.deleteReviewReply) {
|
|
32808
33083
|
throw new Error("deleteReviewReply is not implemented by dataSource.");
|
|
@@ -32825,7 +33100,7 @@ function useReviewThreadState({
|
|
|
32825
33100
|
},
|
|
32826
33101
|
[applyReview, applyReviewUpdater, dataSource]
|
|
32827
33102
|
);
|
|
32828
|
-
|
|
33103
|
+
React26.useEffect(() => {
|
|
32829
33104
|
let cancelled = false;
|
|
32830
33105
|
async function run() {
|
|
32831
33106
|
try {
|
|
@@ -32852,7 +33127,7 @@ function useReviewThreadState({
|
|
|
32852
33127
|
cancelled = true;
|
|
32853
33128
|
};
|
|
32854
33129
|
}, [config.reviewsPerPage, dataSource, targetId]);
|
|
32855
|
-
|
|
33130
|
+
React26.useEffect(() => {
|
|
32856
33131
|
let cancelled = false;
|
|
32857
33132
|
async function run() {
|
|
32858
33133
|
if (!dataSource.getMyReview || !shouldLoadMyReview) {
|
|
@@ -32884,19 +33159,19 @@ function useReviewThreadState({
|
|
|
32884
33159
|
cancelled = true;
|
|
32885
33160
|
};
|
|
32886
33161
|
}, [dataSource, shouldLoadMyReview, targetId]);
|
|
32887
|
-
|
|
33162
|
+
React26.useEffect(() => {
|
|
32888
33163
|
if (!updatedReview) {
|
|
32889
33164
|
return;
|
|
32890
33165
|
}
|
|
32891
33166
|
applyReview(updatedReview);
|
|
32892
33167
|
}, [applyReview, updatedReview]);
|
|
32893
|
-
|
|
33168
|
+
React26.useEffect(() => {
|
|
32894
33169
|
if (!deletedReview) {
|
|
32895
33170
|
return;
|
|
32896
33171
|
}
|
|
32897
33172
|
removeReviewById(deletedReview.id);
|
|
32898
33173
|
}, [deletedReview, removeReviewById]);
|
|
32899
|
-
|
|
33174
|
+
React26.useEffect(() => {
|
|
32900
33175
|
if (!updatedReviewReply) {
|
|
32901
33176
|
return;
|
|
32902
33177
|
}
|
|
@@ -32923,7 +33198,7 @@ function useReviewThreadState({
|
|
|
32923
33198
|
config.maxRepliesPerReview,
|
|
32924
33199
|
updatedReviewReply
|
|
32925
33200
|
]);
|
|
32926
|
-
|
|
33201
|
+
React26.useEffect(() => {
|
|
32927
33202
|
if (!deletedReviewReply) {
|
|
32928
33203
|
return;
|
|
32929
33204
|
}
|
|
@@ -33048,7 +33323,7 @@ function ReviewThread({
|
|
|
33048
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." })
|
|
33049
33324
|
] }),
|
|
33050
33325
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33051
|
-
|
|
33326
|
+
Button_web_default,
|
|
33052
33327
|
{
|
|
33053
33328
|
text: "Retry",
|
|
33054
33329
|
variant: "danger",
|
|
@@ -33095,7 +33370,7 @@ function ReviewThread({
|
|
|
33095
33370
|
] });
|
|
33096
33371
|
}
|
|
33097
33372
|
var ReviewThread_default = ReviewThread;
|
|
33098
|
-
var MarkdownContext =
|
|
33373
|
+
var MarkdownContext = React26.createContext(null);
|
|
33099
33374
|
|
|
33100
33375
|
// src/compositions/markdown/utils/sanitizeHeading.ts
|
|
33101
33376
|
function sanitizeHeading(text10, options = {}) {
|
|
@@ -33316,30 +33591,30 @@ function MarkdownProvider({
|
|
|
33316
33591
|
onActiveHeadingChange
|
|
33317
33592
|
}) {
|
|
33318
33593
|
const resolvedMarkdown = value ?? markdown ?? "";
|
|
33319
|
-
const [internalActiveHeading, setInternalActiveHeading] =
|
|
33320
|
-
const headings =
|
|
33594
|
+
const [internalActiveHeading, setInternalActiveHeading] = React26.useState(defaultActiveHeading);
|
|
33595
|
+
const headings = React26.useMemo(() => {
|
|
33321
33596
|
if (externalHeadings) {
|
|
33322
33597
|
return externalHeadings;
|
|
33323
33598
|
}
|
|
33324
33599
|
return extractHeadings(resolvedMarkdown);
|
|
33325
33600
|
}, [externalHeadings, resolvedMarkdown]);
|
|
33326
|
-
const numberedHeadings =
|
|
33601
|
+
const numberedHeadings = React26.useMemo(() => {
|
|
33327
33602
|
return generateHeadingNumbers(headings);
|
|
33328
33603
|
}, [headings]);
|
|
33329
|
-
const headingMap =
|
|
33604
|
+
const headingMap = React26.useMemo(() => {
|
|
33330
33605
|
return headings.reduce((acc, heading3) => {
|
|
33331
33606
|
acc[heading3.id] = heading3;
|
|
33332
33607
|
return acc;
|
|
33333
33608
|
}, {});
|
|
33334
33609
|
}, [headings]);
|
|
33335
33610
|
const activeHeading = controlledActiveHeading ?? internalActiveHeading;
|
|
33336
|
-
const getHeadingById =
|
|
33611
|
+
const getHeadingById = React26.useCallback(
|
|
33337
33612
|
(id2) => {
|
|
33338
33613
|
return headingMap[id2];
|
|
33339
33614
|
},
|
|
33340
33615
|
[headingMap]
|
|
33341
33616
|
);
|
|
33342
|
-
const setActiveHeading =
|
|
33617
|
+
const setActiveHeading = React26.useCallback(
|
|
33343
33618
|
(id2) => {
|
|
33344
33619
|
if (controlledActiveHeading === void 0) {
|
|
33345
33620
|
setInternalActiveHeading(id2);
|
|
@@ -33348,7 +33623,7 @@ function MarkdownProvider({
|
|
|
33348
33623
|
},
|
|
33349
33624
|
[controlledActiveHeading, headingMap, onActiveHeadingChange]
|
|
33350
33625
|
);
|
|
33351
|
-
const contextValue =
|
|
33626
|
+
const contextValue = React26.useMemo(
|
|
33352
33627
|
() => ({
|
|
33353
33628
|
markdown: resolvedMarkdown,
|
|
33354
33629
|
headings,
|
|
@@ -33373,7 +33648,7 @@ function MarkdownProvider({
|
|
|
33373
33648
|
var MarkdownProvider_default = MarkdownProvider;
|
|
33374
33649
|
function useMarkdown(options = {}) {
|
|
33375
33650
|
const { required = false, errorMessage } = options;
|
|
33376
|
-
const context =
|
|
33651
|
+
const context = React26.useContext(MarkdownContext);
|
|
33377
33652
|
if (!context && required) {
|
|
33378
33653
|
throw new Error(
|
|
33379
33654
|
errorMessage || "useMarkdown must be used inside a MarkdownProvider."
|
|
@@ -33396,15 +33671,15 @@ function useActiveHeading(options = {}) {
|
|
|
33396
33671
|
onActiveHeadingChange
|
|
33397
33672
|
} = options;
|
|
33398
33673
|
const headings = externalHeadings ?? context?.headings ?? [];
|
|
33399
|
-
const [internalActiveHeading, setInternalActiveHeading] =
|
|
33674
|
+
const [internalActiveHeading, setInternalActiveHeading] = React26.useState(defaultActiveHeading);
|
|
33400
33675
|
const activeHeading = controlledActiveHeading ?? context?.activeHeading ?? internalActiveHeading;
|
|
33401
|
-
const headingMap =
|
|
33676
|
+
const headingMap = React26.useMemo(() => {
|
|
33402
33677
|
return headings.reduce((acc, heading3) => {
|
|
33403
33678
|
acc[heading3.id] = heading3;
|
|
33404
33679
|
return acc;
|
|
33405
33680
|
}, {});
|
|
33406
33681
|
}, [headings]);
|
|
33407
|
-
const setActiveHeading =
|
|
33682
|
+
const setActiveHeading = React26.useCallback(
|
|
33408
33683
|
(id2) => {
|
|
33409
33684
|
if (controlledActiveHeading === void 0 && !context) {
|
|
33410
33685
|
setInternalActiveHeading(id2);
|
|
@@ -33414,7 +33689,7 @@ function useActiveHeading(options = {}) {
|
|
|
33414
33689
|
},
|
|
33415
33690
|
[context, controlledActiveHeading, headingMap, onActiveHeadingChange]
|
|
33416
33691
|
);
|
|
33417
|
-
const scrollToHeading =
|
|
33692
|
+
const scrollToHeading = React26.useCallback(
|
|
33418
33693
|
(id2) => {
|
|
33419
33694
|
if (typeof document === "undefined") return;
|
|
33420
33695
|
const element7 = document.getElementById(id2);
|
|
@@ -33427,10 +33702,10 @@ function useActiveHeading(options = {}) {
|
|
|
33427
33702
|
},
|
|
33428
33703
|
[scrollBehavior, scrollBlock, setActiveHeading]
|
|
33429
33704
|
);
|
|
33430
|
-
const observedHeadingIds =
|
|
33705
|
+
const observedHeadingIds = React26.useMemo(() => {
|
|
33431
33706
|
return headings.map((heading3) => heading3.id).join("|");
|
|
33432
33707
|
}, [headings]);
|
|
33433
|
-
|
|
33708
|
+
React26.useEffect(() => {
|
|
33434
33709
|
if (!enabled) return;
|
|
33435
33710
|
if (typeof window === "undefined") return;
|
|
33436
33711
|
if (!("IntersectionObserver" in window)) return;
|
|
@@ -33479,7 +33754,7 @@ function useMarkdownHeadings(options = {}) {
|
|
|
33479
33754
|
minDepth = 1,
|
|
33480
33755
|
maxDepth = 6
|
|
33481
33756
|
} = options;
|
|
33482
|
-
const baseHeadings =
|
|
33757
|
+
const baseHeadings = React26.useMemo(() => {
|
|
33483
33758
|
if (externalHeadings) {
|
|
33484
33759
|
return externalHeadings;
|
|
33485
33760
|
}
|
|
@@ -33488,15 +33763,15 @@ function useMarkdownHeadings(options = {}) {
|
|
|
33488
33763
|
}
|
|
33489
33764
|
return context?.headings ?? [];
|
|
33490
33765
|
}, [context?.headings, externalHeadings, markdown]);
|
|
33491
|
-
const headings =
|
|
33766
|
+
const headings = React26.useMemo(() => {
|
|
33492
33767
|
return baseHeadings.filter((heading3) => {
|
|
33493
33768
|
return heading3.level >= minDepth && heading3.level <= maxDepth;
|
|
33494
33769
|
});
|
|
33495
33770
|
}, [baseHeadings, minDepth, maxDepth]);
|
|
33496
|
-
const numberedHeadings =
|
|
33771
|
+
const numberedHeadings = React26.useMemo(() => {
|
|
33497
33772
|
return generateHeadingNumbers(headings);
|
|
33498
33773
|
}, [headings]);
|
|
33499
|
-
const headingMap =
|
|
33774
|
+
const headingMap = React26.useMemo(() => {
|
|
33500
33775
|
return headings.reduce((acc, heading3) => {
|
|
33501
33776
|
acc[heading3.id] = heading3;
|
|
33502
33777
|
return acc;
|
|
@@ -33888,11 +34163,11 @@ function addChildren(props, children3) {
|
|
|
33888
34163
|
}
|
|
33889
34164
|
}
|
|
33890
34165
|
}
|
|
33891
|
-
function productionCreate(_2,
|
|
34166
|
+
function productionCreate(_2, jsx257, jsxs129) {
|
|
33892
34167
|
return create3;
|
|
33893
34168
|
function create3(_3, type2, props, key) {
|
|
33894
34169
|
const isStaticChildren = Array.isArray(props.children);
|
|
33895
|
-
const fn = isStaticChildren ?
|
|
34170
|
+
const fn = isStaticChildren ? jsxs129 : jsx257;
|
|
33896
34171
|
return key ? fn(type2, props, key) : fn(type2, props);
|
|
33897
34172
|
}
|
|
33898
34173
|
}
|
|
@@ -42282,7 +42557,7 @@ function markdownTable(table2, options) {
|
|
|
42282
42557
|
let rowIndex = -1;
|
|
42283
42558
|
while (++rowIndex < table2.length) {
|
|
42284
42559
|
const row2 = [];
|
|
42285
|
-
const
|
|
42560
|
+
const sizes5 = [];
|
|
42286
42561
|
let columnIndex2 = -1;
|
|
42287
42562
|
if (table2[rowIndex].length > mostCellsPerRow) {
|
|
42288
42563
|
mostCellsPerRow = table2[rowIndex].length;
|
|
@@ -42291,7 +42566,7 @@ function markdownTable(table2, options) {
|
|
|
42291
42566
|
const cell = serialize2(table2[rowIndex][columnIndex2]);
|
|
42292
42567
|
if (settings.alignDelimiters !== false) {
|
|
42293
42568
|
const size = stringLength(cell);
|
|
42294
|
-
|
|
42569
|
+
sizes5[columnIndex2] = size;
|
|
42295
42570
|
if (longestCellByColumn[columnIndex2] === void 0 || size > longestCellByColumn[columnIndex2]) {
|
|
42296
42571
|
longestCellByColumn[columnIndex2] = size;
|
|
42297
42572
|
}
|
|
@@ -42299,7 +42574,7 @@ function markdownTable(table2, options) {
|
|
|
42299
42574
|
row2.push(cell);
|
|
42300
42575
|
}
|
|
42301
42576
|
cellMatrix[rowIndex] = row2;
|
|
42302
|
-
sizeMatrix[rowIndex] =
|
|
42577
|
+
sizeMatrix[rowIndex] = sizes5;
|
|
42303
42578
|
}
|
|
42304
42579
|
let columnIndex = -1;
|
|
42305
42580
|
if (typeof align === "object" && "length" in align) {
|
|
@@ -42314,7 +42589,7 @@ function markdownTable(table2, options) {
|
|
|
42314
42589
|
}
|
|
42315
42590
|
columnIndex = -1;
|
|
42316
42591
|
const row = [];
|
|
42317
|
-
const
|
|
42592
|
+
const sizes4 = [];
|
|
42318
42593
|
while (++columnIndex < mostCellsPerRow) {
|
|
42319
42594
|
const code4 = alignments[columnIndex];
|
|
42320
42595
|
let before = "";
|
|
@@ -42337,17 +42612,17 @@ function markdownTable(table2, options) {
|
|
|
42337
42612
|
if (size > longestCellByColumn[columnIndex]) {
|
|
42338
42613
|
longestCellByColumn[columnIndex] = size;
|
|
42339
42614
|
}
|
|
42340
|
-
|
|
42615
|
+
sizes4[columnIndex] = size;
|
|
42341
42616
|
}
|
|
42342
42617
|
row[columnIndex] = cell;
|
|
42343
42618
|
}
|
|
42344
42619
|
cellMatrix.splice(1, 0, row);
|
|
42345
|
-
sizeMatrix.splice(1, 0,
|
|
42620
|
+
sizeMatrix.splice(1, 0, sizes4);
|
|
42346
42621
|
rowIndex = -1;
|
|
42347
42622
|
const lines = [];
|
|
42348
42623
|
while (++rowIndex < cellMatrix.length) {
|
|
42349
42624
|
const row2 = cellMatrix[rowIndex];
|
|
42350
|
-
const
|
|
42625
|
+
const sizes5 = sizeMatrix[rowIndex];
|
|
42351
42626
|
columnIndex = -1;
|
|
42352
42627
|
const line = [];
|
|
42353
42628
|
while (++columnIndex < mostCellsPerRow) {
|
|
@@ -42355,7 +42630,7 @@ function markdownTable(table2, options) {
|
|
|
42355
42630
|
let before = "";
|
|
42356
42631
|
let after = "";
|
|
42357
42632
|
if (settings.alignDelimiters !== false) {
|
|
42358
|
-
const size = longestCellByColumn[columnIndex] - (
|
|
42633
|
+
const size = longestCellByColumn[columnIndex] - (sizes5[columnIndex] || 0);
|
|
42359
42634
|
const code4 = alignments[columnIndex];
|
|
42360
42635
|
if (code4 === 114) {
|
|
42361
42636
|
before = " ".repeat(size);
|
|
@@ -53916,7 +54191,7 @@ function MarkdownHeading({
|
|
|
53916
54191
|
const normalizedLevel = Math.min(Math.max(level, 1), 6);
|
|
53917
54192
|
const TypographyComponent = normalizedLevel <= 3 ? Chapter : Section;
|
|
53918
54193
|
const typographyLevel = normalizedLevel <= 3 ? normalizedLevel : normalizedLevel - 3;
|
|
53919
|
-
return
|
|
54194
|
+
return React26.createElement(
|
|
53920
54195
|
TypographyComponent,
|
|
53921
54196
|
{
|
|
53922
54197
|
...props,
|
|
@@ -54151,7 +54426,7 @@ function createElement2(_ref) {
|
|
|
54151
54426
|
});
|
|
54152
54427
|
}
|
|
54153
54428
|
var children3 = childrenCreator(node2.children);
|
|
54154
|
-
return /* @__PURE__ */
|
|
54429
|
+
return /* @__PURE__ */ React26__default.default.createElement(TagName, _extends({
|
|
54155
54430
|
key
|
|
54156
54431
|
}, props), children3);
|
|
54157
54432
|
}
|
|
@@ -54194,7 +54469,7 @@ function getAllLineNumbers(_ref) {
|
|
|
54194
54469
|
var lines = _ref.lines, startingLineNumber = _ref.startingLineNumber, style2 = _ref.style;
|
|
54195
54470
|
return lines.map(function(_2, i) {
|
|
54196
54471
|
var number3 = i + startingLineNumber;
|
|
54197
|
-
return /* @__PURE__ */
|
|
54472
|
+
return /* @__PURE__ */ React26__default.default.createElement("span", {
|
|
54198
54473
|
key: "line-".concat(i),
|
|
54199
54474
|
className: "react-syntax-highlighter-line-number",
|
|
54200
54475
|
style: typeof style2 === "function" ? style2(number3) : style2
|
|
@@ -54206,7 +54481,7 @@ function AllLineNumbers(_ref2) {
|
|
|
54206
54481
|
"float": "left",
|
|
54207
54482
|
paddingRight: "10px"
|
|
54208
54483
|
} : _ref2$containerStyle, _ref2$numberStyle = _ref2.numberStyle, numberStyle = _ref2$numberStyle === void 0 ? {} : _ref2$numberStyle, startingLineNumber = _ref2.startingLineNumber;
|
|
54209
|
-
return /* @__PURE__ */
|
|
54484
|
+
return /* @__PURE__ */ React26__default.default.createElement("code", {
|
|
54210
54485
|
style: Object.assign({}, codeStyle, containerStyle)
|
|
54211
54486
|
}, getAllLineNumbers({
|
|
54212
54487
|
lines: codeString.replace(/\n$/, "").split("\n"),
|
|
@@ -54427,7 +54702,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54427
54702
|
style: _objectSpread2(_objectSpread2({}, style2['code[class*="language-"]']), style2['code[class*="language-'.concat(language, '"]')])
|
|
54428
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);
|
|
54429
54704
|
astGenerator = astGenerator || defaultAstGenerator;
|
|
54430
|
-
var allLineNumbers = showLineNumbers ? /* @__PURE__ */
|
|
54705
|
+
var allLineNumbers = showLineNumbers ? /* @__PURE__ */ React26__default.default.createElement(AllLineNumbers, {
|
|
54431
54706
|
containerStyle: lineNumberContainerStyle,
|
|
54432
54707
|
codeStyle: codeTagProps.style || {},
|
|
54433
54708
|
numberStyle: lineNumberStyle,
|
|
@@ -54454,7 +54729,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54454
54729
|
}, codeTagProps.style);
|
|
54455
54730
|
}
|
|
54456
54731
|
if (!astGenerator) {
|
|
54457
|
-
return /* @__PURE__ */
|
|
54732
|
+
return /* @__PURE__ */ React26__default.default.createElement(PreTag, preProps, allLineNumbers, /* @__PURE__ */ React26__default.default.createElement(CodeTag, codeTagProps, code4));
|
|
54458
54733
|
}
|
|
54459
54734
|
if (wrapLines === void 0 && renderer || wrapLongLines) wrapLines = true;
|
|
54460
54735
|
renderer = renderer || defaultRenderer;
|
|
@@ -54474,7 +54749,7 @@ function highlight_default(defaultAstGenerator, defaultStyle) {
|
|
|
54474
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;
|
|
54475
54750
|
var largestLineNumber = startingLineNumber + lineBreakCount;
|
|
54476
54751
|
var rows = processLines(codeTree, wrapLines, lineProps, showLineNumbers, showInlineLineNumbers, startingLineNumber, largestLineNumber, lineNumberStyle, wrapLongLines);
|
|
54477
|
-
return /* @__PURE__ */
|
|
54752
|
+
return /* @__PURE__ */ React26__default.default.createElement(PreTag, preProps, /* @__PURE__ */ React26__default.default.createElement(CodeTag, codeTagProps, !showInlineLineNumbers && allLineNumbers, renderer({
|
|
54478
54753
|
rows,
|
|
54479
54754
|
stylesheet: style2,
|
|
54480
54755
|
useInlineStyles
|
|
@@ -54811,7 +55086,7 @@ var json_default = json;
|
|
|
54811
55086
|
|
|
54812
55087
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/jsx.js
|
|
54813
55088
|
init_jsx();
|
|
54814
|
-
var jsx_default =
|
|
55089
|
+
var jsx_default = jsx218;
|
|
54815
55090
|
|
|
54816
55091
|
// node_modules/react-syntax-highlighter/dist/esm/languages/prism/markup.js
|
|
54817
55092
|
init_markup();
|
|
@@ -54902,19 +55177,19 @@ function MarkdownCodeBlock({
|
|
|
54902
55177
|
wrapLongLines = false,
|
|
54903
55178
|
...props
|
|
54904
55179
|
}) {
|
|
54905
|
-
const [copied, setCopied] =
|
|
54906
|
-
const timeoutRef =
|
|
55180
|
+
const [copied, setCopied] = React26.useState(false);
|
|
55181
|
+
const timeoutRef = React26.useRef(null);
|
|
54907
55182
|
const title = meta?.title ?? meta?.filename;
|
|
54908
|
-
const resolvedLanguage =
|
|
55183
|
+
const resolvedLanguage = React26.useMemo(() => {
|
|
54909
55184
|
return normalizeLanguage(language);
|
|
54910
55185
|
}, [language]);
|
|
54911
55186
|
const languageLabel = language || resolvedLanguage;
|
|
54912
55187
|
const showHeader = Boolean(title || languageLabel || showCopy);
|
|
54913
|
-
const highlightLines =
|
|
55188
|
+
const highlightLines = React26.useMemo(() => {
|
|
54914
55189
|
return new Set(meta?.highlightLines ?? []);
|
|
54915
55190
|
}, [meta?.highlightLines]);
|
|
54916
55191
|
const showLineNumbers = Boolean(meta?.showLineNumbers);
|
|
54917
|
-
|
|
55192
|
+
React26.useEffect(() => {
|
|
54918
55193
|
return () => {
|
|
54919
55194
|
if (timeoutRef.current) {
|
|
54920
55195
|
window.clearTimeout(timeoutRef.current);
|
|
@@ -55404,7 +55679,7 @@ function getTextContent(node2) {
|
|
|
55404
55679
|
if (Array.isArray(node2)) {
|
|
55405
55680
|
return node2.map(getTextContent).join("");
|
|
55406
55681
|
}
|
|
55407
|
-
if (
|
|
55682
|
+
if (React26.isValidElement(node2)) {
|
|
55408
55683
|
return getTextContent(node2.props.children);
|
|
55409
55684
|
}
|
|
55410
55685
|
return "";
|
|
@@ -55824,7 +56099,7 @@ function MarkdownViewer({
|
|
|
55824
56099
|
}) {
|
|
55825
56100
|
const context = useMarkdown();
|
|
55826
56101
|
const markdown = value ?? context?.markdown ?? "";
|
|
55827
|
-
const headings =
|
|
56102
|
+
const headings = React26.useMemo(() => {
|
|
55828
56103
|
if (externalHeadings) {
|
|
55829
56104
|
return externalHeadings;
|
|
55830
56105
|
}
|
|
@@ -55916,14 +56191,14 @@ function MarkdownTOC({
|
|
|
55916
56191
|
onHeadingClick
|
|
55917
56192
|
}) {
|
|
55918
56193
|
const context = useMarkdown();
|
|
55919
|
-
const [collapsed, setCollapsed] =
|
|
56194
|
+
const [collapsed, setCollapsed] = React26.useState(defaultCollapsed);
|
|
55920
56195
|
const { headings, numberedHeadings, hasHeadings } = useMarkdownHeadings({
|
|
55921
56196
|
markdown,
|
|
55922
56197
|
headings: externalHeadings,
|
|
55923
56198
|
minDepth,
|
|
55924
56199
|
maxDepth
|
|
55925
56200
|
});
|
|
55926
|
-
const tocHeadings =
|
|
56201
|
+
const tocHeadings = React26.useMemo(() => {
|
|
55927
56202
|
return numbered ? numberedHeadings : headings;
|
|
55928
56203
|
}, [headings, numbered, numberedHeadings]);
|
|
55929
56204
|
const { activeHeading, scrollToHeading, setActiveHeading } = useActiveHeading(
|
|
@@ -56344,20 +56619,20 @@ function MarkdownSourceEditor({
|
|
|
56344
56619
|
onKeyDown,
|
|
56345
56620
|
...props
|
|
56346
56621
|
}) {
|
|
56347
|
-
const textareaRef =
|
|
56622
|
+
const textareaRef = React26.useRef(null);
|
|
56348
56623
|
const isControlled = value !== void 0;
|
|
56349
56624
|
const isViewModeControlled = viewMode !== void 0;
|
|
56350
|
-
const [internalValue, setInternalValue] =
|
|
56351
|
-
const [internalViewMode, setInternalViewMode] =
|
|
56625
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56626
|
+
const [internalViewMode, setInternalViewMode] = React26.useState(defaultViewMode);
|
|
56352
56627
|
const currentValue = isControlled ? value : internalValue;
|
|
56353
56628
|
const currentViewMode = isViewModeControlled ? viewMode : internalViewMode;
|
|
56354
56629
|
const resolvedValue = currentValue ?? "";
|
|
56355
|
-
|
|
56630
|
+
React26.useEffect(() => {
|
|
56356
56631
|
if (!isControlled) {
|
|
56357
56632
|
setInternalValue(defaultValue);
|
|
56358
56633
|
}
|
|
56359
56634
|
}, [defaultValue, isControlled]);
|
|
56360
|
-
|
|
56635
|
+
React26.useEffect(() => {
|
|
56361
56636
|
if (!isViewModeControlled) {
|
|
56362
56637
|
setInternalViewMode(defaultViewMode);
|
|
56363
56638
|
}
|
|
@@ -56525,9 +56800,9 @@ function MarkdownSplitEditor({
|
|
|
56525
56800
|
...sourceEditorProps
|
|
56526
56801
|
}) {
|
|
56527
56802
|
const isControlled = value !== void 0;
|
|
56528
|
-
const [internalValue, setInternalValue] =
|
|
56803
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56529
56804
|
const currentValue = isControlled ? value : internalValue;
|
|
56530
|
-
|
|
56805
|
+
React26.useEffect(() => {
|
|
56531
56806
|
if (!isControlled) {
|
|
56532
56807
|
setInternalValue(defaultValue);
|
|
56533
56808
|
}
|
|
@@ -56606,9 +56881,9 @@ function MarkdownEditor({
|
|
|
56606
56881
|
...sourceEditorProps
|
|
56607
56882
|
}) {
|
|
56608
56883
|
const isControlled = value !== void 0;
|
|
56609
|
-
const [internalValue, setInternalValue] =
|
|
56884
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56610
56885
|
const currentValue = isControlled ? value : internalValue;
|
|
56611
|
-
|
|
56886
|
+
React26.useEffect(() => {
|
|
56612
56887
|
if (!isControlled) {
|
|
56613
56888
|
setInternalValue(defaultValue);
|
|
56614
56889
|
}
|
|
@@ -56738,9 +57013,9 @@ function CodeMirrorMarkdownEditor({
|
|
|
56738
57013
|
extensions
|
|
56739
57014
|
}) {
|
|
56740
57015
|
const isControlled = value !== void 0;
|
|
56741
|
-
const [internalValue, setInternalValue] =
|
|
57016
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56742
57017
|
const currentValue = isControlled ? value : internalValue;
|
|
56743
|
-
|
|
57018
|
+
React26.useEffect(() => {
|
|
56744
57019
|
if (!isControlled) {
|
|
56745
57020
|
setInternalValue(defaultValue);
|
|
56746
57021
|
}
|
|
@@ -56894,7 +57169,7 @@ function createDefaultPlugins({
|
|
|
56894
57169
|
] : []
|
|
56895
57170
|
];
|
|
56896
57171
|
}
|
|
56897
|
-
var MDXMarkdownEditor =
|
|
57172
|
+
var MDXMarkdownEditor = React26.forwardRef(
|
|
56898
57173
|
function MDXMarkdownEditor2({
|
|
56899
57174
|
value,
|
|
56900
57175
|
defaultValue = "",
|
|
@@ -56925,11 +57200,11 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
56925
57200
|
linkDialogOptions,
|
|
56926
57201
|
...props
|
|
56927
57202
|
}, forwardedRef) {
|
|
56928
|
-
const editorRef =
|
|
57203
|
+
const editorRef = React26.useRef(null);
|
|
56929
57204
|
const isControlled = value !== void 0;
|
|
56930
|
-
const [internalValue, setInternalValue] =
|
|
57205
|
+
const [internalValue, setInternalValue] = React26.useState(defaultValue);
|
|
56931
57206
|
const currentValue = isControlled ? value : internalValue;
|
|
56932
|
-
const defaultPlugins =
|
|
57207
|
+
const defaultPlugins = React26.useMemo(
|
|
56933
57208
|
() => createDefaultPlugins({
|
|
56934
57209
|
showToolbar,
|
|
56935
57210
|
toolbarPosition,
|
|
@@ -56951,7 +57226,7 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
56951
57226
|
toolbarPosition
|
|
56952
57227
|
]
|
|
56953
57228
|
);
|
|
56954
|
-
|
|
57229
|
+
React26.useImperativeHandle(
|
|
56955
57230
|
forwardedRef,
|
|
56956
57231
|
() => ({
|
|
56957
57232
|
focus: (callbackFn, options) => editorRef.current?.focus(callbackFn, options),
|
|
@@ -56963,7 +57238,7 @@ var MDXMarkdownEditor = React25.forwardRef(
|
|
|
56963
57238
|
}),
|
|
56964
57239
|
[currentValue]
|
|
56965
57240
|
);
|
|
56966
|
-
|
|
57241
|
+
React26.useEffect(() => {
|
|
56967
57242
|
if (!isControlled || !editorRef.current) return;
|
|
56968
57243
|
const nextValue = value ?? "";
|
|
56969
57244
|
if (editorRef.current.getMarkdown() !== nextValue) {
|
|
@@ -57045,7 +57320,7 @@ function MDXMarkdownField({
|
|
|
57045
57320
|
helperTextClassName,
|
|
57046
57321
|
...editorProps
|
|
57047
57322
|
}) {
|
|
57048
|
-
const editorRef =
|
|
57323
|
+
const editorRef = React26.useRef(null);
|
|
57049
57324
|
const [field, meta, helpers] = formik.useField({
|
|
57050
57325
|
name: name2,
|
|
57051
57326
|
validate
|
|
@@ -57452,7 +57727,7 @@ function SidebarLayout({
|
|
|
57452
57727
|
header = /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
|
|
57453
57728
|
footer: footer2 = /* @__PURE__ */ jsxRuntime.jsx(Footer, {})
|
|
57454
57729
|
}) {
|
|
57455
|
-
const [showSidebar, setShowSidebar] =
|
|
57730
|
+
const [showSidebar, setShowSidebar] = React26.useState(true);
|
|
57456
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: [
|
|
57457
57732
|
/* @__PURE__ */ jsxRuntime.jsx(ContentArea_default, { children: children3 }),
|
|
57458
57733
|
footer2
|
|
@@ -57477,11 +57752,32 @@ function SidemenuLayout({ data, children: children3 }) {
|
|
|
57477
57752
|
) });
|
|
57478
57753
|
}
|
|
57479
57754
|
var SidemenuLayout_default = SidemenuLayout;
|
|
57755
|
+
var EUIDevPreviewPlatformContext = React26.createContext({
|
|
57756
|
+
platform: "web",
|
|
57757
|
+
setPlatform: () => void 0
|
|
57758
|
+
});
|
|
57759
|
+
var useEUIDevPreviewPlatform = () => React26.useContext(EUIDevPreviewPlatformContext);
|
|
57480
57760
|
function EUIDevLayout({
|
|
57481
57761
|
children: children3,
|
|
57482
|
-
header
|
|
57762
|
+
header,
|
|
57483
57763
|
footer: footer2 = /* @__PURE__ */ jsxRuntime.jsx(Footer, {})
|
|
57484
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
|
+
);
|
|
57485
57781
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57486
57782
|
EUIProvider,
|
|
57487
57783
|
{
|
|
@@ -57493,8 +57789,8 @@ function EUIDevLayout({
|
|
|
57493
57789
|
}
|
|
57494
57790
|
},
|
|
57495
57791
|
children: /* @__PURE__ */ jsxRuntime.jsx(GenericLayout_default, { children: /* @__PURE__ */ jsxRuntime.jsxs(Layout, { children: [
|
|
57496
|
-
|
|
57497
|
-
/* @__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 }) }) }),
|
|
57498
57794
|
footer2
|
|
57499
57795
|
] }) })
|
|
57500
57796
|
}
|
|
@@ -57506,7 +57802,7 @@ function ScrollToTop({
|
|
|
57506
57802
|
behavior = "smooth",
|
|
57507
57803
|
target
|
|
57508
57804
|
}) {
|
|
57509
|
-
|
|
57805
|
+
React26.useEffect(() => {
|
|
57510
57806
|
if (target) {
|
|
57511
57807
|
target.scrollTo({
|
|
57512
57808
|
top: 0,
|
|
@@ -57540,7 +57836,7 @@ exports.BoxNavItem = BoxNavItem_default;
|
|
|
57540
57836
|
exports.Brand = Brand;
|
|
57541
57837
|
exports.Breadcrumb = Breadcrumb;
|
|
57542
57838
|
exports.BreadcrumbItem = BreadcrumbItem_default;
|
|
57543
|
-
exports.Button =
|
|
57839
|
+
exports.Button = Button_web_default;
|
|
57544
57840
|
exports.CHART_COLOR_PALETTE = CHART_COLOR_PALETTE;
|
|
57545
57841
|
exports.CHART_DARK_THEME = CHART_DARK_THEME;
|
|
57546
57842
|
exports.CHART_DATA_MODES = CHART_DATA_MODES;
|
|
@@ -57721,6 +58017,7 @@ exports.Overline = Overline;
|
|
|
57721
58017
|
exports.Paragraph = Paragraph;
|
|
57722
58018
|
exports.PiePlot = PiePlot;
|
|
57723
58019
|
exports.PollingChartDataSource = PollingChartDataSource;
|
|
58020
|
+
exports.PreviewSwitch = PreviewSwitch;
|
|
57724
58021
|
exports.PriceTag = PriceTag;
|
|
57725
58022
|
exports.ProgressBar = ProgressBar;
|
|
57726
58023
|
exports.ProgressBarRating = ProgressBarRating;
|
|
@@ -57765,6 +58062,7 @@ exports.Tags = Tags_default;
|
|
|
57765
58062
|
exports.TextArea = TextArea_default;
|
|
57766
58063
|
exports.ThemeContext = ThemeContext;
|
|
57767
58064
|
exports.ThemeProvider = ThemeProvider;
|
|
58065
|
+
exports.ThemeSelect = ThemeSelect;
|
|
57768
58066
|
exports.ThemeSwitch = ThemeSwitch;
|
|
57769
58067
|
exports.TitleBanner = TitleBanner;
|
|
57770
58068
|
exports.Toast = Toast;
|
|
@@ -57831,8 +58129,10 @@ exports.getBrowserOrigin = getBrowserOrigin;
|
|
|
57831
58129
|
exports.getBrowserRedirectURL = getBrowserRedirectURL;
|
|
57832
58130
|
exports.getConsentStatusFromCategories = getConsentStatusFromCategories;
|
|
57833
58131
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
58132
|
+
exports.getCurrentFullUrl = getCurrentFullUrl;
|
|
57834
58133
|
exports.getCurrentPath = getCurrentPath;
|
|
57835
58134
|
exports.getCurrentReferrer = getCurrentReferrer;
|
|
58135
|
+
exports.getCurrentTitle = getCurrentTitle;
|
|
57836
58136
|
exports.getDeviceInfo = getDeviceInfo;
|
|
57837
58137
|
exports.getDoNotTrackEnabled = getDoNotTrackEnabled;
|
|
57838
58138
|
exports.getLayout = getLayout;
|
|
@@ -57899,6 +58199,7 @@ exports.useCookieConsent = useCookieConsent;
|
|
|
57899
58199
|
exports.useCurrentTheme = useCurrentTheme_default;
|
|
57900
58200
|
exports.useDrawer = useDrawer_default;
|
|
57901
58201
|
exports.useEUIConfig = useEUIConfig;
|
|
58202
|
+
exports.useEUIDevPreviewPlatform = useEUIDevPreviewPlatform;
|
|
57902
58203
|
exports.useIsMobile = useIsMobile_default;
|
|
57903
58204
|
exports.useMarkdown = useMarkdown;
|
|
57904
58205
|
exports.useMarkdownHeadings = useMarkdownHeadings;
|