xmlui 0.9.50 → 0.9.52

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.
Files changed (170) hide show
  1. package/dist/lib/{apiInterceptorWorker-B6XqwxPF.mjs → apiInterceptorWorker-OagsYDXz.mjs} +3 -3
  2. package/dist/lib/{index-BpQ3DEFQ.mjs → index-BnpxPPve.mjs} +14387 -13003
  3. package/dist/lib/index.css +1 -1
  4. package/dist/lib/language-server-web-worker.mjs +1 -1
  5. package/dist/lib/language-server.mjs +1 -1
  6. package/dist/lib/{metadata-utils-QekhOD-W.mjs → metadata-utils-4EQ6kQIM.mjs} +7 -7
  7. package/dist/lib/{server-common-D4BcRpEl.mjs → server-common-C0cF2UTg.mjs} +4542 -4326
  8. package/dist/lib/{transform-DXcw0gGl.mjs → transform-CgRMkbb0.mjs} +1472 -1440
  9. package/dist/lib/xmlui-parser.d.ts +84 -62
  10. package/dist/lib/xmlui-parser.mjs +41 -49
  11. package/dist/lib/{xmlui-serializer-CAZCkpXP.mjs → xmlui-serializer-EDw51UFN.mjs} +10 -10
  12. package/dist/lib/xmlui.d.ts +17 -7
  13. package/dist/lib/xmlui.mjs +19 -18
  14. package/dist/metadata/apiInterceptorWorker-BOuioN57.mjs +15414 -0
  15. package/dist/metadata/collectedComponentMetadata-DbptBvJk.mjs +41019 -0
  16. package/dist/metadata/core-D3puiNN6.mjs +5771 -0
  17. package/dist/metadata/style.css +1 -1
  18. package/dist/metadata/wasm-DQxwEHae.mjs +7 -0
  19. package/dist/metadata/xmlui-metadata.mjs +3 -18371
  20. package/dist/metadata/xmlui-metadata.umd.js +547 -10
  21. package/dist/scripts/package.json +5 -7
  22. package/dist/scripts/src/components/APICall/APICall.js +13 -12
  23. package/dist/scripts/src/components/APICall/APICallNative.js +5 -0
  24. package/dist/scripts/src/components/Accordion/Accordion.js +4 -2
  25. package/dist/scripts/src/components/Accordion/AccordionItem.js +2 -2
  26. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +6 -2
  27. package/dist/scripts/src/components/App/App.js +25 -10
  28. package/dist/scripts/src/components/App/AppNative.js +9 -1
  29. package/dist/scripts/src/components/AppHeader/AppHeader.js +2 -2
  30. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +5 -2
  31. package/dist/scripts/src/components/AppState/AppState.js +2 -2
  32. package/dist/scripts/src/components/AppState/AppStateNative.js +5 -1
  33. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +8 -8
  34. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +16 -2
  35. package/dist/scripts/src/components/Avatar/Avatar.js +4 -2
  36. package/dist/scripts/src/components/Backdrop/Backdrop.js +2 -2
  37. package/dist/scripts/src/components/Badge/Badge.js +7 -5
  38. package/dist/scripts/src/components/Bookmark/Bookmark.js +5 -4
  39. package/dist/scripts/src/components/Card/Card.js +6 -4
  40. package/dist/scripts/src/components/ChangeListener/ChangeListener.js +2 -1
  41. package/dist/scripts/src/components/Charts/BarChart/BarChart.js +76 -0
  42. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +108 -0
  43. package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +59 -0
  44. package/dist/scripts/src/components/Charts/LabelList/LabelList.js +38 -0
  45. package/dist/scripts/src/components/Charts/LabelList/LabelListNative.js +24 -0
  46. package/dist/scripts/src/components/Charts/Legend/Legend.js +30 -0
  47. package/dist/scripts/src/components/Charts/Legend/LegendNative.js +64 -0
  48. package/dist/scripts/src/components/Charts/LineChart/LineChart.js +53 -0
  49. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +103 -0
  50. package/dist/scripts/src/components/Charts/PieChart/PieChart.js +58 -0
  51. package/dist/scripts/src/components/Charts/PieChart/PieChartNative.js +127 -0
  52. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.js +27 -0
  53. package/dist/scripts/src/components/Charts/utils/ChartProvider.js +65 -0
  54. package/dist/scripts/src/components/Charts/utils/abstractions.js +26 -0
  55. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +4 -4
  56. package/dist/scripts/src/components/CodeBlock/CodeBlockNative.js +5 -1
  57. package/dist/scripts/src/components/Column/Column.js +15 -9
  58. package/dist/scripts/src/components/Column/ColumnNative.js +5 -0
  59. package/dist/scripts/src/components/ComponentProvider.js +12 -6
  60. package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +4 -3
  61. package/dist/scripts/src/components/DatePicker/DatePicker.js +5 -3
  62. package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +1 -1
  63. package/dist/scripts/src/components/EmojiSelector/EmojiSelectorNative.js +7 -2
  64. package/dist/scripts/src/components/FileInput/FileInput.js +8 -9
  65. package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -2
  66. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +2 -2
  67. package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZoneNative.js +9 -2
  68. package/dist/scripts/src/components/Footer/Footer.js +1 -0
  69. package/dist/scripts/src/components/Footer/FooterNative.js +4 -1
  70. package/dist/scripts/src/components/Form/Form.js +9 -5
  71. package/dist/scripts/src/components/Form/FormNative.js +2 -1
  72. package/dist/scripts/src/components/FormItem/FormItem.js +25 -15
  73. package/dist/scripts/src/components/FormItem/FormItemNative.js +1 -0
  74. package/dist/scripts/src/components/FormItem/Validations.js +49 -33
  75. package/dist/scripts/src/components/Heading/Heading.js +5 -4
  76. package/dist/scripts/src/components/Heading/HeadingNative.js +1 -0
  77. package/dist/scripts/src/components/Icon/Icon.js +7 -5
  78. package/dist/scripts/src/components/Image/Image.js +19 -9
  79. package/dist/scripts/src/components/Image/ImageNative.js +7 -2
  80. package/dist/scripts/src/components/Items/Items.js +2 -0
  81. package/dist/scripts/src/components/Items/ItemsNative.js +5 -1
  82. package/dist/scripts/src/components/Link/Link.js +3 -4
  83. package/dist/scripts/src/components/Link/LinkNative.js +6 -2
  84. package/dist/scripts/src/components/List/List.js +12 -11
  85. package/dist/scripts/src/components/List/ListNative.js +10 -2
  86. package/dist/scripts/src/components/Logo/Logo.js +7 -0
  87. package/dist/scripts/src/components/Logo/LogoNative.js +6 -2
  88. package/dist/scripts/src/components/Markdown/Markdown.js +5 -3
  89. package/dist/scripts/src/components/Markdown/MarkdownNative.js +24 -76
  90. package/dist/scripts/src/components/Markdown/utils.js +23 -1
  91. package/dist/scripts/src/components/ModalDialog/ModalDialog.js +2 -2
  92. package/dist/scripts/src/components/ModalDialog/ModalDialogNative.js +7 -2
  93. package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -1
  94. package/dist/scripts/src/components/NavLink/NavLink.js +5 -7
  95. package/dist/scripts/src/components/NavLink/NavLinkNative.js +7 -2
  96. package/dist/scripts/src/components/NavPanel/NavPanel.js +7 -0
  97. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +6 -3
  98. package/dist/scripts/src/components/NestedApp/NestedApp.js +16 -4
  99. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +37 -34
  100. package/dist/scripts/src/components/NestedApp/defaultProps.js +10 -0
  101. package/dist/scripts/src/components/NoResult/NoResult.js +6 -2
  102. package/dist/scripts/src/components/NoResult/NoResultNative.js +8 -3
  103. package/dist/scripts/src/components/NumberBox/NumberBox.js +8 -6
  104. package/dist/scripts/src/components/NumberBox/NumberBox2.js +6 -6
  105. package/dist/scripts/src/components/NumberBox/NumberBox2Native.js +15 -2
  106. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +16 -2
  107. package/dist/scripts/src/components/Option/Option.js +10 -15
  108. package/dist/scripts/src/components/Option/OptionNative.js +18 -0
  109. package/dist/scripts/src/components/PageMetaTitle/PageMetaTilteNative.js +6 -2
  110. package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +4 -1
  111. package/dist/scripts/src/components/Pages/Pages.js +7 -3
  112. package/dist/scripts/src/components/Pages/PagesNative.js +5 -0
  113. package/dist/scripts/src/components/ProgressBar/ProgressBar.js +1 -1
  114. package/dist/scripts/src/components/ProgressBar/ProgressBarNative.js +5 -2
  115. package/dist/scripts/src/components/Queue/Queue.js +11 -6
  116. package/dist/scripts/src/components/Queue/QueueNative.js +7 -1
  117. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +5 -5
  118. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +9 -2
  119. package/dist/scripts/src/components/RadioGroup/RadioItem.js +8 -2
  120. package/dist/scripts/src/components/RadioGroup/RadioItemNative.js +6 -2
  121. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +4 -1
  122. package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapterNative.js +4 -0
  123. package/dist/scripts/src/components/Redirect/Redirect.js +8 -2
  124. package/dist/scripts/src/components/Select/Select.js +21 -12
  125. package/dist/scripts/src/components/Select/SelectNative.js +15 -2
  126. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +6 -3
  127. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +6 -2
  128. package/dist/scripts/src/components/Slider/Slider.js +28 -9
  129. package/dist/scripts/src/components/Slider/SliderNative.js +14 -3
  130. package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
  131. package/dist/scripts/src/components/Spinner/SpinnerNative.js +6 -2
  132. package/dist/scripts/src/components/Splitter/Splitter.js +6 -6
  133. package/dist/scripts/src/components/Splitter/SplitterNative.js +10 -2
  134. package/dist/scripts/src/components/Stack/Stack.js +4 -4
  135. package/dist/scripts/src/components/Stack/StackNative.js +8 -2
  136. package/dist/scripts/src/components/StickyBox/StickyBox.js +1 -1
  137. package/dist/scripts/src/components/StickyBox/StickyBoxNative.js +7 -1
  138. package/dist/scripts/src/components/Table/Table.js +15 -14
  139. package/dist/scripts/src/components/Table/TableNative.js +25 -9
  140. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +12 -3
  141. package/dist/scripts/src/components/TableOfContents/TableOfContentsNative.js +6 -2
  142. package/dist/scripts/src/components/Tabs/Tabs.js +2 -2
  143. package/dist/scripts/src/components/Tabs/TabsNative.js +7 -2
  144. package/dist/scripts/src/components/Text/Text.js +14 -12
  145. package/dist/scripts/src/components/Text/TextNative.js +7 -2
  146. package/dist/scripts/src/components/TextArea/TextArea.js +8 -5
  147. package/dist/scripts/src/components/TextArea/TextAreaNative.js +19 -2
  148. package/dist/scripts/src/components/TextBox/TextBox.js +5 -4
  149. package/dist/scripts/src/components/TextBox/TextBoxNative.js +14 -2
  150. package/dist/scripts/src/components/Theme/Theme.js +1 -1
  151. package/dist/scripts/src/components/Theme/ThemeNative.js +10 -14
  152. package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +18 -8
  153. package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +1 -1
  154. package/dist/scripts/src/components/TreeDisplay/TreeDisplayNative.js +2 -1
  155. package/dist/scripts/src/components/ValidationSummary/ValidationSummary.js +3 -57
  156. package/dist/scripts/src/components/ValidationSummary/ValidationSummaryNative.js +64 -0
  157. package/dist/scripts/src/components/metadata-helpers.js +11 -8
  158. package/dist/scripts/src/components-core/InspectorContext.js +0 -4
  159. package/dist/scripts/src/components-core/interception/ApiInterceptor.js +1 -1
  160. package/dist/scripts/src/components-core/interception/ApiInterceptorProvider.js +6 -2
  161. package/dist/scripts/src/components-core/loader/DataLoader.js +1 -1
  162. package/dist/scripts/src/components-core/loader/Loader.js +7 -3
  163. package/dist/scripts/src/components-core/theming/themes/palette.js +5 -4
  164. package/dist/scripts/src/components-core/theming/themes/root.js +5 -4
  165. package/dist/scripts/src/components-core/theming/transformThemeVars.js +1 -17
  166. package/dist/scripts/src/parsers/xmlui-parser/diagnostics.js +92 -48
  167. package/dist/scripts/src/parsers/xmlui-parser/parser.js +179 -189
  168. package/dist/standalone/xmlui-standalone.es.d.ts +0 -2580
  169. package/dist/standalone/xmlui-standalone.umd.js +275 -305
  170. package/package.json +5 -7
@@ -23,14 +23,17 @@ const AppRoot_1 = require("../../components-core/rendering/AppRoot");
23
23
  const lia_1 = require("react-icons/lia");
24
24
  const rx_1 = require("react-icons/rx");
25
25
  const xmlui_parser_1 = require("../../components-core/xmlui-parser");
26
+ const ApiInterceptorProvider_1 = require("../../components-core/interception/ApiInterceptorProvider");
26
27
  const ErrorBoundary_1 = require("../../components-core/rendering/ErrorBoundary");
27
28
  const Tooltip_1 = require("./Tooltip");
28
29
  const ThemeContext_1 = require("../../components-core/theming/ThemeContext");
29
- const constants_1 = require("../../components-core/constants");
30
30
  const utils_1 = require("./utils");
31
31
  const AppContext_1 = require("../../components-core/AppContext");
32
32
  const ComponentRegistryContext_1 = require("../ComponentRegistryContext");
33
33
  const IndexerContext_1 = require("../App/IndexerContext");
34
+ const useApiInterceptorContext_1 = require("../../components-core/interception/useApiInterceptorContext");
35
+ const constants_1 = require("../../components-core/constants");
36
+ const defaultProps_1 = require("./defaultProps");
34
37
  function LazyNestedApp(props) {
35
38
  const [shouldRender, setShouldRender] = (0, react_1.useState)(false);
36
39
  (0, react_1.useEffect)(() => {
@@ -50,7 +53,7 @@ function IndexAwareNestedApp(props) {
50
53
  }
51
54
  return (0, jsx_runtime_1.jsx)(LazyNestedApp, Object.assign({}, props));
52
55
  }
53
- function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, activeTheme, activeTone, title, height, allowPlaygroundPopup = true, withFrame = true, }) {
56
+ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, activeTheme, activeTone, title, height, allowPlaygroundPopup = defaultProps_1.defaultProps.allowPlaygroundPopup, withFrame = defaultProps_1.defaultProps.withFrame, playgroundId, }) {
54
57
  const rootRef = (0, react_1.useRef)(null);
55
58
  const shadowRef = (0, react_1.useRef)(null);
56
59
  const contentRootRef = (0, react_1.useRef)(null);
@@ -60,30 +63,28 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
60
63
  const toneToApply = activeTone || (config === null || config === void 0 ? void 0 : config.defaultTone) || (theme === null || theme === void 0 ? void 0 : theme.activeThemeTone);
61
64
  const { appGlobals } = (0, AppContext_1.useAppContext)();
62
65
  const componentRegistry = (0, ComponentRegistryContext_1.useComponentRegistry)();
63
- // const [apiWorker, setApiWorker] = useState(undefined);
64
- // useEffect(() => {
65
- // let worker;
66
- // (async function () {
67
- // const { setupWorker } = await import("msw/browser");
68
- // worker = setupWorker();
69
- // worker.start({
70
- // onUnhandledRequest: "bypass",
71
- // quiet: true,
72
- // });
73
- // setApiWorker(worker);
74
- // })();
75
- // return () => worker?.stop();
76
- // }, []);
77
- // console.log("apiWorker", apiWorker);
78
- // const mock = useMemo(() => {
79
- // return api
80
- // ? {
81
- // type: "in-memory",
82
- // ...api,
83
- // apiUrl: "/api",
84
- // }
85
- // : undefined;
86
- // }, [api]);
66
+ const { interceptorWorker } = (0, useApiInterceptorContext_1.useApiInterceptorContext)();
67
+ //TODO illesg: we should come up with something to make sure that nestedApps doesn't overwrite each other's mocked api endpoints
68
+ // disabled for now, as it messes up the paths of not mocked APIs (e.g. resources/{staticJsonfiles})
69
+ //const safeId = playgroundId || nestedAppId;
70
+ //const apiUrl = api ? `/${safeId.replaceAll(":", "")}` : '';
71
+ const apiUrl = '';
72
+ const mock = (0, react_1.useMemo)(() => {
73
+ if (!api) {
74
+ return undefined;
75
+ }
76
+ let apiObject = api;
77
+ if (typeof api === "string") {
78
+ try {
79
+ apiObject = JSON.parse(api.replaceAll("\n", " "));
80
+ }
81
+ catch (e) {
82
+ console.error("Failed to parse API definition", e);
83
+ return undefined;
84
+ }
85
+ }
86
+ return Object.assign(Object.assign({}, apiObject), { type: "in-memory" });
87
+ }, [api]);
87
88
  //console.log("mock", mock);
88
89
  const useHashBasedRouting = (appGlobals === null || appGlobals === void 0 ? void 0 : appGlobals.useHashBasedRouting) || true;
89
90
  const openPlayground = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
@@ -96,6 +97,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
96
97
  themes: [],
97
98
  defaultTheme: activeTheme,
98
99
  },
100
+ api: api,
99
101
  },
100
102
  options: {
101
103
  fixedTheme: false,
@@ -109,7 +111,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
109
111
  };
110
112
  const appQueryString = yield (0, utils_1.createQueryString)(JSON.stringify(data));
111
113
  window.open(useHashBasedRouting ? `/#/playground#${appQueryString}` : `/playground#${appQueryString}`, "_blank");
112
- }), [app, components, title, activeTheme, activeTone, useHashBasedRouting]);
114
+ }), [app, components, title, activeTheme, api, activeTone, useHashBasedRouting]);
113
115
  (0, react_1.useEffect)(() => {
114
116
  var _a;
115
117
  if (!shadowRef.current && rootRef.current) {
@@ -141,16 +143,16 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
141
143
  }
142
144
  return component;
143
145
  });
144
- let globalProps = Object.assign(Object.assign({ name: config === null || config === void 0 ? void 0 : config.name }, ((config === null || config === void 0 ? void 0 : config.appGlobals) || {})), { apiUrl: "" });
146
+ let globalProps = Object.assign(Object.assign({ name: config === null || config === void 0 ? void 0 : config.name }, ((config === null || config === void 0 ? void 0 : config.appGlobals) || {})), { apiUrl });
145
147
  // css variables are leaking into to shadow dom, so we reset them here
146
148
  const themeVarReset = {};
147
149
  Object.keys(theme.themeStyles).forEach((key) => {
148
150
  themeVarReset[key] = "initial";
149
151
  });
150
- let nestedAppRoot = ((0, jsx_runtime_1.jsx)("div", { style: Object.assign({ height }, themeVarReset), children: (0, jsx_runtime_1.jsx)(AppRoot_1.AppRoot, { previewMode: true, standalone: true, trackContainerHeight: height ? "fixed" : "auto", node: component, globalProps: globalProps, defaultTheme: activeTheme || (config === null || config === void 0 ? void 0 : config.defaultTheme), defaultTone: toneToApply, contributes: {
151
- compoundComponents,
152
- themes: config === null || config === void 0 ? void 0 : config.themes,
153
- }, resources: config === null || config === void 0 ? void 0 : config.resources, extensionManager: componentRegistry.getExtensionManager() }, `app-${nestedAppId}-${refreshVersion}`) }));
152
+ let nestedAppRoot = ((0, jsx_runtime_1.jsx)(ApiInterceptorProvider_1.ApiInterceptorProvider, { interceptor: mock, apiWorker: interceptorWorker, children: (0, jsx_runtime_1.jsx)("div", { style: Object.assign({ height }, themeVarReset), children: (0, jsx_runtime_1.jsx)(AppRoot_1.AppRoot, { previewMode: true, standalone: true, trackContainerHeight: height ? "fixed" : "auto", node: component, globalProps: globalProps, defaultTheme: activeTheme || (config === null || config === void 0 ? void 0 : config.defaultTheme), defaultTone: toneToApply, contributes: {
153
+ compoundComponents,
154
+ themes: config === null || config === void 0 ? void 0 : config.themes,
155
+ }, resources: config === null || config === void 0 ? void 0 : config.resources, extensionManager: componentRegistry.getExtensionManager() }, `app-${nestedAppId}-${refreshVersion}`) }) }));
154
156
  (_a = contentRootRef.current) === null || _a === void 0 ? void 0 : _a.render((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { node: component, children: withFrame ? ((0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.nestedAppContainer, children: [(0, jsx_runtime_1.jsxs)("div", { className: NestedApp_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsx)("span", { className: NestedApp_module_scss_1.default.headerText, children: title }), (0, jsx_runtime_1.jsx)("div", { className: NestedApp_module_scss_1.default.spacer }), allowPlaygroundPopup && ((0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
155
157
  openPlayground();
156
158
  }, children: (0, jsx_runtime_1.jsx)(rx_1.RxOpenInNewWindow, {}) }), label: "Edit code in new window" })), (0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { trigger: (0, jsx_runtime_1.jsx)("button", { className: NestedApp_module_scss_1.default.headerButton, onClick: () => {
@@ -159,7 +161,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
159
161
  }, [
160
162
  activeTheme,
161
163
  allowPlaygroundPopup,
162
- // apiWorker,
164
+ interceptorWorker,
163
165
  app,
164
166
  componentRegistry,
165
167
  components,
@@ -169,7 +171,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
169
171
  config === null || config === void 0 ? void 0 : config.resources,
170
172
  config === null || config === void 0 ? void 0 : config.themes,
171
173
  height,
172
- // mock,
174
+ mock,
173
175
  nestedAppId,
174
176
  openPlayground,
175
177
  refreshVersion,
@@ -177,6 +179,7 @@ function NestedApp({ api, app, components = constants_1.EMPTY_ARRAY, config, act
177
179
  title,
178
180
  toneToApply,
179
181
  withFrame,
182
+ apiUrl,
180
183
  ]);
181
184
  const mountedRef = (0, react_1.useRef)(false);
182
185
  (0, react_1.useEffect)(() => {
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultProps = void 0;
4
+ // Default props for NestedApp component
5
+ const constants_1 = require("../../components-core/constants");
6
+ exports.defaultProps = {
7
+ allowPlaygroundPopup: true,
8
+ withFrame: true,
9
+ components: constants_1.EMPTY_ARRAY
10
+ };
@@ -17,11 +17,15 @@ exports.NoResultMd = (0, ComponentDefs_1.createMetadata)({
17
17
  `resulted in no (zero) items.`,
18
18
  props: {
19
19
  label: (0, metadata_helpers_1.dLabel)(),
20
- icon: (0, ComponentDefs_1.d)(`This property defines the icon to display with the component.`),
20
+ icon: {
21
+ description: `This property defines the icon to display with the component.`,
22
+ valueType: "string",
23
+ defaultValue: NoResultNative_1.defaultProps.icon,
24
+ },
21
25
  hideIcon: {
22
26
  description: `This boolean property indicates if the icon should be hidden.`,
23
27
  valueType: "boolean",
24
- defaultValue: "false",
28
+ defaultValue: NoResultNative_1.defaultProps.hideIcon,
25
29
  },
26
30
  },
27
31
  themeVars: (0, themeVars_1.parseScssVar)(NoResult_module_scss_1.default.themeVars),
@@ -3,11 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.NoResult = void 0;
6
+ exports.NoResult = exports.defaultProps = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const NoResult_module_scss_1 = __importDefault(require("./NoResult.module.scss"));
10
10
  const IconNative_1 = require("../Icon/IconNative");
11
- exports.NoResult = (0, react_1.forwardRef)(function NoResult({ label, icon, hideIcon = false, style }, forwardedRef) {
12
- return ((0, jsx_runtime_1.jsxs)("div", { className: NoResult_module_scss_1.default.wrapper, style: style, ref: forwardedRef, children: [!hideIcon && (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: icon !== null && icon !== void 0 ? icon : "noresult", className: NoResult_module_scss_1.default.icon }), label] }));
11
+ // Default props for the NoResult component
12
+ exports.defaultProps = {
13
+ hideIcon: false,
14
+ icon: "noresult"
15
+ };
16
+ exports.NoResult = (0, react_1.forwardRef)(function NoResult({ label, icon = exports.defaultProps.icon, hideIcon = exports.defaultProps.hideIcon, style }, forwardedRef) {
17
+ return ((0, jsx_runtime_1.jsxs)("div", { className: NoResult_module_scss_1.default.wrapper, style: style, ref: forwardedRef, children: [!hideIcon && (0, jsx_runtime_1.jsx)(IconNative_1.Icon, { name: icon, className: NoResult_module_scss_1.default.icon }), label] }));
13
18
  });
@@ -41,10 +41,10 @@ exports.NumberBoxMd = (0, ComponentDefs_1.createMetadata)({
41
41
  valueType: "boolean",
42
42
  defaultValue: true,
43
43
  },
44
- spinnerUpIcon: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} spinner for incrementing values. You can change ` +
44
+ spinnerUpIcon: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} spinner for incrementing values. You can change ` +
45
45
  `the default icon for all ${COMP} instances with the "icon.spinnerUp:NumberBox" declaration in the ` +
46
46
  `app configuration file.`),
47
- spinnerDownIcon: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} spinner for decrementing values. You can change ` +
47
+ spinnerDownIcon: (0, ComponentDefs_1.d)(`Allows setting an alternate icon displayed in the ${COMP} spinner for decrementing values. You can change ` +
48
48
  `the default icon for all ${COMP} instances with the "icon.spinnerDown:NumberBox" declaration in the ` +
49
49
  `app configuration file.`),
50
50
  step: {
@@ -64,10 +64,12 @@ exports.NumberBoxMd = (0, ComponentDefs_1.createMetadata)({
64
64
  valueType: "boolean",
65
65
  defaultValue: false,
66
66
  },
67
- minValue: (0, ComponentDefs_1.d)(`The minimum value the input field allows. Can be a float or an integer if ` +
68
- `[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer.`),
69
- maxValue: (0, ComponentDefs_1.d)(`The maximum value the input field allows. Can be a float or an integer if ` +
70
- `[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer.`),
67
+ minValue: (0, ComponentDefs_1.d)("The minimum value the input field allows. Can be a float or an integer if " +
68
+ "[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer." +
69
+ "If not set, no minimum value check is done."),
70
+ maxValue: (0, ComponentDefs_1.d)("The maximum value the input field allows. Can be a float or an integer if " +
71
+ "[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer." +
72
+ "If not set, no maximum value check is done."),
71
73
  },
72
74
  events: {
73
75
  gotFocus: (0, metadata_helpers_1.dGotFocus)(COMP),
@@ -20,7 +20,7 @@ exports.NumberBoxMd2 = (0, ComponentDefs_1.createMetadata)({
20
20
  placeholder: (0, metadata_helpers_1.dPlaceholder)(),
21
21
  initialValue: (0, metadata_helpers_1.dInitialValue)(),
22
22
  label: (0, metadata_helpers_1.dLabel)(),
23
- labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),
23
+ labelPosition: (0, metadata_helpers_1.dLabelPosition)(NumberBox2Native_1.defaultProps.labelPosition),
24
24
  labelWidth: (0, metadata_helpers_1.dLabelWidth)(COMP),
25
25
  labelBreak: (0, metadata_helpers_1.dLabelBreak)(COMP),
26
26
  maxLength: (0, metadata_helpers_1.dMaxLength)(),
@@ -36,7 +36,7 @@ exports.NumberBoxMd2 = (0, ComponentDefs_1.createMetadata)({
36
36
  hasSpinBox: {
37
37
  description: `This boolean prop shows (\`true\`) or hides (\`false\`) the spinner buttons for the input field.`,
38
38
  valueType: "boolean",
39
- defaultValue: true,
39
+ defaultValue: NumberBox2Native_1.defaultProps.hasSpinBox,
40
40
  },
41
41
  spinnerUpIcon: (0, ComponentDefs_1.d)(`Allows setting the icon displayed in the ${COMP} spinner for incrementing values. You can change ` +
42
42
  `the default icon for all ${COMP} instances with the "icon.spinnerUp:NumberBox" declaration in the ` +
@@ -47,25 +47,25 @@ exports.NumberBoxMd2 = (0, ComponentDefs_1.createMetadata)({
47
47
  step: {
48
48
  description: `This prop governs how big the step when clicking on the spinner of the field.`,
49
49
  valueType: "number",
50
- defaultValue: 1,
50
+ defaultValue: NumberBox2Native_1.defaultProps.step,
51
51
  },
52
52
  integersOnly: {
53
53
  description: `This boolean property signs whether the input field accepts integers only (\`true\`) ` +
54
54
  `or not (\`false\`).`,
55
55
  valueType: "boolean",
56
- defaultValue: false,
56
+ defaultValue: NumberBox2Native_1.defaultProps.integersOnly,
57
57
  },
58
58
  maxFractionDigits: {
59
59
  description: `This prop sets the maximum number of decimal places allowed in the input field. ` +
60
60
  `If the number of decimal places is greater than this value, the value will be truncated to the maximum allowed decimal places. `,
61
61
  valueType: "number",
62
- defaultValue: 3,
62
+ defaultValue: NumberBox2Native_1.defaultProps.maxFractionDigits,
63
63
  },
64
64
  zeroOrPositive: {
65
65
  description: `This boolean property determines whether the input value can only be 0 or positive numbers ` +
66
66
  `(\`true\`) or also negative (\`false\`).`,
67
67
  valueType: "boolean",
68
- defaultValue: false,
68
+ defaultValue: NumberBox2Native_1.defaultProps.zeroOrPositive,
69
69
  },
70
70
  minValue: (0, ComponentDefs_1.d)(`The minimum value the input field allows. Can be a float or an integer if ` +
71
71
  `[\`integersOnly\`](#integersonly) is set to \`false\`, otherwise it can only be an integer.`),
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.NumberBox2 = void 0;
39
+ exports.NumberBox2 = exports.defaultProps = void 0;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const react_1 = __importStar(require("react"));
42
42
  const classnames_1 = __importDefault(require("classnames"));
@@ -50,7 +50,20 @@ const ButtonNative_1 = require("../Button/ButtonNative");
50
50
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
51
51
  const lodash_es_1 = require("lodash-es");
52
52
  const number_1 = require("@internationalized/number");
53
- exports.NumberBox2 = (0, react_1.forwardRef)(function NumberBox2({ id, style, value, initialValue, zeroOrPositive = false, min = zeroOrPositive ? 0 : -numberbox_abstractions_1.NUMBERBOX_MAX_VALUE, max = numberbox_abstractions_1.NUMBERBOX_MAX_VALUE, maxFractionDigits = 3, enabled = true, placeholder, step, integersOnly = false, validationStatus = "none", hasSpinBox = true, updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, startText, startIcon, endText, endIcon, spinnerUpIcon, spinnerDownIcon, autoFocus, readOnly, required, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
53
+ // Default props for NumberBox2 component
54
+ exports.defaultProps = {
55
+ zeroOrPositive: false,
56
+ min: -numberbox_abstractions_1.NUMBERBOX_MAX_VALUE,
57
+ max: numberbox_abstractions_1.NUMBERBOX_MAX_VALUE,
58
+ maxFractionDigits: 3,
59
+ enabled: true,
60
+ integersOnly: false,
61
+ validationStatus: "none",
62
+ hasSpinBox: true,
63
+ step: 1,
64
+ labelPosition: "top",
65
+ };
66
+ exports.NumberBox2 = (0, react_1.forwardRef)(function NumberBox2({ id, style, value, initialValue, zeroOrPositive = exports.defaultProps.zeroOrPositive, min = zeroOrPositive ? 0 : exports.defaultProps.min, max = exports.defaultProps.max, maxFractionDigits = exports.defaultProps.maxFractionDigits, enabled = exports.defaultProps.enabled, placeholder, step = exports.defaultProps.step, integersOnly = exports.defaultProps.integersOnly, validationStatus = exports.defaultProps.validationStatus, hasSpinBox = exports.defaultProps.hasSpinBox, updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, startText, startIcon, endText, endIcon, spinnerUpIcon, spinnerDownIcon, autoFocus, readOnly, required, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
54
67
  var _a, _b, _c;
55
68
  const inputRef = (0, react_1.useRef)(null);
56
69
  const upButton = (0, react_1.useRef)(null);
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
36
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.NumberBox = void 0;
39
+ exports.NumberBox = exports.defaultProps = void 0;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const react_1 = __importStar(require("react"));
42
42
  const classnames_1 = __importDefault(require("classnames"));
@@ -48,7 +48,21 @@ const IconNative_1 = require("../Icon/IconNative");
48
48
  const InputAdornment_1 = require("../Input/InputAdornment");
49
49
  const ButtonNative_1 = require("../Button/ButtonNative");
50
50
  const ItemWithLabel_1 = require("../FormItem/ItemWithLabel");
51
- exports.NumberBox = (0, react_1.forwardRef)(function NumberBox({ id, value, initialValue, style, enabled = true, placeholder, validationStatus = "none", hasSpinBox = true, step, integersOnly = false, zeroOrPositive = false, min = zeroOrPositive ? 0 : -numberbox_abstractions_1.NUMBERBOX_MAX_VALUE, max = numberbox_abstractions_1.NUMBERBOX_MAX_VALUE, maxLength, updateState = constants_1.noop, onDidChange = constants_1.noop, onFocus = constants_1.noop, onBlur = constants_1.noop, registerComponentApi, startText, startIcon, endText, endIcon, gap, spinnerUpIcon, spinnerDownIcon, autoFocus, readOnly, required, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
51
+ // Default props for NumberBox component
52
+ exports.defaultProps = {
53
+ enabled: true,
54
+ validationStatus: "none",
55
+ hasSpinBox: true,
56
+ integersOnly: false,
57
+ zeroOrPositive: false,
58
+ min: -numberbox_abstractions_1.NUMBERBOX_MAX_VALUE,
59
+ max: numberbox_abstractions_1.NUMBERBOX_MAX_VALUE,
60
+ updateState: constants_1.noop,
61
+ onDidChange: constants_1.noop,
62
+ onFocus: constants_1.noop,
63
+ onBlur: constants_1.noop,
64
+ };
65
+ exports.NumberBox = (0, react_1.forwardRef)(function NumberBox({ id, value, initialValue, style, enabled = exports.defaultProps.enabled, placeholder, validationStatus = exports.defaultProps.validationStatus, hasSpinBox = exports.defaultProps.hasSpinBox, step, integersOnly = exports.defaultProps.integersOnly, zeroOrPositive = exports.defaultProps.zeroOrPositive, min = zeroOrPositive ? 0 : exports.defaultProps.min, max = exports.defaultProps.max, maxLength, updateState = exports.defaultProps.updateState, onDidChange = exports.defaultProps.onDidChange, onFocus = exports.defaultProps.onFocus, onBlur = exports.defaultProps.onBlur, registerComponentApi, startText, startIcon, endText, endIcon, gap, spinnerUpIcon, spinnerDownIcon, autoFocus, readOnly, required, label, labelPosition, labelWidth, labelBreak, }, forwardedRef) {
52
66
  var _a;
53
67
  // Ensure the provided minimum is not smaller than the 0 if zeroOrPositive is set to true
54
68
  min = Math.max(zeroOrPositive ? 0 : -numberbox_abstractions_1.NUMBERBOX_MAX_VALUE, min);
@@ -2,12 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.optionComponentRenderer = exports.OptionMd = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
5
  const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
7
6
  const renderers_1 = require("../../components-core/renderers");
8
- const metadata_helpers_1 = require("../metadata-helpers");
9
- const OptionTypeProvider_1 = require("./OptionTypeProvider");
10
7
  const container_helpers_1 = require("../container-helpers");
8
+ const OptionNative_1 = require("./OptionNative");
11
9
  const COMP = "Option";
12
10
  exports.OptionMd = (0, ComponentDefs_1.createMetadata)({
13
11
  description: `\`${COMP}\` is a non-visual component describing a selection option. Other components ` +
@@ -16,24 +14,21 @@ exports.OptionMd = (0, ComponentDefs_1.createMetadata)({
16
14
  props: {
17
15
  label: (0, ComponentDefs_1.d)(`This property defines the text to display for the option. If \`label\` is not defined, ` +
18
16
  `\`Option\` will use the \`value\` as the label.`),
19
- value: (0, ComponentDefs_1.d)(`This property defines the value of the option. If \`value\` is not defined, ` +
20
- `\`Option\` will use the \`label\` as the value.`),
21
- enabled: (0, metadata_helpers_1.dEnabled)(),
17
+ value: (0, ComponentDefs_1.d)("This property defines the value of the option. If \`value\` is not defined, " +
18
+ "\`Option\` will use the \`label\` as the value. If neither is defined, " +
19
+ "the option is not displayed."),
20
+ enabled: {
21
+ description: "This boolean property indicates whether the option is enabled or disabled.",
22
+ valueType: "boolean",
23
+ defaultValue: OptionNative_1.defaultProps.enabled,
24
+ },
22
25
  optionTemplate: (0, ComponentDefs_1.d)("This property is used to define a custom option template"),
23
26
  },
24
27
  childrenAsTemplate: "optionTemplate",
25
28
  });
26
- const OptionNative = (0, react_1.memo)((props) => {
27
- const OptionType = (0, OptionTypeProvider_1.useOptionType)();
28
- if (!OptionType) {
29
- return null;
30
- }
31
- return (0, jsx_runtime_1.jsx)(OptionType, Object.assign({}, props));
32
- });
33
- OptionNative.displayName = "OptionNative";
34
29
  exports.optionComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.OptionMd, ({ node, extractValue, layoutCss, renderChild, layoutContext }) => {
35
30
  const optionTemplate = node.props.optionTemplate;
36
- return ((0, jsx_runtime_1.jsx)(OptionNative, { optionRenderer: optionTemplate
31
+ return ((0, jsx_runtime_1.jsx)(OptionNative_1.OptionNative, { optionRenderer: optionTemplate
37
32
  ? (contextVars) => ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: optionTemplate, renderChild: renderChild, contextVars: contextVars, layoutContext: layoutContext }))
38
33
  : undefined, value: extractValue(node.props.value), label: extractValue.asOptionalString(node.props.label) || extractValue(node.props.value), enabled: extractValue.asOptionalBoolean(node.props.enabled), style: layoutCss }));
39
34
  });
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OptionNative = exports.defaultProps = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const OptionTypeProvider_1 = require("./OptionTypeProvider");
7
+ // Default props for Option component
8
+ exports.defaultProps = {
9
+ enabled: true
10
+ };
11
+ exports.OptionNative = (0, react_1.memo)((props) => {
12
+ const OptionType = (0, OptionTypeProvider_1.useOptionType)();
13
+ if (!OptionType) {
14
+ return null;
15
+ }
16
+ return (0, jsx_runtime_1.jsx)(OptionType, Object.assign({}, props));
17
+ });
18
+ exports.OptionNative.displayName = "OptionNative";
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageMetaTitle = void 0;
3
+ exports.PageMetaTitle = exports.defaultProps = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_helmet_async_1 = require("react-helmet-async");
6
- const PageMetaTitle = ({ title }) => {
6
+ // Default props for PageMetaTitle component
7
+ exports.defaultProps = {
8
+ title: "XMLUI Application"
9
+ };
10
+ const PageMetaTitle = ({ title = exports.defaultProps.title }) => {
7
11
  return (0, jsx_runtime_1.jsx)(react_helmet_async_1.Helmet, { title: title });
8
12
  };
9
13
  exports.PageMetaTitle = PageMetaTitle;
@@ -10,7 +10,10 @@ exports.PageMetaTitleMd = (0, ComponentDefs_1.createMetadata)({
10
10
  description: `A PageMetaTitle component allows setting up (or changing) the app title to display with the ` +
11
11
  `current browser tab.`,
12
12
  props: {
13
- value: (0, ComponentDefs_1.d)(`This property sets the page's title to display in the browser tab.`),
13
+ value: {
14
+ description: `This property sets the page's title to display in the browser tab.`,
15
+ defaultValue: PageMetaTilteNative_1.defaultProps.title,
16
+ },
14
17
  },
15
18
  });
16
19
  exports.pageMetaTitleComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.PageMetaTitleMd, ({ node, extractValue, renderChild }) => {
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const ComponentDefs_1 = require("../../abstractions/ComponentDefs");
6
6
  const renderers_1 = require("../../components-core/renderers");
7
7
  const TableOfContentsContext_1 = require("../../components-core/TableOfContentsContext");
8
+ const metadata_helpers_1 = require("../metadata-helpers");
8
9
  const PagesNative_1 = require("./PagesNative");
9
10
  const PAGE = "Page";
10
11
  exports.PageMd = (0, ComponentDefs_1.createMetadata)({
@@ -14,8 +15,8 @@ exports.PageMd = (0, ComponentDefs_1.createMetadata)({
14
15
  `to a particular URL that is associated with the page.`,
15
16
  props: {
16
17
  //TODO illesg rename to path
17
- url: (0, ComponentDefs_1.d)(`The URL of the route associated with the content.`),
18
- navLabel: (0, ComponentDefs_1.d)("The label of the page that is displayed in the navigation panel. If provided, the " +
18
+ url: (0, ComponentDefs_1.d)(`The URL of the route associated with the content. If not set, the page is not available.`),
19
+ navLabel: (0, metadata_helpers_1.dInternal)("The label of the page that is displayed in the navigation panel. If provided, the " +
19
20
  "a new entry will be added to the navigation panel."),
20
21
  },
21
22
  });
@@ -27,7 +28,10 @@ exports.PagesMd = (0, ComponentDefs_1.createMetadata)({
27
28
  description: `The \`${COMP}\` component is used as a container for [\`Page\`](/components/Page) components ` +
28
29
  `within an [\`App\`](/components/App).`,
29
30
  props: {
30
- defaultRoute: (0, ComponentDefs_1.d)(`The default route when displaying the app`),
31
+ defaultRoute: {
32
+ description: `The default route when displaying the app`,
33
+ defaultValue: PagesNative_1.defaultProps.defaultRoute,
34
+ },
31
35
  },
32
36
  });
33
37
  exports.pagesRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.PagesMd, ({ node, extractValue, renderChild }) => {
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.defaultProps = void 0;
17
18
  exports.RouteWrapper = RouteWrapper;
18
19
  exports.Pages = Pages;
19
20
  const jsx_runtime_1 = require("react/jsx-runtime");
@@ -22,6 +23,10 @@ const react_2 = require("@remix-run/react");
22
23
  const classnames_1 = __importDefault(require("classnames"));
23
24
  const constants_1 = require("../../components-core/constants");
24
25
  const Pages_module_scss_1 = __importDefault(require("./Pages.module.scss"));
26
+ // Default props for Pages component
27
+ exports.defaultProps = {
28
+ defaultRoute: "/"
29
+ };
25
30
  function RouteWrapper({ childRoute = constants_1.EMPTY_ARRAY, renderChild, layoutContext, style, uid, }) {
26
31
  const params = (0, react_2.useParams)();
27
32
  //we need to wrap the child route in a container to make sure the route params are available.
@@ -17,7 +17,7 @@ exports.ProgressBarMd = (0, ComponentDefs_1.createMetadata)({
17
17
  value: {
18
18
  description: `This property defines the progress value with a number between 0 and 1.`,
19
19
  valueType: "number",
20
- defaultValue: 0,
20
+ defaultValue: ProgressBarNative_1.defaultProps.value,
21
21
  },
22
22
  },
23
23
  themeVars: (0, themeVars_1.parseScssVar)(ProgressBar_module_scss_1.default.themeVars),
@@ -3,10 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ProgressBar = void 0;
6
+ exports.ProgressBar = exports.defaultProps = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const ProgressBar_module_scss_1 = __importDefault(require("./ProgressBar.module.scss"));
10
- exports.ProgressBar = (0, react_1.forwardRef)(function ProgressBar({ value = 0, style }, forwardedRef) {
10
+ exports.defaultProps = {
11
+ value: 0,
12
+ };
13
+ exports.ProgressBar = (0, react_1.forwardRef)(function ProgressBar({ value = exports.defaultProps.value, style }, forwardedRef) {
11
14
  return ((0, jsx_runtime_1.jsx)("div", { className: ProgressBar_module_scss_1.default.wrapper, style: style, ref: forwardedRef, children: (0, jsx_runtime_1.jsx)("div", { style: { width: `${value * 100}%` }, className: ProgressBar_module_scss_1.default.bar }) }));
12
15
  });
@@ -11,12 +11,17 @@ exports.QueueMd = (0, ComponentDefs_1.createMetadata)({
11
11
  description: `The \`Queue\` component provides an API to enqueue elements and defines events to process ` +
12
12
  `queued elements in a FIFO order.`,
13
13
  props: {
14
- progressFeedback: (0, ComponentDefs_1.d)(`This property defines the component template of the UI that displays ` +
15
- `progress information whenever, the queue's \`progressReport\` function in invoked.`),
16
- resultFeedback: (0, ComponentDefs_1.d)(`This property defines the component template of the UI that displays result ` +
17
- `information when the queue becomes empty after processing all queued items.`),
18
- clearAfterFinish: (0, ComponentDefs_1.d)(`This property indicates the completed items (successful or error) should ` +
19
- `be removed from the queue after completion.`),
14
+ progressFeedback: (0, ComponentDefs_1.d)("This property defines the component template of the UI that displays " +
15
+ "progress information whenever, the queue's \`progressReport\` function " +
16
+ "in invoked. If not set, no progress feedback is displayed."),
17
+ resultFeedback: (0, ComponentDefs_1.d)("This property defines the component template of the UI that displays result " +
18
+ "information when the queue becomes empty after processing all queued items. If not set, " +
19
+ "no result feedback is displayed."),
20
+ clearAfterFinish: {
21
+ description: `This property indicates the completed items (successful or error) should ` +
22
+ `be removed from the queue after completion.`,
23
+ defaultValue: QueueNative_1.defaultProps.clearAfterFinish,
24
+ },
20
25
  },
21
26
  nonVisual: true,
22
27
  events: {
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.defaultProps = void 0;
15
16
  exports.Queue = Queue;
16
17
  const jsx_runtime_1 = require("react/jsx-runtime");
17
18
  const react_1 = require("react");
@@ -22,6 +23,11 @@ const hooks_1 = require("../../components-core/utils/hooks");
22
23
  const misc_1 = require("../../components-core/utils/misc");
23
24
  const AppContext_1 = require("../../components-core/AppContext");
24
25
  const queueActions_1 = require("../Queue/queueActions");
26
+ // =====================================================================================================================
27
+ // React Queue component implementation
28
+ exports.defaultProps = {
29
+ clearAfterFinish: false,
30
+ };
25
31
  const queueReducer = (0, immer_1.default)((state, action) => {
26
32
  switch (action.type) {
27
33
  case queueActions_1.QueueActionKind.ACTION_QUEUE_INITIALIZED: {
@@ -100,7 +106,7 @@ const INITIAL_STATE = {
100
106
  };
101
107
  function Queue({ registerComponentApi, willProcessItem, processItem, didProcessItem, processItemError, onComplete,
102
108
  //progressFeedback,
103
- renderProgressFeedback, renderResultFeedback, clearAfterFinish = true, }) {
109
+ renderProgressFeedback, renderResultFeedback, clearAfterFinish = exports.defaultProps.clearAfterFinish, }) {
104
110
  const runningActionItemRef = (0, react_1.useRef)(new Set());
105
111
  const [queueState, dispatch] = (0, react_1.useReducer)(queueReducer, INITIAL_STATE);
106
112
  let appContext = (0, AppContext_1.useAppContext)();
@@ -18,13 +18,13 @@ exports.RadioGroupMd = (0, ComponentDefs_1.createMetadata)({
18
18
  `([\`RadioGroupOption\`](./RadioGroupOption.mdx) components) that allow users to select ` +
19
19
  `only one option from the group at a time.`,
20
20
  props: {
21
- initialValue: (0, metadata_helpers_1.dInitialValue)(),
21
+ initialValue: Object.assign(Object.assign({}, (0, metadata_helpers_1.dInitialValue)()), { defaultValue: RadioGroupNative_1.defaultProps.initialValue }),
22
22
  autoFocus: (0, metadata_helpers_1.dAutoFocus)(),
23
- required: (0, metadata_helpers_1.dRequired)(),
23
+ required: Object.assign(Object.assign({}, (0, metadata_helpers_1.dRequired)()), { defaultValue: RadioGroupNative_1.defaultProps.required }),
24
24
  readOnly: (0, metadata_helpers_1.dReadonly)(),
25
- enabled: (0, metadata_helpers_1.dEnabled)(),
26
- validationStatus: (0, metadata_helpers_1.dValidationStatus)(),
27
- orientation: (0, ComponentDefs_1.d)(`(*** NOT IMPLEMENTED YET ***) This property sets the orientation of the ` +
25
+ enabled: Object.assign(Object.assign({}, (0, metadata_helpers_1.dEnabled)()), { defaultValue: RadioGroupNative_1.defaultProps.enabled }),
26
+ validationStatus: Object.assign(Object.assign({}, (0, metadata_helpers_1.dValidationStatus)()), { defaultValue: RadioGroupNative_1.defaultProps.validationStatus }),
27
+ orientation: (0, metadata_helpers_1.dInternal)(`(*** NOT IMPLEMENTED YET ***) This property sets the orientation of the ` +
28
28
  `options within the radio group.`),
29
29
  label: (0, metadata_helpers_1.dLabel)(),
30
30
  labelPosition: (0, metadata_helpers_1.dLabelPosition)("top"),