xmlui 0.9.12 → 0.9.14

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 (36) hide show
  1. package/dist/{apiInterceptorWorker-dYrfbzdh.mjs → apiInterceptorWorker-B9XuRkxC.mjs} +1 -1
  2. package/dist/{index-Dh2MThrK.mjs → index-D82p1y9A.mjs} +600 -275
  3. package/dist/index.css +347 -318
  4. package/dist/scripts/src/components/Card/Card.js +17 -1
  5. package/dist/scripts/src/components/Card/CardNative.js +2 -3
  6. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +2 -2
  7. package/dist/scripts/src/components/Form/FormNative.js +8 -2
  8. package/dist/scripts/src/components/Form/formActions.js +5 -4
  9. package/dist/scripts/src/components/FormItem/FormItemNative.js +16 -12
  10. package/dist/scripts/src/components/Markdown/Markdown.js +10 -8
  11. package/dist/scripts/src/components/Markdown/MarkdownNative.js +13 -10
  12. package/dist/scripts/src/components/Option/Option.js +0 -1
  13. package/dist/scripts/src/components/Select/Select.js +3 -2
  14. package/dist/scripts/src/components/Select/SelectNative.js +1 -1
  15. package/dist/scripts/src/components/SelectionStore/SelectionStore.js +1 -1
  16. package/dist/scripts/src/components/SelectionStore/SelectionStoreNative.js +10 -7
  17. package/dist/scripts/src/components/Table/Table.js +7 -1
  18. package/dist/scripts/src/components/Table/TableNative.js +2 -1
  19. package/dist/scripts/src/components-core/LoaderComponent.js +14 -0
  20. package/dist/scripts/src/components-core/abstractions/containers.js +1 -0
  21. package/dist/scripts/src/components-core/loader/ApiLoader.js +4 -5
  22. package/dist/scripts/src/components-core/loader/DataLoader.js +4 -4
  23. package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +4 -7
  24. package/dist/scripts/src/components-core/loader/Loader.js +23 -11
  25. package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +3 -3
  26. package/dist/scripts/src/components-core/loader/PageableLoader.js +14 -4
  27. package/dist/scripts/src/components-core/rendering/reducer.js +9 -3
  28. package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +2 -2
  29. package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +10 -2
  30. package/dist/style.css +347 -318
  31. package/dist/xmlui-metadata.mjs +236 -175
  32. package/dist/xmlui-metadata.umd.js +236 -175
  33. package/dist/xmlui-standalone.umd.js +5197 -3030
  34. package/dist/xmlui.d.ts +45 -1
  35. package/dist/xmlui.mjs +2 -1
  36. package/package.json +2 -2
package/dist/xmlui.d.ts CHANGED
@@ -317,7 +317,7 @@ declare type AppContextObject = {
317
317
  * from either code-behind files or inlined markup expressions) and executes
318
318
  * the app accordingly.
319
319
  */
320
- export declare function AppRoot({ apiInterceptor, contributes, node, decorateComponentsWithTestId, debugEnabled, defaultTheme, defaultTone, resources, globalProps, standalone, trackContainerHeight, routerBaseName, previewMode, resourceMap, sources, extensionManager, children }: AppWrapperProps & {
320
+ export declare function AppRoot({ apiInterceptor, contributes, node, decorateComponentsWithTestId, debugEnabled, defaultTheme, defaultTone, resources, globalProps, standalone, trackContainerHeight, routerBaseName, previewMode, resourceMap, sources, extensionManager, children, projectCompilation, }: AppWrapperProps & {
321
321
  extensionManager?: StandaloneExtensionManager;
322
322
  }): JSX_2.Element;
323
323
 
@@ -337,6 +337,7 @@ declare type AppWrapperProps = {
337
337
  defaultTone?: ThemeTone;
338
338
  resourceMap?: Record<string, string>;
339
339
  sources?: Record<string, string>;
340
+ projectCompilation?: ProjectCompilation;
340
341
  children?: ReactNode;
341
342
  };
342
343
 
@@ -472,6 +473,17 @@ declare type ColorDef = {
472
473
  format: "hex" | "rgb" | "hsl";
473
474
  };
474
475
 
476
+ declare type CompilationUnit = {
477
+ /** The file name */
478
+ filename: string;
479
+ /** Optional markup source (used in dev mode) */
480
+ markupSource?: string;
481
+ /** Optional code behind source (used in dev mode) */
482
+ codeBehindSource?: string;
483
+ /** Other (non-core) component names this component depends on */
484
+ dependencies: Set<string>;
485
+ };
486
+
475
487
  /**
476
488
  * Components can provide an API that other components can invoke (using
477
489
  * the host component ID). This type defines the shape of a hash object that
@@ -479,6 +491,11 @@ declare type ColorDef = {
479
491
  */
480
492
  declare type ComponentApi = Record<string, ((...args: any[]) => any) | boolean>;
481
493
 
494
+ declare type ComponentCompilation = CompilationUnit & {
495
+ /** The compiled markup of the component file */
496
+ definition: CompoundComponentDef;
497
+ };
498
+
482
499
  /**
483
500
  * This interface represents the properties of a component definition.
484
501
  */
@@ -828,6 +845,11 @@ declare interface EmptyStatement extends ScripNodeBase {
828
845
  type: EMPTY_STATEMENT;
829
846
  }
830
847
 
848
+ declare type EntrypointCompilation = CompilationUnit & {
849
+ /** The compiled markup of the main file */
850
+ definition: ComponentDef;
851
+ };
852
+
831
853
  /**
832
854
  * This React component serves as an error boundary; it catches any errors within
833
855
  * the nested components
@@ -1067,6 +1089,16 @@ declare interface Literal extends ExpressionBase {
1067
1089
  value: any;
1068
1090
  }
1069
1091
 
1092
+ declare type LogContextType = {
1093
+ logs: LogEntry[];
1094
+ addLog: (args: any[]) => void;
1095
+ };
1096
+
1097
+ declare type LogEntry = {
1098
+ timestamp: Date;
1099
+ args: any[];
1100
+ };
1101
+
1070
1102
  declare type LoggedInUserDto = {
1071
1103
  id: number;
1072
1104
  email: string;
@@ -1216,6 +1248,16 @@ declare interface PrefixOpExpression extends ExpressionBase {
1216
1248
 
1217
1249
  declare type PrefixOpSymbol = "++" | "--";
1218
1250
 
1251
+ /** Contains the compilation result of a project */
1252
+ declare type ProjectCompilation = {
1253
+ /** The compiled Main.xmlui file (with its optional code behind) */
1254
+ entrypoint: EntrypointCompilation;
1255
+ /** The compiled component files (with their optional code behind) */
1256
+ components: ComponentCompilation[];
1257
+ /** The compiled theme files */
1258
+ themes: Record<string, ThemeDefinition>;
1259
+ };
1260
+
1219
1261
  /**
1220
1262
  * This type represents the description of a property value, which can be a string, a number,
1221
1263
  * or an object with a value and a description. This type is used in the metadata of a component.
@@ -1867,6 +1909,8 @@ export declare function useDevTools(): {
1867
1909
  devToolsEnabled: boolean;
1868
1910
  };
1869
1911
 
1912
+ export declare const useLogger: () => LogContextType;
1913
+
1870
1914
  export declare function useTheme(): ThemeScope;
1871
1915
 
1872
1916
  /**
package/dist/xmlui.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A, B, E, I, i, h, S, b, c, e, f, j, p, s, t, k, l, u } from "./index-Dh2MThrK.mjs";
1
+ import { A, B, E, I, i, h, S, b, c, e, f, j, p, s, t, k, l, n, u } from "./index-D82p1y9A.mjs";
2
2
  export {
3
3
  A as AppRoot,
4
4
  B as Button,
@@ -17,5 +17,6 @@ export {
17
17
  t as toCssVar,
18
18
  k as useColors,
19
19
  l as useDevTools,
20
+ n as useLogger,
20
21
  u as useTheme
21
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlui",
3
- "version": "0.9.12",
3
+ "version": "0.9.14",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "start-test-bed": "cd src/testing/infrastructure && xmlui start",
@@ -74,7 +74,7 @@
74
74
  "react": "18.2.0",
75
75
  "react-currency-input-field": "3.6.9",
76
76
  "react-datepicker": "4.25.0",
77
- "react-day-picker": "8.10.1",
77
+ "react-day-picker": "9.6.7",
78
78
  "react-dom": "18.2.0",
79
79
  "react-dropzone": "14.2.3",
80
80
  "react-helmet-async": "1.3.0",