xmlui 0.4.0
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-DeGhSMXe.mjs +19537 -0
- package/dist/Pdf.css +1 -0
- package/dist/apiInterceptorWorker-CwuUhYyc.mjs +9229 -0
- package/dist/array-USo-Szhp.mjs +12 -0
- package/dist/index-C24dkfpd.mjs +1434 -0
- package/dist/index-ao27SnVp.mjs +145185 -0
- package/dist/index.css +1 -0
- package/dist/nivo-bar.es-CWh0ZlxB.mjs +1666 -0
- package/dist/nivo-geo.es-BTqNt5Db.mjs +1579 -0
- package/dist/nivo-legends.es-BuIxHGSU.mjs +6916 -0
- package/dist/nivo-pie.es-BvCBFA0L.mjs +700 -0
- package/dist/react-apexcharts.min-DqWuDOyO.mjs +8881 -0
- package/dist/scripts/bin/bootstrap.js +11 -0
- package/dist/scripts/bin/build.js +256 -0
- package/dist/scripts/bin/index.js +88 -0
- package/dist/scripts/bin/preview.js +27 -0
- package/dist/scripts/bin/start.js +41 -0
- package/dist/scripts/bin/vite-ueml-plugin.js +113 -0
- package/dist/scripts/bin/viteConfig.js +112 -0
- package/dist/scripts/src/abstractions/ActionDefs.js +2 -0
- package/dist/scripts/src/abstractions/AppContextDefs.js +2 -0
- package/dist/scripts/src/abstractions/BlockScope.js +4 -0
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -0
- package/dist/scripts/src/abstractions/ComponentDescriptorDefs.js +2 -0
- package/dist/scripts/src/abstractions/ContainerDefs.js +2 -0
- package/dist/scripts/src/abstractions/FunctionDefs.js +2 -0
- package/dist/scripts/src/abstractions/RendererDefs.js +2 -0
- package/dist/scripts/src/abstractions/scripting/ScriptParserError.js +2 -0
- package/dist/scripts/src/abstractions/scripting/ScriptingSourceTree.js +2 -0
- package/dist/scripts/src/abstractions/scripting/Token.js +110 -0
- package/dist/scripts/src/components/App/App.js +253 -0
- package/dist/scripts/src/components/App/AppLayoutContext.js +9 -0
- package/dist/scripts/src/components/App/AppStateContext.js +9 -0
- package/dist/scripts/src/components/App/Sheet.js +89 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.js +121 -0
- package/dist/scripts/src/components/AppState/AppState.js +29 -0
- package/dist/scripts/src/components/Avatar/Avatar.js +81 -0
- package/dist/scripts/src/components/Badge/Badge.js +56 -0
- package/dist/scripts/src/components/BarChart/BarChart.js +199 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.js +11 -0
- package/dist/scripts/src/components/Button/Button.js +196 -0
- package/dist/scripts/src/components/Card/Card.js +65 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +43 -0
- package/dist/scripts/src/components/Chart/Chart.js +158 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +43 -0
- package/dist/scripts/src/components/Combobox/Combobox.js +145 -0
- package/dist/scripts/src/components/ComponentProvider.js +357 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +40 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.js +196 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +175 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +56 -0
- package/dist/scripts/src/components/FileInput/FileInput.js +127 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +106 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +139 -0
- package/dist/scripts/src/components/Footer/Footer.js +42 -0
- package/dist/scripts/src/components/Form/Form.js +320 -0
- package/dist/scripts/src/components/Form/FormContext.js +9 -0
- package/dist/scripts/src/components/Form/formActions.js +86 -0
- package/dist/scripts/src/components/FormItem/FormItem.js +204 -0
- package/dist/scripts/src/components/FormItem/HelperText.js +27 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +39 -0
- package/dist/scripts/src/components/FormItem/Validations.js +346 -0
- package/dist/scripts/src/components/FormSection/FormSection.js +45 -0
- package/dist/scripts/src/components/Heading/Heading.js +206 -0
- package/dist/scripts/src/components/HoverCard/HoverCard.js +45 -0
- package/dist/scripts/src/components/Icon/ApiIcon.js +10 -0
- package/dist/scripts/src/components/Icon/Attach.js +10 -0
- package/dist/scripts/src/components/Icon/Binding.js +11 -0
- package/dist/scripts/src/components/Icon/BoardIcon.js +7 -0
- package/dist/scripts/src/components/Icon/BoxIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CheckIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronDownIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronLeft.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronRight.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronUpIcon.js +7 -0
- package/dist/scripts/src/components/Icon/CodeFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/CodeSandbox.js +10 -0
- package/dist/scripts/src/components/Icon/CompactListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ContentCopyIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DatabaseIcon.js +11 -0
- package/dist/scripts/src/components/Icon/DocFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DocIcon.js +10 -0
- package/dist/scripts/src/components/Icon/DotMenuHorizontalIcon.js +7 -0
- package/dist/scripts/src/components/Icon/DotMenuIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmailIcon.js +7 -0
- package/dist/scripts/src/components/Icon/EmptyFolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/ErrorIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ExpressionIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FillPlusCricleIcon.js +7 -0
- package/dist/scripts/src/components/Icon/FilterIcon.js +10 -0
- package/dist/scripts/src/components/Icon/FolderIcon.js +10 -0
- package/dist/scripts/src/components/Icon/GlobeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HomeIcon.js +7 -0
- package/dist/scripts/src/components/Icon/HyperLinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/Icon.js +101 -0
- package/dist/scripts/src/components/Icon/ImageFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/LinkIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/LooseListIcon.js +7 -0
- package/dist/scripts/src/components/Icon/MoonIcon.js +10 -0
- package/dist/scripts/src/components/Icon/MoreOptionsIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PDFIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PenIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhoneIcon.js +7 -0
- package/dist/scripts/src/components/Icon/PhotoIcon.js +10 -0
- package/dist/scripts/src/components/Icon/PlusIcon.js +7 -0
- package/dist/scripts/src/components/Icon/SearchIcon.js +7 -0
- package/dist/scripts/src/components/Icon/ShareIcon.js +10 -0
- package/dist/scripts/src/components/Icon/SunIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrashIcon.js +7 -0
- package/dist/scripts/src/components/Icon/TxtIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnknownFileIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UnlinkIcon.js +10 -0
- package/dist/scripts/src/components/Icon/UserIcon.js +7 -0
- package/dist/scripts/src/components/Icon/WarningIcon.js +7 -0
- package/dist/scripts/src/components/Icon/XlsIcon.js +10 -0
- package/dist/scripts/src/components/IconProvider.js +249 -0
- package/dist/scripts/src/components/IconRegistryContext.js +307 -0
- package/dist/scripts/src/components/Image/Image.js +34 -0
- package/dist/scripts/src/components/Input/InputAdornment.js +14 -0
- package/dist/scripts/src/components/Input/input-abstractions.js +44 -0
- package/dist/scripts/src/components/Items/Items.js +48 -0
- package/dist/scripts/src/components/Link/Link.js +72 -0
- package/dist/scripts/src/components/List/List.js +442 -0
- package/dist/scripts/src/components/Logo/Logo.js +25 -0
- package/dist/scripts/src/components/Map/Map.js +60 -0
- package/dist/scripts/src/components/Map/world_countries.json +45307 -0
- package/dist/scripts/src/components/Markdown/Markdown.js +120 -0
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +106 -0
- package/dist/scripts/src/components/ModalDialog/Dialog.js +20 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +145 -0
- package/dist/scripts/src/components/MultiCombobox/MultiCombobox.js +249 -0
- package/dist/scripts/src/components/MultiSelect/MultiSelect.js +192 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.js +113 -0
- package/dist/scripts/src/components/NavLink/NavLink.js +115 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +101 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +39 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.js +373 -0
- package/dist/scripts/src/components/Option/Option.js +41 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +22 -0
- package/dist/scripts/src/components/Pages/Pages.js +74 -0
- package/dist/scripts/src/components/Pdf/LazyPdf.js +44 -0
- package/dist/scripts/src/components/Pdf/Pdf.js +19 -0
- package/dist/scripts/src/components/PieChart/PieChart.js +184 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +29 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +38 -0
- package/dist/scripts/src/components/Queue/Queue.js +286 -0
- package/dist/scripts/src/components/Queue/queueActions.js +87 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +144 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +147 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +10 -0
- package/dist/scripts/src/components/Select/Select.js +139 -0
- package/dist/scripts/src/components/Select/SelectContext.js +45 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +88 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +22 -0
- package/dist/scripts/src/components/Spinner/Spinner.js +59 -0
- package/dist/scripts/src/components/Splitter/Splitter.js +205 -0
- package/dist/scripts/src/components/Splitter/utils.js +17 -0
- package/dist/scripts/src/components/Stack/Stack.js +117 -0
- package/dist/scripts/src/components/StickyBox/StickyBox.js +33 -0
- package/dist/scripts/src/components/Switch/Switch.js +50 -0
- package/dist/scripts/src/components/Table/Table.js +499 -0
- package/dist/scripts/src/components/Table/useRowSelection.js +169 -0
- package/dist/scripts/src/components/TableColumnDef/TableColumnDef.js +44 -0
- package/dist/scripts/src/components/TableColumnDef/TableContext.js +12 -0
- package/dist/scripts/src/components/Tabs/Tabs.js +85 -0
- package/dist/scripts/src/components/Text/Text.js +175 -0
- package/dist/scripts/src/components/TextArea/TextArea.js +194 -0
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +63 -0
- package/dist/scripts/src/components/TextArea/useComposedRef.js +50 -0
- package/dist/scripts/src/components/TextBox/TextBox.js +145 -0
- package/dist/scripts/src/components/Theme/NotificationToast.js +39 -0
- package/dist/scripts/src/components/Theme/Theme.js +153 -0
- package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +125 -0
- package/dist/scripts/src/components/Toggle/Toggle.js +88 -0
- package/dist/scripts/src/components/Tree/TreeComponent.js +79 -0
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +59 -0
- package/dist/scripts/src/components/ViewComponentRegistryContext.js +34 -0
- package/dist/scripts/src/components/abstractions.js +2 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components/component-utils.js +32 -0
- package/dist/scripts/src/components/container-helpers.js +18 -0
- package/dist/scripts/src/components-core/ApiBoundComponent.js +189 -0
- package/dist/scripts/src/components-core/AppContext.js +17 -0
- package/dist/scripts/src/components-core/ChildrenSlot.js +10 -0
- package/dist/scripts/src/components-core/Component.js +280 -0
- package/dist/scripts/src/components-core/ComponentDecorator.js +63 -0
- package/dist/scripts/src/components-core/CompoundComponent.js +132 -0
- package/dist/scripts/src/components-core/EngineError.js +91 -0
- package/dist/scripts/src/components-core/ErrorBoundary.js +58 -0
- package/dist/scripts/src/components-core/Fragment.js +14 -0
- package/dist/scripts/src/components-core/InvalidComponent.js +15 -0
- package/dist/scripts/src/components-core/LoaderComponent.js +78 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +341 -0
- package/dist/scripts/src/components-core/RootComponent.js +272 -0
- package/dist/scripts/src/components-core/RouteContext.js +45 -0
- package/dist/scripts/src/components-core/ScrollContext.js +9 -0
- package/dist/scripts/src/components-core/UnknownComponent.js +15 -0
- package/dist/scripts/src/components-core/abstractions/ComponentRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/LoaderRenderer.js +2 -0
- package/dist/scripts/src/components-core/abstractions/containers.js +18 -0
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +2 -0
- package/dist/scripts/src/components-core/action/ApiAction.js +276 -0
- package/dist/scripts/src/components-core/action/DownloadFileAction.js +80 -0
- package/dist/scripts/src/components-core/action/NavigateAction.js +20 -0
- package/dist/scripts/src/components-core/action/TimedAction.js +21 -0
- package/dist/scripts/src/components-core/action/UploadAction.js +88 -0
- package/dist/scripts/src/components-core/action/actions.js +15 -0
- package/dist/scripts/src/components-core/appContext/date-functions.js +19 -0
- package/dist/scripts/src/components-core/appContext/misc-utils.js +12 -0
- package/dist/scripts/src/components-core/component-hooks.js +25 -0
- package/dist/scripts/src/components-core/constants.js +18 -0
- package/dist/scripts/src/components-core/container/Container.js +1110 -0
- package/dist/scripts/src/components-core/container/ContainerComponentDef.js +16 -0
- package/dist/scripts/src/components-core/container/buildProxy.js +54 -0
- package/dist/scripts/src/components-core/container/collectFnVarDeps.js +26 -0
- package/dist/scripts/src/components-core/container/valueExtractor.js +195 -0
- package/dist/scripts/src/components-core/descriptorHelper.js +75 -0
- package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +9 -0
- package/dist/scripts/src/components-core/loader/ApiLoader.js +46 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +160 -0
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +52 -0
- package/dist/scripts/src/components-core/loader/Loader.js +115 -0
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +32 -0
- package/dist/scripts/src/components-core/loader/PageableLoader.js +240 -0
- package/dist/scripts/src/components-core/renderers.js +45 -0
- package/dist/scripts/src/components-core/reportEngineError.js +59 -0
- package/dist/scripts/src/components-core/script-runner/BindingTreeEvaluationContext.js +35 -0
- package/dist/scripts/src/components-core/script-runner/ICustomOperations.js +34 -0
- package/dist/scripts/src/components-core/script-runner/LogicalThread.js +2 -0
- package/dist/scripts/src/components-core/script-runner/LoopScope.js +2 -0
- package/dist/scripts/src/components-core/script-runner/ParameterParser.js +117 -0
- package/dist/scripts/src/components-core/script-runner/TryScope.js +2 -0
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +96 -0
- package/dist/scripts/src/components-core/script-runner/bannedFunctions.js +34 -0
- package/dist/scripts/src/components-core/script-runner/custom-operations-registry.js +40 -0
- package/dist/scripts/src/components-core/script-runner/custom-ui-data.js +40 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +551 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +498 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +434 -0
- package/dist/scripts/src/components-core/script-runner/modules.js +250 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +818 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +193 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +740 -0
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +62 -0
- package/dist/scripts/src/components-core/script-runner/visitors.js +352 -0
- package/dist/scripts/src/components-core/theming/ThemeContext.js +43 -0
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +334 -0
- package/dist/scripts/src/components-core/theming/abstractions.js +11 -0
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +114 -0
- package/dist/scripts/src/components-core/theming/hvar.js +105 -0
- package/dist/scripts/src/components-core/theming/themeVars.js +62 -0
- package/dist/scripts/src/components-core/theming/themes/base-utils.js +31 -0
- package/dist/scripts/src/components-core/theming/themes/palette.js +53 -0
- package/dist/scripts/src/components-core/theming/themes/root.js +257 -0
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +407 -0
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +32 -0
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +286 -0
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +34 -0
- package/dist/scripts/src/components-core/utils/LruCache.js +184 -0
- package/dist/scripts/src/components-core/utils/actionUtils.js +32 -0
- package/dist/scripts/src/components-core/utils/classnames.js +58 -0
- package/dist/scripts/src/components-core/utils/css-utils.js +127 -0
- package/dist/scripts/src/components-core/utils/date-utils.js +78 -0
- package/dist/scripts/src/components-core/utils/extractParam.js +148 -0
- package/dist/scripts/src/components-core/utils/hooks.js +221 -0
- package/dist/scripts/src/components-core/utils/mergeProps.js +45 -0
- package/dist/scripts/src/components-core/utils/misc.js +460 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +205 -0
- package/dist/scripts/src/components-core/utils/treeUtils.js +48 -0
- package/dist/scripts/src/components-core/xmlui-parser.js +52 -0
- package/dist/scripts/src/parsers/scripting/InputStream.js +59 -0
- package/dist/scripts/src/parsers/scripting/Lexer.js +1028 -0
- package/dist/scripts/src/parsers/scripting/Parser.js +2647 -0
- package/dist/scripts/src/parsers/scripting/ParserError.js +46 -0
- package/dist/scripts/src/parsers/scripting/TokenTrait.js +109 -0
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +118 -0
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +602 -0
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +39 -0
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +621 -0
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +1000 -0
- package/dist/scripts/src/parsers/style-parser/errors.js +37 -0
- package/dist/scripts/src/parsers/style-parser/source-tree.js +2 -0
- package/dist/scripts/src/parsers/style-parser/style-compiler.js +513 -0
- package/dist/scripts/src/parsers/style-parser/tokens.js +42 -0
- package/dist/scripts/src/parsers/ueml/ParserError.js +54 -0
- package/dist/scripts/src/parsers/ueml/UemlHelper.js +579 -0
- package/dist/scripts/src/parsers/ueml/UemlInputStream.js +59 -0
- package/dist/scripts/src/parsers/ueml/UemlLexer.js +868 -0
- package/dist/scripts/src/parsers/ueml/UemlParser.js +1439 -0
- package/dist/scripts/src/parsers/ueml/UemlToken.js +24 -0
- package/dist/scripts/src/parsers/ueml/fileExtensions.js +6 -0
- package/dist/scripts/src/parsers/ueml/source-tree.js +2 -0
- package/dist/scripts/src/parsers/ueml/ueml-tree.js +2 -0
- package/dist/scripts/src/parsers/xmlui-parser/CharacterCodes.js +136 -0
- package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +100 -0
- package/dist/scripts/src/parsers/xmlui-parser/parser.js +476 -0
- package/dist/scripts/src/parsers/xmlui-parser/scanner.js +415 -0
- package/dist/scripts/src/parsers/xmlui-parser/syntax-kind.js +106 -0
- package/dist/scripts/src/parsers/xmlui-parser/syntax-node.js +2 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +922 -0
- package/dist/scripts/src/parsers/xmlui-parser/utils.js +83 -0
- package/dist/xmlui.es.d.ts +1667 -0
- package/dist/xmlui.es.js +17 -0
- package/dist/xmlui.umd.js +1589 -0
- package/package.json +175 -0
|
@@ -0,0 +1,1667 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import type { DefaultToastOptions } from 'react-hot-toast';
|
|
3
|
+
import { ErrorInfo } from 'react';
|
|
4
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
5
|
+
import type { NavigateOptions } from 'react-router-dom';
|
|
6
|
+
import type { QueryClient } from '@tanstack/react-query';
|
|
7
|
+
import { default as React_2 } from 'react';
|
|
8
|
+
import { default as ReactDOM_2 } from 'react-dom/client';
|
|
9
|
+
import { ReactNode } from 'react';
|
|
10
|
+
import type { Renderable } from 'react-hot-toast';
|
|
11
|
+
import type { To } from 'react-router-dom';
|
|
12
|
+
import type { Toast } from 'react-hot-toast';
|
|
13
|
+
import type { ToastOptions } from 'react-hot-toast';
|
|
14
|
+
import type { ValueOrFunction } from 'react-hot-toast';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This type represents the context in which an action is executed.
|
|
18
|
+
*/
|
|
19
|
+
declare interface ActionExecutionContext {
|
|
20
|
+
/**
|
|
21
|
+
* A unique identifier for the container that the action is executed in.
|
|
22
|
+
*/
|
|
23
|
+
uid: symbol;
|
|
24
|
+
/**
|
|
25
|
+
* The state of the container that the action is executed in.
|
|
26
|
+
*/
|
|
27
|
+
state: ContainerState;
|
|
28
|
+
/**
|
|
29
|
+
* The appContext object passed to the current app
|
|
30
|
+
*/
|
|
31
|
+
appContext: AppContextObject;
|
|
32
|
+
/**
|
|
33
|
+
* The lookup function to resolve a sync action by its name.
|
|
34
|
+
*/
|
|
35
|
+
lookupAction: LookupAsyncFnInner;
|
|
36
|
+
navigate: any;
|
|
37
|
+
location: any;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* This type represents a function that executes a particular action within the specified context
|
|
42
|
+
* using the given arguments.
|
|
43
|
+
*/
|
|
44
|
+
declare type ActionFunction = (executionContext: ActionExecutionContext, ...args: any[]) => any;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* XMLUI keeps a registry of available actions to store information about out-of-the-box and custom
|
|
48
|
+
* actions (contributions implemented in external packages or files). This type describes the
|
|
49
|
+
* information the registry needs about the action to be able to render it.
|
|
50
|
+
*/
|
|
51
|
+
declare interface ActionRendererDef {
|
|
52
|
+
/**
|
|
53
|
+
* The name of the action that will be used to reference it in XMLUI.
|
|
54
|
+
*/
|
|
55
|
+
actionName: string;
|
|
56
|
+
/**
|
|
57
|
+
* The function that executes the action.
|
|
58
|
+
*/
|
|
59
|
+
actionFn: ActionFunction;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare type AlignmentOptions = "start" | "center" | "end";
|
|
63
|
+
|
|
64
|
+
export declare type ApiInterceptorDefinition = {
|
|
65
|
+
type?: string;
|
|
66
|
+
config?: Record<string, any>;
|
|
67
|
+
schemaDescriptor?: SchemaDescriptor;
|
|
68
|
+
apiUrl?: string;
|
|
69
|
+
initialData?: Record<string, any[]> | (() => Promise<Record<string, any[]>>);
|
|
70
|
+
helpers?: Record<string, any>;
|
|
71
|
+
operations?: Record<string, InterceptorOperationDef>;
|
|
72
|
+
auth?: AuthDefinition;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* This interface defines the properties and services of an app context that the application components can use when
|
|
77
|
+
* implementing their behavior.
|
|
78
|
+
*/
|
|
79
|
+
declare type AppContextObject = {
|
|
80
|
+
/**
|
|
81
|
+
* Accept other methods
|
|
82
|
+
*/
|
|
83
|
+
[x: string]: unknown;
|
|
84
|
+
/**
|
|
85
|
+
* Navigate from the current location to the specified one using the given options.
|
|
86
|
+
* @param to New app location
|
|
87
|
+
* @param options Navigation options
|
|
88
|
+
*/
|
|
89
|
+
readonly navigate: (to: To, options?: NavigateOptions) => void;
|
|
90
|
+
/**
|
|
91
|
+
* Display a confirmation dialog in the UI and retrieve the confirmation result.
|
|
92
|
+
* @param title Dialog title
|
|
93
|
+
* @param message Confirmation message
|
|
94
|
+
* @param actionMessage Optional action message
|
|
95
|
+
* @return True, if the user confirmed the action; otherwise, false.
|
|
96
|
+
*/
|
|
97
|
+
readonly confirm: (title: string, message?: string, actionMessage?: string) => Promise<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* Get the information about the logged-in user. If null, no user is logged in.
|
|
100
|
+
*/
|
|
101
|
+
readonly loggedInUser: LoggedInUserDto | null;
|
|
102
|
+
readonly setLoggedInUser: (loggedInUser: any) => void;
|
|
103
|
+
/**
|
|
104
|
+
* The `QueryClient` object of the react-query library AppEngine uses for data fetching purposes
|
|
105
|
+
*/
|
|
106
|
+
readonly queryClient: QueryClient | null;
|
|
107
|
+
/**
|
|
108
|
+
* The base name of the router
|
|
109
|
+
*/
|
|
110
|
+
readonly routerBaseName: string;
|
|
111
|
+
/**
|
|
112
|
+
* Get an unformatted Date string that is JSON friendly.
|
|
113
|
+
* If no input param is set, use the current date time.
|
|
114
|
+
* @param date Potential Date string
|
|
115
|
+
*/
|
|
116
|
+
readonly isoDateString: (date?: string) => string;
|
|
117
|
+
/**
|
|
118
|
+
* A function that formats a date value to a string
|
|
119
|
+
* @param date Date to format
|
|
120
|
+
*/
|
|
121
|
+
readonly formatDate: (date: string | Date) => string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* A function that formats a date and time value to a string
|
|
124
|
+
* @param date Date to format
|
|
125
|
+
*/
|
|
126
|
+
readonly formatDateTime: (date: any) => string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* A function that formats a time value to a string
|
|
129
|
+
* @param date Date to format
|
|
130
|
+
*/
|
|
131
|
+
readonly formatTime: (date: any) => string | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* A function that formats a file size number to a friendly string
|
|
134
|
+
* @param bytes Number of bytes to format
|
|
135
|
+
*/
|
|
136
|
+
readonly formatFileSizeInBytes: (bytes: number) => string | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* A function that retrieves the extension of the specified file name
|
|
139
|
+
* @param fileName Filename to check for extension
|
|
140
|
+
*/
|
|
141
|
+
readonly getFileExtension: (fileName: string) => string | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* Indicates that the root component represents a standalone application that runs without interacting with the
|
|
144
|
+
* storage engine.
|
|
145
|
+
*/
|
|
146
|
+
readonly standalone?: boolean;
|
|
147
|
+
readonly decorateComponentsWithTestId?: boolean;
|
|
148
|
+
readonly signError: (error: Error | string) => void;
|
|
149
|
+
readonly toast: {
|
|
150
|
+
(message: Message, opts?: ToastOptions): string;
|
|
151
|
+
error: ToastHandler;
|
|
152
|
+
success: ToastHandler;
|
|
153
|
+
loading: ToastHandler;
|
|
154
|
+
custom: ToastHandler;
|
|
155
|
+
dismiss(toastId?: string): void;
|
|
156
|
+
remove(toastId?: string): void;
|
|
157
|
+
promise<T>(promise: Promise<T>, msgs: {
|
|
158
|
+
loading: Renderable;
|
|
159
|
+
success: ValueOrFunction<Renderable, T>;
|
|
160
|
+
error: ValueOrFunction<Renderable, any>;
|
|
161
|
+
}, opts?: DefaultToastOptions): Promise<T>;
|
|
162
|
+
};
|
|
163
|
+
readonly activeThemeUid: string;
|
|
164
|
+
readonly availableThemeUids: string[];
|
|
165
|
+
readonly setTheme: (newTheme: string) => void;
|
|
166
|
+
readonly globals?: Record<string, any>;
|
|
167
|
+
readonly resources?: Record<string, string>;
|
|
168
|
+
readonly apiInterceptorContext: IApiInterceptorContext;
|
|
169
|
+
readonly formatTimeWithoutSeconds: (date: string | Date) => string | undefined;
|
|
170
|
+
readonly formatDateWithoutYear: (date: string | Date) => string | undefined;
|
|
171
|
+
readonly smartFormatDateTime: (date: string | Date) => string | undefined;
|
|
172
|
+
readonly smartFormatDate: (date: string | Date) => string | undefined;
|
|
173
|
+
readonly capitalize: (s?: string) => string;
|
|
174
|
+
readonly pluralize: (number: number, singular: string, plural: string) => string;
|
|
175
|
+
readonly delay: (timeInMs: number, callback?: any) => Promise<void>;
|
|
176
|
+
readonly getDate: () => Date;
|
|
177
|
+
readonly getDateUntilNow: (date?: string | number | Date, nowLabel?: string, time?: string) => string;
|
|
178
|
+
readonly Actions: Record<string, ActionFunction>;
|
|
179
|
+
readonly Transforms: Record<string, any>;
|
|
180
|
+
readonly Utils: Record<string, any>;
|
|
181
|
+
readonly DateUtils: Record<string, any>;
|
|
182
|
+
readonly embed: {
|
|
183
|
+
isInIFrame: boolean;
|
|
184
|
+
};
|
|
185
|
+
readonly environment: {
|
|
186
|
+
isWindowFocused: boolean;
|
|
187
|
+
};
|
|
188
|
+
readonly mediaSize: {
|
|
189
|
+
phone: boolean;
|
|
190
|
+
tablet: boolean;
|
|
191
|
+
desktop: boolean;
|
|
192
|
+
smallScreen: boolean;
|
|
193
|
+
largeScreen: boolean;
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
declare interface ArrayDestructure extends DestructureBase {
|
|
198
|
+
type: "ADestr";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
declare interface ArrayLiteral extends ExpressionBase {
|
|
202
|
+
type: "ALitE";
|
|
203
|
+
items: Expression[];
|
|
204
|
+
loose?: boolean;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
declare interface ArrowExpression extends ExpressionBase {
|
|
208
|
+
type: "ArrowE";
|
|
209
|
+
args: Expression[];
|
|
210
|
+
statement: Statement;
|
|
211
|
+
closureContext?: BlockScope[];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
declare interface ArrowExpressionStatement extends StatementBase {
|
|
215
|
+
type: "ArrowS";
|
|
216
|
+
expression: ArrowExpression;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
declare interface AssignmentExpression extends ExpressionBase {
|
|
220
|
+
type: "AsgnE";
|
|
221
|
+
leftValue: Expression;
|
|
222
|
+
operator: AssignmentSymbols;
|
|
223
|
+
operand: Expression;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* XMLUI executes its code asynchronously. This type defines functions that can be used in XMLUI
|
|
230
|
+
* as actions or event handlers.
|
|
231
|
+
*/
|
|
232
|
+
declare type AsyncFunction = (...args: any) => Promise<any> | any;
|
|
233
|
+
|
|
234
|
+
declare type AuthDefinition = {
|
|
235
|
+
defaultLoggedInUser?: any;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
declare interface BaseNode {
|
|
239
|
+
/**
|
|
240
|
+
* Node type discriminator
|
|
241
|
+
*/
|
|
242
|
+
type: Node_2["type"];
|
|
243
|
+
/**
|
|
244
|
+
* Start position (inclusive) of the node
|
|
245
|
+
*/
|
|
246
|
+
startPosition?: number;
|
|
247
|
+
/**
|
|
248
|
+
* End position (exclusive)
|
|
249
|
+
*/
|
|
250
|
+
endPosition?: number;
|
|
251
|
+
/**
|
|
252
|
+
* Start line number of the start token of the node
|
|
253
|
+
*/
|
|
254
|
+
startLine?: number;
|
|
255
|
+
/**
|
|
256
|
+
* End line number of the end token of the node
|
|
257
|
+
*/
|
|
258
|
+
endLine?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Start column number (inclusive) of the node
|
|
261
|
+
*/
|
|
262
|
+
startColumn?: number;
|
|
263
|
+
/**
|
|
264
|
+
* End column number (exclusive) of the node
|
|
265
|
+
*/
|
|
266
|
+
endColumn?: number;
|
|
267
|
+
/**
|
|
268
|
+
* The source code of the expression
|
|
269
|
+
*/
|
|
270
|
+
source?: string;
|
|
271
|
+
/**
|
|
272
|
+
* The start token of the node
|
|
273
|
+
*/
|
|
274
|
+
startToken?: Token;
|
|
275
|
+
/**
|
|
276
|
+
* The end token of the node
|
|
277
|
+
*/
|
|
278
|
+
endToken?: Token;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
declare interface BinaryExpression extends ExpressionBase {
|
|
282
|
+
type: "BinaryE";
|
|
283
|
+
operator: BinaryOpSymbols;
|
|
284
|
+
left: Expression;
|
|
285
|
+
right: Expression;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare type BinaryOpSymbols = "**" | "*" | "/" | "%" | "+" | "-" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "==" | "===" | "!=" | "!==" | "&" | "|" | "^" | "&&" | "||" | "??" | "in";
|
|
289
|
+
|
|
290
|
+
declare type BlockScope = {
|
|
291
|
+
vars: Record<string, any>;
|
|
292
|
+
constVars?: Set<string>;
|
|
293
|
+
returnValue?: any;
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
declare interface BlockStatement extends StatementBase {
|
|
297
|
+
type: "BlockS";
|
|
298
|
+
statements: Statement[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
declare interface BreakStatement extends StatementBase {
|
|
302
|
+
type: "BrkS";
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
export declare const Button: React_2.ForwardRefExoticComponent<{
|
|
306
|
+
id?: string;
|
|
307
|
+
type?: ButtonType;
|
|
308
|
+
variant?: ButtonVariant;
|
|
309
|
+
themeColor?: ButtonThemeColor;
|
|
310
|
+
size?: ButtonSize;
|
|
311
|
+
disabled?: boolean;
|
|
312
|
+
children?: React_2.ReactNode | React_2.ReactNode[];
|
|
313
|
+
icon?: React_2.ReactNode;
|
|
314
|
+
iconPosition?: IconPosition;
|
|
315
|
+
contentPosition?: AlignmentOptions;
|
|
316
|
+
orientation?: OrientationOptions;
|
|
317
|
+
formId?: string;
|
|
318
|
+
style?: CSSProperties;
|
|
319
|
+
gap?: string | number;
|
|
320
|
+
accessibilityProps?: any;
|
|
321
|
+
autoFocus?: boolean;
|
|
322
|
+
title?: string;
|
|
323
|
+
} & Pick<React_2.HTMLAttributes<HTMLButtonElement>, "className" | "onClick" | "tabIndex" | "onFocus" | "onBlur" | ButtonAria> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
324
|
+
|
|
325
|
+
declare type ButtonAria = "aria-controls" | "aria-expanded" | "aria-disabled" | "aria-label";
|
|
326
|
+
|
|
327
|
+
declare type ButtonHintValueType = "ButtonType" | "ButtonVariant" | "ButtonThemeColor" | "ButtonSize";
|
|
328
|
+
|
|
329
|
+
declare type ButtonSize = "xs" | "sm" | "md" | "lg";
|
|
330
|
+
|
|
331
|
+
declare type ButtonThemeColor = "attention" | "primary" | "secondary";
|
|
332
|
+
|
|
333
|
+
declare type ButtonType = "button" | "submit" | "reset";
|
|
334
|
+
|
|
335
|
+
declare type ButtonVariant = "solid" | "outlined" | "ghost";
|
|
336
|
+
|
|
337
|
+
declare interface CalculatedMemberAccessExpression extends ExpressionBase {
|
|
338
|
+
type: "CMembE";
|
|
339
|
+
object: Expression;
|
|
340
|
+
member: Expression;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
declare type CodeDeclaration = {
|
|
344
|
+
source?: string;
|
|
345
|
+
tree: Expression;
|
|
346
|
+
[x: string]: unknown;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
declare type CollectedDeclarations = {
|
|
350
|
+
vars: Record<string, CodeDeclaration>;
|
|
351
|
+
functions: Record<string, CodeDeclaration>;
|
|
352
|
+
moduleErrors?: ModuleErrors;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
declare type ColorDef = {
|
|
356
|
+
name: string;
|
|
357
|
+
format: "hex" | "rgb" | "hsl";
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* XMLUI turns its markup into component definitions, simple data structures describing a component.
|
|
362
|
+
* When the engine renders these definitions, it turns them into React components.
|
|
363
|
+
*
|
|
364
|
+
* Components (like other concepts within the XMLUI framework) use properties and event handlers to do
|
|
365
|
+
* their job; thus, this interface extends `ObjectWithProps<T>`.
|
|
366
|
+
*
|
|
367
|
+
* We will refactor component script handling in the future and consider removing the `uses` property.
|
|
368
|
+
*/
|
|
369
|
+
export declare interface ComponentDef<T extends string = string> extends Scriptable {
|
|
370
|
+
type: T;
|
|
371
|
+
uid?: string;
|
|
372
|
+
testId?: string;
|
|
373
|
+
props?: Record<string, any>;
|
|
374
|
+
events?: Record<string, any>;
|
|
375
|
+
/**
|
|
376
|
+
* Though components manage their state internally, the app logic may require user state management.
|
|
377
|
+
* Components may have user *variables*, which the UI logic uses to manage the application state.
|
|
378
|
+
* This property holds the variables (name and value pairs) associated with this component definition.
|
|
379
|
+
*/
|
|
380
|
+
vars?: Record<string, any>;
|
|
381
|
+
/**
|
|
382
|
+
* Each component may have child components to constitute a hierarchy of components. This property
|
|
383
|
+
* holds the definition of these nested children.
|
|
384
|
+
*/
|
|
385
|
+
children?: ComponentDef[];
|
|
386
|
+
/**
|
|
387
|
+
* This property is evaluated to a Boolean value during run time. When this value is `true`, the
|
|
388
|
+
* component with its children chain is rendered; otherwise, the entire component hierarchy is omitted
|
|
389
|
+
* from the rendered tree.
|
|
390
|
+
*/
|
|
391
|
+
when?: string | boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Some components work with data obtained asynchronously. Fetching this data requires some state
|
|
394
|
+
* management handling the complexity (including error handling) of data access. A *loader* is
|
|
395
|
+
* responsible for managing this logic. This property holds the loaders associated with this component
|
|
396
|
+
* definition.
|
|
397
|
+
*/
|
|
398
|
+
loaders?: ComponentDef[];
|
|
399
|
+
/**
|
|
400
|
+
* Components may have functions that are used to perform some logic. This property holds the functions
|
|
401
|
+
* (name and function body) associated with this component definition.
|
|
402
|
+
*/
|
|
403
|
+
functions?: Record<string, any>;
|
|
404
|
+
/**
|
|
405
|
+
* Components may have an API that other components can use to interact with them. This property holds
|
|
406
|
+
* the API methods associated with this component definition.
|
|
407
|
+
*/
|
|
408
|
+
api?: Record<string, any>;
|
|
409
|
+
/**
|
|
410
|
+
* Components may provide context variables that can be used to in expressions and event handlers
|
|
411
|
+
* within the component.
|
|
412
|
+
*/
|
|
413
|
+
contextVars?: Record<string, any>;
|
|
414
|
+
/**
|
|
415
|
+
* Components managing state through variables or loaders are wrapped with containers responsible
|
|
416
|
+
* for this job. Just as components, containers form a hierarchy. While working with this hierarchy,
|
|
417
|
+
* parent components may flow state values (key and value pairs) to their child containers. This
|
|
418
|
+
* property holds the name of state values to flow down to the direct child containers.
|
|
419
|
+
*/
|
|
420
|
+
uses?: string[];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
declare type ComponentDescriptor<T extends ComponentDef> = {
|
|
424
|
+
displayName?: string;
|
|
425
|
+
description?: string;
|
|
426
|
+
props?: PropertyComponentDescriptorHash<T>;
|
|
427
|
+
events?: EventDescriptorHash<T>;
|
|
428
|
+
nonVisual?: boolean;
|
|
429
|
+
opaque?: boolean;
|
|
430
|
+
themeVars?: Array<string>;
|
|
431
|
+
defaultThemeVars?: DefaultThemeVars;
|
|
432
|
+
toneSpecificThemeVars?: Record<string, Record<string, string>>;
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Sometimes, components and compound components can both be used
|
|
437
|
+
*/
|
|
438
|
+
export declare type ComponentLike = ComponentDef | CompoundComponentDef;
|
|
439
|
+
|
|
440
|
+
declare type ComponentPropertyDescriptor = {
|
|
441
|
+
displayName?: string;
|
|
442
|
+
category?: string;
|
|
443
|
+
description?: string;
|
|
444
|
+
valueType?: PropertyValueType;
|
|
445
|
+
availableValues?: any[];
|
|
446
|
+
defaultValue?: any;
|
|
447
|
+
isValid?: IsValidFunction<any>;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
declare interface ComponentRendererContextBase<T extends ComponentDef = ComponentDef> {
|
|
451
|
+
node: T;
|
|
452
|
+
state: ContainerState;
|
|
453
|
+
appContext?: AppContextObject;
|
|
454
|
+
renderChild: RenderChildFn;
|
|
455
|
+
layoutCss: CSSProperties;
|
|
456
|
+
layoutNonCss: NonCssLayoutProps;
|
|
457
|
+
layoutContext?: LayoutContext;
|
|
458
|
+
dynamicChildren?: Array<DynamicChildComponentDef>;
|
|
459
|
+
childIndex?: number;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Components must be registered with a component registry so the engine can use them. This type
|
|
464
|
+
* collects the information held by the registry.
|
|
465
|
+
*/
|
|
466
|
+
declare type ComponentRendererDef = {
|
|
467
|
+
/**
|
|
468
|
+
* The component's type identifier. In the markup, the component must use this name to be recognized.
|
|
469
|
+
*/
|
|
470
|
+
type: string;
|
|
471
|
+
/**
|
|
472
|
+
* This function renders the component from its definition to its React representation.
|
|
473
|
+
*/
|
|
474
|
+
renderer: ComponentRendererFn<any>;
|
|
475
|
+
/**
|
|
476
|
+
* The metadata to use when rendering the component
|
|
477
|
+
*/
|
|
478
|
+
metadata?: ComponentDescriptor<any>;
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
*/
|
|
484
|
+
declare type ComponentRendererFn<T extends ComponentDef> = (context: RendererContext<T>) => ReactNode;
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* XMLUI allows the creation of reusable components assembled from other XMLUI components (with markup).
|
|
488
|
+
* This type represents such components. The name `CompoundComponent` refers to the assembled nature
|
|
489
|
+
* of reusable components.
|
|
490
|
+
*/
|
|
491
|
+
export declare interface CompoundComponentDef extends Scriptable {
|
|
492
|
+
/**
|
|
493
|
+
* Each compound component must have a unique name. The markup uses this name to refer to the
|
|
494
|
+
* particular compound component.
|
|
495
|
+
*/
|
|
496
|
+
name: string;
|
|
497
|
+
/**
|
|
498
|
+
* Each compound component must have a single root component defining the component contents.
|
|
499
|
+
*/
|
|
500
|
+
component: ComponentLike;
|
|
501
|
+
/**
|
|
502
|
+
* Compound components may provide an API that other components can use to interact with them. This
|
|
503
|
+
* property holds the API methods associated with this compound component definition.
|
|
504
|
+
*/
|
|
505
|
+
api?: Record<string, any>;
|
|
506
|
+
/**
|
|
507
|
+
* This property holds the variables (name and value pairs) associated with this compound component
|
|
508
|
+
* definition.
|
|
509
|
+
*/
|
|
510
|
+
vars?: Record<string, any>;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
declare interface ConditionalExpression extends ExpressionBase {
|
|
514
|
+
type: "CondE";
|
|
515
|
+
condition: Expression;
|
|
516
|
+
consequent: Expression;
|
|
517
|
+
alternate: Expression;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
declare interface ConstStatement extends StatementBase {
|
|
521
|
+
type: "ConstS";
|
|
522
|
+
declarations: VarDeclaration[];
|
|
523
|
+
isExported?: boolean;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* We store the state application state in a hierarchical structure of containers. This type represents
|
|
528
|
+
* the state within a single container stored as key and value pairs.
|
|
529
|
+
*/
|
|
530
|
+
declare type ContainerState = Record<string | symbol, any>;
|
|
531
|
+
|
|
532
|
+
declare interface ContinueStatement extends StatementBase {
|
|
533
|
+
type: "ContS";
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
declare type ContributesDefinition = {
|
|
537
|
+
components?: ComponentRendererDef[];
|
|
538
|
+
actions?: ActionRendererDef[];
|
|
539
|
+
compoundComponents?: CompoundComponentDef[];
|
|
540
|
+
themes?: ThemeDefinition[];
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* This helper function creates a component renderer definition from its arguments.
|
|
545
|
+
* @param type The unique identifier of the component definition
|
|
546
|
+
* @param renderer The function that renders the component definition into a React node
|
|
547
|
+
* @param hints Optional hints to help fix the rendering errors coming from invalid component property definitions
|
|
548
|
+
* @returns The view renderer definition composed of the arguments
|
|
549
|
+
*/
|
|
550
|
+
export declare function createComponentRenderer<T extends ComponentDef>(type: T["type"], renderer: ComponentRendererFn<T>, hints?: ComponentDescriptor<T>): ComponentRendererDef;
|
|
551
|
+
|
|
552
|
+
declare type DefaultThemeVars = Record<string | ThemeTone, string | Record<string, string>>;
|
|
553
|
+
|
|
554
|
+
declare type DefaultValueDescriptor = (string | ThemeIdDescriptor)[];
|
|
555
|
+
|
|
556
|
+
declare interface Destructure extends DestructureBase {
|
|
557
|
+
type: "Destr";
|
|
558
|
+
arrayDestruct?: ArrayDestructure[];
|
|
559
|
+
objectDestruct?: ObjectDestructure[];
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
declare interface DestructureBase extends ExpressionBase {
|
|
563
|
+
id?: string;
|
|
564
|
+
arrayDestruct?: ArrayDestructure[];
|
|
565
|
+
objectDestruct?: ObjectDestructure[];
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
declare interface DoWhileStatement extends StatementBase {
|
|
569
|
+
type: "DoWS";
|
|
570
|
+
condition: Expression;
|
|
571
|
+
body: Statement;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Some components render their nested child components dynamically using the current context of
|
|
576
|
+
* their parents. For example, reusable components (`CompoundComponentDef`) have a `ChildrenSlot`
|
|
577
|
+
* placeholder that marks the location where the children should be rendered. Other component types
|
|
578
|
+
* (e.g., `ApiBoundComponent` and `ContainerComponent`) use this dynamic rendering, too.
|
|
579
|
+
*
|
|
580
|
+
* This interface represents this functionality.
|
|
581
|
+
*/
|
|
582
|
+
declare interface DynamicChildComponentDef extends ComponentDef {
|
|
583
|
+
/**
|
|
584
|
+
* This property holds a function that can render a particular child or children into a specific
|
|
585
|
+
* layout context.
|
|
586
|
+
*/
|
|
587
|
+
renderChild: RenderChildFn;
|
|
588
|
+
/**
|
|
589
|
+
* This property holds the child component that should be rendered.
|
|
590
|
+
*/
|
|
591
|
+
childToRender: ComponentDef;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
declare interface EmptyStatement extends StatementBase {
|
|
595
|
+
type: "EmptyS";
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* This component serves as an error boundary; it catches any errors within the nested components
|
|
600
|
+
*/
|
|
601
|
+
export declare class ErrorBoundary extends React_2.Component<Props, State> {
|
|
602
|
+
/**
|
|
603
|
+
* We start with "no error" state
|
|
604
|
+
*/
|
|
605
|
+
state: State;
|
|
606
|
+
/**
|
|
607
|
+
* This method is used to implement the Error Boundaries for the React application. It is invoked if some error
|
|
608
|
+
* occurs during the rendering phase of any lifecycle methods or any children components.
|
|
609
|
+
*/
|
|
610
|
+
static getDerivedStateFromError(error: Error): State;
|
|
611
|
+
/**
|
|
612
|
+
* Display any error in the console
|
|
613
|
+
* @param error Error object
|
|
614
|
+
* @param errorInfo Extra information about the error
|
|
615
|
+
*/
|
|
616
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
617
|
+
/**
|
|
618
|
+
* Whenever the `restoreOnChangeOf` property of this component instance changes, we reset the state to "no error".
|
|
619
|
+
* @param prevProps Previous property values
|
|
620
|
+
* @param prevState Previous state
|
|
621
|
+
* @param snapshot Optional snapshot (not used in this component)
|
|
622
|
+
*/
|
|
623
|
+
componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>, snapshot?: any): void;
|
|
624
|
+
render(): string | number | boolean | Iterable<React_2.ReactNode> | JSX_2.Element;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
declare type EventDescriptorHash<T extends ComponentDef> = Partial<Record<keyof NonNullable<T["events"]>, ComponentPropertyDescriptor>>;
|
|
628
|
+
|
|
629
|
+
declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure;
|
|
630
|
+
|
|
631
|
+
declare interface ExpressionBase extends BaseNode {
|
|
632
|
+
value?: any;
|
|
633
|
+
parenthesized?: number;
|
|
634
|
+
valueScope?: any;
|
|
635
|
+
valueIndex?: string | number;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
declare interface ExpressionStatement extends StatementBase {
|
|
639
|
+
type: "ExprS";
|
|
640
|
+
expression: Expression;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* This type describes a font definition resource.
|
|
645
|
+
*/
|
|
646
|
+
declare type FontDef = {
|
|
647
|
+
/**
|
|
648
|
+
* Specifies a name that will be used as the font face value for font properties
|
|
649
|
+
*/
|
|
650
|
+
fontFamily: string;
|
|
651
|
+
/**
|
|
652
|
+
* A font-style value. Accepts two values to specify a range that is supported by a font-face,
|
|
653
|
+
* for example `font-style: oblique 20deg 50deg`
|
|
654
|
+
*/
|
|
655
|
+
fontStyle?: string;
|
|
656
|
+
/**
|
|
657
|
+
* A font-weight value. Accepts two values to specify a range that is supported by a font-face,
|
|
658
|
+
* for example `font-weight: 100 900`
|
|
659
|
+
*/
|
|
660
|
+
fontWeight?: string;
|
|
661
|
+
/**
|
|
662
|
+
* This property determines how a font face is displayed based on whether and when it is downloaded
|
|
663
|
+
* and ready to use.
|
|
664
|
+
*/
|
|
665
|
+
fontDisplay?: string;
|
|
666
|
+
/**
|
|
667
|
+
* The mime type of the font file
|
|
668
|
+
*/
|
|
669
|
+
format?: string;
|
|
670
|
+
/**
|
|
671
|
+
* Specifies references to font resources.
|
|
672
|
+
*/
|
|
673
|
+
src: string;
|
|
674
|
+
} | string;
|
|
675
|
+
|
|
676
|
+
declare interface ForInStatement extends StatementBase {
|
|
677
|
+
type: "ForInS";
|
|
678
|
+
varBinding: ForVarBinding;
|
|
679
|
+
id: string;
|
|
680
|
+
expression: Expression;
|
|
681
|
+
body: Statement;
|
|
682
|
+
keys?: string[];
|
|
683
|
+
keyIndex?: number;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
declare interface ForOfStatement extends StatementBase {
|
|
687
|
+
type: "ForOfS";
|
|
688
|
+
varBinding: ForVarBinding;
|
|
689
|
+
id: string;
|
|
690
|
+
expression: Expression;
|
|
691
|
+
body: Statement;
|
|
692
|
+
iterator?: any;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
declare interface ForStatement extends StatementBase {
|
|
696
|
+
type: "ForS";
|
|
697
|
+
init?: ExpressionStatement | LetStatement;
|
|
698
|
+
condition?: Expression;
|
|
699
|
+
update?: Expression;
|
|
700
|
+
body: Statement;
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
declare type ForVarBinding = "let" | "const" | "none";
|
|
704
|
+
|
|
705
|
+
declare interface FunctionDeclaration extends StatementBase {
|
|
706
|
+
type: "FuncD";
|
|
707
|
+
name: string;
|
|
708
|
+
args: Expression[];
|
|
709
|
+
statement: BlockStatement;
|
|
710
|
+
isExported?: boolean;
|
|
711
|
+
closureContext?: BlockScope[];
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
declare interface FunctionInvocationExpression extends ExpressionBase {
|
|
715
|
+
type: "InvokeE";
|
|
716
|
+
object: Expression;
|
|
717
|
+
arguments: Expression[];
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export declare function getColor(varName: string, format?: "hex" | "rgb" | "hsl"): string;
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* This type represents an arbitrary set of global properties (name and value pairs).
|
|
724
|
+
*/
|
|
725
|
+
declare type GlobalProps = Record<string, any>;
|
|
726
|
+
|
|
727
|
+
declare interface IApiInterceptorContext {
|
|
728
|
+
isMocked: (url: string) => boolean;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export declare const Icon: ({ name, fallback, layout, className, ...restProps }: IconBaseProps) => JSX_2.Element;
|
|
732
|
+
|
|
733
|
+
declare interface IconBaseProps extends React_2.SVGAttributes<SVGElement> {
|
|
734
|
+
children?: React_2.ReactNode;
|
|
735
|
+
color?: string;
|
|
736
|
+
title?: string;
|
|
737
|
+
size?: string;
|
|
738
|
+
isInline?: boolean;
|
|
739
|
+
fallback?: string | React_2.ReactNode;
|
|
740
|
+
layout?: CSSProperties;
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
declare type IconPosition = "left" | "right" | "start" | "end";
|
|
744
|
+
|
|
745
|
+
declare interface Identifier extends ExpressionBase {
|
|
746
|
+
type: "IdE";
|
|
747
|
+
name: string;
|
|
748
|
+
isGlobal?: boolean;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
declare interface IfStatement extends StatementBase {
|
|
752
|
+
type: "IfS";
|
|
753
|
+
condition: Expression;
|
|
754
|
+
thenBranch: Statement;
|
|
755
|
+
elseBranch?: Statement;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
declare interface ImportDeclaration extends StatementBase {
|
|
759
|
+
type: "ImportD";
|
|
760
|
+
imports: Record<string, string>;
|
|
761
|
+
moduleFile: string;
|
|
762
|
+
module?: ScriptModule | null;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
declare type InterceptorOperationDef = {
|
|
766
|
+
method: "get" | "post" | "put" | "delete";
|
|
767
|
+
url: string | Array<string>;
|
|
768
|
+
handler: string;
|
|
769
|
+
requestShape?: any;
|
|
770
|
+
responseShape?: any;
|
|
771
|
+
pathParamTypes?: Record<string, string>;
|
|
772
|
+
queryParamTypes?: Record<string, string>;
|
|
773
|
+
successStatusCode?: number;
|
|
774
|
+
};
|
|
775
|
+
|
|
776
|
+
declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Each component is rendered in a particular layout context (for example, within a stack). This
|
|
780
|
+
* type provides information about that context and the operations that render children in it.
|
|
781
|
+
*/
|
|
782
|
+
declare type LayoutContext<T extends ComponentDef = ComponentDef> = {
|
|
783
|
+
/**
|
|
784
|
+
* The type of the layout context
|
|
785
|
+
*/
|
|
786
|
+
type?: string;
|
|
787
|
+
/**
|
|
788
|
+
* This function allows the React representation of a particular child node to be wrapped in
|
|
789
|
+
* whatever React components to accommodate the current layout context. When the engine is about to
|
|
790
|
+
* render children in a particular layout context, it checks the existence of this function.
|
|
791
|
+
* If declared, the engine invokes it.
|
|
792
|
+
* @param context Rendering context
|
|
793
|
+
* @param renderedChild The React node representing the rendered child
|
|
794
|
+
* @param metadata The metadata of the child component
|
|
795
|
+
* @returns The wrapped React node
|
|
796
|
+
*/
|
|
797
|
+
wrapChild?: (context: RendererContext<T>, renderedChild: ReactNode, metadata?: ComponentDescriptor<T>) => ReactNode;
|
|
798
|
+
/**
|
|
799
|
+
* Arbitrary props extending the layout context
|
|
800
|
+
*/
|
|
801
|
+
[key: string]: any;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
declare type LayoutProps = {
|
|
805
|
+
horizontalAlignment?: string;
|
|
806
|
+
verticalAlignment?: string;
|
|
807
|
+
orientation?: string;
|
|
808
|
+
width?: number | string;
|
|
809
|
+
minWidth?: number | string;
|
|
810
|
+
maxWidth?: number | string;
|
|
811
|
+
height?: number | string;
|
|
812
|
+
minHeight?: number | string;
|
|
813
|
+
maxHeight?: number | string;
|
|
814
|
+
gap?: string;
|
|
815
|
+
top?: number | string;
|
|
816
|
+
right?: number | string;
|
|
817
|
+
bottom?: number | string;
|
|
818
|
+
left?: number | string;
|
|
819
|
+
border?: string;
|
|
820
|
+
borderTop?: string;
|
|
821
|
+
borderRight?: string;
|
|
822
|
+
borderBottom?: string;
|
|
823
|
+
borderLeft?: string;
|
|
824
|
+
radius?: number | string;
|
|
825
|
+
radiusTopLeft?: number | string;
|
|
826
|
+
radiusTopRight?: number | string;
|
|
827
|
+
radiusBottomLeft?: number | string;
|
|
828
|
+
radiusBottomRight?: number | string;
|
|
829
|
+
padding?: number | string;
|
|
830
|
+
horizontalPadding?: number | string;
|
|
831
|
+
verticalPadding?: number | string;
|
|
832
|
+
paddingTop?: number | string;
|
|
833
|
+
paddingRight?: number | string;
|
|
834
|
+
paddingBottom?: number | string;
|
|
835
|
+
paddingLeft?: number | string;
|
|
836
|
+
margin?: number | string;
|
|
837
|
+
horizontalMargin?: number | string;
|
|
838
|
+
verticalMargin?: number | string;
|
|
839
|
+
marginTop?: number | string;
|
|
840
|
+
marginRight?: number | string;
|
|
841
|
+
marginBottom?: number | string;
|
|
842
|
+
marginLeft?: number | string;
|
|
843
|
+
backgroundColor?: string;
|
|
844
|
+
background?: string;
|
|
845
|
+
shadow?: string;
|
|
846
|
+
direction?: string;
|
|
847
|
+
horizontalOverflow?: string;
|
|
848
|
+
verticalOverflow?: string;
|
|
849
|
+
zIndex?: number | string;
|
|
850
|
+
opacity?: string | number;
|
|
851
|
+
color?: string;
|
|
852
|
+
fontFamily?: string;
|
|
853
|
+
fontSize?: number | string;
|
|
854
|
+
fontWeight?: number | string;
|
|
855
|
+
italic?: boolean | string;
|
|
856
|
+
textDecoration?: string;
|
|
857
|
+
userSelect?: string;
|
|
858
|
+
letterSpacing?: string;
|
|
859
|
+
textTransform?: string;
|
|
860
|
+
lineHeight?: string;
|
|
861
|
+
textAlign?: string;
|
|
862
|
+
textWrap?: string;
|
|
863
|
+
textAlignLast?: string;
|
|
864
|
+
wrapContent?: boolean | string;
|
|
865
|
+
canShrink?: boolean | string;
|
|
866
|
+
cursor?: string;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
declare interface LetStatement extends StatementBase {
|
|
870
|
+
type: "LetS";
|
|
871
|
+
declarations: VarDeclaration[];
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
declare interface Literal extends ExpressionBase {
|
|
875
|
+
type: "LitE";
|
|
876
|
+
value: any;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
declare type LoggedInUserDto = {
|
|
880
|
+
id: number;
|
|
881
|
+
email: string;
|
|
882
|
+
name: string;
|
|
883
|
+
imageRelativeUrl: string;
|
|
884
|
+
permissions: Record<string, string>;
|
|
885
|
+
};
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* This type represents the options to use for looking up actions.
|
|
889
|
+
*/
|
|
890
|
+
declare type LookupActionOptions = {
|
|
891
|
+
/**
|
|
892
|
+
* If we pass down an event handler to a component, we should sign the error once, only in some
|
|
893
|
+
* steps of the component chain. This property (by default, true) indicates this intention.
|
|
894
|
+
*/
|
|
895
|
+
signError?: boolean;
|
|
896
|
+
/**
|
|
897
|
+
* We can use the event's name to get info about a particular event's progress. Note: Multiple
|
|
898
|
+
* events can run simultaneously.
|
|
899
|
+
*/
|
|
900
|
+
eventName?: string;
|
|
901
|
+
/**
|
|
902
|
+
* By default, we cache resolved action functions. This property signs that we don't want to cache
|
|
903
|
+
* this function. Use true on one-off handlers, like the ones in Actions (e.g., `MutateAction`).
|
|
904
|
+
*/
|
|
905
|
+
ephemeral?: boolean;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* This function resolves an action by its name with the specified options and returns the action
|
|
910
|
+
* function if found. Otherwise, return undefined.
|
|
911
|
+
*/
|
|
912
|
+
declare type LookupAsyncFn = (action: string | undefined, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* This function resolves an action by its name (within the component node that runs the action)
|
|
916
|
+
* with the specified options and returns the action function if found. Otherwise, return undefined.
|
|
917
|
+
*/
|
|
918
|
+
declare type LookupAsyncFnInner = (action: string | undefined,
|
|
919
|
+
/**
|
|
920
|
+
* The unique identifier of the container that the action is executed in.
|
|
921
|
+
*/
|
|
922
|
+
uid: symbol, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
923
|
+
|
|
924
|
+
/**
|
|
925
|
+
* This function retrieves an async function for a particular component's specified event to be
|
|
926
|
+
* invoked as an event handler (`undefined` if the particular event handler is not defined).
|
|
927
|
+
*/
|
|
928
|
+
declare type LookupEventHandlerFn<T extends ComponentDef = ComponentDef> = (eventName: keyof NonNullable<T["events"]>, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* This function resolves a sync action by its name and returns the action function if it is found.
|
|
932
|
+
* Otherwise, it returns undefined.
|
|
933
|
+
*/
|
|
934
|
+
declare type LookupSyncFn = (action: string | undefined) => SyncFunction | undefined;
|
|
935
|
+
|
|
936
|
+
declare interface MemberAccessExpression extends ExpressionBase {
|
|
937
|
+
type: "MembE";
|
|
938
|
+
object: Expression;
|
|
939
|
+
member: string;
|
|
940
|
+
isOptional?: boolean;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
declare type Message = ValueOrFunction<Renderable, Toast>;
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* Represents a module error
|
|
947
|
+
*/
|
|
948
|
+
declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* A function that resolves a module name to the text of the module
|
|
952
|
+
*/
|
|
953
|
+
declare type ModuleResolver = (sourceModule: string, moduleName: string) => string | null;
|
|
954
|
+
|
|
955
|
+
declare interface NoArgExpression extends ExpressionBase {
|
|
956
|
+
type: "NoArgE";
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
declare type Node_2 = Statement | Expression | SwitchCase;
|
|
960
|
+
|
|
961
|
+
declare type NonCssLayoutProps = {
|
|
962
|
+
horizontalAlignment?: string;
|
|
963
|
+
verticalAlignment?: string;
|
|
964
|
+
orientation?: string;
|
|
965
|
+
};
|
|
966
|
+
|
|
967
|
+
declare interface ObjectDestructure extends DestructureBase {
|
|
968
|
+
type: "ODestr";
|
|
969
|
+
id: string;
|
|
970
|
+
alias?: string;
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
declare interface ObjectLiteral extends ExpressionBase {
|
|
974
|
+
type: "OLitE";
|
|
975
|
+
props: (SpreadExpression | [Expression, Expression])[];
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* This interface describes an AppEngine Splitter component.
|
|
980
|
+
*/
|
|
981
|
+
declare type Orientation = "horizontal" | "vertical";
|
|
982
|
+
|
|
983
|
+
declare type OrientationOptions = "horizontal" | "vertical";
|
|
984
|
+
|
|
985
|
+
export declare function parseXmlUiMarkup(source: string, moduleResolver?: ModuleResolver, useOldParser?: boolean): ComponentDef<string> | CompoundComponentDef;
|
|
986
|
+
|
|
987
|
+
declare interface PostfixOpExpression extends ExpressionBase {
|
|
988
|
+
type: "PostfE";
|
|
989
|
+
operator: PrefixOpSymbol;
|
|
990
|
+
operand: Expression;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
declare interface PrefixOpExpression extends ExpressionBase {
|
|
994
|
+
type: "PrefE";
|
|
995
|
+
operator: PrefixOpSymbol;
|
|
996
|
+
operand: Expression;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
declare type PrefixOpSymbol = "++" | "--";
|
|
1000
|
+
|
|
1001
|
+
declare type PropertyComponentDescriptorHash<T extends ComponentDef> = Partial<Record<keyof NonNullable<T["props"]> | keyof LayoutProps, ComponentPropertyDescriptor>>;
|
|
1002
|
+
|
|
1003
|
+
declare type PropertyValueType = "boolean" | "string" | "number" | "numberOrString" | "OrientationOptions" | "AlignmentOptions" | "UserSelectOptions" | "DirectionOptions" | "ScrollingOptions" | "CssFontFamily" | "CssFontWeight" | "CssSize" | "CssOpacity" | "CssBorder" | "CssRadius" | "CssColor" | "CssShadow" | "CssTextDecoration" | "ActionSet" | "CssColorType" | "ComponentDef" | "ComponentDef[]" | "ComponentDefMap" | "IconPosition" | "CssUnit" | "TextTransformOptions" | "TextWrapOptions" | "Option[] | string[]" | "FieldValidator[]" | "SearchBoxDef" | TypographyHintValueType | ButtonHintValueType | "any";
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* This type represents the properties of the error boundary
|
|
1007
|
+
*/
|
|
1008
|
+
declare interface Props {
|
|
1009
|
+
/**
|
|
1010
|
+
* Child nodes within the boundary
|
|
1011
|
+
*/
|
|
1012
|
+
children: ReactNode;
|
|
1013
|
+
/**
|
|
1014
|
+
* Whenever the value of this property changes, the boundary restores its "no error" state.
|
|
1015
|
+
*/
|
|
1016
|
+
node?: ComponentLike;
|
|
1017
|
+
location?: string;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
declare type Props_2 = {
|
|
1021
|
+
children: ReactNode;
|
|
1022
|
+
orientation?: string;
|
|
1023
|
+
uid?: string;
|
|
1024
|
+
horizontalAlignment?: string;
|
|
1025
|
+
verticalAlignment?: string;
|
|
1026
|
+
layout?: CSSProperties;
|
|
1027
|
+
reverse?: boolean;
|
|
1028
|
+
hoverContainer?: boolean;
|
|
1029
|
+
visibleOnHover?: boolean;
|
|
1030
|
+
onClick?: any;
|
|
1031
|
+
onMount?: any;
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
declare interface ReactiveVarDeclaration extends ExpressionBase {
|
|
1035
|
+
type: "RVarD";
|
|
1036
|
+
id: string;
|
|
1037
|
+
expression: Expression;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/**
|
|
1041
|
+
* This type represents a function that registers all API endpoints of a particular component.
|
|
1042
|
+
*/
|
|
1043
|
+
declare type RegisterComponentApiFn = (apiFn: Record<string, (...args: any[]) => void>) => void;
|
|
1044
|
+
|
|
1045
|
+
declare type RenderChildFn<L extends ComponentDef = ComponentDef> = (children?: ComponentDef | ComponentDef[] | DynamicChildComponentDef | DynamicChildComponentDef[] | string, layoutContext?: LayoutContext<L>, childrenToRender?: DynamicChildComponentDef[]) => ReactNode | ReactNode[];
|
|
1046
|
+
|
|
1047
|
+
/**
|
|
1048
|
+
* This interface defines the renderer context for the exposed components of the XMLUI framework.
|
|
1049
|
+
*/
|
|
1050
|
+
declare interface RendererContext<T extends ComponentDef> extends ComponentRendererContextBase<T> {
|
|
1051
|
+
/**
|
|
1052
|
+
* The unique identifier of the component instance
|
|
1053
|
+
*/
|
|
1054
|
+
uid: symbol;
|
|
1055
|
+
/**
|
|
1056
|
+
* A component invokes this function to change its internal state
|
|
1057
|
+
*/
|
|
1058
|
+
updateState: UpdateStateFn;
|
|
1059
|
+
/**
|
|
1060
|
+
* When a component wants to access a property value (which may contain a binding expression to
|
|
1061
|
+
* evaluate), it must use this property to get the current value.
|
|
1062
|
+
*/
|
|
1063
|
+
extractValue: ValueExtractor;
|
|
1064
|
+
/**
|
|
1065
|
+
* This function gets a physical resource URL according to the provided logical URL.
|
|
1066
|
+
*/
|
|
1067
|
+
extractResourceUrl: (url?: string) => string | undefined;
|
|
1068
|
+
/**
|
|
1069
|
+
* This function gets an async executable function that handles an event.
|
|
1070
|
+
*/
|
|
1071
|
+
lookupEventHandler: LookupEventHandlerFn<T>;
|
|
1072
|
+
/**
|
|
1073
|
+
* A component can register its APIs with this function
|
|
1074
|
+
*/
|
|
1075
|
+
registerComponentApi: RegisterComponentApiFn;
|
|
1076
|
+
/**
|
|
1077
|
+
* This function obtains an action by its name with the specified options
|
|
1078
|
+
*/
|
|
1079
|
+
lookupAction: LookupAsyncFn;
|
|
1080
|
+
/**
|
|
1081
|
+
* This function retrieves a sync function the component can use as a callback
|
|
1082
|
+
*/
|
|
1083
|
+
lookupSyncCallback: LookupSyncFn;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
declare interface ReturnStatement extends StatementBase {
|
|
1087
|
+
type: "RetS";
|
|
1088
|
+
expression?: Expression;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export declare function RootComponent({ apiInterceptor, contributes, node, decorateComponentsWithTestId, defaultTheme, defaultTone, resources, globalProps, standalone, baseName, previewMode, servedFromSingleFile, resourceMap, }: RootComponentProps): JSX_2.Element;
|
|
1092
|
+
|
|
1093
|
+
/**
|
|
1094
|
+
* The properties of the root component
|
|
1095
|
+
*/
|
|
1096
|
+
declare type RootComponentProps = {
|
|
1097
|
+
/**
|
|
1098
|
+
* View component definition
|
|
1099
|
+
*/
|
|
1100
|
+
node: ComponentLike;
|
|
1101
|
+
/**
|
|
1102
|
+
* Display the component in preview mode?
|
|
1103
|
+
*/
|
|
1104
|
+
previewMode?: boolean;
|
|
1105
|
+
servedFromSingleFile?: boolean;
|
|
1106
|
+
/**
|
|
1107
|
+
* The name used as the base name in the router definition
|
|
1108
|
+
*/
|
|
1109
|
+
baseName?: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* An object that describes how other external components extend the application with external components
|
|
1112
|
+
*/
|
|
1113
|
+
contributes: ContributesDefinition;
|
|
1114
|
+
/**
|
|
1115
|
+
* Arbitrary set of global properties
|
|
1116
|
+
*/
|
|
1117
|
+
globalProps?: GlobalProps;
|
|
1118
|
+
resources?: Record<string, string>;
|
|
1119
|
+
/**
|
|
1120
|
+
* Indicates that the root component represents a standalone application
|
|
1121
|
+
*/
|
|
1122
|
+
standalone?: boolean;
|
|
1123
|
+
decorateComponentsWithTestId?: boolean;
|
|
1124
|
+
apiInterceptor?: ApiInterceptorDefinition;
|
|
1125
|
+
defaultTheme?: string;
|
|
1126
|
+
defaultTone?: ThemeTone;
|
|
1127
|
+
resourceMap?: Record<string, string>;
|
|
1128
|
+
};
|
|
1129
|
+
|
|
1130
|
+
declare type SchemaDescriptor = {
|
|
1131
|
+
tables: Array<TableDescriptor>;
|
|
1132
|
+
relationships?: any;
|
|
1133
|
+
dtos?: any;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* This interface holds the properties representing a scriptable component definition.
|
|
1138
|
+
*/
|
|
1139
|
+
declare interface Scriptable {
|
|
1140
|
+
/**
|
|
1141
|
+
* This property holds the text defined in all <script> sections attached to a component.
|
|
1142
|
+
*/
|
|
1143
|
+
script?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* This property holds the parsed form of scripts stored in code-behind files.
|
|
1146
|
+
*/
|
|
1147
|
+
scriptCollected?: CollectedDeclarations;
|
|
1148
|
+
/**
|
|
1149
|
+
* This property holds errors coming from parsing the code-behind scripts.
|
|
1150
|
+
*/
|
|
1151
|
+
scriptError?: any;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
/**
|
|
1155
|
+
* Represents a parsed and resolved module
|
|
1156
|
+
*/
|
|
1157
|
+
declare type ScriptModule = {
|
|
1158
|
+
type: "ScriptModule";
|
|
1159
|
+
name: string;
|
|
1160
|
+
parent?: ScriptModule | null;
|
|
1161
|
+
exports: Map<string, any>;
|
|
1162
|
+
imports: Record<string, any>;
|
|
1163
|
+
importedModules: ScriptModule[];
|
|
1164
|
+
functions: Record<string, FunctionDeclaration>;
|
|
1165
|
+
statements: Statement[];
|
|
1166
|
+
executed: boolean;
|
|
1167
|
+
};
|
|
1168
|
+
|
|
1169
|
+
declare interface ScriptParserErrorMessage {
|
|
1170
|
+
code: ScriptParsingErrorCodes;
|
|
1171
|
+
text: string;
|
|
1172
|
+
position?: number;
|
|
1173
|
+
line?: number;
|
|
1174
|
+
column?: number;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030";
|
|
1178
|
+
|
|
1179
|
+
declare interface SequenceExpression extends ExpressionBase {
|
|
1180
|
+
type: "SeqE";
|
|
1181
|
+
expressions: Expression[];
|
|
1182
|
+
loose?: boolean;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
declare type SplitProps = {
|
|
1186
|
+
/**
|
|
1187
|
+
* The children to display in the splitter.
|
|
1188
|
+
*/
|
|
1189
|
+
children: React_2.ReactNode[] | React_2.ReactNode;
|
|
1190
|
+
/**
|
|
1191
|
+
* The layout of the splitter.
|
|
1192
|
+
*/
|
|
1193
|
+
layout?: React_2.CSSProperties;
|
|
1194
|
+
/**
|
|
1195
|
+
* The template to display in the splitter.
|
|
1196
|
+
*/
|
|
1197
|
+
splitterTemplate?: React_2.ReactNode;
|
|
1198
|
+
/**
|
|
1199
|
+
* The orientation of the splitter.
|
|
1200
|
+
* The default is "horizontal".
|
|
1201
|
+
*/
|
|
1202
|
+
orientation?: Orientation;
|
|
1203
|
+
/**
|
|
1204
|
+
* Whether the splitter is floating.
|
|
1205
|
+
*/
|
|
1206
|
+
floating?: boolean;
|
|
1207
|
+
/**
|
|
1208
|
+
* A callback that is called when the splitter is resized.
|
|
1209
|
+
*/
|
|
1210
|
+
resize?: (sizes: [number, number]) => void;
|
|
1211
|
+
/**
|
|
1212
|
+
* Whether the primary and secondary panes are swapped.
|
|
1213
|
+
*/
|
|
1214
|
+
swapped?: boolean;
|
|
1215
|
+
/**
|
|
1216
|
+
* The initial width/height of the left/top pane.
|
|
1217
|
+
* Width is specified as a CSS unit (e.g. %, fr, px).
|
|
1218
|
+
* The default is 50%.
|
|
1219
|
+
*/
|
|
1220
|
+
initialPrimarySize?: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* The preferred minimum width/height of the left/top pane.
|
|
1223
|
+
* Specified as a CSS unit (e.g. %, fr, px).
|
|
1224
|
+
* The default is 0.
|
|
1225
|
+
*/
|
|
1226
|
+
minPrimarySize?: string;
|
|
1227
|
+
/**
|
|
1228
|
+
* The preferred maximum width/height of the left/top pane.
|
|
1229
|
+
*/
|
|
1230
|
+
maxPrimarySize?: string;
|
|
1231
|
+
};
|
|
1232
|
+
|
|
1233
|
+
export declare const Splitter: ({ initialPrimarySize, minPrimarySize, maxPrimarySize, orientation, children, layout, swapped, floating, splitterTemplate, resize, }: SplitProps) => JSX_2.Element;
|
|
1234
|
+
|
|
1235
|
+
declare interface SpreadExpression extends ExpressionBase {
|
|
1236
|
+
type: "SpreadE";
|
|
1237
|
+
operand: Expression;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
export declare const Stack: React_2.ForwardRefExoticComponent<Props_2 & React_2.RefAttributes<any>>;
|
|
1241
|
+
|
|
1242
|
+
export declare function StandaloneApp({ appDef, decorateComponentsWithTestId, runtime, components: customComponents, }: StandaloneAppProps): JSX_2.Element;
|
|
1243
|
+
|
|
1244
|
+
export declare type StandaloneAppDescription = {
|
|
1245
|
+
name?: string;
|
|
1246
|
+
version?: string;
|
|
1247
|
+
entryPoint?: ComponentLike;
|
|
1248
|
+
components?: CompoundComponentDef[];
|
|
1249
|
+
themes?: ThemeDefinition[];
|
|
1250
|
+
defaultTheme?: string;
|
|
1251
|
+
defaultTone?: string;
|
|
1252
|
+
resources?: Record<string, string>;
|
|
1253
|
+
resourceMap?: Record<string, string>;
|
|
1254
|
+
globals?: Record<string, any>;
|
|
1255
|
+
apiInterceptor?: ApiInterceptorDefinition;
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
declare type StandaloneAppProps = {
|
|
1259
|
+
appDef?: StandaloneAppDescription;
|
|
1260
|
+
decorateComponentsWithTestId?: boolean;
|
|
1261
|
+
runtime?: any;
|
|
1262
|
+
components?: ComponentRendererDef[];
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
export declare type StandaloneJsonConfig = {
|
|
1266
|
+
name?: string;
|
|
1267
|
+
globals?: Record<string, any>;
|
|
1268
|
+
entryPoint?: string;
|
|
1269
|
+
components?: string[];
|
|
1270
|
+
themes?: string[];
|
|
1271
|
+
defaultTheme?: string;
|
|
1272
|
+
resources?: Record<string, string>;
|
|
1273
|
+
resourceMap?: Record<string, string>;
|
|
1274
|
+
apiInterceptor?: ApiInterceptorDefinition;
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1277
|
+
export declare function startApp(runtime: any, components?: ComponentRendererDef[]): ReactDOM_2.Root;
|
|
1278
|
+
|
|
1279
|
+
/**
|
|
1280
|
+
* This type represents the current state of the error boundary
|
|
1281
|
+
*/
|
|
1282
|
+
declare type State = {
|
|
1283
|
+
hasError: boolean;
|
|
1284
|
+
error: Error | null;
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
declare type Statement = BlockStatement | EmptyStatement | ExpressionStatement | ArrowExpressionStatement | LetStatement | ConstStatement | VarStatement | IfStatement | ReturnStatement | BreakStatement | ContinueStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ThrowStatement | TryStatement | SwitchStatement | FunctionDeclaration | ImportDeclaration;
|
|
1288
|
+
|
|
1289
|
+
declare interface StatementBase extends BaseNode {
|
|
1290
|
+
guard?: boolean;
|
|
1291
|
+
removeBlockScope?: boolean;
|
|
1292
|
+
completeTryBlock?: boolean;
|
|
1293
|
+
completeCatchBlock?: boolean;
|
|
1294
|
+
completeFinallyBlock?: boolean;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
declare interface SwitchCase extends BaseNode {
|
|
1298
|
+
type: "SwitchC";
|
|
1299
|
+
caseExpression?: Expression;
|
|
1300
|
+
statements?: Statement[];
|
|
1301
|
+
}
|
|
1302
|
+
|
|
1303
|
+
declare interface SwitchStatement extends StatementBase {
|
|
1304
|
+
type: "SwitchS";
|
|
1305
|
+
expression: Expression;
|
|
1306
|
+
cases: SwitchCase[];
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* XMLUI executes some code synchronously. This type defines those functions' signature
|
|
1311
|
+
*/
|
|
1312
|
+
declare type SyncFunction = (...args: any) => any;
|
|
1313
|
+
|
|
1314
|
+
declare type TableDescriptor = {
|
|
1315
|
+
name: string;
|
|
1316
|
+
fields?: Record<string, any>;
|
|
1317
|
+
pk: Array<string>;
|
|
1318
|
+
indexes?: Array<string>;
|
|
1319
|
+
};
|
|
1320
|
+
|
|
1321
|
+
/**
|
|
1322
|
+
* This type represents a theme definition object. Theme files can use this object's JSON-serialized
|
|
1323
|
+
* format to define an app theme; an app can have multiple theme files.
|
|
1324
|
+
*/
|
|
1325
|
+
export declare interface ThemeDefinition extends ThemeDefinitionDetails {
|
|
1326
|
+
/**
|
|
1327
|
+
* Theme id
|
|
1328
|
+
*/
|
|
1329
|
+
id: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* Optional theme name
|
|
1332
|
+
*/
|
|
1333
|
+
name?: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* A theme can extend existing themes. The extension means that the theme variable values defined
|
|
1336
|
+
* in the new theme override the base theme's variable values.
|
|
1337
|
+
*/
|
|
1338
|
+
extends?: string | Array<string>;
|
|
1339
|
+
/**
|
|
1340
|
+
* This property defines the tone-dependent theme variable values. When a theme variable value is
|
|
1341
|
+
* resolved, the common theme variable values are overridden with their theme-specific values.
|
|
1342
|
+
*/
|
|
1343
|
+
tones?: Record<string | ThemeTone, ThemeDefinitionDetails>;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
declare interface ThemeDefinitionDetails {
|
|
1347
|
+
themeVars?: Record<string, string>;
|
|
1348
|
+
resources?: Record<string, string | FontDef>;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
declare type ThemeIdDescriptor = {
|
|
1352
|
+
id: string;
|
|
1353
|
+
defaultValue?: DefaultValueDescriptor;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* When rendering any part of an XMLUI app, the styles to apply are enclosed in a theme scope.
|
|
1358
|
+
* Most apps use a single theme scope that includes all nodes within the root app node. However,
|
|
1359
|
+
* any app can use multiple theme scopes.
|
|
1360
|
+
*
|
|
1361
|
+
* The scope determines how the app applies styles to the particular section. This type defines
|
|
1362
|
+
* the properties of such a theme scope.
|
|
1363
|
+
*/
|
|
1364
|
+
declare type ThemeScope = {
|
|
1365
|
+
/**
|
|
1366
|
+
* Gets the id of the scope's theme
|
|
1367
|
+
*/
|
|
1368
|
+
activeThemeId: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Gets the current tone of the scope's theme
|
|
1371
|
+
*/
|
|
1372
|
+
activeThemeTone: ThemeTone;
|
|
1373
|
+
/**
|
|
1374
|
+
* The HTML element that works as the root of the theme's scope.
|
|
1375
|
+
*/
|
|
1376
|
+
root: HTMLElement | undefined;
|
|
1377
|
+
/**
|
|
1378
|
+
* The active theme in the current scope
|
|
1379
|
+
*/
|
|
1380
|
+
activeTheme: ThemeDefinition;
|
|
1381
|
+
/**
|
|
1382
|
+
* This hash object stores the CSS theme variable names with their CSS values definition,
|
|
1383
|
+
* like "--xmlui-align-vertical-Text-sub": "sub";
|
|
1384
|
+
* "--xmlui-color-bg": "var(--xmlui-color-surface-50)"
|
|
1385
|
+
*/
|
|
1386
|
+
themeStyles: Record<string, string>;
|
|
1387
|
+
/**
|
|
1388
|
+
* This hash object stores the theme variable names with their CSS values definition, like
|
|
1389
|
+
* "align-vertical-Text-sub": "sub"; "color-bg": "var(--xmlui-color-surface-50)".
|
|
1390
|
+
*/
|
|
1391
|
+
themeVars: Record<string, string>;
|
|
1392
|
+
/**
|
|
1393
|
+
* This function retrieves the physical path of the provided resource. The path can be used
|
|
1394
|
+
* as a URL in HTML tags, like in the `src` attribute of `<img>`.
|
|
1395
|
+
* @param resourceString The recource name to resolve to an URL
|
|
1396
|
+
*/
|
|
1397
|
+
getResourceUrl: (resourceString?: string) => string | undefined;
|
|
1398
|
+
/**
|
|
1399
|
+
* This function gets the value of the specified theme variable.
|
|
1400
|
+
* @param themeVar Theme variable name to resolve
|
|
1401
|
+
*/
|
|
1402
|
+
getThemeVar: (themeVar: string) => string | undefined;
|
|
1403
|
+
};
|
|
1404
|
+
|
|
1405
|
+
/**
|
|
1406
|
+
* This type describes one the available theme tones.
|
|
1407
|
+
*/
|
|
1408
|
+
declare type ThemeTone = (typeof ThemeToneKeys)[number];
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Each theme can have a light or a dark tone.
|
|
1412
|
+
*/
|
|
1413
|
+
declare const ThemeToneKeys: readonly ["light", "dark"];
|
|
1414
|
+
|
|
1415
|
+
declare interface ThrowStatement extends StatementBase {
|
|
1416
|
+
type: "ThrowS";
|
|
1417
|
+
expression: Expression;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
declare type ToastHandler = (message: Message, options?: ToastOptions) => string;
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* Converts the specified themeID to a CSS var string
|
|
1424
|
+
* @param c segment to convert
|
|
1425
|
+
*/
|
|
1426
|
+
export declare function toCssVar(c: string | ThemeIdDescriptor): string;
|
|
1427
|
+
|
|
1428
|
+
declare type Token = {
|
|
1429
|
+
readonly text: string;
|
|
1430
|
+
readonly type: TokenType;
|
|
1431
|
+
readonly location: TokenLocation;
|
|
1432
|
+
};
|
|
1433
|
+
|
|
1434
|
+
declare interface TokenLocation {
|
|
1435
|
+
readonly startPosition: number;
|
|
1436
|
+
readonly endPosition: number;
|
|
1437
|
+
readonly startLine: number;
|
|
1438
|
+
readonly endLine: number;
|
|
1439
|
+
readonly startColumn: number;
|
|
1440
|
+
readonly endColumn: number;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
declare const enum TokenType {
|
|
1444
|
+
Eof = -1,
|
|
1445
|
+
Ws = -2,
|
|
1446
|
+
BlockComment = -3,
|
|
1447
|
+
EolComment = -4,
|
|
1448
|
+
Unknown = 0,
|
|
1449
|
+
LParent = 1,
|
|
1450
|
+
RParent = 2,
|
|
1451
|
+
Identifier = 3,
|
|
1452
|
+
Exponent = 4,
|
|
1453
|
+
Divide = 5,
|
|
1454
|
+
Multiply = 6,
|
|
1455
|
+
Remainder = 7,
|
|
1456
|
+
Plus = 8,
|
|
1457
|
+
Minus = 9,
|
|
1458
|
+
BitwiseXor = 10,
|
|
1459
|
+
BitwiseOr = 11,
|
|
1460
|
+
LogicalOr = 12,
|
|
1461
|
+
BitwiseAnd = 13,
|
|
1462
|
+
LogicalAnd = 14,
|
|
1463
|
+
IncOp = 15,
|
|
1464
|
+
DecOp = 16,
|
|
1465
|
+
Assignment = 17,
|
|
1466
|
+
AddAssignment = 18,
|
|
1467
|
+
SubtractAssignment = 19,
|
|
1468
|
+
ExponentAssignment = 20,
|
|
1469
|
+
MultiplyAssignment = 21,
|
|
1470
|
+
DivideAssignment = 22,
|
|
1471
|
+
RemainderAssignment = 23,
|
|
1472
|
+
ShiftLeftAssignment = 24,
|
|
1473
|
+
ShiftRightAssignment = 25,
|
|
1474
|
+
SignedShiftRightAssignment = 26,
|
|
1475
|
+
BitwiseAndAssignment = 27,
|
|
1476
|
+
BitwiseXorAssignment = 28,
|
|
1477
|
+
BitwiseOrAssignment = 29,
|
|
1478
|
+
LogicalAndAssignment = 30,
|
|
1479
|
+
LogicalOrAssignment = 31,
|
|
1480
|
+
NullCoalesceAssignment = 32,
|
|
1481
|
+
Semicolon = 33,
|
|
1482
|
+
Comma = 34,
|
|
1483
|
+
Colon = 35,
|
|
1484
|
+
LSquare = 36,
|
|
1485
|
+
RSquare = 37,
|
|
1486
|
+
QuestionMark = 38,
|
|
1487
|
+
NullCoalesce = 39,
|
|
1488
|
+
OptionalChaining = 40,
|
|
1489
|
+
BinaryNot = 41,
|
|
1490
|
+
LBrace = 42,
|
|
1491
|
+
RBrace = 43,
|
|
1492
|
+
Equal = 44,
|
|
1493
|
+
StrictEqual = 45,
|
|
1494
|
+
LogicalNot = 46,
|
|
1495
|
+
NotEqual = 47,
|
|
1496
|
+
StrictNotEqual = 48,
|
|
1497
|
+
LessThan = 49,
|
|
1498
|
+
LessThanOrEqual = 50,
|
|
1499
|
+
ShiftLeft = 51,
|
|
1500
|
+
GreaterThan = 52,
|
|
1501
|
+
GreaterThanOrEqual = 53,
|
|
1502
|
+
ShiftRight = 54,
|
|
1503
|
+
SignedShiftRight = 55,
|
|
1504
|
+
Dot = 56,
|
|
1505
|
+
Spread = 57,
|
|
1506
|
+
Global = 58,
|
|
1507
|
+
Arrow = 59,
|
|
1508
|
+
DecimalLiteral = 60,
|
|
1509
|
+
HexadecimalLiteral = 61,
|
|
1510
|
+
BinaryLiteral = 62,
|
|
1511
|
+
RealLiteral = 63,
|
|
1512
|
+
StringLiteral = 64,
|
|
1513
|
+
Infinity = 65,
|
|
1514
|
+
NaN = 66,
|
|
1515
|
+
True = 67,
|
|
1516
|
+
False = 68,
|
|
1517
|
+
Typeof = 69,
|
|
1518
|
+
Null = 70,
|
|
1519
|
+
Undefined = 71,
|
|
1520
|
+
In = 72,
|
|
1521
|
+
Let = 73,
|
|
1522
|
+
Const = 74,
|
|
1523
|
+
Var = 75,
|
|
1524
|
+
If = 76,
|
|
1525
|
+
Else = 77,
|
|
1526
|
+
Return = 78,
|
|
1527
|
+
Break = 79,
|
|
1528
|
+
Continue = 80,
|
|
1529
|
+
Do = 81,
|
|
1530
|
+
While = 82,
|
|
1531
|
+
For = 83,
|
|
1532
|
+
Of = 84,
|
|
1533
|
+
Try = 85,
|
|
1534
|
+
Catch = 86,
|
|
1535
|
+
Finally = 87,
|
|
1536
|
+
Throw = 88,
|
|
1537
|
+
Switch = 89,
|
|
1538
|
+
Case = 90,
|
|
1539
|
+
Default = 91,
|
|
1540
|
+
Delete = 92,
|
|
1541
|
+
Function = 93,
|
|
1542
|
+
Export = 94,
|
|
1543
|
+
Import = 95,
|
|
1544
|
+
As = 96,
|
|
1545
|
+
From = 97
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
export declare interface TreeNode {
|
|
1549
|
+
uid: string;
|
|
1550
|
+
key: string;
|
|
1551
|
+
path: any[];
|
|
1552
|
+
subPath?: string;
|
|
1553
|
+
displayName?: string;
|
|
1554
|
+
children?: TreeNode[];
|
|
1555
|
+
parentIds: string[];
|
|
1556
|
+
selectable: boolean;
|
|
1557
|
+
groupKey?: string;
|
|
1558
|
+
[x: string]: any;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
declare interface TryStatement extends StatementBase {
|
|
1562
|
+
type: "TryS";
|
|
1563
|
+
tryBlock: BlockStatement;
|
|
1564
|
+
catchBlock?: BlockStatement;
|
|
1565
|
+
catchVariable?: string;
|
|
1566
|
+
finallyBlock?: BlockStatement;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
declare type TypographyHintValueType = "HeadingLevel" | "TextVariant";
|
|
1570
|
+
|
|
1571
|
+
declare interface UnaryExpression extends ExpressionBase {
|
|
1572
|
+
type: "UnaryE";
|
|
1573
|
+
operator: UnaryOpSymbols;
|
|
1574
|
+
operand: Expression;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* This function updates the state of a component.
|
|
1581
|
+
* @param componentState The new state of the component
|
|
1582
|
+
*/
|
|
1583
|
+
declare type UpdateStateFn = (componentState: any) => void;
|
|
1584
|
+
|
|
1585
|
+
export declare function useColors(...colorNames: (string | ColorDef)[]): Record<string, string>;
|
|
1586
|
+
|
|
1587
|
+
export declare function useTheme(): ThemeScope;
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* This type represent the function that extracts the value from a component property
|
|
1591
|
+
*/
|
|
1592
|
+
declare type ValueExtractor = {
|
|
1593
|
+
/**
|
|
1594
|
+
* Get a value (any) from a component property
|
|
1595
|
+
* @param expression Value expression
|
|
1596
|
+
* @param strict Strict matching?
|
|
1597
|
+
*/
|
|
1598
|
+
(expression?: any, strict?: boolean): any;
|
|
1599
|
+
/**
|
|
1600
|
+
* Get a string value from an expression
|
|
1601
|
+
* @param expression Value expression
|
|
1602
|
+
*/
|
|
1603
|
+
asString(expression?: any): string;
|
|
1604
|
+
/**
|
|
1605
|
+
* Get an optional string value from an expression
|
|
1606
|
+
* @param expression Value expression
|
|
1607
|
+
*/
|
|
1608
|
+
asOptionalString(expression?: any): string | undefined;
|
|
1609
|
+
/**
|
|
1610
|
+
* Get an optional string value from an expression
|
|
1611
|
+
* @param expression Value expression
|
|
1612
|
+
*/
|
|
1613
|
+
asOptionalStringArray(expression?: any): string[];
|
|
1614
|
+
/**
|
|
1615
|
+
* Get a display string value from an expression
|
|
1616
|
+
* @param expression Value expression
|
|
1617
|
+
*/
|
|
1618
|
+
asDisplayText(expression?: any): string;
|
|
1619
|
+
/**
|
|
1620
|
+
* Get a number value from an expression
|
|
1621
|
+
* @param expression Value expression
|
|
1622
|
+
*/
|
|
1623
|
+
asNumber(expression?: any): number;
|
|
1624
|
+
/**
|
|
1625
|
+
* Get an optional number value from an expression
|
|
1626
|
+
* @param expression Value expression
|
|
1627
|
+
* @param defValue Default value, if the parameter value is undefined
|
|
1628
|
+
*/
|
|
1629
|
+
asOptionalNumber(expression?: any, defValue?: number): number;
|
|
1630
|
+
/**
|
|
1631
|
+
* Get a boolean value (JavaScript semantics) from an expression
|
|
1632
|
+
* @param expression Value expression
|
|
1633
|
+
*/
|
|
1634
|
+
asBoolean(expression?: any): boolean;
|
|
1635
|
+
/**
|
|
1636
|
+
* Get an optional Boolean value from an expression
|
|
1637
|
+
* @param expression Value expression
|
|
1638
|
+
* @param defValue Default value, if the parameter value is undefined
|
|
1639
|
+
*/
|
|
1640
|
+
asOptionalBoolean(expression?: any, defValue?: boolean): boolean;
|
|
1641
|
+
/**
|
|
1642
|
+
* Get a CSS size value from an expression
|
|
1643
|
+
* @param expression Value expression
|
|
1644
|
+
*/
|
|
1645
|
+
asSize(expression?: any): string;
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
declare interface VarDeclaration extends ExpressionBase {
|
|
1649
|
+
type: "VarD";
|
|
1650
|
+
id?: string;
|
|
1651
|
+
arrayDestruct?: ArrayDestructure[];
|
|
1652
|
+
objectDestruct?: ObjectDestructure[];
|
|
1653
|
+
expression?: Expression;
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
declare interface VarStatement extends StatementBase {
|
|
1657
|
+
type: "VarS";
|
|
1658
|
+
declarations: ReactiveVarDeclaration[];
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
declare interface WhileStatement extends StatementBase {
|
|
1662
|
+
type: "WhileS";
|
|
1663
|
+
condition: Expression;
|
|
1664
|
+
body: Statement;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
export { }
|