xmlui 0.9.32 → 0.9.34

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 (29) hide show
  1. package/dist/lib/{apiInterceptorWorker-Dw62WlhP.mjs → apiInterceptorWorker-B2l5dDUx.mjs} +1 -1
  2. package/dist/lib/{index-DgDH41u4.mjs → index-BN2rPcEc.mjs} +1746 -4218
  3. package/dist/lib/index.css +65 -52
  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-DyYovNew.mjs → metadata-utils-BzHSWB2j.mjs} +12 -39
  7. package/dist/lib/{server-common-1aXZ-B7H.mjs → server-common-B1bqw3bO.mjs} +2575 -2466
  8. package/dist/lib/xmlui-parser.mjs +1 -1
  9. package/dist/lib/{lint-B5OU130e.mjs → xmlui-serializer-CQnuXBof.mjs} +156 -156
  10. package/dist/lib/xmlui.d.ts +19 -8
  11. package/dist/lib/xmlui.mjs +10 -11
  12. package/dist/metadata/style.css +65 -52
  13. package/dist/metadata/xmlui-metadata.mjs +20 -15
  14. package/dist/metadata/xmlui-metadata.umd.js +20 -15
  15. package/dist/scripts/bin/index.js +5 -4
  16. package/dist/scripts/package.json +1 -1
  17. package/dist/scripts/src/components/App/App.js +1 -0
  18. package/dist/scripts/src/components/CodeBlock/CodeBlock.js +7 -6
  19. package/dist/scripts/src/components/ComponentProvider.js +4 -0
  20. package/dist/scripts/src/components/NavGroup/NavGroupNative.js +1 -1
  21. package/dist/scripts/src/components/NavPanel/NavPanelNative.js +3 -1
  22. package/dist/scripts/src/components/NestedApp/NestedAppNative.js +23 -16
  23. package/dist/scripts/src/components/NestedApp/utils.js +0 -485
  24. package/dist/scripts/src/components/Splitter/Splitter.js +1 -1
  25. package/dist/standalone/xmlui-standalone.es.d.ts +2418 -0
  26. package/dist/standalone/xmlui-standalone.umd.js +1465 -3992
  27. package/package.json +1 -1
  28. package/dist/scripts/src/parsers/xmlui-parser/xmlui-serializer.js +0 -582
  29. package/dist/scripts/src/parsers/xmlui-parser/xmlui-tree.js +0 -2
@@ -1,3 +1,2421 @@
1
+ import { CSSProperties } from 'react';
2
+ import { default as default_2 } from 'react';
3
+ import { default as default_3 } from 'react/jsx-runtime';
4
+ import { DefaultToastOptions } from 'react-hot-toast';
5
+ import { ErrorInfo } from 'react';
6
+ import { ForwardedRef } from 'react';
7
+ import { ForwardRefExoticComponent } from 'react';
8
+ import { JSX as JSX_2 } from 'react/jsx-runtime';
9
+ import { NavigateOptions } from 'react-router-dom';
10
+ import { QueryClient } from '@tanstack/react-query';
11
+ import { ReactNode } from 'react';
12
+ import { RefAttributes } from 'react';
13
+ import { RefObject } from 'react';
14
+ import { Renderable } from 'react-hot-toast';
15
+ import { Root } from 'react-dom/client';
16
+ import { SetupWorker } from 'msw/browser';
17
+ import { To } from 'react-router-dom';
18
+ import { Toast } from 'react-hot-toast';
19
+ import { ToastOptions } from 'react-hot-toast';
20
+ import { ValueOrFunction } from 'react-hot-toast';
21
+
22
+ /**
23
+ * This type represents the context in which an action is executed.
24
+ */
25
+ declare interface ActionExecutionContext {
26
+ /**
27
+ * A unique identifier for the container that the action is executed in.
28
+ */
29
+ uid: symbol;
30
+ /**
31
+ * The state of the container that the action is executed in.
32
+ */
33
+ state: ContainerState;
34
+ getCurrentState: () => ContainerState;
35
+ /**
36
+ * The appContext object passed to the current app
37
+ */
38
+ appContext: AppContextObject;
39
+ /**
40
+ * The lookup function to resolve a sync action by its name.
41
+ */
42
+ lookupAction: LookupAsyncFnInner;
43
+ navigate: any;
44
+ location: any;
45
+ }
46
+
47
+ /**
48
+ * This type represents a function that executes a particular action within the specified context
49
+ * using the given arguments.
50
+ */
51
+ declare type ActionFunction = (executionContext: ActionExecutionContext, ...args: any[]) => any;
52
+
53
+ declare type AlignmentOptions = (typeof alignmentOptionValues)[number];
54
+
55
+ declare const alignmentOptionValues: readonly ["start", "center", "end"];
56
+
57
+ declare namespace all {
58
+ export {
59
+ ThemeDefinition,
60
+ ComponentDef,
61
+ ComponentRendererDef,
62
+ CompoundComponentDef,
63
+ ComponentLike,
64
+ StandaloneAppDescription,
65
+ StandaloneJsonConfig,
66
+ ApiInterceptorDefinition,
67
+ RegisterComponentApiFn,
68
+ TreeNode,
69
+ RendererContext,
70
+ ComponentMetadata,
71
+ ThemeTone,
72
+ XmlUiNode,
73
+ StandaloneApp,
74
+ StandaloneExtensionManager,
75
+ createComponentRenderer,
76
+ createMetadata,
77
+ d,
78
+ parseScssVar,
79
+ startApp,
80
+ useTheme,
81
+ AppRoot,
82
+ ErrorBoundary,
83
+ Icon,
84
+ Stack,
85
+ Button,
86
+ Splitter,
87
+ getColor,
88
+ TabItemComponent as TabItem,
89
+ Tabs,
90
+ useColors,
91
+ toCssVar,
92
+ useDevTools,
93
+ useLogger,
94
+ errReportComponent,
95
+ xmlUiMarkupToComponent,
96
+ ApiInterceptorProvider,
97
+ Spinner,
98
+ builtInThemes,
99
+ XmlUiHelper,
100
+ Text_2 as Text,
101
+ NestedApp
102
+ }
103
+ }
104
+
105
+ declare type ApiInterceptorDefinition = {
106
+ type?: string;
107
+ config?: Record<string, any>;
108
+ schemaDescriptor?: SchemaDescriptor;
109
+ apiUrl?: string;
110
+ initialData?: Record<string, any[]> | (() => Promise<Record<string, any[]>>);
111
+ helpers?: Record<string, any>;
112
+ initialize?: string;
113
+ operations?: Record<string, InterceptorOperationDef>;
114
+ auth?: AuthDefinition;
115
+ };
116
+
117
+ declare function ApiInterceptorProvider({ interceptor, children, apiWorker, useHashBasedRouting, }: {
118
+ interceptor?: ApiInterceptorDefinition;
119
+ children: ReactNode;
120
+ apiWorker?: SetupWorker;
121
+ useHashBasedRouting?: boolean;
122
+ }): JSX_2.Element;
123
+
124
+ /**
125
+ * This interface defines the properties and services of an app context that the application components can use when
126
+ * implementing their behavior.
127
+ */
128
+ declare type AppContextObject = {
129
+ /**
130
+ * Accept other methods
131
+ */
132
+ [x: string]: unknown;
133
+ version: string;
134
+ Actions: Record<string, ActionFunction>;
135
+ /* Excluded from this release type: apiInterceptorContext */
136
+ /**
137
+ * This property returns a hash object containing all application-global settings
138
+ * defined in the app's configuration file.
139
+ */
140
+ appGlobals?: Record<string, any>;
141
+ /* Excluded from this release type: debugEnabled */
142
+ /* Excluded from this release type: decorateComponentsWithTestId */
143
+ /**
144
+ * This property returns an object with some properties of the current environment.
145
+ */
146
+ environment: {
147
+ isWindowFocused: boolean;
148
+ };
149
+ /**
150
+ * This property returns an object with information about the current media size.
151
+ */
152
+ mediaSize: MediaSize;
153
+ /* Excluded from this release type: queryClient */
154
+ /**
155
+ * This property returns `true` if the app is a standalone XMLUI app; otherwise
156
+ * (for example, as part of a website), it returns `false`.
157
+ */
158
+ standalone?: boolean;
159
+ /**
160
+ * This function formats the specified value's date part into a local date string
161
+ * (according to the machine's local settings).
162
+ * @param date Date to format
163
+ */
164
+ formatDate: (date: string | Date) => string | undefined;
165
+ /**
166
+ * This function formats the specified value into a local
167
+ * date and time string (according to the machine's local settings).
168
+ * @param date Date to format
169
+ */
170
+ formatDateTime: (date: any) => string | undefined;
171
+ /**
172
+ * This function formats the specified value's date part (without year)
173
+ * into a local date string (according to the machine's local settings).
174
+ * @param date Date to format
175
+ */
176
+ formatDateWithoutYear: (date: string | Date) => string | undefined;
177
+ /**
178
+ * This function formats the specified value's time part into a local date
179
+ * string (according to the machine's local settings).
180
+ * @param date Date to format
181
+ */
182
+ formatTime: (date: any) => string | undefined;
183
+ /**
184
+ * This function formats the specified value's time part (without seconds)
185
+ * into a local date string (according to the machine's local settings).
186
+ * @param date Date to format
187
+ */
188
+ formatTimeWithoutSeconds: (date: string | Date) => string | undefined;
189
+ /**
190
+ * This function creates a date from the specified input value. If no input
191
+ * is provided, it returns the current date and time.
192
+ */
193
+ getDate: (date?: string | number | Date) => Date;
194
+ /**
195
+ * This function calculates the difference between the current date and the
196
+ * provided one and returns it in a human-readable form, such as "1 month", "2 weeks", etc.
197
+ * @param date
198
+ * @param nowLabel
199
+ * @param time
200
+ * @returns
201
+ */
202
+ getDateUntilNow: (date?: string | number | Date, nowLabel?: string, time?: string) => string;
203
+ /**
204
+ * This function converts the input string into a date value and returns
205
+ * the ISO 8601 string representation of the date. It can pass dates between
206
+ * the UI and backend APIs in a standard format.
207
+ * @param date Date to format
208
+ */
209
+ isoDateString: (date?: string) => string;
210
+ /**
211
+ * This function checks if the specified date is today.
212
+ * @param date Date to check
213
+ */
214
+ isToday: (date: string | Date) => boolean;
215
+ /**
216
+ * This function checks if the specified date is tomorrow.
217
+ * @param date Date to check
218
+ */
219
+ isTomorrow: (date: string | Date) => boolean;
220
+ /**
221
+ * This function checks if the specified date is yesterday.
222
+ * @param date Date to check
223
+ */
224
+ isYesterday: (date: string | Date) => boolean;
225
+ /**
226
+ * This function checks the date value provided for some particular
227
+ * values and returns accordingly. Otherwise, returns it as `formatDate` would.
228
+ * @param date Date to format
229
+ */
230
+ smartFormatDate: (date?: string | number | Date) => string;
231
+ /**
232
+ * This function checks the date value provided for some particular values and
233
+ * returns accordingly. Otherwise, returns it as `formatDateTime` would.
234
+ * @param date Date to format
235
+ */
236
+ smartFormatDateTime: (date: string | Date) => string | undefined;
237
+ /**
238
+ * This functions creates the difference between two dates in minutes.
239
+ * @param date1 First date
240
+ * @param date2 Second date
241
+ * @returns The difference in minutes
242
+ */
243
+ differenceInMinutes: (date1: number | Date, date2: number | Date) => number;
244
+ /**
245
+ * This function checks if the specified dates are on the same day.
246
+ * @param dateLeft First date
247
+ * @param dateRight Second Date
248
+ * @returns True, if the dates are on the same day; otherwise, false.
249
+ */
250
+ isSameDay: (dateLeft: number | Date, dateRight: number | Date) => boolean;
251
+ /**
252
+ * This function checks if the specified date is in the current calendar year.
253
+ * @param date Date to check
254
+ * @returns True, if the date is in the current year; otherwise, false.
255
+ */
256
+ isThisYear: (date: Date | number) => boolean;
257
+ /**
258
+ * This function calculates the average of the specified values and returns it.
259
+ * @param values Values to calculate the average
260
+ * @param decimals Number of decimal places to round the result
261
+ */
262
+ avg: (values: number[], decimals?: number) => number;
263
+ /**
264
+ * This function calculates the sum of the specified values and returns it.
265
+ * @param values Values to calculate the sum
266
+ */
267
+ sum: (values: number[]) => number;
268
+ /**
269
+ * This function returns the specified file size in a compact form, such as
270
+ * "112 B", "2.0 KiB", "23.4 KiB", "2.3 MiB", etc.
271
+ * @param bytes Number of bytes to format
272
+ */
273
+ formatFileSizeInBytes: (bytes: number) => string | undefined;
274
+ /**
275
+ * This function returns the type of the specified file.
276
+ * @param fileName Filename to check for extension
277
+ */
278
+ getFileExtension: (fileName: string) => string | undefined;
279
+ /**
280
+ * This function navigates to the specified `url`.
281
+ * @param url New app location
282
+ * @param options Navigation options
283
+ */
284
+ navigate: (url: To, options?: NavigateOptions) => void;
285
+ /**
286
+ * This property determines the base name used for the router.
287
+ */
288
+ routerBaseName: string;
289
+ /**
290
+ * Instructs the browser to display a dialog with an optional message, and to wait until the
291
+ * user either confirms or cancels the dialog. It returns a boolean indicating whether OK
292
+ * (`true`) or Cancel (`false`) was selected.
293
+ * @param title Dialog title
294
+ * @param message Confirmation message
295
+ * @param actionLabel Optional action label
296
+ * @return True, if the user confirmed the action; otherwise, false.
297
+ */
298
+ confirm: (title: string, message?: string, actionLabel?: string) => Promise<boolean>;
299
+ /**
300
+ * This method displays the specified `error` (error message) on the UI.
301
+ * @param error Error to display
302
+ */
303
+ signError(error: Error | string): void;
304
+ /**
305
+ * The toast service that displays messages in the UI.
306
+ */
307
+ toast: {
308
+ (message: Message, opts?: ToastOptions): string;
309
+ error: ToastHandler;
310
+ success: ToastHandler;
311
+ loading: ToastHandler;
312
+ custom: ToastHandler;
313
+ dismiss(toastId?: string): void;
314
+ remove(toastId?: string): void;
315
+ promise<T>(promise: Promise<T>, msgs: {
316
+ loading: Renderable;
317
+ success: ValueOrFunction<Renderable, T>;
318
+ error: ValueOrFunction<Renderable, any>;
319
+ }, opts?: DefaultToastOptions): Promise<T>;
320
+ };
321
+ /**
322
+ * This property returns the ID of the currently active theme.
323
+ */
324
+ activeThemeId: string;
325
+ /**
326
+ * This property returns the tone of the currently active theme ("light" or "dark").
327
+ */
328
+ activeThemeTone: "light" | "dark";
329
+ /**
330
+ * This property returns an array of all available theme IDs.
331
+ */
332
+ availableThemeIds: string[];
333
+ /**
334
+ * This function sets the current theme to the one with the specified `themeId`.
335
+ * @param themId New theme to set
336
+ */
337
+ setTheme: (themId: string) => void;
338
+ /**
339
+ * This function sets the current theme tone to the specified `tone` value ("light" or "dark").
340
+ * @param newTone New tone to set
341
+ */
342
+ setThemeTone: (newTone: "light" | "dark") => void;
343
+ /**
344
+ * This function toggles the current theme tone from "light" to "dark" or vice versa.
345
+ */
346
+ toggleThemeTone: () => void;
347
+ /**
348
+ * This property gets the information about the logged-in user. If `null`, no user is
349
+ * logged in. The user information may have any value; the app must be able to leverage
350
+ * this information.
351
+ */
352
+ loggedInUser: LoggedInUserDto | null;
353
+ /**
354
+ * This function sets the information about the logged-in user. The user information
355
+ * may have any value; the app must be able to leverage this information.
356
+ * @param loggedInUser Logged-in user information
357
+ */
358
+ setLoggedInUser: (loggedInUser: any) => void;
359
+ readonly resources?: Record<string, string>;
360
+ capitalize: (s?: string) => string;
361
+ pluralize: (number: number, singular: string, plural: string) => string;
362
+ delay: (timeInMs: number, callback?: any) => Promise<void>;
363
+ toHashObject: (arr: any[], keyProp: string, valueProp: string) => any;
364
+ findByField: (arr: any[], field: string, value: any) => any;
365
+ readonly embed: {
366
+ isInIFrame: boolean;
367
+ };
368
+ distinct: (arr: any[]) => any[];
369
+ forceRefreshAnchorScroll: () => void;
370
+ };
371
+
372
+ /**
373
+ * This component is responsible for running a pre-compiled xmlui app. It
374
+ * receives the internal representation of the app markup and code (coming
375
+ * from either code-behind files or inlined markup expressions) and executes
376
+ * the app accordingly.
377
+ */
378
+ declare function AppRoot({ apiInterceptor, contributes, node, decorateComponentsWithTestId, debugEnabled, defaultTheme, defaultTone, resources, globalProps, standalone, trackContainerHeight, routerBaseName, previewMode, resourceMap, sources, extensionManager, children, projectCompilation, }: AppWrapperProps & {
379
+ extensionManager?: StandaloneExtensionManager;
380
+ }): JSX_2.Element;
381
+
382
+ declare type AppWrapperProps = {
383
+ node: ComponentLike;
384
+ previewMode?: boolean;
385
+ routerBaseName?: string;
386
+ contributes?: ContributesDefinition;
387
+ globalProps?: GlobalProps;
388
+ resources?: Record<string, string>;
389
+ standalone?: boolean;
390
+ trackContainerHeight?: TrackContainerHeight;
391
+ decorateComponentsWithTestId?: boolean;
392
+ debugEnabled?: boolean;
393
+ apiInterceptor?: ApiInterceptorDefinition;
394
+ defaultTheme?: string;
395
+ defaultTone?: ThemeTone;
396
+ resourceMap?: Record<string, string>;
397
+ sources?: Record<string, string>;
398
+ projectCompilation?: ProjectCompilation;
399
+ children?: ReactNode;
400
+ };
401
+
402
+ declare type ARRAY_DESTRUCTURE = typeof T_ARRAY_DESTRUCTURE;
403
+
404
+ declare type ARRAY_LITERAL = typeof T_ARRAY_LITERAL;
405
+
406
+ declare interface ArrayDestructure extends DestructureBase {
407
+ type: ARRAY_DESTRUCTURE;
408
+ }
409
+
410
+ declare interface ArrayLiteral extends ExpressionBase {
411
+ type: ARRAY_LITERAL;
412
+ items: Expression[];
413
+ loose?: boolean;
414
+ }
415
+
416
+ declare type ARROW_EXPRESSION = typeof T_ARROW_EXPRESSION;
417
+
418
+ declare type ARROW_EXPRESSION_STATEMENT = typeof T_ARROW_EXPRESSION_STATEMENT;
419
+
420
+ declare interface ArrowExpression extends ExpressionBase {
421
+ type: ARROW_EXPRESSION;
422
+ name?: string;
423
+ args: Expression[];
424
+ statement: Statement;
425
+ }
426
+
427
+ declare interface ArrowExpressionStatement extends ScripNodeBase {
428
+ type: ARROW_EXPRESSION_STATEMENT;
429
+ expr: ArrowExpression;
430
+ }
431
+
432
+ declare type ASSIGNMENT_EXPRESSION = typeof T_ASSIGNMENT_EXPRESSION;
433
+
434
+ declare interface AssignmentExpression extends ExpressionBase {
435
+ type: ASSIGNMENT_EXPRESSION;
436
+ leftValue: Expression;
437
+ op: AssignmentSymbols;
438
+ expr: Expression;
439
+ }
440
+
441
+ declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";
442
+
443
+ /**
444
+ * XMLUI executes its code asynchronously. This type defines functions that can be used in XMLUI
445
+ * as actions or event handlers.
446
+ */
447
+ declare type AsyncFunction = (...args: any) => Promise<any> | any;
448
+
449
+ declare type AuthDefinition = {
450
+ defaultLoggedInUser?: any;
451
+ };
452
+
453
+ declare type BINARY_EXPRESSION = typeof T_BINARY_EXPRESSION;
454
+
455
+ declare interface BinaryExpression extends ExpressionBase {
456
+ type: BINARY_EXPRESSION;
457
+ op: BinaryOpSymbols;
458
+ left: Expression;
459
+ right: Expression;
460
+ }
461
+
462
+ declare type BinaryOpSymbols = "**" | "*" | "/" | "%" | "+" | "-" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "==" | "===" | "!=" | "!==" | "&" | "|" | "^" | "&&" | "||" | "??" | "in";
463
+
464
+ declare type BLOCK_STATEMENT = typeof T_BLOCK_STATEMENT;
465
+
466
+ declare interface BlockStatement extends ScripNodeBase {
467
+ type: BLOCK_STATEMENT;
468
+ stmts: Statement[];
469
+ }
470
+
471
+ declare type BREAK_STATEMENT = typeof T_BREAK_STATEMENT;
472
+
473
+ declare interface BreakStatement extends ScripNodeBase {
474
+ type: BREAK_STATEMENT;
475
+ }
476
+
477
+ declare const builtInThemes: Array<ThemeDefinition>;
478
+
479
+ declare const Button: default_2.ForwardRefExoticComponent<{
480
+ id?: string;
481
+ type?: ButtonType;
482
+ variant?: ButtonVariant;
483
+ themeColor?: ButtonThemeColor;
484
+ size?: ComponentSize;
485
+ disabled?: boolean;
486
+ children?: default_2.ReactNode | default_2.ReactNode[];
487
+ icon?: default_2.ReactNode;
488
+ iconPosition?: IconPosition;
489
+ contentPosition?: AlignmentOptions;
490
+ orientation?: OrientationOptions;
491
+ formId?: string;
492
+ style?: CSSProperties;
493
+ gap?: string | number;
494
+ accessibilityProps?: any;
495
+ autoFocus?: boolean;
496
+ contextualLabel?: string;
497
+ } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onClick" | "onFocus" | "onBlur" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
498
+
499
+ declare type ButtonThemeColor = (typeof buttonThemeValues)[number];
500
+
501
+ declare const buttonThemeValues: readonly ["attention", "primary", "secondary"];
502
+
503
+ declare type ButtonType = (typeof buttonTypeValues)[number];
504
+
505
+ declare const buttonTypeValues: readonly ["button", "submit", "reset"];
506
+
507
+ declare type ButtonVariant = (typeof buttonVariantValues)[number];
508
+
509
+ declare const buttonVariantValues: readonly ["solid", "outlined", "ghost"];
510
+
511
+ declare type CALCULATED_MEMBER_ACCESS_EXPRESSION = typeof T_CALCULATED_MEMBER_ACCESS_EXPRESSION;
512
+
513
+ declare interface CalculatedMemberAccessExpression extends ExpressionBase {
514
+ type: CALCULATED_MEMBER_ACCESS_EXPRESSION;
515
+ obj: Expression;
516
+ member: Expression;
517
+ }
518
+
519
+ declare type CodeDeclaration = {
520
+ source?: string;
521
+ tree: Expression;
522
+ [x: string]: unknown;
523
+ };
524
+
525
+ declare type CollectedDeclarations = {
526
+ vars: Record<string, CodeDeclaration>;
527
+ functions: Record<string, CodeDeclaration>;
528
+ moduleErrors?: ModuleErrors;
529
+ };
530
+
531
+ declare type ColorDef = {
532
+ name: string;
533
+ format: "hex" | "rgb" | "hsl";
534
+ };
535
+
536
+ declare type CompilationUnit = {
537
+ /** The file name */
538
+ filename: string;
539
+ /** Optional markup source (used in dev mode) */
540
+ markupSource?: string;
541
+ /** Optional code behind source (used in dev mode) */
542
+ codeBehindSource?: string;
543
+ /** Other (non-core) component names this component depends on */
544
+ dependencies: Set<string>;
545
+ };
546
+
547
+ /**
548
+ * Components can provide an API that other components can invoke (using
549
+ * the host component ID). This type defines the shape of a hash object that
550
+ * stores the API endpoints.
551
+ */
552
+ declare type ComponentApi = Record<string, ((...args: any[]) => any) | boolean>;
553
+
554
+ declare type ComponentCompilation = CompilationUnit & {
555
+ /** The compiled markup of the component file */
556
+ definition: CompoundComponentDef;
557
+ };
558
+
559
+ /**
560
+ * This interface represents the properties of a component definition.
561
+ */
562
+ declare interface ComponentDef<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentDefCore, Scriptable {
563
+ props?: Record<keyof TMd["props"], any>;
564
+ events?: Record<keyof TMd["events"], any>;
565
+ /**
566
+ * Components may have an API that other components can use to interact with them. This property holds
567
+ * the API methods associated with this component definition.
568
+ */
569
+ api?: Record<keyof TMd["apis"], any>;
570
+ /**
571
+ * Components may provide context variables that can be used to in expressions and event handlers
572
+ * within the component.
573
+ * REVIEW: This property can be removed after migration to the new componend definition type.
574
+ */
575
+ contextVars?: Record<keyof TMd["contextVars"], string>;
576
+ }
577
+
578
+ /**
579
+ * This interface represents the core properties of a component definition (independent
580
+ * of component metadata).
581
+ */
582
+ declare interface ComponentDefCore {
583
+ type: string;
584
+ uid?: string;
585
+ testId?: string;
586
+ /**
587
+ * A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
588
+ * these are used later to resolve the `type` of the componentDef.
589
+ * <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
590
+ */
591
+ namespaces?: Record<string, string>;
592
+ /**
593
+ * Though components manage their state internally, the app logic may require user state management.
594
+ * Components may have user *variables*, which the UI logic uses to manage the application state.
595
+ * This property holds the variables (name and value pairs) associated with this component definition.
596
+ */
597
+ vars?: Record<string, any>;
598
+ /**
599
+ * Each component may have child components to constitute a hierarchy of components. This property
600
+ * holds the definition of these nested children.
601
+ */
602
+ children?: ComponentDef[];
603
+ /**
604
+ * Components may have slots that can be filled with other components. This property holds the
605
+ * contents of the slots
606
+ */
607
+ slots?: Record<string, ComponentDef[]>;
608
+ /**
609
+ * This property is evaluated to a Boolean value during run time. When this value is `true`, the
610
+ * component with its children chain is rendered; otherwise, the entire component hierarchy is omitted
611
+ * from the rendered tree.
612
+ */
613
+ when?: string | boolean;
614
+ /**
615
+ * Some components work with data obtained asynchronously. Fetching this data requires some state
616
+ * management handling the complexity (including error handling) of data access. A *loader* is
617
+ * responsible for managing this logic. This property holds the loaders associated with this component
618
+ * definition.
619
+ */
620
+ loaders?: ComponentDef[];
621
+ /**
622
+ * Components may have functions that are used to perform some logic. This property holds the functions
623
+ * (name and function body) associated with this component definition.
624
+ */
625
+ functions?: Record<string, any>;
626
+ /**
627
+ * Components managing state through variables or loaders are wrapped with containers responsible
628
+ * for this job. Just as components, containers form a hierarchy. While working with this hierarchy,
629
+ * parent components may flow state values (key and value pairs) to their child containers. This
630
+ * property holds the name of state values to flow down to the direct child containers.
631
+ */
632
+ uses?: string[];
633
+ /**
634
+ * Arbitrary debug information that can be attached to a component definition.
635
+ * Current usage:
636
+ * - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
637
+ * belonging to the particular component definition.
638
+ */
639
+ debug?: Record<string, any>;
640
+ }
641
+
642
+ declare type ComponentExtension = ComponentRendererDef | CompoundComponentDef;
643
+
644
+ /**
645
+ * Sometimes, components and compound components can both be used
646
+ */
647
+ declare type ComponentLike = ComponentDef | CompoundComponentDef;
648
+
649
+ /**
650
+ * Components have metadata that the rendering engine uses to render the
651
+ * component. This type defines the structure of such metadata.
652
+ *
653
+ * The type has generic parameters to ensure that type-checking works with
654
+ * the metadata defined here in concert with the renderer object using the
655
+ * same metadata type.
656
+ */
657
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
658
+ status?: "stable" | "experimental" | "deprecated" | "in progress";
659
+ description?: string;
660
+ shortDescription?: string;
661
+ props?: TProps;
662
+ events?: TEvents;
663
+ contextVars?: TContextValues;
664
+ apis?: TApis;
665
+ nonVisual?: boolean;
666
+ childrenAsTemplate?: string;
667
+ opaque?: boolean;
668
+ themeVars?: Array<string>;
669
+ themeVarDescriptions?: Record<string, string>;
670
+ defaultThemeVars?: DefaultThemeVars;
671
+ toneSpecificThemeVars?: Record<string, Record<string, string>>;
672
+ allowArbitraryProps?: boolean;
673
+ specializedFrom?: string;
674
+ docFolder?: string;
675
+ isHtmlTag?: boolean;
676
+ };
677
+
678
+ /**
679
+ * Components have properties, events, context values, and exposed API
680
+ * endpoints, each holding metadata the rendering engine uses at run time.
681
+ * This type defines the structure of such metadata.
682
+ */
683
+ declare type ComponentPropertyMetadata = {
684
+ /**
685
+ * This field defines the description explaining the property. You can use
686
+ * markdown, as the UI may display this value.
687
+ */
688
+ readonly description: string;
689
+ /**
690
+ * This field defines the type of the property. The rendering engine uses this
691
+ * information to validate the property value.
692
+ */
693
+ readonly valueType?: PropertyValueType;
694
+ /**
695
+ * This field defines the available values of the property. The rendering engine
696
+ * uses this information to validate the property value.
697
+ */
698
+ readonly availableValues?: readonly PropertyValueDescription[];
699
+ /**
700
+ * This field defines the default value of the property. The rendering engine uses
701
+ * this information to set the default value of the property.
702
+ */
703
+ defaultValue?: any;
704
+ /**
705
+ * This field defines a validation function that the rendering engine uses to validate
706
+ * the property value. The function returns one or more hinst if the property value is
707
+ * invalid.
708
+ */
709
+ isValid?: IsValidFunction<any>;
710
+ /**
711
+ * Indicates that a particular property is internal and should not be exposed in the
712
+ * documentation
713
+ */
714
+ isInternal?: boolean;
715
+ /**
716
+ * Indicates that a particular property is required for the component to essentially function.
717
+ */
718
+ isRequired?: boolean;
719
+ };
720
+
721
+ declare interface ComponentRendererContextBase<TMd extends ComponentMetadata = ComponentMetadata> {
722
+ node: ComponentDef<TMd>;
723
+ state: ContainerState;
724
+ appContext?: AppContextObject;
725
+ renderChild: RenderChildFn;
726
+ layoutContext?: LayoutContext;
727
+ }
728
+
729
+ /**
730
+ * Components must be registered with a component registry so the engine can use them. This type
731
+ * collects the information held by the registry.
732
+ */
733
+ declare type ComponentRendererDef<T extends ComponentDef = any> = {
734
+ /**
735
+ * The component's type identifier. In the markup, the component must use this name to be recognized.
736
+ */
737
+ type: string;
738
+ /**
739
+ * This function renders the component from its definition to its React representation.
740
+ */
741
+ renderer: ComponentRendererFn<T>;
742
+ /**
743
+ * The metadata to use when rendering the component
744
+ */
745
+ metadata?: ComponentMetadata;
746
+ };
747
+
748
+ /**
749
+ * This function renders a component definition into a React component
750
+ */
751
+ declare type ComponentRendererFn<T extends ComponentDef> = (context: RendererContext<T>) => ReactNode;
752
+
753
+ declare type ComponentSize = (typeof sizeValues)[number];
754
+
755
+ /**
756
+ * XMLUI allows the creation of reusable components assembled from other XMLUI components (with markup).
757
+ * This type represents such components. The name `CompoundComponent` refers to the assembled nature
758
+ * of reusable components.
759
+ */
760
+ declare interface CompoundComponentDef extends Scriptable {
761
+ /**
762
+ * Each compound component must have a unique name. The markup uses this name to refer to the
763
+ * particular compound component.
764
+ */
765
+ name: string;
766
+ /**
767
+ * Each compound component must have a single root component defining the component contents.
768
+ */
769
+ component: ComponentDef;
770
+ /**
771
+ * Compound components may provide an API that other components can use to interact with them. This
772
+ * property holds the API methods associated with this compound component definition.
773
+ */
774
+ api?: Record<string, any>;
775
+ /**
776
+ * This property holds the variables (name and value pairs) associated with this compound component
777
+ * definition.
778
+ */
779
+ vars?: Record<string, any>;
780
+ /**
781
+ * A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
782
+ * these are used later to resolve the `type` of the componentDef.
783
+ * <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
784
+ */
785
+ namespaces?: Record<string, string>;
786
+ /**
787
+ * Arbitrary debug information that can be attached to a component definition.
788
+ * Current usage:
789
+ * - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
790
+ * belonging to the particular component definition.
791
+ */
792
+ debug?: Record<string, any>;
793
+ }
794
+
795
+ declare type CONDITIONAL_EXPRESSION = typeof T_CONDITIONAL_EXPRESSION;
796
+
797
+ declare interface ConditionalExpression extends ExpressionBase {
798
+ type: CONDITIONAL_EXPRESSION;
799
+ cond: Expression;
800
+ thenE: Expression;
801
+ elseE: Expression;
802
+ }
803
+
804
+ declare type CONST_STATEMENT = typeof T_CONST_STATEMENT;
805
+
806
+ declare interface ConstStatement extends ScripNodeBase {
807
+ type: CONST_STATEMENT;
808
+ decls: VarDeclaration[];
809
+ }
810
+
811
+ /**
812
+ * We store the state application state in a hierarchical structure of containers. This type represents
813
+ * the state within a single container stored as key and value pairs.
814
+ */
815
+ declare type ContainerState = Record<string | symbol, any>;
816
+
817
+ declare type CONTINUE_STATEMENT = typeof T_CONTINUE_STATEMENT;
818
+
819
+ declare interface ContinueStatement extends ScripNodeBase {
820
+ type: CONTINUE_STATEMENT;
821
+ }
822
+
823
+ /**
824
+ * Applications can contribute to the registry with their custom (third-party)
825
+ * and application-specific components and others. This type holds the
826
+ * definitions of these extra artifacts.
827
+ */
828
+ declare type ContributesDefinition = {
829
+ /**
830
+ * Native xmlui components that come with the app.
831
+ */
832
+ components?: ComponentRendererDef[];
833
+ /**
834
+ * Application-specific compound components that come with the app.
835
+ */
836
+ compoundComponents?: CompoundComponentDef[];
837
+ /**
838
+ * Themes that come with the app.
839
+ */
840
+ themes?: ThemeDefinition[];
841
+ };
842
+
843
+ /**
844
+ * This helper function creates a component renderer definition from its arguments.
845
+ * @param type The unique identifier of the component definition
846
+ * @param renderer The function that renders the component definition into a React node
847
+ * @param metadata Optional hints to help fix the rendering errors coming from invalid component property definitions
848
+ * @returns The view renderer definition composed of the arguments
849
+ */
850
+ declare function createComponentRenderer<TMd extends ComponentMetadata>(type: string, metadata: TMd, renderer: ComponentRendererFn<ComponentDef<TMd>>): ComponentRendererDef;
851
+
852
+ declare function createMetadata<TProps extends Record<string, ComponentPropertyMetadata>, TEvents extends Record<string, ComponentPropertyMetadata>, TContextVars extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>>(metadata: ComponentMetadata<TProps, TEvents, TContextVars, TApis>): ComponentMetadata<TProps, TEvents, TContextVars, TApis>;
853
+
854
+ declare function d(description: string, availableValues?: readonly PropertyValueDescription[], valueType?: PropertyValueType, defaultValue?: any, isValid?: IsValidFunction<any>, isRequired?: boolean): ComponentPropertyMetadata;
855
+
856
+ declare const _default: {
857
+ standalone: StandaloneExtensionManager;
858
+ StandaloneApp: typeof all.StandaloneApp;
859
+ StandaloneExtensionManager: typeof StandaloneExtensionManager;
860
+ createComponentRenderer: typeof all.createComponentRenderer;
861
+ createMetadata: typeof all.createMetadata;
862
+ d: typeof all.d;
863
+ parseScssVar: typeof all.parseScssVar;
864
+ startApp: typeof startApp;
865
+ useTheme: typeof all.useTheme;
866
+ AppRoot: typeof all.AppRoot;
867
+ ErrorBoundary: typeof all.ErrorBoundary;
868
+ Icon: default_2.ForwardRefExoticComponent<IconBaseProps & default_2.RefAttributes<unknown>>;
869
+ Stack: default_2.ForwardRefExoticComponent<{
870
+ children: default_2.ReactNode;
871
+ orientation?: string;
872
+ uid?: string;
873
+ horizontalAlignment?: string;
874
+ verticalAlignment?: string;
875
+ style?: default_2.CSSProperties;
876
+ reverse?: boolean;
877
+ hoverContainer?: boolean;
878
+ visibleOnHover?: boolean;
879
+ onClick?: any;
880
+ onMount?: any;
881
+ } & default_2.RefAttributes<any>>;
882
+ Button: default_2.ForwardRefExoticComponent<{
883
+ id?: string;
884
+ type?: "button" | "reset" | "submit";
885
+ variant?: "solid" | "outlined" | "ghost";
886
+ themeColor?: "primary" | "secondary" | "attention";
887
+ size?: string;
888
+ disabled?: boolean;
889
+ children?: default_2.ReactNode | default_2.ReactNode[];
890
+ icon?: default_2.ReactNode;
891
+ iconPosition?: "start" | "end";
892
+ contentPosition?: "center" | "start" | "end";
893
+ orientation?: "vertical" | "horizontal";
894
+ formId?: string;
895
+ style?: default_2.CSSProperties;
896
+ gap?: string | number;
897
+ accessibilityProps?: any;
898
+ autoFocus?: boolean;
899
+ contextualLabel?: string;
900
+ } & Pick<default_2.HTMLAttributes<HTMLButtonElement>, "className" | "aria-disabled" | "aria-label" | "aria-controls" | "aria-expanded" | "onClick" | "onFocus" | "onBlur" | "tabIndex" | "onMouseEnter" | "onMouseLeave"> & default_2.RefAttributes<HTMLButtonElement>>;
901
+ Splitter: ({ initialPrimarySize, minPrimarySize, maxPrimarySize, orientation, children, style, swapped, floating, splitterTemplate, resize, }: {
902
+ children: default_2.ReactNode | default_2.ReactNode[];
903
+ style?: default_2.CSSProperties;
904
+ splitterTemplate?: default_2.ReactNode;
905
+ orientation?: "vertical" | "horizontal";
906
+ floating?: boolean;
907
+ resize?: (sizes: [number, number]) => void;
908
+ swapped?: boolean;
909
+ initialPrimarySize?: string;
910
+ minPrimarySize?: string;
911
+ maxPrimarySize?: string;
912
+ }) => default_3.JSX.Element;
913
+ getColor: typeof all.getColor;
914
+ TabItem: default_2.ForwardRefExoticComponent<Tab & default_2.RefAttributes<HTMLDivElement>>;
915
+ Tabs: default_2.ForwardRefExoticComponent<{
916
+ activeTab?: number;
917
+ orientation?: "vertical" | "horizontal";
918
+ tabRenderer?: (item: {
919
+ label: string;
920
+ isActive: boolean;
921
+ }) => default_2.ReactNode;
922
+ style?: default_2.CSSProperties;
923
+ children?: default_2.ReactNode;
924
+ registerComponentApi?: all.RegisterComponentApiFn;
925
+ className?: string;
926
+ distributeEvenly?: boolean;
927
+ } & default_2.RefAttributes<HTMLDivElement>>;
928
+ useColors: typeof all.useColors;
929
+ toCssVar: typeof all.toCssVar;
930
+ useDevTools: typeof all.useDevTools;
931
+ useLogger: () => {
932
+ logs: {
933
+ timestamp: Date;
934
+ args: any[];
935
+ }[];
936
+ addLog: (args: any[]) => void;
937
+ };
938
+ errReportComponent: typeof all.errReportComponent;
939
+ xmlUiMarkupToComponent: typeof all.xmlUiMarkupToComponent;
940
+ ApiInterceptorProvider: typeof all.ApiInterceptorProvider;
941
+ Spinner: default_2.ForwardRefExoticComponent<{
942
+ delay?: number;
943
+ fullScreen?: boolean;
944
+ style?: default_2.CSSProperties;
945
+ } & default_2.RefAttributes<HTMLDivElement>>;
946
+ builtInThemes: all.ThemeDefinition[];
947
+ XmlUiHelper: typeof all.XmlUiHelper;
948
+ Text: default_2.ForwardRefExoticComponent<Omit<{
949
+ [variantSpecificProps: string]: any;
950
+ uid?: string;
951
+ children?: default_2.ReactNode;
952
+ variant?: "small" | "sub" | "sup" | "abbr" | "caption" | "cite" | "code" | "em" | "strong" | "title" | "var" | "mono" | "secondary" | "codefence" | "deleted" | "inserted" | "keyboard" | "marked" | "sample" | "subtitle" | "placeholder" | "paragraph" | "subheading" | "tableheading";
953
+ maxLines?: number;
954
+ preserveLinebreaks?: boolean;
955
+ ellipses?: boolean;
956
+ style?: default_2.CSSProperties;
957
+ }, "ref"> & default_2.RefAttributes<unknown>>;
958
+ NestedApp: typeof all.NestedApp;
959
+ };
960
+ export default _default;
961
+
962
+ declare type DefaultThemeVars = Record<string | ThemeTone, string | Record<string, string>>;
963
+
964
+ declare type DefaultValueDescriptor = (string | ThemeIdDescriptor)[];
965
+
966
+ declare type DESTRUCTURE = typeof T_DESTRUCTURE;
967
+
968
+ declare interface Destructure extends DestructureBase {
969
+ type: DESTRUCTURE;
970
+ aDestr?: ArrayDestructure[];
971
+ oDestr?: ObjectDestructure[];
972
+ }
973
+
974
+ declare interface DestructureBase extends ExpressionBase {
975
+ id?: string;
976
+ aDestr?: ArrayDestructure[];
977
+ oDestr?: ObjectDestructure[];
978
+ }
979
+
980
+ declare enum DiagnosticCategory {
981
+ Warning = 0,
982
+ Error = 1,
983
+ Suggestion = 2,
984
+ Message = 3
985
+ }
986
+
987
+ declare type DO_WHILE_STATEMENT = typeof T_DO_WHILE_STATEMENT;
988
+
989
+ declare interface DoWhileStatement extends ScripNodeBase {
990
+ type: DO_WHILE_STATEMENT;
991
+ cond: Expression;
992
+ body: Statement;
993
+ }
994
+
995
+ /**
996
+ * Some components render their nested child components dynamically using the current context of
997
+ * their parents. For example, reusable components (`CompoundComponentDef`) have a `Slot`
998
+ * placeholder that marks the location where the children should be rendered. Other component types
999
+ * (e.g., `ApiBoundComponent` and `ContainerComponent`) use this dynamic rendering, too.
1000
+ *
1001
+ * This interface represents this functionality.
1002
+ */
1003
+ declare interface DynamicChildComponentDef extends ComponentDef {
1004
+ /**
1005
+ * This property holds a function that can render a particular child or children into a specific
1006
+ * layout context.
1007
+ */
1008
+ renderChild: RenderChildFn;
1009
+ /**
1010
+ * This property holds the child component that should be rendered.
1011
+ */
1012
+ childToRender: ComponentDef;
1013
+ }
1014
+
1015
+ declare type EMPTY_STATEMENT = typeof T_EMPTY_STATEMENT;
1016
+
1017
+ declare interface EmptyStatement extends ScripNodeBase {
1018
+ type: EMPTY_STATEMENT;
1019
+ }
1020
+
1021
+ declare type EntrypointCompilation = CompilationUnit & {
1022
+ /** The compiled markup of the main file */
1023
+ definition: ComponentDef;
1024
+ };
1025
+
1026
+ declare enum ErrCodes {
1027
+ onlyOneElem = "U002",
1028
+ expTagOpen = "U003",
1029
+ expTagIdent = "U004",
1030
+ expCloseStart = "U005",
1031
+ expEndOrClose = "U006",
1032
+ tagNameMismatch = "U007",
1033
+ expEnd = "U008",
1034
+ expAttrIdent = "U009",
1035
+ expEq = "U010",
1036
+ expAttrValue = "U011",
1037
+ duplAttr = "U012",
1038
+ uppercaseAttr = "U013",
1039
+ invalidChar = "W001",
1040
+ untermStr = "W002",
1041
+ untermComment = "W007",
1042
+ untermCData = "W008",
1043
+ untermScript = "W009"
1044
+ }
1045
+
1046
+ declare interface Error_2 {
1047
+ readonly category: DiagnosticCategory;
1048
+ readonly code: ErrCodes;
1049
+ readonly message: string;
1050
+ readonly pos: number;
1051
+ readonly end: number;
1052
+ }
1053
+
1054
+ /**
1055
+ * This React component serves as an error boundary; it catches any errors within
1056
+ * the nested components
1057
+ */
1058
+ declare class ErrorBoundary extends default_2.Component<Props, State> {
1059
+ state: State;
1060
+ /**
1061
+ * This method implements the Error Boundaries for the React application.
1062
+ * It is invoked if errors occur during the rendering phase of any lifecycle
1063
+ * methods or children components.
1064
+ *
1065
+ * DO NOT DELETE this method! Though it is not referenced directly from the code,
1066
+ * it is a required part of the React component lifecycle.
1067
+ */
1068
+ static getDerivedStateFromError(error: Error): State;
1069
+ /**
1070
+ * Display any error in the console
1071
+ * @param error Error object
1072
+ * @param errorInfo Extra information about the error
1073
+ */
1074
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
1075
+ /**
1076
+ * Whenever the `restoreOnChangeOf` property of this component instance
1077
+ * changes, we reset the state to "no error".
1078
+ * @param prevProps Previous property values
1079
+ * @param prevState Previous state
1080
+ * @param snapshot Optional snapshot (not used in this component)
1081
+ */
1082
+ componentDidUpdate(prevProps: Readonly<Props>, prevState: Readonly<State>, snapshot?: any): void;
1083
+ /**
1084
+ * Display an error message if an error occurred during rendering.
1085
+ */
1086
+ render(): string | number | boolean | Iterable<default_2.ReactNode> | JSX_2.Element;
1087
+ }
1088
+
1089
+ declare interface ErrorWithLineColInfo extends Error_2 {
1090
+ line: number;
1091
+ col: number;
1092
+ }
1093
+
1094
+ /** returns a component definition containing the errors.
1095
+ * It is a component and a compound component definition at the same time,
1096
+ * so that it can be used to render the errors for a compound component as well*/
1097
+ declare function errReportComponent(errors: ErrorWithLineColInfo[], fileName: number | string, compoundCompName: string | undefined): any;
1098
+
1099
+ declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | TemplateLiteralExpression | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure | SwitchCase;
1100
+
1101
+ declare type EXPRESSION_STATEMENT = typeof T_EXPRESSION_STATEMENT;
1102
+
1103
+ declare interface ExpressionBase extends ScripNodeBase {
1104
+ parenthesized?: number;
1105
+ }
1106
+
1107
+ declare interface ExpressionStatement extends ScripNodeBase {
1108
+ type: EXPRESSION_STATEMENT;
1109
+ expr: Expression;
1110
+ }
1111
+
1112
+ declare interface Extension {
1113
+ namespace?: string;
1114
+ components?: ComponentExtension[];
1115
+ themes?: ThemeDefinition[];
1116
+ }
1117
+
1118
+ declare type ExtensionRegisteredCallbackFn = (extension: Extension) => void;
1119
+
1120
+ /**
1121
+ * This type describes a font definition resource.
1122
+ */
1123
+ declare type FontDef = {
1124
+ /**
1125
+ * Specifies a name that will be used as the font face value for font properties
1126
+ */
1127
+ fontFamily: string;
1128
+ /**
1129
+ * A fontStyle value. Accepts two values to specify a range that is supported by a font-face,
1130
+ * for example `fontStyle: oblique 20deg 50deg`
1131
+ */
1132
+ fontStyle?: string;
1133
+ /**
1134
+ * A font-weight value. Accepts two values to specify a range that is supported by a font-face,
1135
+ * for example `font-weight: 100 900`
1136
+ */
1137
+ fontWeight?: string;
1138
+ /**
1139
+ * This property determines how a font face is displayed based on whether and when it is downloaded
1140
+ * and ready to use.
1141
+ */
1142
+ fontDisplay?: string;
1143
+ /**
1144
+ * The mime type of the font file
1145
+ */
1146
+ format?: string;
1147
+ /**
1148
+ * Specifies references to font resources.
1149
+ */
1150
+ src: string;
1151
+ } | string;
1152
+
1153
+ declare type FOR_IN_STATEMENT = typeof T_FOR_IN_STATEMENT;
1154
+
1155
+ declare type FOR_OF_STATEMENT = typeof T_FOR_OF_STATEMENT;
1156
+
1157
+ declare type FOR_STATEMENT = typeof T_FOR_STATEMENT;
1158
+
1159
+ declare interface ForInStatement extends ScripNodeBase {
1160
+ type: FOR_IN_STATEMENT;
1161
+ varB: ForVarBinding;
1162
+ id: Identifier;
1163
+ expr: Expression;
1164
+ body: Statement;
1165
+ }
1166
+
1167
+ declare interface ForOfStatement extends ScripNodeBase {
1168
+ type: FOR_OF_STATEMENT;
1169
+ varB: ForVarBinding;
1170
+ id: Identifier;
1171
+ expr: Expression;
1172
+ body: Statement;
1173
+ }
1174
+
1175
+ declare interface ForStatement extends ScripNodeBase {
1176
+ type: FOR_STATEMENT;
1177
+ init?: ExpressionStatement | LetStatement;
1178
+ cond?: Expression;
1179
+ upd?: Expression;
1180
+ body: Statement;
1181
+ }
1182
+
1183
+ declare type ForVarBinding = "let" | "const" | "none";
1184
+
1185
+ declare type FUNCTION_DECLARATION = typeof T_FUNCTION_DECLARATION;
1186
+
1187
+ declare type FUNCTION_INVOCATION_EXPRESSION = typeof T_FUNCTION_INVOCATION_EXPRESSION;
1188
+
1189
+ declare interface FunctionDeclaration extends ScripNodeBase {
1190
+ type: FUNCTION_DECLARATION;
1191
+ id: Identifier;
1192
+ args: Expression[];
1193
+ stmt: BlockStatement;
1194
+ }
1195
+
1196
+ declare interface FunctionInvocationExpression extends ExpressionBase {
1197
+ type: FUNCTION_INVOCATION_EXPRESSION;
1198
+ obj: Expression;
1199
+ arguments: Expression[];
1200
+ }
1201
+
1202
+ declare type GenericToken<T> = {
1203
+ text: string;
1204
+ type: T;
1205
+ startPosition: number;
1206
+ endPosition: number;
1207
+ startLine: number;
1208
+ endLine: number;
1209
+ startColumn: number;
1210
+ endColumn: number;
1211
+ };
1212
+
1213
+ declare function getColor(varName: string, format?: "hex" | "rgb" | "hsl"): string;
1214
+
1215
+ declare type GlobalProps = Record<string, any>;
1216
+
1217
+ declare interface IApiInterceptorContext {
1218
+ isMocked: (url: string) => boolean;
1219
+ }
1220
+
1221
+ declare const Icon: default_2.ForwardRefExoticComponent<IconBaseProps & default_2.RefAttributes<unknown>>;
1222
+
1223
+ declare interface IconBaseProps extends default_2.SVGAttributes<SVGElement> {
1224
+ children?: default_2.ReactNode;
1225
+ color?: string;
1226
+ title?: string;
1227
+ size?: string;
1228
+ isInline?: boolean;
1229
+ fallback?: string;
1230
+ style?: CSSProperties;
1231
+ }
1232
+
1233
+ declare type IconPosition = (typeof iconPositionValues)[number];
1234
+
1235
+ declare const iconPositionValues: readonly ["start", "end"];
1236
+
1237
+ declare type IDENTIFIER = typeof T_IDENTIFIER;
1238
+
1239
+ declare interface Identifier extends ExpressionBase {
1240
+ type: IDENTIFIER;
1241
+ name: string;
1242
+ isGlobal?: boolean;
1243
+ }
1244
+
1245
+ declare type IF_STATEMENT = typeof T_IF_STATEMENT;
1246
+
1247
+ declare interface IfStatement extends ScripNodeBase {
1248
+ type: IF_STATEMENT;
1249
+ cond: Expression;
1250
+ thenB: Statement;
1251
+ elseB?: Statement;
1252
+ }
1253
+
1254
+ declare type InterceptorOperationDef = {
1255
+ method: "get" | "post" | "put" | "delete";
1256
+ url: string | Array<string>;
1257
+ handler: string;
1258
+ requestShape?: any;
1259
+ responseShape?: any;
1260
+ pathParamTypes?: Record<string, string>;
1261
+ queryParamTypes?: Record<string, string>;
1262
+ successStatusCode?: number;
1263
+ };
1264
+
1265
+ declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
1266
+
1267
+ /**
1268
+ * Each component is rendered in a particular layout context (for example, within a stack). This
1269
+ * type provides information about that context and the operations that render children in it.
1270
+ */
1271
+ declare type LayoutContext<T extends ComponentDef = ComponentDef> = {
1272
+ /**
1273
+ * The type of the layout context
1274
+ */
1275
+ type?: string;
1276
+ /**
1277
+ * This function allows the React representation of a particular child node to be wrapped in
1278
+ * whatever React components to accommodate the current layout context. When the engine is about to
1279
+ * render children in a particular layout context, it checks the existence of this function.
1280
+ * If declared, the engine invokes it.
1281
+ * @param context Rendering context
1282
+ * @param renderedChild The React node representing the rendered child
1283
+ * @param metadata The metadata of the child component
1284
+ * @returns The wrapped React node
1285
+ */
1286
+ wrapChild?: (context: RendererContext<T>, renderedChild: ReactNode, metadata?: ComponentMetadata) => ReactNode;
1287
+ /**
1288
+ * Arbitrary props extending the layout context
1289
+ */
1290
+ [key: string]: any;
1291
+ };
1292
+
1293
+ declare type LET_STATEMENT = typeof T_LET_STATEMENT;
1294
+
1295
+ declare interface LetStatement extends ScripNodeBase {
1296
+ type: LET_STATEMENT;
1297
+ decls: VarDeclaration[];
1298
+ }
1299
+
1300
+ declare type LITERAL = typeof T_LITERAL;
1301
+
1302
+ declare interface Literal extends ExpressionBase {
1303
+ type: LITERAL;
1304
+ value: any;
1305
+ }
1306
+
1307
+ declare type LogContextType = {
1308
+ logs: LogEntry[];
1309
+ addLog: (args: any[]) => void;
1310
+ };
1311
+
1312
+ declare type LogEntry = {
1313
+ timestamp: Date;
1314
+ args: any[];
1315
+ };
1316
+
1317
+ declare type LoggedInUserDto = {
1318
+ id: number;
1319
+ email: string;
1320
+ name: string;
1321
+ imageRelativeUrl: string;
1322
+ permissions: Record<string, string>;
1323
+ };
1324
+
1325
+ /**
1326
+ * This type represents the options to use for looking up actions.
1327
+ */
1328
+ declare type LookupActionOptions = {
1329
+ /**
1330
+ * This property (by default, true) indicates that any error should be signed while
1331
+ * executing an event handler. Set it to `false` to suppress error indication.
1332
+ */
1333
+ signError?: boolean;
1334
+ /**
1335
+ * We can use the event's name to get info about a particular event's progress. Note: Multiple
1336
+ * events can run simultaneously.
1337
+ */
1338
+ eventName?: string;
1339
+ /**
1340
+ * By default, we cache resolved action functions. This property signs that we don't want to cache
1341
+ * this function. Use true on one-off handlers, like the ones in Actions (e.g., `MutateAction`).
1342
+ */
1343
+ ephemeral?: boolean;
1344
+ /**
1345
+ * This property declares the script code to use as a default for a particular event handler.
1346
+ */
1347
+ defaultHandler?: string;
1348
+ context?: any;
1349
+ };
1350
+
1351
+ /**
1352
+ * This function resolves an action by its name with the specified options and returns the action
1353
+ * function if found. Otherwise, return undefined.
1354
+ */
1355
+ declare type LookupAsyncFn = (action: string | undefined, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
1356
+
1357
+ /**
1358
+ * This function resolves an action by its name (within the component node that runs the action)
1359
+ * with the specified options and returns the action function if found. Otherwise, return undefined.
1360
+ */
1361
+ declare type LookupAsyncFnInner = (action: string | undefined,
1362
+ /**
1363
+ * The unique identifier of the container that the action is executed in.
1364
+ */
1365
+ uid: symbol, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
1366
+
1367
+ /**
1368
+ * This function retrieves an async function for a particular component's specified event to be
1369
+ * invoked as an event handler (`undefined` if the particular event handler is not defined).
1370
+ */
1371
+ declare type LookupEventHandlerFn<TMd extends ComponentMetadata = ComponentMetadata> = (eventName: keyof NonNullable<TMd["events"]>, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
1372
+
1373
+ /**
1374
+ * This function resolves a sync action by its name and returns the action function if it is found.
1375
+ * Otherwise, it returns undefined.
1376
+ */
1377
+ declare type LookupSyncFn = (action: string | undefined) => SyncFunction | undefined;
1378
+
1379
+ declare type MediaBreakpointType = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
1380
+
1381
+ declare type MediaSize = {
1382
+ phone: boolean;
1383
+ landscapePhone: boolean;
1384
+ tablet: boolean;
1385
+ desktop: boolean;
1386
+ largeDesktop: boolean;
1387
+ xlDesktop: boolean;
1388
+ smallScreen: boolean;
1389
+ largeScreen: boolean;
1390
+ size: MediaBreakpointType;
1391
+ sizeIndex: number;
1392
+ };
1393
+
1394
+ declare type MEMBER_ACCESS_EXPRESSION = typeof T_MEMBER_ACCESS_EXPRESSION;
1395
+
1396
+ declare interface MemberAccessExpression extends ExpressionBase {
1397
+ type: MEMBER_ACCESS_EXPRESSION;
1398
+ obj: Expression;
1399
+ member: string;
1400
+ opt?: boolean;
1401
+ }
1402
+
1403
+ declare type Message = ValueOrFunction<Renderable, Toast>;
1404
+
1405
+ /**
1406
+ * Represents a module error
1407
+ */
1408
+ declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
1409
+
1410
+ declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, withFrame }: NestedAppProps): JSX_2.Element;
1411
+
1412
+ declare type NestedAppProps = {
1413
+ api?: any;
1414
+ app: string;
1415
+ components?: any[];
1416
+ config?: any;
1417
+ activeTone?: ThemeTone;
1418
+ activeTheme?: string;
1419
+ title?: string;
1420
+ height?: string | number;
1421
+ allowPlaygroundPopup?: boolean;
1422
+ withFrame?: boolean;
1423
+ };
1424
+
1425
+ declare type NO_ARG_EXPRESSION = typeof T_NO_ARG_EXPRESSION;
1426
+
1427
+ declare interface NoArgExpression extends ExpressionBase {
1428
+ type: NO_ARG_EXPRESSION;
1429
+ }
1430
+
1431
+ declare type OBJECT_DESTRUCTURE = typeof T_OBJECT_DESTRUCTURE;
1432
+
1433
+ declare type OBJECT_LITERAL = typeof T_OBJECT_LITERAL;
1434
+
1435
+ declare interface ObjectDestructure extends DestructureBase {
1436
+ type: OBJECT_DESTRUCTURE;
1437
+ id: string;
1438
+ alias?: string;
1439
+ }
1440
+
1441
+ declare interface ObjectLiteral extends ExpressionBase {
1442
+ type: OBJECT_LITERAL;
1443
+ props: (SpreadExpression | [Expression, Expression])[];
1444
+ }
1445
+
1446
+ declare type OrientationOptions = (typeof orientationOptionValues)[number];
1447
+
1448
+ declare const orientationOptionValues: readonly ["horizontal", "vertical"];
1449
+
1450
+ declare interface ParentRenderContext {
1451
+ renderChild: RenderChildFn;
1452
+ children?: ComponentDef[];
1453
+ props?: Record<string, any>;
1454
+ }
1455
+
1456
+ /**
1457
+ * This function extracts CSS variables from the specified SCSS input. It uses a hack to convert the CSS input to JSON
1458
+ * and then calls a JSON parser to create the desired object.
1459
+ * @param scssStr The scss input
1460
+ */
1461
+ declare function parseScssVar(scssStr: any): any;
1462
+
1463
+ declare type POSTFIX_OP_EXPRESSION = typeof T_POSTFIX_OP_EXPRESSION;
1464
+
1465
+ declare interface PostfixOpExpression extends ExpressionBase {
1466
+ type: POSTFIX_OP_EXPRESSION;
1467
+ op: PrefixOpSymbol;
1468
+ expr: Expression;
1469
+ }
1470
+
1471
+ declare type PREFIX_OP_EXPRESSION = typeof T_PREFIX_OP_EXPRESSION;
1472
+
1473
+ declare interface PrefixOpExpression extends ExpressionBase {
1474
+ type: PREFIX_OP_EXPRESSION;
1475
+ op: PrefixOpSymbol;
1476
+ expr: Expression;
1477
+ }
1478
+
1479
+ declare type PrefixOpSymbol = "++" | "--";
1480
+
1481
+ /** Contains the compilation result of a project */
1482
+ declare type ProjectCompilation = {
1483
+ /** The compiled Main.xmlui file (with its optional code behind) */
1484
+ entrypoint: EntrypointCompilation;
1485
+ /** The compiled component files (with their optional code behind) */
1486
+ components: ComponentCompilation[];
1487
+ /** The compiled theme files */
1488
+ themes: Record<string, ThemeDefinition>;
1489
+ };
1490
+
1491
+ /**
1492
+ * This type represents the description of a property value, which can be a string, a number,
1493
+ * or an object with a value and a description. This type is used in the metadata of a component.
1494
+ */
1495
+ declare type PropertyValueDescription = string | number | {
1496
+ value: string | number;
1497
+ description: string;
1498
+ };
1499
+
1500
+ declare type PropertyValueType = "boolean" | "string" | "number" | "any" | "ComponentDef";
1501
+
1502
+ declare interface Props {
1503
+ children: ReactNode;
1504
+ node?: ComponentLike;
1505
+ location?: string;
1506
+ }
1507
+
1508
+ declare type Props_2 = {
1509
+ children: ReactNode;
1510
+ orientation?: string;
1511
+ uid?: string;
1512
+ horizontalAlignment?: string;
1513
+ verticalAlignment?: string;
1514
+ style?: CSSProperties;
1515
+ reverse?: boolean;
1516
+ hoverContainer?: boolean;
1517
+ visibleOnHover?: boolean;
1518
+ onClick?: any;
1519
+ onMount?: any;
1520
+ };
1521
+
1522
+ declare type Props_3 = {
1523
+ activeTab?: number;
1524
+ orientation?: "horizontal" | "vertical";
1525
+ tabRenderer?: (item: {
1526
+ label: string;
1527
+ isActive: boolean;
1528
+ }) => ReactNode;
1529
+ style?: CSSProperties;
1530
+ children?: ReactNode;
1531
+ registerComponentApi?: RegisterComponentApiFn;
1532
+ className?: string;
1533
+ distributeEvenly?: boolean;
1534
+ };
1535
+
1536
+ declare type REACTIVE_VAR_DECLARATION = typeof T_REACTIVE_VAR_DECLARATION;
1537
+
1538
+ declare interface ReactiveVarDeclaration extends ExpressionBase {
1539
+ type: REACTIVE_VAR_DECLARATION;
1540
+ id: Identifier;
1541
+ expr: Expression;
1542
+ }
1543
+
1544
+ /**
1545
+ * This type represents a function that registers all API endpoints of a particular component.
1546
+ */
1547
+ declare type RegisterComponentApiFn = (componentApi: ComponentApi) => void;
1548
+
1549
+ declare type RenderChildFn<L extends ComponentDef = ComponentDef> = (children?: ComponentDef | ComponentDef[] | DynamicChildComponentDef | DynamicChildComponentDef[] | string, layoutContext?: LayoutContext<L>, parentRenderContext?: ParentRenderContext, uidInfoRef?: RefObject<Record<string, any>>, ref?: ForwardedRef<any>) => ReactNode | ReactNode[];
1550
+
1551
+ /**
1552
+ * This interface defines the renderer context for the exposed components of the XMLUI framework.
1553
+ */
1554
+ declare interface RendererContext<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentRendererContextBase<TMd> {
1555
+ /**
1556
+ * The unique identifier of the component instance
1557
+ */
1558
+ uid: symbol;
1559
+ /**
1560
+ * A component invokes this function to change its internal state
1561
+ */
1562
+ updateState: UpdateStateFn;
1563
+ /**
1564
+ * When a component wants to access a property value (which may contain a binding expression to
1565
+ * evaluate), it must use this property to get the current value.
1566
+ */
1567
+ extractValue: ValueExtractor;
1568
+ /**
1569
+ * This function gets a physical resource URL according to the provided logical URL.
1570
+ */
1571
+ extractResourceUrl: (url?: string) => string | undefined;
1572
+ /**
1573
+ * This function gets an async executable function that handles an event.
1574
+ */
1575
+ lookupEventHandler: LookupEventHandlerFn<TMd>;
1576
+ /**
1577
+ * A component can register its APIs with this function
1578
+ */
1579
+ registerComponentApi: RegisterComponentApiFn;
1580
+ /**
1581
+ * This function obtains an action by its name with the specified options
1582
+ */
1583
+ lookupAction: LookupAsyncFn;
1584
+ /**
1585
+ * This function retrieves a sync function the component can use as a callback
1586
+ */
1587
+ lookupSyncCallback: LookupSyncFn;
1588
+ layoutCss: CSSProperties;
1589
+ }
1590
+
1591
+ declare type RETURN_STATEMENT = typeof T_RETURN_STATEMENT;
1592
+
1593
+ declare interface ReturnStatement extends ScripNodeBase {
1594
+ type: RETURN_STATEMENT;
1595
+ expr?: Expression;
1596
+ }
1597
+
1598
+ declare type SchemaDescriptor = {
1599
+ tables: Array<TableDescriptor>;
1600
+ relationships?: any;
1601
+ dtos?: any;
1602
+ };
1603
+
1604
+ declare interface ScripNodeBase {
1605
+ type: ScriptNode["type"];
1606
+ nodeId: number;
1607
+ startToken?: ScriptingToken;
1608
+ endToken?: ScriptingToken;
1609
+ }
1610
+
1611
+ /**
1612
+ * This interface holds the properties representing a scriptable component definition.
1613
+ */
1614
+ declare interface Scriptable {
1615
+ /**
1616
+ * This property holds the text defined in all <script> sections attached to a component.
1617
+ */
1618
+ script?: string;
1619
+ /**
1620
+ * This property holds the parsed form of scripts stored in code-behind files.
1621
+ */
1622
+ scriptCollected?: CollectedDeclarations;
1623
+ /**
1624
+ * This property holds errors coming from parsing the code-behind scripts.
1625
+ */
1626
+ scriptError?: any;
1627
+ }
1628
+
1629
+ declare type ScriptingToken = GenericToken<TokenType>;
1630
+
1631
+ declare type ScriptNode = Statement | Expression;
1632
+
1633
+ declare interface ScriptParserErrorMessage {
1634
+ code: ScriptParsingErrorCodes;
1635
+ text: string;
1636
+ position?: number;
1637
+ line?: number;
1638
+ column?: number;
1639
+ }
1640
+
1641
+ declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030" | "W031";
1642
+
1643
+ declare type SEQUENCE_EXPRESSION = typeof T_SEQUENCE_EXPRESSION;
1644
+
1645
+ declare interface SequenceExpression extends ExpressionBase {
1646
+ type: SEQUENCE_EXPRESSION;
1647
+ exprs: Expression[];
1648
+ loose?: boolean;
1649
+ }
1650
+
1651
+ declare const sizeValues: string[];
1652
+
1653
+ declare const Spinner: ForwardRefExoticComponent<SpinnerProps & RefAttributes<HTMLDivElement>>;
1654
+
1655
+ declare type SpinnerProps = {
1656
+ delay?: number;
1657
+ fullScreen?: boolean;
1658
+ style?: CSSProperties;
1659
+ };
1660
+
1661
+ declare const Splitter: ({ initialPrimarySize, minPrimarySize, maxPrimarySize, orientation, children, style, swapped, floating, splitterTemplate, resize, }: SplitterProps) => JSX_2.Element;
1662
+
1663
+ declare type SplitterProps = {
1664
+ children: default_2.ReactNode[] | default_2.ReactNode;
1665
+ style?: default_2.CSSProperties;
1666
+ splitterTemplate?: default_2.ReactNode;
1667
+ orientation?: OrientationOptions;
1668
+ floating?: boolean;
1669
+ resize?: (sizes: [number, number]) => void;
1670
+ swapped?: boolean;
1671
+ initialPrimarySize?: string;
1672
+ minPrimarySize?: string;
1673
+ maxPrimarySize?: string;
1674
+ };
1675
+
1676
+ declare type SPREAD_EXPRESSION = typeof T_SPREAD_EXPRESSION;
1677
+
1678
+ declare interface SpreadExpression extends ExpressionBase {
1679
+ type: SPREAD_EXPRESSION;
1680
+ expr: Expression;
1681
+ }
1682
+
1683
+ declare const Stack: ForwardRefExoticComponent<Props_2 & RefAttributes<any>>;
1684
+
1685
+ /**
1686
+ * This React component represents a standalone app that implements a web
1687
+ * application with xmlui components. A StandaloneApp instance uses a
1688
+ * AppRoot wrapped into an ApiInterceptor.
1689
+ *
1690
+ * AppRoot is responsible for rendering the app (using an internal
1691
+ * representation); ApiInterceptor can emulate some backend functionality
1692
+ * running in the browser.
1693
+ */
1694
+ declare function StandaloneApp({ appDef, decorateComponentsWithTestId, debugEnabled, runtime, extensionManager, }: StandaloneAppProps): JSX_2.Element;
1695
+
1696
+ declare type StandaloneAppDescription = {
1697
+ name?: string;
1698
+ version?: string;
1699
+ entryPoint?: ComponentLike;
1700
+ components?: CompoundComponentDef[];
1701
+ themes?: ThemeDefinition[];
1702
+ defaultTheme?: string;
1703
+ defaultTone?: string;
1704
+ resources?: Record<string, string>;
1705
+ resourceMap?: Record<string, string>;
1706
+ appGlobals?: Record<string, any>;
1707
+ apiInterceptor?: ApiInterceptorDefinition;
1708
+ sources?: Record<string, string>;
1709
+ };
1710
+
1711
+ declare type StandaloneAppProps = {
1712
+ appDef?: StandaloneAppDescription;
1713
+ decorateComponentsWithTestId?: boolean;
1714
+ debugEnabled?: boolean;
1715
+ runtime?: any;
1716
+ extensionManager?: StandaloneExtensionManager;
1717
+ };
1718
+
1719
+ /**
1720
+ * This class allows external component libraries to add their components to
1721
+ * the xmlui component registry. The framework resolves the components used
1722
+ * in an application markup with this registry.
1723
+ */
1724
+ declare class StandaloneExtensionManager {
1725
+ subscriptions: Set<ExtensionRegisteredCallbackFn>;
1726
+ registeredExtensions: Array<Extension>;
1727
+ constructor();
1728
+ /**
1729
+ * You can add a callback function invoked whenever a new component is added
1730
+ * to the registry. When you register a new callback function, the component
1731
+ * manager automatically invokes it for all components already in the
1732
+ * registry.
1733
+ * @param cb Function to call when a new component is registered
1734
+ */
1735
+ subscribeToRegistrations(cb: ExtensionRegisteredCallbackFn): void;
1736
+ /**
1737
+ * You can remove a function added by `subscribeToRegistrations`. After
1738
+ * calling this method, the particular callback function won't be invoked
1739
+ * for a new component registration.
1740
+ * @param cb Function to call when a new component is registered
1741
+ */
1742
+ unSubscribeFromRegistrations(cb: ExtensionRegisteredCallbackFn): void;
1743
+ registerExtension(component: Extension | Extension[]): void;
1744
+ }
1745
+
1746
+ declare type StandaloneJsonConfig = {
1747
+ name?: string;
1748
+ appGlobals?: Record<string, any>;
1749
+ entryPoint?: string;
1750
+ components?: string[];
1751
+ themes?: string[];
1752
+ defaultTheme?: string;
1753
+ resources?: Record<string, string>;
1754
+ resourceMap?: Record<string, string>;
1755
+ apiInterceptor?: ApiInterceptorDefinition;
1756
+ };
1757
+
1758
+ /**
1759
+ * This function injects the StandaloneApp component into a React app. It looks
1760
+ * up a component with the "root" id as the host of the standalone app. If such
1761
+ * an element does not exist, it creates a `<div id="root">` element.
1762
+ * @param runtime The app's runtime representation
1763
+ * @param components The related component's runtime representation
1764
+ * @returns The content's root element
1765
+ */
1766
+ declare function startApp(runtime: any, extensions?: Extension[] | Extension, extensionManager?: StandaloneExtensionManager): Root;
1767
+
1768
+ declare type State = {
1769
+ hasError: boolean;
1770
+ error: Error | null;
1771
+ };
1772
+
1773
+ declare type Statement = BlockStatement | EmptyStatement | ExpressionStatement | ArrowExpressionStatement | LetStatement | ConstStatement | VarStatement | IfStatement | ReturnStatement | BreakStatement | ContinueStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ThrowStatement | TryStatement | SwitchStatement | FunctionDeclaration;
1774
+
1775
+ declare type SWITCH_CASE = typeof T_SWITCH_CASE;
1776
+
1777
+ declare type SWITCH_STATEMENT = typeof T_SWITCH_STATEMENT;
1778
+
1779
+ declare interface SwitchCase extends ExpressionBase {
1780
+ type: SWITCH_CASE;
1781
+ caseE?: Expression;
1782
+ stmts?: Statement[];
1783
+ }
1784
+
1785
+ declare interface SwitchStatement extends ScripNodeBase {
1786
+ type: SWITCH_STATEMENT;
1787
+ expr: Expression;
1788
+ cases: SwitchCase[];
1789
+ }
1790
+
1791
+ /**
1792
+ * XMLUI executes some code synchronously. This type defines those functions' signature
1793
+ */
1794
+ declare type SyncFunction = (...args: any) => any;
1795
+
1796
+ declare const T_ARRAY_DESTRUCTURE = 202;
1797
+
1798
+ declare const T_ARRAY_LITERAL = 110;
1799
+
1800
+ declare const T_ARROW_EXPRESSION = 115;
1801
+
1802
+ declare const T_ARROW_EXPRESSION_STATEMENT = 4;
1803
+
1804
+ declare const T_ASSIGNMENT_EXPRESSION = 113;
1805
+
1806
+ declare const T_BINARY_EXPRESSION = 101;
1807
+
1808
+ declare const T_BLOCK_STATEMENT = 1;
1809
+
1810
+ declare const T_BREAK_STATEMENT = 10;
1811
+
1812
+ declare const T_CALCULATED_MEMBER_ACCESS_EXPRESSION = 106;
1813
+
1814
+ declare const T_CONDITIONAL_EXPRESSION = 103;
1815
+
1816
+ declare const T_CONST_STATEMENT = 6;
1817
+
1818
+ declare const T_CONTINUE_STATEMENT = 11;
1819
+
1820
+ declare const T_DESTRUCTURE = 201;
1821
+
1822
+ declare const T_DO_WHILE_STATEMENT = 13;
1823
+
1824
+ declare const T_EMPTY_STATEMENT = 2;
1825
+
1826
+ declare const T_EXPRESSION_STATEMENT = 3;
1827
+
1828
+ declare const T_FOR_IN_STATEMENT = 15;
1829
+
1830
+ declare const T_FOR_OF_STATEMENT = 16;
1831
+
1832
+ declare const T_FOR_STATEMENT = 14;
1833
+
1834
+ declare const T_FUNCTION_DECLARATION = 20;
1835
+
1836
+ declare const T_FUNCTION_INVOCATION_EXPRESSION = 104;
1837
+
1838
+ declare const T_IDENTIFIER = 107;
1839
+
1840
+ declare const T_IF_STATEMENT = 8;
1841
+
1842
+ declare const T_LET_STATEMENT = 5;
1843
+
1844
+ declare const T_LITERAL = 109;
1845
+
1846
+ declare const T_MEMBER_ACCESS_EXPRESSION = 105;
1847
+
1848
+ declare const T_NO_ARG_EXPRESSION = 114;
1849
+
1850
+ declare const T_OBJECT_DESTRUCTURE = 203;
1851
+
1852
+ declare const T_OBJECT_LITERAL = 111;
1853
+
1854
+ declare const T_POSTFIX_OP_EXPRESSION = 117;
1855
+
1856
+ declare const T_PREFIX_OP_EXPRESSION = 116;
1857
+
1858
+ declare const T_REACTIVE_VAR_DECLARATION = 118;
1859
+
1860
+ declare const T_RETURN_STATEMENT = 9;
1861
+
1862
+ declare const T_SEQUENCE_EXPRESSION = 102;
1863
+
1864
+ declare const T_SPREAD_EXPRESSION = 112;
1865
+
1866
+ declare const T_SWITCH_CASE = 204;
1867
+
1868
+ declare const T_SWITCH_STATEMENT = 19;
1869
+
1870
+ declare const T_TEMPLATE_LITERAL_EXPRESSION = 108;
1871
+
1872
+ declare const T_THROW_STATEMENT = 17;
1873
+
1874
+ declare const T_TRY_STATEMENT = 18;
1875
+
1876
+ declare const T_UNARY_EXPRESSION = 100;
1877
+
1878
+ declare const T_VAR_DECLARATION = 200;
1879
+
1880
+ declare const T_VAR_STATEMENT = 7;
1881
+
1882
+ declare const T_WHILE_STATEMENT = 12;
1883
+
1884
+ declare type Tab = {
1885
+ label: string;
1886
+ children?: ReactNode;
1887
+ style?: CSSProperties;
1888
+ };
1889
+
1890
+ declare const TabItemComponent: ForwardRefExoticComponent<Tab & RefAttributes<HTMLDivElement>>;
1891
+
1892
+ declare type TableDescriptor = {
1893
+ name: string;
1894
+ fields?: Record<string, any>;
1895
+ pk: Array<string>;
1896
+ indexes?: Array<string>;
1897
+ };
1898
+
1899
+ declare const Tabs: ForwardRefExoticComponent<Props_3 & RefAttributes<HTMLDivElement>>;
1900
+
1901
+ declare type TEMPLATE_LITERAL_EXPRESSION = typeof T_TEMPLATE_LITERAL_EXPRESSION;
1902
+
1903
+ declare interface TemplateLiteralExpression extends ExpressionBase {
1904
+ type: TEMPLATE_LITERAL_EXPRESSION;
1905
+ segments: (Literal | Expression)[];
1906
+ }
1907
+
1908
+ declare const Text_2: default_2.ForwardRefExoticComponent<Omit<TextProps, "ref"> & default_2.RefAttributes<unknown>>;
1909
+
1910
+ declare type TextProps = {
1911
+ uid?: string;
1912
+ children?: default_2.ReactNode;
1913
+ variant?: TextVariant;
1914
+ maxLines?: number;
1915
+ preserveLinebreaks?: boolean;
1916
+ ellipses?: boolean;
1917
+ style?: CSSProperties;
1918
+ [variantSpecificProps: string]: any;
1919
+ };
1920
+
1921
+ declare type TextVariant = (typeof TextVariantKeys)[number];
1922
+
1923
+ declare const TextVariantKeys: readonly ["abbr", "cite", "code", "codefence", "deleted", "inserted", "keyboard", "marked", "sample", "sub", "sup", "var", "strong", "em", "mono", "title", "subtitle", "small", "caption", "placeholder", "paragraph", "subheading", "tableheading", "secondary"];
1924
+
1925
+ /**
1926
+ * This type represents a theme definition object. Theme files can use this object's JSON-serialized
1927
+ * format to define an app theme; an app can have multiple theme files.
1928
+ */
1929
+ declare interface ThemeDefinition extends ThemeDefinitionDetails {
1930
+ /**
1931
+ * Theme id
1932
+ */
1933
+ id: string;
1934
+ /**
1935
+ * Optional theme name
1936
+ */
1937
+ name?: string;
1938
+ /**
1939
+ * A theme can extend existing themes. The extension means that the theme variable values defined
1940
+ * in the new theme override the base theme's variable values.
1941
+ */
1942
+ extends?: string | Array<string>;
1943
+ /**
1944
+ * This property defines the tone-dependent theme variable values. When a theme variable value is
1945
+ * resolved, the common theme variable values are overridden with their theme-specific values.
1946
+ */
1947
+ tones?: Record<string | ThemeTone, ThemeDefinitionDetails>;
1948
+ }
1949
+
1950
+ declare interface ThemeDefinitionDetails {
1951
+ themeVars?: Record<string, string>;
1952
+ resources?: Record<string, string | FontDef>;
1953
+ }
1954
+
1955
+ declare type ThemeIdDescriptor = {
1956
+ id: string;
1957
+ defaultValue?: DefaultValueDescriptor;
1958
+ };
1959
+
1960
+ /**
1961
+ * When rendering any part of an XMLUI app, the styles to apply are enclosed in a theme scope.
1962
+ * Most apps use a single theme scope that includes all nodes within the root app node. However,
1963
+ * any app can use multiple theme scopes.
1964
+ *
1965
+ * The scope determines how the app applies styles to the particular section. This type defines
1966
+ * the properties of such a theme scope.
1967
+ */
1968
+ declare type ThemeScope = {
1969
+ /**
1970
+ * Gets the id of the scope's theme
1971
+ */
1972
+ activeThemeId: string;
1973
+ /**
1974
+ * Gets the current tone of the scope's theme
1975
+ */
1976
+ activeThemeTone: ThemeTone;
1977
+ /**
1978
+ * The HTML element that works as the root of the theme's scope.
1979
+ */
1980
+ root: HTMLElement | undefined;
1981
+ /**
1982
+ * The active theme in the current scope
1983
+ */
1984
+ activeTheme: ThemeDefinition;
1985
+ /**
1986
+ * This hash object stores the CSS theme variable names with their CSS values definition,
1987
+ * like "--xmlui-verticalAlign-Text-sub": "sub";
1988
+ * "--xmlui-backgroundColor": "var(--xmlui-color-surface-50)"
1989
+ */
1990
+ themeStyles: Record<string, string>;
1991
+ /**
1992
+ * This hash object stores the theme variable names with their CSS values definition, like
1993
+ * "verticalAlign-Text-sub": "sub"; "backgroundColor": "var(--xmlui-color-surface-50)".
1994
+ */
1995
+ themeVars: Record<string, string>;
1996
+ /**
1997
+ * This function retrieves the physical path of the provided resource. The path can be used
1998
+ * as a URL in HTML tags, like in the `src` attribute of `<img>`.
1999
+ * @param resourceString The recource name to resolve to an URL
2000
+ */
2001
+ getResourceUrl: (resourceString?: string) => string | undefined;
2002
+ /**
2003
+ * This function gets the value of the specified theme variable.
2004
+ * @param themeVar Theme variable name to resolve
2005
+ */
2006
+ getThemeVar: (themeVar: string) => string | undefined;
2007
+ };
2008
+
2009
+ /**
2010
+ * This type describes one the available theme tones.
2011
+ */
2012
+ declare type ThemeTone = (typeof ThemeToneKeys)[number];
2013
+
2014
+ /**
2015
+ * Each theme can have a light or a dark tone.
2016
+ */
2017
+ declare const ThemeToneKeys: readonly ["light", "dark"];
2018
+
2019
+ declare type THROW_STATEMENT = typeof T_THROW_STATEMENT;
2020
+
2021
+ declare interface ThrowStatement extends ScripNodeBase {
2022
+ type: THROW_STATEMENT;
2023
+ expr: Expression;
2024
+ }
2025
+
2026
+ declare type ToastHandler = (message: Message, options?: ToastOptions) => string;
2027
+
2028
+ /**
2029
+ * Converts the specified themeID to a CSS var string
2030
+ * @param c segment to convert
2031
+ */
2032
+ declare function toCssVar(c: string | ThemeIdDescriptor): string;
2033
+
2034
+ declare enum TokenType {
2035
+ Eof = -1,
2036
+ Ws = -2,
2037
+ BlockComment = -3,
2038
+ EolComment = -4,
2039
+ Unknown = 0,
2040
+ LParent = 1,
2041
+ RParent = 2,
2042
+ Identifier = 3,
2043
+ Exponent = 4,
2044
+ Divide = 5,
2045
+ Multiply = 6,
2046
+ Remainder = 7,
2047
+ Plus = 8,
2048
+ Minus = 9,
2049
+ BitwiseXor = 10,
2050
+ BitwiseOr = 11,
2051
+ LogicalOr = 12,
2052
+ BitwiseAnd = 13,
2053
+ LogicalAnd = 14,
2054
+ IncOp = 15,
2055
+ DecOp = 16,
2056
+ Assignment = 17,
2057
+ AddAssignment = 18,
2058
+ SubtractAssignment = 19,
2059
+ ExponentAssignment = 20,
2060
+ MultiplyAssignment = 21,
2061
+ DivideAssignment = 22,
2062
+ RemainderAssignment = 23,
2063
+ ShiftLeftAssignment = 24,
2064
+ ShiftRightAssignment = 25,
2065
+ SignedShiftRightAssignment = 26,
2066
+ BitwiseAndAssignment = 27,
2067
+ BitwiseXorAssignment = 28,
2068
+ BitwiseOrAssignment = 29,
2069
+ LogicalAndAssignment = 30,
2070
+ LogicalOrAssignment = 31,
2071
+ NullCoalesceAssignment = 32,
2072
+ Semicolon = 33,
2073
+ Comma = 34,
2074
+ Colon = 35,
2075
+ LSquare = 36,
2076
+ RSquare = 37,
2077
+ QuestionMark = 38,
2078
+ NullCoalesce = 39,
2079
+ OptionalChaining = 40,
2080
+ BinaryNot = 41,
2081
+ LBrace = 42,
2082
+ RBrace = 43,
2083
+ Equal = 44,
2084
+ StrictEqual = 45,
2085
+ LogicalNot = 46,
2086
+ NotEqual = 47,
2087
+ StrictNotEqual = 48,
2088
+ LessThan = 49,
2089
+ LessThanOrEqual = 50,
2090
+ ShiftLeft = 51,
2091
+ GreaterThan = 52,
2092
+ GreaterThanOrEqual = 53,
2093
+ ShiftRight = 54,
2094
+ SignedShiftRight = 55,
2095
+ Dot = 56,
2096
+ Spread = 57,
2097
+ Global = 58,
2098
+ Backtick = 59,
2099
+ DollarLBrace = 60,
2100
+ Arrow = 61,
2101
+ DecimalLiteral = 62,
2102
+ HexadecimalLiteral = 63,
2103
+ BinaryLiteral = 64,
2104
+ RealLiteral = 65,
2105
+ StringLiteral = 66,
2106
+ Infinity = 67,
2107
+ NaN = 68,
2108
+ True = 69,
2109
+ False = 70,
2110
+ Typeof = 71,
2111
+ Null = 72,
2112
+ Undefined = 73,
2113
+ In = 74,
2114
+ Let = 75,
2115
+ Const = 76,
2116
+ Var = 77,
2117
+ If = 78,
2118
+ Else = 79,
2119
+ Return = 80,
2120
+ Break = 81,
2121
+ Continue = 82,
2122
+ Do = 83,
2123
+ While = 84,
2124
+ For = 85,
2125
+ Of = 86,
2126
+ Try = 87,
2127
+ Catch = 88,
2128
+ Finally = 89,
2129
+ Throw = 90,
2130
+ Switch = 91,
2131
+ Case = 92,
2132
+ Default = 93,
2133
+ Delete = 94,
2134
+ Function = 95,
2135
+ As = 96,
2136
+ From = 97
2137
+ }
2138
+
2139
+ declare type TrackContainerHeight = "auto" | "fixed";
2140
+
2141
+ declare interface TreeNode {
2142
+ uid: string;
2143
+ key: string;
2144
+ path: any[];
2145
+ subPath?: string;
2146
+ displayName?: string;
2147
+ children?: TreeNode[];
2148
+ parentIds: string[];
2149
+ selectable: boolean;
2150
+ groupKey?: string;
2151
+ [x: string]: any;
2152
+ }
2153
+
2154
+ declare type TRY_STATEMENT = typeof T_TRY_STATEMENT;
2155
+
2156
+ declare interface TryStatement extends ScripNodeBase {
2157
+ type: TRY_STATEMENT;
2158
+ tryB: BlockStatement;
2159
+ catchB?: BlockStatement;
2160
+ catchV?: Identifier;
2161
+ finallyB?: BlockStatement;
2162
+ }
2163
+
2164
+ declare type UNARY_EXPRESSION = typeof T_UNARY_EXPRESSION;
2165
+
2166
+ declare interface UnaryExpression extends ExpressionBase {
2167
+ type: UNARY_EXPRESSION;
2168
+ op: UnaryOpSymbols;
2169
+ expr: Expression;
2170
+ }
2171
+
2172
+ declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
2173
+
2174
+ /**
2175
+ * This function updates the state of a component.
2176
+ * @param componentState The new state of the component
2177
+ */
2178
+ declare type UpdateStateFn = (componentState: any, options?: any) => void;
2179
+
2180
+ declare function useColors(...colorNames: (string | ColorDef)[]): Record<string, string>;
2181
+
2182
+ declare function useDevTools(): {
2183
+ projectCompilation: ProjectCompilation;
2184
+ inspectedNode: any;
2185
+ sources: Record<string, string>;
2186
+ setIsOpen: (isOpen: boolean) => void;
2187
+ devToolsSize: number;
2188
+ setDevToolsSize: (size: number) => void;
2189
+ devToolsSide: "left" | "right" | "bottom";
2190
+ setDevToolsSide: (side: "left" | "right" | "bottom") => void;
2191
+ devToolsEnabled: boolean;
2192
+ mockApi: any;
2193
+ };
2194
+
2195
+ declare const useLogger: () => LogContextType;
2196
+
2197
+ declare function useTheme(): ThemeScope;
2198
+
2199
+ /**
2200
+ * This type represent the function that extracts the value from a component property
2201
+ */
2202
+ declare type ValueExtractor = {
2203
+ /**
2204
+ * Get a value (any) from a component property
2205
+ * @param expression Value expression
2206
+ * @param strict Strict matching?
2207
+ */
2208
+ (expression?: any, strict?: boolean): any;
2209
+ /**
2210
+ * Get a string value from an expression
2211
+ * @param expression Value expression
2212
+ */
2213
+ asString(expression?: any): string;
2214
+ /**
2215
+ * Get an optional string value from an expression
2216
+ * @param expression Value expression
2217
+ * @param defValue Default value, if the parameter value is undefined
2218
+ */
2219
+ asOptionalString<T extends string>(expression?: any, defValue?: string): T | undefined;
2220
+ /**
2221
+ * Get an optional string value from an expression
2222
+ * @param expression Value expression
2223
+ */
2224
+ asOptionalStringArray(expression?: any): (string | undefined)[];
2225
+ /**
2226
+ * Get a display string value from an expression
2227
+ * @param expression Value expression
2228
+ */
2229
+ asDisplayText(expression?: any): string;
2230
+ /**
2231
+ * Get a number value from an expression
2232
+ * @param expression Value expression
2233
+ */
2234
+ asNumber(expression?: any): number;
2235
+ /**
2236
+ * Get an optional number value from an expression
2237
+ * @param expression Value expression
2238
+ * @param defValue Default value, if the parameter value is undefined
2239
+ */
2240
+ asOptionalNumber(expression?: any, defValue?: number): number | undefined;
2241
+ /**
2242
+ * Get a boolean value (JavaScript semantics) from an expression
2243
+ * @param expression Value expression
2244
+ */
2245
+ asBoolean(expression?: any): boolean;
2246
+ /**
2247
+ * Get an optional Boolean value from an expression
2248
+ * @param expression Value expression
2249
+ * @param defValue Default value, if the parameter value is undefined
2250
+ */
2251
+ asOptionalBoolean(expression?: any, defValue?: boolean): boolean | undefined;
2252
+ /**
2253
+ * Get a CSS size value from an expression
2254
+ * @param expression Value expression
2255
+ */
2256
+ asSize(expression?: any): string;
2257
+ };
2258
+
2259
+ declare type VAR_DECLARATION = typeof T_VAR_DECLARATION;
2260
+
2261
+ declare type VAR_STATEMENT = typeof T_VAR_STATEMENT;
2262
+
2263
+ declare interface VarDeclaration extends ExpressionBase {
2264
+ type: VAR_DECLARATION;
2265
+ id?: string;
2266
+ aDestr?: ArrayDestructure[];
2267
+ oDestr?: ObjectDestructure[];
2268
+ expr?: Expression;
2269
+ }
2270
+
2271
+ declare interface VarStatement extends ScripNodeBase {
2272
+ type: VAR_STATEMENT;
2273
+ decls: ReactiveVarDeclaration[];
2274
+ }
2275
+
2276
+ declare type WHILE_STATEMENT = typeof T_WHILE_STATEMENT;
2277
+
2278
+ declare interface WhileStatement extends ScripNodeBase {
2279
+ type: WHILE_STATEMENT;
2280
+ cond: Expression;
2281
+ body: Statement;
2282
+ }
2283
+
2284
+ declare interface XmlUiAttribute extends XmlUiNodeBase {
2285
+ type: "XmlUiAttribute";
2286
+ name: string;
2287
+ namespace?: string;
2288
+ value?: string;
2289
+ preserveQuotes?: boolean;
2290
+ preserveSpaces?: boolean;
2291
+ }
2292
+
2293
+ declare interface XmlUiComment extends XmlUiNodeBase {
2294
+ type: "XmlUiComment";
2295
+ text?: string;
2296
+ }
2297
+
2298
+ declare interface XmlUiElement extends XmlUiNodeBase {
2299
+ type: "XmlUiElement";
2300
+ name: string;
2301
+ namespace?: string;
2302
+ attributes?: XmlUiAttribute[];
2303
+ text?: string;
2304
+ preserveSpaces?: boolean;
2305
+ childNodes?: XmlUiNode[];
2306
+ }
2307
+
2308
+ declare type XmlUiFragment = XmlUiNode | XmlUiNode[];
2309
+
2310
+ /**
2311
+ * Helper class for XMLUI serialization and parsing
2312
+ */
2313
+ declare class XmlUiHelper {
2314
+ /**
2315
+ * Serialize the specified XML fragment into a string
2316
+ * @param xml XML fragment to serialize
2317
+ * @param options Formatting options to use
2318
+ */
2319
+ serialize(xml: XmlUiFragment, options?: XmluiSerializationOptions): string;
2320
+ /**
2321
+ * Transform the specified component definition into an XMLUI node
2322
+ * @param def Component definitions
2323
+ * @param options Transformation options
2324
+ */
2325
+ transformComponentDefinition(def: ComponentDef | CompoundComponentDef, options?: XmlUiTransformOptions): XmlUiFragment;
2326
+ /**
2327
+ * Transform the specified object into an XMLUI nodes
2328
+ * @param def Object definition
2329
+ * @param options Transformation options
2330
+ */
2331
+ transformObject(def: Record<string, any>, options?: XmlUiTransformOptions): XmlUiNode[] | null;
2332
+ /**
2333
+ * Transforms the specified simple component definition into an XMLUI node
2334
+ * @param def Component definition
2335
+ * @param options Transformation options
2336
+ */
2337
+ private transformSimpleComponentDefinition;
2338
+ /**
2339
+ * Transforms the specified simple component definition into an Xml node
2340
+ * @param def Compound component definition
2341
+ * @param options Transformation options
2342
+ */
2343
+ private transformCompoundComponentDefinition;
2344
+ /**
2345
+ * Transforms a value into an XMLUI element
2346
+ * @param nodeName Name of the value node
2347
+ * @param name Optional (property) name
2348
+ * @param value Value to transform
2349
+ * @param options Transformation options
2350
+ */
2351
+ private transformValue;
2352
+ /**
2353
+ * Transforms the specified simple component definition into an Xml node
2354
+ * @param name Element name
2355
+ * @param value Value to transform
2356
+ * @param options Transformation options
2357
+ */
2358
+ private transformObjectValue;
2359
+ /**
2360
+ * Add a property to the specified XMLUI element
2361
+ * @param element XML element
2362
+ * @param name Element name
2363
+ * @param value Element value
2364
+ * @param options Transformation options
2365
+ */
2366
+ private addProperty;
2367
+ private addComponentElement;
2368
+ /**
2369
+ * Adds a list to the specified XML element
2370
+ * @param element XML element
2371
+ * @param name Name of the list (child in `element`)
2372
+ * @param prefix Prefix to use for the list
2373
+ * @param list List with items
2374
+ * @param options Transformation options
2375
+ */
2376
+ private addList;
2377
+ /**
2378
+ * Adds a component list to the specified element
2379
+ * @param element XML element
2380
+ * @param name Name to use for the wrapper element
2381
+ * @param list List with component items
2382
+ * @private
2383
+ */
2384
+ private addComponentList;
2385
+ }
2386
+
2387
+ declare function xmlUiMarkupToComponent(source: string, fileId?: string | number): {
2388
+ component: null | ComponentDef | CompoundComponentDef;
2389
+ errors: ErrorWithLineColInfo[];
2390
+ erroneousCompoundComponentName?: string;
2391
+ };
2392
+
2393
+ declare type XmlUiNode = XmlUiComment | XmlUiAttribute | XmlUiElement;
2394
+
2395
+ declare interface XmlUiNodeBase {
2396
+ type: XmlUiNode["type"];
2397
+ }
2398
+
2399
+ declare type XmluiSerializationOptions = {
2400
+ prettify?: boolean;
2401
+ indents?: number;
2402
+ lineLength?: number;
2403
+ useQuotes?: boolean;
2404
+ useSpaceBeforeClose?: boolean;
2405
+ breakClosingTag?: boolean;
2406
+ };
2407
+
2408
+ /**
2409
+ * Options to use with markup transformation from memory format to XMLUI structure
2410
+ */
2411
+ declare type XmlUiTransformOptions = {
2412
+ preserveLineBreaks?: boolean;
2413
+ preserveSpecialChars?: boolean;
2414
+ removeQuotes?: boolean;
2415
+ extractProps?: boolean;
2416
+ preferTextToValue?: boolean;
2417
+ };
2418
+
1
2419
  export { }
2
2420
 
3
2421