xmlui 0.7.25 → 0.7.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-B0H9MD6w.mjs → apiInterceptorWorker-Ca5HMlfW.mjs} +1 -1
- package/dist/{index-Brmiu4kS.mjs → index-BMOK5q0U.mjs} +10810 -10330
- package/dist/index.css +1 -1
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -2
- package/dist/scripts/src/components/APICall/APICall.js +63 -28
- package/dist/scripts/src/components/Accordion/Accordion.js +28 -8
- package/dist/scripts/src/components/Accordion/AccordionNative.js +9 -3
- package/dist/scripts/src/components/Alert/Alert.js +25 -6
- package/dist/scripts/src/components/App/App.js +49 -13
- package/dist/scripts/src/components/App/AppNative.js +9 -3
- package/dist/scripts/src/components/AppHeader/AppHeader.js +10 -14
- package/dist/scripts/src/components/AppState/AppState.js +14 -8
- package/dist/scripts/src/components/Avatar/Avatar.js +16 -7
- package/dist/scripts/src/components/Avatar/AvatarNative.js +5 -2
- package/dist/scripts/src/components/Backdrop/Backdrop.js +10 -2
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +6 -2
- package/dist/scripts/src/components/Badge/Badge.js +23 -10
- package/dist/scripts/src/components/Badge/BadgeNative.js +6 -4
- package/dist/scripts/src/components/Bookmark/Bookmark.js +22 -9
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +7 -3
- package/dist/scripts/src/components/Button/Button.js +74 -24
- package/dist/scripts/src/components/Button/ButtonNative.js +11 -3
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +22 -8
- package/dist/scripts/src/components/Card/Card.js +31 -10
- package/dist/scripts/src/components/Card/CardNative.js +6 -3
- package/dist/scripts/src/components/Carousel/Carousel.js +59 -12
- package/dist/scripts/src/components/Carousel/CarouselNative.js +13 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +10 -3
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +5 -1
- package/dist/scripts/src/components/Checkbox/Checkbox.js +8 -6
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +2 -2
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +8 -2
- package/dist/scripts/src/components/Column/Column.js +61 -16
- package/dist/scripts/src/components/Column/ColumnNative.js +8 -2
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +11 -3
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +5 -2
- package/dist/scripts/src/components/DatePicker/DatePicker.js +42 -10
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +67 -26
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +51 -12
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +14 -3
- package/dist/scripts/src/components/Footer/Footer.js +13 -10
- package/dist/scripts/src/components/Form/Form.js +7 -1
- package/dist/scripts/src/components/Form/FormNative.js +31 -2
- package/dist/scripts/src/components/Heading/Heading.js +5 -4
- package/dist/scripts/src/components/Heading/HeadingNative.js +4 -4
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +1 -1
- package/dist/scripts/src/components/Link/Link.js +1 -0
- package/dist/scripts/src/components/NavLink/NavLink.js +1 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +12 -4
- package/dist/scripts/src/components/NoResult/NoResult.js +1 -0
- package/dist/scripts/src/components/Pages/PagesNative.js +1 -1
- package/dist/scripts/src/components/Select/SelectNative.js +17 -17
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +23 -4
- package/dist/scripts/src/components/Switch/Switch.js +6 -6
- package/dist/scripts/src/components/Table/Table.js +2 -7
- package/dist/scripts/src/components/Table/TableNative.js +1 -1
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +18 -9
- package/dist/scripts/src/components/Toggle/Toggle.js +10 -2
- package/dist/scripts/src/components/abstractions.js +1 -2
- package/dist/scripts/src/components/metadata-helpers.js +22 -9
- package/dist/scripts/src/components-core/TableOfContentsContext.js +21 -10
- package/dist/scripts/src/components-core/loader/DataLoader.js +7 -3
- package/dist/scripts/src/components-core/rendering/valueExtractor.js +5 -2
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +4 -1
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +55 -59
- package/dist/scripts/src/components-core/utils/hooks.js +76 -1
- package/dist/scripts/src/components-core/utils/misc.js +3 -0
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +6322 -4934
- package/dist/xmlui-metadata.umd.js +17 -17
- package/dist/xmlui-standalone.umd.js +186 -186
- package/dist/xmlui.d.ts +11 -6
- package/dist/xmlui.mjs +1 -1
- package/package.json +10 -12
|
@@ -10,23 +10,68 @@ exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
10
10
|
description: `The \`${COMP}\` component can be used within a \`Table\` to define a particular table ` +
|
|
11
11
|
`column's visual properties and data bindings.`,
|
|
12
12
|
props: {
|
|
13
|
-
bindTo:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`
|
|
13
|
+
bindTo: {
|
|
14
|
+
description: `Indicates what part of the data to lay out in the column.`,
|
|
15
|
+
valueType: "string",
|
|
16
|
+
},
|
|
17
|
+
header: {
|
|
18
|
+
description: `Adds a label for a particular column.`,
|
|
19
|
+
valueType: "string",
|
|
20
|
+
},
|
|
21
|
+
width: {
|
|
22
|
+
description: `This property defines the width of the column. You can use a numeric value, a pixel ` +
|
|
23
|
+
`value (such as \`100px\`), or a star size value (such as \`*\`, \`2*\`, etc.). ` +
|
|
24
|
+
`You will get an error if you use any other unit (or value).`,
|
|
25
|
+
valueType: "any",
|
|
26
|
+
},
|
|
27
|
+
minWidth: {
|
|
28
|
+
description: `Indicates the minimum width a particular column can have. Same rules apply as with [width](#width).`,
|
|
29
|
+
valueType: "any",
|
|
30
|
+
},
|
|
31
|
+
maxWidth: {
|
|
32
|
+
description: `Indicates the maximum width a particular column can have. Same rules apply as with [width](#width).`,
|
|
33
|
+
valueType: "any",
|
|
34
|
+
},
|
|
35
|
+
canSort: {
|
|
36
|
+
description: `This property sets whether the user can sort by a column by clicking on its header ` +
|
|
37
|
+
`(\`true\`) or not (\`false\`).`,
|
|
38
|
+
valueType: "boolean",
|
|
39
|
+
},
|
|
40
|
+
pinTo: {
|
|
41
|
+
description: `This property allows the column to be pinned to ` +
|
|
42
|
+
`the \`left\` (left-to-right writing style) or \`right\` (left-to-right writing style) edge ` +
|
|
43
|
+
`of the table. If the writing style is right-to-left, the locations are switched.`,
|
|
44
|
+
availableValues: ["left", "right"],
|
|
45
|
+
valueType: "string",
|
|
46
|
+
},
|
|
47
|
+
canResize: {
|
|
48
|
+
description: `This property indicates whether the user can resize the column. If set to ` +
|
|
49
|
+
`\`true\`, the column can be resized by dragging the column border. If set to ` +
|
|
50
|
+
`\`false\`, the column cannot be resized. Double-clicking the column border ` +
|
|
51
|
+
`resets to the original size.`,
|
|
52
|
+
valueType: "boolean",
|
|
53
|
+
},
|
|
29
54
|
},
|
|
55
|
+
contextVars: {
|
|
56
|
+
$item: {
|
|
57
|
+
description: "The data item being rendered.",
|
|
58
|
+
},
|
|
59
|
+
$row: {
|
|
60
|
+
description: "The data item being rendered (the same as \`$item\`).",
|
|
61
|
+
},
|
|
62
|
+
$itemIndex: {
|
|
63
|
+
description: "The index of the data item being rendered.",
|
|
64
|
+
},
|
|
65
|
+
$rowIndex: {
|
|
66
|
+
description: "The index of the data item being rendered (the same as \`$itemIndex\`).",
|
|
67
|
+
},
|
|
68
|
+
$colIndex: {
|
|
69
|
+
description: "The index of the column being rendered.",
|
|
70
|
+
},
|
|
71
|
+
$cell: {
|
|
72
|
+
description: "The value of the cell being rendered.",
|
|
73
|
+
},
|
|
74
|
+
}
|
|
30
75
|
});
|
|
31
76
|
exports.columnComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ColumnMd, (rendererContext) => {
|
|
32
77
|
const { node, renderChild, extractValue, layoutCss } = rendererContext;
|
|
@@ -20,8 +20,14 @@ function Column(_a) {
|
|
|
20
20
|
var { nodeChildren, renderChild } = _a, columnMetadata = __rest(_a, ["nodeChildren", "renderChild"]);
|
|
21
21
|
const id = (0, react_1.useId)();
|
|
22
22
|
const { registerColumn, unRegisterColumn } = (0, TableContext_1.useTableContext)();
|
|
23
|
-
const cellRenderer = (0, react_1.useCallback)((row) => {
|
|
24
|
-
return (0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: nodeChildren, item: row,
|
|
23
|
+
const cellRenderer = (0, react_1.useCallback)((row, rowIndex, colIndex, value) => {
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: nodeChildren, item: row, contextVars: {
|
|
25
|
+
$rowIndex: rowIndex,
|
|
26
|
+
$colIndex: colIndex,
|
|
27
|
+
$row: row,
|
|
28
|
+
$itemIndex: rowIndex,
|
|
29
|
+
$cell: value,
|
|
30
|
+
}, renderChild: renderChild }));
|
|
25
31
|
}, [nodeChildren, renderChild]);
|
|
26
32
|
const safeCellRenderer = (0, react_1.useMemo)(() => {
|
|
27
33
|
return nodeChildren ? cellRenderer : undefined;
|
|
@@ -17,9 +17,17 @@ exports.ContentSeparatorMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
17
17
|
`It serves as a visual cue to distinguish between different sections or groups of content, ` +
|
|
18
18
|
`helping to improve readability and organization.`,
|
|
19
19
|
props: {
|
|
20
|
-
size:
|
|
21
|
-
`
|
|
22
|
-
|
|
20
|
+
size: {
|
|
21
|
+
description: `This property defines the component's height (if the \`orientation\` is horizontal) ` +
|
|
22
|
+
`or the width (if the \`orientation\` is vertical).`,
|
|
23
|
+
valueType: "any",
|
|
24
|
+
},
|
|
25
|
+
orientation: {
|
|
26
|
+
description: "Sets the main axis of the component",
|
|
27
|
+
availableValues: abstractions_1.orientationOptionMd,
|
|
28
|
+
defaultValue: ContentSeparatorNative_1.defaultProps.orientation,
|
|
29
|
+
valueType: "string",
|
|
30
|
+
},
|
|
23
31
|
},
|
|
24
32
|
themeVars: (0, themeVars_1.parseScssVar)(ContentSeparator_module_scss_1.default.themeVars),
|
|
25
33
|
defaultThemeVars: {
|
|
@@ -3,11 +3,14 @@ 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.ContentSeparator = void 0;
|
|
6
|
+
exports.ContentSeparator = exports.defaultProps = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
9
|
const ContentSeparator_module_scss_1 = __importDefault(require("./ContentSeparator.module.scss"));
|
|
10
|
-
|
|
10
|
+
exports.defaultProps = {
|
|
11
|
+
orientation: "horizontal",
|
|
12
|
+
};
|
|
13
|
+
const ContentSeparator = ({ orientation = exports.defaultProps.orientation, size, style, }) => {
|
|
11
14
|
return ((0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(ContentSeparator_module_scss_1.default.separator, {
|
|
12
15
|
[ContentSeparator_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
13
16
|
[ContentSeparator_module_scss_1.default.vertical]: orientation === "vertical",
|
|
@@ -20,16 +20,48 @@ exports.DatePickerMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
20
20
|
initialValue: (0, metadata_helpers_1.dInitialValue)(),
|
|
21
21
|
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
22
22
|
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
23
|
-
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
24
|
-
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
25
|
-
mode:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
enabled: (0, metadata_helpers_1.dEnabled)(DatePickerNative_1.defaultProps.enabled),
|
|
24
|
+
validationStatus: (0, metadata_helpers_1.dValidationStatus)(DatePickerNative_1.defaultProps.validationStatus),
|
|
25
|
+
mode: {
|
|
26
|
+
description: "The mode of the datepicker (single or range)",
|
|
27
|
+
valueType: "string",
|
|
28
|
+
availableValues: DatePickerNative_1.DatePickerModeValues,
|
|
29
|
+
defaultValue: DatePickerNative_1.defaultProps.mode,
|
|
30
|
+
},
|
|
31
|
+
dateFormat: {
|
|
32
|
+
description: "The format of the date displayed in the input field",
|
|
33
|
+
valueType: "string",
|
|
34
|
+
defaultValue: DatePickerNative_1.defaultProps.dateFormat,
|
|
35
|
+
availableValues: DatePickerNative_1.dateFormats,
|
|
36
|
+
},
|
|
37
|
+
showWeekNumber: {
|
|
38
|
+
description: "Whether to show the week number in the calendar",
|
|
39
|
+
valueType: "boolean",
|
|
40
|
+
defaultValue: DatePickerNative_1.defaultProps.showWeekNumber,
|
|
41
|
+
},
|
|
42
|
+
weekStartsOn: {
|
|
43
|
+
description: "The first day of the week. 0 is Sunday, 1 is Monday, etc.",
|
|
44
|
+
valueType: "number",
|
|
45
|
+
defaultValue: DatePickerNative_1.defaultProps.weekStartsOn,
|
|
46
|
+
availableValues: DatePickerNative_1.weekDaysMd,
|
|
47
|
+
},
|
|
48
|
+
fromDate: {
|
|
49
|
+
description: "The start date of the range of selectable dates",
|
|
50
|
+
valueType: "string",
|
|
51
|
+
},
|
|
52
|
+
toDate: {
|
|
53
|
+
description: "The end date of the range of selectable dates",
|
|
54
|
+
valueType: "string",
|
|
55
|
+
},
|
|
56
|
+
disabledDates: {
|
|
57
|
+
description: "An array of dates that are disabled",
|
|
58
|
+
valueType: "any",
|
|
59
|
+
},
|
|
60
|
+
inline: {
|
|
61
|
+
description: "Whether to display the datepicker inline",
|
|
62
|
+
valueType: "boolean",
|
|
63
|
+
defaultValue: DatePickerNative_1.defaultProps.inline,
|
|
64
|
+
},
|
|
33
65
|
startText: (0, metadata_helpers_1.dStartText)(),
|
|
34
66
|
startIcon: (0, metadata_helpers_1.dStartIcon)(),
|
|
35
67
|
endText: (0, metadata_helpers_1.dEndText)(),
|
|
@@ -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.DatePicker = void 0;
|
|
39
|
+
exports.DatePicker = exports.defaultProps = exports.dateFormats = exports.weekDaysMd = exports.DatePickerModeValues = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = require("react");
|
|
42
42
|
const react_day_picker_1 = require("react-day-picker");
|
|
@@ -49,6 +49,7 @@ const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
|
49
49
|
const constants_1 = require("../../components-core/constants");
|
|
50
50
|
const misc_1 = require("../../components-core/utils/misc");
|
|
51
51
|
const InputAdornment_1 = require("../Input/InputAdornment");
|
|
52
|
+
exports.DatePickerModeValues = ["single", "range"];
|
|
52
53
|
var WeekDays;
|
|
53
54
|
(function (WeekDays) {
|
|
54
55
|
WeekDays[WeekDays["Sunday"] = 0] = "Sunday";
|
|
@@ -59,7 +60,38 @@ var WeekDays;
|
|
|
59
60
|
WeekDays[WeekDays["Friday"] = 5] = "Friday";
|
|
60
61
|
WeekDays[WeekDays["Saturday"] = 6] = "Saturday";
|
|
61
62
|
})(WeekDays || (WeekDays = {}));
|
|
62
|
-
|
|
63
|
+
;
|
|
64
|
+
exports.weekDaysMd = [
|
|
65
|
+
{
|
|
66
|
+
value: WeekDays.Sunday,
|
|
67
|
+
description: "Sunday",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
value: WeekDays.Monday,
|
|
71
|
+
description: "Monday",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
value: WeekDays.Tuesday,
|
|
75
|
+
description: "Tuesday",
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: WeekDays.Wednesday,
|
|
79
|
+
description: "Wednesday",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: WeekDays.Thursday,
|
|
83
|
+
description: "Thursday",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: WeekDays.Friday,
|
|
87
|
+
description: "Friday",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: WeekDays.Saturday,
|
|
91
|
+
description: "Saturday",
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
exports.dateFormats = [
|
|
63
95
|
"MM/dd/yyyy",
|
|
64
96
|
"MM-dd-yyyy",
|
|
65
97
|
"yyyy/MM/dd",
|
|
@@ -69,29 +101,17 @@ const dateFormats = [
|
|
|
69
101
|
"yyyyMMdd",
|
|
70
102
|
"MMddyyyy",
|
|
71
103
|
];
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
};
|
|
82
|
-
const parseDate = (dateString) => {
|
|
83
|
-
if (dateString) {
|
|
84
|
-
for (const format of dateFormats) {
|
|
85
|
-
const parsedDate = (0, date_fns_1.parse)(dateString, format, new Date());
|
|
86
|
-
if ((0, date_fns_1.isValid)(parsedDate)) {
|
|
87
|
-
return parsedDate;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return undefined;
|
|
104
|
+
exports.defaultProps = {
|
|
105
|
+
mode: "single",
|
|
106
|
+
validationStatus: "none",
|
|
107
|
+
enabled: true,
|
|
108
|
+
inline: false,
|
|
109
|
+
dateFormat: "MM/dd/yyyy",
|
|
110
|
+
showWeekNumber: false,
|
|
111
|
+
weekStartsOn: WeekDays.Sunday,
|
|
112
|
+
disabledDates: [],
|
|
92
113
|
};
|
|
93
|
-
exports.DatePicker = (0, react_1.forwardRef)(function DatePicker({ id, initialValue, value, mode =
|
|
94
|
-
showWeekNumber = false, weekStartsOn = WeekDays.Sunday, fromDate, toDate, disabledDates = [], style, registerComponentApi, inline = false, startText, startIcon, endText, endIcon, }, forwardedRef) {
|
|
114
|
+
exports.DatePicker = (0, react_1.forwardRef)(function DatePicker({ id, initialValue, value, mode = exports.defaultProps.mode, enabled = exports.defaultProps.enabled, placeholder, updateState = constants_1.noop, validationStatus = exports.defaultProps.validationStatus, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, dateFormat = exports.defaultProps.dateFormat, showWeekNumber = exports.defaultProps.showWeekNumber, weekStartsOn = exports.defaultProps.weekStartsOn, fromDate, toDate, disabledDates = exports.defaultProps.disabledDates, style, registerComponentApi, inline = exports.defaultProps.inline, startText, startIcon, endText, endIcon, }, forwardedRef) {
|
|
95
115
|
const _weekStartsOn = weekStartsOn >= 0 && weekStartsOn <= 6 ? weekStartsOn : WeekDays.Sunday;
|
|
96
116
|
const [isButtonFocused, setIsButtonFocused] = (0, react_1.useState)(false);
|
|
97
117
|
const [isMenuFocused, setIsMenuFocused] = (0, react_1.useState)(false);
|
|
@@ -110,8 +130,8 @@ showWeekNumber = false, weekStartsOn = WeekDays.Sunday, fromDate, toDate, disabl
|
|
|
110
130
|
return undefined;
|
|
111
131
|
}, [value, mode]);
|
|
112
132
|
(0, react_1.useEffect)(() => {
|
|
113
|
-
if (!dateFormats.includes(dateFormat)) {
|
|
114
|
-
throw new Error(`Invalid dateFormat: ${dateFormat}. Supported formats are: ${dateFormats.join(", ")}`);
|
|
133
|
+
if (!exports.dateFormats.includes(dateFormat)) {
|
|
134
|
+
throw new Error(`Invalid dateFormat: ${dateFormat}. Supported formats are: ${exports.dateFormats.join(", ")}`);
|
|
115
135
|
}
|
|
116
136
|
}, [dateFormat]);
|
|
117
137
|
const startDate = (0, react_1.useMemo)(() => {
|
|
@@ -194,3 +214,24 @@ showWeekNumber = false, weekStartsOn = WeekDays.Sunday, fromDate, toDate, disabl
|
|
|
194
214
|
[DatePicker_module_scss_1.default.valid]: validationStatus === "valid",
|
|
195
215
|
}), onFocus: handleOnButtonFocus, onBlur: handleOnButtonBlur, children: [(0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { text: startText, iconName: startIcon, className: DatePicker_module_scss_1.default.adornment }), (0, jsx_runtime_1.jsx)("div", { className: DatePicker_module_scss_1.default.datePickerValue, children: mode === "single" && selected ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, date_fns_1.format)(selected, dateFormat) })) : mode === "range" && typeof selected === "object" && selected.from ? (selected.to ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, date_fns_1.format)(selected.from, dateFormat), " - ", (0, date_fns_1.format)(selected.to, dateFormat)] })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, date_fns_1.format)(selected.from, dateFormat) }))) : placeholder ? ((0, jsx_runtime_1.jsx)("span", { className: DatePicker_module_scss_1.default.placeholder, children: placeholder })) : ((0, jsx_runtime_1.jsx)("span", { children: "\u00A0" })) }), (0, jsx_runtime_1.jsx)(InputAdornment_1.Adornment, { text: endText, iconName: endIcon, className: DatePicker_module_scss_1.default.adornment })] }) }), (0, jsx_runtime_1.jsx)(ReactDropdownMenu.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(ReactDropdownMenu.Content, { align: "start", className: DatePicker_module_scss_1.default.datePickerMenu, onFocus: handleOnMenuFocus, onBlur: handleOnMenuBlur, onInteractOutside: handleOnMenuBlur, children: (0, jsx_runtime_1.jsx)(react_day_picker_1.DayPicker, { fixedWeeks: true, fromDate: startDate, toDate: endDate, disabled: disabled, weekStartsOn: _weekStartsOn, showWeekNumber: showWeekNumber, showOutsideDays: true, classNames: DatePicker_module_scss_1.default, mode: mode === "single" ? "single" : "range", selected: selected, onSelect: handleSelect, initialFocus: true, numberOfMonths: mode === "range" ? 2 : 1 }) }) })] }));
|
|
196
216
|
});
|
|
217
|
+
const isoRegex = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;
|
|
218
|
+
const parseISODate = (dateString) => {
|
|
219
|
+
if (dateString && isoRegex.test(dateString)) {
|
|
220
|
+
const parsedDate = (0, date_fns_1.parseISO)(dateString);
|
|
221
|
+
if ((0, date_fns_1.isValid)(parsedDate)) {
|
|
222
|
+
return parsedDate;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return undefined;
|
|
226
|
+
};
|
|
227
|
+
const parseDate = (dateString) => {
|
|
228
|
+
if (dateString) {
|
|
229
|
+
for (const format of exports.dateFormats) {
|
|
230
|
+
const parsedDate = (0, date_fns_1.parse)(dateString, format, new Date());
|
|
231
|
+
if ((0, date_fns_1.isValid)(parsedDate)) {
|
|
232
|
+
return parsedDate;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return undefined;
|
|
237
|
+
};
|
|
@@ -20,14 +20,38 @@ exports.DropdownMenuMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
20
20
|
props: {
|
|
21
21
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
22
22
|
triggerTemplate: (0, metadata_helpers_1.dTriggerTemplate)(DDMCOMP),
|
|
23
|
-
alignment:
|
|
23
|
+
alignment: {
|
|
24
|
+
description: `This property allows you to determine the alignment of the displayed menu items.`,
|
|
25
|
+
valueType: "string",
|
|
26
|
+
availableValues: abstractions_1.alignmentOptionMd,
|
|
27
|
+
defaultValue: DropdownMenuNative_1.defaultDropdownMenuProps.alignment,
|
|
28
|
+
},
|
|
24
29
|
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
25
|
-
triggerButtonVariant:
|
|
26
|
-
`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
triggerButtonVariant: {
|
|
31
|
+
description: `This property defines the theme variant of the \`Button\` as the dropdown menu's trigger. ` +
|
|
32
|
+
`It has no effect when a custom trigger is defined with \`triggerTemplate\`.`,
|
|
33
|
+
valueType: "string",
|
|
34
|
+
availableValues: abstractions_1.buttonVariantMd,
|
|
35
|
+
defaultValue: DropdownMenuNative_1.defaultDropdownMenuProps.triggerButtonVariant,
|
|
36
|
+
},
|
|
37
|
+
triggerButtonThemeColor: {
|
|
38
|
+
description: `This property defines the theme color of the \`Button\` as the dropdown menu's trigger. ` +
|
|
39
|
+
`It has no effect when a custom trigger is defined with \`triggerTemplate\`.`,
|
|
40
|
+
valueType: "string",
|
|
41
|
+
availableValues: abstractions_1.buttonThemeMd,
|
|
42
|
+
defaultValue: DropdownMenuNative_1.defaultDropdownMenuProps.triggerButtonThemeColor,
|
|
43
|
+
},
|
|
44
|
+
triggerButtonIcon: {
|
|
45
|
+
description: `This property defines the icon to display on the trigger button.`,
|
|
46
|
+
defaultValue: DropdownMenuNative_1.defaultDropdownMenuProps.triggerButtonIcon,
|
|
47
|
+
valueType: "string",
|
|
48
|
+
},
|
|
49
|
+
triggerButtonIconPosition: {
|
|
50
|
+
description: `This property defines the position of the icon on the trigger button.`,
|
|
51
|
+
defaultValue: DropdownMenuNative_1.defaultDropdownMenuProps.triggerButtonIconPosition,
|
|
52
|
+
valueType: "string",
|
|
53
|
+
availableValues: abstractions_1.iconPositionMd,
|
|
54
|
+
},
|
|
31
55
|
},
|
|
32
56
|
events: {
|
|
33
57
|
willOpen: (0, ComponentDefs_1.d)(`This event fires when the \`${DDMCOMP}\` component is opened.`),
|
|
@@ -53,12 +77,27 @@ exports.MenuItemMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
53
77
|
description: `This property represents a leaf item in a menu hierarchy. Clicking the item triggers an action.`,
|
|
54
78
|
docFolder: DDMCOMP,
|
|
55
79
|
props: {
|
|
56
|
-
iconPosition:
|
|
57
|
-
|
|
80
|
+
iconPosition: {
|
|
81
|
+
description: `This property allows you to determine the position of the icon displayed in the menu item.`,
|
|
82
|
+
valueType: "string",
|
|
83
|
+
availableValues: abstractions_1.iconPositionMd,
|
|
84
|
+
defaultValue: DropdownMenuNative_1.defaultMenuItemProps.iconPosition,
|
|
85
|
+
},
|
|
86
|
+
icon: {
|
|
87
|
+
description: `This property names an optional icon to display with the menu item.`,
|
|
88
|
+
valueType: "string",
|
|
89
|
+
},
|
|
58
90
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
59
|
-
to:
|
|
60
|
-
`
|
|
61
|
-
|
|
91
|
+
to: {
|
|
92
|
+
description: `This property defines the URL of the menu item. If this property is defined (and the \`click\` ` +
|
|
93
|
+
`event does not have an event handler), clicking the menu item navigates to this link.`,
|
|
94
|
+
valueType: "string",
|
|
95
|
+
},
|
|
96
|
+
active: {
|
|
97
|
+
description: `This property indicates if the specified menu item is active.`,
|
|
98
|
+
valueType: "boolean",
|
|
99
|
+
defaultValue: DropdownMenuNative_1.defaultMenuItemProps.active,
|
|
100
|
+
},
|
|
62
101
|
},
|
|
63
102
|
events: {
|
|
64
103
|
click: (0, metadata_helpers_1.dClick)(MICOMP),
|
|
@@ -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.DropdownMenu = void 0;
|
|
48
|
+
exports.defaultMenuItemProps = exports.DropdownMenu = exports.defaultDropdownMenuProps = void 0;
|
|
49
49
|
exports.MenuItem = MenuItem;
|
|
50
50
|
exports.SubMenuItem = SubMenuItem;
|
|
51
51
|
exports.MenuSeparator = MenuSeparator;
|
|
@@ -59,7 +59,14 @@ const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
|
59
59
|
const constants_1 = require("../../components-core/constants");
|
|
60
60
|
const ButtonNative_1 = require("../Button/ButtonNative");
|
|
61
61
|
const IconNative_1 = require("../Icon/IconNative");
|
|
62
|
-
exports.
|
|
62
|
+
exports.defaultDropdownMenuProps = {
|
|
63
|
+
alignment: "start",
|
|
64
|
+
triggerButtonVariant: "ghost",
|
|
65
|
+
triggerButtonThemeColor: "primary",
|
|
66
|
+
triggerButtonIcon: "chevrondown",
|
|
67
|
+
triggerButtonIconPosition: "end",
|
|
68
|
+
};
|
|
69
|
+
exports.DropdownMenu = (0, react_1.forwardRef)(function DropdownMenu({ triggerTemplate, children, label, registerComponentApi, style, onWillOpen, alignment = exports.defaultDropdownMenuProps.alignment, disabled = false, triggerButtonVariant = exports.defaultDropdownMenuProps.triggerButtonVariant, triggerButtonThemeColor = exports.defaultDropdownMenuProps.triggerButtonThemeColor, triggerButtonIcon = exports.defaultDropdownMenuProps.triggerButtonIcon, triggerButtonIconPosition = exports.defaultDropdownMenuProps.triggerButtonIconPosition, }, ref) {
|
|
63
70
|
const { root } = (0, ThemeContext_1.useTheme)();
|
|
64
71
|
const [open, setOpen] = (0, react_2.useState)(false);
|
|
65
72
|
(0, react_2.useEffect)(() => {
|
|
@@ -77,7 +84,11 @@ exports.DropdownMenu = (0, react_1.forwardRef)(function DropdownMenu({ triggerTe
|
|
|
77
84
|
setOpen(isOpen);
|
|
78
85
|
}), children: [(0, jsx_runtime_1.jsx)(ReactDropdownMenu.Trigger, { asChild: true, disabled: disabled, ref: ref, children: triggerTemplate ? (triggerTemplate) : ((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { icon: (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: triggerButtonIcon }), iconPosition: triggerButtonIconPosition, type: "button", variant: triggerButtonVariant, themeColor: triggerButtonThemeColor, disabled: disabled, children: label })) }), (0, jsx_runtime_1.jsx)(ReactDropdownMenu.Portal, { container: root, children: (0, jsx_runtime_1.jsx)(ReactDropdownMenu.Content, { align: alignment, style: style, className: DropdownMenu_module_scss_1.default.DropdownMenuContent, children: children }) })] }));
|
|
79
86
|
});
|
|
80
|
-
|
|
87
|
+
exports.defaultMenuItemProps = {
|
|
88
|
+
iconPosition: "start",
|
|
89
|
+
active: false,
|
|
90
|
+
};
|
|
91
|
+
function MenuItem({ children, onClick = constants_1.noop, label, style, icon, iconPosition = exports.defaultMenuItemProps.iconPosition, active = exports.defaultMenuItemProps.active, }) {
|
|
81
92
|
const iconToStart = iconPosition === "start";
|
|
82
93
|
return ((0, jsx_runtime_1.jsxs)(ReactDropdownMenu.Item, { style: style, className: (0, classnames_1.default)(DropdownMenu_module_scss_1.default.DropdownMenuItem, {
|
|
83
94
|
[DropdownMenu_module_scss_1.default.active]: active,
|
|
@@ -9,23 +9,26 @@ const Footer_module_scss_1 = __importDefault(require("./Footer.module.scss"));
|
|
|
9
9
|
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
10
|
const renderers_1 = require("../../components-core/renderers");
|
|
11
11
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
-
const base_utils_1 = require("../../components-core/theming/themes/base-utils");
|
|
13
12
|
const FooterNative_1 = require("./FooterNative");
|
|
14
13
|
const COMP = "Footer";
|
|
15
14
|
exports.FooterMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
15
|
description: `The \`${COMP}\` is a component that acts as a placeholder within \`App\`.`,
|
|
17
16
|
themeVars: (0, themeVars_1.parseScssVar)(Footer_module_scss_1.default.themeVars),
|
|
18
|
-
defaultThemeVars:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
17
|
+
defaultThemeVars: {
|
|
18
|
+
[`color-bg-${COMP}`]: "$color-bg-AppHeader",
|
|
19
|
+
[`align-vertical-${COMP}`]: "center",
|
|
20
|
+
[`font-size-${COMP}`]: "$font-size-small",
|
|
21
|
+
[`color-text-${COMP}`]: "$color-text-secondary",
|
|
22
|
+
[`max-content-width-${COMP}`]: "$max-content-width",
|
|
23
|
+
[`border-${COMP}`]: `1px solid $color-border`,
|
|
24
|
+
[`padding-${COMP}`]: "$space-2 $space-4",
|
|
25
|
+
light: {
|
|
25
26
|
// --- No light-specific theme vars
|
|
26
|
-
},
|
|
27
|
+
},
|
|
28
|
+
dark: {
|
|
27
29
|
// --- No dark-specific theme vars
|
|
28
|
-
}
|
|
30
|
+
},
|
|
31
|
+
},
|
|
29
32
|
});
|
|
30
33
|
exports.footerRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.FooterMd, ({ node, renderChild, layoutCss, layoutContext }) => {
|
|
31
34
|
return ((0, jsx_runtime_1.jsx)(FooterNative_1.Footer, { style: layoutCss, className: layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.themeClassName, children: renderChild(node.children, {
|
|
@@ -48,7 +48,13 @@ exports.FormMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
48
48
|
},
|
|
49
49
|
contextVars: {
|
|
50
50
|
$data: (0, ComponentDefs_1.d)(`This property represents the value of the form data. You can access the fields of the form ` +
|
|
51
|
-
`using the IDs in the \`bindTo\` property of nested \`FormItem\` instances
|
|
51
|
+
`using the IDs in the \`bindTo\` property of nested \`FormItem\` instances. \`$data\` also ` +
|
|
52
|
+
`provides an \`update\` method as a shortcut to the Form's exposed \`update\` method.`),
|
|
53
|
+
},
|
|
54
|
+
apis: {
|
|
55
|
+
reset: (0, ComponentDefs_1.d)(`Call this event to reset the form to its initial state.`),
|
|
56
|
+
update: (0, ComponentDefs_1.d)("You can pass a data object to update the form data. The properties in the passed data " +
|
|
57
|
+
"object are updated to their values accordingly. Other form properties remain intact."),
|
|
52
58
|
},
|
|
53
59
|
themeVars: (0, themeVars_1.parseScssVar)(Form_module_scss_1.default.themeVars),
|
|
54
60
|
defaultThemeVars: {
|
|
@@ -283,23 +283,52 @@ const Form = (0, react_2.forwardRef)(function ({ formState, dispatch, initialVal
|
|
|
283
283
|
dispatch((0, formActions_2.formReset)(initialValue));
|
|
284
284
|
onReset === null || onReset === void 0 ? void 0 : onReset();
|
|
285
285
|
});
|
|
286
|
+
const updateData = (0, misc_1.useEvent)((change) => {
|
|
287
|
+
if (typeof change !== "object" || change === null || change === undefined) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
Object.entries(change).forEach(([key, value]) => {
|
|
291
|
+
dispatch({
|
|
292
|
+
type: formActions_1.FormActionKind.FIELD_VALUE_CHANGED,
|
|
293
|
+
payload: {
|
|
294
|
+
uid: key,
|
|
295
|
+
value: value,
|
|
296
|
+
},
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
});
|
|
286
300
|
const cancelButton = cancelLabel === "" ? null : ((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { type: "button", themeColor: "secondary", variant: "ghost", onClick: doCancel, children: cancelLabel }, "cancel"));
|
|
287
301
|
const submitButton = (0, react_2.useMemo)(() => ((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { type: "submit", disabled: !isEnabled, children: formState.submitInProgress ? saveInProgressLabel : saveLabel }, "submit")), [isEnabled, formState.submitInProgress, saveInProgressLabel, saveLabel]);
|
|
288
302
|
(0, react_2.useEffect)(() => {
|
|
289
303
|
registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
|
|
290
304
|
reset: doReset,
|
|
305
|
+
update: updateData,
|
|
291
306
|
});
|
|
292
|
-
}, [doReset, registerComponentApi]);
|
|
307
|
+
}, [doReset, updateData, registerComponentApi]);
|
|
293
308
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("form", { style: style, className: Form_module_scss_1.default.wrapper, onSubmit: doSubmit, onReset: doReset, id: id, ref: formRef, children: [(0, jsx_runtime_1.jsx)(ValidationSummary_1.ValidationSummary, { generalValidationResults: formState.generalValidationResults }), (0, jsx_runtime_1.jsx)(FormContext_1.FormContext.Provider, { value: formContextValue, children: children }), buttonRow || ((0, jsx_runtime_1.jsxs)("div", { className: Form_module_scss_1.default.buttonRow, children: [swapCancelAndSave && [submitButton, cancelButton], !swapCancelAndSave && [cancelButton, submitButton]] }))] }), confirmSubmitModalVisible && ((0, jsx_runtime_1.jsx)(ModalDialogNative_1.ModalDialog, { onClose: () => setConfirmSubmitModalVisible(false), isInitiallyOpen: true, title: "Are you sure want to move forward?", children: (0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "vertical", style: { gap: "0.5rem" }, children: [(0, jsx_runtime_1.jsx)(TextNative_1.Text, { children: "The following warnings were found during validation. Please make sure you are willing to move forward despite these issues." }), (0, jsx_runtime_1.jsx)(ValidationSummary_1.ValidationSummary, { generalValidationResults: formState.generalValidationResults, fieldValidationResults: formState.validationResults }), (0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "horizontal", horizontalAlignment: "end", style: { gap: "1em" }, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", themeColor: "secondary", onClick: () => setConfirmSubmitModalVisible(false), children: "No" }), (0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { onClick: () => doSubmit(), autoFocus: true, children: "Yes, proceed" })] })] }) }))] }));
|
|
294
309
|
});
|
|
295
310
|
Form.displayName = "Form";
|
|
296
311
|
function FormWithContextVar({ node, renderChild, extractValue, style, lookupEventHandler, registerComponentApi, }) {
|
|
297
312
|
const [formState, dispatch] = (0, react_2.useReducer)(formReducer, initialState);
|
|
298
313
|
const nodeWithItem = (0, react_2.useMemo)(() => {
|
|
314
|
+
const updateData = (change) => {
|
|
315
|
+
if (typeof change !== "object" || change === null || change === undefined) {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
Object.entries(change).forEach(([key, value]) => {
|
|
319
|
+
dispatch({
|
|
320
|
+
type: formActions_1.FormActionKind.FIELD_VALUE_CHANGED,
|
|
321
|
+
payload: {
|
|
322
|
+
uid: key,
|
|
323
|
+
value: value,
|
|
324
|
+
},
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
};
|
|
299
328
|
return {
|
|
300
329
|
type: "Fragment",
|
|
301
330
|
vars: {
|
|
302
|
-
$data: formState.subject,
|
|
331
|
+
$data: Object.assign(Object.assign({}, formState.subject), { update: updateData }),
|
|
303
332
|
},
|
|
304
333
|
children: node.children,
|
|
305
334
|
};
|
|
@@ -41,11 +41,12 @@ exports.HeadingMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
41
41
|
maxLines: MAX_LINES_DESC,
|
|
42
42
|
ellipses: ELLIPSES_DESC,
|
|
43
43
|
preserveLinebreaks: PRESERVE_DESC,
|
|
44
|
+
omitFromToc: (0, ComponentDefs_1.d)("If true, this heading will be excluded from the table of contents.", null, "boolean", false),
|
|
44
45
|
},
|
|
45
46
|
themeVars: (0, themeVars_1.parseScssVar)(Heading_module_scss_1.default.themeVars),
|
|
46
47
|
defaultThemeVars: {
|
|
47
48
|
[`font-family-${COMP}`]: "$font-family",
|
|
48
|
-
[`color-text-${COMP}`]: "
|
|
49
|
+
[`color-text-${COMP}`]: "inherit",
|
|
49
50
|
[`font-weight-${COMP}`]: "$font-weight-bold",
|
|
50
51
|
[`letter-spacing-${COMP} `]: "0",
|
|
51
52
|
light: {
|
|
@@ -189,9 +190,9 @@ exports.H6Md = (0, ComponentDefs_1.createMetadata)({
|
|
|
189
190
|
},
|
|
190
191
|
});
|
|
191
192
|
function renderHeading({ node, extractValue, layoutCss, level, renderChild }) {
|
|
192
|
-
var _a;
|
|
193
|
-
const
|
|
194
|
-
return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({ uid: node.uid, level: ((_a = extractValue.asOptionalString(level)) !== null && _a !== void 0 ? _a : "h1"), maxLines: extractValue.asOptionalNumber(maxLines), preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, false), ellipses: extractValue.asOptionalBoolean(ellipses, true), style: layoutCss }, (0, extractParam_1.resolveAndCleanProps)(restProps, extractValue, layoutCss), { children: extractValue.asDisplayText(node.props.value) || renderChild(node.children) })));
|
|
193
|
+
var _a, _b;
|
|
194
|
+
const _c = node.props, { maxLines, preserveLinebreaks, ellipses } = _c, restProps = __rest(_c, ["maxLines", "preserveLinebreaks", "ellipses"]);
|
|
195
|
+
return ((0, jsx_runtime_1.jsx)(HeadingNative_1.Heading, Object.assign({ uid: node.uid, level: ((_a = extractValue.asOptionalString(level)) !== null && _a !== void 0 ? _a : "h1"), maxLines: extractValue.asOptionalNumber(maxLines), preserveLinebreaks: extractValue.asOptionalBoolean(preserveLinebreaks, false), ellipses: extractValue.asOptionalBoolean(ellipses, true), style: layoutCss, omitFromToc: extractValue.asOptionalBoolean((_b = node.props) === null || _b === void 0 ? void 0 : _b.omitFromToc) }, (0, extractParam_1.resolveAndCleanProps)(restProps, extractValue, layoutCss), { children: extractValue.asDisplayText(node.props.value) || renderChild(node.children) })));
|
|
195
196
|
}
|
|
196
197
|
exports.headingComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.HeadingMd, ({ node, extractValue, layoutCss, renderChild }) => {
|
|
197
198
|
return renderHeading({
|