xmlui 0.7.20 → 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.
Files changed (58) hide show
  1. package/dist/{apiInterceptorWorker-D3L7dpSV.mjs → apiInterceptorWorker-LRHkKnha.mjs} +1 -1
  2. package/dist/{grammar.tmLanguage-69iP6c5d.mjs → grammar.tmLanguage-DNepe_jP.mjs} +1 -1
  3. package/dist/index-5NLXyjX0.mjs +31055 -0
  4. package/dist/index.css +1 -1
  5. package/dist/scripts/bin/build-lib.js +1 -1
  6. package/dist/scripts/bin/index.js +2 -2
  7. package/dist/scripts/bin/start.js +23 -6
  8. package/dist/scripts/bin/viteConfig.js +1 -0
  9. package/dist/scripts/package.json +2 -1
  10. package/dist/scripts/src/abstractions/ExtensionDefs.js +2 -0
  11. package/dist/scripts/src/components/ComponentProvider.js +171 -148
  12. package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -1
  13. package/dist/scripts/src/components/HtmlTags/HtmlTags.js +33 -0
  14. package/dist/scripts/src/components/RawHtml/RawHtml.js +39 -0
  15. package/dist/scripts/src/components/RawHtml/RawHtmlNative.js +13 -0
  16. package/dist/scripts/src/components/Theme/ThemeNative.js +1 -1
  17. package/dist/scripts/src/components-core/LoaderComponent.js +1 -1
  18. package/dist/scripts/src/components-core/RestApiProxy.js +1 -1
  19. package/dist/scripts/src/components-core/StandaloneApp.js +19 -19
  20. package/dist/scripts/src/components-core/{StandaloneComponentManager.js → StandaloneExtensionManager.js} +6 -13
  21. package/dist/scripts/src/components-core/action/APICall.js +1 -1
  22. package/dist/scripts/src/components-core/loader/PageableLoader.js +4 -4
  23. package/dist/scripts/src/components-core/{AppRoot.js → rendering/AppContent.js} +60 -145
  24. package/dist/scripts/src/components-core/rendering/AppRoot.js +55 -0
  25. package/dist/scripts/src/components-core/rendering/AppWrapper.js +44 -0
  26. package/dist/scripts/src/components-core/{ComponentBed.js → rendering/ComponentAdapter.js} +8 -8
  27. package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +147 -0
  28. package/dist/scripts/src/components-core/rendering/Container.js +576 -0
  29. package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +82 -0
  30. package/dist/scripts/src/components-core/{ErrorBoundary.js → rendering/ErrorBoundary.js} +9 -3
  31. package/dist/scripts/src/components-core/rendering/StateContainer.js +331 -0
  32. package/dist/scripts/src/components-core/{container → rendering}/buildProxy.js +11 -7
  33. package/dist/scripts/src/components-core/{container → rendering}/collectFnVarDeps.js +2 -2
  34. package/dist/scripts/src/components-core/{container → rendering}/reducer.js +3 -0
  35. package/dist/scripts/src/components-core/rendering/renderChild.js +81 -0
  36. package/dist/scripts/src/index.js +3 -6
  37. package/dist/scripts/src/parsers/xmlui-parser/transform.js +193 -164
  38. package/dist/scripts/src/syntax/grammar.tmLanguage.json +1 -1
  39. package/dist/style.css +1 -1
  40. package/dist/xmlui-metadata.mjs +4216 -4232
  41. package/dist/xmlui-metadata.umd.js +16 -16
  42. package/dist/xmlui-standalone.umd.js +262 -290
  43. package/dist/xmlui.d.ts +36 -61
  44. package/dist/xmlui.mjs +1 -1
  45. package/package.json +2 -1
  46. package/dist/index-BYjaMGrD.mjs +0 -76804
  47. package/dist/scripts/src/components/BarChart/BarChart.js +0 -49
  48. package/dist/scripts/src/components/BarChart/BarChartNative.js +0 -176
  49. package/dist/scripts/src/components/Map/Map.js +0 -75
  50. package/dist/scripts/src/components/Map/world_countries.json +0 -45307
  51. package/dist/scripts/src/components/PieChart/PieChart.js +0 -45
  52. package/dist/scripts/src/components/PieChart/PieChartNative.js +0 -165
  53. package/dist/scripts/src/components/chart-color-schemes.js +0 -43
  54. package/dist/scripts/src/components-core/container/Container.js +0 -1186
  55. package/dist/scripts/src/components-core/container/ContainerComponentDef.js +0 -15
  56. /package/dist/scripts/src/components-core/{InvalidComponent.js → rendering/InvalidComponent.js} +0 -0
  57. /package/dist/scripts/src/components-core/{UnknownComponent.js → rendering/UnknownComponent.js} +0 -0
  58. /package/dist/scripts/src/components-core/{container → rendering}/valueExtractor.js +0 -0
@@ -1,45 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pieChartComponentRenderer = exports.PieChartMd = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const renderers_1 = require("@components-core/renderers");
9
- const ComponentDefs_1 = require("@abstractions/ComponentDefs");
10
- const PieChart_module_scss_1 = __importDefault(require("./PieChart.module.scss"));
11
- const themeVars_1 = require("@components-core/theming/themeVars");
12
- const PieChartNative_1 = require("./PieChartNative");
13
- const COMP = "PieChart";
14
- exports.PieChartMd = (0, ComponentDefs_1.createMetadata)({
15
- status: "deprecated",
16
- description: "(**OBSOLETE**) A pie chart component",
17
- props: {
18
- data: (0, ComponentDefs_1.d)("The data to be displayed in the pie chart"),
19
- isInteractive: (0, ComponentDefs_1.d)("Whether the chart is interactive"),
20
- showLabels: (0, ComponentDefs_1.d)("Whether to show labels"),
21
- showLegends: (0, ComponentDefs_1.d)("Whether to show legends"),
22
- legendPosition: (0, ComponentDefs_1.d)("The position of the legend"),
23
- legendDirection: (0, ComponentDefs_1.d)("The direction of the legend"),
24
- },
25
- themeVars: (0, themeVars_1.parseScssVar)(PieChart_module_scss_1.default.themeVars),
26
- defaultThemeVars: {
27
- [`scheme-${COMP}`]: "nivo",
28
- [`color-text-${COMP}`]: "$color-text-secondary",
29
- [`color-ticks-${COMP}`]: "$color-text-primary",
30
- [`color-bg-tooltip-${COMP}`]: "$color-bg-primary",
31
- [`color-text-tooltip-${COMP}`]: "$color-text-primary",
32
- [`color-axis-${COMP}`]: "$color-text-primary",
33
- [`color-text-legend-${COMP}`]: "$color-text-primary",
34
- light: {
35
- [`scheme-${COMP}`]: "set3",
36
- },
37
- dark: {
38
- [`scheme-${COMP}`]: "dark2",
39
- },
40
- },
41
- });
42
- exports.pieChartComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.PieChartMd, ({ extractValue, node, layoutCss }) => {
43
- var _a, _b, _c, _d, _e, _f;
44
- return ((0, jsx_runtime_1.jsx)(PieChartNative_1.PieChart, { data: extractValue((_a = node.props) === null || _a === void 0 ? void 0 : _a.data), isInteractive: extractValue.asOptionalBoolean((_b = node.props) === null || _b === void 0 ? void 0 : _b.isInteractive), showLabels: extractValue.asOptionalBoolean((_c = node.props) === null || _c === void 0 ? void 0 : _c.showLabels), style: layoutCss, showLegends: extractValue.asOptionalBoolean((_d = node.props) === null || _d === void 0 ? void 0 : _d.showLegends), legendPosition: extractValue((_e = node.props) === null || _e === void 0 ? void 0 : _e.legendPosition), legendDirection: extractValue((_f = node.props) === null || _f === void 0 ? void 0 : _f.legendDirection) }));
45
- });
@@ -1,165 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.PieChart = void 0;
40
- const jsx_runtime_1 = require("react/jsx-runtime");
41
- const react_1 = __importStar(require("react"));
42
- const PieChart_module_scss_1 = __importDefault(require("./PieChart.module.scss"));
43
- const ThemeContext_1 = require("@components-core/theming/ThemeContext");
44
- const chart_color_schemes_1 = __importDefault(require("@components/chart-color-schemes"));
45
- const classnames_1 = __importDefault(require("classnames"));
46
- const hooks_1 = require("@components-core/utils/hooks");
47
- const ResponsivePie = react_1.default.lazy(() => Promise.resolve().then(() => __importStar(require("@nivo/pie"))).then((module) => ({ default: module.ResponsivePie })));
48
- const PieChart = ({ data = [], isInteractive = true, style, showLabels = false, showLegends = true, legendPosition = "bottom", legendDirection = "row", }) => {
49
- const { getThemeVar } = (0, ThemeContext_1.useTheme)();
50
- const [customLegendData, setCustomLegendData] = react_1.default.useState([]);
51
- const colors = (0, hooks_1.useColors)({
52
- name: "color-text-PieChart",
53
- format: "hex",
54
- }, {
55
- name: "color-ticks-PieChart",
56
- format: "hex",
57
- }, {
58
- name: "color-bg-tooltip-PieChart",
59
- format: "hex",
60
- }, {
61
- name: "color-text-tooltip-PieChart",
62
- format: "hex",
63
- }, {
64
- name: "color-axis-PieChart",
65
- format: "hex",
66
- }, {
67
- name: "color-text-legend-PieChart",
68
- format: "hex",
69
- });
70
- const pieChart = (0, react_1.useMemo)(() => ((0, jsx_runtime_1.jsx)(ResponsivePie, { fit: true, data: data, colors: { scheme: chart_color_schemes_1.default[getThemeVar("scheme-PieChart")] }, margin: { top: 12, right: 12, bottom: 12, left: 12 }, forwardLegendData: setCustomLegendData, theme: {
71
- background: "transparent",
72
- text: {
73
- fontSize: 11,
74
- fill: colors["color-text-PieChart"],
75
- outlineWidth: 0,
76
- outlineColor: "transparent",
77
- },
78
- axis: {
79
- domain: {
80
- line: {
81
- stroke: colors["color-axis-PieChart"],
82
- strokeWidth: 1,
83
- },
84
- },
85
- legend: {
86
- text: {
87
- fontSize: 12,
88
- fill: colors["color-text-legend-PieChart"],
89
- outlineWidth: 0,
90
- outlineColor: "transparent",
91
- },
92
- },
93
- ticks: {
94
- line: {
95
- stroke: "#777777",
96
- strokeWidth: 1,
97
- },
98
- text: {
99
- fontSize: 11,
100
- fill: colors["color-ticks-PieChart"],
101
- outlineWidth: 0,
102
- outlineColor: "transparent",
103
- },
104
- },
105
- },
106
- grid: {
107
- line: {
108
- stroke: "#dddddd",
109
- strokeWidth: 1,
110
- },
111
- },
112
- annotations: {
113
- text: {
114
- fontSize: 13,
115
- fill: "#333333",
116
- outlineWidth: 2,
117
- outlineColor: "#ffffff",
118
- outlineOpacity: 1,
119
- },
120
- link: {
121
- stroke: "#000000",
122
- strokeWidth: 1,
123
- outlineWidth: 2,
124
- outlineColor: "#ffffff",
125
- outlineOpacity: 1,
126
- },
127
- outline: {
128
- stroke: "#000000",
129
- strokeWidth: 2,
130
- outlineWidth: 2,
131
- outlineColor: "#ffffff",
132
- outlineOpacity: 1,
133
- },
134
- symbol: {
135
- fill: "#000000",
136
- outlineWidth: 2,
137
- outlineColor: "#ffffff",
138
- outlineOpacity: 1,
139
- },
140
- },
141
- tooltip: {
142
- wrapper: {},
143
- container: {
144
- background: colors["color-bg-tooltip-PieChart"],
145
- color: colors["color-text-tooltip-PieChart"],
146
- fontSize: 12,
147
- },
148
- basic: {},
149
- chip: {},
150
- table: {},
151
- tableCell: {},
152
- tableCellValue: {},
153
- },
154
- }, padAngle: 0.7, cornerRadius: 3, activeOuterRadiusOffset: 8, borderWidth: 1, borderColor: { from: "color", modifiers: [["darker", 0.2]] }, enableArcLinkLabels: showLabels, arcLinkLabelsSkipAngle: 10, arcLinkLabelsThickness: 2, arcLabelsSkipAngle: 10, isInteractive: isInteractive })), [showLegends, data, colors, isInteractive, legendPosition, legendDirection]);
155
- return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)("div", { style: Object.assign({}, style), children: (0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(PieChart_module_scss_1.default.chart, {
156
- [PieChart_module_scss_1.default.legendTop]: legendPosition === "top",
157
- [PieChart_module_scss_1.default.legendRight]: legendPosition === "right",
158
- [PieChart_module_scss_1.default.legendBottom]: legendPosition === "bottom",
159
- [PieChart_module_scss_1.default.legendLeft]: legendPosition === "left",
160
- }), children: [(0, jsx_runtime_1.jsx)("div", { className: PieChart_module_scss_1.default.wrapper, children: (0, jsx_runtime_1.jsx)("div", { className: PieChart_module_scss_1.default.chartContainer, children: pieChart }) }), showLegends && ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(PieChart_module_scss_1.default.legends, {
161
- [PieChart_module_scss_1.default.legendRow]: legendDirection === "row",
162
- [PieChart_module_scss_1.default.legendColumn]: legendDirection === "column",
163
- }), children: customLegendData.map((item, i) => ((0, jsx_runtime_1.jsxs)("div", { className: PieChart_module_scss_1.default.legendItem, children: [(0, jsx_runtime_1.jsx)("div", { className: PieChart_module_scss_1.default.legendBullet, style: { backgroundColor: item.color } }), (0, jsx_runtime_1.jsx)("div", { className: PieChart_module_scss_1.default.legendLabel, children: item.label })] }, i))) }))] }) }) }));
164
- };
165
- exports.PieChart = PieChart;
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const colorSchemes = {
4
- "set3": "set3",
5
- "tableau10": "tableau10",
6
- "brown_blueGreen": "brown_blueGreen",
7
- "purpleRed_green": "purpleRed_green",
8
- "pink_yellowGreen": "pink_yellowGreen",
9
- "purple_orange": "purple_orange",
10
- "red_blue": "red_blue",
11
- "red_grey": "red_grey",
12
- "red_yellow_blue": "red_yellow_blue",
13
- "red_yellow_green": "red_yellow_green",
14
- "spectral": "spectral",
15
- "blues": "blues",
16
- "greens": "greens",
17
- "greys": "greys",
18
- "oranges": "oranges",
19
- "purples": "purples",
20
- "reds": "reds",
21
- "blue_green": "blue_green",
22
- "blue_purple": "blue_purple",
23
- "green_blue": "green_blue",
24
- "orange_red": "orange_red",
25
- "purple_blue_green": "purple_blue_green",
26
- "purple_blue": "purple_blue",
27
- "purple_red": "purple_red",
28
- "red_purple": "red_purple",
29
- "yellow_green_blue": "yellow_green_blue",
30
- "yellow_green": "yellow_green",
31
- "yellow_orange_brown": "yellow_orange_brown",
32
- "yellow_orange_red": "yellow_orange_red",
33
- "nivo": "nivo",
34
- "category10": "category10",
35
- "accent": "accent",
36
- "dark2": "dark2",
37
- "paired": "paired",
38
- "pastel1": "pastel1",
39
- "pastel2": "pastel2",
40
- "set1": "set1",
41
- "set2": "set2"
42
- };
43
- exports.default = colorSchemes;