xmlui 0.9.56 → 0.9.58
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-CDFLYTIQ.mjs → apiInterceptorWorker-uyd3MlHU.mjs} +1 -1
- package/dist/lib/{index-DRdbVRNd.mjs → index-BqBDeBdn.mjs} +11446 -11158
- 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-4EQ6kQIM.mjs → metadata-utils-BXdiMJQN.mjs} +40 -31
- package/dist/lib/{server-common-C0cF2UTg.mjs → server-common-CN44QquQ.mjs} +1318 -739
- package/dist/lib/{transform-CgRMkbb0.mjs → transform-BboeJCuA.mjs} +798 -733
- package/dist/lib/xmlui-parser.d.ts +31 -6
- package/dist/lib/xmlui-parser.mjs +49 -42
- package/dist/lib/{xmlui-serializer-EDw51UFN.mjs → xmlui-serializer-D0p6Hyum.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +5 -4
- package/dist/lib/xmlui.mjs +2 -2
- package/dist/metadata/{apiInterceptorWorker-CL7I-FJl.mjs → apiInterceptorWorker-B4dqtAX9.mjs} +1 -1
- package/dist/metadata/{collectedComponentMetadata-J8g24vFO.mjs → collectedComponentMetadata-DFcuGgT_.mjs} +10743 -10367
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +110 -110
- package/dist/scripts/package.json +5 -4
- package/dist/scripts/src/components/APICall/APICall.js +12 -11
- package/dist/scripts/src/components/Accordion/Accordion.js +1 -1
- package/dist/scripts/src/components/App/App.js +3 -3
- package/dist/scripts/src/components/AppHeader/AppHeader.js +4 -2
- package/dist/scripts/src/components/AppState/AppState.js +4 -2
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +4 -2
- package/dist/scripts/src/components/Avatar/Avatar.js +4 -1
- package/dist/scripts/src/components/Badge/Badge.js +3 -1
- package/dist/scripts/src/components/Button/Button.js +3 -1
- package/dist/scripts/src/components/Card/Card.js +5 -2
- package/dist/scripts/src/components/Card/CardNative.js +2 -1
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +4 -2
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +4 -2
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +6 -5
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +4 -1
- package/dist/scripts/src/components/Charts/Legend/Legend.js +4 -1
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +4 -1
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +13 -7
- package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +9 -4
- package/dist/scripts/src/components/Checkbox/Checkbox.js +3 -2
- package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +1 -1
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +2 -2
- package/dist/scripts/src/components/Column/Column.js +14 -12
- package/dist/scripts/src/components/ComponentProvider.js +4 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
- package/dist/scripts/src/components/DatePicker/DatePicker.js +4 -1
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +18 -6
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +2 -2
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +6 -5
- package/dist/scripts/src/components/FileInput/FileInput.js +9 -4
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +2 -2
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +35 -6
- package/dist/scripts/src/components/Footer/Footer.js +4 -2
- package/dist/scripts/src/components/Form/Form.js +9 -3
- package/dist/scripts/src/components/Form/FormNative.js +12 -4
- package/dist/scripts/src/components/FormItem/FormItem.js +8 -9
- package/dist/scripts/src/components/FormSection/FormSection.js +2 -3
- package/dist/scripts/src/components/Heading/Heading.js +6 -3
- package/dist/scripts/src/components/HelloWorld/HelloWorld.js +103 -0
- package/dist/scripts/src/components/HelloWorld/HelloWorldNative.js +92 -0
- package/dist/scripts/src/components/Icon/Icon.js +4 -2
- package/dist/scripts/src/components/Image/Image.js +3 -2
- package/dist/scripts/src/components/Items/Items.js +7 -6
- package/dist/scripts/src/components/Link/Link.js +4 -2
- package/dist/scripts/src/components/Link/LinkNative.js +46 -1
- package/dist/scripts/src/components/List/List.js +10 -8
- package/dist/scripts/src/components/Logo/Logo.js +7 -5
- package/dist/scripts/src/components/Markdown/Markdown.js +6 -4
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +6 -7
- package/dist/scripts/src/components/NavGroup/NavGroup.js +4 -2
- package/dist/scripts/src/components/NavLink/NavLink.js +4 -2
- package/dist/scripts/src/components/NavPanel/NavPanel.js +5 -2
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -3
- package/dist/scripts/src/components/NestedApp/NestedApp.js +2 -2
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +3 -4
- package/dist/scripts/src/components/NoResult/NoResult.js +1 -2
- package/dist/scripts/src/components/NumberBox/NumberBox.js +5 -3
- package/dist/scripts/src/components/Option/Option.js +5 -3
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +2 -2
- package/dist/scripts/src/components/Pages/Pages.js +7 -5
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +4 -1
- package/dist/scripts/src/components/Queue/Queue.js +2 -2
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +4 -3
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +1 -1
- package/dist/scripts/src/components/Redirect/Redirect.js +3 -3
- package/dist/scripts/src/components/Select/Select.js +7 -4
- package/dist/scripts/src/components/Select/SelectNative.js +1 -1
- package/dist/scripts/src/components/Slider/Slider.js +5 -3
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +2 -2
- package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +3 -2
- package/dist/scripts/src/components/Stack/Stack.js +4 -1
- package/dist/scripts/src/components/StickyBox/StickyBox.js +2 -3
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +2 -0
- package/dist/scripts/src/components/Switch/Switch.js +1 -3
- package/dist/scripts/src/components/Table/Table.js +1 -2
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +2 -3
- package/dist/scripts/src/components/Tabs/TabItem.js +5 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +9 -3
- package/dist/scripts/src/components/Text/Text.js +2 -2
- package/dist/scripts/src/components/TextArea/TextArea.js +2 -2
- package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
- package/dist/scripts/src/components/Theme/NotificationToast.js +11 -0
- package/dist/scripts/src/components/Theme/Theme.js +2 -4
- package/dist/scripts/src/components/Theme/ThemeNative.js +4 -4
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +5 -5
- package/dist/scripts/src/components-core/Fragment.js +2 -1
- package/dist/scripts/src/components-core/RestApiProxy.js +10 -7
- package/dist/scripts/src/components-core/descriptorHelper.js +9 -0
- package/dist/scripts/src/components-core/rendering/AppContent.js +6 -2
- package/dist/scripts/src/components-core/theming/layout-resolver.js +18 -0
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +42 -39
- package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +65 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +10 -8
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +1 -2
- package/dist/standalone/xmlui-standalone.es.d.ts +5 -4
- package/dist/standalone/xmlui-standalone.umd.js +221 -221
- package/package.json +5 -4
|
@@ -13,9 +13,7 @@ const metadata_helpers_1 = require("../metadata-helpers");
|
|
|
13
13
|
const Toggle_1 = require("../Toggle/Toggle");
|
|
14
14
|
const COMP = "Switch";
|
|
15
15
|
exports.SwitchMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
|
-
description: `
|
|
17
|
-
`on and off. It consists of a small rectangular or circular button that can be moved left or right to ` +
|
|
18
|
-
`change its state.`,
|
|
16
|
+
description: "`Switch` enables users to toggle between two states: on and off.",
|
|
19
17
|
props: {
|
|
20
18
|
indeterminate: (0, metadata_helpers_1.dIndeterminate)(Toggle_1.defaultProps.indeterminate),
|
|
21
19
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
@@ -19,8 +19,7 @@ const SelectionStoreNative_1 = require("../SelectionStore/SelectionStoreNative")
|
|
|
19
19
|
const TableNative_1 = require("./TableNative");
|
|
20
20
|
const COMP = "Table";
|
|
21
21
|
exports.TableMd = (0, ComponentDefs_1.createMetadata)({
|
|
22
|
-
description:
|
|
23
|
-
`component is virtualized so it only renders visible cells.`,
|
|
22
|
+
description: "`Table` presents structured data for viewing, sorting, selection, and interaction.",
|
|
24
23
|
props: {
|
|
25
24
|
items: (0, metadata_helpers_1.dInternal)(`You can use \`items\` as an alias for the \`data\` property. ` +
|
|
26
25
|
`When you bind the table to a data source (e.g. an API endpoint), ` +
|
|
@@ -15,9 +15,8 @@ const COMP = "TableOfContents";
|
|
|
15
15
|
const COMP_CHILD = "TableOfContentsItem";
|
|
16
16
|
exports.TableOfContentsMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
17
|
status: "experimental",
|
|
18
|
-
description: `
|
|
19
|
-
|
|
20
|
-
`in this tree, the component navigates the page to the selected position.`,
|
|
18
|
+
description: "`TableOfContents` component collects [Heading](/components/Heading) and " +
|
|
19
|
+
"[Bookmark](/components/Bookmark) within the current page and displays them in a navigable tree.",
|
|
21
20
|
props: {
|
|
22
21
|
smoothScrolling: {
|
|
23
22
|
description: `This property indicates that smooth scrolling is used while scrolling the selected table ` +
|
|
@@ -8,8 +8,11 @@ const TabItemNative_1 = require("./TabItemNative");
|
|
|
8
8
|
const metadata_helpers_1 = require("../metadata-helpers");
|
|
9
9
|
const COMP = "TabItem";
|
|
10
10
|
exports.TabItemMd = (0, ComponentDefs_1.createMetadata)({
|
|
11
|
-
description:
|
|
12
|
-
|
|
11
|
+
description: "`TabItem` defines individual tabs within a [Tabs](/components/Tabs) component, " +
|
|
12
|
+
"providing both the tab header label and the content that displays when the tab " +
|
|
13
|
+
"is selected. As a non-visual structural component, it serves as a container that " +
|
|
14
|
+
"organizes content into distinct, switchable sections.",
|
|
15
|
+
docFolder: "Tabs",
|
|
13
16
|
props: {
|
|
14
17
|
label: (0, metadata_helpers_1.dLabel)(),
|
|
15
18
|
},
|
|
@@ -10,12 +10,14 @@ const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
|
10
10
|
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
11
11
|
const renderers_1 = require("../../components-core/renderers");
|
|
12
12
|
const container_helpers_1 = require("../container-helpers");
|
|
13
|
-
const metadata_helpers_1 = require("../metadata-helpers");
|
|
14
13
|
const TabsNative_1 = require("./TabsNative");
|
|
15
14
|
const COMP = "Tabs";
|
|
16
15
|
exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
16
|
status: "experimental",
|
|
18
|
-
description: `
|
|
17
|
+
description: "`Tabs` enables users to switch among content panels using clickable tab headers. " +
|
|
18
|
+
"It provides an efficient way to present multiple related sections in a single " +
|
|
19
|
+
"interface area, with each tab containing distinct content defined by " +
|
|
20
|
+
"[TabItem](/components/TabItem) components.",
|
|
19
21
|
props: {
|
|
20
22
|
activeTab: (0, ComponentDefs_1.d)(`This property indicates the index of the active tab. The indexing starts from 0, ` +
|
|
21
23
|
`representing the starting (leftmost) tab. If not set, the first tab is selected by default.`),
|
|
@@ -27,7 +29,11 @@ exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
27
29
|
defaultValue: TabsNative_1.defaultProps.orientation,
|
|
28
30
|
valueType: "string",
|
|
29
31
|
},
|
|
30
|
-
tabTemplate:
|
|
32
|
+
tabTemplate: {
|
|
33
|
+
description: `This property declares the template for the clickable tab area.`,
|
|
34
|
+
valueType: "ComponentDef",
|
|
35
|
+
isInternal: true,
|
|
36
|
+
},
|
|
31
37
|
},
|
|
32
38
|
apis: {
|
|
33
39
|
next: (0, ComponentDefs_1.d)(`This method selects the next tab.`),
|
|
@@ -83,9 +83,9 @@ exports.TextMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
83
83
|
[`fontFamily-${COMP}-sample`]: "$fontFamily-monospace",
|
|
84
84
|
[`fontSize-${COMP}-sample`]: "$fontSize-small",
|
|
85
85
|
[`fontSize-${COMP}-sup`]: "$fontSize-smaller",
|
|
86
|
-
[`
|
|
86
|
+
[`verticalAlignment-${COMP}-sup`]: "super",
|
|
87
87
|
[`fontSize-${COMP}-sub`]: "$fontSize-smaller",
|
|
88
|
-
[`
|
|
88
|
+
[`verticalAlignment-${COMP}-sub`]: "sub",
|
|
89
89
|
[`fontStyle-${COMP}-var`]: "italic",
|
|
90
90
|
[`fontStyle-${COMP}-em`]: "italic",
|
|
91
91
|
[`fontFamily-${COMP}-mono`]: "$fontFamily-monospace",
|
|
@@ -19,8 +19,8 @@ exports.resizeOptionsMd = [
|
|
|
19
19
|
{ value: "both", description: "Can resize in both dimensions" },
|
|
20
20
|
];
|
|
21
21
|
exports.TextAreaMd = (0, ComponentDefs_1.createMetadata)({
|
|
22
|
-
status: "
|
|
23
|
-
description:
|
|
22
|
+
status: "stable",
|
|
23
|
+
description: "`TextArea` provides a multiline text input area.",
|
|
24
24
|
props: {
|
|
25
25
|
enterSubmits: {
|
|
26
26
|
description: "This optional boolean property indicates whether pressing the \`Enter\` key on the " +
|
|
@@ -13,8 +13,9 @@ const metadata_helpers_1 = require("../metadata-helpers");
|
|
|
13
13
|
const TextBoxNative_1 = require("./TextBoxNative");
|
|
14
14
|
const COMP = "TextBox";
|
|
15
15
|
exports.TextBoxMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
|
-
status: "
|
|
17
|
-
description: `
|
|
16
|
+
status: "stable",
|
|
17
|
+
description: "`TextBox` captures user text input for forms, search fields, and data entry " +
|
|
18
|
+
"with support for validation, icons, and formatting hints.",
|
|
18
19
|
props: {
|
|
19
20
|
placeholder: (0, metadata_helpers_1.dPlaceholder)(),
|
|
20
21
|
initialValue: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInitialValue)()), { defaultValue: TextBoxNative_1.defaultProps.initialValue }),
|
|
@@ -84,8 +85,8 @@ function renderTextBox(layoutCss, state, updateState, extractValue, node, lookup
|
|
|
84
85
|
exports.textBoxComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TextBoxMd, ({ node, state, updateState, lookupEventHandler, extractValue, layoutCss, registerComponentApi, }) => {
|
|
85
86
|
return renderTextBox(layoutCss, state, updateState, extractValue, node, lookupEventHandler, registerComponentApi);
|
|
86
87
|
});
|
|
87
|
-
exports.PasswordMd = (0, ComponentDefs_1.createMetadata)(Object.assign(Object.assign({}, exports.TextBoxMd), { description: "
|
|
88
|
-
"
|
|
88
|
+
exports.PasswordMd = (0, ComponentDefs_1.createMetadata)(Object.assign(Object.assign({}, exports.TextBoxMd), { description: "`Password` is a specialized [TextBox](/components/TextBox) that enables users " +
|
|
89
|
+
"to input and edit passwords." }));
|
|
89
90
|
exports.passwordInputComponentRenderer = (0, renderers_1.createComponentRenderer)("PasswordInput", exports.PasswordMd, ({ node, state, updateState, lookupEventHandler, extractValue, layoutCss, registerComponentApi, }) => {
|
|
90
91
|
return renderTextBox(layoutCss, state, updateState, extractValue, node, lookupEventHandler, registerComponentApi, "password");
|
|
91
92
|
});
|
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.NotificationToast = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = require("react");
|
|
38
39
|
const react_hot_toast_1 = __importStar(require("react-hot-toast"));
|
|
39
40
|
const TOASTER_CONTAINER_STYLE = {
|
|
40
41
|
top: 40,
|
|
@@ -44,7 +45,17 @@ const TOASTER_CONTAINER_STYLE = {
|
|
|
44
45
|
position: "absolute",
|
|
45
46
|
overflowY: "hidden",
|
|
46
47
|
};
|
|
48
|
+
let toasterMounted = false;
|
|
47
49
|
const NotificationToast = ({ toastDuration }) => {
|
|
50
|
+
const [shouldRender, setShouldRender] = (0, react_1.useState)(false);
|
|
51
|
+
(0, react_1.useEffect)(() => {
|
|
52
|
+
if (!toasterMounted) {
|
|
53
|
+
toasterMounted = true;
|
|
54
|
+
setShouldRender(true);
|
|
55
|
+
}
|
|
56
|
+
}, []);
|
|
57
|
+
if (!shouldRender)
|
|
58
|
+
return null;
|
|
48
59
|
return ((0, jsx_runtime_1.jsx)(react_hot_toast_1.Toaster, { position: "top-right", containerStyle: TOASTER_CONTAINER_STYLE, toastOptions: { style: { padding: "12px 16px" }, duration: toastDuration }, children: (t) => ((0, jsx_runtime_1.jsx)("div", { onClick: () => react_hot_toast_1.default.dismiss(t.id), children: (0, jsx_runtime_1.jsx)(react_hot_toast_1.ToastBar, { position: t.position, toast: t, style: { wordBreak: "break-word" }, children: ({ icon, message }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, message] })) }) })) }));
|
|
49
60
|
};
|
|
50
61
|
exports.NotificationToast = NotificationToast;
|
|
@@ -18,10 +18,8 @@ const renderers_1 = require("../../components-core/renderers");
|
|
|
18
18
|
const ThemeNative_1 = require("./ThemeNative");
|
|
19
19
|
const COMP = "Theme";
|
|
20
20
|
exports.ThemeMd = (0, ComponentDefs_1.createMetadata)({
|
|
21
|
-
description: `
|
|
22
|
-
|
|
23
|
-
`theming context for all of its child components. Theme variables and theme settings ` +
|
|
24
|
-
`only work in this context.`,
|
|
21
|
+
description: "`Theme` creates styling contexts to customize the appearance of nested " +
|
|
22
|
+
"components without using CSS.",
|
|
25
23
|
allowArbitraryProps: true,
|
|
26
24
|
props: {
|
|
27
25
|
themeId: (0, ComponentDefs_1.d)(`This property specifies which theme to use by setting the theme's id.`),
|
|
@@ -46,7 +46,7 @@ function Theme({ id, isRoot = exports.defaultProps.isRoot, renderChild, node, to
|
|
|
46
46
|
var _a, _b, _c;
|
|
47
47
|
const themeToExtend = id ? themes.find((theme) => theme.id === id) : activeTheme;
|
|
48
48
|
if (!themeToExtend) {
|
|
49
|
-
throw new Error(
|
|
49
|
+
throw new Error(`Theme not found: requested="${id}", available=[${themes.map((t) => t.id).join(", ")}]`);
|
|
50
50
|
}
|
|
51
51
|
const foundTheme = Object.assign(Object.assign({}, themeToExtend), { id: generatedId, tones: Object.assign(Object.assign({}, themeToExtend.tones), { [themeTone]: Object.assign(Object.assign({}, (_a = themeToExtend.tones) === null || _a === void 0 ? void 0 : _a[themeTone]), { themeVars: Object.assign(Object.assign({}, (_c = (_b = themeToExtend.tones) === null || _b === void 0 ? void 0 : _b[themeTone]) === null || _c === void 0 ? void 0 : _c.themeVars), themeVars) }) }) });
|
|
52
52
|
return foundTheme;
|
|
@@ -75,15 +75,15 @@ function Theme({ id, isRoot = exports.defaultProps.isRoot, renderChild, node, to
|
|
|
75
75
|
@media (min-width: calc(${maxWidthLandscapePhone} + 1px)) {
|
|
76
76
|
--screenSize: 2;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
|
|
79
79
|
@media (min-width: calc(${maxWidthTablet} + 1px)) {
|
|
80
80
|
--screenSize: 3;
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
|
|
83
83
|
@media (min-width: calc(${maxWidthDesktop} + 1px)) {
|
|
84
84
|
--screenSize: 4;
|
|
85
85
|
}
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
@media (min-width: calc(${maxWidthLargeDesktop} + 1px)) {
|
|
88
88
|
--screenSize: 5;
|
|
89
89
|
}
|
|
@@ -13,11 +13,11 @@ const LIGHT_TO_DARK_ICON = "lightToDark:ToneChangerButton";
|
|
|
13
13
|
const DARK_TO_LIGHT_ICON = "darkToLight:ToneChangerButton";
|
|
14
14
|
exports.defaultProps = {
|
|
15
15
|
lightToDarkIcon: LIGHT_TO_DARK_ICON,
|
|
16
|
-
darkToLightIcon: DARK_TO_LIGHT_ICON
|
|
16
|
+
darkToLightIcon: DARK_TO_LIGHT_ICON,
|
|
17
17
|
};
|
|
18
18
|
exports.ToneChangerButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
19
|
-
status: "
|
|
20
|
-
description: `
|
|
19
|
+
status: "stable",
|
|
20
|
+
description: "`ToneChangerButton` enables the user to switch between light and dark modes.",
|
|
21
21
|
props: {
|
|
22
22
|
lightToDarkIcon: {
|
|
23
23
|
description: `The icon displayed when the theme is in light mode and will switch to dark. You can change ` +
|
|
@@ -33,7 +33,7 @@ exports.ToneChangerButtonMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
|
-
function ToneChangerButton({ lightToDarkIcon = exports.defaultProps.lightToDarkIcon, darkToLightIcon = exports.defaultProps.darkToLightIcon }) {
|
|
36
|
+
function ToneChangerButton({ lightToDarkIcon = exports.defaultProps.lightToDarkIcon, darkToLightIcon = exports.defaultProps.darkToLightIcon, }) {
|
|
37
37
|
const { activeThemeTone, setActiveThemeTone } = (0, ThemeContext_1.useThemes)();
|
|
38
38
|
// Use the direct icon name as both the main icon and the fallback
|
|
39
39
|
// This ensures we always have a working icon
|
|
@@ -45,5 +45,5 @@ function ToneChangerButton({ lightToDarkIcon = exports.defaultProps.lightToDarkI
|
|
|
45
45
|
* Define the renderer for the ToneChangerButton component
|
|
46
46
|
*/
|
|
47
47
|
exports.toneChangerButtonComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ToneChangerButtonMd, ({ node, extractValue }) => {
|
|
48
|
-
return (0, jsx_runtime_1.jsx)(ToneChangerButton, { lightToDarkIcon: extractValue.asOptionalString(node.props.lightToDarkIcon), darkToLightIcon: extractValue.asOptionalString(node.props.darkToLightIcon) });
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(ToneChangerButton, { lightToDarkIcon: extractValue.asOptionalString(node.props.lightToDarkIcon), darkToLightIcon: extractValue.asOptionalString(node.props.darkToLightIcon) }));
|
|
49
49
|
});
|
|
@@ -7,7 +7,8 @@ const ComponentDefs_1 = require("../abstractions/ComponentDefs");
|
|
|
7
7
|
const renderers_1 = require("./renderers");
|
|
8
8
|
const COMP = "Fragment";
|
|
9
9
|
exports.FragmentMd = (0, ComponentDefs_1.createMetadata)({
|
|
10
|
-
description: `
|
|
10
|
+
description: "`Fragment` provides conditional rendering. You can use `when=` on any " +
|
|
11
|
+
"component to render it conditionally, use `Fragment` to apply `when` to a group of components.",
|
|
11
12
|
opaque: true,
|
|
12
13
|
});
|
|
13
14
|
exports.fragmentComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.FragmentMd, ({ node, extractValue, renderChild, layoutContext }) => {
|
|
@@ -51,8 +51,8 @@ const process_statement_sync_1 = require("./script-runner/process-statement-sync
|
|
|
51
51
|
function isAxiosResponse(response) {
|
|
52
52
|
return "data" in response;
|
|
53
53
|
}
|
|
54
|
-
function parseResponseJson(
|
|
55
|
-
return __awaiter(this,
|
|
54
|
+
function parseResponseJson(response_1) {
|
|
55
|
+
return __awaiter(this, arguments, void 0, function* (response, logError = false) {
|
|
56
56
|
let resp;
|
|
57
57
|
if (isAxiosResponse(response)) {
|
|
58
58
|
resp = response.data;
|
|
@@ -66,7 +66,9 @@ function parseResponseJson(response) {
|
|
|
66
66
|
resp = yield response.clone().text();
|
|
67
67
|
}
|
|
68
68
|
catch (e) {
|
|
69
|
-
|
|
69
|
+
if (logError) {
|
|
70
|
+
console.error("Failed to parse response as text or JSON", response.body);
|
|
71
|
+
}
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
}
|
|
@@ -230,6 +232,7 @@ class RestApiProxy {
|
|
|
230
232
|
return value;
|
|
231
233
|
};
|
|
232
234
|
this.executeOperation = (_a) => __awaiter(this, [_a], void 0, function* ({ operation, contextParams, abortSignal, resolveBindingExpressions, relativePath = this.extractParam(resolveBindingExpressions, operation.url, contextParams), method = this.extractParam(resolveBindingExpressions, operation.method, contextParams), queryParams = this.extractParam(resolveBindingExpressions, operation.queryParams, contextParams), body = this.extractParam(resolveBindingExpressions, operation.body, contextParams, true), rawBody = this.extractParam(resolveBindingExpressions, operation.rawBody, contextParams), headers = this.extractParam(resolveBindingExpressions, operation.headers, contextParams), payloadType = this.extractParam(resolveBindingExpressions, operation.payloadType, contextParams) || "json", onUploadProgress, parseResponse = this.tryParseResponse, transactionId, }) {
|
|
235
|
+
var _b, _c, _d, _e, _f, _g;
|
|
233
236
|
const includeClientTxId = method && method !== "get" && !!transactionId;
|
|
234
237
|
const headersWithoutContentType = Object.assign(Object.assign({}, this.getHeaders()), { ["Content-Type"]: undefined });
|
|
235
238
|
const aggregatedHeaders = (0, lodash_es_1.omitBy)(Object.assign(Object.assign({}, (body ? this.getHeaders() : headersWithoutContentType)), headers), lodash_es_1.isUndefined);
|
|
@@ -278,7 +281,7 @@ class RestApiProxy {
|
|
|
278
281
|
data: options.body,
|
|
279
282
|
onUploadProgress,
|
|
280
283
|
});
|
|
281
|
-
return yield parseResponse(response);
|
|
284
|
+
return yield parseResponse(response, (_d = (_c = (_b = this.appContext) === null || _b === void 0 ? void 0 : _b.appGlobals) === null || _c === void 0 ? void 0 : _c.logRestApiErrors) !== null && _d !== void 0 ? _d : false);
|
|
282
285
|
}
|
|
283
286
|
catch (error) {
|
|
284
287
|
if (axios.isAxiosError(error) && error.response) {
|
|
@@ -294,12 +297,12 @@ class RestApiProxy {
|
|
|
294
297
|
if (!response.clone().ok) {
|
|
295
298
|
throw yield this.raiseError(response);
|
|
296
299
|
}
|
|
297
|
-
const parsedResponse = yield parseResponse(response.clone());
|
|
300
|
+
const parsedResponse = yield parseResponse(response.clone(), (_g = (_f = (_e = this.appContext) === null || _e === void 0 ? void 0 : _e.appGlobals) === null || _f === void 0 ? void 0 : _f.logRestApiErrors) !== null && _g !== void 0 ? _g : false);
|
|
298
301
|
return parsedResponse;
|
|
299
302
|
}
|
|
300
303
|
});
|
|
301
|
-
this.tryParseResponse = (
|
|
302
|
-
return yield parseResponseJson(response);
|
|
304
|
+
this.tryParseResponse = (response_1, ...args_1) => __awaiter(this, [response_1, ...args_1], void 0, function* (response, logError = false) {
|
|
305
|
+
return yield parseResponseJson(response, logError);
|
|
303
306
|
});
|
|
304
307
|
this.raiseError = (response) => __awaiter(this, void 0, void 0, function* () {
|
|
305
308
|
if ("config" in response) {
|
|
@@ -130,8 +130,8 @@ function AppContent({ rootContainer, routerBaseName, globalProps, standalone, tr
|
|
|
130
130
|
const isViewportTablet = (0, hooks_1.useMediaQuery)(`(min-width: ${maxWidthLandscapePhone}) and (max-width: ${maxWidthTabletLower})`);
|
|
131
131
|
const isViewportDesktop = (0, hooks_1.useMediaQuery)(`(min-width: ${maxWidthTablet}) and (max-width: ${maxWidthDesktopLower})`);
|
|
132
132
|
const isViewportLargeDesktop = (0, hooks_1.useMediaQuery)(`(min-width: ${maxWidthDesktop}) and (max-width: ${maxWidthLargeDesktopLower})`);
|
|
133
|
-
let vpSize
|
|
134
|
-
let vpSizeIndex
|
|
133
|
+
let vpSize;
|
|
134
|
+
let vpSizeIndex;
|
|
135
135
|
const isViewportXlDesktop = (0, hooks_1.useMediaQuery)(`(min-width: ${maxWidthLargeDesktop})`);
|
|
136
136
|
if (isViewportXlDesktop) {
|
|
137
137
|
vpSize = "xxl";
|
|
@@ -153,6 +153,10 @@ function AppContent({ rootContainer, routerBaseName, globalProps, standalone, tr
|
|
|
153
153
|
vpSize = "sm";
|
|
154
154
|
vpSizeIndex = 1;
|
|
155
155
|
}
|
|
156
|
+
else if (isViewportPhone) {
|
|
157
|
+
vpSize = "xs";
|
|
158
|
+
vpSizeIndex = 0;
|
|
159
|
+
}
|
|
156
160
|
// --- Collect information about the current environment
|
|
157
161
|
const isInIFrame = (0, hooks_1.useIsInIFrame)();
|
|
158
162
|
const isWindowFocused = (0, hooks_1.useIsWindowFocused)();
|
|
@@ -111,11 +111,15 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
111
111
|
collectCss("fontSize");
|
|
112
112
|
collectCss("fontWeight");
|
|
113
113
|
collectCss("fontStyle");
|
|
114
|
+
collectCss("fontVariant");
|
|
115
|
+
collectCss("lineBreak");
|
|
114
116
|
collectCss("textDecoration");
|
|
115
117
|
collectCss("textDecorationLine");
|
|
116
118
|
collectCss("textDecorationColor");
|
|
117
119
|
collectCss("textDecorationStyle");
|
|
118
120
|
collectCss("textDecorationThickness");
|
|
121
|
+
collectCss("textIndent");
|
|
122
|
+
collectCss("textShadow");
|
|
119
123
|
collectCss("textUnderlineOffset");
|
|
120
124
|
collectCss("userSelect");
|
|
121
125
|
collectCss("letterSpacing");
|
|
@@ -124,6 +128,10 @@ function resolveLayoutProps(layoutProps = constants_1.EMPTY_OBJECT, layoutContex
|
|
|
124
128
|
collectCss("textAlign");
|
|
125
129
|
collectCss("textAlignLast");
|
|
126
130
|
collectCss("textWrap");
|
|
131
|
+
collectCss("wordBreak");
|
|
132
|
+
collectCss("wordSpacing");
|
|
133
|
+
collectCss("wordWrap");
|
|
134
|
+
collectCss("writingMode");
|
|
127
135
|
// --- Other
|
|
128
136
|
collectCss("backgroundColor");
|
|
129
137
|
collectCss("background");
|
|
@@ -339,6 +347,8 @@ const layoutPatterns = {
|
|
|
339
347
|
fontSize: [],
|
|
340
348
|
fontWeight: [],
|
|
341
349
|
fontStyle: [booleanRegex],
|
|
350
|
+
fontVariant: [],
|
|
351
|
+
lineBreak: [],
|
|
342
352
|
textDecoration: [],
|
|
343
353
|
userSelect: [],
|
|
344
354
|
letterSpacing: [],
|
|
@@ -347,6 +357,12 @@ const layoutPatterns = {
|
|
|
347
357
|
textAlign: [],
|
|
348
358
|
textWrap: [],
|
|
349
359
|
textAlignLast: [],
|
|
360
|
+
textIndent: [],
|
|
361
|
+
textShadow: [],
|
|
362
|
+
wordBreak: [],
|
|
363
|
+
wordSpacing: [],
|
|
364
|
+
wordWrap: [],
|
|
365
|
+
writingMode: [],
|
|
350
366
|
// --- Content rendering
|
|
351
367
|
wrapContent: [],
|
|
352
368
|
canShrink: [],
|
|
@@ -365,4 +381,6 @@ const layoutPatterns = {
|
|
|
365
381
|
outlineColor: [],
|
|
366
382
|
outlineStyle: [],
|
|
367
383
|
outlineOffset: [],
|
|
384
|
+
// --- Animation
|
|
385
|
+
transition: [],
|
|
368
386
|
};
|
|
@@ -2,16 +2,37 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createXmlUiParser = createXmlUiParser;
|
|
4
4
|
exports.parseXmlUiMarkup = parseXmlUiMarkup;
|
|
5
|
+
const syntax_node_1 = require("./syntax-node");
|
|
5
6
|
const CharacterCodes_1 = require("./CharacterCodes");
|
|
6
7
|
const scanner_1 = require("./scanner");
|
|
7
8
|
const syntax_kind_1 = require("./syntax-kind");
|
|
8
9
|
const utils_1 = require("./utils");
|
|
9
10
|
const diagnostics_1 = require("./diagnostics");
|
|
10
11
|
const RECOVER_FILE = [syntax_kind_1.SyntaxKind.CData, syntax_kind_1.SyntaxKind.Script, syntax_kind_1.SyntaxKind.OpenNodeStart];
|
|
11
|
-
const RECOVER_OPEN_TAG = [
|
|
12
|
+
const RECOVER_OPEN_TAG = [
|
|
13
|
+
syntax_kind_1.SyntaxKind.OpenNodeStart,
|
|
14
|
+
syntax_kind_1.SyntaxKind.NodeEnd,
|
|
15
|
+
syntax_kind_1.SyntaxKind.NodeClose,
|
|
16
|
+
syntax_kind_1.SyntaxKind.CloseNodeStart,
|
|
17
|
+
syntax_kind_1.SyntaxKind.CData,
|
|
18
|
+
syntax_kind_1.SyntaxKind.Script,
|
|
19
|
+
];
|
|
12
20
|
const RECOVER_ATTR = [syntax_kind_1.SyntaxKind.Identifier, ...RECOVER_OPEN_TAG];
|
|
13
|
-
const RECOVER_CONTENT_LIST = [
|
|
14
|
-
|
|
21
|
+
const RECOVER_CONTENT_LIST = [
|
|
22
|
+
syntax_kind_1.SyntaxKind.TextNode,
|
|
23
|
+
syntax_kind_1.SyntaxKind.StringLiteral,
|
|
24
|
+
syntax_kind_1.SyntaxKind.CData,
|
|
25
|
+
syntax_kind_1.SyntaxKind.Script,
|
|
26
|
+
syntax_kind_1.SyntaxKind.OpenNodeStart,
|
|
27
|
+
syntax_kind_1.SyntaxKind.CloseNodeStart,
|
|
28
|
+
];
|
|
29
|
+
const RECOVER_CLOSE_TAG = [
|
|
30
|
+
syntax_kind_1.SyntaxKind.NodeEnd,
|
|
31
|
+
syntax_kind_1.SyntaxKind.OpenNodeStart,
|
|
32
|
+
syntax_kind_1.SyntaxKind.CloseNodeStart,
|
|
33
|
+
syntax_kind_1.SyntaxKind.CData,
|
|
34
|
+
syntax_kind_1.SyntaxKind.Script,
|
|
35
|
+
];
|
|
15
36
|
function createXmlUiParser(source) {
|
|
16
37
|
return {
|
|
17
38
|
parse: () => parseXmlUiMarkup(source),
|
|
@@ -208,7 +229,11 @@ function parseXmlUiMarkup(text) {
|
|
|
208
229
|
nameIdent = bump(syntax_kind_1.SyntaxKind.Identifier);
|
|
209
230
|
}
|
|
210
231
|
else {
|
|
211
|
-
const errNode = errNodeUntil([
|
|
232
|
+
const errNode = errNodeUntil([
|
|
233
|
+
syntax_kind_1.SyntaxKind.Equal,
|
|
234
|
+
syntax_kind_1.SyntaxKind.Identifier,
|
|
235
|
+
...RECOVER_OPEN_TAG,
|
|
236
|
+
]);
|
|
212
237
|
if (errNode) {
|
|
213
238
|
errorAt(diagnostics_1.DIAGS.expAttrNameAfterNamespace, errNode.pos, errNode.end);
|
|
214
239
|
}
|
|
@@ -225,7 +250,8 @@ function parseXmlUiMarkup(text) {
|
|
|
225
250
|
if (at(syntax_kind_1.SyntaxKind.Identifier)) {
|
|
226
251
|
const closeTagName = parseClosingTagName();
|
|
227
252
|
if (!skipNameMatching) {
|
|
228
|
-
const namesMismatch = openTagName !== null &&
|
|
253
|
+
const namesMismatch = openTagName !== null &&
|
|
254
|
+
!(0, utils_1.tagNameNodesWithoutErrorsMatch)(openTagName, closeTagName, getText);
|
|
229
255
|
if (namesMismatch) {
|
|
230
256
|
const msg = diagnostics_1.DIAGS.tagNameMismatch(getText(openTagName), getText(closeTagName));
|
|
231
257
|
errorAt(msg, closeTagName.pos, closeTagName.end);
|
|
@@ -306,10 +332,10 @@ function parseXmlUiMarkup(text) {
|
|
|
306
332
|
});
|
|
307
333
|
}
|
|
308
334
|
/**
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
335
|
+
*
|
|
336
|
+
* @param tokens that won't be consumed
|
|
337
|
+
* @returns the error node with the consumed tokens, or null if there were no tokens consumed
|
|
338
|
+
*/
|
|
313
339
|
function errNodeUntil(tokens) {
|
|
314
340
|
startNode();
|
|
315
341
|
advance(tokens);
|
|
@@ -422,7 +448,7 @@ function parseXmlUiMarkup(text) {
|
|
|
422
448
|
}
|
|
423
449
|
end = scanner.getTokenEnd();
|
|
424
450
|
}
|
|
425
|
-
peekedToken =
|
|
451
|
+
peekedToken = new syntax_node_1.Node(kind, pos, end, triviaBefore);
|
|
426
452
|
return peekedToken;
|
|
427
453
|
}
|
|
428
454
|
/** Same as bumpAny, but with an assertion of the token that was bumped over.
|
|
@@ -479,20 +505,14 @@ function parseXmlUiMarkup(text) {
|
|
|
479
505
|
err = errFromScanner.message;
|
|
480
506
|
}
|
|
481
507
|
const pos = scanner.getTokenStart();
|
|
482
|
-
const
|
|
483
|
-
kind,
|
|
484
|
-
start,
|
|
485
|
-
pos,
|
|
486
|
-
end: scanner.getTokenEnd(),
|
|
487
|
-
triviaBefore: triviaCollected.length > 0 ? triviaCollected : undefined,
|
|
488
|
-
};
|
|
508
|
+
const triviaBefore = triviaCollected.length > 0 ? triviaCollected : undefined;
|
|
489
509
|
triviaCollected = [];
|
|
490
510
|
if (inContent && err.code === diagnostics_1.ErrCodes.invalidChar) {
|
|
491
511
|
errFromScanner = undefined;
|
|
492
|
-
return
|
|
512
|
+
return new syntax_node_1.Node(kind, pos, scanner.getTokenEnd(), triviaBefore);
|
|
493
513
|
}
|
|
494
514
|
const badPrefixEnd = pos + errFromScanner.prefixLength;
|
|
495
|
-
token
|
|
515
|
+
const token = new syntax_node_1.Node(kind, pos, badPrefixEnd, triviaBefore);
|
|
496
516
|
scanner.resetTokenState(badPrefixEnd);
|
|
497
517
|
startNode();
|
|
498
518
|
node.children.push(token);
|
|
@@ -505,21 +525,10 @@ function parseXmlUiMarkup(text) {
|
|
|
505
525
|
case syntax_kind_1.SyntaxKind.CommentTrivia:
|
|
506
526
|
case syntax_kind_1.SyntaxKind.NewLineTrivia:
|
|
507
527
|
case syntax_kind_1.SyntaxKind.WhitespaceTrivia:
|
|
508
|
-
triviaCollected.push(
|
|
509
|
-
kind,
|
|
510
|
-
start,
|
|
511
|
-
pos: scanner.getTokenStart(),
|
|
512
|
-
end: scanner.getTokenEnd(),
|
|
513
|
-
});
|
|
528
|
+
triviaCollected.push(new syntax_node_1.Node(kind, scanner.getTokenStart(), scanner.getTokenEnd()));
|
|
514
529
|
break;
|
|
515
530
|
default:
|
|
516
|
-
return
|
|
517
|
-
kind,
|
|
518
|
-
start,
|
|
519
|
-
pos: scanner.getTokenStart(),
|
|
520
|
-
end: scanner.getTokenEnd(),
|
|
521
|
-
triviaBefore: triviaCollected.length > 0 ? triviaCollected : undefined,
|
|
522
|
-
};
|
|
531
|
+
return new syntax_node_1.Node(kind, scanner.getTokenStart(), scanner.getTokenEnd(), triviaCollected.length > 0 ? triviaCollected : undefined);
|
|
523
532
|
}
|
|
524
533
|
}
|
|
525
534
|
}
|
|
@@ -533,11 +542,5 @@ function parseXmlUiMarkup(text) {
|
|
|
533
542
|
function createNode(kind, children) {
|
|
534
543
|
const firstChild = children[0];
|
|
535
544
|
const lastChild = children[children.length - 1];
|
|
536
|
-
return
|
|
537
|
-
kind,
|
|
538
|
-
start: firstChild.start,
|
|
539
|
-
pos: firstChild.pos,
|
|
540
|
-
end: lastChild.end,
|
|
541
|
-
children,
|
|
542
|
-
};
|
|
545
|
+
return new syntax_node_1.Node(kind, firstChild.pos, lastChild.end, undefined, children);
|
|
543
546
|
}
|
|
@@ -1,2 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagNameNode = exports.AttributeListNode = exports.ContentListNode = exports.AttributeKeyNode = exports.AttributeNode = exports.ElementNode = exports.Node = void 0;
|
|
4
|
+
const syntax_kind_1 = require("./syntax-kind");
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
class Node {
|
|
7
|
+
constructor(kind, pos, end, triviaBefore, children) {
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
|
+
this.kind = kind;
|
|
10
|
+
this.pos = pos;
|
|
11
|
+
this.end = end;
|
|
12
|
+
this.triviaBefore = triviaBefore;
|
|
13
|
+
this.children = children;
|
|
14
|
+
if (triviaBefore) {
|
|
15
|
+
this.start = (_b = (_a = triviaBefore[0]) === null || _a === void 0 ? void 0 : _a.start) !== null && _b !== void 0 ? _b : pos;
|
|
16
|
+
}
|
|
17
|
+
else if (children) {
|
|
18
|
+
this.start = (_d = (_c = children[0]) === null || _c === void 0 ? void 0 : _c.start) !== null && _d !== void 0 ? _d : pos;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.start = pos;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
isElementNode() {
|
|
25
|
+
return this.kind === syntax_kind_1.SyntaxKind.ElementNode;
|
|
26
|
+
}
|
|
27
|
+
isAttributeNode() {
|
|
28
|
+
return this.kind === syntax_kind_1.SyntaxKind.AttributeNode;
|
|
29
|
+
}
|
|
30
|
+
isAttributeKeyNode() {
|
|
31
|
+
return this.kind === syntax_kind_1.SyntaxKind.AttributeKeyNode;
|
|
32
|
+
}
|
|
33
|
+
isContentListNode() {
|
|
34
|
+
return this.kind === syntax_kind_1.SyntaxKind.ContentListNode;
|
|
35
|
+
}
|
|
36
|
+
isAttributeListNode() {
|
|
37
|
+
return this.kind === syntax_kind_1.SyntaxKind.AttributeListNode;
|
|
38
|
+
}
|
|
39
|
+
isTagNameNode() {
|
|
40
|
+
return this.kind === syntax_kind_1.SyntaxKind.TagNameNode;
|
|
41
|
+
}
|
|
42
|
+
findTokenAtPos(position) {
|
|
43
|
+
return (0, utils_1.findTokenAtPos)(this, position);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Node = Node;
|
|
47
|
+
class ElementNode extends Node {
|
|
48
|
+
getAttributeListNode() {
|
|
49
|
+
return this.children.find((c) => c.isContentListNode());
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.ElementNode = ElementNode;
|
|
53
|
+
class AttributeNode extends Node {
|
|
54
|
+
}
|
|
55
|
+
exports.AttributeNode = AttributeNode;
|
|
56
|
+
class AttributeKeyNode extends Node {
|
|
57
|
+
}
|
|
58
|
+
exports.AttributeKeyNode = AttributeKeyNode;
|
|
59
|
+
class ContentListNode extends Node {
|
|
60
|
+
}
|
|
61
|
+
exports.ContentListNode = ContentListNode;
|
|
62
|
+
class AttributeListNode extends Node {
|
|
63
|
+
}
|
|
64
|
+
exports.AttributeListNode = AttributeListNode;
|
|
65
|
+
class TagNameNode extends Node {
|
|
66
|
+
}
|
|
67
|
+
exports.TagNameNode = TagNameNode;
|