xmlui 0.7.21 → 0.7.22
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-D8M55a0M.mjs} +25 -10
- package/dist/{grammar.tmLanguage-DNepe_jP.mjs → grammar.tmLanguage-JAlHWPqw.mjs} +1 -1
- package/dist/{index-5NLXyjX0.mjs → index-BLoqesEB.mjs} +21343 -19576
- 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 +3 -3
- package/dist/scripts/src/components/Badge/BadgeNative.js +2 -2
- package/dist/scripts/src/components/Bookmark/Bookmark.js +2 -2
- package/dist/scripts/src/components/Bookmark/BookmarkNative.js +1 -1
- 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/Chart/Chart.js +2 -2
- package/dist/scripts/src/components/Chart/ChartNative.js +5 -6
- package/dist/scripts/src/components/Checkbox/Checkbox.js +6 -6
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +43 -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 +192 -94
- 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 +3 -3
- package/dist/scripts/src/components/Heading/HeadingNative.js +10 -11
- 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 +1226 -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 +97 -218
- 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 +39 -24
- 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 +3 -3
- package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +3 -3
- 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 +4 -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 +3 -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 +1 -1
- package/dist/scripts/src/components-core/XmluiCodeHighlighter.js +2 -2
- package/dist/scripts/src/components-core/action/APICall.js +4 -4
- 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 +3 -3
- 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 +3 -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 +4651 -3827
- package/dist/xmlui-metadata.umd.js +23 -18
- package/dist/xmlui-standalone.umd.js +194 -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/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
|
@@ -19,11 +19,11 @@ const vite_1 = require("vite");
|
|
|
19
19
|
const path_1 = __importDefault(require("path"));
|
|
20
20
|
const plugin_react_1 = __importDefault(require("@vitejs/plugin-react"));
|
|
21
21
|
const vite_plugin_lib_inject_css_1 = require("vite-plugin-lib-inject-css");
|
|
22
|
-
const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode }) {
|
|
22
|
+
const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode, mode }) {
|
|
23
23
|
const env = (0, vite_1.loadEnv)("production", process.cwd(), "");
|
|
24
24
|
const umdFileName = `${env.npm_package_name}.js`;
|
|
25
25
|
const esFileName = `${env.npm_package_name}.mjs`;
|
|
26
|
-
|
|
26
|
+
const config = {
|
|
27
27
|
esbuild: {
|
|
28
28
|
target: "es2020",
|
|
29
29
|
},
|
|
@@ -40,7 +40,11 @@ const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode
|
|
|
40
40
|
build: {
|
|
41
41
|
watch: watchMode ? {} : undefined,
|
|
42
42
|
sourcemap: watchMode ? "inline" : false,
|
|
43
|
-
lib: {
|
|
43
|
+
lib: mode === "metadata" ? {
|
|
44
|
+
entry: [path_1.default.resolve("meta", "componentsMetadata.ts")],
|
|
45
|
+
name: `${env.npm_package_name}-metadata`,
|
|
46
|
+
fileName: `${env.npm_package_name}-metadata`,
|
|
47
|
+
} : {
|
|
44
48
|
entry: [path_1.default.resolve("src", "index.tsx")],
|
|
45
49
|
formats: watchMode ? ["es"] : ["umd", "es"],
|
|
46
50
|
name: env.npm_package_name,
|
|
@@ -53,6 +57,7 @@ const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode
|
|
|
53
57
|
if (chunk.name === "index" && chunk.fileName === umdFileName) {
|
|
54
58
|
return `if(typeof window.xmlui !== "undefined"){window.xmlui.standalone.registerExtension(window['${env.npm_package_name}']);}`;
|
|
55
59
|
}
|
|
60
|
+
return "";
|
|
56
61
|
},
|
|
57
62
|
globals: {
|
|
58
63
|
react: "React",
|
|
@@ -63,6 +68,7 @@ const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode
|
|
|
63
68
|
},
|
|
64
69
|
},
|
|
65
70
|
plugins: [(0, plugin_react_1.default)(), (0, vite_plugin_lib_inject_css_1.libInjectCss)()],
|
|
66
|
-
}
|
|
71
|
+
};
|
|
72
|
+
yield (0, vite_1.build)((0, vite_1.defineConfig)(config));
|
|
67
73
|
});
|
|
68
74
|
exports.buildLib = buildLib;
|
|
@@ -102,7 +102,7 @@ function removeLeadingSlashForPath(path) {
|
|
|
102
102
|
}
|
|
103
103
|
return path;
|
|
104
104
|
}
|
|
105
|
-
const build = (_a) => __awaiter(void 0, [_a], void 0, function* ({ buildMode = "CONFIG_ONLY", flatDist = false, withMock = false, withHostingMetaFiles = false, withRelativeRoot = false,
|
|
105
|
+
const build = (_a) => __awaiter(void 0, [_a], void 0, function* ({ buildMode = "CONFIG_ONLY", flatDist = false, withMock = false, withHostingMetaFiles = false, withRelativeRoot = false, }) {
|
|
106
106
|
const flatDistUiPrefix = "ui_";
|
|
107
107
|
console.log("Building with options:", {
|
|
108
108
|
buildMode,
|
|
@@ -110,18 +110,15 @@ const build = (_a) => __awaiter(void 0, [_a], void 0, function* ({ buildMode = "
|
|
|
110
110
|
withMock,
|
|
111
111
|
withHostingMetaFiles,
|
|
112
112
|
withRelativeRoot,
|
|
113
|
-
withLegacyParser
|
|
114
113
|
});
|
|
115
114
|
yield (0, vite_1.build)(Object.assign(Object.assign({}, (0, viteConfig_1.getViteConfig)({
|
|
116
115
|
flatDist,
|
|
117
116
|
withRelativeRoot,
|
|
118
117
|
flatDistUiPrefix,
|
|
119
|
-
withLegacyParser,
|
|
120
118
|
})), { define: {
|
|
121
119
|
"process.env.VITE_BUILD_MODE": JSON.stringify(buildMode),
|
|
122
120
|
"process.env.VITE_DEV_MODE": false,
|
|
123
121
|
"process.env.VITE_MOCK_ENABLED": withMock,
|
|
124
|
-
"process.env.VITE_LEGACY_PARSER": withLegacyParser,
|
|
125
122
|
"process.env.VITE_APP_VERSION": JSON.stringify(process.env.VITE_APP_VERSION),
|
|
126
123
|
"process.env.VITE_USED_COMPONENTS_App": JSON.stringify(process.env.VITE_USED_COMPONENTS_App),
|
|
127
124
|
"process.env.VITE_USED_COMPONENTS_Chart": JSON.stringify(process.env.VITE_USED_COMPONENTS_Chart),
|
|
@@ -58,29 +58,29 @@ function getStringArg(arg, defaultValue) {
|
|
|
58
58
|
}
|
|
59
59
|
switch (script) {
|
|
60
60
|
case "build": {
|
|
61
|
-
const { flatDist, prod, buildMode, withMock, withHostingMetaFiles, withRelativeRoot
|
|
61
|
+
const { flatDist, prod, buildMode, withMock, withHostingMetaFiles, withRelativeRoot } = yargs_1.argv;
|
|
62
62
|
(0, build_1.build)({
|
|
63
63
|
buildMode: getStringArg(buildMode, prod ? "CONFIG_ONLY" : undefined),
|
|
64
64
|
withMock: getBoolArg(withMock, prod ? false : undefined),
|
|
65
65
|
withHostingMetaFiles: getBoolArg(withHostingMetaFiles, prod ? false : undefined),
|
|
66
66
|
withRelativeRoot: getBoolArg(withRelativeRoot, prod ? true : undefined),
|
|
67
67
|
flatDist: getBoolArg(flatDist, prod ? true : undefined),
|
|
68
|
-
withLegacyParser: getBoolArg(withLegacyParser),
|
|
69
68
|
});
|
|
70
69
|
break;
|
|
71
70
|
}
|
|
72
71
|
case "build-lib": {
|
|
73
|
-
const { watch } = yargs_1.argv;
|
|
74
|
-
(0, build_lib_1.buildLib)({ watchMode: getBoolArg(watch, false) });
|
|
72
|
+
const { watch, mode } = yargs_1.argv;
|
|
73
|
+
(0, build_lib_1.buildLib)({ watchMode: getBoolArg(watch, false), mode: getStringArg(mode, "") });
|
|
75
74
|
break;
|
|
76
75
|
}
|
|
77
76
|
case "start": {
|
|
78
|
-
const { port, withMock,
|
|
79
|
-
(0, start_1.start)({ port, withMock: getBoolArg(withMock),
|
|
77
|
+
const { port, withMock, proxy } = yargs_1.argv;
|
|
78
|
+
(0, start_1.start)({ port, withMock: getBoolArg(withMock), proxy });
|
|
80
79
|
break;
|
|
81
80
|
}
|
|
82
81
|
case "preview": {
|
|
83
|
-
|
|
82
|
+
const { proxy } = yargs_1.argv;
|
|
83
|
+
(0, preview_1.preview)({ proxy });
|
|
84
84
|
break;
|
|
85
85
|
}
|
|
86
86
|
case "zip-dist": {
|
|
@@ -12,9 +12,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.preview = void 0;
|
|
13
13
|
const vite_1 = require("vite");
|
|
14
14
|
const viteConfig_1 = require("./viteConfig");
|
|
15
|
-
const preview = () => __awaiter(void 0,
|
|
15
|
+
const preview = (_a) => __awaiter(void 0, [_a], void 0, function* ({ proxy }) {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
let proxyDef;
|
|
18
|
+
if (proxy) {
|
|
19
|
+
const splitProxy = proxy.split("->");
|
|
20
|
+
if (splitProxy.length !== 2) {
|
|
21
|
+
console.error("Invalid proxy definition. Example: /api->http://localhost:3000");
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
proxyDef = {
|
|
25
|
+
[splitProxy[0]]: {
|
|
26
|
+
target: splitProxy[1],
|
|
27
|
+
changeOrigin: true,
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const server = yield (0, vite_1.preview)(Object.assign(Object.assign({}, (0, viteConfig_1.getViteConfig)()), { server: {
|
|
33
|
+
proxy: proxyDef,
|
|
34
|
+
} }));
|
|
18
35
|
if (!server.httpServer) {
|
|
19
36
|
throw new Error("HTTP server not available");
|
|
20
37
|
}
|
|
@@ -12,10 +12,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.start = void 0;
|
|
13
13
|
const vite_1 = require("vite");
|
|
14
14
|
const viteConfig_1 = require("./viteConfig");
|
|
15
|
-
const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMock = true,
|
|
15
|
+
const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMock = true, proxy, }) {
|
|
16
16
|
console.log("Starting with options:", {
|
|
17
17
|
withMock,
|
|
18
|
-
withLegacyParser,
|
|
19
18
|
withProxy: proxy,
|
|
20
19
|
});
|
|
21
20
|
let proxyDef;
|
|
@@ -34,7 +33,7 @@ const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMoc
|
|
|
34
33
|
}
|
|
35
34
|
}
|
|
36
35
|
try {
|
|
37
|
-
const server = yield (0, vite_1.createServer)(Object.assign(Object.assign({}, (0, viteConfig_1.getViteConfig)({
|
|
36
|
+
const server = yield (0, vite_1.createServer)(Object.assign(Object.assign({}, (0, viteConfig_1.getViteConfig)({})), { server: {
|
|
38
37
|
port,
|
|
39
38
|
proxy: proxyDef,
|
|
40
39
|
}, define: {
|
|
@@ -43,7 +42,6 @@ const start = (_a) => __awaiter(void 0, [_a], void 0, function* ({ port, withMoc
|
|
|
43
42
|
"process.env.VITE_STANDALONE": process.env.VITE_STANDALONE,
|
|
44
43
|
"process.env.VITE_MOCK_ENABLED": withMock,
|
|
45
44
|
"process.env.VITE_INCLUDE_ALL_COMPONENTS": JSON.stringify("true"),
|
|
46
|
-
"process.env.VITE_LEGACY_PARSER": withLegacyParser,
|
|
47
45
|
} }));
|
|
48
46
|
// server.
|
|
49
47
|
if (!server.httpServer) {
|
|
@@ -43,18 +43,9 @@ const vite_plugin_svgr_1 = __importDefault(require("vite-plugin-svgr"));
|
|
|
43
43
|
const vite_plugin_yaml_1 = __importDefault(require("@modyfi/vite-plugin-yaml"));
|
|
44
44
|
const vite_ueml_plugin_1 = __importDefault(require("./vite-ueml-plugin"));
|
|
45
45
|
const path = __importStar(require("path"));
|
|
46
|
-
function getViteConfig({ flatDist = false, withRelativeRoot = false, flatDistUiPrefix = "",
|
|
46
|
+
function getViteConfig({ flatDist = false, withRelativeRoot = false, flatDistUiPrefix = "", } = {}) {
|
|
47
47
|
return (0, vite_1.defineConfig)({
|
|
48
|
-
plugins: [(0, plugin_react_1.default)(), (0, vite_plugin_svgr_1.default)(), (0, vite_plugin_yaml_1.default)(), (0, vite_ueml_plugin_1.default)({
|
|
49
|
-
resolve: {
|
|
50
|
-
alias: {
|
|
51
|
-
"@abstractions": path.resolve(__dirname, "../src/abstractions"),
|
|
52
|
-
"@core": path.resolve(__dirname, "../src/core"),
|
|
53
|
-
"@components-core": path.resolve(__dirname, "../src/components-core"),
|
|
54
|
-
"@components": path.resolve(__dirname, "../src/components"),
|
|
55
|
-
"@parsers": path.resolve(__dirname, "../src/parsers"),
|
|
56
|
-
},
|
|
57
|
-
},
|
|
48
|
+
plugins: [(0, plugin_react_1.default)(), (0, vite_plugin_svgr_1.default)(), (0, vite_plugin_yaml_1.default)(), (0, vite_ueml_plugin_1.default)({})],
|
|
58
49
|
base: withRelativeRoot ? "" : undefined,
|
|
59
50
|
// experimental: {
|
|
60
51
|
// renderBuiltUrl: (filename, {type, hostType, hostId}) =>{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createMetadata = createMetadata;
|
|
4
4
|
exports.d = d;
|
|
5
|
-
function createMetadata({ description, shortDescription, specializedFrom, status, props, events, contextVars, apis, nonVisual, opaque, themeVars, defaultThemeVars, toneSpecificThemeVars, allowArbitraryProps, docFolder, }) {
|
|
5
|
+
function createMetadata({ description, shortDescription, specializedFrom, status, props, events, contextVars, apis, nonVisual, opaque, themeVars, defaultThemeVars, toneSpecificThemeVars, allowArbitraryProps, docFolder, isHtmlTag, }) {
|
|
6
6
|
return {
|
|
7
7
|
description,
|
|
8
8
|
shortDescription,
|
|
@@ -19,6 +19,7 @@ function createMetadata({ description, shortDescription, specializedFrom, status
|
|
|
19
19
|
toneSpecificThemeVars,
|
|
20
20
|
allowArbitraryProps,
|
|
21
21
|
docFolder,
|
|
22
|
+
isHtmlTag,
|
|
22
23
|
};
|
|
23
24
|
}
|
|
24
25
|
function d(description, availableValues, valueType, defaultValue, isValid) {
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.apiCallRenderer = exports.APICallMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ComponentDefs_1 = require("
|
|
6
|
-
const renderers_1 = require("
|
|
5
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
7
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
7
8
|
const APICallNative_1 = require("./APICallNative");
|
|
8
|
-
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
9
9
|
const COMP = "APICall";
|
|
10
10
|
exports.APICallMd = (0, ComponentDefs_1.createMetadata)({
|
|
11
11
|
description: `\`${COMP}\` is used to mutate (create, update or delete) some data on the backend. It ` +
|
|
@@ -11,8 +11,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.APICallNative = APICallNative;
|
|
13
13
|
const react_1 = require("react");
|
|
14
|
-
const misc_1 = require("
|
|
15
|
-
const APICall_1 = require("
|
|
14
|
+
const misc_1 = require("../../components-core/utils/misc");
|
|
15
|
+
const APICall_1 = require("../../components-core/action/APICall");
|
|
16
16
|
function APICallNative({ registerComponentApi, node, uid }) {
|
|
17
17
|
const execute = (0, misc_1.useEvent)((executionContext, ...eventArgs) => __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
var _a, _b, _c, _d;
|
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.accordionComponentRenderer = exports.AccordionMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
9
8
|
const Accordion_module_scss_1 = __importDefault(require("./Accordion.module.scss"));
|
|
10
|
-
const
|
|
11
|
-
const
|
|
9
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
13
|
+
const abstractions_1 = require("../../components/abstractions");
|
|
12
14
|
const AccordionNative_1 = require("./AccordionNative");
|
|
13
|
-
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
14
|
-
const abstractions_1 = require("@components/abstractions");
|
|
15
15
|
const COMP = "Accordion";
|
|
16
16
|
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/accordion/
|
|
17
17
|
// Make the header focusable, handle ARIA attributes, and manage the state of the accordion.
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AccordionContext = void 0;
|
|
4
4
|
exports.useAccordionContext = useAccordionContext;
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const constants_1 = require("
|
|
6
|
+
const constants_1 = require("../../components-core/constants");
|
|
7
7
|
exports.AccordionContext = (0, react_1.createContext)({
|
|
8
8
|
expandedItems: null,
|
|
9
9
|
rotateExpanded: null,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.accordionItemComponentRenderer = exports.AccordionItemMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ComponentDefs_1 = require("
|
|
6
|
-
const
|
|
7
|
-
const metadata_helpers_1 = require("
|
|
8
|
-
const container_helpers_1 = require("
|
|
9
|
-
const
|
|
5
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
7
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
8
|
+
const container_helpers_1 = require("../../components/container-helpers");
|
|
9
|
+
const AccordionItemNative_1 = require("../../components/Accordion/AccordionItemNative");
|
|
10
10
|
const COMP = "AccordionItem";
|
|
11
11
|
exports.AccordionItemMd = (0, ComponentDefs_1.createMetadata)({
|
|
12
12
|
description: `\`${COMP}\` is a non-visual component describing a tab. Tabs component may use nested ` +
|
|
@@ -39,11 +39,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.AccordionItemComponent = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
41
|
const react_1 = require("react");
|
|
42
|
-
const AccordionContext_1 = require("@components/Accordion/AccordionContext");
|
|
43
|
-
const Accordion_module_scss_1 = __importDefault(require("@components/Accordion/Accordion.module.scss"));
|
|
44
|
-
const IconNative_1 = __importDefault(require("@components/Icon/IconNative"));
|
|
45
42
|
const RAccordion = __importStar(require("@radix-ui/react-accordion"));
|
|
46
43
|
const classnames_1 = __importDefault(require("classnames"));
|
|
44
|
+
const Accordion_module_scss_1 = __importDefault(require("../../components/Accordion/Accordion.module.scss"));
|
|
45
|
+
const AccordionContext_1 = require("../../components/Accordion/AccordionContext");
|
|
46
|
+
const IconNative_1 = __importDefault(require("../../components/Icon/IconNative"));
|
|
47
47
|
function defaultRenderer(header) {
|
|
48
48
|
return (0, jsx_runtime_1.jsx)("div", { children: header });
|
|
49
49
|
}
|
|
@@ -38,11 +38,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.AccordionComponent = void 0;
|
|
40
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
41
|
+
const react_1 = require("react");
|
|
41
42
|
const RAccordion = __importStar(require("@radix-ui/react-accordion"));
|
|
42
|
-
const AccordionContext_1 = require("@components/Accordion/AccordionContext");
|
|
43
43
|
const Accordion_module_scss_1 = __importDefault(require("./Accordion.module.scss"));
|
|
44
|
-
const
|
|
45
|
-
const
|
|
44
|
+
const constants_1 = require("../../components-core/constants");
|
|
45
|
+
const AccordionContext_1 = require("../../components/Accordion/AccordionContext");
|
|
46
46
|
exports.AccordionComponent = (0, react_1.forwardRef)(function AccordionComponent({ style, children, hideIcon = false, expandedIcon, collapsedIcon = "chevrondown", triggerPosition = "end", onDisplayDidChange = constants_1.noop, registerComponentApi, rotateExpanded = "180deg", }, forwardedRef) {
|
|
47
47
|
const [expandedItems, setExpandedItems] = (0, react_1.useState)([]);
|
|
48
48
|
const [itemElements, setItemElements] = (0, react_1.useState)(new Set());
|
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.alertComponentRenderer = exports.AlertMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
9
8
|
const Alert_module_scss_1 = __importDefault(require("./Alert.module.scss"));
|
|
10
|
-
const
|
|
11
|
-
const
|
|
9
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
+
const abstractions_1 = require("../../components/abstractions");
|
|
12
13
|
const AlertNative_1 = require("./AlertNative");
|
|
13
|
-
const abstractions_1 = require("@components/abstractions");
|
|
14
14
|
const COMP = "Alert";
|
|
15
15
|
// See reference implementation here: https://getbootstrap.com/docs/5.3/components/alerts/
|
|
16
16
|
exports.AlertMd = (0, ComponentDefs_1.createMetadata)({
|
|
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.appRenderer = exports.AppMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const ComponentDefs_1 = require("@abstractions/ComponentDefs");
|
|
9
|
-
const AppLayoutContext_1 = require("./AppLayoutContext");
|
|
10
8
|
const App_module_scss_1 = __importDefault(require("./App.module.scss"));
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
9
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
13
|
+
const AppLayoutContext_1 = require("./AppLayoutContext");
|
|
14
14
|
const AppNative_1 = require("./AppNative");
|
|
15
15
|
const COMP = "App";
|
|
16
16
|
exports.AppMd = (0, ComponentDefs_1.createMetadata)({
|
|
@@ -18,37 +18,36 @@ exports.App = App;
|
|
|
18
18
|
exports.getAppLayoutOrientation = getAppLayoutOrientation;
|
|
19
19
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
20
20
|
const react_1 = require("react");
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const react_3 = require("@remix-run/react");
|
|
21
|
+
const react_helmet_async_1 = require("react-helmet-async");
|
|
22
|
+
const react_2 = require("@remix-run/react");
|
|
24
23
|
const lodash_es_1 = require("lodash-es");
|
|
25
|
-
const classnames_1 = __importDefault(require("
|
|
24
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
26
25
|
const App_module_scss_1 = __importDefault(require("./App.module.scss"));
|
|
27
|
-
const AppContext_1 = require("
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
26
|
+
const AppContext_1 = require("../../components-core/AppContext");
|
|
27
|
+
const ScrollContext_1 = require("../../components-core/ScrollContext");
|
|
28
|
+
const hooks_1 = require("../../components-core/utils/hooks");
|
|
29
|
+
const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
30
|
+
const css_utils_1 = require("../../components-core/utils/css-utils");
|
|
31
|
+
const Sheet_1 = require("../../components/App/Sheet");
|
|
32
|
+
const AppHeaderNative_1 = require("../../components/AppHeader/AppHeaderNative");
|
|
33
|
+
const AppLayoutContext_1 = require("./AppLayoutContext");
|
|
35
34
|
function App({ children, style, layout, loggedInUser, scrollWholePage, noScrollbarGutters = false, onReady = lodash_es_1.noop, header, navPanel, footer, navPanelDef, logoContentDef, logo, logoDark, logoLight, defaultTone, defaultTheme, renderChild, name, }) {
|
|
36
35
|
const { getThemeVar } = (0, ThemeContext_1.useTheme)();
|
|
37
36
|
const { setActiveThemeTone, setActiveThemeId } = (0, ThemeContext_1.useThemes)();
|
|
38
|
-
const mounted = (0,
|
|
37
|
+
const mounted = (0, react_1.useRef)(false);
|
|
39
38
|
const layoutWithDefaultValue = layout || getThemeVar("layout-App") || "condensed-sticky";
|
|
40
39
|
const safeLayout = layoutWithDefaultValue === null || layoutWithDefaultValue === void 0 ? void 0 : layoutWithDefaultValue.trim().replace(/[\u2013\u2014\u2011]/g, "-"); //It replaces all – (–) and — (—) and non-breaking hyphen '‑' symbols with simple dashes (-).
|
|
41
40
|
const { setLoggedInUser, mediaSize } = (0, AppContext_1.useAppContext)();
|
|
42
41
|
const hasRegisteredHeader = header !== undefined;
|
|
43
42
|
const hasRegisteredNavPanel = navPanelDef !== undefined;
|
|
44
|
-
const pagesWrapperInnerStyle = (0,
|
|
43
|
+
const pagesWrapperInnerStyle = (0, react_1.useMemo)(() => {
|
|
45
44
|
const { padding, paddingLeft, paddingRight, paddingTop, paddingBottom } = style, rest = __rest(style, ["padding", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom"]);
|
|
46
45
|
return Object.assign(Object.assign({}, rest), { "--page-padding-left": padding || paddingLeft, "--page-padding-right": padding || paddingRight, "--page-padding-top": padding || paddingTop, "--page-padding-bottom": padding || paddingBottom });
|
|
47
46
|
}, [style]);
|
|
48
|
-
(0,
|
|
47
|
+
(0, react_1.useEffect)(() => {
|
|
49
48
|
setLoggedInUser(loggedInUser);
|
|
50
49
|
}, [loggedInUser, setLoggedInUser]);
|
|
51
|
-
(0,
|
|
50
|
+
(0, react_1.useEffect)(() => {
|
|
52
51
|
if (mounted.current)
|
|
53
52
|
return;
|
|
54
53
|
mounted.current = true;
|
|
@@ -62,7 +61,7 @@ function App({ children, style, layout, loggedInUser, scrollWholePage, noScrollb
|
|
|
62
61
|
mounted.current = false;
|
|
63
62
|
};
|
|
64
63
|
}, [defaultTone, defaultTheme, setActiveThemeTone, setActiveThemeId]);
|
|
65
|
-
(0,
|
|
64
|
+
(0, react_1.useEffect)(() => {
|
|
66
65
|
onReady();
|
|
67
66
|
}, [onReady]);
|
|
68
67
|
// --- We don't hide the nav panel if there's no header; in that case, we don't have a show drawer
|
|
@@ -70,45 +69,45 @@ function App({ children, style, layout, loggedInUser, scrollWholePage, noScrollb
|
|
|
70
69
|
// --- we couldn't show the NavPanel)
|
|
71
70
|
const navPanelVisible = mediaSize.largeScreen ||
|
|
72
71
|
(!hasRegisteredHeader && safeLayout !== "condensed" && safeLayout !== "condensed-sticky");
|
|
73
|
-
const scrollPageContainerRef = (0,
|
|
74
|
-
const noScrollPageContainerRef = (0,
|
|
72
|
+
const scrollPageContainerRef = (0, react_1.useRef)(null);
|
|
73
|
+
const noScrollPageContainerRef = (0, react_1.useRef)(null);
|
|
75
74
|
const scrollContainerRef = scrollWholePage ? scrollPageContainerRef : noScrollPageContainerRef;
|
|
76
|
-
const [footerHeight, setFooterHeight] = (0,
|
|
77
|
-
const [headerHeight, setHeaderHeight] = (0,
|
|
75
|
+
const [footerHeight, setFooterHeight] = (0, react_1.useState)(0);
|
|
76
|
+
const [headerHeight, setHeaderHeight] = (0, react_1.useState)(0);
|
|
78
77
|
const scrollbarWidth = (0, css_utils_1.useScrollbarWidth)();
|
|
79
|
-
const footerRef = (0,
|
|
80
|
-
const footerRefCallback = (0,
|
|
78
|
+
const footerRef = (0, react_1.useRef)();
|
|
79
|
+
const footerRefCallback = (0, react_1.useCallback)((element) => {
|
|
81
80
|
footerRef.current = element;
|
|
82
81
|
}, []);
|
|
83
|
-
const headerRef = (0,
|
|
84
|
-
const headerRefCallback = (0,
|
|
82
|
+
const headerRef = (0, react_1.useRef)();
|
|
83
|
+
const headerRefCallback = (0, react_1.useCallback)((element) => {
|
|
85
84
|
headerRef.current = element;
|
|
86
85
|
}, []);
|
|
87
|
-
(0, hooks_1.useResizeObserver)(footerRef, (0,
|
|
86
|
+
(0, hooks_1.useResizeObserver)(footerRef, (0, react_1.useCallback)((entries) => {
|
|
88
87
|
var _a, _b;
|
|
89
88
|
setFooterHeight((_b = (_a = entries === null || entries === void 0 ? void 0 : entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect) === null || _b === void 0 ? void 0 : _b.height);
|
|
90
89
|
}, []));
|
|
91
|
-
(0, hooks_1.useResizeObserver)(headerRef, (0,
|
|
90
|
+
(0, hooks_1.useResizeObserver)(headerRef, (0, react_1.useCallback)((entries) => {
|
|
92
91
|
var _a, _b;
|
|
93
92
|
setHeaderHeight((_b = (_a = entries === null || entries === void 0 ? void 0 : entries[0]) === null || _a === void 0 ? void 0 : _a.contentRect) === null || _b === void 0 ? void 0 : _b.height);
|
|
94
93
|
}, []));
|
|
95
|
-
const styleWithHelpers = (0,
|
|
94
|
+
const styleWithHelpers = (0, react_1.useMemo)(() => {
|
|
96
95
|
return {
|
|
97
96
|
"--header-height": !scrollWholePage ? 0 : headerHeight + "px",
|
|
98
97
|
"--footer-height": !scrollWholePage ? 0 : footerHeight + "px",
|
|
99
98
|
"--scrollbar-width": scrollbarWidth + "px",
|
|
100
99
|
};
|
|
101
100
|
}, [footerHeight, headerHeight, scrollWholePage, scrollbarWidth]);
|
|
102
|
-
const [drawerVisible, setDrawerVisible] = (0,
|
|
103
|
-
const location = (0,
|
|
104
|
-
const toggleDrawer = (0,
|
|
101
|
+
const [drawerVisible, setDrawerVisible] = (0, react_1.useState)(false);
|
|
102
|
+
const location = (0, react_2.useLocation)();
|
|
103
|
+
const toggleDrawer = (0, react_1.useCallback)(() => {
|
|
105
104
|
setDrawerVisible((prev) => !prev);
|
|
106
105
|
}, []);
|
|
107
106
|
(0, react_1.useLayoutEffect)(() => {
|
|
108
107
|
var _a;
|
|
109
108
|
(_a = scrollPageContainerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);
|
|
110
109
|
}, [location.pathname]);
|
|
111
|
-
const layoutContextValue = (0,
|
|
110
|
+
const layoutContextValue = (0, react_1.useMemo)(() => {
|
|
112
111
|
return {
|
|
113
112
|
hasRegisteredNavPanel,
|
|
114
113
|
hasRegisteredHeader,
|
|
@@ -141,12 +140,12 @@ function App({ children, style, layout, loggedInUser, scrollWholePage, noScrollb
|
|
|
141
140
|
navPanelDef,
|
|
142
141
|
logoContentDef,
|
|
143
142
|
]);
|
|
144
|
-
(0,
|
|
143
|
+
(0, react_1.useEffect)(() => {
|
|
145
144
|
if (navPanelVisible) {
|
|
146
145
|
setDrawerVisible(false);
|
|
147
146
|
}
|
|
148
147
|
}, [navPanelVisible]);
|
|
149
|
-
(0,
|
|
148
|
+
(0, react_1.useEffect)(() => {
|
|
150
149
|
setDrawerVisible(false);
|
|
151
150
|
}, [location, safeLayout]);
|
|
152
151
|
const wrapperBaseClasses = [
|
|
@@ -51,11 +51,11 @@ exports.SheetContent = exports.Sheet = void 0;
|
|
|
51
51
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
52
|
const React = __importStar(require("react"));
|
|
53
53
|
const SheetPrimitive = __importStar(require("@radix-ui/react-dialog"));
|
|
54
|
-
const classnames_1 = __importDefault(require("
|
|
55
|
-
const IconNative_1 = require("@components/Icon/IconNative");
|
|
56
|
-
const Sheet_module_scss_1 = __importDefault(require("./Sheet.module.scss"));
|
|
54
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
57
55
|
const react_visually_hidden_1 = require("@radix-ui/react-visually-hidden");
|
|
58
|
-
const
|
|
56
|
+
const Sheet_module_scss_1 = __importDefault(require("./Sheet.module.scss"));
|
|
57
|
+
const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
58
|
+
const IconNative_1 = require("../../components/Icon/IconNative");
|
|
59
59
|
//based on this: https://ui.shadcn.com/docs/components/sheet
|
|
60
60
|
const Sheet = SheetPrimitive.Root;
|
|
61
61
|
exports.Sheet = Sheet;
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.appHeaderComponentRenderer = exports.AppHeaderMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const AppHeader_module_scss_1 = __importDefault(require("./AppHeader.module.scss"));
|
|
9
|
-
const ComponentDefs_1 = require("
|
|
10
|
-
const renderers_1 = require("
|
|
11
|
-
const themeVars_1 = require("
|
|
12
|
-
const base_utils_1 = require("
|
|
9
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
+
const base_utils_1 = require("../../components-core/theming/themes/base-utils");
|
|
13
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
14
|
+
const SlotItem_1 = require("../../components/SlotItem");
|
|
13
15
|
const AppHeaderNative_1 = require("./AppHeaderNative");
|
|
14
|
-
const metadata_helpers_1 = require("@components/metadata-helpers");
|
|
15
|
-
const SlotItem_1 = require("@components/SlotItem");
|
|
16
16
|
const COMP = "AppHeader";
|
|
17
17
|
exports.AppHeaderMd = (0, ComponentDefs_1.createMetadata)({
|
|
18
18
|
status: "experimental",
|
|
@@ -7,16 +7,16 @@ exports.AppHeader = void 0;
|
|
|
7
7
|
exports.useLogoUrl = useLogoUrl;
|
|
8
8
|
exports.AppContextAwareAppHeader = AppContextAwareAppHeader;
|
|
9
9
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
10
|
-
const classnames_1 = __importDefault(require("
|
|
10
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
11
11
|
const AppHeader_module_scss_1 = __importDefault(require("./AppHeader.module.scss"));
|
|
12
|
-
const
|
|
13
|
-
const constants_1 = require("
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
12
|
+
const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
|
|
13
|
+
const constants_1 = require("../../components-core/constants");
|
|
14
|
+
const AppContext_1 = require("../../components-core/AppContext");
|
|
15
|
+
const IconNative_1 = require("../../components/Icon/IconNative");
|
|
16
|
+
const LogoNative_1 = require("../../components/Logo/LogoNative");
|
|
17
|
+
const AppLayoutContext_1 = require("../../components/App/AppLayoutContext");
|
|
18
|
+
const ButtonNative_1 = require("../../components/Button/ButtonNative");
|
|
19
|
+
const NavLinkNative_1 = require("../../components/NavLink/NavLinkNative");
|
|
20
20
|
function tryLoadImage(url, onLoaded, onError) {
|
|
21
21
|
const img = new Image();
|
|
22
22
|
img.src = url;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.appStateComponentRenderer = exports.AppStateMd = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const ComponentDefs_1 = require("
|
|
6
|
-
const renderers_1 = require("
|
|
5
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
6
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
7
7
|
const AppStateNative_1 = require("./AppStateNative");
|
|
8
8
|
const COMP = "AppState";
|
|
9
9
|
exports.AppStateMd = (0, ComponentDefs_1.createMetadata)({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AppState = AppState;
|
|
4
|
-
const hooks_1 = require("
|
|
5
|
-
const AppStateContext_1 = require("
|
|
4
|
+
const hooks_1 = require("../../components-core/utils/hooks");
|
|
5
|
+
const AppStateContext_1 = require("../../components/App/AppStateContext");
|
|
6
6
|
function AppState({ bucket = "default", updateState, initialValue, registerComponentApi, }) {
|
|
7
7
|
const registerAppState = (0, AppStateContext_1.useAppStateContextPart)((value) => value.registerAppState);
|
|
8
8
|
const update = (0, AppStateContext_1.useAppStateContextPart)((value) => value.update);
|
|
@@ -5,13 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.autoCompleteComponentRenderer = exports.AutoCompleteMd = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const metadata_helpers_1 = require("
|
|
14
|
-
const AutoCompleteNative_1 = require("
|
|
8
|
+
const AutoComplete_module_scss_1 = __importDefault(require("../../components/AutoComplete/AutoComplete.module.scss"));
|
|
9
|
+
const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
|
|
10
|
+
const renderers_1 = require("../../components-core/renderers");
|
|
11
|
+
const themeVars_1 = require("../../components-core/theming/themeVars");
|
|
12
|
+
const container_helpers_1 = require("../../components/container-helpers");
|
|
13
|
+
const metadata_helpers_1 = require("../../components/metadata-helpers");
|
|
14
|
+
const AutoCompleteNative_1 = require("../../components/AutoComplete/AutoCompleteNative");
|
|
15
15
|
const COMP = "AutoComplete";
|
|
16
16
|
exports.AutoCompleteMd = (0, ComponentDefs_1.createMetadata)({
|
|
17
17
|
description: "This component is a dropdown with a list of options. According to the " +
|