xmlui 0.9.7 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-DJ9I-JAW.mjs → apiInterceptorWorker-DmE-x8Au.mjs} +1 -1
- package/dist/{index-ohXvHX94.mjs → index-CmAO1zjU.mjs} +65 -41
- package/dist/{lint-B9tKGcOX.mjs → lint-DmJOJSJa.mjs} +0 -1
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +2 -1
- package/dist/scripts/src/components/Theme/ThemeNative.js +2 -2
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +4 -3
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +3 -3
- package/dist/scripts/src/components-core/rendering/Container.js +5 -2
- package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +14 -2
- package/dist/scripts/src/components-core/rendering/StateContainer.js +14 -2
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +5 -5
- package/dist/scripts/src/parsers/scripting/modules.js +0 -1
- package/dist/xmlui-metadata.mjs +2 -1
- package/dist/xmlui-metadata.umd.js +2 -1
- package/dist/xmlui-parser.mjs +2 -2
- package/dist/xmlui-standalone.umd.js +66 -43
- package/dist/xmlui.mjs +1 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _executor, _DeferredPromise_instances, decorate_fn, _a2;
|
|
13
13
|
import { delay as delay$1, HttpResponse, http } from "msw";
|
|
14
14
|
import { isArray, isObject as isObject$1, mapValues } from "lodash-es";
|
|
15
|
-
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-
|
|
15
|
+
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-CmAO1zjU.mjs";
|
|
16
16
|
import Dexie from "dexie";
|
|
17
17
|
var POSITIONALS_EXP = /(%?)(%([sdijo]))/g;
|
|
18
18
|
function serializePositional(positional, flag) {
|
|
@@ -7,7 +7,7 @@ import { useQuery, useInfiniteQuery, QueryClientProvider, QueryClient } from "@t
|
|
|
7
7
|
import produce, { createDraft, finishDraft, enableMapSet } from "immer";
|
|
8
8
|
import { throttle, get, isNil, omitBy, isUndefined, noop as noop$2, isPlainObject, isEqual, union, uniq, orderBy as orderBy$1, isEmpty, isObject, isArray, groupBy, sortBy, omit, isNumber, isString, cloneDeep, merge, defaultTo, capitalize, unset, setWith, keyBy, pick } from "lodash-es";
|
|
9
9
|
import { formatDistanceToNow, parse, format, parseISO, isValid, isTomorrow, isYesterday, isToday, isThisWeek, formatRelative, isThisYear, isSameDay, differenceInMinutes } from "date-fns";
|
|
10
|
-
import { v as validationStatusMd, l as labelPositionMd, o as orientationOptionMd, a as alignmentOptionValues, L as LinkTargetMd, b as alignmentOptionMd, i as iconPositionMd, c as buttonTypesMd, s as sizeMd, d as buttonThemeMd, e as buttonVariantMd, P as Parser, T as T_CALCULATED_MEMBER_ACCESS_EXPRESSION, f as T_MEMBER_ACCESS_EXPRESSION, g as T_IDENTIFIER, h as T_PREFIX_OP_EXPRESSION, j as T_FUNCTION_DECLARATION, k as T_ARROW_EXPRESSION, m as createXmlUiTreeNodeId, n as T_EMPTY_STATEMENT, p as T_SWITCH_STATEMENT, q as T_TRY_STATEMENT, r as T_THROW_STATEMENT, t as T_FOR_OF_STATEMENT, u as T_FOR_IN_STATEMENT, w as T_FOR_STATEMENT, x as T_EXPRESSION_STATEMENT, y as T_BREAK_STATEMENT, z as T_CONTINUE_STATEMENT, A as T_DO_WHILE_STATEMENT, B as T_WHILE_STATEMENT, C as T_RETURN_STATEMENT, D as T_IF_STATEMENT, E as T_CONST_STATEMENT, F as T_LET_STATEMENT, G as T_ARROW_EXPRESSION_STATEMENT, H as T_BLOCK_STATEMENT, I as T_VAR_STATEMENT, J as T_ASSIGNMENT_EXPRESSION, K as T_LITERAL, M as T_SPREAD_EXPRESSION, N as T_FUNCTION_INVOCATION_EXPRESSION, O as T_POSTFIX_OP_EXPRESSION, Q as T_CONDITIONAL_EXPRESSION, R as T_BINARY_EXPRESSION, S as T_UNARY_EXPRESSION, U as T_OBJECT_LITERAL, V as T_ARRAY_LITERAL, W as T_SEQUENCE_EXPRESSION, X as T_TEMPLATE_LITERAL_EXPRESSION, Y as T_VAR_DECLARATION, Z as T_DESTRUCTURE, _ as TextVariantElement, $ as VariantPropsKeys, a0 as variantOptionsMd, a1 as scrollAnchoringValues, a2 as buttonThemeNames, a3 as iconPositionNames, a4 as buttonVariantNames, a5 as nodeToComponentDef, a6 as triggerPositionNames, a7 as statusColorMd, a8 as placementMd, a9 as httpMethodNames, aa as PARSED_MARK_PROP, ab as layoutOptionKeys, ac as viewportSizeNames, ad as componentFileExtension, ae as codeBehindFileExtension, af as getLintSeverity, ag as LintSeverity, ah as lintApp, ai as printComponentLints, aj as lintErrorsComponent, ak as collectCodeBehindFromSource, al as removeCodeBehindTokensFromTree } from "./lint-
|
|
10
|
+
import { v as validationStatusMd, l as labelPositionMd, o as orientationOptionMd, a as alignmentOptionValues, L as LinkTargetMd, b as alignmentOptionMd, i as iconPositionMd, c as buttonTypesMd, s as sizeMd, d as buttonThemeMd, e as buttonVariantMd, P as Parser, T as T_CALCULATED_MEMBER_ACCESS_EXPRESSION, f as T_MEMBER_ACCESS_EXPRESSION, g as T_IDENTIFIER, h as T_PREFIX_OP_EXPRESSION, j as T_FUNCTION_DECLARATION, k as T_ARROW_EXPRESSION, m as createXmlUiTreeNodeId, n as T_EMPTY_STATEMENT, p as T_SWITCH_STATEMENT, q as T_TRY_STATEMENT, r as T_THROW_STATEMENT, t as T_FOR_OF_STATEMENT, u as T_FOR_IN_STATEMENT, w as T_FOR_STATEMENT, x as T_EXPRESSION_STATEMENT, y as T_BREAK_STATEMENT, z as T_CONTINUE_STATEMENT, A as T_DO_WHILE_STATEMENT, B as T_WHILE_STATEMENT, C as T_RETURN_STATEMENT, D as T_IF_STATEMENT, E as T_CONST_STATEMENT, F as T_LET_STATEMENT, G as T_ARROW_EXPRESSION_STATEMENT, H as T_BLOCK_STATEMENT, I as T_VAR_STATEMENT, J as T_ASSIGNMENT_EXPRESSION, K as T_LITERAL, M as T_SPREAD_EXPRESSION, N as T_FUNCTION_INVOCATION_EXPRESSION, O as T_POSTFIX_OP_EXPRESSION, Q as T_CONDITIONAL_EXPRESSION, R as T_BINARY_EXPRESSION, S as T_UNARY_EXPRESSION, U as T_OBJECT_LITERAL, V as T_ARRAY_LITERAL, W as T_SEQUENCE_EXPRESSION, X as T_TEMPLATE_LITERAL_EXPRESSION, Y as T_VAR_DECLARATION, Z as T_DESTRUCTURE, _ as TextVariantElement, $ as VariantPropsKeys, a0 as variantOptionsMd, a1 as scrollAnchoringValues, a2 as buttonThemeNames, a3 as iconPositionNames, a4 as buttonVariantNames, a5 as nodeToComponentDef, a6 as triggerPositionNames, a7 as statusColorMd, a8 as placementMd, a9 as httpMethodNames, aa as PARSED_MARK_PROP, ab as layoutOptionKeys, ac as viewportSizeNames, ad as componentFileExtension, ae as codeBehindFileExtension, af as getLintSeverity, ag as LintSeverity, ah as lintApp, ai as printComponentLints, aj as lintErrorsComponent, ak as collectCodeBehindFromSource, al as removeCodeBehindTokensFromTree } from "./lint-DmJOJSJa.mjs";
|
|
11
11
|
import classnames from "classnames";
|
|
12
12
|
import Color from "color";
|
|
13
13
|
import TextareaAutosize from "react-textarea-autosize";
|
|
@@ -8207,7 +8207,7 @@ function generateBorderSegments(theme2) {
|
|
|
8207
8207
|
}
|
|
8208
8208
|
const result = { ...theme2 };
|
|
8209
8209
|
Object.entries(theme2).forEach(([key, value]) => {
|
|
8210
|
-
var _a, _b;
|
|
8210
|
+
var _a, _b, _c;
|
|
8211
8211
|
let match = borderRegEx.exec(key);
|
|
8212
8212
|
if (match) {
|
|
8213
8213
|
const remainder = match[1];
|
|
@@ -8216,9 +8216,9 @@ function generateBorderSegments(theme2) {
|
|
|
8216
8216
|
result[`borderTop-${remainder}`] = value;
|
|
8217
8217
|
result[`borderBottom-${remainder}`] = value;
|
|
8218
8218
|
const border = getBorderSegments(value);
|
|
8219
|
-
result[`borderWidth-${remainder}`] = border.thickness;
|
|
8220
|
-
result[
|
|
8221
|
-
result[
|
|
8219
|
+
result[_a = `borderWidth-${remainder}`] ?? (result[_a] = border.thickness);
|
|
8220
|
+
result[_b = `borderStyle-${remainder}`] ?? (result[_b] = border.style);
|
|
8221
|
+
result[_c = `borderColor-${remainder}`] ?? (result[_c] = border.color);
|
|
8222
8222
|
}
|
|
8223
8223
|
match = thicknessBorderRegEx.exec(key);
|
|
8224
8224
|
if (match) {
|
|
@@ -14556,6 +14556,7 @@ const TextBox = forwardRef(function TextBox2({
|
|
|
14556
14556
|
labelBreak: labelBreak2,
|
|
14557
14557
|
required: required2
|
|
14558
14558
|
}, ref) {
|
|
14559
|
+
id = id || useId();
|
|
14559
14560
|
const inputRef = useRef(null);
|
|
14560
14561
|
useEffect(() => {
|
|
14561
14562
|
if (autoFocus) {
|
|
@@ -14608,6 +14609,7 @@ const TextBox = forwardRef(function TextBox2({
|
|
|
14608
14609
|
return /* @__PURE__ */ jsx(
|
|
14609
14610
|
ItemWithLabel,
|
|
14610
14611
|
{
|
|
14612
|
+
id,
|
|
14611
14613
|
labelPosition,
|
|
14612
14614
|
label: label2,
|
|
14613
14615
|
labelWidth,
|
|
@@ -24487,7 +24489,8 @@ function Theme({
|
|
|
24487
24489
|
tone,
|
|
24488
24490
|
toastDuration = 5e3,
|
|
24489
24491
|
themeVars: themeVars2 = EMPTY_OBJECT,
|
|
24490
|
-
layoutContext
|
|
24492
|
+
layoutContext,
|
|
24493
|
+
children
|
|
24491
24494
|
}) {
|
|
24492
24495
|
const generatedId2 = useId();
|
|
24493
24496
|
const { themes, resources, resourceMap, activeThemeId, setRoot, root: root2 } = useThemes();
|
|
@@ -24594,7 +24597,10 @@ function Theme({
|
|
|
24594
24597
|
}
|
|
24595
24598
|
},
|
|
24596
24599
|
children: [
|
|
24597
|
-
/* @__PURE__ */
|
|
24600
|
+
/* @__PURE__ */ jsxs(ErrorBoundary, { node, location: "theme-root", children: [
|
|
24601
|
+
renderChild2(node.children),
|
|
24602
|
+
children
|
|
24603
|
+
] }),
|
|
24598
24604
|
/* @__PURE__ */ jsx(NotificationToast, { toastDuration })
|
|
24599
24605
|
]
|
|
24600
24606
|
}
|
|
@@ -31671,7 +31677,7 @@ function IconProvider({ children }) {
|
|
|
31671
31677
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
31672
31678
|
] });
|
|
31673
31679
|
}
|
|
31674
|
-
const version = "0.9.
|
|
31680
|
+
const version = "0.9.9";
|
|
31675
31681
|
const ApiInterceptorContext = createContext(null);
|
|
31676
31682
|
function useApiInterceptorContext() {
|
|
31677
31683
|
return useContext(ApiInterceptorContext);
|
|
@@ -33433,7 +33439,8 @@ const Container = memo(
|
|
|
33433
33439
|
parentRenderContext,
|
|
33434
33440
|
memoedVarsRef,
|
|
33435
33441
|
isImplicit,
|
|
33436
|
-
uidInfoRef: parentUidInfoRef
|
|
33442
|
+
uidInfoRef: parentUidInfoRef,
|
|
33443
|
+
children
|
|
33437
33444
|
}, ref) {
|
|
33438
33445
|
var _a;
|
|
33439
33446
|
const { apiBoundContainer } = node;
|
|
@@ -33782,12 +33789,12 @@ const Container = memo(
|
|
|
33782
33789
|
if (typeof childNode === "string") {
|
|
33783
33790
|
throw Error("should be resolved for now");
|
|
33784
33791
|
}
|
|
33785
|
-
const
|
|
33786
|
-
if (!
|
|
33792
|
+
const children2 = isArray(childNode) ? childNode : [childNode];
|
|
33793
|
+
if (!children2 || !children2.length) {
|
|
33787
33794
|
return null;
|
|
33788
33795
|
}
|
|
33789
|
-
const wrapWithFragment =
|
|
33790
|
-
const renderedChildren2 =
|
|
33796
|
+
const wrapWithFragment = children2.length > 1;
|
|
33797
|
+
const renderedChildren2 = children2.map((child, childIndex) => {
|
|
33791
33798
|
if (!child) {
|
|
33792
33799
|
return void 0;
|
|
33793
33800
|
}
|
|
@@ -33875,7 +33882,7 @@ const Container = memo(
|
|
|
33875
33882
|
});
|
|
33876
33883
|
const containerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33877
33884
|
renderedLoaders,
|
|
33878
|
-
renderedChildren
|
|
33885
|
+
!!children && isValidElement(renderedChildren) ? cloneElement(renderedChildren, null, children) : renderedChildren
|
|
33879
33886
|
] });
|
|
33880
33887
|
return /* @__PURE__ */ jsxs(
|
|
33881
33888
|
Fragment$1,
|
|
@@ -33990,7 +33997,9 @@ const StateContainer = memo(
|
|
|
33990
33997
|
parentRenderContext,
|
|
33991
33998
|
layoutContextRef,
|
|
33992
33999
|
uidInfoRef,
|
|
33993
|
-
isImplicit
|
|
34000
|
+
isImplicit,
|
|
34001
|
+
children,
|
|
34002
|
+
...rest
|
|
33994
34003
|
}, ref) {
|
|
33995
34004
|
const [version2, setVersion] = useState(0);
|
|
33996
34005
|
const routingParams = useRoutingParams();
|
|
@@ -34130,7 +34139,9 @@ const StateContainer = memo(
|
|
|
34130
34139
|
memoedVarsRef: memoedVars,
|
|
34131
34140
|
isImplicit,
|
|
34132
34141
|
ref,
|
|
34133
|
-
uidInfoRef
|
|
34142
|
+
uidInfoRef,
|
|
34143
|
+
...rest,
|
|
34144
|
+
children
|
|
34134
34145
|
}
|
|
34135
34146
|
) });
|
|
34136
34147
|
})
|
|
@@ -34335,7 +34346,9 @@ const ContainerWrapper = memo(
|
|
|
34335
34346
|
parentDispatch,
|
|
34336
34347
|
parentRenderContext,
|
|
34337
34348
|
layoutContextRef,
|
|
34338
|
-
uidInfoRef
|
|
34349
|
+
uidInfoRef,
|
|
34350
|
+
children,
|
|
34351
|
+
...rest
|
|
34339
34352
|
}, ref) {
|
|
34340
34353
|
const containerizedNode = useMemo(() => getWrappedWithContainer(node), [node]);
|
|
34341
34354
|
return /* @__PURE__ */ jsx(ErrorBoundary, { node, location: "container", children: /* @__PURE__ */ jsx(
|
|
@@ -34351,7 +34364,9 @@ const ContainerWrapper = memo(
|
|
|
34351
34364
|
layoutContextRef,
|
|
34352
34365
|
uidInfoRef,
|
|
34353
34366
|
isImplicit: node.type !== "Container" && containerizedNode.uses === void 0,
|
|
34354
|
-
ref
|
|
34367
|
+
ref,
|
|
34368
|
+
...rest,
|
|
34369
|
+
children
|
|
34355
34370
|
}
|
|
34356
34371
|
) });
|
|
34357
34372
|
})
|
|
@@ -34715,6 +34730,7 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
34715
34730
|
memoedVarsRef,
|
|
34716
34731
|
onUnmount,
|
|
34717
34732
|
uidInfoRef,
|
|
34733
|
+
children,
|
|
34718
34734
|
...rest
|
|
34719
34735
|
}, ref) {
|
|
34720
34736
|
var _a;
|
|
@@ -34766,9 +34782,9 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
34766
34782
|
[lookupAction, uid]
|
|
34767
34783
|
);
|
|
34768
34784
|
const memoedRenderChild = useCallback(
|
|
34769
|
-
(
|
|
34785
|
+
(children2, layoutContext, pRenderContext) => {
|
|
34770
34786
|
return renderChild2(
|
|
34771
|
-
|
|
34787
|
+
children2,
|
|
34772
34788
|
layoutContext,
|
|
34773
34789
|
pRenderContext || parentRenderContext,
|
|
34774
34790
|
uidInfoRef
|
|
@@ -34906,12 +34922,13 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
34906
34922
|
return /* @__PURE__ */ jsx(InvalidComponent, { errors: [renderingError], node: safeNode, children: renderedNode });
|
|
34907
34923
|
}
|
|
34908
34924
|
if ((ref || !isEmpty(mouseEventHandlers)) && renderedNode && React__default.isValidElement(renderedNode)) {
|
|
34925
|
+
const childrenArray = !children ? [] : Array.isArray(children) ? children : [children];
|
|
34909
34926
|
return cloneElement(renderedNode, {
|
|
34910
34927
|
ref: ref ? composeRefs(ref, renderedNode.ref) : renderedNode.ref,
|
|
34911
34928
|
...mergeProps({ ...renderedNode.props, ...mouseEventHandlers }, rest)
|
|
34912
|
-
});
|
|
34929
|
+
}, ...childrenArray);
|
|
34913
34930
|
}
|
|
34914
|
-
return React__default.isValidElement(renderedNode)
|
|
34931
|
+
return React__default.isValidElement(renderedNode) && !!children ? cloneElement(renderedNode, null, children) : renderedNode;
|
|
34915
34932
|
});
|
|
34916
34933
|
function slotRenderer({ node, extractValue, renderChild: renderChild2, lookupAction, layoutContext }, parentRenderContext) {
|
|
34917
34934
|
const templateName = extractValue.asOptionalString(node.props.name);
|
|
@@ -35012,6 +35029,7 @@ const ComponentWrapper = memo(
|
|
|
35012
35029
|
memoedVarsRef,
|
|
35013
35030
|
cleanup,
|
|
35014
35031
|
uidInfoRef,
|
|
35032
|
+
children,
|
|
35015
35033
|
...rest
|
|
35016
35034
|
}, ref) {
|
|
35017
35035
|
var _a;
|
|
@@ -35052,7 +35070,9 @@ const ComponentWrapper = memo(
|
|
|
35052
35070
|
parentStatePartChanged: statePartChanged,
|
|
35053
35071
|
parentRegisterComponentApi: registerComponentApi,
|
|
35054
35072
|
uidInfoRef,
|
|
35055
|
-
ref
|
|
35073
|
+
ref,
|
|
35074
|
+
...rest,
|
|
35075
|
+
children
|
|
35056
35076
|
}
|
|
35057
35077
|
);
|
|
35058
35078
|
} else {
|
|
@@ -35073,7 +35093,8 @@ const ComponentWrapper = memo(
|
|
|
35073
35093
|
layoutContextRef: stableLayoutContext,
|
|
35074
35094
|
ref,
|
|
35075
35095
|
uidInfoRef,
|
|
35076
|
-
...rest
|
|
35096
|
+
...rest,
|
|
35097
|
+
children
|
|
35077
35098
|
}
|
|
35078
35099
|
);
|
|
35079
35100
|
}
|
|
@@ -35552,10 +35573,7 @@ function AppContent({
|
|
|
35552
35573
|
cleanup: noop$1,
|
|
35553
35574
|
memoedVarsRef
|
|
35554
35575
|
});
|
|
35555
|
-
return /* @__PURE__ */ jsx(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */
|
|
35556
|
-
renderedRoot,
|
|
35557
|
-
children
|
|
35558
|
-
] }) });
|
|
35576
|
+
return /* @__PURE__ */ jsx(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsx(AppStateContext.Provider, { value: appStateContextValue, children: !!children && isValidElement(renderedRoot) ? cloneElement(renderedRoot, null, children) : renderedRoot }) });
|
|
35559
35577
|
}
|
|
35560
35578
|
function signError(error2) {
|
|
35561
35579
|
toast.error(typeof error2 === "string" ? error2 : error2.message || "Something went wrong");
|
|
@@ -35699,7 +35717,7 @@ function ApiInterceptorProvider({
|
|
|
35699
35717
|
let interceptorWorker;
|
|
35700
35718
|
(async () => {
|
|
35701
35719
|
if (process.env.VITE_MOCK_ENABLED) {
|
|
35702
|
-
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-
|
|
35720
|
+
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-DmE-x8Au.mjs");
|
|
35703
35721
|
if (interceptor) {
|
|
35704
35722
|
interceptorWorker = await createApiInterceptorWorker(interceptor, apiWorker);
|
|
35705
35723
|
if (!apiWorker) {
|
|
@@ -36315,6 +36333,7 @@ async function parseCodeBehindResponse(response) {
|
|
|
36315
36333
|
try {
|
|
36316
36334
|
parser.parseStatements();
|
|
36317
36335
|
} catch (e) {
|
|
36336
|
+
console.error("Error parsing code behind", e);
|
|
36318
36337
|
if (parser.errors.length > 0) {
|
|
36319
36338
|
return {
|
|
36320
36339
|
component: errReportScriptError(parser.errors[0], response.url),
|
|
@@ -36323,19 +36342,23 @@ async function parseCodeBehindResponse(response) {
|
|
|
36323
36342
|
};
|
|
36324
36343
|
}
|
|
36325
36344
|
}
|
|
36326
|
-
|
|
36327
|
-
|
|
36345
|
+
try {
|
|
36346
|
+
const codeBehind = collectCodeBehindFromSource("Main", code2);
|
|
36347
|
+
if (Object.keys(codeBehind.moduleErrors ?? {}).length > 0) {
|
|
36348
|
+
return {
|
|
36349
|
+
component: errReportModuleErrors(codeBehind.moduleErrors, response.url),
|
|
36350
|
+
file: response.url,
|
|
36351
|
+
hasError: true
|
|
36352
|
+
};
|
|
36353
|
+
}
|
|
36354
|
+
removeCodeBehindTokensFromTree(codeBehind);
|
|
36328
36355
|
return {
|
|
36329
|
-
|
|
36330
|
-
file: response.url
|
|
36331
|
-
hasError: true
|
|
36356
|
+
codeBehind,
|
|
36357
|
+
file: response.url
|
|
36332
36358
|
};
|
|
36359
|
+
} catch (e) {
|
|
36360
|
+
console.error("Error collecting code behind", e);
|
|
36333
36361
|
}
|
|
36334
|
-
removeCodeBehindTokensFromTree(codeBehind);
|
|
36335
|
-
return {
|
|
36336
|
-
codeBehind,
|
|
36337
|
-
file: response.url
|
|
36338
|
-
};
|
|
36339
36362
|
}
|
|
36340
36363
|
function matchesFileName(path, fileName) {
|
|
36341
36364
|
return path.endsWith(`/${fileName}.ts`) || path.endsWith(`/${fileName}.js`) || path.endsWith(`/${fileName}.${componentFileExtension}`) || path.endsWith(`/${fileName}.${codeBehindFileExtension}`);
|
|
@@ -36627,9 +36650,10 @@ function useStandalone(standaloneAppDef, runtime = EMPTY_OBJECT, extensionManage
|
|
|
36627
36650
|
);
|
|
36628
36651
|
const componentCodeBehindPromise = new Promise(async (resolve) => {
|
|
36629
36652
|
try {
|
|
36630
|
-
const
|
|
36631
|
-
|
|
36653
|
+
const codeBehind = await fetchWithoutCache(
|
|
36654
|
+
`components/${componentPath}.${codeBehindFileExtension}`
|
|
36632
36655
|
);
|
|
36656
|
+
const codeBehindWrapper = await parseCodeBehindResponse(codeBehind);
|
|
36633
36657
|
if (codeBehindWrapper.hasError) {
|
|
36634
36658
|
errorComponents.push(codeBehindWrapper.component);
|
|
36635
36659
|
}
|
|
@@ -47,6 +47,7 @@ const misc_1 = require("../../components-core/utils/misc");
|
|
|
47
47
|
const InputAdornment_1 = require("../Input/InputAdornment");
|
|
48
48
|
const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
|
|
49
49
|
exports.TextBox = (0, react_1.forwardRef)(function TextBox({ id, type = "text", value = "", updateState = constants_1.noop, initialValue = "", style, maxLength, enabled = true, placeholder, validationStatus = "none", onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, startText, startIcon, endText, endIcon, autoFocus, readOnly, tabIndex, label, labelPosition, labelWidth, labelBreak, required, }, ref) {
|
|
50
|
+
id = id || (0, react_1.useId)();
|
|
50
51
|
const inputRef = (0, react_2.useRef)(null);
|
|
51
52
|
(0, react_2.useEffect)(() => {
|
|
52
53
|
if (autoFocus) {
|
|
@@ -96,7 +97,7 @@ exports.TextBox = (0, react_1.forwardRef)(function TextBox({ id, type = "text",
|
|
|
96
97
|
setValue,
|
|
97
98
|
});
|
|
98
99
|
}, [focus, registerComponentApi, setValue]);
|
|
99
|
-
return ((0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { labelPosition: labelPosition, label: label, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, style: style, ref: ref, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(TextBox_module_scss_1.default.inputRoot, {
|
|
100
|
+
return ((0, jsx_runtime_1.jsx)(ItemWithLabel_1.ItemWithLabel, { id: id, labelPosition: labelPosition, label: label, labelWidth: labelWidth, labelBreak: labelBreak, required: required, enabled: enabled, style: style, ref: ref, children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(TextBox_module_scss_1.default.inputRoot, {
|
|
100
101
|
[TextBox_module_scss_1.default.disabled]: !enabled,
|
|
101
102
|
[TextBox_module_scss_1.default.readOnly]: readOnly,
|
|
102
103
|
[TextBox_module_scss_1.default.error]: validationStatus === "error",
|
|
@@ -31,7 +31,7 @@ function calculateHash(str) {
|
|
|
31
31
|
}
|
|
32
32
|
return hash;
|
|
33
33
|
}
|
|
34
|
-
function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 5000, themeVars = constants_1.EMPTY_OBJECT, layoutContext, }) {
|
|
34
|
+
function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 5000, themeVars = constants_1.EMPTY_OBJECT, layoutContext, children }) {
|
|
35
35
|
const generatedId = (0, react_1.useId)();
|
|
36
36
|
const { themes, resources, resourceMap, activeThemeId, setRoot, root } = (0, ThemeContext_1.useThemes)();
|
|
37
37
|
const { activeTheme, activeThemeTone } = (0, ThemeContext_1.useTheme)();
|
|
@@ -126,7 +126,7 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
|
|
|
126
126
|
if (el) {
|
|
127
127
|
setRoot(el);
|
|
128
128
|
}
|
|
129
|
-
}, children: [(0, jsx_runtime_1.
|
|
129
|
+
}, children: [(0, jsx_runtime_1.jsxs)(ErrorBoundary_1.ErrorBoundary, { node: node, location: "theme-root", children: [renderChild(node.children), children] }), (0, jsx_runtime_1.jsx)(NotificationToast_1.NotificationToast, { toastDuration: toastDuration })] })] }));
|
|
130
130
|
}
|
|
131
131
|
return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: currentThemeContextValue, children: [(0, jsx_runtime_1.jsx)("style", { children: `.${rangeClassName} {${css}}` }), (0, jsx_runtime_1.jsx)("style", { children: `.${className} {${css}}` }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Theme_module_scss_1.default.from, fromClass) }), renderChild(node.children, Object.assign(Object.assign({}, layoutContext), { themeClassName: className })), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Theme_module_scss_1.default.to, toClass) }), root &&
|
|
132
132
|
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className), ref: (el) => {
|
|
@@ -78,7 +78,7 @@ const layout_resolver_1 = require("../theming/layout-resolver");
|
|
|
78
78
|
*/
|
|
79
79
|
const ComponentAdapter = (0, react_1.forwardRef)(function ComponentAdapter(_a, ref) {
|
|
80
80
|
var _b;
|
|
81
|
-
var { node, state, appContext, dispatch, lookupAction, lookupSyncCallback, renderChild, registerComponentApi, layoutContextRef, parentRenderContext, memoedVarsRef, onUnmount, uidInfoRef } = _a, rest = __rest(_a, ["node", "state", "appContext", "dispatch", "lookupAction", "lookupSyncCallback", "renderChild", "registerComponentApi", "layoutContextRef", "parentRenderContext", "memoedVarsRef", "onUnmount", "uidInfoRef"]);
|
|
81
|
+
var { node, state, appContext, dispatch, lookupAction, lookupSyncCallback, renderChild, registerComponentApi, layoutContextRef, parentRenderContext, memoedVarsRef, onUnmount, uidInfoRef, children } = _a, rest = __rest(_a, ["node", "state", "appContext", "dispatch", "lookupAction", "lookupSyncCallback", "renderChild", "registerComponentApi", "layoutContextRef", "parentRenderContext", "memoedVarsRef", "onUnmount", "uidInfoRef", "children"]);
|
|
82
82
|
// --- Make sure the component definition has `props` and `events` properties
|
|
83
83
|
// --- (even if they are empty)
|
|
84
84
|
const safeNode = (0, react_1.useMemo)(() => {
|
|
@@ -247,10 +247,11 @@ const ComponentAdapter = (0, react_1.forwardRef)(function ComponentAdapter(_a, r
|
|
|
247
247
|
if ((ref || !(0, lodash_es_1.isEmpty)(mouseEventHandlers)) && renderedNode && react_1.default.isValidElement(renderedNode)) {
|
|
248
248
|
// --- For radix UI/accessibility, read more here:
|
|
249
249
|
// --- https://www.radix-ui.com/primitives/docs/guides/composition
|
|
250
|
-
|
|
250
|
+
const childrenArray = !children ? [] : Array.isArray(children) ? children : [children];
|
|
251
|
+
return (0, react_1.cloneElement)(renderedNode, Object.assign({ ref: ref ? (0, react_compose_refs_1.composeRefs)(ref, renderedNode.ref) : renderedNode.ref }, (0, mergeProps_1.mergeProps)(Object.assign(Object.assign({}, renderedNode.props), mouseEventHandlers), rest)), ...(childrenArray));
|
|
251
252
|
}
|
|
252
253
|
// --- If the rendering resulted in multiple React nodes, wrap them in a fragment.
|
|
253
|
-
return react_1.default.isValidElement(renderedNode)
|
|
254
|
+
return (react_1.default.isValidElement(renderedNode) && !!children) ? (0, react_1.cloneElement)(renderedNode, null, children) : renderedNode;
|
|
254
255
|
});
|
|
255
256
|
/**
|
|
256
257
|
* This function renders the content of a slot. If the slot is named, it looks for a template
|
|
@@ -25,7 +25,7 @@ const ComponentAdapter_1 = __importDefault(require("./ComponentAdapter"));
|
|
|
25
25
|
*/
|
|
26
26
|
exports.ComponentWrapper = (0, react_1.memo)((0, react_1.forwardRef)(function ComponentWrapper(_a, ref) {
|
|
27
27
|
var _b;
|
|
28
|
-
var { node, resolvedKey, state, dispatch, appContext, lookupAction, lookupSyncCallback, registerComponentApi, renderChild, statePartChanged, layoutContext, parentRenderContext, memoedVarsRef, cleanup, uidInfoRef } = _a, rest = __rest(_a, ["node", "resolvedKey", "state", "dispatch", "appContext", "lookupAction", "lookupSyncCallback", "registerComponentApi", "renderChild", "statePartChanged", "layoutContext", "parentRenderContext", "memoedVarsRef", "cleanup", "uidInfoRef"]);
|
|
28
|
+
var { node, resolvedKey, state, dispatch, appContext, lookupAction, lookupSyncCallback, registerComponentApi, renderChild, statePartChanged, layoutContext, parentRenderContext, memoedVarsRef, cleanup, uidInfoRef, children } = _a, rest = __rest(_a, ["node", "resolvedKey", "state", "dispatch", "appContext", "lookupAction", "lookupSyncCallback", "registerComponentApi", "renderChild", "statePartChanged", "layoutContext", "parentRenderContext", "memoedVarsRef", "cleanup", "uidInfoRef", "children"]);
|
|
29
29
|
// --- We pass the layout context to the child components, so we need to
|
|
30
30
|
// --- make sure that it is stable
|
|
31
31
|
const stableLayoutContext = (0, react_1.useRef)(layoutContext);
|
|
@@ -51,11 +51,11 @@ exports.ComponentWrapper = (0, react_1.memo)((0, react_1.forwardRef)(function Co
|
|
|
51
51
|
}, [nodeWithTransformedLoaders, resolvedDataPropIsString, uidInfoRef]);
|
|
52
52
|
if ((0, ContainerWrapper_1.isContainerLike)(nodeWithTransformedDatasourceProp)) {
|
|
53
53
|
// --- This component should be rendered as a container
|
|
54
|
-
return ((0, jsx_runtime_1.jsx)(ContainerWrapper_1.ContainerWrapper, { resolvedKey: resolvedKey, node: nodeWithTransformedDatasourceProp, parentState: state, parentDispatch: dispatch, layoutContextRef: stableLayoutContext, parentRenderContext: parentRenderContext, parentStatePartChanged: statePartChanged, parentRegisterComponentApi: registerComponentApi, uidInfoRef: uidInfoRef, ref: ref }));
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(ContainerWrapper_1.ContainerWrapper, Object.assign({ resolvedKey: resolvedKey, node: nodeWithTransformedDatasourceProp, parentState: state, parentDispatch: dispatch, layoutContextRef: stableLayoutContext, parentRenderContext: parentRenderContext, parentStatePartChanged: statePartChanged, parentRegisterComponentApi: registerComponentApi, uidInfoRef: uidInfoRef, ref: ref }, rest, { children: children })));
|
|
55
55
|
}
|
|
56
56
|
else {
|
|
57
57
|
// --- This component should be rendered as a regular component
|
|
58
|
-
return ((0, jsx_runtime_1.jsx)(ComponentAdapter_1.default, Object.assign({ onUnmount: cleanup, memoedVarsRef: memoedVarsRef, node: nodeWithTransformedDatasourceProp, state: state, dispatch: dispatch, appContext: appContext, lookupAction: lookupAction, lookupSyncCallback: lookupSyncCallback, registerComponentApi: registerComponentApi, renderChild: renderChild, parentRenderContext: parentRenderContext, layoutContextRef: stableLayoutContext, ref: ref, uidInfoRef: uidInfoRef }, rest)));
|
|
58
|
+
return ((0, jsx_runtime_1.jsx)(ComponentAdapter_1.default, Object.assign({ onUnmount: cleanup, memoedVarsRef: memoedVarsRef, node: nodeWithTransformedDatasourceProp, state: state, dispatch: dispatch, appContext: appContext, lookupAction: lookupAction, lookupSyncCallback: lookupSyncCallback, registerComponentApi: registerComponentApi, renderChild: renderChild, parentRenderContext: parentRenderContext, layoutContextRef: stableLayoutContext, ref: ref, uidInfoRef: uidInfoRef }, rest, { children: children })));
|
|
59
59
|
}
|
|
60
60
|
}));
|
|
61
61
|
// --- Create a DataLoader component for each DataSource child within the
|
|
@@ -69,7 +69,7 @@ const ThemeContext_1 = require("../theming/ThemeContext");
|
|
|
69
69
|
const LoaderComponent_1 = require("../LoaderComponent");
|
|
70
70
|
const constants_1 = require("../constants");
|
|
71
71
|
// React component to display a view container and implement its behavior
|
|
72
|
-
exports.Container = (0, react_1.memo)((0, react_1.forwardRef)(function Container({ node, componentState, dispatch: containerDispatch, parentDispatch, resolvedKey, version, setVersion, statePartChanged, registerComponentApi: containerRegisterComponentApi, parentRegisterComponentApi, layoutContextRef, parentRenderContext, memoedVarsRef, isImplicit, uidInfoRef: parentUidInfoRef, }, ref) {
|
|
72
|
+
exports.Container = (0, react_1.memo)((0, react_1.forwardRef)(function Container({ node, componentState, dispatch: containerDispatch, parentDispatch, resolvedKey, version, setVersion, statePartChanged, registerComponentApi: containerRegisterComponentApi, parentRegisterComponentApi, layoutContextRef, parentRenderContext, memoedVarsRef, isImplicit, uidInfoRef: parentUidInfoRef, children, }, ref) {
|
|
73
73
|
var _a;
|
|
74
74
|
const { apiBoundContainer } = node;
|
|
75
75
|
const dispatch = isImplicit ? parentDispatch : containerDispatch;
|
|
@@ -544,7 +544,10 @@ exports.Container = (0, react_1.memo)((0, react_1.forwardRef)(function Container
|
|
|
544
544
|
lookupSyncCallback,
|
|
545
545
|
cleanup,
|
|
546
546
|
});
|
|
547
|
-
|
|
547
|
+
//TODO illesg
|
|
548
|
+
const containerContent = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderedLoaders, !!children && (0, react_1.isValidElement)(renderedChildren)
|
|
549
|
+
? (0, react_1.cloneElement)(renderedChildren, null, children)
|
|
550
|
+
: renderedChildren] }));
|
|
548
551
|
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [showContainer && ((0, jsx_runtime_1.jsx)(StateViewerNative_1.StateViewer, { state: componentState, showBoundary: stateViewProps === null || stateViewProps === void 0 ? void 0 : stateViewProps.showBoundary, blink: stateViewProps === null || stateViewProps === void 0 ? void 0 : stateViewProps.blink, children: containerContent })), !showContainer && containerContent] }, node.uid
|
|
549
552
|
? `${resolvedKey}>${(0, extractParam_1.extractParam)(componentState, node.uid, appContext, true)}`
|
|
550
553
|
: undefined));
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
14
|
exports.ContainerWrapper = void 0;
|
|
4
15
|
exports.isContainerLike = isContainerLike;
|
|
@@ -30,10 +41,11 @@ function isContainerLike(node) {
|
|
|
30
41
|
* provides a context for the children to access the state and the API of the
|
|
31
42
|
* parent component.
|
|
32
43
|
*/
|
|
33
|
-
exports.ContainerWrapper = (0, react_1.memo)((0, react_1.forwardRef)(function ContainerWrapper(
|
|
44
|
+
exports.ContainerWrapper = (0, react_1.memo)((0, react_1.forwardRef)(function ContainerWrapper(_a, ref) {
|
|
45
|
+
var { node, resolvedKey, parentState, parentStatePartChanged, parentRegisterComponentApi, parentDispatch, parentRenderContext, layoutContextRef, uidInfoRef, children } = _a, rest = __rest(_a, ["node", "resolvedKey", "parentState", "parentStatePartChanged", "parentRegisterComponentApi", "parentDispatch", "parentRenderContext", "layoutContextRef", "uidInfoRef", "children"]);
|
|
34
46
|
// --- Make sure the component node is wrapped with a container
|
|
35
47
|
const containerizedNode = (0, react_1.useMemo)(() => getWrappedWithContainer(node), [node]);
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: node, location: "container", children: (0, jsx_runtime_1.jsx)(StateContainer_1.StateContainer, { node: containerizedNode, resolvedKey: resolvedKey, parentState: parentState, parentStatePartChanged: parentStatePartChanged, parentRegisterComponentApi: parentRegisterComponentApi, parentDispatch: parentDispatch, parentRenderContext: parentRenderContext, layoutContextRef: layoutContextRef, uidInfoRef: uidInfoRef, isImplicit: node.type !== "Container" && containerizedNode.uses === undefined, ref: ref }) }));
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: node, location: "container", children: (0, jsx_runtime_1.jsx)(StateContainer_1.StateContainer, Object.assign({ node: containerizedNode, resolvedKey: resolvedKey, parentState: parentState, parentStatePartChanged: parentStatePartChanged, parentRegisterComponentApi: parentRegisterComponentApi, parentDispatch: parentDispatch, parentRenderContext: parentRenderContext, layoutContextRef: layoutContextRef, uidInfoRef: uidInfoRef, isImplicit: node.type !== "Container" && containerizedNode.uses === undefined, ref: ref }, rest, { children: children })) }));
|
|
37
49
|
}));
|
|
38
50
|
/**
|
|
39
51
|
* Wraps the specified component node with a container
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -28,7 +39,8 @@ const extractParam_1 = require("../utils/extractParam");
|
|
|
28
39
|
const misc_1 = require("../utils/misc");
|
|
29
40
|
// A React component that wraps a view container into an error boundary
|
|
30
41
|
// (it's a named function inside the memo, this way it will be visible with that name in the react devtools)
|
|
31
|
-
exports.StateContainer = (0, react_1.memo)((0, react_1.forwardRef)(function StateContainer(
|
|
42
|
+
exports.StateContainer = (0, react_1.memo)((0, react_1.forwardRef)(function StateContainer(_a, ref) {
|
|
43
|
+
var { node, resolvedKey, parentState, parentStatePartChanged, parentRegisterComponentApi, parentDispatch, parentRenderContext, layoutContextRef, uidInfoRef, isImplicit, children } = _a, rest = __rest(_a, ["node", "resolvedKey", "parentState", "parentStatePartChanged", "parentRegisterComponentApi", "parentDispatch", "parentRenderContext", "layoutContextRef", "uidInfoRef", "isImplicit", "children"]);
|
|
32
44
|
const [version, setVersion] = (0, react_1.useState)(0);
|
|
33
45
|
const routingParams = useRoutingParams();
|
|
34
46
|
const memoedVars = (0, react_1.useRef)(new Map());
|
|
@@ -127,7 +139,7 @@ exports.StateContainer = (0, react_1.memo)((0, react_1.forwardRef)(function Stat
|
|
|
127
139
|
}
|
|
128
140
|
}
|
|
129
141
|
}, [resolvedLocalVars, node.uses, parentStatePartChanged]);
|
|
130
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: node, location: "container", children: (0, jsx_runtime_1.jsx)(Container_1.Container, { resolvedKey: resolvedKey, node: node, componentState: combinedState, dispatch: dispatch, parentDispatch: parentDispatch, setVersion: setVersion, version: version, statePartChanged: statePartChanged, registerComponentApi: registerComponentApi, parentRegisterComponentApi: parentRegisterComponentApi, layoutContextRef: layoutContextRef, parentRenderContext: parentRenderContext, memoedVarsRef: memoedVars, isImplicit: isImplicit, ref: ref, uidInfoRef: uidInfoRef }) }));
|
|
142
|
+
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: node, location: "container", children: (0, jsx_runtime_1.jsx)(Container_1.Container, Object.assign({ resolvedKey: resolvedKey, node: node, componentState: combinedState, dispatch: dispatch, parentDispatch: parentDispatch, setVersion: setVersion, version: version, statePartChanged: statePartChanged, registerComponentApi: registerComponentApi, parentRegisterComponentApi: parentRegisterComponentApi, layoutContextRef: layoutContextRef, parentRenderContext: parentRenderContext, memoedVarsRef: memoedVars, isImplicit: isImplicit, ref: ref, uidInfoRef: uidInfoRef }, rest, { children: children })) }));
|
|
131
143
|
}));
|
|
132
144
|
const useRoutingParams = () => {
|
|
133
145
|
const [queryParams] = (0, react_2.useSearchParams)();
|
|
@@ -246,8 +246,8 @@ function generateBorderSegments(theme) {
|
|
|
246
246
|
const result = Object.assign({}, theme);
|
|
247
247
|
// --- Iterate through theme variables and split border values
|
|
248
248
|
Object.entries(theme).forEach(([key, value]) => {
|
|
249
|
-
var _a, _b;
|
|
250
|
-
var
|
|
249
|
+
var _a, _b, _c;
|
|
250
|
+
var _d, _e, _f;
|
|
251
251
|
// --- Check "border-" theme variables
|
|
252
252
|
let match = borderRegEx.exec(key);
|
|
253
253
|
if (match) {
|
|
@@ -259,9 +259,9 @@ function generateBorderSegments(theme) {
|
|
|
259
259
|
result[`borderBottom-${remainder}`] = value;
|
|
260
260
|
// --- We have a border value to segment
|
|
261
261
|
const border = getBorderSegments(value);
|
|
262
|
-
result[`borderWidth-${remainder}`] = border.thickness;
|
|
263
|
-
(
|
|
264
|
-
(
|
|
262
|
+
(_a = result[_d = `borderWidth-${remainder}`]) !== null && _a !== void 0 ? _a : (result[_d] = border.thickness);
|
|
263
|
+
(_b = result[_e = `borderStyle-${remainder}`]) !== null && _b !== void 0 ? _b : (result[_e] = border.style);
|
|
264
|
+
(_c = result[_f = `borderColor-${remainder}`]) !== null && _c !== void 0 ? _c : (result[_f] = border.color);
|
|
265
265
|
}
|
|
266
266
|
// --- Check "borderWidth-" theme variables
|
|
267
267
|
match = thicknessBorderRegEx.exec(key);
|
package/dist/xmlui-metadata.mjs
CHANGED
|
@@ -1822,6 +1822,7 @@ const TextBox = forwardRef(function TextBox2({
|
|
|
1822
1822
|
labelBreak: labelBreak2,
|
|
1823
1823
|
required: required2
|
|
1824
1824
|
}, ref) {
|
|
1825
|
+
id = id || useId();
|
|
1825
1826
|
const inputRef = useRef(null);
|
|
1826
1827
|
useEffect(() => {
|
|
1827
1828
|
if (autoFocus) {
|
|
@@ -1874,6 +1875,7 @@ const TextBox = forwardRef(function TextBox2({
|
|
|
1874
1875
|
return /* @__PURE__ */ jsx(
|
|
1875
1876
|
ItemWithLabel,
|
|
1876
1877
|
{
|
|
1878
|
+
id,
|
|
1877
1879
|
labelPosition,
|
|
1878
1880
|
label: label2,
|
|
1879
1881
|
labelWidth,
|
|
@@ -18902,7 +18904,6 @@ function parseScriptModule(moduleName, source) {
|
|
|
18902
18904
|
const parsedModule2 = {
|
|
18903
18905
|
type: "ScriptModule",
|
|
18904
18906
|
name: moduleName2,
|
|
18905
|
-
exports,
|
|
18906
18907
|
functions,
|
|
18907
18908
|
statements,
|
|
18908
18909
|
sources: /* @__PURE__ */ new Map()
|
|
@@ -1821,6 +1821,7 @@
|
|
|
1821
1821
|
labelBreak: labelBreak2,
|
|
1822
1822
|
required: required2
|
|
1823
1823
|
}, ref) {
|
|
1824
|
+
id = id || React.useId();
|
|
1824
1825
|
const inputRef = React.useRef(null);
|
|
1825
1826
|
React.useEffect(() => {
|
|
1826
1827
|
if (autoFocus) {
|
|
@@ -1873,6 +1874,7 @@
|
|
|
1873
1874
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1874
1875
|
ItemWithLabel,
|
|
1875
1876
|
{
|
|
1877
|
+
id,
|
|
1876
1878
|
labelPosition,
|
|
1877
1879
|
label: label2,
|
|
1878
1880
|
labelWidth,
|
|
@@ -18901,7 +18903,6 @@
|
|
|
18901
18903
|
const parsedModule2 = {
|
|
18902
18904
|
type: "ScriptModule",
|
|
18903
18905
|
name: moduleName2,
|
|
18904
|
-
exports: exports2,
|
|
18905
18906
|
functions,
|
|
18906
18907
|
statements,
|
|
18907
18908
|
sources: /* @__PURE__ */ new Map()
|
package/dist/xmlui-parser.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C, o, k, i, n, h, l, a, m, j, f, e, g, b, D, E, S, q, c, d, x, u, r, t, s, p, w, v } from "./parser-B3m9ZEAK.mjs";
|
|
2
|
-
import { am as COMPOUND_COMP_ID } from "./lint-
|
|
3
|
-
import { au, ao, ag, aq, as, ae, ad, ar, af, ap, ah, aj, an, a5, at, ai } from "./lint-
|
|
2
|
+
import { am as COMPOUND_COMP_ID } from "./lint-DmJOJSJa.mjs";
|
|
3
|
+
import { au, ao, ag, aq, as, ae, ad, ar, af, ap, ah, aj, an, a5, at, ai } from "./lint-DmJOJSJa.mjs";
|
|
4
4
|
const attrBreakRegex = /[\r\n<>'"&]/;
|
|
5
5
|
class XmlUiHelper {
|
|
6
6
|
/**
|
|
@@ -16008,7 +16008,7 @@ li ._htmlOl_1wzn5_205 {
|
|
|
16008
16008
|
});
|
|
16009
16009
|
}
|
|
16010
16010
|
}
|
|
16011
|
-
var define_process_env_default$9 = { NODE_ENV: "production", VITE_MOCK_ENABLED: true, VITE_MOCK_WORKER_LOCATION: "mockApi.js", VITE_USED_COMPONENTS_Pdf: "false", VITE_USED_COMPONENTS_Chart: "false", VITE_USER_COMPONENTS_XmluiCodeHightlighter: "false", VITE_USED_COMPONENTS_Tree: "false", VITE_XMLUI_VERSION: "0.9.
|
|
16011
|
+
var define_process_env_default$9 = { NODE_ENV: "production", VITE_MOCK_ENABLED: true, VITE_MOCK_WORKER_LOCATION: "mockApi.js", VITE_USED_COMPONENTS_Pdf: "false", VITE_USED_COMPONENTS_Chart: "false", VITE_USER_COMPONENTS_XmluiCodeHightlighter: "false", VITE_USED_COMPONENTS_Tree: "false", VITE_XMLUI_VERSION: "0.9.9 (built 4/8/2025)" };
|
|
16012
16012
|
class Mutation extends Removable {
|
|
16013
16013
|
constructor(config2) {
|
|
16014
16014
|
super();
|
|
@@ -49553,7 +49553,7 @@ ${error2.errorObject}`;
|
|
|
49553
49553
|
}
|
|
49554
49554
|
const result = { ...theme2 };
|
|
49555
49555
|
Object.entries(theme2).forEach(([key, value]) => {
|
|
49556
|
-
var _a3, _b2;
|
|
49556
|
+
var _a3, _b2, _c2;
|
|
49557
49557
|
let match2 = borderRegEx.exec(key);
|
|
49558
49558
|
if (match2) {
|
|
49559
49559
|
const remainder = match2[1];
|
|
@@ -49562,9 +49562,9 @@ ${error2.errorObject}`;
|
|
|
49562
49562
|
result[`borderTop-${remainder}`] = value;
|
|
49563
49563
|
result[`borderBottom-${remainder}`] = value;
|
|
49564
49564
|
const border = getBorderSegments(value);
|
|
49565
|
-
result[`borderWidth-${remainder}`] = border.thickness;
|
|
49566
|
-
result[
|
|
49567
|
-
result[
|
|
49565
|
+
result[_a3 = `borderWidth-${remainder}`] ?? (result[_a3] = border.thickness);
|
|
49566
|
+
result[_b2 = `borderStyle-${remainder}`] ?? (result[_b2] = border.style);
|
|
49567
|
+
result[_c2 = `borderColor-${remainder}`] ?? (result[_c2] = border.color);
|
|
49568
49568
|
}
|
|
49569
49569
|
match2 = thicknessBorderRegEx.exec(key);
|
|
49570
49570
|
if (match2) {
|
|
@@ -58727,6 +58727,7 @@ to {
|
|
|
58727
58727
|
labelBreak: labelBreak2,
|
|
58728
58728
|
required: required2
|
|
58729
58729
|
}, ref) {
|
|
58730
|
+
id2 = id2 || reactExports.useId();
|
|
58730
58731
|
const inputRef = reactExports.useRef(null);
|
|
58731
58732
|
reactExports.useEffect(() => {
|
|
58732
58733
|
if (autoFocus) {
|
|
@@ -58779,6 +58780,7 @@ to {
|
|
|
58779
58780
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
58780
58781
|
ItemWithLabel,
|
|
58781
58782
|
{
|
|
58783
|
+
id: id2,
|
|
58782
58784
|
labelPosition,
|
|
58783
58785
|
label: label2,
|
|
58784
58786
|
labelWidth,
|
|
@@ -124896,7 +124898,6 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
124896
124898
|
const parsedModule2 = {
|
|
124897
124899
|
type: "ScriptModule",
|
|
124898
124900
|
name: moduleName2,
|
|
124899
|
-
exports,
|
|
124900
124901
|
functions,
|
|
124901
124902
|
statements,
|
|
124902
124903
|
sources: /* @__PURE__ */ new Map()
|
|
@@ -134853,7 +134854,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
134853
134854
|
tone,
|
|
134854
134855
|
toastDuration = 5e3,
|
|
134855
134856
|
themeVars: themeVars2 = EMPTY_OBJECT,
|
|
134856
|
-
layoutContext
|
|
134857
|
+
layoutContext,
|
|
134858
|
+
children
|
|
134857
134859
|
}) {
|
|
134858
134860
|
const generatedId2 = reactExports.useId();
|
|
134859
134861
|
const { themes, resources, resourceMap, activeThemeId, setRoot, root: root2 } = useThemes();
|
|
@@ -134960,7 +134962,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
134960
134962
|
}
|
|
134961
134963
|
},
|
|
134962
134964
|
children: [
|
|
134963
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
134965
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorBoundary, { node: node2, location: "theme-root", children: [
|
|
134966
|
+
renderChild2(node2.children),
|
|
134967
|
+
children
|
|
134968
|
+
] }),
|
|
134964
134969
|
/* @__PURE__ */ jsxRuntimeExports.jsx(NotificationToast, { toastDuration })
|
|
134965
134970
|
]
|
|
134966
134971
|
}
|
|
@@ -144767,7 +144772,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
144767
144772
|
/* @__PURE__ */ jsxRuntimeExports.jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
144768
144773
|
] });
|
|
144769
144774
|
}
|
|
144770
|
-
const version = "0.9.
|
|
144775
|
+
const version = "0.9.9";
|
|
144771
144776
|
const ApiInterceptorContext = reactExports.createContext(null);
|
|
144772
144777
|
function useApiInterceptorContext() {
|
|
144773
144778
|
return reactExports.useContext(ApiInterceptorContext);
|
|
@@ -146529,7 +146534,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
146529
146534
|
parentRenderContext,
|
|
146530
146535
|
memoedVarsRef,
|
|
146531
146536
|
isImplicit,
|
|
146532
|
-
uidInfoRef: parentUidInfoRef
|
|
146537
|
+
uidInfoRef: parentUidInfoRef,
|
|
146538
|
+
children
|
|
146533
146539
|
}, ref) {
|
|
146534
146540
|
var _a3;
|
|
146535
146541
|
const { apiBoundContainer } = node2;
|
|
@@ -146878,12 +146884,12 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
146878
146884
|
if (typeof childNode === "string") {
|
|
146879
146885
|
throw Error("should be resolved for now");
|
|
146880
146886
|
}
|
|
146881
|
-
const
|
|
146882
|
-
if (!
|
|
146887
|
+
const children2 = isArray$2(childNode) ? childNode : [childNode];
|
|
146888
|
+
if (!children2 || !children2.length) {
|
|
146883
146889
|
return null;
|
|
146884
146890
|
}
|
|
146885
|
-
const wrapWithFragment2 =
|
|
146886
|
-
const renderedChildren2 =
|
|
146891
|
+
const wrapWithFragment2 = children2.length > 1;
|
|
146892
|
+
const renderedChildren2 = children2.map((child, childIndex) => {
|
|
146887
146893
|
if (!child) {
|
|
146888
146894
|
return void 0;
|
|
146889
146895
|
}
|
|
@@ -146971,7 +146977,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
146971
146977
|
});
|
|
146972
146978
|
const containerContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
146973
146979
|
renderedLoaders,
|
|
146974
|
-
renderedChildren
|
|
146980
|
+
!!children && reactExports.isValidElement(renderedChildren) ? reactExports.cloneElement(renderedChildren, null, children) : renderedChildren
|
|
146975
146981
|
] });
|
|
146976
146982
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
146977
146983
|
reactExports.Fragment,
|
|
@@ -147086,7 +147092,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147086
147092
|
parentRenderContext,
|
|
147087
147093
|
layoutContextRef,
|
|
147088
147094
|
uidInfoRef,
|
|
147089
|
-
isImplicit
|
|
147095
|
+
isImplicit,
|
|
147096
|
+
children,
|
|
147097
|
+
...rest
|
|
147090
147098
|
}, ref) {
|
|
147091
147099
|
const [version2, setVersion] = reactExports.useState(0);
|
|
147092
147100
|
const routingParams = useRoutingParams();
|
|
@@ -147226,7 +147234,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147226
147234
|
memoedVarsRef: memoedVars,
|
|
147227
147235
|
isImplicit,
|
|
147228
147236
|
ref,
|
|
147229
|
-
uidInfoRef
|
|
147237
|
+
uidInfoRef,
|
|
147238
|
+
...rest,
|
|
147239
|
+
children
|
|
147230
147240
|
}
|
|
147231
147241
|
) });
|
|
147232
147242
|
})
|
|
@@ -147431,7 +147441,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147431
147441
|
parentDispatch,
|
|
147432
147442
|
parentRenderContext,
|
|
147433
147443
|
layoutContextRef,
|
|
147434
|
-
uidInfoRef
|
|
147444
|
+
uidInfoRef,
|
|
147445
|
+
children,
|
|
147446
|
+
...rest
|
|
147435
147447
|
}, ref) {
|
|
147436
147448
|
const containerizedNode = reactExports.useMemo(() => getWrappedWithContainer(node2), [node2]);
|
|
147437
147449
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { node: node2, location: "container", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -147447,7 +147459,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147447
147459
|
layoutContextRef,
|
|
147448
147460
|
uidInfoRef,
|
|
147449
147461
|
isImplicit: node2.type !== "Container" && containerizedNode.uses === void 0,
|
|
147450
|
-
ref
|
|
147462
|
+
ref,
|
|
147463
|
+
...rest,
|
|
147464
|
+
children
|
|
147451
147465
|
}
|
|
147452
147466
|
) });
|
|
147453
147467
|
})
|
|
@@ -147893,6 +147907,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147893
147907
|
memoedVarsRef,
|
|
147894
147908
|
onUnmount,
|
|
147895
147909
|
uidInfoRef,
|
|
147910
|
+
children,
|
|
147896
147911
|
...rest
|
|
147897
147912
|
}, ref) {
|
|
147898
147913
|
var _a3;
|
|
@@ -147944,9 +147959,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
147944
147959
|
[lookupAction, uid]
|
|
147945
147960
|
);
|
|
147946
147961
|
const memoedRenderChild = reactExports.useCallback(
|
|
147947
|
-
(
|
|
147962
|
+
(children2, layoutContext, pRenderContext) => {
|
|
147948
147963
|
return renderChild2(
|
|
147949
|
-
|
|
147964
|
+
children2,
|
|
147950
147965
|
layoutContext,
|
|
147951
147966
|
pRenderContext || parentRenderContext,
|
|
147952
147967
|
uidInfoRef
|
|
@@ -148084,12 +148099,13 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
148084
148099
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(InvalidComponent, { errors: [renderingError], node: safeNode, children: renderedNode });
|
|
148085
148100
|
}
|
|
148086
148101
|
if ((ref || !isEmpty$1(mouseEventHandlers)) && renderedNode && React$1.isValidElement(renderedNode)) {
|
|
148102
|
+
const childrenArray = !children ? [] : Array.isArray(children) ? children : [children];
|
|
148087
148103
|
return reactExports.cloneElement(renderedNode, {
|
|
148088
148104
|
ref: ref ? composeRefs$1(ref, renderedNode.ref) : renderedNode.ref,
|
|
148089
148105
|
...mergeProps$1({ ...renderedNode.props, ...mouseEventHandlers }, rest)
|
|
148090
|
-
});
|
|
148106
|
+
}, ...childrenArray);
|
|
148091
148107
|
}
|
|
148092
|
-
return React$1.isValidElement(renderedNode)
|
|
148108
|
+
return React$1.isValidElement(renderedNode) && !!children ? reactExports.cloneElement(renderedNode, null, children) : renderedNode;
|
|
148093
148109
|
});
|
|
148094
148110
|
function slotRenderer({ node: node2, extractValue, renderChild: renderChild2, lookupAction, layoutContext }, parentRenderContext) {
|
|
148095
148111
|
const templateName = extractValue.asOptionalString(node2.props.name);
|
|
@@ -148190,6 +148206,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
148190
148206
|
memoedVarsRef,
|
|
148191
148207
|
cleanup,
|
|
148192
148208
|
uidInfoRef,
|
|
148209
|
+
children,
|
|
148193
148210
|
...rest
|
|
148194
148211
|
}, ref) {
|
|
148195
148212
|
var _a3;
|
|
@@ -148230,7 +148247,9 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
148230
148247
|
parentStatePartChanged: statePartChanged,
|
|
148231
148248
|
parentRegisterComponentApi: registerComponentApi,
|
|
148232
148249
|
uidInfoRef,
|
|
148233
|
-
ref
|
|
148250
|
+
ref,
|
|
148251
|
+
...rest,
|
|
148252
|
+
children
|
|
148234
148253
|
}
|
|
148235
148254
|
);
|
|
148236
148255
|
} else {
|
|
@@ -148251,7 +148270,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
148251
148270
|
layoutContextRef: stableLayoutContext,
|
|
148252
148271
|
ref,
|
|
148253
148272
|
uidInfoRef,
|
|
148254
|
-
...rest
|
|
148273
|
+
...rest,
|
|
148274
|
+
children
|
|
148255
148275
|
}
|
|
148256
148276
|
);
|
|
148257
148277
|
}
|
|
@@ -148730,10 +148750,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
148730
148750
|
cleanup: noop$5,
|
|
148731
148751
|
memoedVarsRef
|
|
148732
148752
|
});
|
|
148733
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsxRuntimeExports.
|
|
148734
|
-
renderedRoot,
|
|
148735
|
-
children
|
|
148736
|
-
] }) });
|
|
148753
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AppContext.Provider, { value: appContextValue, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AppStateContext.Provider, { value: appStateContextValue, children: !!children && reactExports.isValidElement(renderedRoot) ? reactExports.cloneElement(renderedRoot, null, children) : renderedRoot }) });
|
|
148737
148754
|
}
|
|
148738
148755
|
function signError(error2) {
|
|
148739
148756
|
_t$1.error(typeof error2 === "string" ? error2 : error2.message || "Something went wrong");
|
|
@@ -149566,7 +149583,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
149566
149583
|
ToneChangerButton: ToneChangerButtonMd,
|
|
149567
149584
|
Tree: TreeMd
|
|
149568
149585
|
};
|
|
149569
|
-
var define_process_env_default$2 = { VITE_XMLUI_VERSION: "0.9.
|
|
149586
|
+
var define_process_env_default$2 = { VITE_XMLUI_VERSION: "0.9.9 (built 4/8/2025)" };
|
|
149570
149587
|
const MAIN_FILE = "Main." + componentFileExtension;
|
|
149571
149588
|
const MAIN_CODE_BEHIND_FILE = "Main." + codeBehindFileExtension;
|
|
149572
149589
|
const CONFIG_FILE = "config.json";
|
|
@@ -149657,6 +149674,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
149657
149674
|
try {
|
|
149658
149675
|
parser.parseStatements();
|
|
149659
149676
|
} catch (e2) {
|
|
149677
|
+
console.error("Error parsing code behind", e2);
|
|
149660
149678
|
if (parser.errors.length > 0) {
|
|
149661
149679
|
return {
|
|
149662
149680
|
component: errReportScriptError(parser.errors[0], response.url),
|
|
@@ -149665,19 +149683,23 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
149665
149683
|
};
|
|
149666
149684
|
}
|
|
149667
149685
|
}
|
|
149668
|
-
|
|
149669
|
-
|
|
149686
|
+
try {
|
|
149687
|
+
const codeBehind = collectCodeBehindFromSource("Main", code2);
|
|
149688
|
+
if (Object.keys(codeBehind.moduleErrors ?? {}).length > 0) {
|
|
149689
|
+
return {
|
|
149690
|
+
component: errReportModuleErrors(codeBehind.moduleErrors, response.url),
|
|
149691
|
+
file: response.url,
|
|
149692
|
+
hasError: true
|
|
149693
|
+
};
|
|
149694
|
+
}
|
|
149695
|
+
removeCodeBehindTokensFromTree(codeBehind);
|
|
149670
149696
|
return {
|
|
149671
|
-
|
|
149672
|
-
file: response.url
|
|
149673
|
-
hasError: true
|
|
149697
|
+
codeBehind,
|
|
149698
|
+
file: response.url
|
|
149674
149699
|
};
|
|
149700
|
+
} catch (e2) {
|
|
149701
|
+
console.error("Error collecting code behind", e2);
|
|
149675
149702
|
}
|
|
149676
|
-
removeCodeBehindTokensFromTree(codeBehind);
|
|
149677
|
-
return {
|
|
149678
|
-
codeBehind,
|
|
149679
|
-
file: response.url
|
|
149680
|
-
};
|
|
149681
149703
|
}
|
|
149682
149704
|
function matchesFileName(path2, fileName) {
|
|
149683
149705
|
return path2.endsWith(`/${fileName}.ts`) || path2.endsWith(`/${fileName}.js`) || path2.endsWith(`/${fileName}.${componentFileExtension}`) || path2.endsWith(`/${fileName}.${codeBehindFileExtension}`);
|
|
@@ -149969,9 +149991,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
149969
149991
|
);
|
|
149970
149992
|
const componentCodeBehindPromise = new Promise(async (resolve) => {
|
|
149971
149993
|
try {
|
|
149972
|
-
const
|
|
149973
|
-
|
|
149994
|
+
const codeBehind = await fetchWithoutCache(
|
|
149995
|
+
`components/${componentPath}.${codeBehindFileExtension}`
|
|
149974
149996
|
);
|
|
149997
|
+
const codeBehindWrapper = await parseCodeBehindResponse(codeBehind);
|
|
149975
149998
|
if (codeBehindWrapper.hasError) {
|
|
149976
149999
|
errorComponents.push(codeBehindWrapper.component);
|
|
149977
150000
|
}
|
|
@@ -153888,7 +153911,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
153888
153911
|
function isResponseWithoutBody(status) {
|
|
153889
153912
|
return RESPONSE_STATUS_CODES_WITHOUT_BODY.has(status);
|
|
153890
153913
|
}
|
|
153891
|
-
var define_process_env_default$1 = { NODE_ENV: "production", VITE_MOCK_ENABLED: true, VITE_MOCK_WORKER_LOCATION: "mockApi.js", VITE_USED_COMPONENTS_Pdf: "false", VITE_USED_COMPONENTS_Chart: "false", VITE_USER_COMPONENTS_XmluiCodeHightlighter: "false", VITE_USED_COMPONENTS_Tree: "false", VITE_XMLUI_VERSION: "0.9.
|
|
153914
|
+
var define_process_env_default$1 = { NODE_ENV: "production", VITE_MOCK_ENABLED: true, VITE_MOCK_WORKER_LOCATION: "mockApi.js", VITE_USED_COMPONENTS_Pdf: "false", VITE_USED_COMPONENTS_Chart: "false", VITE_USER_COMPONENTS_XmluiCodeHightlighter: "false", VITE_USED_COMPONENTS_Tree: "false", VITE_XMLUI_VERSION: "0.9.9 (built 4/8/2025)" };
|
|
153892
153915
|
var __defProp$7 = Object.defineProperty;
|
|
153893
153916
|
var __export = (target2, all2) => {
|
|
153894
153917
|
for (var name2 in all2)
|
package/dist/xmlui.mjs
CHANGED