xmlui 0.7.19 → 0.7.21
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-C3bvewX6.mjs → apiInterceptorWorker-LRHkKnha.mjs} +1 -1
- package/dist/{grammar.tmLanguage-69iP6c5d.mjs → grammar.tmLanguage-DNepe_jP.mjs} +1 -1
- package/dist/index-5NLXyjX0.mjs +31055 -0
- package/dist/index.css +1 -1
- package/dist/scripts/bin/build-lib.js +1 -1
- package/dist/scripts/bin/index.js +2 -2
- package/dist/scripts/bin/start.js +23 -6
- package/dist/scripts/bin/viteConfig.js +1 -0
- package/dist/scripts/package.json +2 -1
- package/dist/scripts/src/abstractions/ExtensionDefs.js +2 -0
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +7 -4
- package/dist/scripts/src/components/Carousel/CarouselNative.js +6 -6
- package/dist/scripts/src/components/ComponentProvider.js +171 -148
- package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -1
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +33 -0
- package/dist/scripts/src/components/RawHtml/RawHtml.js +39 -0
- package/dist/scripts/src/components/RawHtml/RawHtmlNative.js +13 -0
- package/dist/scripts/src/components/Theme/ThemeNative.js +1 -1
- package/dist/scripts/src/components-core/LoaderComponent.js +1 -1
- package/dist/scripts/src/components-core/RestApiProxy.js +1 -1
- package/dist/scripts/src/components-core/StandaloneApp.js +19 -19
- package/dist/scripts/src/components-core/{StandaloneComponentManager.js → StandaloneExtensionManager.js} +6 -13
- package/dist/scripts/src/components-core/action/APICall.js +1 -1
- package/dist/scripts/src/components-core/loader/PageableLoader.js +4 -4
- package/dist/scripts/src/components-core/{AppRoot.js → rendering/AppContent.js} +60 -145
- package/dist/scripts/src/components-core/rendering/AppRoot.js +55 -0
- package/dist/scripts/src/components-core/rendering/AppWrapper.js +44 -0
- package/dist/scripts/src/components-core/{ComponentBed.js → rendering/ComponentAdapter.js} +8 -8
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +147 -0
- package/dist/scripts/src/components-core/rendering/Container.js +576 -0
- package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +82 -0
- package/dist/scripts/src/components-core/{ErrorBoundary.js → rendering/ErrorBoundary.js} +9 -3
- package/dist/scripts/src/components-core/rendering/StateContainer.js +331 -0
- package/dist/scripts/src/components-core/{container → rendering}/buildProxy.js +11 -7
- package/dist/scripts/src/components-core/{container → rendering}/collectFnVarDeps.js +2 -2
- package/dist/scripts/src/components-core/{container → rendering}/reducer.js +3 -0
- package/dist/scripts/src/components-core/rendering/renderChild.js +81 -0
- package/dist/scripts/src/index.js +3 -6
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +193 -164
- package/dist/scripts/src/syntax/grammar.tmLanguage.json +1 -1
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +4216 -4232
- package/dist/xmlui-metadata.umd.js +16 -16
- package/dist/xmlui-standalone.umd.js +262 -290
- package/dist/xmlui.d.ts +36 -61
- package/dist/xmlui.mjs +1 -1
- package/package.json +2 -1
- package/dist/index-BwlAHBcX.mjs +0 -76810
- package/dist/scripts/src/components/BarChart/BarChart.js +0 -49
- package/dist/scripts/src/components/BarChart/BarChartNative.js +0 -176
- package/dist/scripts/src/components/Map/Map.js +0 -75
- package/dist/scripts/src/components/Map/world_countries.json +0 -45307
- package/dist/scripts/src/components/PieChart/PieChart.js +0 -45
- package/dist/scripts/src/components/PieChart/PieChartNative.js +0 -165
- package/dist/scripts/src/components/chart-color-schemes.js +0 -43
- package/dist/scripts/src/components-core/container/Container.js +0 -1186
- package/dist/scripts/src/components-core/container/ContainerComponentDef.js +0 -15
- /package/dist/scripts/src/components-core/{InvalidComponent.js → rendering/InvalidComponent.js} +0 -0
- /package/dist/scripts/src/components-core/{UnknownComponent.js → rendering/UnknownComponent.js} +0 -0
- /package/dist/scripts/src/components-core/{container → rendering}/valueExtractor.js +0 -0
|
@@ -51,7 +51,7 @@ const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode
|
|
|
51
51
|
output: {
|
|
52
52
|
footer: (chunk) => {
|
|
53
53
|
if (chunk.name === "index" && chunk.fileName === umdFileName) {
|
|
54
|
-
return `if(typeof window.xmlui !== "undefined"){window.xmlui.standalone.
|
|
54
|
+
return `if(typeof window.xmlui !== "undefined"){window.xmlui.standalone.registerExtension(window['${env.npm_package_name}']);}`;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
globals: {
|
|
@@ -75,8 +75,8 @@ switch (script) {
|
|
|
75
75
|
break;
|
|
76
76
|
}
|
|
77
77
|
case "start": {
|
|
78
|
-
const { port, withMock, withLegacyParser } = yargs_1.argv;
|
|
79
|
-
(0, start_1.start)({ port, withMock: getBoolArg(withMock), withLegacyParser: getBoolArg(withLegacyParser) });
|
|
78
|
+
const { port, withMock, withLegacyParser, proxy } = yargs_1.argv;
|
|
79
|
+
(0, start_1.start)({ port, withMock: getBoolArg(withMock), withLegacyParser: getBoolArg(withLegacyParser), proxy });
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
case "preview": {
|
|
@@ -12,19 +12,36 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.start = void 0;
|
|
13
13
|
const vite_1 = require("vite");
|
|
14
14
|
const viteConfig_1 = require("./viteConfig");
|
|
15
|
-
const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMock = true, withLegacyParser = false }) {
|
|
15
|
+
const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMock = true, withLegacyParser = false, proxy, }) {
|
|
16
16
|
console.log("Starting with options:", {
|
|
17
17
|
withMock,
|
|
18
|
-
withLegacyParser
|
|
18
|
+
withLegacyParser,
|
|
19
|
+
withProxy: proxy,
|
|
19
20
|
});
|
|
21
|
+
let proxyDef;
|
|
22
|
+
if (proxy) {
|
|
23
|
+
const splitProxy = proxy.split("->");
|
|
24
|
+
if (splitProxy.length !== 2) {
|
|
25
|
+
console.error("Invalid proxy definition. Example: /api->http://localhost:3000");
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
proxyDef = {
|
|
29
|
+
[splitProxy[0]]: {
|
|
30
|
+
target: splitProxy[1],
|
|
31
|
+
changeOrigin: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
20
36
|
try {
|
|
21
37
|
const server = yield (0, vite_1.createServer)(Object.assign(Object.assign({}, (0, viteConfig_1.getViteConfig)({ withLegacyParser })), { server: {
|
|
22
38
|
port,
|
|
39
|
+
proxy: proxyDef,
|
|
23
40
|
}, define: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
41
|
+
"process.env.VITE_BUILD_MODE": JSON.stringify("ALL"),
|
|
42
|
+
"process.env.VITE_DEV_MODE": true,
|
|
43
|
+
"process.env.VITE_STANDALONE": process.env.VITE_STANDALONE,
|
|
44
|
+
"process.env.VITE_MOCK_ENABLED": withMock,
|
|
28
45
|
"process.env.VITE_INCLUDE_ALL_COMPONENTS": JSON.stringify("true"),
|
|
29
46
|
"process.env.VITE_LEGACY_PARSER": withLegacyParser,
|
|
30
47
|
} }));
|
|
@@ -52,6 +52,7 @@ function getViteConfig({ flatDist = false, withRelativeRoot = false, flatDistUiP
|
|
|
52
52
|
"@core": path.resolve(__dirname, "../src/core"),
|
|
53
53
|
"@components-core": path.resolve(__dirname, "../src/components-core"),
|
|
54
54
|
"@components": path.resolve(__dirname, "../src/components"),
|
|
55
|
+
"@parsers": path.resolve(__dirname, "../src/parsers"),
|
|
55
56
|
},
|
|
56
57
|
},
|
|
57
58
|
base: withRelativeRoot ? "" : undefined,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmlui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.21",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start-test-bed": "cd src/testing/infrastructure && xmlui start",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"react-textarea-autosize": "8.5.3",
|
|
92
92
|
"react-virtualized-auto-sizer": "1.0.24",
|
|
93
93
|
"react-window": "1.8.10",
|
|
94
|
+
"recharts": "^2.15.1",
|
|
94
95
|
"sass": "1.55.0",
|
|
95
96
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
96
97
|
"shiki": "^1.14.1",
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.CarouselItemComponent = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
8
|
const react_1 = require("react");
|
|
5
9
|
const CarouselContext_1 = require("@components/Carousel/CarouselContext");
|
|
10
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
11
|
+
const Carousel_module_scss_1 = __importDefault(require("@components/Carousel/Carousel.module.scss"));
|
|
6
12
|
exports.CarouselItemComponent = (0, react_1.forwardRef)(function CarouselItemComponent({ children, style }, forwardedRef) {
|
|
7
13
|
const id = (0, react_1.useId)();
|
|
8
14
|
const { register, unRegister } = (0, CarouselContext_1.useCarousel)();
|
|
9
15
|
(0, react_1.useEffect)(() => {
|
|
10
16
|
register({
|
|
11
|
-
children,
|
|
12
|
-
style,
|
|
13
|
-
ref: forwardedRef,
|
|
14
17
|
id,
|
|
15
18
|
});
|
|
16
19
|
}, [id, children, style, register, forwardedRef]);
|
|
@@ -19,5 +22,5 @@ exports.CarouselItemComponent = (0, react_1.forwardRef)(function CarouselItemCom
|
|
|
19
22
|
unRegister(id);
|
|
20
23
|
};
|
|
21
24
|
}, [id, unRegister]);
|
|
22
|
-
return
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: "group", "aria-roledescription": "slide", className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselItem), children: (0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.innerWrapper, ref: forwardedRef, style: style, children: children }) }, id));
|
|
23
26
|
});
|
|
@@ -163,10 +163,10 @@ exports.CarouselComponent = (0, react_1.forwardRef)(function CarouselComponent({
|
|
|
163
163
|
referenceElement.current.addEventListener("keydown", handleKeyDown);
|
|
164
164
|
}
|
|
165
165
|
}, [ref, handleKeyDown]);
|
|
166
|
-
return ((0, jsx_runtime_1.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
166
|
+
return ((0, jsx_runtime_1.jsx)(CarouselContext_1.CarouselContext.Provider, { value: carouselContextValue, children: (0, jsx_runtime_1.jsxs)("div", { style: style, ref: ref, className: (0, classnames_1.default)(Carousel_module_scss_1.default.carousel), role: "region", tabIndex: -1, "aria-roledescription": "carousel", children: [(0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: Carousel_module_scss_1.default.carouselContentWrapper, children: (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselContent, {
|
|
167
|
+
[Carousel_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
168
|
+
[Carousel_module_scss_1.default.vertical]: orientation === "vertical",
|
|
169
|
+
}), children: children }) }), controls && ((0, jsx_runtime_1.jsxs)("div", { className: Carousel_module_scss_1.default.controls, children: [autoplay && ((0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: toggleAutoplay, children: isPlaying ? (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "pause" }) : (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "play" }) })), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, disabled: !canScrollPrev, onClick: scrollPrev, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: prevIconName }) }), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: scrollNext, disabled: !canScrollNext, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: nextIconName }) })] })), indicators && ((0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.indicators, children: carouselItems.map((_, index) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => scrollTo(index), className: (0, classnames_1.default)(Carousel_module_scss_1.default.indicator, {
|
|
170
|
+
[Carousel_module_scss_1.default.active]: index === activeSlide,
|
|
171
|
+
}), "aria-current": index === activeSlide }, index))) }))] }) }));
|
|
172
172
|
});
|