xmlui 0.9.50 → 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-B6XqwxPF.mjs → apiInterceptorWorker-OagsYDXz.mjs} +3 -3
- package/dist/lib/{index-BpQ3DEFQ.mjs → index-BnpxPPve.mjs} +14387 -13003
- 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-D4BcRpEl.mjs → server-common-C0cF2UTg.mjs} +4542 -4326
- 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 -18371
- package/dist/metadata/xmlui-metadata.umd.js +547 -10
- package/dist/scripts/package.json +5 -7
- 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 +25 -10
- 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/FormItem/Validations.js +49 -33
- 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 +24 -76
- 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 +7 -0
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -3
- 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 -12
- 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 -7
|
@@ -31,7 +31,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
31
31
|
isPaginated: {
|
|
32
32
|
description: `This property adds pagination controls to the \`${COMP}\`.`,
|
|
33
33
|
valueType: "boolean",
|
|
34
|
-
defaultValue:
|
|
34
|
+
defaultValue: TableNative_1.defaultProps.isPaginated,
|
|
35
35
|
},
|
|
36
36
|
loading: (0, ComponentDefs_1.d)(`This boolean property indicates if the component is fetching (or processing) data. This ` +
|
|
37
37
|
`property is useful when data is loaded conditionally or receiving it takes some time.`),
|
|
@@ -45,22 +45,24 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
45
45
|
`row should be disabled. The function retrieves the item to display and should return ` +
|
|
46
46
|
`a Boolean-like value.`),
|
|
47
47
|
noDataTemplate: (0, metadata_helpers_1.dComponent)(`A property to customize what to display if the table does not contain any data.`),
|
|
48
|
-
sortBy: (0, ComponentDefs_1.d)(
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
sortBy: (0, ComponentDefs_1.d)("This property is used to determine which data property to sort by. If not defined, " +
|
|
49
|
+
"the data is not sorted"),
|
|
50
|
+
sortDirection: (0, ComponentDefs_1.d)("This property determines the sort order to be \`ascending\` or \`descending\`. This " +
|
|
51
|
+
"property only works if the [\`sortBy\`](#sortby) property is also set. By default " +
|
|
52
|
+
"ascending order is used."),
|
|
51
53
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
52
54
|
hideHeader: {
|
|
53
55
|
description: "Set the header visibility using this property. Set it to \`true\` to hide the header.",
|
|
54
56
|
valueType: "boolean",
|
|
55
|
-
defaultValue:
|
|
57
|
+
defaultValue: TableNative_1.defaultProps.hideHeader,
|
|
56
58
|
},
|
|
57
|
-
iconNoSort: (0, ComponentDefs_1.d)(`Allows setting
|
|
59
|
+
iconNoSort: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is ` +
|
|
58
60
|
`enabled, but the column remains unsorted. You can change the default icon for all ${COMP} ` +
|
|
59
61
|
`instances with the "icon.nosort:Table" declaration in the app configuration file.`),
|
|
60
|
-
iconSortAsc: (0, ComponentDefs_1.d)(`Allows setting
|
|
62
|
+
iconSortAsc: (0, ComponentDefs_1.d)(`Allows setting an alernate icon displayed in the ${COMP} column header when sorting is enabled, ` +
|
|
61
63
|
`and the column is sorted in ascending order. You can change the default icon for all ${COMP} ` +
|
|
62
64
|
`instances with the "icon.sortasc:Table" declaration in the app configuration file.`),
|
|
63
|
-
iconSortDesc: (0, ComponentDefs_1.d)(`Allows setting
|
|
65
|
+
iconSortDesc: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} column header when sorting is enabled, ` +
|
|
64
66
|
`and the column is sorted in descending order. You can change the default icon for all ${COMP} ` +
|
|
65
67
|
`instances with the "icon.sortdesc:Table" declaration in the app configuration file.`),
|
|
66
68
|
enableMultiRowSelection: {
|
|
@@ -68,7 +70,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
68
70
|
`This property only has an effect when the rowsSelectable property is set. Setting it ` +
|
|
69
71
|
`to \`false\` limits selection to a single row.`,
|
|
70
72
|
valueType: "boolean",
|
|
71
|
-
defaultValue:
|
|
73
|
+
defaultValue: TableNative_1.defaultProps.enableMultiRowSelection,
|
|
72
74
|
},
|
|
73
75
|
alwaysShowSelectionHeader: {
|
|
74
76
|
description: "This property indicates when the row selection header is displayed. When the value is " +
|
|
@@ -82,7 +84,7 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
82
84
|
`\`true\`, the table does not have a bottom border. Otherwise, it has a bottom border.`,
|
|
83
85
|
valueType: "boolean",
|
|
84
86
|
defaultValue: false,
|
|
85
|
-
}
|
|
87
|
+
},
|
|
86
88
|
},
|
|
87
89
|
events: {
|
|
88
90
|
sortingDidChange: (0, ComponentDefs_1.d)(`This event is fired when the table data sorting has changed. It has two arguments: ` +
|
|
@@ -106,11 +108,10 @@ exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
106
108
|
},
|
|
107
109
|
themeVars: (0, themeVars_1.parseScssVar)(Table_module_scss_1.default.themeVars),
|
|
108
110
|
defaultThemeVars: {
|
|
109
|
-
[`padding-heading-${COMP}`]: `$space-2`,
|
|
110
|
-
[`
|
|
111
|
+
[`padding-heading-${COMP}`]: `$space-2 $space-0 $space-2 $space-2`,
|
|
112
|
+
[`padding-cell-${COMP}`]: "$space-2 $space-0 $space-2 $space-2",
|
|
111
113
|
[`paddingHorizontal-cell-first-${COMP}`]: "$space-5",
|
|
112
|
-
[`paddingHorizontal-cell-last-${COMP}`]: "$space-
|
|
113
|
-
[`paddingVertical-cell-${COMP}`]: "$space-2",
|
|
114
|
+
[`paddingHorizontal-cell-last-${COMP}`]: "$space-0",
|
|
114
115
|
[`border-cell-${COMP}`]: "1px solid $borderColor",
|
|
115
116
|
[`outlineWidth-heading-${COMP}--focus`]: "$outlineWidth--focus",
|
|
116
117
|
[`outlineStyle-heading-${COMP}--focus`]: "$outlineStyle--focus",
|
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Table = void 0;
|
|
26
|
+
exports.defaultProps = exports.Table = void 0;
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = require("react");
|
|
29
29
|
const react_dom_1 = require("react-dom");
|
|
@@ -73,7 +73,7 @@ const getCommonPinningStyles = (column) => {
|
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
75
|
// eslint-disable-next-line react/display-name
|
|
76
|
-
exports.Table = (0, react_1.forwardRef)(({ data =
|
|
76
|
+
exports.Table = (0, react_1.forwardRef)(({ data = exports.defaultProps.data, columns = exports.defaultProps.columns, isPaginated = exports.defaultProps.isPaginated, loading = exports.defaultProps.loading, headerHeight, rowsSelectable = exports.defaultProps.rowsSelectable, enableMultiRowSelection = exports.defaultProps.enableMultiRowSelection, pageSizes = exports.defaultProps.pageSizes, rowDisabledPredicate = defaultIsRowDisabled, sortBy, sortingDirection = exports.defaultProps.sortingDirection, iconSortAsc, iconSortDesc, iconNoSort, sortingDidChange, willSort, style, noDataRenderer, autoFocus = exports.defaultProps.autoFocus, hideHeader = exports.defaultProps.hideHeader, hideNoDataView = exports.defaultProps.hideNoDataView, alwaysShowSelectionHeader = exports.defaultProps.alwaysShowSelectionHeader, registerComponentApi, onSelectionDidChange, noBottomBorder = exports.defaultProps.noBottomBorder,
|
|
77
77
|
// cols
|
|
78
78
|
}, forwardedRef) => {
|
|
79
79
|
var _a, _b, _c, _d;
|
|
@@ -162,7 +162,7 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
|
|
|
162
162
|
const { width, starSizedWidth } = getColumnWidth(col.width, true, "width");
|
|
163
163
|
const { width: minWidth } = getColumnWidth(col.minWidth, false, "minWidth");
|
|
164
164
|
const { width: maxWidth } = getColumnWidth(col.maxWidth, false, "maxWidth");
|
|
165
|
-
const customColumn = Object.assign(Object.assign({}, col), { header: (_b = (_a = col.header) !== null && _a !== void 0 ? _a : col.accessorKey) !== null && _b !== void 0 ? _b : " ", id: "col_" + idx, size: width, minSize: minWidth, maxSize: maxWidth, enableResizing: col.canResize, enableSorting: col.canSort, enablePinning: col.pinTo !== undefined, meta: {
|
|
165
|
+
const customColumn = Object.assign(Object.assign({}, col), { header: (_b = (_a = col.header) !== null && _a !== void 0 ? _a : col.accessorKey) !== null && _b !== void 0 ? _b : " ", id: "col_" + idx, size: width, minSize: minWidth, maxSize: maxWidth, enableResizing: col.canResize, enableSorting: col.canSort && !!col.accessorKey, enablePinning: col.pinTo !== undefined, meta: {
|
|
166
166
|
starSizedWidth,
|
|
167
167
|
pinTo: col.pinTo,
|
|
168
168
|
style: col.style,
|
|
@@ -384,10 +384,11 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
|
|
|
384
384
|
return ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(Table_module_scss_1.default.wrapper, { [Table_module_scss_1.default.noScroll]: hasOutsideScroll }), tabIndex: -1, onKeyDown: onKeyDown, ref: ref, style: style, children: [(0, jsx_runtime_1.jsxs)("table", { className: Table_module_scss_1.default.table, ref: tableRef, style: { borderRight: "1px solid transparent" }, children: [!hideHeader && ((0, jsx_runtime_1.jsx)("thead", { style: { height: headerHeight }, className: Table_module_scss_1.default.headerWrapper, children: table.getHeaderGroups().map((headerGroup, headerGroupIndex) => ((0, jsx_runtime_1.jsx)("tr", { className: (0, classnames_1.default)(Table_module_scss_1.default.headerRow, {
|
|
385
385
|
[Table_module_scss_1.default.allSelected]: table.getIsAllRowsSelected(),
|
|
386
386
|
}), children: headerGroup.headers.map((header, headerIndex) => {
|
|
387
|
-
var _a, _b;
|
|
388
|
-
const
|
|
387
|
+
var _a, _b, _c;
|
|
388
|
+
const _d = ((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.style) || {}, { width } = _d, style = __rest(_d, ["width"]);
|
|
389
389
|
const size = header.getSize();
|
|
390
|
-
return ((0, jsx_runtime_1.jsxs)("th", { className: Table_module_scss_1.default.columnCell, colSpan: header.colSpan, style: Object.assign({ position: "relative", width: size }, getCommonPinningStyles(header.column)), children: [(0, jsx_runtime_1.jsx)(ClickableHeader, { hasSorting: header.column.columnDef.enableSorting
|
|
390
|
+
return ((0, jsx_runtime_1.jsxs)("th", { className: Table_module_scss_1.default.columnCell, colSpan: header.colSpan, style: Object.assign({ position: "relative", width: size }, getCommonPinningStyles(header.column)), children: [(0, jsx_runtime_1.jsx)(ClickableHeader, { hasSorting: header.column.columnDef.enableSorting &&
|
|
391
|
+
!!((_b = header.column.columnDef.meta) === null || _b === void 0 ? void 0 : _b.accessorKey), updateSorting: () => { var _a; return _updateSorting((_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.accessorKey); }, children: (0, jsx_runtime_1.jsxs)("div", { className: Table_module_scss_1.default.headerContent, style: style, children: [(0, react_table_1.flexRender)(header.column.columnDef.header, header.getContext()), header.column.columnDef.enableSorting && ((0, jsx_runtime_1.jsx)("span", { style: { display: "inline-flex", maxWidth: 16 }, children: (0, jsx_runtime_1.jsx)(ColumnOrderingIndicator, { iconSortAsc: iconSortAsc, iconSortDesc: iconSortDesc, iconNoSort: iconNoSort, direction: ((_c = header.column.columnDef.meta) === null || _c === void 0 ? void 0 : _c.accessorKey) === _sortBy
|
|
391
392
|
? _sortingDirection
|
|
392
393
|
: undefined }) }))] }) }), header.column.getCanResize() && ((0, jsx_runtime_1.jsx)("div", { onDoubleClick: () => {
|
|
393
394
|
touchedSizesRef.current[header.column.id] = false;
|
|
@@ -437,9 +438,9 @@ exports.Table = (0, react_1.forwardRef)(({ data = constants_1.EMPTY_ARRAY, colum
|
|
|
437
438
|
const size = cell.column.getSize();
|
|
438
439
|
return ((0, jsx_runtime_1.jsx)("td", { className: Table_module_scss_1.default.cell, style: Object.assign({
|
|
439
440
|
// width: size,
|
|
440
|
-
width: size }, getCommonPinningStyles(cell.column)), children: cellRenderer
|
|
441
|
-
|
|
442
|
-
|
|
441
|
+
width: size }, getCommonPinningStyles(cell.column)), children: (0, jsx_runtime_1.jsx)("div", { className: Table_module_scss_1.default.cellContent, children: cellRenderer
|
|
442
|
+
? cellRenderer(cell.row.original, rowIndex, i, cell === null || cell === void 0 ? void 0 : cell.getValue())
|
|
443
|
+
: (0, react_table_1.flexRender)(cell.column.columnDef.cell, cell.getContext()) }) }, `${cell.id}-${i}`));
|
|
443
444
|
}) }, `${row.id}-${rowIndex}`));
|
|
444
445
|
}), paddingBottom > 0 && ((0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)("td", { style: { height: `${paddingBottom}px` } }) }))] }))] }), loading && !hasData && ((0, jsx_runtime_1.jsx)("div", { className: Table_module_scss_1.default.loadingWrapper, children: (0, jsx_runtime_1.jsx)(SpinnerNative_1.Spinner, {}) })), !hideNoDataView &&
|
|
445
446
|
!loading &&
|
|
@@ -462,3 +463,18 @@ function ColumnOrderingIndicator({ direction, iconSortAsc = "sortasc:Table", ico
|
|
|
462
463
|
}
|
|
463
464
|
return iconNoSort !== "-" ? ((0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: iconNoSort, fallback: "nosort", size: "12" })) : ((0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: iconNoSort, size: "12" })); //nosort
|
|
464
465
|
}
|
|
466
|
+
exports.defaultProps = {
|
|
467
|
+
data: constants_1.EMPTY_ARRAY,
|
|
468
|
+
columns: constants_1.EMPTY_ARRAY,
|
|
469
|
+
isPaginated: false,
|
|
470
|
+
loading: false,
|
|
471
|
+
rowsSelectable: false,
|
|
472
|
+
enableMultiRowSelection: true,
|
|
473
|
+
pageSizes: [10],
|
|
474
|
+
sortingDirection: "ascending",
|
|
475
|
+
autoFocus: false,
|
|
476
|
+
hideHeader: false,
|
|
477
|
+
hideNoDataView: false,
|
|
478
|
+
alwaysShowSelectionHeader: false,
|
|
479
|
+
noBottomBorder: false,
|
|
480
|
+
};
|
|
@@ -23,14 +23,14 @@ exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
23
23
|
description: `This property indicates that smooth scrolling is used while scrolling the selected table ` +
|
|
24
24
|
`of contents items into view.`,
|
|
25
25
|
valueType: "boolean",
|
|
26
|
-
defaultValue:
|
|
26
|
+
defaultValue: TableOfContentsNative_1.defaultProps.smoothScrolling,
|
|
27
27
|
},
|
|
28
28
|
maxHeadingLevel: {
|
|
29
29
|
description: "Defines the maximum heading level (1 to 6) to include in the table of contents. " +
|
|
30
30
|
"For example, if it is 2, then `H1` and `H2` are displayed, but lower levels " +
|
|
31
31
|
"(`H3` to `H6`) are not.",
|
|
32
32
|
valueType: "number",
|
|
33
|
-
defaultValue:
|
|
33
|
+
defaultValue: TableOfContentsNative_1.defaultProps.maxHeadingLevel,
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
themeVars: (0, themeVars_1.parseScssVar)(TableOfContents_module_scss_1.default.themeVars),
|
|
@@ -41,8 +41,17 @@ exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
41
41
|
[`fontSize-${COMP_CHILD}`]: "$fontSize-small",
|
|
42
42
|
[`wordWrap-${COMP_CHILD}`]: "break-word",
|
|
43
43
|
[`paddingVertical-${COMP_CHILD}`]: "$space-1",
|
|
44
|
-
[`
|
|
44
|
+
[`paddingLeft-${COMP_CHILD}`]: "$space-1",
|
|
45
|
+
[`paddingLeft-${COMP_CHILD}-level-2`]: "$space-3",
|
|
46
|
+
[`paddingLeft-${COMP_CHILD}-level-3`]: "$space-5",
|
|
47
|
+
[`paddingLeft-${COMP_CHILD}-level-4`]: "$space-6",
|
|
48
|
+
[`paddingLeft-${COMP_CHILD}-level-5`]: "$space-6",
|
|
49
|
+
[`paddingLeft-${COMP_CHILD}-level-6`]: "$space-6",
|
|
45
50
|
[`fontWeight-${COMP_CHILD}`]: "$fontWeight-bold",
|
|
51
|
+
[`fontWeight-${COMP_CHILD}-level-3`]: "normal",
|
|
52
|
+
[`fontWeight-${COMP_CHILD}-level-4`]: "normal",
|
|
53
|
+
[`fontWeight-${COMP_CHILD}-level-5`]: "normal",
|
|
54
|
+
[`fontWeight-${COMP_CHILD}-level-6`]: "normal",
|
|
46
55
|
[`fontStyle-${COMP_CHILD}-level-6`]: "italic",
|
|
47
56
|
[`color-${COMP_CHILD}--active`]: "$color-primary-500",
|
|
48
57
|
},
|
|
@@ -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.TableOfContents = void 0;
|
|
6
|
+
exports.TableOfContents = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const react_2 = require("@remix-run/react");
|
|
@@ -13,7 +13,11 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
13
13
|
const TableOfContents_module_scss_1 = __importDefault(require("./TableOfContents.module.scss"));
|
|
14
14
|
const TableOfContentsContext_1 = require("../../components-core/TableOfContentsContext");
|
|
15
15
|
const hooks_1 = require("../../components-core/utils/hooks");
|
|
16
|
-
exports.
|
|
16
|
+
exports.defaultProps = {
|
|
17
|
+
smoothScrolling: false,
|
|
18
|
+
maxHeadingLevel: 6,
|
|
19
|
+
};
|
|
20
|
+
exports.TableOfContents = (0, react_1.forwardRef)(function TableOfContents({ style, smoothScrolling = exports.defaultProps.smoothScrolling, maxHeadingLevel = exports.defaultProps.maxHeadingLevel }, forwardedRef) {
|
|
17
21
|
const tocRef = (0, react_1.useRef)(null);
|
|
18
22
|
const { headings, scrollToAnchor, subscribeToActiveAnchorChange, activeAnchorId: initialActiveAnchorId } = (0, TableOfContentsContext_1.useTableOfContents)();
|
|
19
23
|
const [activeAnchorId, setActiveId] = (0, react_1.useState)(initialActiveAnchorId);
|
|
@@ -18,13 +18,13 @@ exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
18
18
|
description: `The \`${COMP}\` component provides a tabbed layout where each tab has a clickable label and content.`,
|
|
19
19
|
props: {
|
|
20
20
|
activeTab: (0, ComponentDefs_1.d)(`This property indicates the index of the active tab. The indexing starts from 0, ` +
|
|
21
|
-
`representing the starting (leftmost) tab.`),
|
|
21
|
+
`representing the starting (leftmost) tab. If not set, the first tab is selected by default.`),
|
|
22
22
|
orientation: {
|
|
23
23
|
description: `This property indicates the orientation of the component. In horizontal orientation, ` +
|
|
24
24
|
`the tab sections are laid out on the left side of the content panel, while in vertical ` +
|
|
25
25
|
`orientation, the buttons are at the top.`,
|
|
26
26
|
availableValues: ["horizontal", "vertical"],
|
|
27
|
-
defaultValue:
|
|
27
|
+
defaultValue: TabsNative_1.defaultProps.orientation,
|
|
28
28
|
valueType: "string",
|
|
29
29
|
},
|
|
30
30
|
tabTemplate: (0, metadata_helpers_1.dComponent)(`This property declares the template for the clickable tab area.`),
|
|
@@ -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.Tabs = void 0;
|
|
39
|
+
exports.Tabs = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = require("react");
|
|
42
42
|
const RTabs = __importStar(require("@radix-ui/react-tabs"));
|
|
@@ -44,7 +44,12 @@ const Tabs_module_scss_1 = __importDefault(require("./Tabs.module.scss"));
|
|
|
44
44
|
const misc_1 = require("../../components-core/utils/misc");
|
|
45
45
|
const TabContext_1 = require("../Tabs/TabContext");
|
|
46
46
|
const classnames_1 = __importDefault(require("classnames"));
|
|
47
|
-
exports.
|
|
47
|
+
exports.defaultProps = {
|
|
48
|
+
activeTab: 0,
|
|
49
|
+
orientation: "horizontal",
|
|
50
|
+
distributeEvenly: false,
|
|
51
|
+
};
|
|
52
|
+
exports.Tabs = (0, react_1.forwardRef)(function Tabs({ activeTab = exports.defaultProps.activeTab, orientation = exports.defaultProps.orientation, tabRenderer, style, children, registerComponentApi, className, distributeEvenly = exports.defaultProps.distributeEvenly, }, forwardedRef) {
|
|
48
53
|
const { tabItems, tabContextValue } = (0, TabContext_1.useTabContextValue)();
|
|
49
54
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(activeTab);
|
|
50
55
|
const currentTab = (0, react_1.useMemo)(() => {
|
|
@@ -37,17 +37,18 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
37
37
|
},
|
|
38
38
|
maxLines: (0, ComponentDefs_1.d)("This property determines the maximum number of lines the component can wrap to. " +
|
|
39
39
|
"If there is no space to display all the contents, the component displays up to as " +
|
|
40
|
-
"many lines as specified in this property. When the value is not defined, there is
|
|
40
|
+
"many lines as specified in this property. When the value is not defined, there is " +
|
|
41
|
+
"no limit on the displayed lines."),
|
|
41
42
|
preserveLinebreaks: {
|
|
42
43
|
description: `This property indicates if linebreaks should be preserved when displaying text.`,
|
|
43
44
|
valueType: "boolean",
|
|
44
|
-
defaultValue:
|
|
45
|
+
defaultValue: TextNative_1.defaultProps.preserveLinebreaks,
|
|
45
46
|
},
|
|
46
47
|
ellipses: {
|
|
47
48
|
description: "This property indicates whether ellipses should be displayed when the text is " +
|
|
48
49
|
"cropped (\`true\`) or not (\`false\`).",
|
|
49
50
|
valueType: "boolean",
|
|
50
|
-
defaultValue:
|
|
51
|
+
defaultValue: TextNative_1.defaultProps.ellipses,
|
|
51
52
|
},
|
|
52
53
|
},
|
|
53
54
|
themeVars: (0, themeVars_1.parseScssVar)(Text_module_scss_1.default.themeVars),
|
|
@@ -56,6 +57,7 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
56
57
|
[`borderStyle-${COMP}`]: "solid",
|
|
57
58
|
[`fontSize-${COMP}`]: "$fontSize-small",
|
|
58
59
|
[`borderWidth-${COMP}`]: "$space-0",
|
|
60
|
+
[`lineHeight-${COMP}-codefence`]: "1.5",
|
|
59
61
|
[`fontWeight-${COMP}-abbr`]: "$fontWeight-bold",
|
|
60
62
|
[`textTransform-${COMP}-abbr`]: "uppercase",
|
|
61
63
|
[`fontSize-${COMP}-secondary`]: "$fontSize-small",
|
|
@@ -63,13 +65,13 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
63
65
|
[`textColor-${COMP}`]: "$textColor-primary",
|
|
64
66
|
[`fontFamily-${COMP}`]: "$fontFamily",
|
|
65
67
|
[`fontWeight-${COMP}`]: "$fontWeight-normal",
|
|
66
|
-
[`fontSize-${COMP}-codefence`]: "$fontSize-
|
|
68
|
+
[`fontSize-${COMP}-codefence`]: "$fontSize-code",
|
|
67
69
|
[`fontFamily-${COMP}-code`]: "$fontFamily-monospace",
|
|
68
70
|
[`fontSize-${COMP}-code`]: "$fontSize-small",
|
|
69
71
|
[`borderWidth-${COMP}-code`]: "1px",
|
|
70
72
|
[`borderStyle-${COMP}-code`]: "solid",
|
|
71
73
|
[`borderRadius-${COMP}-code`]: "4px",
|
|
72
|
-
[`paddingHorizontal-${COMP}-code`]: "$space-
|
|
74
|
+
[`paddingHorizontal-${COMP}-code`]: "$space-0_5",
|
|
73
75
|
[`paddingBottom-${COMP}-code`]: "2px",
|
|
74
76
|
[`textDecorationLine-${COMP}-deleted`]: "line-through",
|
|
75
77
|
[`textDecorationLine-${COMP}-inserted`]: "underline",
|
|
@@ -92,7 +94,7 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
92
94
|
[`fontSize-${COMP}-small`]: "$fontSize-small",
|
|
93
95
|
[`lineHeight-${COMP}-small`]: "$lineHeight-tight",
|
|
94
96
|
[`letterSpacing-${COMP}-caption`]: "0.05rem",
|
|
95
|
-
[`fontSize-${COMP}-placeholder`]: "$fontSize-
|
|
97
|
+
[`fontSize-${COMP}-placeholder`]: "$fontSize-smaller",
|
|
96
98
|
[`fontFamily-${COMP}-codefence`]: "$fontFamily-monospace",
|
|
97
99
|
[`paddingHorizontal-${COMP}-codefence`]: "$space-3",
|
|
98
100
|
[`paddingVertical-${COMP}-codefence`]: "$space-2",
|
|
@@ -108,18 +110,18 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
108
110
|
[`fontWeight-${COMP}-tableheading`]: "$fontWeight-bold",
|
|
109
111
|
[`marginTop-${COMP}-markdown`]: "$space-3",
|
|
110
112
|
[`marginBottom-${COMP}-markdown`]: "$space-6",
|
|
111
|
-
[`backgroundColor-${COMP}-code`]: "
|
|
113
|
+
[`backgroundColor-${COMP}-code`]: "rgb(from $color-surface-100 r g b / 0.4)",
|
|
112
114
|
[`borderColor-${COMP}-code`]: "$color-surface-100",
|
|
113
|
-
[`backgroundColor-${COMP}-keyboard`]: "
|
|
115
|
+
[`backgroundColor-${COMP}-keyboard`]: "rgb(from $color-surface-100 r g b / 0.4)",
|
|
114
116
|
[`borderColor-${COMP}-keyboard`]: "$color-surface-300",
|
|
115
|
-
[`backgroundColor-${COMP}-marked`]: "
|
|
117
|
+
[`backgroundColor-${COMP}-marked`]: "rgb(from $color-primary-200 r g b / 0.4)",
|
|
116
118
|
[`color-${COMP}-placeholder`]: "$color-surface-500",
|
|
117
119
|
[`color-${COMP}-codefence`]: "$color-surface-900",
|
|
118
120
|
[`color-${COMP}-subheading`]: "$textColor-secondary",
|
|
119
121
|
[`color-${COMP}-secondary`]: "$textColor-secondary",
|
|
120
122
|
dark: {
|
|
121
|
-
[`backgroundColor-${COMP}-marked`]: "
|
|
122
|
-
}
|
|
123
|
+
[`backgroundColor-${COMP}-marked`]: "rgb(from $color-primary-400 r g b / 0.4)",
|
|
124
|
+
},
|
|
123
125
|
},
|
|
124
126
|
});
|
|
125
127
|
exports.textComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TextMd, ({ node, extractValue, layoutCss, renderChild }) => {
|
|
@@ -127,5 +129,5 @@ exports.textComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, e
|
|
|
127
129
|
const variantSpecificProps = Object.fromEntries(Object.entries(variantSpecific)
|
|
128
130
|
.filter(([key, _]) => abstractions_1.VariantPropsKeys.includes(key))
|
|
129
131
|
.map(([key, value]) => [key, extractValue(value)]));
|
|
130
|
-
return ((0, jsx_runtime_1.jsx)(TextNative_1.Text, Object.assign({ variant: extractValue(variant), maxLines: extractValue.asOptionalNumber(maxLines), style: layoutCss, preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks,
|
|
132
|
+
return ((0, jsx_runtime_1.jsx)(TextNative_1.Text, Object.assign({ variant: extractValue(variant), maxLines: extractValue.asOptionalNumber(maxLines), style: layoutCss, preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, TextNative_1.defaultProps.preserveLinebreaks), ellipses: extractValue.asOptionalBoolean(ellipses, TextNative_1.defaultProps.ellipses) }, variantSpecificProps, { children: extractValue.asDisplayText(value) || renderChild(node.children) })));
|
|
131
133
|
});
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Text = void 0;
|
|
17
|
+
exports.Text = exports.defaultProps = void 0;
|
|
18
18
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
const react_1 = require("react");
|
|
20
20
|
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
@@ -22,8 +22,13 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
22
22
|
const Text_module_scss_1 = __importDefault(require("./Text.module.scss"));
|
|
23
23
|
const css_utils_1 = require("../../components-core/utils/css-utils");
|
|
24
24
|
const abstractions_1 = require("../abstractions");
|
|
25
|
+
exports.defaultProps = {
|
|
26
|
+
maxLines: 0,
|
|
27
|
+
preserveLinebreaks: false,
|
|
28
|
+
ellipses: true,
|
|
29
|
+
};
|
|
25
30
|
exports.Text = (0, react_1.forwardRef)(function Text(_a, forwardedRef) {
|
|
26
|
-
var { uid, variant, maxLines =
|
|
31
|
+
var { uid, variant, maxLines = exports.defaultProps.maxLines, style, children, preserveLinebreaks = exports.defaultProps.preserveLinebreaks, ellipses = exports.defaultProps.ellipses } = _a, variantSpecificProps = __rest(_a, ["uid", "variant", "maxLines", "style", "children", "preserveLinebreaks", "ellipses"]);
|
|
27
32
|
const innerRef = (0, react_1.useRef)(null);
|
|
28
33
|
const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(innerRef, forwardedRef) : innerRef;
|
|
29
34
|
// NOTE: This is to accept syntax highlight classes coming from shiki
|
|
@@ -26,7 +26,7 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
26
26
|
description: "This optional boolean property indicates whether pressing the \`Enter\` key on the " +
|
|
27
27
|
"keyboard prompts the parent \`Form\` component to submit.",
|
|
28
28
|
valueType: "boolean",
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: TextAreaNative_1.defaultProps.enterSubmits,
|
|
30
30
|
},
|
|
31
31
|
escResets: {
|
|
32
32
|
description: `This boolean property indicates whether the ${COMP} contents should be reset when pressing ` +
|
|
@@ -34,12 +34,14 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
34
34
|
valueType: "boolean",
|
|
35
35
|
defaultValue: false,
|
|
36
36
|
},
|
|
37
|
-
maxRows: (0, ComponentDefs_1.d)(`This optional property sets the maximum number of text rows the \`${COMP}\`
|
|
38
|
-
|
|
37
|
+
maxRows: (0, ComponentDefs_1.d)(`This optional property sets the maximum number of text rows the \`${COMP}\` ` +
|
|
38
|
+
"can grow. If not set, the number of rows is unlimited."),
|
|
39
|
+
minRows: (0, ComponentDefs_1.d)(`This optional property sets the minimum number of text rows the \`${COMP}\` can shrink. ` +
|
|
40
|
+
`If not set, the minimum number of rows is 1.`),
|
|
39
41
|
rows: {
|
|
40
42
|
description: `Specifies the number of rows the component initially has.`,
|
|
41
43
|
valueType: "number",
|
|
42
|
-
defaultValue:
|
|
44
|
+
defaultValue: TextAreaNative_1.defaultProps.rows,
|
|
43
45
|
},
|
|
44
46
|
autoSize: {
|
|
45
47
|
description: `If set to \`true\`, this boolean property enables the \`${COMP}\` to resize ` +
|
|
@@ -59,7 +61,8 @@ exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
59
61
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
60
62
|
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
61
63
|
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
62
|
-
resize: {
|
|
64
|
+
resize: {
|
|
65
|
+
description: `This optional property specifies in which dimensions can the \`TextArea\` ` +
|
|
63
66
|
`be resized by the user.`,
|
|
64
67
|
availableValues: exports.resizeOptionsMd,
|
|
65
68
|
},
|
|
@@ -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.TextArea = exports.resizeOptionKeys = void 0;
|
|
39
|
+
exports.TextArea = exports.defaultProps = exports.resizeOptionKeys = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = __importStar(require("react"));
|
|
42
42
|
const classnames_1 = __importDefault(require("classnames"));
|
|
@@ -53,7 +53,24 @@ const resizeMap = {
|
|
|
53
53
|
vertical: TextArea_module_scss_1.default.resizeVertical,
|
|
54
54
|
both: TextArea_module_scss_1.default.resizeBoth,
|
|
55
55
|
};
|
|
56
|
-
exports.
|
|
56
|
+
exports.defaultProps = {
|
|
57
|
+
value: "",
|
|
58
|
+
placeholder: "",
|
|
59
|
+
required: false,
|
|
60
|
+
readOnly: false,
|
|
61
|
+
allowCopy: true,
|
|
62
|
+
updateState: constants_1.noop,
|
|
63
|
+
autoFocus: false,
|
|
64
|
+
initialValue: "",
|
|
65
|
+
onDidChange: constants_1.noop,
|
|
66
|
+
onFocus: constants_1.noop,
|
|
67
|
+
onBlur: constants_1.noop,
|
|
68
|
+
controlled: true,
|
|
69
|
+
enterSubmits: true,
|
|
70
|
+
rows: 2,
|
|
71
|
+
enabled: true
|
|
72
|
+
};
|
|
73
|
+
exports.TextArea = (0, react_1.forwardRef)(function TextArea({ id, value = exports.defaultProps.value, placeholder = exports.defaultProps.placeholder, required = exports.defaultProps.required, readOnly = exports.defaultProps.readOnly, allowCopy = exports.defaultProps.allowCopy, updateState = exports.defaultProps.updateState, validationStatus, autoFocus = exports.defaultProps.autoFocus, initialValue = exports.defaultProps.initialValue, resize, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, controlled = exports.defaultProps.controlled, enterSubmits = exports.defaultProps.enterSubmits, escResets, style, registerComponentApi, autoSize, maxRows, minRows, maxLength, rows = exports.defaultProps.rows, enabled = exports.defaultProps.enabled, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
|
|
57
74
|
// --- The component is initially unfocused
|
|
58
75
|
const inputRef = (0, react_1.useRef)(null);
|
|
59
76
|
const [cursorPosition, setCursorPosition] = (0, react_1.useState)(null);
|
|
@@ -17,7 +17,7 @@ exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
17
17
|
description: `The \`${COMP}\` is an input component that allows users to input and edit textual data.`,
|
|
18
18
|
props: {
|
|
19
19
|
placeholder: (0, metadata_helpers_1.dPlaceholder)(),
|
|
20
|
-
initialValue: (0, metadata_helpers_1.dInitialValue)(),
|
|
20
|
+
initialValue: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInitialValue)()), { defaultValue: TextBoxNative_1.defaultProps.initialValue }),
|
|
21
21
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
22
22
|
labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),
|
|
23
23
|
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
@@ -26,14 +26,15 @@ exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
26
26
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
27
27
|
required: (0, metadata_helpers_1.dRequired)(),
|
|
28
28
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
29
|
-
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
30
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
29
|
+
enabled: Object.assign(Object.assign({}, (0, metadata_helpers_1.dEnabled)()), { defaultValue: TextBoxNative_1.defaultProps.enabled }),
|
|
30
|
+
validationStatus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dValidationStatus)()), { defaultValue: TextBoxNative_1.defaultProps.validationStatus }),
|
|
31
31
|
startText: (0, metadata_helpers_1.dStartText)(),
|
|
32
32
|
startIcon: (0, metadata_helpers_1.dStartIcon)(),
|
|
33
33
|
endText: (0, metadata_helpers_1.dEndText)(),
|
|
34
34
|
endIcon: (0, metadata_helpers_1.dEndIcon)(),
|
|
35
35
|
gap: {
|
|
36
|
-
description: "This property defines the gap between the adornments and the input area."
|
|
36
|
+
description: "This property defines the gap between the adornments and the input area. If not " +
|
|
37
|
+
"set, the gap declared by the current theme is used.",
|
|
37
38
|
},
|
|
38
39
|
},
|
|
39
40
|
events: {
|
|
@@ -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.TextBox = void 0;
|
|
39
|
+
exports.TextBox = exports.defaultProps = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = require("react");
|
|
42
42
|
const react_2 = __importStar(require("react"));
|
|
@@ -46,7 +46,19 @@ const constants_1 = require("../../components-core/constants");
|
|
|
46
46
|
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
|
-
exports.
|
|
49
|
+
exports.defaultProps = {
|
|
50
|
+
type: "text",
|
|
51
|
+
value: "",
|
|
52
|
+
initialValue: "",
|
|
53
|
+
enabled: true,
|
|
54
|
+
validationStatus: "none",
|
|
55
|
+
onDidChange: constants_1.noop,
|
|
56
|
+
onFocus: constants_1.noop,
|
|
57
|
+
onBlur: constants_1.noop,
|
|
58
|
+
onKeyDown: constants_1.noop,
|
|
59
|
+
updateState: constants_1.noop,
|
|
60
|
+
};
|
|
61
|
+
exports.TextBox = (0, react_1.forwardRef)(function TextBox({ id, type = exports.defaultProps.type, value = exports.defaultProps.value, updateState = exports.defaultProps.updateState, initialValue = exports.defaultProps.initialValue, style, maxLength, enabled = exports.defaultProps.enabled, placeholder, validationStatus = exports.defaultProps.validationStatus, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, onKeyDown = exports.defaultProps.onKeyDown, registerComponentApi, startText, startIcon, endText, endIcon, gap, autoFocus, readOnly, tabIndex, label, labelPosition, labelWidth, labelBreak, required, }, ref) {
|
|
50
62
|
const _id = (0, react_1.useId)();
|
|
51
63
|
id = id || _id;
|
|
52
64
|
const inputRef = (0, react_2.useRef)(null);
|
|
@@ -31,7 +31,7 @@ exports.ThemeMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
31
31
|
valueType: "string",
|
|
32
32
|
defaultValue: "light",
|
|
33
33
|
},
|
|
34
|
-
root: (0, ComponentDefs_1.d)(`This property indicates whether the component is at the root of the application
|
|
34
|
+
root: (0, ComponentDefs_1.d)(`This property indicates whether the component is at the root of the application.`, undefined, "boolean", ThemeNative_1.defaultProps.root),
|
|
35
35
|
},
|
|
36
36
|
opaque: true,
|
|
37
37
|
});
|
|
@@ -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.Theme = Theme;
|
|
7
8
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
9
|
const react_1 = require("react");
|
|
@@ -15,7 +16,6 @@ const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
|
15
16
|
const constants_1 = require("../../components-core/constants");
|
|
16
17
|
const ErrorBoundary_1 = require("../../components-core/rendering/ErrorBoundary");
|
|
17
18
|
const NotificationToast_1 = require("./NotificationToast");
|
|
18
|
-
const InspectorContext_1 = require("../../components-core/InspectorContext");
|
|
19
19
|
const IndexerContext_1 = require("../App/IndexerContext");
|
|
20
20
|
function getClassName(css) {
|
|
21
21
|
return `theme-${calculateHash(css)}`;
|
|
@@ -31,7 +31,13 @@ function calculateHash(str) {
|
|
|
31
31
|
}
|
|
32
32
|
return hash;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
exports.defaultProps = {
|
|
35
|
+
isRoot: false,
|
|
36
|
+
toastDuration: 5000,
|
|
37
|
+
themeVars: constants_1.EMPTY_OBJECT,
|
|
38
|
+
root: false,
|
|
39
|
+
};
|
|
40
|
+
function Theme({ id, isRoot = exports.defaultProps.isRoot, renderChild, node, tone, toastDuration = exports.defaultProps.toastDuration, themeVars = exports.defaultProps.themeVars, layoutContext, children, }) {
|
|
35
41
|
const generatedId = (0, react_1.useId)();
|
|
36
42
|
const { themes, resources, resourceMap, activeThemeId, setRoot, root } = (0, ThemeContext_1.useThemes)();
|
|
37
43
|
const { activeTheme, activeThemeTone } = (0, ThemeContext_1.useTheme)();
|
|
@@ -112,16 +118,6 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
|
|
|
112
118
|
getResourceUrl,
|
|
113
119
|
getThemeVar,
|
|
114
120
|
]);
|
|
115
|
-
const { devToolsSize, devToolsSide, devToolsEnabled } = (0, InspectorContext_1.useDevTools)();
|
|
116
|
-
const inspectStyle = (0, react_1.useMemo)(() => {
|
|
117
|
-
return devToolsEnabled
|
|
118
|
-
? {
|
|
119
|
-
paddingBottom: devToolsSide === "bottom" ? devToolsSize : 0,
|
|
120
|
-
paddingLeft: devToolsSide === "left" ? devToolsSize : 0,
|
|
121
|
-
paddingRight: devToolsSide === "right" ? devToolsSize : 0,
|
|
122
|
-
}
|
|
123
|
-
: {};
|
|
124
|
-
}, [devToolsEnabled, devToolsSide, devToolsSize]);
|
|
125
121
|
const { indexing } = (0, IndexerContext_1.useIndexerContext)();
|
|
126
122
|
if (indexing) {
|
|
127
123
|
return children;
|
|
@@ -130,7 +126,7 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
|
|
|
130
126
|
const faviconUrl = getResourceUrl("resource:favicon") || "/resources/favicon.ico";
|
|
131
127
|
return (
|
|
132
128
|
// <ThemeContext.Provider value={currentThemeContextValue}>
|
|
133
|
-
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_async_1.Helmet, { children: [!!faviconUrl && (0, jsx_runtime_1.jsx)("link", { rel: "icon", type: "image/svg+xml", href: faviconUrl }), fontLinks === null || fontLinks === void 0 ? void 0 : fontLinks.map((fontLink) => (0, jsx_runtime_1.jsx)("link", { href: fontLink, rel: "stylesheet" }, fontLink))] }), (0, jsx_runtime_1.jsx)("style", { type: "text/css", "data-theme-root": true,
|
|
129
|
+
(0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_helmet_async_1.Helmet, { children: [!!faviconUrl && (0, jsx_runtime_1.jsx)("link", { rel: "icon", type: "image/svg+xml", href: faviconUrl }), fontLinks === null || fontLinks === void 0 ? void 0 : fontLinks.map((fontLink) => (0, jsx_runtime_1.jsx)("link", { href: fontLink, rel: "stylesheet" }, fontLink))] }), (0, jsx_runtime_1.jsx)("style", { type: "text/css", "data-theme-root": true, dangerouslySetInnerHTML: { __html: `.${className} {${css}}` } }), (0, jsx_runtime_1.jsxs)("div", { id: "_ui-engine-theme-root", className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, className), ref: (el) => {
|
|
134
130
|
if (el) {
|
|
135
131
|
setRoot(el);
|
|
136
132
|
}
|
|
@@ -138,7 +134,7 @@ function Theme({ id, isRoot = false, renderChild, node, tone, toastDuration = 50
|
|
|
138
134
|
// </ThemeContext.Provider>
|
|
139
135
|
);
|
|
140
136
|
}
|
|
141
|
-
return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: currentThemeContextValue, children: [(0, jsx_runtime_1.jsx)("style", {
|
|
137
|
+
return ((0, jsx_runtime_1.jsxs)(ThemeContext_1.ThemeContext.Provider, { value: currentThemeContextValue, children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", dangerouslySetInnerHTML: { __html: `.${className} {${css}}` } }), (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Theme_module_scss_1.default.baseRootComponent, Theme_module_scss_1.default.wrapper, className), children: renderChild(node.children, Object.assign(Object.assign({}, layoutContext), { themeClassName: className })) }), root &&
|
|
142
138
|
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(className), ref: (el) => {
|
|
143
139
|
if (el) {
|
|
144
140
|
setThemeRoot(el);
|