xmlui 0.7.21 → 0.7.23
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-LRHkKnha.mjs → apiInterceptorWorker-BZ3Gd4mb.mjs} +25 -10
- package/dist/{grammar.tmLanguage-DNepe_jP.mjs → grammar.tmLanguage-JAlHWPqw.mjs} +1 -1
- package/dist/{index-5NLXyjX0.mjs → index-C9zkAour.mjs} +27520 -25814
- package/dist/index.css +1 -1
- package/dist/scripts/bin/build-lib.js +10 -4
- package/dist/scripts/bin/build.js +1 -4
- package/dist/scripts/bin/index.js +7 -7
- package/dist/scripts/bin/preview.js +19 -2
- package/dist/scripts/bin/start.js +2 -4
- package/dist/scripts/bin/viteConfig.js +2 -11
- package/dist/scripts/src/abstractions/ComponentDefs.js +2 -1
- package/dist/scripts/src/components/APICall/APICall.js +3 -3
- package/dist/scripts/src/components/APICall/APICallNative.js +2 -2
- package/dist/scripts/src/components/Accordion/Accordion.js +5 -5
- package/dist/scripts/src/components/Accordion/AccordionContext.js +1 -1
- package/dist/scripts/src/components/Accordion/AccordionItem.js +5 -5
- package/dist/scripts/src/components/Accordion/AccordionItemNative.js +3 -3
- package/dist/scripts/src/components/Accordion/AccordionNative.js +3 -3
- package/dist/scripts/src/components/Alert/Alert.js +4 -4
- package/dist/scripts/src/components/App/App.js +5 -5
- package/dist/scripts/src/components/App/AppNative.js +33 -34
- package/dist/scripts/src/components/App/Sheet.js +4 -4
- package/dist/scripts/src/components/AppHeader/AppHeader.js +6 -6
- package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +9 -9
- package/dist/scripts/src/components/AppState/AppState.js +2 -2
- package/dist/scripts/src/components/AppState/AppStateNative.js +2 -2
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +7 -7
- package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +29 -31
- package/dist/scripts/src/components/Avatar/Avatar.js +4 -4
- package/dist/scripts/src/components/Avatar/AvatarNative.js +1 -1
- package/dist/scripts/src/components/Backdrop/Backdrop.js +4 -4
- package/dist/scripts/src/components/Badge/Badge.js +5 -5
- package/dist/scripts/src/components/Badge/BadgeNative.js +5 -5
- package/dist/scripts/src/components/Bookmark/Bookmark.js +7 -3
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +6 -5
- package/dist/scripts/src/components/Breakout/Breakout.js +2 -2
- package/dist/scripts/src/components/Button/Button.js +6 -6
- package/dist/scripts/src/components/Button/ButtonNative.js +3 -3
- package/dist/scripts/src/components/ButtonGroup/ButtonGroup.js +5 -5
- package/dist/scripts/src/components/Card/Card.js +5 -5
- package/dist/scripts/src/components/Card/CardNative.js +7 -7
- package/dist/scripts/src/components/Carousel/Carousel.js +5 -5
- package/dist/scripts/src/components/Carousel/CarouselItem.js +3 -3
- package/dist/scripts/src/components/Carousel/CarouselItemNative.js +3 -3
- package/dist/scripts/src/components/Carousel/CarouselNative.js +6 -6
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +3 -3
- package/dist/scripts/src/components/ChangeListener/ChangeListenerNative.js +1 -1
- package/dist/scripts/src/components/Checkbox/Checkbox.js +6 -6
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +46 -0
- package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +54 -0
- package/dist/scripts/src/components/Column/Column.js +2 -2
- package/dist/scripts/src/components/Column/ColumnNative.js +2 -2
- package/dist/scripts/src/components/ComponentProvider.js +191 -97
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -4
- package/dist/scripts/src/components/ContentSeparator/ContentSeparatorNative.js +1 -1
- package/dist/scripts/src/components/DatePicker/DatePicker.js +4 -4
- package/dist/scripts/src/components/DatePicker/DatePickerNative.js +18 -19
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +6 -6
- package/dist/scripts/src/components/DropdownMenu/DropdownMenuNative.js +5 -5
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +4 -4
- package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +1 -1
- package/dist/scripts/src/components/FileInput/FileInput.js +6 -6
- package/dist/scripts/src/components/FileInput/FileInputNative.js +6 -6
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +3 -3
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +6 -7
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +8 -6
- package/dist/scripts/src/components/FlowLayout/FlowLayoutNative.js +27 -16
- package/dist/scripts/src/components/Footer/Footer.js +4 -4
- package/dist/scripts/src/components/Footer/FooterNative.js +2 -2
- package/dist/scripts/src/components/Form/Form.js +5 -5
- package/dist/scripts/src/components/Form/FormNative.js +29 -29
- package/dist/scripts/src/components/FormItem/FormItem.js +4 -4
- package/dist/scripts/src/components/FormItem/FormItemNative.js +26 -16
- package/dist/scripts/src/components/FormItem/HelperText.js +3 -3
- package/dist/scripts/src/components/FormItem/ItemWithLabel.js +5 -6
- package/dist/scripts/src/components/FormItem/Validations.js +5 -5
- package/dist/scripts/src/components/FormSection/FormSection.js +2 -2
- package/dist/scripts/src/components/Heading/Heading.js +17 -4
- package/dist/scripts/src/components/Heading/HeadingNative.js +25 -14
- package/dist/scripts/src/components/HoverCard/HoverCard.js +3 -3
- package/dist/scripts/src/components/HoverCard/HovercardNative.js +1 -1
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +1208 -19
- package/dist/scripts/src/components/Icon/Icon.js +3 -3
- package/dist/scripts/src/components/Icon/IconNative.js +3 -3
- package/dist/scripts/src/components/IconInfoCard/IconInfoCard.js +5 -4
- package/dist/scripts/src/components/IconProvider.js +49 -49
- package/dist/scripts/src/components/Image/Image.js +4 -4
- package/dist/scripts/src/components/Image/ImageNative.js +2 -2
- package/dist/scripts/src/components/Input/InputAdornment.js +3 -3
- package/dist/scripts/src/components/Items/Items.js +3 -3
- package/dist/scripts/src/components/Link/Link.js +6 -6
- package/dist/scripts/src/components/Link/LinkNative.js +29 -11
- package/dist/scripts/src/components/List/List.js +14 -16
- package/dist/scripts/src/components/List/ListNative.js +193 -223
- package/dist/scripts/src/components/Logo/Logo.js +2 -2
- package/dist/scripts/src/components/Logo/LogoNative.js +2 -2
- package/dist/scripts/src/components/Markdown/Markdown.js +3 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +4 -4
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +5 -5
- package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +8 -8
- package/dist/scripts/src/components/NavGroup/NavGroup.js +6 -6
- package/dist/scripts/src/components/NavGroup/NavGroupNative.js +8 -8
- package/dist/scripts/src/components/NavLink/NavLink.js +5 -5
- package/dist/scripts/src/components/NavLink/NavLinkNative.js +6 -6
- package/dist/scripts/src/components/NavPanel/NavPanel.js +5 -5
- package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -6
- package/dist/scripts/src/components/NoResult/NoResult.js +4 -4
- package/dist/scripts/src/components/NoResult/NoResultNative.js +2 -2
- package/dist/scripts/src/components/NumberBox/NumberBox.js +4 -4
- package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +7 -7
- package/dist/scripts/src/components/OffCanvas/OffCanvas.js +5 -5
- package/dist/scripts/src/components/OffCanvas/OffCanvasNative.js +2 -2
- package/dist/scripts/src/components/Option/Option.js +4 -4
- package/dist/scripts/src/components/PageHeader/PageHeader.js +2 -2
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +2 -2
- package/dist/scripts/src/components/Pages/Pages.js +3 -3
- package/dist/scripts/src/components/Pages/PagesNative.js +2 -2
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +3 -3
- package/dist/scripts/src/components/PositionedContainer/PositionedContainerNative.js +1 -1
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +3 -3
- package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +1 -1
- package/dist/scripts/src/components/Queue/Queue.js +3 -3
- package/dist/scripts/src/components/Queue/QueueNative.js +5 -5
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +4 -4
- package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +6 -6
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +2 -2
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +3 -3
- package/dist/scripts/src/components/Redirect/Redirect.js +2 -2
- package/dist/scripts/src/components/Select/Select.js +7 -7
- package/dist/scripts/src/components/Select/SelectNative.js +36 -37
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +2 -2
- package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +2 -2
- package/dist/scripts/src/components/Slider/Slider.js +40 -25
- package/dist/scripts/src/components/Slider/SliderNative.js +98 -3
- package/dist/scripts/src/components/SlotItem.js +2 -2
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +3 -3
- package/dist/scripts/src/components/Spinner/Spinner.js +3 -3
- package/dist/scripts/src/components/Spinner/SpinnerNative.js +3 -4
- package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
- package/dist/scripts/src/components/Splitter/SplitterNative.js +3 -3
- package/dist/scripts/src/components/Stack/Stack.js +6 -6
- package/dist/scripts/src/components/Stack/StackNative.js +3 -3
- package/dist/scripts/src/components/StickyBox/StickyBox.js +3 -3
- package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +1 -1
- package/dist/scripts/src/components/Switch/Switch.js +6 -6
- package/dist/scripts/src/components/Table/Table.js +9 -9
- package/dist/scripts/src/components/Table/TableNative.js +15 -15
- package/dist/scripts/src/components/Table/useRowSelection.js +4 -4
- package/dist/scripts/src/components/TableHeader/TableHeader.js +2 -2
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +7 -5
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +29 -24
- package/dist/scripts/src/components/Tabs/TabContext.js +1 -1
- package/dist/scripts/src/components/Tabs/TabItem.js +3 -3
- package/dist/scripts/src/components/Tabs/TabItemNative.js +2 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +5 -5
- package/dist/scripts/src/components/Tabs/TabsNative.js +2 -2
- package/dist/scripts/src/components/Text/Text.js +5 -4
- package/dist/scripts/src/components/Text/TextNative.js +6 -7
- package/dist/scripts/src/components/TextArea/TextArea.js +4 -4
- package/dist/scripts/src/components/TextArea/TextAreaNative.js +6 -6
- package/dist/scripts/src/components/TextBox/TextBox.js +4 -4
- package/dist/scripts/src/components/TextBox/TextBoxNative.js +5 -5
- package/dist/scripts/src/components/Theme/Theme.js +2 -2
- package/dist/scripts/src/components/Theme/ThemeNative.js +7 -7
- package/dist/scripts/src/components/ThemeChanger/ThemeChanger.js +11 -11
- package/dist/scripts/src/components/ThemeChanger/ToneChangerButton.js +5 -5
- package/dist/scripts/src/components/Toggle/Toggle.js +4 -4
- package/dist/scripts/src/components/Toolbar/Toolbar.js +2 -2
- package/dist/scripts/src/components/ToolbarButton/ToolbarButton.js +2 -2
- package/dist/scripts/src/components/Tree/TreeComponent.js +4 -4
- package/dist/scripts/src/components/Tree/TreeNative.js +2 -2
- package/dist/scripts/src/components/TrendLabel/TrendLabel.js +2 -2
- package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +8 -8
- package/dist/scripts/src/components/abstractions.js +6 -2
- package/dist/scripts/src/components/container-helpers.js +2 -2
- package/dist/scripts/src/components-core/CompoundComponent.js +2 -2
- package/dist/scripts/src/components-core/Fragment.js +2 -2
- package/dist/scripts/src/components-core/InspectorContext.js +5 -5
- package/dist/scripts/src/components-core/LoaderComponent.js +6 -3
- package/dist/scripts/src/components-core/RestApiProxy.js +4 -4
- package/dist/scripts/src/components-core/Slot.js +2 -2
- package/dist/scripts/src/components-core/TableOfContentsContext.js +12 -2
- package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +2 -2
- package/dist/scripts/src/components-core/action/APICall.js +10 -10
- package/dist/scripts/src/components-core/action/FileDownloadAction.js +1 -1
- package/dist/scripts/src/components-core/action/FileUploadAction.js +3 -3
- package/dist/scripts/src/components-core/action/NavigateAction.js +1 -1
- package/dist/scripts/src/components-core/action/TimedAction.js +1 -1
- package/dist/scripts/src/components-core/component-hooks.js +2 -2
- package/dist/scripts/src/components-core/descriptorHelper.js +1 -0
- package/dist/scripts/src/components-core/loader/ApiLoader.js +5 -5
- package/dist/scripts/src/components-core/loader/DataLoader.js +18 -10
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +5 -5
- package/dist/scripts/src/components-core/loader/Loader.js +3 -3
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +5 -5
- package/dist/scripts/src/components-core/loader/PageableLoader.js +7 -4
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +21 -15
- package/dist/scripts/src/components-core/rendering/ComponentWrapper.js +2 -2
- package/dist/scripts/src/components-core/rendering/Container.js +16 -16
- package/dist/scripts/src/components-core/rendering/ContainerWrapper.js +1 -1
- package/dist/scripts/src/components-core/rendering/InvalidComponent.js +1 -1
- package/dist/scripts/src/components-core/rendering/StateContainer.js +15 -15
- package/dist/scripts/src/components-core/rendering/reducer.js +1 -1
- package/dist/scripts/src/components-core/rendering/renderChild.js +1 -1
- package/dist/scripts/src/components-core/rendering/valueExtractor.js +4 -4
- package/dist/scripts/src/components-core/script-runner/asyncProxy.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +2 -2
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +3 -3
- package/dist/scripts/src/components-core/script-runner/syncProxy.js +1 -1
- package/dist/scripts/src/components-core/script-runner/visitors.js +1 -1
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +10 -10
- package/dist/scripts/src/components-core/theming/extendThemeUtils.js +1 -1
- package/dist/scripts/src/components-core/theming/layout-resolver.js +356 -0
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -1
- package/dist/scripts/src/components-core/utils/DataLoaderQueryKeyGenerator.js +9 -3
- package/dist/scripts/src/components-core/utils/actionUtils.js +3 -3
- package/dist/scripts/src/components-core/utils/compound-utils.js +1 -1
- package/dist/scripts/src/components-core/utils/css-utils.js +2 -2
- package/dist/scripts/src/components-core/utils/extractParam.js +47 -3
- package/dist/scripts/src/components-core/utils/hooks.js +3 -3
- package/dist/scripts/src/parsers/scripting/modules.js +1 -1
- package/dist/scripts/src/parsers/style-parser/style-compiler.js +6 -2
- package/dist/scripts/src/parsers/xmlui-parser/transform.js +14 -15
- package/dist/scripts/src/syntax/grammar.tmLanguage.json +1 -1
- package/dist/scripts/src/syntax/textMate/xmlui.json +27 -93
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +5438 -4508
- package/dist/xmlui-metadata.umd.js +23 -18
- package/dist/xmlui-standalone.umd.js +204 -193
- package/dist/xmlui.d.ts +3 -2
- package/dist/xmlui.mjs +1 -1
- package/package.json +3 -3
- package/dist/scripts/package.json +0 -210
- package/dist/scripts/src/components/Chart/Chart.js +0 -24
- package/dist/scripts/src/components/Chart/ChartNative.js +0 -165
- package/dist/scripts/src/components/ModalDialog/ConfirmationModalContextProvider.js +0 -116
- package/dist/scripts/src/components/ModalDialog/Dialog.js +0 -20
- package/dist/scripts/src/components/Range/Range.js +0 -56
- package/dist/scripts/src/components/Range/RangeNative.js +0 -8
- package/dist/scripts/src/components/RawHtml/RawHtml.js +0 -39
- package/dist/scripts/src/components/RawHtml/RawHtmlNative.js +0 -13
- package/dist/scripts/src/components-core/StandaloneApp.js +0 -589
- package/dist/scripts/src/components-core/abstractions/standalone.js +0 -2
- package/dist/scripts/src/components-core/appContext/date-functions.js +0 -19
- package/dist/scripts/src/components-core/appContext/math-function.js +0 -27
- package/dist/scripts/src/components-core/appContext/misc-utils.js +0 -13
- package/dist/scripts/src/components-core/interception/ApiInterceptor.js +0 -198
- package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +0 -94
- package/dist/scripts/src/components-core/interception/Backend.js +0 -129
- package/dist/scripts/src/components-core/interception/Errors.js +0 -129
- package/dist/scripts/src/components-core/interception/InMemoryDb.js +0 -41
- package/dist/scripts/src/components-core/interception/IndexedDb.js +0 -205
- package/dist/scripts/src/components-core/interception/ReadonlyCollection.js +0 -145
- package/dist/scripts/src/components-core/interception/abstractions.js +0 -2
- package/dist/scripts/src/components-core/interception/apiInterceptorWorker.js +0 -46
- package/dist/scripts/src/components-core/interception/useApiInterceptorContext.js +0 -9
- package/dist/scripts/src/components-core/markup-check.js +0 -279
- package/dist/scripts/src/components-core/rendering/AppContent.js +0 -339
- package/dist/scripts/src/components-core/rendering/AppRoot.js +0 -55
- package/dist/scripts/src/components-core/rendering/AppWrapper.js +0 -44
- package/dist/scripts/src/components-core/utils/classnames.js +0 -58
- package/dist/scripts/src/components-core/utils/date-utils.js +0 -78
- package/dist/scripts/src/components-core/utils/request-params.js +0 -70
- package/dist/scripts/src/index.js +0 -66
package/dist/xmlui.d.ts
CHANGED
|
@@ -585,7 +585,7 @@ export declare type ComponentLike = ComponentDef | CompoundComponentDef;
|
|
|
585
585
|
* the metadata defined here in concert with the renderer object using the
|
|
586
586
|
* same metadata type.
|
|
587
587
|
*/
|
|
588
|
-
declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
|
|
588
|
+
export declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
|
|
589
589
|
status?: "stable" | "experimental" | "deprecated" | "in progress";
|
|
590
590
|
description?: string;
|
|
591
591
|
shortDescription?: string;
|
|
@@ -601,6 +601,7 @@ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMe
|
|
|
601
601
|
allowArbitraryProps?: boolean;
|
|
602
602
|
specializedFrom?: string;
|
|
603
603
|
docFolder?: string;
|
|
604
|
+
isHtmlTag?: boolean;
|
|
604
605
|
};
|
|
605
606
|
|
|
606
607
|
/**
|
|
@@ -768,7 +769,7 @@ declare type ContributesDefinition = {
|
|
|
768
769
|
*/
|
|
769
770
|
export declare function createComponentRenderer<TMd extends ComponentMetadata>(type: string, metadata: TMd, renderer: ComponentRendererFn<ComponentDef<TMd>>): ComponentRendererDef;
|
|
770
771
|
|
|
771
|
-
export declare function createMetadata<TProps extends Record<string, ComponentPropertyMetadata>, TEvents extends Record<string, ComponentPropertyMetadata>, TContextVars extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>>({ description, shortDescription, specializedFrom, status, props, events, contextVars, apis, nonVisual, opaque, themeVars, defaultThemeVars, toneSpecificThemeVars, allowArbitraryProps, docFolder, }: ComponentMetadata<TProps, TEvents, TContextVars, TApis>): ComponentMetadata<TProps, TEvents, TContextVars, TApis>;
|
|
772
|
+
export declare function createMetadata<TProps extends Record<string, ComponentPropertyMetadata>, TEvents extends Record<string, ComponentPropertyMetadata>, TContextVars extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>>({ description, shortDescription, specializedFrom, status, props, events, contextVars, apis, nonVisual, opaque, themeVars, defaultThemeVars, toneSpecificThemeVars, allowArbitraryProps, docFolder, isHtmlTag, }: ComponentMetadata<TProps, TEvents, TContextVars, TApis>): ComponentMetadata<TProps, TEvents, TContextVars, TApis>;
|
|
772
773
|
|
|
773
774
|
export declare function d(description: string, availableValues?: readonly PropertyValueDescription[], valueType?: PropertyValueType, defaultValue?: any, isValid?: IsValidFunction<any>): ComponentPropertyMetadata;
|
|
774
775
|
|
package/dist/xmlui.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, B as t, E as r, I as o, h as p, f as n, S as c, c as d, b as u, e as S, i as l, p as A, s as C, t as m, j as B, u as f } from "./index-
|
|
1
|
+
import { A as e, B as t, E as r, I as o, h as p, f as n, S as c, c as d, b as u, e as S, i as l, p as A, s as C, t as m, j as B, u as f } from "./index-C9zkAour.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as AppRoot,
|
|
4
4
|
t as Button,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "xmlui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.23",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start-test-bed": "cd src/testing/infrastructure && xmlui start",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"@eslint-community/regexpp": "4.10.0",
|
|
27
27
|
"@formkit/auto-animate": "0.7.0",
|
|
28
28
|
"@headlessui/react": "1.7.16",
|
|
29
|
-
"@microsoft/tsdoc-config": "0.17.0",
|
|
30
29
|
"@modyfi/vite-plugin-yaml": "1.1.0",
|
|
31
30
|
"@monaco-editor/react": "4.4.6",
|
|
32
31
|
"@nivo/bar": "0.87.0",
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
"@radix-ui/react-popover": "^1.1.2",
|
|
43
42
|
"@radix-ui/react-radio-group": "1.1.3",
|
|
44
43
|
"@radix-ui/react-select": "^2.1.2",
|
|
44
|
+
"@radix-ui/react-slider": "^1.2.3",
|
|
45
45
|
"@radix-ui/react-tabs": "1.1.0",
|
|
46
46
|
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
47
47
|
"@remix-run/react": "2.9.1",
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"shiki": "^1.14.1",
|
|
98
98
|
"ts-node": "10.9.1",
|
|
99
99
|
"use-context-selector": "1.4.1",
|
|
100
|
+
"virtua": "0.40.0",
|
|
100
101
|
"vite-plugin-lib-inject-css": "1.3.0",
|
|
101
102
|
"vite-plugin-svgr": "4.2.0",
|
|
102
103
|
"yargs": "17.7.2"
|
|
@@ -131,7 +132,6 @@
|
|
|
131
132
|
"rimraf": "6.0.1",
|
|
132
133
|
"rollup-plugin-visualizer": "5.8.3",
|
|
133
134
|
"serve": "14.2.0",
|
|
134
|
-
"typedoc": "^0.26.2",
|
|
135
135
|
"typescript": "5.7.3",
|
|
136
136
|
"vite": "5.4.9",
|
|
137
137
|
"vite-plugin-dts": "4.5.0",
|
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "xmlui",
|
|
3
|
-
"version": "0.7.21",
|
|
4
|
-
"sideEffects": false,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"start-test-bed": "cd src/testing/infrastructure && xmlui start",
|
|
7
|
-
"build:test-bed": "cd src/testing/infrastructure && xmlui build --build-mode=INLINE_ALL --withHostingMetaFiles",
|
|
8
|
-
"build:bin": "tsc -p tsconfig.bin.json",
|
|
9
|
-
"build:xmlui": "vite build --mode lib",
|
|
10
|
-
"build:xmlui-standalone": "vite build --mode standalone",
|
|
11
|
-
"build:xmlui-metadata": "vite build --mode metadata",
|
|
12
|
-
"build": "rimraf dist && tsc && npm run build:bin && npm run build:xmlui-metadata && npm run build:xmlui && npm run build:xmlui-standalone",
|
|
13
|
-
"test": "npm run test:unit",
|
|
14
|
-
"test:unit": "vitest run",
|
|
15
|
-
"test:e2e": "playwright test",
|
|
16
|
-
"test:e2e-smoke": "playwright test --project smoke",
|
|
17
|
-
"test:e2e-ui": "npm run test:e2e -- --ui",
|
|
18
|
-
"prepublishOnly": "clean-package && npm run build",
|
|
19
|
-
"postpublish": "clean-package restore",
|
|
20
|
-
"prepare-docs-data": "npm run build:xmlui-metadata",
|
|
21
|
-
"generate-docs": "node scripts/generate-docs/get-docs.mjs"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@azure/msal-browser": "2.30.0",
|
|
25
|
-
"@azure/msal-react": "1.4.9",
|
|
26
|
-
"@eslint-community/regexpp": "4.10.0",
|
|
27
|
-
"@formkit/auto-animate": "0.7.0",
|
|
28
|
-
"@headlessui/react": "1.7.16",
|
|
29
|
-
"@microsoft/tsdoc-config": "0.17.0",
|
|
30
|
-
"@modyfi/vite-plugin-yaml": "1.1.0",
|
|
31
|
-
"@monaco-editor/react": "4.4.6",
|
|
32
|
-
"@nivo/bar": "0.87.0",
|
|
33
|
-
"@nivo/core": "0.87.0",
|
|
34
|
-
"@nivo/geo": "0.87.0",
|
|
35
|
-
"@nivo/pie": "0.87.0",
|
|
36
|
-
"@popperjs/core": "2.11.6",
|
|
37
|
-
"@radix-ui/react-accordion": "^1.2.0",
|
|
38
|
-
"@radix-ui/react-alert-dialog": "^1.1.2",
|
|
39
|
-
"@radix-ui/react-dialog": "1.0.5",
|
|
40
|
-
"@radix-ui/react-dropdown-menu": "2.0.6",
|
|
41
|
-
"@radix-ui/react-hover-card": "1.0.7",
|
|
42
|
-
"@radix-ui/react-popover": "^1.1.2",
|
|
43
|
-
"@radix-ui/react-radio-group": "1.1.3",
|
|
44
|
-
"@radix-ui/react-select": "^2.1.2",
|
|
45
|
-
"@radix-ui/react-tabs": "1.1.0",
|
|
46
|
-
"@radix-ui/react-visually-hidden": "1.0.3",
|
|
47
|
-
"@remix-run/react": "2.9.1",
|
|
48
|
-
"@tanstack/react-query": "4.32.6",
|
|
49
|
-
"@tanstack/react-query-devtools": "4.32.6",
|
|
50
|
-
"@tanstack/react-table": "8.17.3",
|
|
51
|
-
"@tanstack/react-virtual": "3.10.8",
|
|
52
|
-
"@types/color": "3.0.6",
|
|
53
|
-
"@vitejs/plugin-react": "4.3.0",
|
|
54
|
-
"adm-zip": "0.5.10",
|
|
55
|
-
"apexcharts": "3.44.0",
|
|
56
|
-
"axios": "1.7.7",
|
|
57
|
-
"cmdk": "^1.0.4",
|
|
58
|
-
"color": "4.2.3",
|
|
59
|
-
"date-fns": "2.30.0",
|
|
60
|
-
"dexie": "3.2.4",
|
|
61
|
-
"dotenv": "16.3.1",
|
|
62
|
-
"downshift": "8.2.3",
|
|
63
|
-
"embla-carousel-autoplay": "^8.3.0",
|
|
64
|
-
"embla-carousel-react": "^8.3.0",
|
|
65
|
-
"emoji-picker-react": "4.4.10",
|
|
66
|
-
"glob": "7.2.0",
|
|
67
|
-
"immer": "9.0.16",
|
|
68
|
-
"lodash-es": "4.17.21",
|
|
69
|
-
"memoize-one": "6.0.0",
|
|
70
|
-
"monaco-editor": "0.34.1",
|
|
71
|
-
"msw": "2.0.1",
|
|
72
|
-
"oidc-client-ts": "2.1.0",
|
|
73
|
-
"react": "18.2.0",
|
|
74
|
-
"react-apexcharts": "1.4.1",
|
|
75
|
-
"react-currency-input-field": "3.6.9",
|
|
76
|
-
"react-datepicker": "4.25.0",
|
|
77
|
-
"react-day-picker": "8.10.1",
|
|
78
|
-
"react-dom": "18.2.0",
|
|
79
|
-
"react-dropzone": "14.2.3",
|
|
80
|
-
"react-helmet-async": "1.3.0",
|
|
81
|
-
"react-hot-toast": "2.4.1",
|
|
82
|
-
"react-icons": "4.8.0",
|
|
83
|
-
"react-imask": "7.1.3",
|
|
84
|
-
"react-markdown": "9.0.1",
|
|
85
|
-
"react-measure": "2.5.2",
|
|
86
|
-
"react-oidc-context": "2.2.0",
|
|
87
|
-
"react-popper": "2.3.0",
|
|
88
|
-
"react-resizable-panels": "2.0.19",
|
|
89
|
-
"react-router-dom": "6.23.0",
|
|
90
|
-
"react-select": "5.7.4",
|
|
91
|
-
"react-textarea-autosize": "8.5.3",
|
|
92
|
-
"react-virtualized-auto-sizer": "1.0.24",
|
|
93
|
-
"react-window": "1.8.10",
|
|
94
|
-
"recharts": "^2.15.1",
|
|
95
|
-
"sass": "1.55.0",
|
|
96
|
-
"scroll-into-view-if-needed": "^3.1.0",
|
|
97
|
-
"shiki": "^1.14.1",
|
|
98
|
-
"ts-node": "10.9.1",
|
|
99
|
-
"use-context-selector": "1.4.1",
|
|
100
|
-
"vite-plugin-lib-inject-css": "1.3.0",
|
|
101
|
-
"vite-plugin-svgr": "4.2.0",
|
|
102
|
-
"yargs": "17.7.2"
|
|
103
|
-
},
|
|
104
|
-
"devDependencies": {
|
|
105
|
-
"@babel/core": "7.19.6",
|
|
106
|
-
"@babel/preset-env": "7.19.4",
|
|
107
|
-
"@babel/preset-typescript": "7.18.6",
|
|
108
|
-
"@playwright/test": "^1.49.0",
|
|
109
|
-
"@types/adm-zip": "0.5.4",
|
|
110
|
-
"@types/glob": "7.2.0",
|
|
111
|
-
"@types/lodash-es": "4.17.6",
|
|
112
|
-
"@types/node": "18.11.5",
|
|
113
|
-
"@types/react": "18.2.23",
|
|
114
|
-
"@types/react-datepicker": "4.19.5",
|
|
115
|
-
"@types/react-dom": "18.2.8",
|
|
116
|
-
"@types/react-measure": "^2.0.8",
|
|
117
|
-
"@types/react-pdf": "5.7.2",
|
|
118
|
-
"@types/react-window": "1.8.8",
|
|
119
|
-
"@types/yargs": "17.0.31",
|
|
120
|
-
"@typescript-eslint/eslint-plugin": "6.7.4",
|
|
121
|
-
"@typescript-eslint/parser": "6.19.0",
|
|
122
|
-
"babel-loader": "8.2.5",
|
|
123
|
-
"clean-package": "2.2.0",
|
|
124
|
-
"eslint": "^8.57.0",
|
|
125
|
-
"eslint-import-resolver-typescript": "3.6.1",
|
|
126
|
-
"eslint-plugin-import": "2.28.1",
|
|
127
|
-
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
128
|
-
"eslint-plugin-react": "7.33.2",
|
|
129
|
-
"eslint-plugin-react-hooks": "4.6.0",
|
|
130
|
-
"prettier": "^3.3.3",
|
|
131
|
-
"rimraf": "6.0.1",
|
|
132
|
-
"rollup-plugin-visualizer": "5.8.3",
|
|
133
|
-
"serve": "14.2.0",
|
|
134
|
-
"typedoc": "^0.26.2",
|
|
135
|
-
"typescript": "5.7.3",
|
|
136
|
-
"vite": "5.4.9",
|
|
137
|
-
"vite-plugin-dts": "4.5.0",
|
|
138
|
-
"vitest": "^3.0.3"
|
|
139
|
-
},
|
|
140
|
-
"optionalDependencies": {
|
|
141
|
-
"@rollup/rollup-linux-x64-gnu": "4.20.0",
|
|
142
|
-
"@rollup/rollup-win32-x64-msvc": "4.20.0"
|
|
143
|
-
},
|
|
144
|
-
"files": [
|
|
145
|
-
"dist",
|
|
146
|
-
"src/styles"
|
|
147
|
-
],
|
|
148
|
-
"bin": {
|
|
149
|
-
"xmlui": "dist/scripts/bin/bootstrap.js"
|
|
150
|
-
},
|
|
151
|
-
"clean-package": {
|
|
152
|
-
"replace": {
|
|
153
|
-
"bin": {
|
|
154
|
-
"xmlui": "dist/scripts/bin/bootstrap.js"
|
|
155
|
-
},
|
|
156
|
-
"main": "./dist/xmlui.umd.js",
|
|
157
|
-
"module": "./dist/xmlui.mjs",
|
|
158
|
-
"types": "./dist/xmlui.d.ts",
|
|
159
|
-
"exports": {
|
|
160
|
-
".": {
|
|
161
|
-
"import": "./dist/xmlui.mjs",
|
|
162
|
-
"require": "./dist/xmlui.umd.js"
|
|
163
|
-
},
|
|
164
|
-
"./*.css": {
|
|
165
|
-
"import": "./dist/*.css",
|
|
166
|
-
"require": "./dist/*.css"
|
|
167
|
-
},
|
|
168
|
-
"./index.scss": {
|
|
169
|
-
"import": "./src/index.scss",
|
|
170
|
-
"require": "./src/index.scss"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
"main": "./dist/xmlui.umd.js",
|
|
176
|
-
"exports": {
|
|
177
|
-
".": {
|
|
178
|
-
"import": "./dist/xmlui.mjs",
|
|
179
|
-
"require": "./dist/xmlui.umd.js"
|
|
180
|
-
},
|
|
181
|
-
"./*.css": {
|
|
182
|
-
"import": "./dist/*.css",
|
|
183
|
-
"require": "./dist/*.css"
|
|
184
|
-
},
|
|
185
|
-
"./index.scss": {
|
|
186
|
-
"import": "./src/index.scss",
|
|
187
|
-
"require": "./src/index.scss"
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
"browserslist": {
|
|
191
|
-
"production": [
|
|
192
|
-
">0.2%",
|
|
193
|
-
"not dead",
|
|
194
|
-
"not op_mini all"
|
|
195
|
-
],
|
|
196
|
-
"development": [
|
|
197
|
-
"last 1 chrome version",
|
|
198
|
-
"last 1 firefox version",
|
|
199
|
-
"last 1 safari version"
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
"repository": {
|
|
203
|
-
"url": "https://github.com/xmlui-com/xmlui.git"
|
|
204
|
-
},
|
|
205
|
-
"msw": {
|
|
206
|
-
"workerDirectory": "src/testing/infrastructure"
|
|
207
|
-
},
|
|
208
|
-
"module": "./dist/xmlui.mjs",
|
|
209
|
-
"types": "./dist/xmlui.d.ts"
|
|
210
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,165 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,116 +0,0 @@
|
|
|
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.ConfirmationModalContextProvider = exports.useConfirm = void 0;
|
|
46
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
47
|
-
const react_1 = __importStar(require("react"));
|
|
48
|
-
const ButtonNative_1 = require("@components/Button/ButtonNative");
|
|
49
|
-
const StackNative_1 = require("@components/Stack/StackNative");
|
|
50
|
-
const Dialog_1 = require("./Dialog");
|
|
51
|
-
const ConfirmationModalContext = react_1.default.createContext({
|
|
52
|
-
confirm: (title, message, actionLabel) => __awaiter(void 0, void 0, void 0, function* () { return false; }),
|
|
53
|
-
});
|
|
54
|
-
const useConfirm = () => (0, react_1.useContext)(ConfirmationModalContext);
|
|
55
|
-
exports.useConfirm = useConfirm;
|
|
56
|
-
const ConfirmationModalContextProvider = ({ children }) => {
|
|
57
|
-
// State
|
|
58
|
-
const [showConfirmationModal, setShowConfirmationModal] = (0, react_1.useState)(false);
|
|
59
|
-
const [title, setTitle] = (0, react_1.useState)("Are you sure?");
|
|
60
|
-
const [message, setMessage] = (0, react_1.useState)();
|
|
61
|
-
const [buttons, setButtons] = (0, react_1.useState)([]);
|
|
62
|
-
// Refs and other
|
|
63
|
-
const resolver = (0, react_1.useRef)(null);
|
|
64
|
-
const buttonsRef = (0, react_1.useRef)(null);
|
|
65
|
-
(0, react_1.useEffect)(() => {
|
|
66
|
-
if (showConfirmationModal) {
|
|
67
|
-
setTimeout(() => {
|
|
68
|
-
var _a;
|
|
69
|
-
const focusable = (_a = buttonsRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll("button");
|
|
70
|
-
if (focusable) {
|
|
71
|
-
focusable[focusable.length - 1].focus();
|
|
72
|
-
}
|
|
73
|
-
}, 0);
|
|
74
|
-
}
|
|
75
|
-
}, [showConfirmationModal]);
|
|
76
|
-
const handleShow = (0, react_1.useCallback)((title, message, actionLabel) => __awaiter(void 0, void 0, void 0, function* () {
|
|
77
|
-
if (typeof title === "string") {
|
|
78
|
-
setTitle(title);
|
|
79
|
-
setButtons([
|
|
80
|
-
{
|
|
81
|
-
label: actionLabel || "Ok",
|
|
82
|
-
value: true,
|
|
83
|
-
},
|
|
84
|
-
]);
|
|
85
|
-
setMessage(message);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
setTitle(title.title);
|
|
89
|
-
setButtons(title.buttons);
|
|
90
|
-
setMessage(title.message);
|
|
91
|
-
}
|
|
92
|
-
setShowConfirmationModal(true);
|
|
93
|
-
return new Promise(function (resolve) {
|
|
94
|
-
resolver.current = resolve;
|
|
95
|
-
});
|
|
96
|
-
}), []);
|
|
97
|
-
const handleOk = (0, react_1.useCallback)((value) => {
|
|
98
|
-
resolver.current && resolver.current(value);
|
|
99
|
-
setShowConfirmationModal(false);
|
|
100
|
-
}, []);
|
|
101
|
-
const handleCancel = (0, react_1.useCallback)(() => {
|
|
102
|
-
resolver.current && resolver.current(false);
|
|
103
|
-
setShowConfirmationModal(false);
|
|
104
|
-
}, []);
|
|
105
|
-
const contextValue = (0, react_1.useMemo)(() => {
|
|
106
|
-
return {
|
|
107
|
-
confirm: handleShow,
|
|
108
|
-
};
|
|
109
|
-
}, [handleShow]);
|
|
110
|
-
return ((0, jsx_runtime_1.jsxs)(ConfirmationModalContext.Provider, { value: contextValue, children: [children, showConfirmationModal && ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { title: title, description: message, isOpen: true, onClose: handleCancel, buttons: (0, jsx_runtime_1.jsxs)(StackNative_1.Stack, { orientation: "horizontal", horizontalAlignment: "end", style: { width: "100%", gap: "1em" }, ref: buttonsRef, children: [(0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: "ghost", themeColor: "secondary", size: "sm", onClick: handleCancel, children: "Cancel" }), buttons.length > 1 ? (0, jsx_runtime_1.jsx)("div", { style: { flex: 1 } }) : undefined, buttons.map(({ label, value, variant = "solid", themeColor = "attention" }, index) => {
|
|
111
|
-
return ((0, jsx_runtime_1.jsx)(ButtonNative_1.Button, { variant: variant, themeColor: themeColor, size: "sm", type: "submit", onClick: () => {
|
|
112
|
-
handleOk(value);
|
|
113
|
-
}, children: label }, index));
|
|
114
|
-
})] }) }))] }));
|
|
115
|
-
};
|
|
116
|
-
exports.ConfirmationModalContextProvider = ConfirmationModalContextProvider;
|
|
@@ -1,20 +0,0 @@
|
|
|
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.Dialog = void 0;
|
|
7
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const TextNative_1 = require("../Text/TextNative");
|
|
9
|
-
const Dialog_module_scss_1 = __importDefault(require("./Dialog.module.scss"));
|
|
10
|
-
const ModalDialogNative_1 = require("./ModalDialogNative");
|
|
11
|
-
/**
|
|
12
|
-
* Dialog component that is customizable with action buttons. The children prop accepts React elements.
|
|
13
|
-
*
|
|
14
|
-
* Note that clicking outside of the dialog or pressing Escape will call the onClose function.
|
|
15
|
-
* Thus, if you want to stop that from firing, do so in the onClose function from outside.
|
|
16
|
-
*/
|
|
17
|
-
const Dialog = ({ title, description, children, isOpen, onClose, buttons, }) => {
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(ModalDialogNative_1.ModalDialog, { onClose: onClose, isInitiallyOpen: isOpen, title: title, children: [(0, jsx_runtime_1.jsxs)("div", { className: Dialog_module_scss_1.default.dialogContent, children: [(0, jsx_runtime_1.jsx)("div", { id: "dialogDesc", children: (0, jsx_runtime_1.jsx)(TextNative_1.Text, { children: description }) }), children] }), !!buttons && (0, jsx_runtime_1.jsx)("footer", { className: Dialog_module_scss_1.default.dialogActions, children: buttons })] }));
|
|
19
|
-
};
|
|
20
|
-
exports.Dialog = Dialog;
|