xmlui 0.4.1 → 0.4.2-beta.2
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/{Pdf-49TqXRNN.mjs → Pdf-Cw4rsLlC.mjs} +1 -1
- package/dist/{Pdf-BH2vx5Qr.mjs → Pdf-DTxKB72g.mjs} +1 -1
- package/dist/{apiInterceptorWorker-BBlmEoWI.mjs → apiInterceptorWorker-Cwqldrsi.mjs} +1 -1
- package/dist/{apiInterceptorWorker-Bt5xchwi.mjs → apiInterceptorWorker-DXlNa2pZ.mjs} +1 -1
- package/dist/core-CiRlrzNN.mjs +5389 -0
- package/dist/core-TkN1rPOq.mjs +5390 -0
- package/dist/grammar.tmLanguage-BELR-62I.mjs +600 -0
- package/dist/{index-D4lrwrU-.mjs → index-DNI2rMij.mjs} +12626 -13066
- package/dist/{index-standalone-OPhLIAuf.mjs → index-standalone-CjgKrRur.mjs} +28694 -29136
- package/dist/index-standalone.css +1 -1
- package/dist/index.css +1 -1
- package/dist/{nivo-bar.es-DGyxXAiC.mjs → nivo-bar.es-ksaRLFWg.mjs} +2 -2
- package/dist/{nivo-geo.es-xKJj5CIr.mjs → nivo-geo.es-CKScMd6z.mjs} +2 -2
- package/dist/{nivo-legends.es-Dp7DGs5k.mjs → nivo-legends.es-COxD-HVb.mjs} +1 -1
- package/dist/{nivo-pie.es-BXZkJTQT.mjs → nivo-pie.es-O_e-F1XQ.mjs} +2 -2
- package/dist/{react-apexcharts.min-ZKwRrO8G.mjs → react-apexcharts.min-CUpL1QAf.mjs} +1 -1
- package/dist/scripts/docs/syntax/grammar.tmLanguage.json +348 -0
- package/dist/scripts/docs/syntax/textMate/xmlui.json +629 -0
- package/dist/scripts/{bin → xmlui/bin}/vite-ueml-plugin.js +11 -16
- package/dist/scripts/{src → xmlui/src}/components/App/App.js +26 -21
- package/dist/scripts/{src → xmlui/src}/components/AppHeader/AppHeader.js +2 -4
- package/dist/scripts/{src → xmlui/src}/components/Avatar/Avatar.js +3 -3
- package/dist/scripts/{src → xmlui/src}/components/Button/Button.js +4 -2
- package/dist/scripts/xmlui/src/components/Card/Card.js +76 -0
- package/dist/scripts/{src → xmlui/src}/components/Chart/Chart.js +7 -6
- package/dist/scripts/{src → xmlui/src}/components/Combobox/Combobox.js +60 -22
- package/dist/scripts/{src → xmlui/src}/components/ComponentProvider.js +28 -8
- package/dist/scripts/{src → xmlui/src}/components/DatePicker/DatePicker.js +1 -1
- package/dist/scripts/{src → xmlui/src}/components/DropdownMenu/DropdownMenu.js +21 -14
- package/dist/scripts/{src → xmlui/src}/components/FlowLayout/FlowLayout.js +10 -9
- package/dist/scripts/{src → xmlui/src}/components/Footer/Footer.js +2 -2
- package/dist/scripts/{src → xmlui/src}/components/FormItem/FormItem.js +1 -1
- package/dist/scripts/xmlui/src/components/FormSection/FormSection.js +47 -0
- package/dist/scripts/{src → xmlui/src}/components/Heading/Heading.js +1 -1
- package/dist/scripts/{src → xmlui/src}/components/Icon/Icon.js +4 -3
- package/dist/scripts/xmlui/src/components/Icon/TrendingDownIcon.js +10 -0
- package/dist/scripts/xmlui/src/components/Icon/TrendingUpIcon.js +10 -0
- package/dist/scripts/xmlui/src/components/IconInfoCard/IconInfoCard.js +52 -0
- package/dist/scripts/{src → xmlui/src}/components/IconProvider.js +4 -1
- package/dist/scripts/{src → xmlui/src}/components/Image/Image.js +4 -4
- package/dist/scripts/{src → xmlui/src}/components/Link/Link.js +4 -4
- package/dist/scripts/{src → xmlui/src}/components/Map/Map.js +7 -1
- package/dist/scripts/{src → xmlui/src}/components/ModalDialog/ModalDialog.js +12 -5
- package/dist/scripts/{src → xmlui/src}/components/MultiCombobox/MultiCombobox.js +1 -1
- package/dist/scripts/{src → xmlui/src}/components/MultiSelect/MultiSelect.js +3 -3
- package/dist/scripts/{src → xmlui/src}/components/NavLink/NavLink.js +4 -3
- package/dist/scripts/{src → xmlui/src}/components/NavPanel/NavPanel.js +10 -4
- package/dist/scripts/xmlui/src/components/PageHeader/PageHeader.js +48 -0
- package/dist/scripts/{src → xmlui/src}/components/ProgressBar/ProgressBar.js +5 -4
- package/dist/scripts/{src → xmlui/src}/components/RadioGroup/RadioGroup.js +2 -1
- package/dist/scripts/{src → xmlui/src}/components/Select/Select.js +6 -3
- package/dist/scripts/{src → xmlui/src}/components/StickyBox/StickyBox.js +1 -1
- package/dist/scripts/{src → xmlui/src}/components/Table/Table.js +65 -54
- package/dist/scripts/xmlui/src/components/TableHeader/TableHeader.js +31 -0
- package/dist/scripts/{src → xmlui/src}/components/Text/Text.js +34 -13
- package/dist/scripts/{src → xmlui/src}/components/ThemeChanger/ThemeChanger.js +3 -24
- package/dist/scripts/{src → xmlui/src}/components/Toggle/Toggle.js +9 -8
- package/dist/scripts/xmlui/src/components/Toolbar/Toolbar.js +26 -0
- package/dist/scripts/xmlui/src/components/ToolbarButton/ToolbarButton.js +33 -0
- package/dist/scripts/xmlui/src/components/TrendLabel/TrendLabel.js +79 -0
- package/dist/scripts/{src → xmlui/src}/components-core/Component.js +11 -8
- package/dist/scripts/{src → xmlui/src}/components-core/ComponentDecorator.js +17 -3
- package/dist/scripts/{src → xmlui/src}/components-core/CompoundComponent.js +7 -20
- package/dist/scripts/xmlui/src/components-core/InspectorContext.js +176 -0
- package/dist/scripts/{src → xmlui/src}/components-core/RootComponent.js +8 -6
- package/dist/scripts/{src/components-core/ChildrenSlot.js → xmlui/src/components-core/Slot.js} +3 -3
- package/dist/scripts/xmlui/src/components-core/XmluiCodeHighlighter.js +95 -0
- package/dist/scripts/{src → xmlui/src}/components-core/container/Container.js +2 -2
- package/dist/scripts/{src → xmlui/src}/components-core/loader/DataLoader.js +14 -6
- package/dist/scripts/{src → xmlui/src}/components-core/script-runner/eval-tree-common.js +2 -7
- package/dist/scripts/{src → xmlui/src}/components-core/script-runner/process-statement-async.js +0 -59
- package/dist/scripts/{src → xmlui/src}/components-core/script-runner/process-statement-common.js +2 -2
- package/dist/scripts/{src → xmlui/src}/components-core/theming/ThemeProvider.js +4 -0
- package/dist/scripts/{src → xmlui/src}/components-core/theming/themes/root.js +20 -15
- package/dist/scripts/xmlui/src/components-core/theming/themes/theme-colors.js +569 -0
- package/dist/scripts/xmlui/src/components-core/theming/themes/xmlui.js +66 -0
- package/dist/scripts/{src → xmlui/src}/components-core/utils/misc.js +7 -28
- package/dist/scripts/xmlui/src/components-core/xmlui-parser.js +51 -0
- package/dist/scripts/{src → xmlui/src}/parsers/scripting/Parser.js +1 -1
- package/dist/scripts/{src → xmlui/src}/parsers/scripting/code-behind-collect.js +8 -4
- package/dist/scripts/{src/components-core/script-runner → xmlui/src/parsers/scripting}/modules.js +74 -6
- package/dist/scripts/{src/parsers/ueml → xmlui/src/parsers/xmlui-parser}/ParserError.js +1 -1
- package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/diagnostics.js +1 -1
- package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/parser.js +31 -27
- package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/transform.js +123 -56
- package/dist/wasm-SPaT1zC5.mjs +5 -0
- package/dist/xmlui-C8fXVsN3.mjs +636 -0
- package/dist/xmlui-standalone.es.js +1 -1
- package/dist/xmlui-standalone.umd.js +289 -282
- package/dist/xmlui.es.d.ts +46 -22
- package/dist/xmlui.es.js +1 -1
- package/dist/xmlui.umd.js +123 -116
- package/package.json +15 -3
- package/dist/scripts/src/abstractions/BlockScope.js +0 -4
- package/dist/scripts/src/components/Card/Card.js +0 -65
- package/dist/scripts/src/components/FormSection/FormSection.js +0 -45
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +0 -407
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +0 -32
- package/dist/scripts/src/components-core/xmlui-parser.js +0 -52
- package/dist/scripts/src/parsers/ueml/UemlHelper.js +0 -579
- package/dist/scripts/src/parsers/ueml/UemlInputStream.js +0 -59
- package/dist/scripts/src/parsers/ueml/UemlLexer.js +0 -868
- package/dist/scripts/src/parsers/ueml/UemlParser.js +0 -1439
- package/dist/scripts/src/parsers/ueml/UemlToken.js +0 -24
- /package/dist/scripts/{bin → xmlui/bin}/bootstrap.js +0 -0
- /package/dist/scripts/{bin → xmlui/bin}/build.js +0 -0
- /package/dist/scripts/{bin → xmlui/bin}/index.js +0 -0
- /package/dist/scripts/{bin → xmlui/bin}/preview.js +0 -0
- /package/dist/scripts/{bin → xmlui/bin}/start.js +0 -0
- /package/dist/scripts/{bin → xmlui/bin}/viteConfig.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/ActionDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/AppContextDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/ComponentDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/ComponentDescriptorDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/ContainerDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/FunctionDefs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/RendererDefs.js +0 -0
- /package/dist/scripts/{src/abstractions/scripting/ScriptParserError.js → xmlui/src/abstractions/scripting/BlockScope.js} +0 -0
- /package/dist/scripts/{src/components-core/script-runner → xmlui/src/abstractions/scripting}/LogicalThread.js +0 -0
- /package/dist/scripts/{src/components-core/script-runner → xmlui/src/abstractions/scripting}/LoopScope.js +0 -0
- /package/dist/scripts/{src/abstractions/scripting/ScriptingSourceTree.js → xmlui/src/abstractions/scripting/ScriptParserError.js} +0 -0
- /package/dist/scripts/{src/components-core/abstractions/ComponentRenderer.js → xmlui/src/abstractions/scripting/ScriptingSourceTree.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/abstractions/scripting/Token.js +0 -0
- /package/dist/scripts/{src/components-core/script-runner → xmlui/src/abstractions/scripting}/TryScope.js +0 -0
- /package/dist/scripts/{src/components-core/abstractions/LoaderRenderer.js → xmlui/src/abstractions/scripting/modules.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/App/AppLayoutContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/App/AppStateContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/App/Sheet.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/AppState/AppState.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Badge/Badge.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/BarChart/BarChart.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Bookmark/Bookmark.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ChangeListener/ChangeListener.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Checkbox/Checkbox.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ContentSeparator/ContentSeparator.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/EmojiSelector/EmojiSelector.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/FileInput/FileInput.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/FileUploadDropZone/FileUploadDropZone.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Form/Form.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Form/FormContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Form/formActions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/FormItem/HelperText.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/FormItem/ItemWithLabel.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/FormItem/Validations.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/HoverCard/HoverCard.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ApiIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/Attach.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/Binding.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/BoardIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/BoxIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/CheckIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ChevronDownIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ChevronLeft.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ChevronRight.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ChevronUpIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/CodeFileIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/CodeSandbox.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/CompactListIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ContentCopyIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/DatabaseIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/DocFileIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/DocIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/DotMenuHorizontalIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/DotMenuIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/EmailIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/EmptyFolderIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ErrorIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ExpressionIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/FillPlusCricleIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/FilterIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/FolderIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/GlobeIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/HomeIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/HyperLinkIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ImageFileIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/LinkIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ListIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/LooseListIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/MoonIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/MoreOptionsIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/PDFIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/PenIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/PhoneIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/PhotoIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/PlusIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/SearchIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/ShareIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/SunIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/TrashIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/TxtIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/UnknownFileIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/UnlinkIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/UserIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/WarningIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Icon/XlsIcon.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/IconRegistryContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Input/InputAdornment.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Input/input-abstractions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Items/Items.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/List/List.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Logo/Logo.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Map/world_countries.json +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Markdown/Markdown.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ModalDialog/ConfirmationModalContextProvider.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ModalDialog/Dialog.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/NavGroup/NavGroup.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/NoResult/NoResult.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/NumberBox/NumberBox.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Option/Option.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/PageMetaTitle/PageMetaTitle.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Pages/Pages.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Pdf/LazyPdf.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Pdf/Pdf.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/PieChart/PieChart.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/PositionedContainer/PositionedContainer.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Queue/Queue.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Queue/queueActions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/RealTimeAdapter/RealTimeAdapter.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Redirect/Redirect.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Select/SelectContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/SelectionStore/SelectionStore.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/SpaceFiller/SpaceFiller.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Spinner/Spinner.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Splitter/Splitter.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Splitter/utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Stack/Stack.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Switch/Switch.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Table/useRowSelection.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TableColumnDef/TableColumnDef.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TableColumnDef/TableContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Tabs/Tabs.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TextArea/TextArea.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TextArea/TextAreaResizable.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TextArea/useComposedRef.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/TextBox/TextBox.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Theme/NotificationToast.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Theme/Theme.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/Tree/TreeComponent.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ValidationSummary/ValidationSummary.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/ViewComponentRegistryContext.js +0 -0
- /package/dist/scripts/{src/parsers/ueml/source-tree.js → xmlui/src/components/abstractions.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/chart-color-schemes.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/component-utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components/container-helpers.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/ApiBoundComponent.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/AppContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/EngineError.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/ErrorBoundary.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/Fragment.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/InvalidComponent.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/LoaderComponent.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/RestApiProxy.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/RouteContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/ScrollContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/UnknownComponent.js +0 -0
- /package/dist/scripts/{src/components-core/abstractions/treeAbstractions.js → xmlui/src/components-core/abstractions/ComponentRenderer.js} +0 -0
- /package/dist/scripts/{src/components-core/interception/abstractions.js → xmlui/src/components-core/abstractions/LoaderRenderer.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/abstractions/containers.js +0 -0
- /package/dist/scripts/{src/components/abstractions.js → xmlui/src/components-core/abstractions/treeAbstractions.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/ApiAction.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/DownloadFileAction.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/NavigateAction.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/TimedAction.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/UploadAction.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/action/actions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/appContext/date-functions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/appContext/misc-utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/component-hooks.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/constants.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/container/ContainerComponentDef.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/container/buildProxy.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/container/collectFnVarDeps.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/container/valueExtractor.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/descriptorHelper.js +0 -0
- /package/dist/scripts/{src/parsers/style-parser/source-tree.js → xmlui/src/components-core/interception/abstractions.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/interception/useApiInterceptorContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/loader/ApiLoader.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/loader/ExternalDataLoader.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/loader/Loader.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/loader/MockLoaderRenderer.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/loader/PageableLoader.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/renderers.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/reportEngineError.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/BindingTreeEvaluationContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/ICustomOperations.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/ParameterParser.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/asyncProxy.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/bannedFunctions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/custom-operations-registry.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/custom-ui-data.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/eval-tree-async.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/eval-tree-sync.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/process-statement-sync.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/statement-queue.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/script-runner/visitors.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/ThemeContext.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/abstractions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/extendThemeUtils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/hvar.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/themeVars.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/themes/base-utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/themes/palette.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/themes/solid.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/theming/transformThemeVars.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/DataLoaderQueryKeyGenerator.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/LruCache.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/actionUtils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/classnames.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/css-utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/date-utils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/extractParam.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/hooks.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/mergeProps.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/statementUtils.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/components-core/utils/treeUtils.js +0 -0
- /package/dist/scripts/{src/parsers/scripting → xmlui/src/parsers/common}/InputStream.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/scripting/Lexer.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/scripting/ParserError.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/scripting/TokenTrait.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/scripting/tree-visitor.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/StyleInputStream.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/StyleLexer.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/StyleParser.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/errors.js +0 -0
- /package/dist/scripts/{src/parsers/ueml/ueml-tree.js → xmlui/src/parsers/style-parser/source-tree.js} +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/style-compiler.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/style-parser/tokens.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/CharacterCodes.js +0 -0
- /package/dist/scripts/{src/parsers/ueml → xmlui/src/parsers/xmlui-parser}/fileExtensions.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/scanner.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/syntax-kind.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/syntax-node.js +0 -0
- /package/dist/scripts/{src → xmlui/src}/parsers/xmlui-parser/utils.js +0 -0
|
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.onPrefixRegex = exports.UCRegex = exports.COMPOUND_COMP_ID = void 0;
|
|
4
4
|
exports.nodeToComponentDef = nodeToComponentDef;
|
|
5
5
|
const syntax_kind_1 = require("./syntax-kind");
|
|
6
|
-
const ParserError_1 = require("
|
|
6
|
+
const ParserError_1 = require("./ParserError");
|
|
7
7
|
const Parser_1 = require("../scripting/Parser");
|
|
8
8
|
const code_behind_collect_1 = require("../scripting/code-behind-collect");
|
|
9
|
-
const BindingTreeEvaluationContext_1 = require("../../components-core/script-runner/BindingTreeEvaluationContext");
|
|
10
9
|
const CharacterCodes_1 = require("./CharacterCodes");
|
|
11
10
|
exports.COMPOUND_COMP_ID = "Component";
|
|
12
11
|
exports.UCRegex = /^[A-Z]/;
|
|
@@ -14,7 +13,7 @@ exports.onPrefixRegex = /^on[A-Z]/;
|
|
|
14
13
|
const propAttrs = ["name", "value"];
|
|
15
14
|
const CDATA_PREFIX_LEN = 9;
|
|
16
15
|
const CDATA_POSTFIX_LEN = 3;
|
|
17
|
-
function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
16
|
+
function nodeToComponentDef(node, originalGetText, fileId, moduleResolver = () => "") {
|
|
18
17
|
const getText = (node) => {
|
|
19
18
|
var _a;
|
|
20
19
|
return (_a = node.text) !== null && _a !== void 0 ? _a : originalGetText(node);
|
|
@@ -73,13 +72,15 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
73
72
|
}
|
|
74
73
|
const children = getChildNodes(node);
|
|
75
74
|
// --- Check for nested component
|
|
76
|
-
const nestedCompound = children.find((child) => child.kind === syntax_kind_1.SyntaxKind.ElementNode &&
|
|
75
|
+
const nestedCompound = children.find((child) => child.kind === syntax_kind_1.SyntaxKind.ElementNode &&
|
|
76
|
+
getTagName(child) === exports.COMPOUND_COMP_ID);
|
|
77
77
|
if (nestedCompound) {
|
|
78
78
|
reportError("T006");
|
|
79
79
|
return null;
|
|
80
80
|
}
|
|
81
81
|
// --- Get the single component definition
|
|
82
|
-
const nestedComponents = children.filter((child) => child.kind === syntax_kind_1.SyntaxKind.ElementNode &&
|
|
82
|
+
const nestedComponents = children.filter((child) => child.kind === syntax_kind_1.SyntaxKind.ElementNode &&
|
|
83
|
+
exports.UCRegex.test(getTagName(child)));
|
|
83
84
|
if (nestedComponents.length === 0) {
|
|
84
85
|
nestedComponents.push(createTextNodeElement(""));
|
|
85
86
|
}
|
|
@@ -96,38 +97,39 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
// --- Should we
|
|
100
|
+
// --- Should we wrap with a Fragment?
|
|
101
|
+
let element;
|
|
100
102
|
if (nestedComponents.length > 1 || nestedVars.length > 0) {
|
|
101
|
-
|
|
102
|
-
const fragmentElement = wrapWithFragment([...nestedVars, ...nestedComponents]);
|
|
103
|
-
const nestedFragment = transformSingleElement(usesStack, fragmentElement);
|
|
104
|
-
component = {
|
|
105
|
-
name: compoundName.value,
|
|
106
|
-
component: nestedFragment,
|
|
107
|
-
};
|
|
108
|
-
if (api) {
|
|
109
|
-
component.api = api;
|
|
110
|
-
}
|
|
111
|
-
if (vars) {
|
|
112
|
-
nestedFragment.vars = Object.assign(Object.assign({}, nestedFragment.vars), vars);
|
|
113
|
-
}
|
|
103
|
+
element = wrapWithFragment([...nestedVars, ...nestedComponents]);
|
|
114
104
|
}
|
|
115
105
|
else {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
106
|
+
element = nestedComponents[0];
|
|
107
|
+
}
|
|
108
|
+
let nestedComponent = transformSingleElement(usesStack, element);
|
|
109
|
+
component = {
|
|
110
|
+
name: compoundName.value,
|
|
111
|
+
component: nestedComponent,
|
|
112
|
+
debug: {
|
|
113
|
+
source: {
|
|
114
|
+
start: node.start,
|
|
115
|
+
end: node.end,
|
|
116
|
+
fileId,
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
if (api) {
|
|
121
|
+
component.api = api;
|
|
122
|
+
}
|
|
123
|
+
if (vars) {
|
|
124
|
+
nestedComponent.vars = Object.assign(Object.assign({}, nestedComponent.vars), vars);
|
|
125
|
+
}
|
|
126
|
+
nestedComponent.debug = {
|
|
127
|
+
source: {
|
|
128
|
+
start: element.start,
|
|
129
|
+
end: element.end,
|
|
130
|
+
fileId,
|
|
131
|
+
},
|
|
132
|
+
};
|
|
131
133
|
const nodeClone = withNewChildNodes(node, childrenToCollect);
|
|
132
134
|
collectTraits(usesStack, component, nodeClone);
|
|
133
135
|
return component;
|
|
@@ -139,6 +141,13 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
139
141
|
}
|
|
140
142
|
component = {
|
|
141
143
|
type: name,
|
|
144
|
+
debug: {
|
|
145
|
+
source: {
|
|
146
|
+
start: node.start,
|
|
147
|
+
end: node.end,
|
|
148
|
+
fileId,
|
|
149
|
+
},
|
|
150
|
+
},
|
|
142
151
|
};
|
|
143
152
|
// --- Done
|
|
144
153
|
collectTraits(usesStack, component, node);
|
|
@@ -176,7 +185,9 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
176
185
|
return;
|
|
177
186
|
}
|
|
178
187
|
const childName = getTagName(child);
|
|
179
|
-
if (isCompound &&
|
|
188
|
+
if (isCompound &&
|
|
189
|
+
child.kind === syntax_kind_1.SyntaxKind.ElementNode &&
|
|
190
|
+
exports.UCRegex.test(childName)) {
|
|
180
191
|
// --- This is the single nested component definition of a compound component,
|
|
181
192
|
// --- it is already processed
|
|
182
193
|
return;
|
|
@@ -191,6 +202,7 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
191
202
|
// --- Element name starts with an uppercase letter
|
|
192
203
|
if (exports.UCRegex.test(childName) && !isCompound) {
|
|
193
204
|
// --- This must be a child component
|
|
205
|
+
// maybe here or in the transformSingleElement function, after the compound comp check
|
|
194
206
|
const childComponent = transformSingleElement(usesStack, child);
|
|
195
207
|
if (childComponent) {
|
|
196
208
|
if (!comp.children) {
|
|
@@ -267,8 +279,7 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
267
279
|
try {
|
|
268
280
|
// --- We parse the module file to catch parsing errors
|
|
269
281
|
parser.parseStatements();
|
|
270
|
-
|
|
271
|
-
comp.scriptCollected = (0, code_behind_collect_1.collectCodeBehindFromSource)("Main", comp.script, moduleResolver, evalContext);
|
|
282
|
+
comp.scriptCollected = (0, code_behind_collect_1.collectCodeBehindFromSource)("Main", comp.script, moduleResolver);
|
|
272
283
|
}
|
|
273
284
|
catch (err) {
|
|
274
285
|
if (parser.errors && parser.errors.length > 0) {
|
|
@@ -442,7 +453,10 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
442
453
|
}
|
|
443
454
|
// --- We expect a component definition here!
|
|
444
455
|
const nestedComps = nestedComponents.map((nc) => transformSingleElement(usesStack, nc));
|
|
445
|
-
return {
|
|
456
|
+
return {
|
|
457
|
+
name,
|
|
458
|
+
value: nestedComps.length === 1 ? nestedComps[0] : nestedComps,
|
|
459
|
+
};
|
|
446
460
|
}
|
|
447
461
|
// --- At this point, all attributes are ok, let's get the value.
|
|
448
462
|
let value = valueAttr === null || valueAttr === void 0 ? void 0 : valueAttr.value;
|
|
@@ -583,7 +597,10 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
583
597
|
const hasComponentName = exports.UCRegex.test(tagName);
|
|
584
598
|
const shouldUseTextNodeElement = hasComponentName || tagName === "prop";
|
|
585
599
|
const shouldCollapseWhitespace = tagName !== "event" && tagName !== "api";
|
|
586
|
-
|
|
600
|
+
const attrs = getAttributes(node);
|
|
601
|
+
desugarKeyOnlyAttrs(attrs);
|
|
602
|
+
desugarQuotelessAttrs(attrs, getText);
|
|
603
|
+
parseEscapeCharactersInAttrValues(attrs);
|
|
587
604
|
parseEscapeCharactersInContent(childNodes);
|
|
588
605
|
mergeConsecutiveTexts(childNodes, shouldCollapseWhitespace);
|
|
589
606
|
let shouldUseCData = false;
|
|
@@ -618,12 +635,16 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
618
635
|
}
|
|
619
636
|
}
|
|
620
637
|
else {
|
|
621
|
-
newChild = {
|
|
638
|
+
newChild = {
|
|
639
|
+
kind: syntax_kind_1.SyntaxKind.TextNode,
|
|
640
|
+
text: textValue,
|
|
641
|
+
};
|
|
622
642
|
}
|
|
623
643
|
childNodes[i] = newChild;
|
|
624
644
|
}
|
|
625
645
|
const helperNodes = childNodes.filter((c) => c.kind === syntax_kind_1.SyntaxKind.ElementNode && !exports.UCRegex.test(getTagName(c)));
|
|
626
|
-
const otherNodes = childNodes.filter((c) => c.kind !== syntax_kind_1.SyntaxKind.ElementNode ||
|
|
646
|
+
const otherNodes = childNodes.filter((c) => c.kind !== syntax_kind_1.SyntaxKind.ElementNode ||
|
|
647
|
+
(c.kind === syntax_kind_1.SyntaxKind.ElementNode && exports.UCRegex.test(getTagName(c))));
|
|
627
648
|
const hasComponentChild = otherNodes.some((c) => c.kind === syntax_kind_1.SyntaxKind.ElementNode && exports.UCRegex.test(getTagName(c)));
|
|
628
649
|
if (hasScriptChild && hasComponentChild) {
|
|
629
650
|
const fragment = wrapWithFragment(otherNodes);
|
|
@@ -634,7 +655,8 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
634
655
|
}
|
|
635
656
|
function collapseWhitespace(childNodes) {
|
|
636
657
|
for (let i = 0; i < childNodes.length; ++i) {
|
|
637
|
-
if (childNodes[i].kind === syntax_kind_1.SyntaxKind.StringLiteral ||
|
|
658
|
+
if (childNodes[i].kind === syntax_kind_1.SyntaxKind.StringLiteral ||
|
|
659
|
+
childNodes[i].kind === syntax_kind_1.SyntaxKind.TextNode) {
|
|
638
660
|
//the union is the same as \s , but took \u00a0 (non breaking space) out
|
|
639
661
|
//source https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Cheatsheet
|
|
640
662
|
const allSubsequentWsExceptNonBreakingSpace = /[\f\n\r\t\v\u0020\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g;
|
|
@@ -651,7 +673,8 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
651
673
|
}
|
|
652
674
|
function parseEscapeCharactersInContent(childNodes) {
|
|
653
675
|
for (let node of childNodes) {
|
|
654
|
-
if (node.kind === syntax_kind_1.SyntaxKind.StringLiteral ||
|
|
676
|
+
if (node.kind === syntax_kind_1.SyntaxKind.StringLiteral ||
|
|
677
|
+
node.kind === syntax_kind_1.SyntaxKind.TextNode) {
|
|
655
678
|
const escapedText = tryEscapeEntities(getText(node));
|
|
656
679
|
if (escapedText !== null) {
|
|
657
680
|
node.text = escapedText;
|
|
@@ -694,7 +717,8 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
694
717
|
//&g
|
|
695
718
|
case CharacterCodes_1.CharacterCodes.g:
|
|
696
719
|
//\gt;
|
|
697
|
-
if (text.charCodeAt(i + 2) === CharacterCodes_1.CharacterCodes.t &&
|
|
720
|
+
if (text.charCodeAt(i + 2) === CharacterCodes_1.CharacterCodes.t &&
|
|
721
|
+
text.charCodeAt(i + 3) === CharacterCodes_1.CharacterCodes.semicolon) {
|
|
698
722
|
newText = newText + text.substring(startOfSubstr, i) + ">";
|
|
699
723
|
i += 3;
|
|
700
724
|
startOfSubstr = i + 1;
|
|
@@ -703,7 +727,8 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
703
727
|
//&l
|
|
704
728
|
case CharacterCodes_1.CharacterCodes.l:
|
|
705
729
|
//<
|
|
706
|
-
if (text.charCodeAt(i + 2) === CharacterCodes_1.CharacterCodes.t &&
|
|
730
|
+
if (text.charCodeAt(i + 2) === CharacterCodes_1.CharacterCodes.t &&
|
|
731
|
+
text.charCodeAt(i + 3) === CharacterCodes_1.CharacterCodes.semicolon) {
|
|
707
732
|
newText = newText + text.substring(startOfSubstr, i) + "<";
|
|
708
733
|
i += 3;
|
|
709
734
|
startOfSubstr = i + 1;
|
|
@@ -750,35 +775,40 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
750
775
|
for (let i = childNodes.length - 1; i > 0; --i) {
|
|
751
776
|
const node = childNodes[i - 1];
|
|
752
777
|
const nextNode = childNodes[i];
|
|
753
|
-
if (node.kind === syntax_kind_1.SyntaxKind.StringLiteral &&
|
|
778
|
+
if (node.kind === syntax_kind_1.SyntaxKind.StringLiteral &&
|
|
779
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.CData) {
|
|
754
780
|
childNodes[i - 1] = {
|
|
755
781
|
kind: syntax_kind_1.SyntaxKind.CData,
|
|
756
782
|
text: getText(node).slice(1, -1) + getText(nextNode),
|
|
757
783
|
};
|
|
758
784
|
childNodes.pop();
|
|
759
785
|
}
|
|
760
|
-
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
786
|
+
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
787
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.StringLiteral) {
|
|
761
788
|
childNodes[i - 1] = {
|
|
762
789
|
kind: syntax_kind_1.SyntaxKind.CData,
|
|
763
790
|
text: getText(node) + getText(nextNode).slice(1, -1),
|
|
764
791
|
};
|
|
765
792
|
childNodes.pop();
|
|
766
793
|
}
|
|
767
|
-
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
794
|
+
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
795
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.TextNode) {
|
|
768
796
|
childNodes[i - 1] = {
|
|
769
797
|
kind: syntax_kind_1.SyntaxKind.CData,
|
|
770
798
|
text: getText(node) + getText(nextNode),
|
|
771
799
|
};
|
|
772
800
|
childNodes.pop();
|
|
773
801
|
}
|
|
774
|
-
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
802
|
+
else if (node.kind === syntax_kind_1.SyntaxKind.CData &&
|
|
803
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.CData) {
|
|
775
804
|
childNodes[i - 1] = {
|
|
776
805
|
kind: syntax_kind_1.SyntaxKind.CData,
|
|
777
806
|
text: getText(node) + getText(nextNode),
|
|
778
807
|
};
|
|
779
808
|
childNodes.pop();
|
|
780
809
|
}
|
|
781
|
-
else if (node.kind === syntax_kind_1.SyntaxKind.TextNode &&
|
|
810
|
+
else if (node.kind === syntax_kind_1.SyntaxKind.TextNode &&
|
|
811
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.TextNode) {
|
|
782
812
|
if (getText(node).endsWith(" ") && getText(nextNode).startsWith(" ")) {
|
|
783
813
|
node.text = getText(node).trimEnd();
|
|
784
814
|
}
|
|
@@ -788,7 +818,8 @@ function nodeToComponentDef(node, originalGetText, moduleResolver = () => "") {
|
|
|
788
818
|
};
|
|
789
819
|
childNodes.pop();
|
|
790
820
|
}
|
|
791
|
-
else if (node.kind === syntax_kind_1.SyntaxKind.TextNode &&
|
|
821
|
+
else if (node.kind === syntax_kind_1.SyntaxKind.TextNode &&
|
|
822
|
+
nextNode.kind === syntax_kind_1.SyntaxKind.CData) {
|
|
792
823
|
childNodes[i - 1] = {
|
|
793
824
|
kind: syntax_kind_1.SyntaxKind.CData,
|
|
794
825
|
text: getText(node) + getText(nextNode),
|
|
@@ -803,7 +834,10 @@ function createTextNodeCDataElement(textValue) {
|
|
|
803
834
|
kind: syntax_kind_1.SyntaxKind.ElementNode,
|
|
804
835
|
children: [
|
|
805
836
|
{ kind: syntax_kind_1.SyntaxKind.OpenNodeStart },
|
|
806
|
-
{
|
|
837
|
+
{
|
|
838
|
+
kind: syntax_kind_1.SyntaxKind.TagNameNode,
|
|
839
|
+
children: [{ kind: syntax_kind_1.SyntaxKind.Identifier, text: "TextNodeCData" }],
|
|
840
|
+
},
|
|
807
841
|
{
|
|
808
842
|
kind: syntax_kind_1.SyntaxKind.AttributeListNode,
|
|
809
843
|
children: [
|
|
@@ -826,7 +860,10 @@ function createTextNodeElement(textValue) {
|
|
|
826
860
|
kind: syntax_kind_1.SyntaxKind.ElementNode,
|
|
827
861
|
children: [
|
|
828
862
|
{ kind: syntax_kind_1.SyntaxKind.OpenNodeStart },
|
|
829
|
-
{
|
|
863
|
+
{
|
|
864
|
+
kind: syntax_kind_1.SyntaxKind.TagNameNode,
|
|
865
|
+
children: [{ kind: syntax_kind_1.SyntaxKind.Identifier, text: "TextNode" }],
|
|
866
|
+
},
|
|
830
867
|
{
|
|
831
868
|
kind: syntax_kind_1.SyntaxKind.AttributeListNode,
|
|
832
869
|
children: [
|
|
@@ -886,9 +923,15 @@ function mergeValue(oldValue, itemValue) {
|
|
|
886
923
|
}
|
|
887
924
|
}
|
|
888
925
|
function wrapWithFragment(wrappedChildren) {
|
|
889
|
-
const nameNode = {
|
|
926
|
+
const nameNode = {
|
|
927
|
+
kind: syntax_kind_1.SyntaxKind.TagNameNode,
|
|
928
|
+
children: [{ kind: syntax_kind_1.SyntaxKind.Identifier, text: "Fragment" }],
|
|
929
|
+
};
|
|
890
930
|
return {
|
|
891
931
|
kind: syntax_kind_1.SyntaxKind.ElementNode,
|
|
932
|
+
start: wrappedChildren[0].start,
|
|
933
|
+
pos: wrappedChildren[0].pos,
|
|
934
|
+
end: wrappedChildren[wrappedChildren.length - 1].end,
|
|
892
935
|
children: [
|
|
893
936
|
{ kind: syntax_kind_1.SyntaxKind.OpenNodeStart },
|
|
894
937
|
nameNode,
|
|
@@ -902,11 +945,11 @@ function wrapWithFragment(wrappedChildren) {
|
|
|
902
945
|
}
|
|
903
946
|
function getAttributes(node) {
|
|
904
947
|
var _a, _b, _c;
|
|
905
|
-
return (_c = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.find((c) => c.kind === syntax_kind_1.SyntaxKind.AttributeListNode)) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : [];
|
|
948
|
+
return ((_c = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.find((c) => c.kind === syntax_kind_1.SyntaxKind.AttributeListNode)) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : []);
|
|
906
949
|
}
|
|
907
950
|
function getChildNodes(node) {
|
|
908
951
|
var _a, _b, _c;
|
|
909
|
-
return (_c = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.find((c) => c.kind === syntax_kind_1.SyntaxKind.ContentListNode)) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : [];
|
|
952
|
+
return ((_c = (_b = (_a = node.children) === null || _a === void 0 ? void 0 : _a.find((c) => c.kind === syntax_kind_1.SyntaxKind.ContentListNode)) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : []);
|
|
910
953
|
}
|
|
911
954
|
function withNewChildNodes(node, newChildren) {
|
|
912
955
|
var _a;
|
|
@@ -920,3 +963,27 @@ function withNewChildNodes(node, newChildren) {
|
|
|
920
963
|
...node.children.slice(childrenListIdx),
|
|
921
964
|
] });
|
|
922
965
|
}
|
|
966
|
+
function desugarKeyOnlyAttrs(attrs) {
|
|
967
|
+
var _a;
|
|
968
|
+
for (let attr of attrs) {
|
|
969
|
+
if (((_a = attr.children) === null || _a === void 0 ? void 0 : _a.length) === 1) {
|
|
970
|
+
const eq = {
|
|
971
|
+
kind: syntax_kind_1.SyntaxKind.Equal,
|
|
972
|
+
};
|
|
973
|
+
const value = {
|
|
974
|
+
kind: syntax_kind_1.SyntaxKind.StringLiteral,
|
|
975
|
+
text: '"true"',
|
|
976
|
+
};
|
|
977
|
+
attr.children.push(eq, value);
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
function desugarQuotelessAttrs(attrs, getText) {
|
|
982
|
+
var _a, _b, _c;
|
|
983
|
+
for (let attr of attrs) {
|
|
984
|
+
const attrValue = (_a = attr.children) === null || _a === void 0 ? void 0 : _a[2];
|
|
985
|
+
if (((_c = (_b = attr.children) === null || _b === void 0 ? void 0 : _b[2]) === null || _c === void 0 ? void 0 : _c.kind) === syntax_kind_1.SyntaxKind.Identifier) {
|
|
986
|
+
attrValue.text = '"' + getText(attrValue) + '"';
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|