xmlui 0.9.51 → 0.9.52
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/lib/{apiInterceptorWorker-BtGYrMWj.mjs → apiInterceptorWorker-OagsYDXz.mjs} +3 -3
- package/dist/lib/{index-hS5S81ba.mjs → index-BnpxPPve.mjs} +13265 -11886
- package/dist/lib/index.css +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
- package/dist/lib/{server-common-CtY73qos.mjs → server-common-C0cF2UTg.mjs} +4422 -4452
- package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
- package/dist/lib/xmlui-parser.d.ts +84 -62
- package/dist/lib/xmlui-parser.mjs +41 -49
- package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
- package/dist/lib/xmlui.d.ts +17 -7
- package/dist/lib/xmlui.mjs +19 -18
- package/dist/metadata/apiInterceptorWorker-BOuioN57.mjs +15414 -0
- package/dist/metadata/collectedComponentMetadata-DbptBvJk.mjs +41019 -0
- package/dist/metadata/core-D3puiNN6.mjs +5771 -0
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
- package/dist/metadata/xmlui-metadata.mjs +3 -18398
- package/dist/metadata/xmlui-metadata.umd.js +547 -10
- package/dist/scripts/package.json +5 -6
- package/dist/scripts/src/components/APICall/APICall.js +13 -12
- package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
- package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
- package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
- package/dist/scripts/src/components/App/App.js +22 -9
- package/dist/scripts/src/components/App/AppNative.js +9 -1
- package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
- package/dist/scripts/src/components/AppState/AppState.js +2 -2
- package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
- package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
- package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
- package/dist/scripts/src/components/Badge/Badge.js +7 -5
- package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
- package/dist/scripts/src/components/Card/Card.js +6 -4
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
- package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
- package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
- package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
- package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
- package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
- package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
- package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
- package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
- package/dist/scripts/src/components/Column/Column.js +15 -9
- package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
- package/dist/scripts/src/components/ComponentProvider.js +12 -6
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
- package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
- package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
- package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
- package/dist/scripts/src/components/Footer/Footer.js +1 -0
- package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
- package/dist/scripts/src/components/Form/Form.js +9 -5
- package/dist/scripts/src/components/Form/FormNative.js +2 -1
- package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
- package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
- package/dist/scripts/src/components/Heading/Heading.js +5 -4
- package/dist/scripts/src/components/Heading/HeadingNative.js +1 -0
- package/dist/scripts/src/components/Icon/Icon.js +7 -5
- package/dist/scripts/src/components/Image/Image.js +19 -9
- package/dist/scripts/src/components/Image/ImageNative.js +7 -2
- package/dist/scripts/src/components/Items/Items.js +2 -0
- package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
- package/dist/scripts/src/components/Link/Link.js +3 -4
- package/dist/scripts/src/components/Link/LinkNative.js +6 -2
- package/dist/scripts/src/components/List/List.js +12 -11
- package/dist/scripts/src/components/List/ListNative.js +10 -2
- package/dist/scripts/src/components/Logo/Logo.js +7 -0
- package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
- package/dist/scripts/src/components/Markdown/Markdown.js +5 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +7 -9
- package/dist/scripts/src/components/Markdown/utils.js +23 -1
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
- package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
- package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
- package/dist/scripts/src/components/NavPanel/NavPanel.js +6 -0
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -2
- package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
- package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
- package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
- package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
- package/dist/scripts/src/components/Option/Option.js +10 -15
- package/dist/scripts/src/components/Option/OptionNative.js +18 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
- package/dist/scripts/src/components/Pages/Pages.js +7 -3
- package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
- package/dist/scripts/src/components/Queue/Queue.js +11 -6
- package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
- package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
- package/dist/scripts/src/components/Select/Select.js +21 -12
- package/dist/scripts/src/components/Select/SelectNative.js +15 -2
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
- package/dist/scripts/src/components/Slider/Slider.js +28 -9
- package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
- package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
- package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
- package/dist/scripts/src/components/Stack/Stack.js +4 -4
- package/dist/scripts/src/components/Stack/StackNative.js +8 -2
- package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
- package/dist/scripts/src/components/Table/Table.js +15 -14
- package/dist/scripts/src/components/Table/TableNative.js +25 -9
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
- package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
- package/dist/scripts/src/components/Text/Text.js +14 -13
- package/dist/scripts/src/components/Text/TextNative.js +7 -2
- package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
- package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
- package/dist/scripts/src/components/Theme/Theme.js +1 -1
- package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
- package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
- package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
- package/dist/scripts/src/components/metadata-helpers.js +11 -8
- package/dist/scripts/src/components-core/InspectorContext.js +0 -4
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
- package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
- package/dist/scripts/src/components-core/loader/Loader.js +7 -3
- package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
- package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
- package/dist/standalone/xmlui-standalone.es.d.ts +0 -2580
- package/dist/standalone/xmlui-standalone.umd.js +275 -305
- package/package.json +5 -6
|
@@ -0,0 +1,127 @@
|
|
|
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.defaultProps = void 0;
|
|
40
|
+
exports.PieChart = PieChart;
|
|
41
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
42
|
+
const recharts_1 = require("recharts");
|
|
43
|
+
const PieChartNative_module_scss_1 = __importDefault(require("./PieChartNative.module.scss"));
|
|
44
|
+
const xmlui_1 = require("xmlui");
|
|
45
|
+
const react_1 = require("react");
|
|
46
|
+
const ChartProvider_1 = __importStar(require("../utils/ChartProvider"));
|
|
47
|
+
const TooltipContent_1 = require("../Tooltip/TooltipContent");
|
|
48
|
+
exports.defaultProps = {
|
|
49
|
+
showLabel: true,
|
|
50
|
+
showLabelList: false,
|
|
51
|
+
showLegend: false,
|
|
52
|
+
labelListPosition: "inside",
|
|
53
|
+
innerRadius: 0,
|
|
54
|
+
};
|
|
55
|
+
// Custom label renderer that draws connectors and places text outside the pie
|
|
56
|
+
const renderCustomizedLabel = (props) => {
|
|
57
|
+
const RADIAN = Math.PI / 180;
|
|
58
|
+
const { cx, cy, midAngle, outerRadius, fill, payload, percent, value, name, index } = props;
|
|
59
|
+
// Calculate positions for the label connector lines
|
|
60
|
+
const sin = Math.sin(-RADIAN * midAngle);
|
|
61
|
+
const cos = Math.cos(-RADIAN * midAngle);
|
|
62
|
+
const sx = cx + (outerRadius + 10) * cos;
|
|
63
|
+
const sy = cy + (outerRadius + 10) * sin;
|
|
64
|
+
const mx = cx + (outerRadius + 30) * cos;
|
|
65
|
+
const my = cy + (outerRadius + 30) * sin;
|
|
66
|
+
const ex = mx + (cos >= 0 ? 1 : -1) * 22;
|
|
67
|
+
const ey = my;
|
|
68
|
+
const textAnchor = cos >= 0 ? "start" : "end";
|
|
69
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)("path", { d: `M${sx},${sy}L${mx},${my}L${ex},${ey}`, stroke: fill, fill: "none" }), (0, jsx_runtime_1.jsx)("circle", { cx: ex, cy: ey, r: 2, fill: fill, stroke: "none" }), (0, jsx_runtime_1.jsx)("text", { x: ex + (cos >= 0 ? 1 : -1) * 12, y: ey, textAnchor: textAnchor, className: PieChartNative_module_scss_1.default.pieLabel, fill: "currentColor", fontSize: 12, children: props.name })] }));
|
|
70
|
+
};
|
|
71
|
+
// Enhanced active shape renderer
|
|
72
|
+
const renderActiveShape = (props) => {
|
|
73
|
+
const { cx, cy, innerRadius, outerRadius, startAngle, endAngle, fill } = props;
|
|
74
|
+
return ((0, jsx_runtime_1.jsxs)("g", { children: [(0, jsx_runtime_1.jsx)(recharts_1.Sector, { cx: cx, cy: cy, innerRadius: innerRadius, outerRadius: outerRadius + 10, startAngle: startAngle, endAngle: endAngle, fill: fill }), (0, jsx_runtime_1.jsx)(recharts_1.Sector, { cx: cx, cy: cy, startAngle: startAngle, endAngle: endAngle, innerRadius: outerRadius + 6, outerRadius: outerRadius + 10, fill: fill })] }));
|
|
75
|
+
};
|
|
76
|
+
function PieChart({ data, dataKey, nameKey, style, showLabel = exports.defaultProps.showLabel, showLabelList = exports.defaultProps.showLabelList, labelListPosition = exports.defaultProps.labelListPosition, innerRadius = exports.defaultProps.innerRadius, children, width = "100%", height = "100%", outerRadius = "60%", showLegend = exports.defaultProps.showLegend, }) {
|
|
77
|
+
const { getThemeVar } = (0, xmlui_1.useTheme)();
|
|
78
|
+
const colorValues = (0, react_1.useMemo)(() => {
|
|
79
|
+
return [
|
|
80
|
+
getThemeVar("color-primary-500"),
|
|
81
|
+
getThemeVar("color-primary-300"),
|
|
82
|
+
getThemeVar("color-success-500"),
|
|
83
|
+
getThemeVar("color-success-300"),
|
|
84
|
+
getThemeVar("color-warn-500"),
|
|
85
|
+
getThemeVar("color-warn-300"),
|
|
86
|
+
getThemeVar("color-danger-500"),
|
|
87
|
+
getThemeVar("color-danger-300"),
|
|
88
|
+
getThemeVar("color-info-500"),
|
|
89
|
+
getThemeVar("color-info-300"),
|
|
90
|
+
getThemeVar("color-secondary-500"),
|
|
91
|
+
getThemeVar("color-secondary-300"),
|
|
92
|
+
getThemeVar("color-primary-600"),
|
|
93
|
+
getThemeVar("color-primary-400"),
|
|
94
|
+
getThemeVar("color-success-600"),
|
|
95
|
+
getThemeVar("color-success-400"),
|
|
96
|
+
getThemeVar("color-warn-600"),
|
|
97
|
+
getThemeVar("color-warn-400"),
|
|
98
|
+
getThemeVar("color-danger-600"),
|
|
99
|
+
getThemeVar("color-danger-400"),
|
|
100
|
+
getThemeVar("color-info-600"),
|
|
101
|
+
getThemeVar("color-info-400"),
|
|
102
|
+
getThemeVar("color-secondary-600"),
|
|
103
|
+
getThemeVar("color-secondary-400"),
|
|
104
|
+
getThemeVar("color-primary-900"),
|
|
105
|
+
getThemeVar("color-primary-700"),
|
|
106
|
+
getThemeVar("color-success-900"),
|
|
107
|
+
getThemeVar("color-success-700"),
|
|
108
|
+
getThemeVar("color-warn-900"),
|
|
109
|
+
getThemeVar("color-warn-700"),
|
|
110
|
+
getThemeVar("color-danger-900"),
|
|
111
|
+
getThemeVar("color-danger-700"),
|
|
112
|
+
getThemeVar("color-info-900"),
|
|
113
|
+
getThemeVar("color-info-700"),
|
|
114
|
+
getThemeVar("color-secondary-900"),
|
|
115
|
+
getThemeVar("color-secondary-700"),
|
|
116
|
+
];
|
|
117
|
+
}, [getThemeVar]);
|
|
118
|
+
const chartData = (0, react_1.useMemo)(() => {
|
|
119
|
+
if (!data)
|
|
120
|
+
return [];
|
|
121
|
+
return data.map((item, index) => (Object.assign(Object.assign({}, item), { fill: item.fill || colorValues[index % colorValues.length] })));
|
|
122
|
+
}, [colorValues, data]);
|
|
123
|
+
const chartContextValue = (0, ChartProvider_1.useChartContextValue)({ dataKey, nameKey });
|
|
124
|
+
return ((0, jsx_runtime_1.jsxs)(ChartProvider_1.default, { value: chartContextValue, children: [children, (0, jsx_runtime_1.jsx)(recharts_1.ResponsiveContainer, { style: style, width: width, height: height, children: (0, jsx_runtime_1.jsxs)(recharts_1.PieChart, { children: [(0, jsx_runtime_1.jsx)(recharts_1.Tooltip, { content: (0, jsx_runtime_1.jsx)(TooltipContent_1.TooltipContent, {}) }), (0, jsx_runtime_1.jsx)(recharts_1.Pie, { data: chartData, dataKey: dataKey, nameKey: nameKey, innerRadius: innerRadius, outerRadius: outerRadius, paddingAngle: 1, activeShape: renderActiveShape, label: showLabel ? renderCustomizedLabel : false, labelLine: showLabel, children: chartContextValue.labelList
|
|
125
|
+
? chartContextValue.labelList
|
|
126
|
+
: showLabelList && ((0, jsx_runtime_1.jsx)(recharts_1.LabelList, { position: labelListPosition, dataKey: nameKey, className: PieChartNative_module_scss_1.default.labelList, stroke: "none", fill: "currentColor", fontSize: 12 })) }), chartContextValue.legend ? chartContextValue.legend : showLegend && (0, jsx_runtime_1.jsx)(recharts_1.Legend, {})] }) })] }));
|
|
127
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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.TooltipContent = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const TooltipContent_module_scss_1 = __importDefault(require("./TooltipContent.module.scss"));
|
|
10
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
11
|
+
exports.TooltipContent = (0, react_1.forwardRef)(function ({ active, payload, indicator = "dot", hideLabel = false, label, color }, ref) {
|
|
12
|
+
if (active && payload && payload.length) {
|
|
13
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: TooltipContent_module_scss_1.default.tooltipContainer, ref: ref, children: [!hideLabel && (0, jsx_runtime_1.jsx)("p", { className: "label", children: label }), (0, jsx_runtime_1.jsx)("div", { className: TooltipContent_module_scss_1.default.gridGap, children: payload === null || payload === void 0 ? void 0 : payload.map((item, index) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const indicatorColor = color || ((_a = item.payload) === null || _a === void 0 ? void 0 : _a.fill) || item.color;
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: TooltipContent_module_scss_1.default.itemContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(TooltipContent_module_scss_1.default.indicator, {
|
|
18
|
+
[TooltipContent_module_scss_1.default.dot]: indicator === "dot",
|
|
19
|
+
[TooltipContent_module_scss_1.default.line]: indicator === "line",
|
|
20
|
+
[TooltipContent_module_scss_1.default.dashed]: indicator === "dashed",
|
|
21
|
+
[TooltipContent_module_scss_1.default.nestDashed]: nestLabel && indicator === "dashed",
|
|
22
|
+
}), style: { backgroundColor: indicatorColor, borderColor: indicatorColor } }), (0, jsx_runtime_1.jsxs)("div", { className: TooltipContent_module_scss_1.default.valueContainer, children: [(0, jsx_runtime_1.jsx)("div", { className: TooltipContent_module_scss_1.default.labelGrid, children: (0, jsx_runtime_1.jsx)("span", { className: TooltipContent_module_scss_1.default.mutedText, children: item.name }) }), item.value && ((0, jsx_runtime_1.jsx)("span", { className: TooltipContent_module_scss_1.default.valueText, children: item.value.toLocaleString() }))] })] }, index));
|
|
23
|
+
}) })] }));
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
});
|
|
27
|
+
exports.TooltipContent.displayName = "TooltipContent";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useChartContextValue = useChartContextValue;
|
|
4
|
+
exports.useChart = useChart;
|
|
5
|
+
exports.useLabelList = useLabelList;
|
|
6
|
+
exports.useLegend = useLegend;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const react_2 = require("react");
|
|
10
|
+
const ChartContext = (0, react_2.createContext)({
|
|
11
|
+
dataKey: "",
|
|
12
|
+
nameKey: "",
|
|
13
|
+
dataKeys: [],
|
|
14
|
+
labelList: null,
|
|
15
|
+
setLabelList: () => { },
|
|
16
|
+
legend: null,
|
|
17
|
+
setLegend: () => { },
|
|
18
|
+
});
|
|
19
|
+
function useChartContextValue({ dataKey = "", dataKeys = [], nameKey = "", }) {
|
|
20
|
+
const [dKey] = (0, react_1.useState)(dataKey);
|
|
21
|
+
const [dKeys] = (0, react_1.useState)(dataKeys);
|
|
22
|
+
const [nKey] = (0, react_1.useState)(nameKey);
|
|
23
|
+
const [labelList, setLabelList] = (0, react_1.useState)(null);
|
|
24
|
+
const [legend, setLegend] = (0, react_1.useState)(null);
|
|
25
|
+
return {
|
|
26
|
+
dataKey: dKey,
|
|
27
|
+
nameKey: nKey,
|
|
28
|
+
dataKeys: dKeys,
|
|
29
|
+
labelList,
|
|
30
|
+
setLabelList,
|
|
31
|
+
legend,
|
|
32
|
+
setLegend,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function useChart() {
|
|
36
|
+
const context = (0, react_2.useContext)(ChartContext);
|
|
37
|
+
if (context === undefined) {
|
|
38
|
+
throw new Error("useChart must be used within a ChartProvider");
|
|
39
|
+
}
|
|
40
|
+
return context;
|
|
41
|
+
}
|
|
42
|
+
function useLabelList() {
|
|
43
|
+
const context = (0, react_2.useContext)(ChartContext);
|
|
44
|
+
if (context === undefined) {
|
|
45
|
+
throw new Error("LabelList must be used within a chart");
|
|
46
|
+
}
|
|
47
|
+
const { setLabelList } = context;
|
|
48
|
+
return {
|
|
49
|
+
setLabelList,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function useLegend() {
|
|
53
|
+
const context = (0, react_2.useContext)(ChartContext);
|
|
54
|
+
if (context === undefined) {
|
|
55
|
+
throw new Error("Legend must be used within a chart");
|
|
56
|
+
}
|
|
57
|
+
const { setLegend } = context;
|
|
58
|
+
return {
|
|
59
|
+
setLegend,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function ChartProvider({ value, children }) {
|
|
63
|
+
return (0, jsx_runtime_1.jsx)(ChartContext.Provider, { value: value, children: children });
|
|
64
|
+
}
|
|
65
|
+
exports.default = ChartProvider;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LabelPositionValues = void 0;
|
|
4
|
+
exports.LabelPositionValues = [
|
|
5
|
+
"top",
|
|
6
|
+
"left",
|
|
7
|
+
"right",
|
|
8
|
+
"bottom",
|
|
9
|
+
"inside",
|
|
10
|
+
"outside",
|
|
11
|
+
"insideLeft",
|
|
12
|
+
"insideRight",
|
|
13
|
+
"insideTop",
|
|
14
|
+
"insideBottom",
|
|
15
|
+
"insideTopLeft",
|
|
16
|
+
"insideBottomLeft",
|
|
17
|
+
"insideTopRight",
|
|
18
|
+
"insideBottomRight",
|
|
19
|
+
"insideStart",
|
|
20
|
+
"insideEnd",
|
|
21
|
+
"end",
|
|
22
|
+
"center",
|
|
23
|
+
"centerTop",
|
|
24
|
+
"centerBottom",
|
|
25
|
+
"middle",
|
|
26
|
+
];
|
|
@@ -21,15 +21,15 @@ exports.CodeBlockMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
21
21
|
"backgroundColor-CodeBlock-header": "$color-primary-100",
|
|
22
22
|
"marginTop-CodeBlock": "$space-5",
|
|
23
23
|
"marginBottom-CodeBlock": "$space-5",
|
|
24
|
-
"backgroundColor-CodeBlock-highlightRow": "
|
|
25
|
-
"backgroundColor-CodeBlock-highlightString": "
|
|
24
|
+
"backgroundColor-CodeBlock-highlightRow": "rgb(from $color-primary-200 r g b / 0.25)",
|
|
25
|
+
"backgroundColor-CodeBlock-highlightString": "rgb(from $color-primary-200 r g b / 0.5)",
|
|
26
26
|
"borderRadius-CodeBlock": "$space-2",
|
|
27
27
|
"borderColor-CodeBlock-highlightString-emphasis": "$color-attention",
|
|
28
28
|
dark: {
|
|
29
29
|
"backgroundColor-CodeBlock-header": "$color-surface-200",
|
|
30
30
|
"backgroundColor-CodeBlock": "$color-surface-50",
|
|
31
|
-
"backgroundColor-CodeBlock-highlightRow": "
|
|
32
|
-
"backgroundColor-CodeBlock-highlightString": "
|
|
31
|
+
"backgroundColor-CodeBlock-highlightRow": "rgb(from $color-primary-300 r g b / 0.15)",
|
|
32
|
+
"backgroundColor-CodeBlock-highlightString": "rgb(from $color-primary-300 r g b / 0.5)",
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
});
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.defaultProps = void 0;
|
|
6
7
|
exports.CodeBlock = CodeBlock;
|
|
7
8
|
exports.isBrowser = isBrowser;
|
|
8
9
|
exports.decodeValue = decodeValue;
|
|
@@ -15,11 +16,14 @@ const ButtonNative_1 = require("../Button/ButtonNative");
|
|
|
15
16
|
const IconNative_1 = __importDefault(require("../Icon/IconNative"));
|
|
16
17
|
const react_hot_toast_1 = __importDefault(require("react-hot-toast"));
|
|
17
18
|
const unist_util_visit_1 = require("unist-util-visit");
|
|
19
|
+
exports.defaultProps = {
|
|
20
|
+
// No default props needed for this component currently
|
|
21
|
+
};
|
|
18
22
|
function CodeBlock({ children, meta, textToCopy, style }) {
|
|
19
23
|
if (!meta) {
|
|
20
24
|
return ((0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlock, style: style, children: (0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlockContent, children: children }) }));
|
|
21
25
|
}
|
|
22
|
-
return ((0, jsx_runtime_1.jsxs)("div", { className: CodeBlock_module_scss_1.default.codeBlock, style: style, children: [meta.filename && ((0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlockHeader, children: (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "em", children: meta.filename }) })), (0, jsx_runtime_1.jsxs)("div", { className: CodeBlock_module_scss_1.default.codeBlockContent, children: [children, (0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlockCopyButton, children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: CodeBlock_module_scss_1.default.codeBlock, style: style, children: [meta.filename && ((0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlockHeader, children: (0, jsx_runtime_1.jsx)(TextNative_1.Text, { variant: "em", children: meta.filename }) })), (0, jsx_runtime_1.jsxs)("div", { className: CodeBlock_module_scss_1.default.codeBlockContent, children: [children, (0, jsx_runtime_1.jsx)("div", { className: CodeBlock_module_scss_1.default.codeBlockCopyButton, children: (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", size: "xs", className: CodeBlock_module_scss_1.default.copyButton, icon: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "copy", "aria-hidden": true }), onClick: () => {
|
|
23
27
|
if (!textToCopy)
|
|
24
28
|
return;
|
|
25
29
|
navigator.clipboard.writeText(textToCopy);
|
|
@@ -11,17 +11,21 @@ exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
11
11
|
`column's visual properties and data bindings.`,
|
|
12
12
|
props: {
|
|
13
13
|
bindTo: {
|
|
14
|
-
description:
|
|
14
|
+
description: "Indicates the name of the current row item's property, the value of which to " +
|
|
15
|
+
"lay out in the column. If this property is not defined, the column is not sortable.",
|
|
15
16
|
valueType: "string",
|
|
16
17
|
},
|
|
17
18
|
header: {
|
|
18
|
-
description:
|
|
19
|
+
description: "This property defines a label for a particular column. If not set, the " +
|
|
20
|
+
"`bindTo` property value is used for the label.",
|
|
19
21
|
valueType: "string",
|
|
20
22
|
},
|
|
21
23
|
width: {
|
|
22
|
-
description:
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
description: "This property defines the width of the column. You can use a numeric value, a pixel " +
|
|
25
|
+
"value (such as \`100px\`), or a star size value (such as \`*\`, \`2*\`, etc.). " +
|
|
26
|
+
"You will get an error if you use any other unit (or value)." +
|
|
27
|
+
"If not defined, the component will use a width according to the column values and " +
|
|
28
|
+
"the available space.",
|
|
25
29
|
valueType: "any",
|
|
26
30
|
},
|
|
27
31
|
minWidth: {
|
|
@@ -33,15 +37,16 @@ exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
33
37
|
valueType: "any",
|
|
34
38
|
},
|
|
35
39
|
canSort: {
|
|
36
|
-
description:
|
|
37
|
-
|
|
38
|
-
defaultValue:
|
|
40
|
+
description: "This property sets whether the user can sort by a column by clicking on its header " +
|
|
41
|
+
"(\`true\`) or not (\`false\`). If the `bindTo` property is not defined, the column is not sortable.",
|
|
42
|
+
defaultValue: ColumnNative_1.defaultProps.canSort,
|
|
39
43
|
valueType: "boolean",
|
|
40
44
|
},
|
|
41
45
|
pinTo: {
|
|
42
46
|
description: `This property allows the column to be pinned to ` +
|
|
43
47
|
`the \`left\` (left-to-right writing style) or \`right\` (left-to-right writing style) edge ` +
|
|
44
|
-
|
|
48
|
+
"of the table. If the writing style is right-to-left, the locations are switched. " +
|
|
49
|
+
"If this property is not set, the column is not pinned to any edge.",
|
|
45
50
|
availableValues: ["left", "right"],
|
|
46
51
|
valueType: "string",
|
|
47
52
|
},
|
|
@@ -51,6 +56,7 @@ exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
51
56
|
`\`false\`, the column cannot be resized. Double-clicking the column border ` +
|
|
52
57
|
`resets to the original size.`,
|
|
53
58
|
valueType: "boolean",
|
|
59
|
+
defaultValue: ColumnNative_1.defaultProps.canResize,
|
|
54
60
|
},
|
|
55
61
|
},
|
|
56
62
|
contextVars: {
|
|
@@ -11,11 +11,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
return t;
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.defaultProps = void 0;
|
|
14
15
|
exports.Column = Column;
|
|
15
16
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
17
|
const react_1 = require("react");
|
|
17
18
|
const container_helpers_1 = require("../../components/container-helpers");
|
|
18
19
|
const TableContext_1 = require("./TableContext");
|
|
20
|
+
exports.defaultProps = {
|
|
21
|
+
canSort: true,
|
|
22
|
+
canResize: true,
|
|
23
|
+
};
|
|
19
24
|
function Column(_a) {
|
|
20
25
|
var { nodeChildren, renderChild } = _a, columnMetadata = __rest(_a, ["nodeChildren", "renderChild"]);
|
|
21
26
|
const id = (0, react_1.useId)();
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.ComponentRegistry = void 0;
|
|
7
4
|
exports.ComponentProvider = ComponentProvider;
|
|
@@ -98,14 +95,18 @@ const APICall_2 = require("./APICall/APICall");
|
|
|
98
95
|
const Option_1 = require("./Option/Option");
|
|
99
96
|
const AutoComplete_1 = require("./AutoComplete/AutoComplete");
|
|
100
97
|
const Backdrop_1 = require("./Backdrop/Backdrop");
|
|
101
|
-
// @ts-ignore
|
|
102
|
-
const xmlui_charts_1 = __importDefault(require("xmlui-charts"));
|
|
103
98
|
const HtmlTags_1 = require("./HtmlTags/HtmlTags");
|
|
104
99
|
const ColorPicker_1 = require("./ColorPicker/ColorPicker");
|
|
105
100
|
const RadioItem_1 = require("./RadioGroup/RadioItem");
|
|
106
101
|
const InspectButton_1 = require("./InspectButton/InspectButton");
|
|
107
102
|
const NestedApp_1 = require("./NestedApp/NestedApp");
|
|
108
103
|
const CodeBlock_1 = require("./CodeBlock/CodeBlock");
|
|
104
|
+
const BarChart_1 = require("./Charts/BarChart/BarChart");
|
|
105
|
+
const DonutChart_1 = require("./Charts/DonutChart/DonutChart");
|
|
106
|
+
const LabelList_1 = require("./Charts/LabelList/LabelList");
|
|
107
|
+
const Legend_1 = require("./Charts/Legend/Legend");
|
|
108
|
+
const LineChart_1 = require("./Charts/LineChart/LineChart");
|
|
109
|
+
const PieChart_1 = require("./Charts/PieChart/PieChart");
|
|
109
110
|
/**
|
|
110
111
|
* The framework has a specialized component concept, the "property holder
|
|
111
112
|
* component." These components only hold property values but do not render
|
|
@@ -358,7 +359,12 @@ class ComponentRegistry {
|
|
|
358
359
|
this.registerCoreComponent(Markdown_1.markdownComponentRenderer);
|
|
359
360
|
}
|
|
360
361
|
if (process.env.VITE_USED_COMPONENTS_Charts !== "false") {
|
|
361
|
-
this.
|
|
362
|
+
this.registerCoreComponent(BarChart_1.barChartComponentRenderer);
|
|
363
|
+
this.registerCoreComponent(DonutChart_1.donutChartComponentRenderer);
|
|
364
|
+
this.registerCoreComponent(LabelList_1.labelListComponentRenderer);
|
|
365
|
+
this.registerCoreComponent(Legend_1.legendComponentRenderer);
|
|
366
|
+
this.registerCoreComponent(LineChart_1.lineChartComponentRenderer);
|
|
367
|
+
this.registerCoreComponent(PieChart_1.pieChartComponentRenderer);
|
|
362
368
|
}
|
|
363
369
|
if (process.env.VITE_INCLUDE_REST_COMPONENTS !== "false") {
|
|
364
370
|
//TODO, if it proves to be a working solution, make these components skippable, too
|
|
@@ -18,8 +18,9 @@ exports.ContentSeparatorMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
`helping to improve readability and organization.`,
|
|
19
19
|
props: {
|
|
20
20
|
size: {
|
|
21
|
-
description:
|
|
22
|
-
|
|
21
|
+
description: "This property defines the component's height (if the \`orientation\` is horizontal) " +
|
|
22
|
+
"or the width (if the \`orientation\` is vertical). " +
|
|
23
|
+
"If not defined, the component uses the entire available width or height.",
|
|
23
24
|
valueType: "any",
|
|
24
25
|
},
|
|
25
26
|
orientation: {
|
|
@@ -31,7 +32,7 @@ exports.ContentSeparatorMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
31
32
|
},
|
|
32
33
|
themeVars: (0, themeVars_1.parseScssVar)(ContentSeparator_module_scss_1.default.themeVars),
|
|
33
34
|
defaultThemeVars: {
|
|
34
|
-
[`backgroundColor-${COMP}`]: "$
|
|
35
|
+
[`backgroundColor-${COMP}`]: "$color-surface-200",
|
|
35
36
|
[`size-${COMP}`]: "1px",
|
|
36
37
|
light: {
|
|
37
38
|
// --- No light-specific theme vars
|
|
@@ -79,15 +79,17 @@ exports.DatePickerMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
79
79
|
],
|
|
80
80
|
},
|
|
81
81
|
minValue: {
|
|
82
|
-
description: "The start date of the range
|
|
82
|
+
description: "The optional start date of the selectable date range. If not defined, the range " +
|
|
83
|
+
"allows any dates in the past.",
|
|
83
84
|
valueType: "string",
|
|
84
85
|
},
|
|
85
86
|
maxValue: {
|
|
86
|
-
description: "The end date of the range
|
|
87
|
+
description: "The optional end date of the selectable date range. If not defined, the range allows " +
|
|
88
|
+
"any future dates.",
|
|
87
89
|
valueType: "string",
|
|
88
90
|
},
|
|
89
91
|
disabledDates: {
|
|
90
|
-
description: "An array of dates that are disabled",
|
|
92
|
+
description: "An optional array of dates that are disabled",
|
|
91
93
|
valueType: "any",
|
|
92
94
|
},
|
|
93
95
|
inline: {
|
|
@@ -13,7 +13,7 @@ exports.EmojiSelectorMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
13
13
|
description: `The \`${COMP}\` component provides users with a graphical interface to browse, search and ` +
|
|
14
14
|
`select emojis to insert into text fields, messages, or other forms of communication.`,
|
|
15
15
|
props: {
|
|
16
|
-
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
16
|
+
autoFocus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dAutoFocus)()), { defaultValue: EmojiSelectorNative_1.defaultProps.autoFocus }),
|
|
17
17
|
},
|
|
18
18
|
events: {
|
|
19
19
|
select: (0, ComponentDefs_1.d)(`This event is fired when the user selects an emoticon from this component.`),
|
|
@@ -42,11 +42,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
42
42
|
});
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.EmojiSelector = void 0;
|
|
45
|
+
exports.EmojiSelector = exports.defaultProps = void 0;
|
|
46
46
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
47
47
|
const emoji_picker_react_1 = __importStar(require("emoji-picker-react"));
|
|
48
48
|
const constants_1 = require("../../components-core/constants");
|
|
49
|
-
|
|
49
|
+
exports.defaultProps = {
|
|
50
|
+
theme: emoji_picker_react_1.Theme.LIGHT,
|
|
51
|
+
select: constants_1.noop,
|
|
52
|
+
autoFocus: false,
|
|
53
|
+
};
|
|
54
|
+
const EmojiSelector = ({ select = exports.defaultProps.select, theme = exports.defaultProps.theme, autoFocus = exports.defaultProps.autoFocus, }) => ((0, jsx_runtime_1.jsx)(emoji_picker_react_1.default, { autoFocusSearch: autoFocus, onEmojiClick: (emojiObject) => __awaiter(void 0, void 0, void 0, function* () {
|
|
50
55
|
yield select(emojiObject.emoji);
|
|
51
56
|
}), lazyLoadEmojis: true, theme: theme, previewConfig: { showPreview: false }, skinTonesDisabled: true, height: 360, emojiStyle: emoji_picker_react_1.EmojiStyle.NATIVE }));
|
|
52
57
|
exports.EmojiSelector = EmojiSelector;
|
|
@@ -35,17 +35,16 @@ exports.FileInputMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
35
35
|
buttonLabel: (0, ComponentDefs_1.d)(`This property is an optional string to set a label for the button part.`),
|
|
36
36
|
buttonIcon: (0, ComponentDefs_1.d)(`The ID of the icon to display in the button. You can change the default icon for all ${COMP} ` +
|
|
37
37
|
`instances with the "icon.browse:FileInput" declaration in the app configuration file.`),
|
|
38
|
-
buttonIconPosition: (0, ComponentDefs_1.d)(`This optional string determines the location of the button icon.`, abstractions_1.iconPositionNames),
|
|
39
|
-
acceptsFileType: (0, ComponentDefs_1.d)(`
|
|
40
|
-
multiple: (0, ComponentDefs_1.d)(`This boolean property enables to add not just one (\`false\`), but multiple files to the field ` +
|
|
38
|
+
buttonIconPosition: (0, ComponentDefs_1.d)(`This optional string determines the location of the button icon.`, abstractions_1.iconPositionNames, "string", "start"),
|
|
39
|
+
acceptsFileType: (0, ComponentDefs_1.d)(`An optional list of file types the input controls accepts provided as a string array.`),
|
|
40
|
+
multiple: Object.assign(Object.assign({}, (0, ComponentDefs_1.d)(`This boolean property enables to add not just one (\`false\`), but multiple files to the field ` +
|
|
41
41
|
`(\`true\`). This is done either by dragging onto the field or by selecting multiple files ` +
|
|
42
|
-
`in the browser menu after clicking the input field button.`, null, "boolean",
|
|
43
|
-
directory: (0, ComponentDefs_1.d)(`This boolean property indicates whether the component allows selecting directories (\`true\`) ` +
|
|
44
|
-
`or files only (\`false\`).`, null, "boolean",
|
|
45
|
-
buttonPosition: (0, ComponentDefs_1.d)(`This property determines the position of the button relative to the input field.
|
|
46
|
-
`The default is "end".`, ["start", "end"]),
|
|
42
|
+
`in the browser menu after clicking the input field button.`, null, "boolean")), { defaultValue: FileInputNative_1.defaultProps.multiple }),
|
|
43
|
+
directory: Object.assign(Object.assign({}, (0, ComponentDefs_1.d)(`This boolean property indicates whether the component allows selecting directories (\`true\`) ` +
|
|
44
|
+
`or files only (\`false\`).`, null, "boolean")), { defaultValue: FileInputNative_1.defaultProps.directory }),
|
|
45
|
+
buttonPosition: Object.assign(Object.assign({}, (0, ComponentDefs_1.d)(`This property determines the position of the button relative to the input field.`, ["start", "end"])), { defaultValue: FileInputNative_1.defaultProps.buttonPosition }),
|
|
47
46
|
buttonSize: (0, ComponentDefs_1.d)("The size of the button (small, medium, large)", abstractions_1.sizeMd),
|
|
48
|
-
buttonThemeColor: (0, ComponentDefs_1.d)("The button color scheme (primary, secondary, attention)", abstractions_1.buttonThemeNames),
|
|
47
|
+
buttonThemeColor: (0, ComponentDefs_1.d)("The button color scheme (primary, secondary, attention)", abstractions_1.buttonThemeNames, "string", FileInputNative_1.defaultProps.buttonThemeColor),
|
|
49
48
|
},
|
|
50
49
|
events: {
|
|
51
50
|
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.FileInput = void 0;
|
|
39
|
+
exports.FileInput = exports.defaultProps = void 0;
|
|
40
40
|
exports.isFile = isFile;
|
|
41
41
|
exports.isFileArray = isFileArray;
|
|
42
42
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
@@ -52,7 +52,19 @@ const TextBoxNative_1 = require("../TextBox/TextBoxNative");
|
|
|
52
52
|
const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
|
|
53
53
|
// https://github.com/react-dropzone/react-dropzone/issues/1259
|
|
54
54
|
const { useDropzone } = dropzone;
|
|
55
|
-
|
|
55
|
+
exports.defaultProps = {
|
|
56
|
+
enabled: true,
|
|
57
|
+
buttonPosition: "end",
|
|
58
|
+
buttonLabel: "Browse",
|
|
59
|
+
multiple: false,
|
|
60
|
+
directory: false,
|
|
61
|
+
buttonThemeColor: "primary",
|
|
62
|
+
updateState: constants_1.noop,
|
|
63
|
+
onDidChange: constants_1.noop,
|
|
64
|
+
onFocus: constants_1.noop,
|
|
65
|
+
onBlur: constants_1.noop,
|
|
66
|
+
};
|
|
67
|
+
const FileInput = ({ id, enabled = exports.defaultProps.enabled, style, placeholder, buttonPosition = exports.defaultProps.buttonPosition, buttonLabel = exports.defaultProps.buttonLabel, buttonIcon, buttonIconPosition, variant, buttonThemeColor, buttonSize, autoFocus, validationStatus, updateState = exports.defaultProps.updateState, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, registerComponentApi, value, initialValue, acceptsFileType, multiple = exports.defaultProps.multiple, directory = exports.defaultProps.directory, label, labelPosition, labelWidth, labelBreak, required, }) => {
|
|
56
68
|
// Don't accept any (initial) value if it is not a File array explicitly
|
|
57
69
|
const _initialValue = isFileArray(initialValue) ? initialValue : undefined;
|
|
58
70
|
const _value = isFileArray(value) ? value : undefined;
|
|
@@ -18,7 +18,7 @@ exports.FileUploadDropZoneMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
text: {
|
|
19
19
|
description: "With this property, you can change the default text to display when files " +
|
|
20
20
|
"are dragged over the drop zone.",
|
|
21
|
-
defaultValue:
|
|
21
|
+
defaultValue: FileUploadDropZoneNative_1.defaultProps.text,
|
|
22
22
|
type: "string",
|
|
23
23
|
},
|
|
24
24
|
allowPaste: {
|
|
@@ -26,7 +26,7 @@ exports.FileUploadDropZoneMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
26
26
|
"clipboard (\`true\`) or " +
|
|
27
27
|
"only dragged files (\`false\`).",
|
|
28
28
|
type: "boolean",
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: FileUploadDropZoneNative_1.defaultProps.allowPaste,
|
|
30
30
|
},
|
|
31
31
|
enabled: (0, ComponentDefs_1.d)(`If set to \`false\`, the drop zone will be disabled and users will not be able to upload files.`, null, "boolean", true),
|
|
32
32
|
},
|
|
@@ -45,7 +45,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
45
45
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.FileUploadDropZone = void 0;
|
|
48
|
+
exports.FileUploadDropZone = exports.defaultProps = void 0;
|
|
49
49
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
50
50
|
const react_1 = require("react");
|
|
51
51
|
const dropzone = __importStar(require("react-dropzone"));
|
|
@@ -55,7 +55,14 @@ const constants_1 = require("../../components-core/constants");
|
|
|
55
55
|
const IconNative_1 = require("../Icon/IconNative");
|
|
56
56
|
// https://github.com/react-dropzone/react-dropzone/issues/1259
|
|
57
57
|
const { useDropzone } = dropzone;
|
|
58
|
-
exports.
|
|
58
|
+
exports.defaultProps = {
|
|
59
|
+
onUpload: constants_1.asyncNoop,
|
|
60
|
+
uid: "fileUploadDialog",
|
|
61
|
+
allowPaste: true,
|
|
62
|
+
text: "Drop files here",
|
|
63
|
+
disabled: false,
|
|
64
|
+
};
|
|
65
|
+
exports.FileUploadDropZone = (0, react_1.forwardRef)(function FileUploadDropZone({ children, onUpload = exports.defaultProps.onUpload, uid = exports.defaultProps.uid, registerComponentApi, style, allowPaste = exports.defaultProps.allowPaste, text = exports.defaultProps.text, disabled = exports.defaultProps.disabled, }, forwardedRef) {
|
|
59
66
|
const onDrop = (0, react_1.useCallback)((acceptedFiles) => __awaiter(this, void 0, void 0, function* () {
|
|
60
67
|
if (!acceptedFiles.length) {
|
|
61
68
|
return;
|
|
@@ -23,6 +23,7 @@ exports.FooterMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
23
23
|
[`maxWidth-content-${COMP}`]: "$maxWidth-content",
|
|
24
24
|
[`borderTop-${COMP}`]: `1px solid $borderColor`,
|
|
25
25
|
[`padding-${COMP}`]: "$space-2 $space-4",
|
|
26
|
+
[`gap-${COMP}`]: "$space-normal",
|
|
26
27
|
light: {
|
|
27
28
|
// --- No light-specific theme vars
|
|
28
29
|
},
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.Footer = void 0;
|
|
6
|
+
exports.Footer = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const classnames_1 = __importDefault(require("classnames"));
|
|
@@ -11,6 +11,9 @@ const Footer_module_scss_1 = __importDefault(require("./Footer.module.scss"));
|
|
|
11
11
|
const AppLayoutContext_1 = require("../App/AppLayoutContext");
|
|
12
12
|
// =====================================================================================================================
|
|
13
13
|
// React Footer component implementation
|
|
14
|
+
exports.defaultProps = {
|
|
15
|
+
// No default props needed currently, but adding object for consistency
|
|
16
|
+
};
|
|
14
17
|
exports.Footer = (0, react_1.forwardRef)(function Footer({ children, style, className, }, forwardedRef) {
|
|
15
18
|
const { layout } = (0, AppLayoutContext_1.useAppLayoutContext)() || {};
|
|
16
19
|
const canRestrictContentWidth = layout !== "vertical-full-header";
|