xmlui 0.7.13 → 0.7.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{apiInterceptorWorker-BuZoKCP8.mjs → apiInterceptorWorker-yKpXImCG.mjs} +1 -1
- package/dist/{index-C8kHu1Bs.mjs → index-XNGGyvQ0.mjs} +9904 -9653
- package/dist/index.css +1 -1
- package/dist/scripts/bin/build.js +17 -7
- package/dist/scripts/bin/vite-ueml-plugin.js +17 -7
- package/dist/scripts/bin/viteConfig.js +17 -7
- package/dist/scripts/package.json +209 -0
- package/dist/scripts/src/abstractions/scripting/ScriptingSourceTreeExp.js +51 -0
- package/dist/scripts/src/components/APICall/APICall.js +74 -0
- package/dist/scripts/src/components/APICall/APICallNative.js +31 -0
- package/dist/scripts/src/components/Accordion/Accordion.js +78 -0
- package/dist/scripts/src/components/Accordion/AccordionContext.js +20 -0
- package/dist/scripts/src/components/Accordion/AccordionItem.js +28 -0
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +79 -0
- package/dist/scripts/src/components/Accordion/AccordionNative.js +122 -0
- package/dist/scripts/src/components/Alert/Alert.js +42 -0
- package/dist/scripts/src/components/Alert/AlertNative.js +8 -0
- package/dist/scripts/src/components/Animation/Animation.js +59 -0
- package/dist/scripts/src/components/Animation/AnimationNative.js +75 -0
- package/dist/scripts/src/components/App/App.js +76 -0
- package/dist/scripts/src/components/App/AppLayoutContext.js +49 -0
- package/dist/scripts/src/components/App/AppNative.js +204 -0
- package/dist/scripts/src/components/App/AppStateContext.js +9 -0
- package/dist/scripts/src/components/App/Sheet.js +99 -0
- package/dist/scripts/src/components/AppHeader/AppHeader.js +59 -0
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +58 -0
- package/dist/scripts/src/components/AppState/AppState.js +26 -0
- package/dist/scripts/src/components/AppState/AppStateNative.js +24 -0
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +83 -0
- package/dist/scripts/src/components/AutoComplete/AutoCompleteContext.js +16 -0
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +225 -0
- package/dist/scripts/src/components/Avatar/Avatar.js +47 -0
- package/dist/scripts/src/components/Avatar/AvatarNative.js +40 -0
- package/dist/scripts/src/components/Backdrop/Backdrop.js +31 -0
- package/dist/scripts/src/components/Backdrop/BackdropNative.js +14 -0
- package/dist/scripts/src/components/Badge/Badge.js +58 -0
- package/dist/scripts/src/components/Badge/BadgeNative.js +22 -0
- package/dist/scripts/src/components/BarChart/BarChart.js +49 -0
- package/dist/scripts/src/components/BarChart/BarChartNative.js +176 -0
- package/dist/scripts/src/components/Bookmark/Bookmark.js +23 -0
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +24 -0
- package/dist/scripts/src/components/Breakout/Breakout.js +16 -0
- package/dist/scripts/src/components/Breakout/BreakoutNative.js +12 -0
- package/dist/scripts/src/components/Button/Button.js +142 -0
- package/dist/scripts/src/components/Button/ButtonNative.js +88 -0
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +41 -0
- package/dist/scripts/src/components/ButtonGroup/ButtonGroupNative.js +8 -0
- package/dist/scripts/src/components/Card/Card.js +57 -0
- package/dist/scripts/src/components/Card/CardNative.js +26 -0
- package/dist/scripts/src/components/Carousel/Carousel.js +68 -0
- package/dist/scripts/src/components/Carousel/CarouselItem.js +16 -0
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +13 -0
- package/dist/scripts/src/components/Carousel/CarouselNative.js +163 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +24 -0
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +26 -0
- package/dist/scripts/src/components/Chart/Chart.js +24 -0
- package/dist/scripts/src/components/Chart/ChartNative.js +165 -0
- package/dist/scripts/src/components/Checkbox/Checkbox.js +68 -0
- package/dist/scripts/src/components/Column/Column.js +34 -0
- package/dist/scripts/src/components/Column/ColumnNative.js +38 -0
- package/dist/scripts/src/components/Column/TableContext.js +12 -0
- package/dist/scripts/src/components/ComponentProvider.js +503 -0
- package/dist/scripts/src/components/ComponentRegistryContext.js +44 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +38 -0
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +16 -0
- package/dist/scripts/src/components/DatePicker/DatePicker.js +62 -0
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +196 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +125 -0
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +95 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +26 -0
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +52 -0
- package/dist/scripts/src/components/FileInput/FileInput.js +64 -0
- package/dist/scripts/src/components/FileInput/FileInputNative.js +128 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +46 -0
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +112 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +53 -0
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +108 -0
- package/dist/scripts/src/components/Footer/Footer.js +35 -0
- package/dist/scripts/src/components/Footer/FooterNative.js +20 -0
- package/dist/scripts/src/components/Form/Form.js +89 -0
- package/dist/scripts/src/components/Form/FormContext.js +9 -0
- package/dist/scripts/src/components/Form/FormNative.js +317 -0
- package/dist/scripts/src/components/Form/formActions.js +114 -0
- package/dist/scripts/src/components/FormItem/FormItem.js +125 -0
- package/dist/scripts/src/components/FormItem/FormItemNative.js +157 -0
- package/dist/scripts/src/components/FormItem/HelperText.js +27 -0
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +40 -0
- package/dist/scripts/src/components/FormItem/Validations.js +351 -0
- package/dist/scripts/src/components/FormSection/FormSection.js +41 -0
- package/dist/scripts/src/components/Heading/Heading.js +258 -0
- package/dist/scripts/src/components/Heading/HeadingNative.js +45 -0
- package/dist/scripts/src/components/HoverCard/HoverCard.js +19 -0
- package/dist/scripts/src/components/HoverCard/HovercardNative.js +44 -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/ChevronLeft.js +7 -0
- package/dist/scripts/src/components/Icon/ChevronRight.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 +32 -0
- package/dist/scripts/src/components/Icon/IconNative.js +102 -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/NoSortIcon.js +8 -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/SortAscendingIcon.js +8 -0
- package/dist/scripts/src/components/Icon/SortDescendingIcon.js +8 -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/TrendingDownIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrendingLevelIcon.js +10 -0
- package/dist/scripts/src/components/Icon/TrendingUpIcon.js +10 -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/IconInfoCard/IconInfoCard.js +39 -0
- package/dist/scripts/src/components/IconProvider.js +264 -0
- package/dist/scripts/src/components/IconRegistryContext.js +317 -0
- package/dist/scripts/src/components/Image/Image.js +35 -0
- package/dist/scripts/src/components/Image/ImageNative.js +15 -0
- package/dist/scripts/src/components/Input/InputAdornment.js +14 -0
- package/dist/scripts/src/components/Items/Items.js +33 -0
- package/dist/scripts/src/components/Items/ItemsNative.js +29 -0
- package/dist/scripts/src/components/Link/Link.js +64 -0
- package/dist/scripts/src/components/Link/LinkNative.js +26 -0
- package/dist/scripts/src/components/List/List.js +81 -0
- package/dist/scripts/src/components/List/ListNative.js +425 -0
- package/dist/scripts/src/components/Logo/Logo.js +16 -0
- package/dist/scripts/src/components/Logo/LogoNative.js +15 -0
- package/dist/scripts/src/components/Map/Map.js +75 -0
- package/dist/scripts/src/components/Map/world_countries.json +45307 -0
- package/dist/scripts/src/components/Markdown/Markdown.js +45 -0
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +107 -0
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +116 -0
- package/dist/scripts/src/components/ModalDialog/Dialog.js +20 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +64 -0
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +167 -0
- package/dist/scripts/src/components/ModalDialog/ModalVisibilityContext.js +60 -0
- package/dist/scripts/src/components/NavGroup/NavGroup.js +34 -0
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +91 -0
- package/dist/scripts/src/components/NavLink/NavLink.js +71 -0
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +61 -0
- package/dist/scripts/src/components/NavPanel/NavPanel.js +31 -0
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +74 -0
- package/dist/scripts/src/components/NoResult/NoResult.js +38 -0
- package/dist/scripts/src/components/NoResult/NoResultNative.js +13 -0
- package/dist/scripts/src/components/NumberBox/NumberBox.js +61 -0
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +337 -0
- package/dist/scripts/src/components/NumberBox/numberbox-abstractions.js +74 -0
- package/dist/scripts/src/components/OffCanvas/OffCanvas.js +57 -0
- package/dist/scripts/src/components/OffCanvas/OffCanvasNative.js +48 -0
- package/dist/scripts/src/components/Option/Option.js +33 -0
- package/dist/scripts/src/components/Option/OptionTypeProvider.js +16 -0
- package/dist/scripts/src/components/PageHeader/PageHeader.js +36 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +9 -0
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +18 -0
- package/dist/scripts/src/components/Pages/Pages.js +33 -0
- package/dist/scripts/src/components/Pages/PagesNative.js +69 -0
- package/dist/scripts/src/components/PieChart/PieChart.js +45 -0
- package/dist/scripts/src/components/PieChart/PieChartNative.js +165 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +24 -0
- package/dist/scripts/src/components/PositionedContainer/PositionedContainerNative.js +14 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +36 -0
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +12 -0
- package/dist/scripts/src/components/Queue/Queue.js +71 -0
- package/dist/scripts/src/components/Queue/QueueNative.js +278 -0
- package/dist/scripts/src/components/Queue/queueActions.js +87 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +68 -0
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +104 -0
- package/dist/scripts/src/components/Range/Range.js +56 -0
- package/dist/scripts/src/components/Range/RangeNative.js +8 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +21 -0
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +131 -0
- package/dist/scripts/src/components/Redirect/Redirect.js +20 -0
- package/dist/scripts/src/components/Select/OptionContext.js +12 -0
- package/dist/scripts/src/components/Select/Select.js +98 -0
- package/dist/scripts/src/components/Select/SelectContext.js +9 -0
- package/dist/scripts/src/components/Select/SelectNative.js +214 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +22 -0
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +94 -0
- package/dist/scripts/src/components/Slider/Slider.js +54 -0
- package/dist/scripts/src/components/Slider/SliderNative.js +8 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +19 -0
- package/dist/scripts/src/components/SpaceFiller/SpaceFillerNative.js +10 -0
- package/dist/scripts/src/components/Spinner/Spinner.js +42 -0
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +31 -0
- package/dist/scripts/src/components/Splitter/Splitter.js +89 -0
- package/dist/scripts/src/components/Splitter/SplitterNative.js +159 -0
- package/dist/scripts/src/components/Splitter/utils.js +17 -0
- package/dist/scripts/src/components/Stack/Stack.js +110 -0
- package/dist/scripts/src/components/Stack/StackNative.js +39 -0
- package/dist/scripts/src/components/StateViewer/StateViewerNative.js +19 -0
- package/dist/scripts/src/components/StickyBox/StickyBox.js +30 -0
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +15 -0
- package/dist/scripts/src/components/Switch/Switch.js +72 -0
- package/dist/scripts/src/components/Table/Table.js +184 -0
- package/dist/scripts/src/components/Table/TableNative.js +470 -0
- package/dist/scripts/src/components/Table/useRowSelection.js +245 -0
- package/dist/scripts/src/components/TableHeader/TableHeader.js +34 -0
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +74 -0
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +55 -0
- package/dist/scripts/src/components/Tabs/TabContext.js +45 -0
- package/dist/scripts/src/components/Tabs/TabItem.js +20 -0
- package/dist/scripts/src/components/Tabs/TabItemNative.js +24 -0
- package/dist/scripts/src/components/Tabs/Tabs.js +55 -0
- package/dist/scripts/src/components/Tabs/TabsNative.js +72 -0
- package/dist/scripts/src/components/Text/Text.js +122 -0
- package/dist/scripts/src/components/Text/TextNative.js +124 -0
- package/dist/scripts/src/components/TextArea/TextArea.js +65 -0
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +176 -0
- package/dist/scripts/src/components/TextArea/TextAreaResizable.js +73 -0
- package/dist/scripts/src/components/TextArea/useComposedRef.js +60 -0
- package/dist/scripts/src/components/TextBox/TextBox.js +85 -0
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +109 -0
- package/dist/scripts/src/components/Theme/NotificationToast.js +50 -0
- package/dist/scripts/src/components/Theme/Theme.js +43 -0
- package/dist/scripts/src/components/Theme/ThemeNative.js +126 -0
- package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +115 -0
- package/dist/scripts/src/components/ThemeChanger/ToneChangerButton.js +28 -0
- package/dist/scripts/src/components/Toggle/Toggle.js +99 -0
- package/dist/scripts/src/components/Toolbar/Toolbar.js +32 -0
- package/dist/scripts/src/components/ToolbarButton/ToolbarButton.js +38 -0
- package/dist/scripts/src/components/Tree/TreeComponent.js +32 -0
- package/dist/scripts/src/components/Tree/TreeNative.js +69 -0
- package/dist/scripts/src/components/TrendLabel/TrendLabel.js +37 -0
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +59 -0
- package/dist/scripts/src/components/abstractions.js +151 -0
- package/dist/scripts/src/components/chart-color-schemes.js +43 -0
- package/dist/scripts/src/components/component-utils.js +17 -0
- package/dist/scripts/src/components/container-helpers.js +25 -0
- package/dist/scripts/src/components/metadata-helpers.js +245 -0
- package/dist/scripts/src/components/slot-helpers.js +22 -0
- package/dist/scripts/src/components-core/ApiBoundComponent.js +194 -0
- package/dist/scripts/src/components-core/AppContext.js +16 -0
- package/dist/scripts/src/components-core/AppRoot.js +424 -0
- package/dist/scripts/src/components-core/ComponentBed.js +325 -0
- package/dist/scripts/src/components-core/ComponentDecorator.js +90 -0
- package/dist/scripts/src/components-core/CompoundComponent.js +144 -0
- package/dist/scripts/src/components-core/DebugViewProvider.js +43 -0
- package/dist/scripts/src/components-core/EngineError.js +91 -0
- package/dist/scripts/src/components-core/ErrorBoundary.js +59 -0
- package/dist/scripts/src/components-core/Fragment.js +15 -0
- package/dist/scripts/src/components-core/InspectorContext.js +176 -0
- package/dist/scripts/src/components-core/InvalidComponent.js +17 -0
- package/dist/scripts/src/components-core/LoaderComponent.js +92 -0
- package/dist/scripts/src/components-core/RestApiProxy.js +354 -0
- package/dist/scripts/src/components-core/ScrollContext.js +11 -0
- package/dist/scripts/src/components-core/Slot.js +17 -0
- package/dist/scripts/src/components-core/StandaloneApp.js +589 -0
- package/dist/scripts/src/components-core/StandaloneComponentManager.js +51 -0
- package/dist/scripts/src/components-core/TableOfContentsContext.js +110 -0
- package/dist/scripts/src/components-core/UnknownComponent.js +15 -0
- package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +110 -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/standalone.js +2 -0
- package/dist/scripts/src/components-core/abstractions/treeAbstractions.js +2 -0
- package/dist/scripts/src/components-core/action/APICall.js +283 -0
- package/dist/scripts/src/components-core/action/FileDownloadAction.js +80 -0
- package/dist/scripts/src/components-core/action/FileUploadAction.js +88 -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/actions.js +15 -0
- package/dist/scripts/src/components-core/appContext/date-functions.js +19 -0
- package/dist/scripts/src/components-core/appContext/math-function.js +27 -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 +1241 -0
- package/dist/scripts/src/components-core/container/buildProxy.js +54 -0
- package/dist/scripts/src/components-core/container/collectFnVarDeps.js +49 -0
- package/dist/scripts/src/components-core/container/valueExtractor.js +205 -0
- package/dist/scripts/src/components-core/descriptorHelper.js +72 -0
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +198 -0
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +94 -0
- package/dist/scripts/src/components-core/interception/Backend.js +129 -0
- package/dist/scripts/src/components-core/interception/Errors.js +129 -0
- package/dist/scripts/src/components-core/interception/InMemoryDb.js +41 -0
- package/dist/scripts/src/components-core/interception/IndexedDb.js +205 -0
- package/dist/scripts/src/components-core/interception/ReadonlyCollection.js +145 -0
- package/dist/scripts/src/components-core/interception/abstractions.js +2 -0
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +46 -0
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +9 -0
- package/dist/scripts/src/components-core/loader/ApiLoader.js +54 -0
- package/dist/scripts/src/components-core/loader/DataLoader.js +149 -0
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +62 -0
- package/dist/scripts/src/components-core/loader/Loader.js +126 -0
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +40 -0
- package/dist/scripts/src/components-core/loader/PageableLoader.js +262 -0
- package/dist/scripts/src/components-core/markup-check.js +279 -0
- package/dist/scripts/src/components-core/renderers.js +45 -0
- package/dist/scripts/src/components-core/reportEngineError.js +62 -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/ParameterParser.js +117 -0
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +149 -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 +593 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +497 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +482 -0
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +766 -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 +752 -0
- package/dist/scripts/src/components-core/script-runner/statement-queue.js +62 -0
- package/dist/scripts/src/components-core/script-runner/syncProxy.js +31 -0
- package/dist/scripts/src/components-core/script-runner/visitors.js +361 -0
- package/dist/scripts/src/components-core/theming/ThemeContext.js +53 -0
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +335 -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 +55 -0
- package/dist/scripts/src/components-core/theming/themes/root.js +287 -0
- package/dist/scripts/src/components-core/theming/themes/solid.js +16 -0
- package/dist/scripts/src/components-core/theming/themes/theme-colors.js +561 -0
- package/dist/scripts/src/components-core/theming/themes/xmlui.js +58 -0
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +300 -0
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +35 -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/compound-utils.js +11 -0
- package/dist/scripts/src/components-core/utils/css-utils.js +163 -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 +249 -0
- package/dist/scripts/src/components-core/utils/mergeProps.js +45 -0
- package/dist/scripts/src/components-core/utils/misc.js +472 -0
- package/dist/scripts/src/components-core/utils/request-params.js +70 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +221 -0
- package/dist/scripts/src/components-core/utils/treeUtils.js +48 -0
- package/dist/scripts/src/index.js +69 -0
- package/dist/scripts/src/parsers/common/GenericToken.js +2 -0
- package/dist/scripts/src/parsers/scripting-exp/TokenType.js +112 -0
- package/dist/scripts/src/parsers/style-parser/StyleInputStream.js +39 -0
- package/dist/scripts/src/parsers/style-parser/StyleLexer.js +623 -0
- package/dist/scripts/src/parsers/style-parser/StyleParser.js +1036 -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 +558 -0
- package/dist/scripts/src/parsers/style-parser/tokens.js +43 -0
- package/dist/scripts/src/parsers/xmlui-parser/ParserError.js +7 -0
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +80 -32
- package/dist/scripts/src/syntax/grammar.tmLanguage.json +328 -0
- package/dist/scripts/src/syntax/textMate/xmlui.json +630 -0
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +2676 -2608
- package/dist/xmlui-metadata.umd.js +16 -16
- package/dist/xmlui-standalone.umd.js +186 -186
- package/dist/xmlui.d.ts +1868 -13
- package/dist/xmlui.mjs +1 -1
- package/package.json +5 -5
- package/dist/xmlui.umd.js +0 -293
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.carouselComponentRenderer = exports.CarouselMd = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
9
|
+
const renderers_1 = require("@components-core/renderers");
|
|
10
|
+
const CarouselNative_1 = require("./CarouselNative");
|
|
11
|
+
const themeVars_1 = require("@components-core/theming/themeVars");
|
|
12
|
+
const Carousel_module_scss_1 = __importDefault(require("@components/Carousel/Carousel.module.scss"));
|
|
13
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
14
|
+
const COMP = "Carousel";
|
|
15
|
+
exports.CarouselMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
|
+
status: "in progress",
|
|
17
|
+
description: `This component displays a slideshow by cycling through elements (images, text, or ` +
|
|
18
|
+
`custom slides) like a carousel.`,
|
|
19
|
+
props: {
|
|
20
|
+
orientation: (0, ComponentDefs_1.d)("This property indicates the orientation of the carousel. The `horizontal` value indicates that the carousel moves horizontally, and the `vertical` value indicates that the carousel moves vertically.", ["horizontal", "vertical"], null, "horizontal"),
|
|
21
|
+
indicators: (0, ComponentDefs_1.d)("This property indicates whether the carousel displays the indicators.", null, null, "true"),
|
|
22
|
+
controls: (0, ComponentDefs_1.d)("This property indicates whether the carousel displays the controls.", null, null, "true"),
|
|
23
|
+
autoplay: (0, ComponentDefs_1.d)("This property indicates whether the carousel automatically scrolls.", null, null, "false"),
|
|
24
|
+
loop: (0, ComponentDefs_1.d)("This property indicates whether the carousel loops.", null, null, "false"),
|
|
25
|
+
startIndex: (0, ComponentDefs_1.d)("This property indicates the index of the first slide to display.", null, null, "0"),
|
|
26
|
+
prevIcon: (0, ComponentDefs_1.d)("This property specifies the icon to display for the previous control."),
|
|
27
|
+
nextIcon: (0, ComponentDefs_1.d)("This property specifies the icon to display for the next control."),
|
|
28
|
+
keyboard: (0, ComponentDefs_1.d)("This property indicates whether the carousel responds to keyboard events."),
|
|
29
|
+
},
|
|
30
|
+
events: {
|
|
31
|
+
displayDidChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
32
|
+
},
|
|
33
|
+
apis: {
|
|
34
|
+
canScrollPrev: (0, ComponentDefs_1.d)("This method returns `true` if the carousel can scroll to the previous slide."),
|
|
35
|
+
canScrollNext: (0, ComponentDefs_1.d)("This method returns `true` if the carousel can scroll to the next slide."),
|
|
36
|
+
scrollTo: (0, ComponentDefs_1.d)("This method scrolls the carousel to the specified slide index."),
|
|
37
|
+
scrollPrev: (0, ComponentDefs_1.d)("This method scrolls the carousel to the previous slide."),
|
|
38
|
+
scrollNext: (0, ComponentDefs_1.d)("This method scrolls the carousel to the next slide."),
|
|
39
|
+
},
|
|
40
|
+
themeVars: (0, themeVars_1.parseScssVar)(Carousel_module_scss_1.default.themeVars),
|
|
41
|
+
defaultThemeVars: {
|
|
42
|
+
[`color-bg-control-${COMP}`]: "$color-primary",
|
|
43
|
+
[`color-text-control-${COMP}`]: "$color-primary",
|
|
44
|
+
[`color-bg-control-hover-${COMP}`]: "$color-primary",
|
|
45
|
+
[`color-text-control-hover-${COMP}`]: "$color-primary",
|
|
46
|
+
[`color-bg-control-active-${COMP}`]: "$color-primary",
|
|
47
|
+
[`color-bg-control-disabled-${COMP}`]: "$color-surface-200",
|
|
48
|
+
[`color-text-control-disabled-${COMP}`]: "$color-text-disabled",
|
|
49
|
+
[`color-text-control-active-${COMP}`]: "$color-primary",
|
|
50
|
+
[`color-bg-indicator-${COMP}`]: "$color-surface-200",
|
|
51
|
+
[`color-bg-indicator-active-${COMP}`]: "$color-primary",
|
|
52
|
+
[`color-text-indicator-${COMP}`]: "$color-primary",
|
|
53
|
+
[`color-text-indicator-active-${COMP}`]: "$color-primary",
|
|
54
|
+
[`color-bg-indicator-hover-${COMP}`]: "$color-surface-200",
|
|
55
|
+
[`color-text-indicator-hover-${COMP}`]: "$color-primary",
|
|
56
|
+
[`width-indicator-${COMP}`]: "25px",
|
|
57
|
+
[`height-indicator-${COMP}`]: "6px",
|
|
58
|
+
[`height-control-${COMP}`]: "36px",
|
|
59
|
+
[`width-control-${COMP}`]: "36px",
|
|
60
|
+
[`radius-control-${COMP}`]: "50%",
|
|
61
|
+
[`height-${COMP}`]: "100%",
|
|
62
|
+
[`width-${COMP}`]: "100%",
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
exports.carouselComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.CarouselMd, ({ node, renderChild, layoutCss, extractValue, lookupEventHandler, registerComponentApi }) => {
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(CarouselNative_1.CarouselComponent, { style: layoutCss, indicators: extractValue.asOptionalBoolean((_a = node.props) === null || _a === void 0 ? void 0 : _a.indicators), controls: extractValue.asOptionalBoolean((_b = node.props) === null || _b === void 0 ? void 0 : _b.controls), orientation: extractValue((_c = node.props) === null || _c === void 0 ? void 0 : _c.orientation), onDisplayDidChange: lookupEventHandler("displayDidChange"), autoplay: extractValue.asOptionalBoolean((_d = node.props) === null || _d === void 0 ? void 0 : _d.autoplay), registerComponentApi: registerComponentApi, loop: extractValue.asOptionalBoolean((_e = node.props) === null || _e === void 0 ? void 0 : _e.loop), startIndex: extractValue.asOptionalNumber((_f = node.props) === null || _f === void 0 ? void 0 : _f.startIndex), prevIcon: extractValue((_g = node.props) === null || _g === void 0 ? void 0 : _g.prevIcon), nextIcon: extractValue((_h = node.props) === null || _h === void 0 ? void 0 : _h.nextIcon), keyboard: extractValue.asOptionalBoolean((_j = node.props) === null || _j === void 0 ? void 0 : _j.keyboard), children: renderChild(node.children) }));
|
|
68
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.carouselItemComponentRenderer = exports.CarouselItemMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("@components-core/renderers");
|
|
7
|
+
const CarouselItemNative_1 = require("@components/Carousel/CarouselItemNative");
|
|
8
|
+
const COMP = "CarouselItem";
|
|
9
|
+
exports.CarouselItemMd = (0, ComponentDefs_1.createMetadata)({});
|
|
10
|
+
exports.carouselItemComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.CarouselItemMd, (rendererContext) => {
|
|
11
|
+
const { node, renderChild } = rendererContext;
|
|
12
|
+
return (0, jsx_runtime_1.jsx)(CarouselItemNative_1.CarouselItemComponent, { content: renderChild(node.children, {
|
|
13
|
+
type: "Stack",
|
|
14
|
+
orientation: "vertical",
|
|
15
|
+
}) });
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.CarouselItemComponent = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = require("react");
|
|
9
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
10
|
+
const Carousel_module_scss_1 = __importDefault(require("@components/Carousel/Carousel.module.scss"));
|
|
11
|
+
exports.CarouselItemComponent = (0, react_1.forwardRef)(function CarouselItemComponent({ content, style }, forwardedRef) {
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style, ref: forwardedRef, role: "group", "aria-roledescription": "slide", className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselItem), children: (0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.innerWrapper, children: content }) }));
|
|
13
|
+
});
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.CarouselComponent = void 0;
|
|
40
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
const React = __importStar(require("react"));
|
|
42
|
+
const classnames_1 = __importDefault(require("@components-core/utils/classnames"));
|
|
43
|
+
const embla_carousel_react_1 = __importDefault(require("embla-carousel-react"));
|
|
44
|
+
const Carousel_module_scss_1 = __importDefault(require("./Carousel.module.scss"));
|
|
45
|
+
const react_1 = require("react");
|
|
46
|
+
const IconNative_1 = __importDefault(require("@components/Icon/IconNative"));
|
|
47
|
+
const constants_1 = require("@components-core/constants");
|
|
48
|
+
const embla_carousel_autoplay_1 = __importDefault(require("embla-carousel-autoplay"));
|
|
49
|
+
const react_compose_refs_1 = require("@radix-ui/react-compose-refs");
|
|
50
|
+
exports.CarouselComponent = (0, react_1.forwardRef)(function CarouselComponent({ orientation = "horizontal", children, style, indicators = true, onDisplayDidChange = constants_1.noop, autoplay = false, controls = true, loop = false, startIndex = 0, prevIcon, nextIcon, registerComponentApi, }, forwardedRef) {
|
|
51
|
+
const referenceElement = (0, react_1.useRef)(null);
|
|
52
|
+
const [activeSlide, setActiveSlide] = (0, react_1.useState)(0);
|
|
53
|
+
const [plugins, setPlugins] = (0, react_1.useState)([]);
|
|
54
|
+
const [isPlaying, setIsPlaying] = (0, react_1.useState)(false);
|
|
55
|
+
const ref = forwardedRef ? (0, react_compose_refs_1.composeRefs)(referenceElement, forwardedRef) : referenceElement;
|
|
56
|
+
const [carouselRef, api] = (0, embla_carousel_react_1.default)({
|
|
57
|
+
axis: orientation === "horizontal" ? "x" : "y",
|
|
58
|
+
loop,
|
|
59
|
+
startIndex,
|
|
60
|
+
}, plugins);
|
|
61
|
+
const prevIconName = prevIcon || orientation === "horizontal" ? "arrowleft" : "arrowup";
|
|
62
|
+
const nextIconName = nextIcon || orientation === "horizontal" ? "arrowright" : "arrowdown";
|
|
63
|
+
(0, react_1.useEffect)(() => {
|
|
64
|
+
if (autoplay) {
|
|
65
|
+
setPlugins([(0, embla_carousel_autoplay_1.default)()]);
|
|
66
|
+
}
|
|
67
|
+
}, [autoplay]);
|
|
68
|
+
const toggleAutoplay = (0, react_1.useCallback)(() => {
|
|
69
|
+
var _a;
|
|
70
|
+
const autoplay = (_a = api === null || api === void 0 ? void 0 : api.plugins()) === null || _a === void 0 ? void 0 : _a.autoplay;
|
|
71
|
+
if (!autoplay)
|
|
72
|
+
return;
|
|
73
|
+
const playOrStop = autoplay.isPlaying() ? autoplay.stop : autoplay.play;
|
|
74
|
+
playOrStop();
|
|
75
|
+
}, [api]);
|
|
76
|
+
(0, react_1.useEffect)(() => {
|
|
77
|
+
var _a;
|
|
78
|
+
const autoplay = (_a = api === null || api === void 0 ? void 0 : api.plugins()) === null || _a === void 0 ? void 0 : _a.autoplay;
|
|
79
|
+
if (!autoplay)
|
|
80
|
+
return;
|
|
81
|
+
setIsPlaying(autoplay.isPlaying());
|
|
82
|
+
api
|
|
83
|
+
.on("autoplay:play", () => setIsPlaying(true))
|
|
84
|
+
.on("autoplay:stop", () => setIsPlaying(false))
|
|
85
|
+
.on("reInit", () => setIsPlaying(autoplay.isPlaying()));
|
|
86
|
+
}, [api]);
|
|
87
|
+
const scrollTo = (0, react_1.useCallback)((index) => {
|
|
88
|
+
api === null || api === void 0 ? void 0 : api.scrollTo(index);
|
|
89
|
+
}, [api]);
|
|
90
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
91
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
92
|
+
const onSelect = React.useCallback((api) => {
|
|
93
|
+
if (!api) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const activeIndex = api.selectedScrollSnap();
|
|
97
|
+
onDisplayDidChange(activeIndex);
|
|
98
|
+
setActiveSlide(activeIndex);
|
|
99
|
+
setCanScrollPrev(api.canScrollPrev());
|
|
100
|
+
setCanScrollNext(api.canScrollNext());
|
|
101
|
+
}, []);
|
|
102
|
+
const scrollPrev = (0, react_1.useCallback)(() => {
|
|
103
|
+
if (api) {
|
|
104
|
+
api === null || api === void 0 ? void 0 : api.scrollPrev();
|
|
105
|
+
}
|
|
106
|
+
}, [api]);
|
|
107
|
+
const scrollNext = (0, react_1.useCallback)(() => {
|
|
108
|
+
api === null || api === void 0 ? void 0 : api.scrollNext();
|
|
109
|
+
}, [api]);
|
|
110
|
+
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
111
|
+
if (orientation === "horizontal") {
|
|
112
|
+
if (event.key === "ArrowLeft") {
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
scrollPrev();
|
|
115
|
+
}
|
|
116
|
+
else if (event.key === "ArrowRight") {
|
|
117
|
+
event.preventDefault();
|
|
118
|
+
scrollNext();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
if (event.key === "ArrowUp") {
|
|
123
|
+
event.preventDefault();
|
|
124
|
+
scrollPrev();
|
|
125
|
+
}
|
|
126
|
+
else if (event.key === "ArrowDown") {
|
|
127
|
+
event.preventDefault();
|
|
128
|
+
scrollNext();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}, [scrollPrev, scrollNext]);
|
|
132
|
+
(0, react_1.useEffect)(() => {
|
|
133
|
+
registerComponentApi === null || registerComponentApi === void 0 ? void 0 : registerComponentApi({
|
|
134
|
+
scrollTo,
|
|
135
|
+
scrollPrev,
|
|
136
|
+
scrollNext,
|
|
137
|
+
canScrollPrev: () => canScrollPrev,
|
|
138
|
+
canScrollNext: () => canScrollNext,
|
|
139
|
+
});
|
|
140
|
+
}, [registerComponentApi, scrollTo, scrollPrev, scrollNext, canScrollPrev, canScrollNext]);
|
|
141
|
+
React.useEffect(() => {
|
|
142
|
+
if (!api) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
onSelect(api);
|
|
146
|
+
api.on("reInit", onSelect);
|
|
147
|
+
api.on("select", onSelect);
|
|
148
|
+
return () => {
|
|
149
|
+
api === null || api === void 0 ? void 0 : api.off("select", onSelect);
|
|
150
|
+
};
|
|
151
|
+
}, [api, onSelect]);
|
|
152
|
+
(0, react_1.useEffect)(() => {
|
|
153
|
+
if (referenceElement === null || referenceElement === void 0 ? void 0 : referenceElement.current) {
|
|
154
|
+
referenceElement.current.addEventListener("keydown", handleKeyDown);
|
|
155
|
+
}
|
|
156
|
+
}, [ref, handleKeyDown]);
|
|
157
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style, ref: ref, className: (0, classnames_1.default)(Carousel_module_scss_1.default.carousel), role: "region", tabIndex: -1, "aria-roledescription": "carousel", children: [(0, jsx_runtime_1.jsx)("div", { ref: carouselRef, className: Carousel_module_scss_1.default.carouselContentWrapper, children: (0, jsx_runtime_1.jsx)("div", { className: (0, classnames_1.default)(Carousel_module_scss_1.default.carouselContent, {
|
|
158
|
+
[Carousel_module_scss_1.default.horizontal]: orientation === "horizontal",
|
|
159
|
+
[Carousel_module_scss_1.default.vertical]: orientation === "vertical",
|
|
160
|
+
}), children: children }) }), controls && ((0, jsx_runtime_1.jsxs)("div", { className: Carousel_module_scss_1.default.controls, children: [autoplay && ((0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: toggleAutoplay, children: isPlaying ? (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "pause" }) : (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: "play" }) })), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, disabled: !canScrollPrev, onClick: scrollPrev, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: prevIconName }) }), (0, jsx_runtime_1.jsx)("button", { className: Carousel_module_scss_1.default.controlButton, onClick: scrollNext, disabled: !canScrollNext, children: (0, jsx_runtime_1.jsx)(IconNative_1.default, { name: nextIconName }) })] })), indicators && ((0, jsx_runtime_1.jsx)("div", { className: Carousel_module_scss_1.default.indicators, children: React.Children.map(children, (_, index) => ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: () => scrollTo(index), className: (0, classnames_1.default)(Carousel_module_scss_1.default.indicator, {
|
|
161
|
+
[Carousel_module_scss_1.default.active]: index === activeSlide,
|
|
162
|
+
}), "aria-current": index === activeSlide }, index))) }))] }));
|
|
163
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.changeListenerComponentRenderer = exports.ChangeListenerMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("@components-core/renderers");
|
|
7
|
+
const ChangeListenerNative_1 = require("./ChangeListenerNative");
|
|
8
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
9
|
+
const COMP = "ChangeListener";
|
|
10
|
+
exports.ChangeListenerMd = (0, ComponentDefs_1.createMetadata)({
|
|
11
|
+
description: `\`${COMP}\` is a functional component (it renders no UI) to trigger an action when a ` +
|
|
12
|
+
`particular value (component property, state, etc.) changes.`,
|
|
13
|
+
props: {
|
|
14
|
+
listenTo: (0, ComponentDefs_1.d)(`Value to the changes of which this component listens.`),
|
|
15
|
+
throttleWaitInMs: (0, ComponentDefs_1.d)(`This variable sets a throttling time (in milliseconds) to apply when executing the \`didChange\` ` +
|
|
16
|
+
`event handler. All changes within that throttling time will only fire the \`didChange\` event once.`),
|
|
17
|
+
},
|
|
18
|
+
events: {
|
|
19
|
+
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
exports.changeListenerComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ChangeListenerMd, ({ node, lookupEventHandler, extractValue }) => {
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(ChangeListenerNative_1.ChangeListener, { listenTo: extractValue(node.props.listenTo), throttleWaitInMs: extractValue(node.props.throttleWaitInMs), onChange: lookupEventHandler("didChange") }));
|
|
24
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChangeListener = ChangeListener;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const lodash_es_1 = require("lodash-es");
|
|
6
|
+
const hooks_1 = require("@components-core/utils/hooks");
|
|
7
|
+
function ChangeListener({ listenTo, onChange, throttleWaitInMs = 0 }) {
|
|
8
|
+
const prevValue = (0, hooks_1.usePrevious)(listenTo);
|
|
9
|
+
const throttledOnChange = (0, react_1.useMemo)(() => {
|
|
10
|
+
if (throttleWaitInMs !== 0 && onChange) {
|
|
11
|
+
return (0, lodash_es_1.throttle)(onChange, throttleWaitInMs, {
|
|
12
|
+
leading: true,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return onChange;
|
|
16
|
+
}, [onChange, throttleWaitInMs]);
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
18
|
+
if (throttledOnChange && !(0, lodash_es_1.isEqual)(prevValue, listenTo)) {
|
|
19
|
+
throttledOnChange === null || throttledOnChange === void 0 ? void 0 : throttledOnChange({
|
|
20
|
+
prevValue,
|
|
21
|
+
newValue: listenTo,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}, [listenTo, throttledOnChange, prevValue]);
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.chartRenderer = exports.ChartMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("@components-core/renderers");
|
|
7
|
+
const ChartNative_1 = require("./ChartNative");
|
|
8
|
+
const COMP = "Chart";
|
|
9
|
+
exports.ChartMd = (0, ComponentDefs_1.createMetadata)({
|
|
10
|
+
status: "deprecated",
|
|
11
|
+
description: "(**OBSOLETE**) A chart component",
|
|
12
|
+
props: {
|
|
13
|
+
type: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
14
|
+
labels: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
15
|
+
series: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
16
|
+
stacked: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
17
|
+
showAxisLabels: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
18
|
+
tooltipEnabled: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
19
|
+
showLegend: (0, ComponentDefs_1.d)("(**OBSOLETE**)"),
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
exports.chartRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ChartMd, ({ node, extractValue, lookupAction, layoutCss, registerComponentApi }) => {
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(ChartNative_1.Chart, { type: extractValue.asString(node.props.type), labels: extractValue(node.props.labels), series: extractValue(node.props.series), style: layoutCss, showLegend: extractValue.asOptionalBoolean(node.props.showLegend), stacked: extractValue.asOptionalBoolean(node.props.stacked), showAxisLabels: extractValue.asOptionalBoolean(node.props.showAxisLabels), tooltipEnabled: extractValue.asOptionalBoolean(node.props.tooltipEnabled) }));
|
|
24
|
+
});
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
36
|
+
var t = {};
|
|
37
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
38
|
+
t[p] = s[p];
|
|
39
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
40
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
41
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
42
|
+
t[p[i]] = s[p[i]];
|
|
43
|
+
}
|
|
44
|
+
return t;
|
|
45
|
+
};
|
|
46
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.Chart = void 0;
|
|
51
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
|
+
const react_1 = require("react");
|
|
53
|
+
const react_2 = __importStar(require("react"));
|
|
54
|
+
const Chart_module_scss_1 = __importDefault(require("./Chart.module.scss"));
|
|
55
|
+
const hooks_1 = require("@components-core/utils/hooks");
|
|
56
|
+
const ApexChart = react_2.default.lazy(() => Promise.resolve().then(() => __importStar(require("react-apexcharts"))));
|
|
57
|
+
const defaultOptions = {
|
|
58
|
+
chart: {
|
|
59
|
+
fontFamily: "inherit",
|
|
60
|
+
sparkline: {
|
|
61
|
+
enabled: false,
|
|
62
|
+
},
|
|
63
|
+
toolbar: {
|
|
64
|
+
show: false,
|
|
65
|
+
},
|
|
66
|
+
animations: {
|
|
67
|
+
enabled: false,
|
|
68
|
+
dynamicAnimation: {
|
|
69
|
+
enabled: true,
|
|
70
|
+
},
|
|
71
|
+
animateGradually: {
|
|
72
|
+
enabled: true,
|
|
73
|
+
},
|
|
74
|
+
speed: 300,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
dataLabels: {
|
|
78
|
+
enabled: false,
|
|
79
|
+
},
|
|
80
|
+
fill: {
|
|
81
|
+
//--> area
|
|
82
|
+
opacity: 0.16,
|
|
83
|
+
type: "solid",
|
|
84
|
+
},
|
|
85
|
+
stroke: {
|
|
86
|
+
// width: [2, 1],
|
|
87
|
+
// dashArray: [0, 3],
|
|
88
|
+
width: 2,
|
|
89
|
+
lineCap: "round",
|
|
90
|
+
curve: "smooth",
|
|
91
|
+
},
|
|
92
|
+
tooltip: {
|
|
93
|
+
// --> should come from themes
|
|
94
|
+
theme: "dark",
|
|
95
|
+
},
|
|
96
|
+
grid: {
|
|
97
|
+
strokeDashArray: 4,
|
|
98
|
+
padding: {
|
|
99
|
+
// top: -20,
|
|
100
|
+
right: 0,
|
|
101
|
+
left: -4,
|
|
102
|
+
bottom: -4,
|
|
103
|
+
},
|
|
104
|
+
xaxis: {
|
|
105
|
+
lines: {
|
|
106
|
+
show: true,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
plotOptions: {
|
|
111
|
+
bar: {
|
|
112
|
+
columnWidth: "50%",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
xaxis: {
|
|
116
|
+
labels: {
|
|
117
|
+
// padding: 0,
|
|
118
|
+
},
|
|
119
|
+
tooltip: {
|
|
120
|
+
enabled: false,
|
|
121
|
+
},
|
|
122
|
+
axisBorder: {
|
|
123
|
+
show: false,
|
|
124
|
+
},
|
|
125
|
+
type: "datetime",
|
|
126
|
+
},
|
|
127
|
+
yaxis: {
|
|
128
|
+
labels: {
|
|
129
|
+
padding: 4,
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
legend: {
|
|
133
|
+
show: false,
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
exports.Chart = (0, react_1.forwardRef)(function Chart({ type, labels, series, style, stacked, showAxisLabels = true, tooltipEnabled = true, showLegend = false, }, ref) {
|
|
137
|
+
const colors = (0, hooks_1.useColors)({
|
|
138
|
+
name: "color-primary-500",
|
|
139
|
+
format: "hex",
|
|
140
|
+
}, {
|
|
141
|
+
name: "color-primary-400",
|
|
142
|
+
format: "hex",
|
|
143
|
+
}, {
|
|
144
|
+
name: "color-primary-300",
|
|
145
|
+
format: "hex",
|
|
146
|
+
}, {
|
|
147
|
+
name: "color-primary-200",
|
|
148
|
+
format: "hex",
|
|
149
|
+
});
|
|
150
|
+
const { fill } = defaultOptions, restOptions = __rest(defaultOptions, ["fill"]);
|
|
151
|
+
const options = (0, react_2.useMemo)(() => {
|
|
152
|
+
let opts = Object.assign(Object.assign({}, restOptions), { chart: Object.assign(Object.assign({}, restOptions.chart), { stacked, sparkline: {
|
|
153
|
+
enabled: !showAxisLabels,
|
|
154
|
+
} }), fill: type === "area" ? fill : {}, tooltip: Object.assign(Object.assign({}, defaultOptions.tooltip), { enabled: tooltipEnabled }), colors: Object.values(colors), labels: labels || [], legend: {
|
|
155
|
+
show: showLegend,
|
|
156
|
+
} });
|
|
157
|
+
if (!labels) {
|
|
158
|
+
delete opts.xaxis;
|
|
159
|
+
}
|
|
160
|
+
return opts;
|
|
161
|
+
}, [colors, fill, labels, restOptions, showAxisLabels, stacked, tooltipEnabled, type]);
|
|
162
|
+
return (
|
|
163
|
+
// TODO illesg TEMP FLEX 1 STAR SIZING
|
|
164
|
+
(0, jsx_runtime_1.jsx)("div", { style: Object.assign({}, style), className: Chart_module_scss_1.default.wrapper, ref: ref, children: (0, jsx_runtime_1.jsx)(react_2.Suspense, { children: !!series && (0, jsx_runtime_1.jsx)(ApexChart, { options: options, type: type, series: series, height: "100%", width: "100%" }) }) }));
|
|
165
|
+
});
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.checkboxComponentRenderer = exports.CheckboxMd = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const Toggle_module_scss_1 = __importDefault(require("@components/Toggle/Toggle.module.scss"));
|
|
9
|
+
const renderers_1 = require("@components-core/renderers");
|
|
10
|
+
const Toggle_1 = require("@components/Toggle/Toggle");
|
|
11
|
+
const themeVars_1 = require("@components-core/theming/themeVars");
|
|
12
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
13
|
+
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
14
|
+
const COMP = "Checkbox";
|
|
15
|
+
exports.CheckboxMd = (0, ComponentDefs_1.createMetadata)({
|
|
16
|
+
status: "stable",
|
|
17
|
+
description: `The \`${COMP}\` component allows users to make binary choices, typically between checked or ` +
|
|
18
|
+
`unchecked. It consists of a small box that can be toggled on or off by clicking on it.`,
|
|
19
|
+
props: {
|
|
20
|
+
indeterminate: (0, metadata_helpers_1.dIndeterminate)(),
|
|
21
|
+
label: (0, metadata_helpers_1.dLabel)(),
|
|
22
|
+
labelPosition: (0, metadata_helpers_1.dLabelPosition)("end"),
|
|
23
|
+
labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
|
|
24
|
+
labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
|
|
25
|
+
required: (0, metadata_helpers_1.dRequired)(),
|
|
26
|
+
initialValue: (0, metadata_helpers_1.dInitialValue)(false),
|
|
27
|
+
autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
|
|
28
|
+
readOnly: (0, metadata_helpers_1.dReadonly)(),
|
|
29
|
+
enabled: (0, metadata_helpers_1.dEnabled)(),
|
|
30
|
+
validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
|
|
31
|
+
description: (0, ComponentDefs_1.d)(`(*** NOT IMPLEMENTED YET ***) This optional property displays an alternate description ` +
|
|
32
|
+
`of the ${COMP} besides its label.`),
|
|
33
|
+
},
|
|
34
|
+
events: {
|
|
35
|
+
click: (0, metadata_helpers_1.dClick)(COMP),
|
|
36
|
+
gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
|
|
37
|
+
lostFocus: (0, metadata_helpers_1.dLostFocus)(COMP),
|
|
38
|
+
didChange: (0, metadata_helpers_1.dDidChange)(COMP),
|
|
39
|
+
},
|
|
40
|
+
apis: {
|
|
41
|
+
value: (0, metadata_helpers_1.dValueApi)(),
|
|
42
|
+
setValue: (0, metadata_helpers_1.dSetValueApi)(),
|
|
43
|
+
},
|
|
44
|
+
themeVars: (0, themeVars_1.parseScssVar)(Toggle_module_scss_1.default.themeVars),
|
|
45
|
+
defaultThemeVars: {
|
|
46
|
+
[`color-border-checked-${COMP}-error`]: `$color-border-${COMP}-error`,
|
|
47
|
+
[`color-bg-checked-${COMP}-error`]: `$color-border-${COMP}-error`,
|
|
48
|
+
[`color-border-checked-${COMP}-warning`]: `$color-border-${COMP}-warning`,
|
|
49
|
+
[`color-bg-checked-${COMP}-warning`]: `$color-border-${COMP}-warning`,
|
|
50
|
+
[`color-border-checked-${COMP}-success`]: `$color-border-${COMP}-success`,
|
|
51
|
+
[`color-bg-checked-${COMP}-success`]: `$color-border-${COMP}-success`,
|
|
52
|
+
light: {
|
|
53
|
+
[`color-bg-indicator-${COMP}`]: "$color-bg-primary",
|
|
54
|
+
[`color-border-checked-${COMP}`]: "$color-primary-500",
|
|
55
|
+
[`color-bg-checked-${COMP}`]: "$color-primary-500",
|
|
56
|
+
[`color-bg-${COMP}--disabled`]: "$color-surface-200",
|
|
57
|
+
},
|
|
58
|
+
dark: {
|
|
59
|
+
[`color-bg-indicator-${COMP}`]: "$color-bg-primary",
|
|
60
|
+
[`color-border-checked-${COMP}`]: "$color-primary-400",
|
|
61
|
+
[`color-bg-checked-${COMP}`]: "$color-primary-400",
|
|
62
|
+
[`color-bg-${COMP}--disabled`]: "$color-surface-800",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
exports.checkboxComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.CheckboxMd, ({ node, extractValue, layoutCss, updateState, lookupEventHandler, state, registerComponentApi, }) => {
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(Toggle_1.Toggle, { enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss, initialValue: extractValue.asOptionalBoolean(node.props.initialValue, false), value: state === null || state === void 0 ? void 0 : state.value, readOnly: extractValue.asOptionalBoolean(node.props.readOnly), validationStatus: extractValue(node.props.validationStatus), updateState: updateState, onDidChange: lookupEventHandler("didChange"), onFocus: lookupEventHandler("gotFocus"), onBlur: lookupEventHandler("lostFocus"), label: extractValue(node.props.label), labelPosition: extractValue(node.props.labelPosition), labelWidth: extractValue(node.props.labelWidth), labelBreak: extractValue.asOptionalBoolean(node.props.labelBreak), required: extractValue.asOptionalBoolean(node.props.required), indeterminate: extractValue.asOptionalBoolean(node.props.indeterminate), registerComponentApi: registerComponentApi }));
|
|
68
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.columnComponentRenderer = exports.ColumnMd = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("@components-core/renderers");
|
|
7
|
+
const ColumnNative_1 = require("./ColumnNative");
|
|
8
|
+
const COMP = "Column";
|
|
9
|
+
exports.ColumnMd = (0, ComponentDefs_1.createMetadata)({
|
|
10
|
+
description: `The \`${COMP}\` component can be used within a \`Table\` to define a particular table ` +
|
|
11
|
+
`column's visual properties and data bindings.`,
|
|
12
|
+
props: {
|
|
13
|
+
bindTo: (0, ComponentDefs_1.d)(`Indicates what part of the data to lay out in the column.`),
|
|
14
|
+
header: (0, ComponentDefs_1.d)(`Adds a label for a particular column.`),
|
|
15
|
+
width: (0, ComponentDefs_1.d)(`This property defines the width of the column. You can use a numeric value, a pixel ` +
|
|
16
|
+
`value (such as \`100px\`), or a star size value (such as \`*\`, \`2*\`, etc.). ` +
|
|
17
|
+
`You will get an error if you use any other unit (or value).`),
|
|
18
|
+
minWidth: (0, ComponentDefs_1.d)(`Indicates the minimum width a particular column can have.`),
|
|
19
|
+
maxWidth: (0, ComponentDefs_1.d)(`Indicates the maximum width a particular column can have.`),
|
|
20
|
+
canSort: (0, ComponentDefs_1.d)(`This property sets whether the user can sort by a column by clicking on its header ` +
|
|
21
|
+
`(\`true\`) or not (\`false\`).`),
|
|
22
|
+
pinTo: (0, ComponentDefs_1.d)(`This property allows the column to be pinned to ` +
|
|
23
|
+
`the \`left\` (left-to-right writing style) or \`right\` (left-to-right writing style) edge ` +
|
|
24
|
+
`of the table. If the writing style is right-to-left, the locations are switched.`, ["left", "right"], "string"),
|
|
25
|
+
canResize: (0, ComponentDefs_1.d)(`This property indicates whether the user can resize the column. If set to ` +
|
|
26
|
+
`\`true\`, the column can be resized by dragging the column border. If set to ` +
|
|
27
|
+
`\`false\`, the column cannot be resized. Double-clicking the column border ` +
|
|
28
|
+
`resets to the original size.`),
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
exports.columnComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.ColumnMd, (rendererContext) => {
|
|
32
|
+
const { node, renderChild, extractValue, layoutCss } = rendererContext;
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(ColumnNative_1.Column, { style: layoutCss, header: extractValue.asDisplayText(node.props.header), accessorKey: extractValue.asOptionalString(node.props.bindTo), canSort: extractValue.asOptionalBoolean(node.props.canSort), canResize: extractValue.asOptionalBoolean(node.props.canResize), pinTo: extractValue.asOptionalString(node.props.pinTo), width: extractValue(node.props.width), minWidth: extractValue(node.props.minWidth), maxWidth: extractValue(node.props.maxWidth), nodeChildren: node.children, renderChild: renderChild, id: node.uid }));
|
|
34
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.Column = Column;
|
|
15
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
|
+
const TableContext_1 = require("./TableContext");
|
|
17
|
+
const react_1 = require("react");
|
|
18
|
+
const container_helpers_1 = require("@components/container-helpers");
|
|
19
|
+
function Column(_a) {
|
|
20
|
+
var { nodeChildren, renderChild } = _a, columnMetadata = __rest(_a, ["nodeChildren", "renderChild"]);
|
|
21
|
+
const id = (0, react_1.useId)();
|
|
22
|
+
const { registerColumn, unRegisterColumn } = (0, TableContext_1.useTableContext)();
|
|
23
|
+
const cellRenderer = (0, react_1.useCallback)((row) => {
|
|
24
|
+
return (0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: nodeChildren, item: row, renderChild: renderChild });
|
|
25
|
+
}, [nodeChildren, renderChild]);
|
|
26
|
+
const safeCellRenderer = (0, react_1.useMemo)(() => {
|
|
27
|
+
return nodeChildren ? cellRenderer : undefined;
|
|
28
|
+
}, [cellRenderer, nodeChildren]);
|
|
29
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
30
|
+
registerColumn(Object.assign(Object.assign({}, columnMetadata), { cellRenderer: safeCellRenderer }), id);
|
|
31
|
+
}, [columnMetadata, id, registerColumn, safeCellRenderer]);
|
|
32
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
33
|
+
return () => {
|
|
34
|
+
unRegisterColumn(id);
|
|
35
|
+
};
|
|
36
|
+
}, [id, unRegisterColumn]);
|
|
37
|
+
return null;
|
|
38
|
+
}
|