xmlui 0.9.59 → 0.9.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/{apiInterceptorWorker-BYU_Trhx.mjs → apiInterceptorWorker-DBv1IaN7.mjs} +1 -1
- package/dist/lib/{index-JqY6G28u.mjs → index-C9AUt7Ay.mjs} +3316 -3299
- package/dist/lib/index.css +1 -1
- package/dist/lib/language-server-web-worker.mjs +1 -1
- package/dist/lib/language-server.mjs +1 -1
- package/dist/lib/{metadata-utils-BXdiMJQN.mjs → metadata-utils-DJM8orNd.mjs} +1 -1
- package/dist/lib/{server-common-DGglaqCL.mjs → server-common-D0VA8gIv.mjs} +2 -2
- package/dist/lib/{transform-BboeJCuA.mjs → transform-BdB0APqE.mjs} +1203 -1109
- package/dist/lib/xmlui-parser.d.ts +45 -247
- package/dist/lib/xmlui-parser.mjs +2 -2
- package/dist/lib/{xmlui-serializer-D0p6Hyum.mjs → xmlui-serializer-COAfRndx.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +52 -673
- package/dist/lib/xmlui.mjs +2 -2
- package/dist/metadata/{apiInterceptorWorker-CqXRCP46.mjs → apiInterceptorWorker-Bu81HvQB.mjs} +1 -1
- package/dist/metadata/{collectedComponentMetadata-BA6d7xt-.mjs → collectedComponentMetadata-Dzn97vOS.mjs} +6006 -5896
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +94 -97
- package/dist/scripts/package.json +1 -1
- package/dist/scripts/src/abstractions/ComponentDefs.js +0 -8
- package/dist/scripts/src/abstractions/ThemingDefs.js +0 -9
- package/dist/scripts/src/components/APICall/APICall.js +30 -18
- package/dist/scripts/src/components/Accordion/Accordion.js +4 -3
- package/dist/scripts/src/components/Accordion/AccordionItem.js +10 -4
- package/dist/scripts/src/components/App/App.js +4 -3
- package/dist/scripts/src/components/AppHeader/AppHeader.js +1 -2
- package/dist/scripts/src/components/AppState/AppState.js +3 -3
- package/dist/scripts/src/components/AutoComplete/AutoComplete.js +6 -7
- package/dist/scripts/src/components/Avatar/Avatar.js +3 -3
- package/dist/scripts/src/components/Backdrop/Backdrop.js +1 -2
- package/dist/scripts/src/components/Badge/Badge.js +1 -2
- package/dist/scripts/src/components/Bookmark/Bookmark.js +2 -2
- package/dist/scripts/src/components/Breakout/Breakout.js +2 -2
- package/dist/scripts/src/components/Button/Button.js +1 -2
- package/dist/scripts/src/components/Card/Card.js +1 -2
- package/dist/scripts/src/components/Carousel/Carousel.js +6 -7
- package/dist/scripts/src/components/Carousel/CarouselItem.js +2 -2
- package/dist/scripts/src/components/ChangeListener/ChangeListener.js +1 -2
- package/dist/scripts/src/components/Charts/BarChart/BarChart.js +2 -2
- package/dist/scripts/src/components/Charts/DonutChart/DonutChart.js +2 -2
- package/dist/scripts/src/components/Charts/LabelList/LabelList.js +2 -2
- package/dist/scripts/src/components/Charts/Legend/Legend.js +2 -2
- package/dist/scripts/src/components/Charts/LineChart/LineChart.js +6 -6
- package/dist/scripts/src/components/Charts/PieChart/PieChart.js +3 -3
- package/dist/scripts/src/components/Checkbox/Checkbox.js +1 -2
- package/dist/scripts/src/components/CodeBlock/CodeBlock.js +2 -2
- package/dist/scripts/src/components/ColorPicker/ColorPicker.js +1 -2
- package/dist/scripts/src/components/Column/Column.js +2 -2
- package/dist/scripts/src/components/ContentSeparator/ContentSeparator.js +2 -2
- package/dist/scripts/src/components/DatePicker/DatePicker.js +2 -3
- package/dist/scripts/src/components/DropdownMenu/DropdownMenu.js +6 -7
- package/dist/scripts/src/components/EmojiSelector/EmojiSelector.js +2 -3
- package/dist/scripts/src/components/ExpandableItem/ExpandableItem.js +6 -7
- package/dist/scripts/src/components/FileInput/FileInput.js +14 -15
- package/dist/scripts/src/components/FileUploadDropZone/FileUploadDropZone.js +4 -4
- package/dist/scripts/src/components/FlowLayout/FlowLayout.js +2 -2
- package/dist/scripts/src/components/Footer/Footer.js +2 -2
- package/dist/scripts/src/components/Form/Form.js +12 -13
- package/dist/scripts/src/components/FormItem/FormItem.js +7 -8
- package/dist/scripts/src/components/FormSection/FormSection.js +7 -29
- package/dist/scripts/src/components/Heading/Heading.js +11 -11
- package/dist/scripts/src/components/HelloWorld/HelloWorld.js +1 -2
- package/dist/scripts/src/components/HoverCard/HoverCard.js +1 -2
- package/dist/scripts/src/components/HtmlTags/HtmlTags.js +297 -297
- package/dist/scripts/src/components/Icon/Icon.js +5 -5
- package/dist/scripts/src/components/Image/Image.js +4 -5
- package/dist/scripts/src/components/InspectButton/InspectButton.js +2 -2
- package/dist/scripts/src/components/Items/Items.js +2 -3
- package/dist/scripts/src/components/Link/Link.js +3 -4
- package/dist/scripts/src/components/List/List.js +15 -16
- package/dist/scripts/src/components/Logo/Logo.js +2 -2
- package/dist/scripts/src/components/Markdown/Markdown.js +3 -3
- package/dist/scripts/src/components/Markdown/MarkdownNative.js +1 -2
- package/dist/scripts/src/components/Markdown/parse-binding-expr.js +1 -1
- package/dist/scripts/src/components/Markdown/utils.js +16 -6
- package/dist/scripts/src/components/ModalDialog/ModalDialog.js +9 -9
- package/dist/scripts/src/components/NavGroup/NavGroup.js +2 -3
- package/dist/scripts/src/components/NavLink/NavLink.js +3 -4
- package/dist/scripts/src/components/NavPanel/NavPanel.js +1 -2
- package/dist/scripts/src/components/NestedApp/AppWithCodeView.js +2 -2
- package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +5 -7
- package/dist/scripts/src/components/NestedApp/NestedApp.js +7 -3
- package/dist/scripts/src/components/NestedApp/NestedAppNative.js +4 -2
- package/dist/scripts/src/components/NoResult/NoResult.js +1 -2
- package/dist/scripts/src/components/NumberBox/NumberBox.js +5 -6
- package/dist/scripts/src/components/NumberBox/NumberBox2.js +5 -6
- package/dist/scripts/src/components/Option/Option.js +5 -5
- package/dist/scripts/src/components/PageMetaTitle/PageMetaTitle.js +2 -2
- package/dist/scripts/src/components/Pages/Pages.js +3 -4
- package/dist/scripts/src/components/PositionedContainer/PositionedContainer.js +3 -3
- package/dist/scripts/src/components/ProgressBar/ProgressBar.js +2 -2
- package/dist/scripts/src/components/Queue/Queue.js +16 -16
- package/dist/scripts/src/components/RadioGroup/RadioGroup.js +1 -2
- package/dist/scripts/src/components/RadioGroup/RadioItem.js +2 -2
- package/dist/scripts/src/components/RealTimeAdapter/RealTimeAdapter.js +3 -3
- package/dist/scripts/src/components/Redirect/Redirect.js +2 -2
- package/dist/scripts/src/components/Select/Select.js +6 -7
- package/dist/scripts/src/components/SelectionStore/SelectionStore.js +2 -2
- package/dist/scripts/src/components/Slider/Slider.js +4 -5
- package/dist/scripts/src/components/SpaceFiller/SpaceFiller.js +2 -2
- package/dist/scripts/src/components/Spinner/Spinner.js +2 -2
- package/dist/scripts/src/components/Splitter/Splitter.js +2 -3
- package/dist/scripts/src/components/Stack/Stack.js +1 -2
- package/dist/scripts/src/components/StickyBox/StickyBox.js +2 -2
- package/dist/scripts/src/components/Switch/Switch.js +1 -2
- package/dist/scripts/src/components/Table/Table.js +19 -20
- package/dist/scripts/src/components/TableOfContents/TableOfContents.js +2 -2
- package/dist/scripts/src/components/Tabs/TabItem.js +1 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +4 -4
- package/dist/scripts/src/components/Text/Text.js +4 -4
- package/dist/scripts/src/components/TextArea/TextArea.js +4 -5
- package/dist/scripts/src/components/TextBox/TextBox.js +3 -4
- package/dist/scripts/src/components/Theme/Theme.js +4 -4
- package/dist/scripts/src/components/ToneChangerButton/ToneChangerButton.js +2 -2
- package/dist/scripts/src/components/Tree/TreeComponent.js +1 -2
- package/dist/scripts/src/components/TreeDisplay/TreeDisplay.js +2 -2
- package/dist/scripts/src/components/metadata-helpers.js +8 -0
- package/dist/scripts/src/components-core/Fragment.js +2 -2
- package/dist/scripts/src/components-core/LoaderComponent.js +1 -1
- package/dist/scripts/src/components-core/RestApiProxy.js +1 -1
- package/dist/scripts/src/components-core/Slot.js +3 -3
- package/dist/scripts/src/components-core/loader/ApiLoader.js +4 -4
- package/dist/scripts/src/components-core/loader/DataLoader.js +20 -20
- package/dist/scripts/src/components-core/loader/ExternalDataLoader.js +6 -6
- package/dist/scripts/src/components-core/loader/MockLoaderRenderer.js +4 -4
- package/dist/scripts/src/components-core/rendering/AppContent.js +2 -2
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +1 -1
- package/dist/scripts/src/components-core/rendering/Container.js +2 -2
- package/dist/scripts/src/components-core/rendering/StateContainer.js +2 -2
- package/dist/scripts/src/components-core/rendering/reducer.js +1 -1
- package/dist/scripts/src/components-core/script-runner/ScriptingSourceTree.js +45 -0
- package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/eval-tree-sync.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-async.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-common.js +1 -1
- package/dist/scripts/src/components-core/script-runner/process-statement-sync.js +1 -1
- package/dist/scripts/src/components-core/script-runner/visitors.js +1 -1
- package/dist/scripts/src/components-core/theming/ThemeProvider.js +2 -2
- package/dist/scripts/src/components-core/theming/utils.js +31 -0
- package/dist/scripts/src/components-core/utils/statementUtils.js +1 -1
- package/dist/scripts/src/parsers/scripting/Parser.js +1 -1
- package/dist/scripts/src/parsers/scripting/code-behind-collect.js +1 -1
- package/dist/scripts/src/parsers/scripting/modules.js +1 -1
- package/dist/scripts/src/parsers/scripting/tree-visitor.js +1 -1
- package/dist/standalone/xmlui-standalone.es.d.ts +52 -673
- package/dist/standalone/xmlui-standalone.umd.js +215 -218
- package/package.json +1 -1
- /package/dist/scripts/src/components-core/{abstractions → rendering}/containers.js +0 -0
- /package/dist/scripts/src/{abstractions/scripting/ScriptingSourceTree.js → parsers/scripting/ScriptingNodeTypes.js} +0 -0
package/dist/lib/xmlui.d.ts
CHANGED
|
@@ -18,35 +18,16 @@ import { Toast } from 'react-hot-toast';
|
|
|
18
18
|
import { ToastOptions } from 'react-hot-toast';
|
|
19
19
|
import { ValueOrFunction } from 'react-hot-toast';
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
* This type represents the context in which an action is executed.
|
|
23
|
-
*/
|
|
24
21
|
declare interface ActionExecutionContext {
|
|
25
|
-
/**
|
|
26
|
-
* A unique identifier for the container that the action is executed in.
|
|
27
|
-
*/
|
|
28
22
|
uid: symbol;
|
|
29
|
-
/**
|
|
30
|
-
* The state of the container that the action is executed in.
|
|
31
|
-
*/
|
|
32
23
|
state: ContainerState;
|
|
33
24
|
getCurrentState: () => ContainerState;
|
|
34
|
-
/**
|
|
35
|
-
* The appContext object passed to the current app
|
|
36
|
-
*/
|
|
37
25
|
appContext: AppContextObject;
|
|
38
|
-
/**
|
|
39
|
-
* The lookup function to resolve a sync action by its name.
|
|
40
|
-
*/
|
|
41
26
|
lookupAction: LookupAsyncFnInner;
|
|
42
27
|
navigate: any;
|
|
43
28
|
location: any;
|
|
44
29
|
}
|
|
45
30
|
|
|
46
|
-
/**
|
|
47
|
-
* This type represents a function that executes a particular action within the specified context
|
|
48
|
-
* using the given arguments.
|
|
49
|
-
*/
|
|
50
31
|
declare type ActionFunction = (executionContext: ActionExecutionContext, ...args: any[]) => any;
|
|
51
32
|
|
|
52
33
|
declare type AlignmentOptions = (typeof alignmentOptionValues)[number];
|
|
@@ -73,196 +54,45 @@ export declare function ApiInterceptorProvider({ interceptor, children, apiWorke
|
|
|
73
54
|
waitForApiInterceptor?: boolean;
|
|
74
55
|
}): JSX_2.Element;
|
|
75
56
|
|
|
76
|
-
/**
|
|
77
|
-
* This interface defines the properties and services of an app context that the application components can use when
|
|
78
|
-
* implementing their behavior.
|
|
79
|
-
*/
|
|
80
57
|
declare type AppContextObject = {
|
|
81
|
-
/**
|
|
82
|
-
* Accept other methods
|
|
83
|
-
*/
|
|
84
58
|
[x: string]: unknown;
|
|
85
59
|
version: string;
|
|
86
60
|
Actions: Record<string, ActionFunction>;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* This property returns a hash object containing all application-global settings
|
|
90
|
-
* defined in the app's configuration file.
|
|
91
|
-
*/
|
|
61
|
+
apiInterceptorContext: IApiInterceptorContext;
|
|
92
62
|
appGlobals?: Record<string, any>;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* This property returns an object with some properties of the current environment.
|
|
97
|
-
*/
|
|
63
|
+
debugEnabled?: boolean;
|
|
64
|
+
decorateComponentsWithTestId?: boolean;
|
|
98
65
|
environment: {
|
|
99
66
|
isWindowFocused: boolean;
|
|
100
67
|
};
|
|
101
|
-
/**
|
|
102
|
-
* This property returns an object with information about the current media size.
|
|
103
|
-
*/
|
|
104
68
|
mediaSize: MediaSize;
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
* This property returns `true` if the app is a standalone XMLUI app; otherwise
|
|
108
|
-
* (for example, as part of a website), it returns `false`.
|
|
109
|
-
*/
|
|
69
|
+
queryClient: QueryClient | null;
|
|
110
70
|
standalone?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
* This function formats the specified value's date part into a local date string
|
|
113
|
-
* (according to the machine's local settings).
|
|
114
|
-
* @param date Date to format
|
|
115
|
-
*/
|
|
116
71
|
formatDate: (date: string | Date) => string | undefined;
|
|
117
|
-
/**
|
|
118
|
-
* This function formats the specified value into a local
|
|
119
|
-
* date and time string (according to the machine's local settings).
|
|
120
|
-
* @param date Date to format
|
|
121
|
-
*/
|
|
122
72
|
formatDateTime: (date: any) => string | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* This function formats the specified value's date part (without year)
|
|
125
|
-
* into a local date string (according to the machine's local settings).
|
|
126
|
-
* @param date Date to format
|
|
127
|
-
*/
|
|
128
73
|
formatDateWithoutYear: (date: string | Date) => string | undefined;
|
|
129
|
-
/**
|
|
130
|
-
* This function formats the specified value's time part into a local date
|
|
131
|
-
* string (according to the machine's local settings).
|
|
132
|
-
* @param date Date to format
|
|
133
|
-
*/
|
|
134
74
|
formatTime: (date: any) => string | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* This function formats the specified value's time part (without seconds)
|
|
137
|
-
* into a local date string (according to the machine's local settings).
|
|
138
|
-
* @param date Date to format
|
|
139
|
-
*/
|
|
140
75
|
formatTimeWithoutSeconds: (date: string | Date) => string | undefined;
|
|
141
|
-
/**
|
|
142
|
-
* This function creates a date from the specified input value. If no input
|
|
143
|
-
* is provided, it returns the current date and time.
|
|
144
|
-
*/
|
|
145
76
|
getDate: (date?: string | number | Date) => Date;
|
|
146
|
-
/**
|
|
147
|
-
* This function calculates the difference between the current date and the
|
|
148
|
-
* provided one and returns it in a human-readable form, such as "1 month", "2 weeks", etc.
|
|
149
|
-
* @param date
|
|
150
|
-
* @param nowLabel
|
|
151
|
-
* @param time
|
|
152
|
-
* @returns
|
|
153
|
-
*/
|
|
154
77
|
getDateUntilNow: (date?: string | number | Date, nowLabel?: string, time?: string) => string;
|
|
155
|
-
/**
|
|
156
|
-
* This function converts the input string into a date value and returns
|
|
157
|
-
* the ISO 8601 string representation of the date. It can pass dates between
|
|
158
|
-
* the UI and backend APIs in a standard format.
|
|
159
|
-
* @param date Date to format
|
|
160
|
-
*/
|
|
161
78
|
isoDateString: (date?: string) => string;
|
|
162
|
-
/**
|
|
163
|
-
* This function checks if the specified date is today.
|
|
164
|
-
* @param date Date to check
|
|
165
|
-
*/
|
|
166
79
|
isToday: (date: string | Date) => boolean;
|
|
167
|
-
/**
|
|
168
|
-
* This function checks if the specified date is tomorrow.
|
|
169
|
-
* @param date Date to check
|
|
170
|
-
*/
|
|
171
80
|
isTomorrow: (date: string | Date) => boolean;
|
|
172
|
-
/**
|
|
173
|
-
* This function checks if the specified date is yesterday.
|
|
174
|
-
* @param date Date to check
|
|
175
|
-
*/
|
|
176
81
|
isYesterday: (date: string | Date) => boolean;
|
|
177
|
-
/**
|
|
178
|
-
* This function checks the date value provided for some particular
|
|
179
|
-
* values and returns accordingly. Otherwise, returns it as `formatDate` would.
|
|
180
|
-
* @param date Date to format
|
|
181
|
-
*/
|
|
182
82
|
smartFormatDate: (date?: string | number | Date) => string;
|
|
183
|
-
/**
|
|
184
|
-
* This function checks the date value provided for some particular values and
|
|
185
|
-
* returns accordingly. Otherwise, returns it as `formatDateTime` would.
|
|
186
|
-
* @param date Date to format
|
|
187
|
-
*/
|
|
188
83
|
smartFormatDateTime: (date: string | Date) => string | undefined;
|
|
189
|
-
/**
|
|
190
|
-
* This functions creates the difference between two dates in minutes.
|
|
191
|
-
* @param date1 First date
|
|
192
|
-
* @param date2 Second date
|
|
193
|
-
* @returns The difference in minutes
|
|
194
|
-
*/
|
|
195
84
|
differenceInMinutes: (date1: number | Date, date2: number | Date) => number;
|
|
196
|
-
/**
|
|
197
|
-
* This function checks if the specified dates are on the same day.
|
|
198
|
-
* @param dateLeft First date
|
|
199
|
-
* @param dateRight Second Date
|
|
200
|
-
* @returns True, if the dates are on the same day; otherwise, false.
|
|
201
|
-
*/
|
|
202
85
|
isSameDay: (dateLeft: number | Date, dateRight: number | Date) => boolean;
|
|
203
|
-
/**
|
|
204
|
-
* This function checks if the specified date is in the current calendar year.
|
|
205
|
-
* @param date Date to check
|
|
206
|
-
* @returns True, if the date is in the current year; otherwise, false.
|
|
207
|
-
*/
|
|
208
86
|
isThisYear: (date: Date | number) => boolean;
|
|
209
|
-
/**
|
|
210
|
-
* Formats a date into a human-readable elapsed time string.
|
|
211
|
-
* @param date Date to format
|
|
212
|
-
* @returns Returns strings like "now", "12 seconds ago", "3 hours ago",
|
|
213
|
-
* "today", "yesterday", "3 weeks ago", etc.
|
|
214
|
-
*/
|
|
215
87
|
formatHumanElapsedTime: (date: string | Date) => string;
|
|
216
|
-
/**
|
|
217
|
-
* This function calculates the average of the specified values and returns it.
|
|
218
|
-
* @param values Values to calculate the average
|
|
219
|
-
* @param decimals Number of decimal places to round the result
|
|
220
|
-
*/
|
|
221
88
|
avg: (values: number[], decimals?: number) => number;
|
|
222
|
-
/**
|
|
223
|
-
* This function calculates the sum of the specified values and returns it.
|
|
224
|
-
* @param values Values to calculate the sum
|
|
225
|
-
*/
|
|
226
89
|
sum: (values: number[]) => number;
|
|
227
|
-
/**
|
|
228
|
-
* This function returns the specified file size in a compact form, such as
|
|
229
|
-
* "112 B", "2.0 KiB", "23.4 KiB", "2.3 MiB", etc.
|
|
230
|
-
* @param bytes Number of bytes to format
|
|
231
|
-
*/
|
|
232
90
|
formatFileSizeInBytes: (bytes: number) => string | undefined;
|
|
233
|
-
/**
|
|
234
|
-
* This function returns the type of the specified file.
|
|
235
|
-
* @param fileName Filename to check for extension
|
|
236
|
-
*/
|
|
237
91
|
getFileExtension: (fileName: string) => string | undefined;
|
|
238
|
-
/**
|
|
239
|
-
* This function navigates to the specified `url`.
|
|
240
|
-
* @param url New app location
|
|
241
|
-
* @param options Navigation options
|
|
242
|
-
*/
|
|
243
92
|
navigate: (url: To, options?: NavigateOptions) => void;
|
|
244
|
-
/**
|
|
245
|
-
* This property determines the base name used for the router.
|
|
246
|
-
*/
|
|
247
93
|
routerBaseName: string;
|
|
248
|
-
/**
|
|
249
|
-
* Instructs the browser to display a dialog with an optional message, and to wait until the
|
|
250
|
-
* user either confirms or cancels the dialog. It returns a boolean indicating whether OK
|
|
251
|
-
* (`true`) or Cancel (`false`) was selected.
|
|
252
|
-
* @param title Dialog title
|
|
253
|
-
* @param message Confirmation message
|
|
254
|
-
* @param actionLabel Optional action label
|
|
255
|
-
* @return True, if the user confirmed the action; otherwise, false.
|
|
256
|
-
*/
|
|
257
94
|
confirm: (title: string, message?: string, actionLabel?: string) => Promise<boolean>;
|
|
258
|
-
/**
|
|
259
|
-
* This method displays the specified `error` (error message) on the UI.
|
|
260
|
-
* @param error Error to display
|
|
261
|
-
*/
|
|
262
95
|
signError(error: Error | string): void;
|
|
263
|
-
/**
|
|
264
|
-
* The toast service that displays messages in the UI.
|
|
265
|
-
*/
|
|
266
96
|
toast: {
|
|
267
97
|
(message: Message, opts?: ToastOptions): string;
|
|
268
98
|
error: ToastHandler;
|
|
@@ -277,43 +107,13 @@ declare type AppContextObject = {
|
|
|
277
107
|
error: ValueOrFunction<Renderable, any>;
|
|
278
108
|
}, opts?: DefaultToastOptions): Promise<T>;
|
|
279
109
|
};
|
|
280
|
-
/**
|
|
281
|
-
* This property returns the ID of the currently active theme.
|
|
282
|
-
*/
|
|
283
110
|
activeThemeId: string;
|
|
284
|
-
/**
|
|
285
|
-
* This property returns the tone of the currently active theme ("light" or "dark").
|
|
286
|
-
*/
|
|
287
111
|
activeThemeTone: "light" | "dark";
|
|
288
|
-
/**
|
|
289
|
-
* This property returns an array of all available theme IDs.
|
|
290
|
-
*/
|
|
291
112
|
availableThemeIds: string[];
|
|
292
|
-
/**
|
|
293
|
-
* This function sets the current theme to the one with the specified `themeId`.
|
|
294
|
-
* @param themId New theme to set
|
|
295
|
-
*/
|
|
296
113
|
setTheme: (themId: string) => void;
|
|
297
|
-
/**
|
|
298
|
-
* This function sets the current theme tone to the specified `tone` value ("light" or "dark").
|
|
299
|
-
* @param newTone New tone to set
|
|
300
|
-
*/
|
|
301
114
|
setThemeTone: (newTone: "light" | "dark") => void;
|
|
302
|
-
/**
|
|
303
|
-
* This function toggles the current theme tone from "light" to "dark" or vice versa.
|
|
304
|
-
*/
|
|
305
115
|
toggleThemeTone: () => void;
|
|
306
|
-
/**
|
|
307
|
-
* This property gets the information about the logged-in user. If `null`, no user is
|
|
308
|
-
* logged in. The user information may have any value; the app must be able to leverage
|
|
309
|
-
* this information.
|
|
310
|
-
*/
|
|
311
116
|
loggedInUser: LoggedInUserDto | null;
|
|
312
|
-
/**
|
|
313
|
-
* This function sets the information about the logged-in user. The user information
|
|
314
|
-
* may have any value; the app must be able to leverage this information.
|
|
315
|
-
* @param loggedInUser Logged-in user information
|
|
316
|
-
*/
|
|
317
117
|
setLoggedInUser: (loggedInUser: any) => void;
|
|
318
118
|
readonly resources?: Record<string, string>;
|
|
319
119
|
capitalize: (s?: string) => string;
|
|
@@ -404,10 +204,6 @@ declare interface AssignmentExpression extends ExpressionBase {
|
|
|
404
204
|
|
|
405
205
|
declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";
|
|
406
206
|
|
|
407
|
-
/**
|
|
408
|
-
* XMLUI executes its code asynchronously. This type defines functions that can be used in XMLUI
|
|
409
|
-
* as actions or event handlers.
|
|
410
|
-
*/
|
|
411
207
|
declare type AsyncFunction = (...args: any) => Promise<any> | any;
|
|
412
208
|
|
|
413
209
|
declare type AuthDefinition = {
|
|
@@ -522,104 +318,32 @@ declare type ComponentCompilation = CompilationUnit & {
|
|
|
522
318
|
definition: CompoundComponentDef;
|
|
523
319
|
};
|
|
524
320
|
|
|
525
|
-
/**
|
|
526
|
-
* This interface represents the properties of a component definition.
|
|
527
|
-
*/
|
|
528
321
|
export declare interface ComponentDef<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentDefCore, Scriptable {
|
|
529
322
|
props?: Record<keyof TMd["props"], any>;
|
|
530
323
|
events?: Record<keyof TMd["events"], any>;
|
|
531
|
-
/**
|
|
532
|
-
* Components may have an API that other components can use to interact with them. This property holds
|
|
533
|
-
* the API methods associated with this component definition.
|
|
534
|
-
*/
|
|
535
324
|
api?: Record<keyof TMd["apis"], any>;
|
|
536
|
-
/**
|
|
537
|
-
* Components may provide context variables that can be used to in expressions and event handlers
|
|
538
|
-
* within the component.
|
|
539
|
-
* REVIEW: This property can be removed after migration to the new componend definition type.
|
|
540
|
-
*/
|
|
541
325
|
contextVars?: Record<keyof TMd["contextVars"], string>;
|
|
542
326
|
}
|
|
543
327
|
|
|
544
|
-
/**
|
|
545
|
-
* This interface represents the core properties of a component definition (independent
|
|
546
|
-
* of component metadata).
|
|
547
|
-
*/
|
|
548
328
|
declare interface ComponentDefCore {
|
|
549
329
|
type: string;
|
|
550
330
|
uid?: string;
|
|
551
331
|
testId?: string;
|
|
552
|
-
/**
|
|
553
|
-
* A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
|
|
554
|
-
* these are used later to resolve the `type` of the componentDef.
|
|
555
|
-
* <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
|
|
556
|
-
*/
|
|
557
332
|
namespaces?: Record<string, string>;
|
|
558
|
-
/**
|
|
559
|
-
* Though components manage their state internally, the app logic may require user state management.
|
|
560
|
-
* Components may have user *variables*, which the UI logic uses to manage the application state.
|
|
561
|
-
* This property holds the variables (name and value pairs) associated with this component definition.
|
|
562
|
-
*/
|
|
563
333
|
vars?: Record<string, any>;
|
|
564
|
-
/**
|
|
565
|
-
* Each component may have child components to constitute a hierarchy of components. This property
|
|
566
|
-
* holds the definition of these nested children.
|
|
567
|
-
*/
|
|
568
334
|
children?: ComponentDef[];
|
|
569
|
-
/**
|
|
570
|
-
* Components may have slots that can be filled with other components. This property holds the
|
|
571
|
-
* contents of the slots
|
|
572
|
-
*/
|
|
573
335
|
slots?: Record<string, ComponentDef[]>;
|
|
574
|
-
/**
|
|
575
|
-
* This property is evaluated to a Boolean value during run time. When this value is `true`, the
|
|
576
|
-
* component with its children chain is rendered; otherwise, the entire component hierarchy is omitted
|
|
577
|
-
* from the rendered tree.
|
|
578
|
-
*/
|
|
579
336
|
when?: string | boolean;
|
|
580
|
-
/**
|
|
581
|
-
* Some components work with data obtained asynchronously. Fetching this data requires some state
|
|
582
|
-
* management handling the complexity (including error handling) of data access. A *loader* is
|
|
583
|
-
* responsible for managing this logic. This property holds the loaders associated with this component
|
|
584
|
-
* definition.
|
|
585
|
-
*/
|
|
586
337
|
loaders?: ComponentDef[];
|
|
587
|
-
/**
|
|
588
|
-
* Components may have functions that are used to perform some logic. This property holds the functions
|
|
589
|
-
* (name and function body) associated with this component definition.
|
|
590
|
-
*/
|
|
591
338
|
functions?: Record<string, any>;
|
|
592
|
-
/**
|
|
593
|
-
* Components managing state through variables or loaders are wrapped with containers responsible
|
|
594
|
-
* for this job. Just as components, containers form a hierarchy. While working with this hierarchy,
|
|
595
|
-
* parent components may flow state values (key and value pairs) to their child containers. This
|
|
596
|
-
* property holds the name of state values to flow down to the direct child containers.
|
|
597
|
-
*/
|
|
598
339
|
uses?: string[];
|
|
599
|
-
/**
|
|
600
|
-
* Arbitrary debug information that can be attached to a component definition.
|
|
601
|
-
* Current usage:
|
|
602
|
-
* - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
|
|
603
|
-
* belonging to the particular component definition.
|
|
604
|
-
*/
|
|
605
340
|
debug?: Record<string, any>;
|
|
606
341
|
}
|
|
607
342
|
|
|
608
343
|
declare type ComponentExtension = ComponentRendererDef | CompoundComponentDef;
|
|
609
344
|
|
|
610
|
-
/**
|
|
611
|
-
* Sometimes, components and compound components can both be used
|
|
612
|
-
*/
|
|
613
345
|
export declare type ComponentLike = ComponentDef | CompoundComponentDef;
|
|
614
346
|
|
|
615
|
-
/**
|
|
616
|
-
* Components have metadata that the rendering engine uses to render the
|
|
617
|
-
* component. This type defines the structure of such metadata.
|
|
618
|
-
*
|
|
619
|
-
* The type has generic parameters to ensure that type-checking works with
|
|
620
|
-
* the metadata defined here in concert with the renderer object using the
|
|
621
|
-
* same metadata type.
|
|
622
|
-
*/
|
|
623
347
|
export declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentPropertyMetadata> = Record<string, any>> = {
|
|
624
348
|
status?: "stable" | "experimental" | "deprecated" | "in progress";
|
|
625
349
|
description?: string;
|
|
@@ -642,46 +366,13 @@ export declare type ComponentMetadata<TProps extends Record<string, ComponentPro
|
|
|
642
366
|
isHtmlTag?: boolean;
|
|
643
367
|
};
|
|
644
368
|
|
|
645
|
-
/**
|
|
646
|
-
* Components have properties, events, context values, and exposed API
|
|
647
|
-
* endpoints, each holding metadata the rendering engine uses at run time.
|
|
648
|
-
* This type defines the structure of such metadata.
|
|
649
|
-
*/
|
|
650
369
|
declare type ComponentPropertyMetadata = {
|
|
651
|
-
/**
|
|
652
|
-
* This field defines the description explaining the property. You can use
|
|
653
|
-
* markdown, as the UI may display this value.
|
|
654
|
-
*/
|
|
655
370
|
readonly description: string;
|
|
656
|
-
/**
|
|
657
|
-
* This field defines the type of the property. The rendering engine uses this
|
|
658
|
-
* information to validate the property value.
|
|
659
|
-
*/
|
|
660
371
|
readonly valueType?: PropertyValueType;
|
|
661
|
-
/**
|
|
662
|
-
* This field defines the available values of the property. The rendering engine
|
|
663
|
-
* uses this information to validate the property value.
|
|
664
|
-
*/
|
|
665
372
|
readonly availableValues?: readonly PropertyValueDescription[];
|
|
666
|
-
/**
|
|
667
|
-
* This field defines the default value of the property. The rendering engine uses
|
|
668
|
-
* this information to set the default value of the property.
|
|
669
|
-
*/
|
|
670
373
|
defaultValue?: any;
|
|
671
|
-
/**
|
|
672
|
-
* This field defines a validation function that the rendering engine uses to validate
|
|
673
|
-
* the property value. The function returns one or more hinst if the property value is
|
|
674
|
-
* invalid.
|
|
675
|
-
*/
|
|
676
374
|
isValid?: IsValidFunction<any>;
|
|
677
|
-
/**
|
|
678
|
-
* Indicates that a particular property is internal and should not be exposed in the
|
|
679
|
-
* documentation
|
|
680
|
-
*/
|
|
681
375
|
isInternal?: boolean;
|
|
682
|
-
/**
|
|
683
|
-
* Indicates that a particular property is required for the component to essentially function.
|
|
684
|
-
*/
|
|
685
376
|
isRequired?: boolean;
|
|
686
377
|
};
|
|
687
378
|
|
|
@@ -693,69 +384,22 @@ declare interface ComponentRendererContextBase<TMd extends ComponentMetadata = C
|
|
|
693
384
|
layoutContext?: LayoutContext;
|
|
694
385
|
}
|
|
695
386
|
|
|
696
|
-
/**
|
|
697
|
-
* Components must be registered with a component registry so the engine can use them. This type
|
|
698
|
-
* collects the information held by the registry.
|
|
699
|
-
*/
|
|
700
387
|
export declare type ComponentRendererDef<T extends ComponentDef = any> = {
|
|
701
|
-
/**
|
|
702
|
-
* The component's type identifier. In the markup, the component must use this name to be recognized.
|
|
703
|
-
*/
|
|
704
388
|
type: string;
|
|
705
|
-
/**
|
|
706
|
-
* This function renders the component from its definition to its React representation.
|
|
707
|
-
*/
|
|
708
389
|
renderer: ComponentRendererFn<T>;
|
|
709
|
-
/**
|
|
710
|
-
* The metadata to use when rendering the component
|
|
711
|
-
*/
|
|
712
390
|
metadata?: ComponentMetadata;
|
|
713
391
|
};
|
|
714
392
|
|
|
715
|
-
/**
|
|
716
|
-
* This function renders a component definition into a React component
|
|
717
|
-
*/
|
|
718
393
|
declare type ComponentRendererFn<T extends ComponentDef> = (context: RendererContext<T>) => ReactNode;
|
|
719
394
|
|
|
720
395
|
declare type ComponentSize = (typeof sizeValues)[number];
|
|
721
396
|
|
|
722
|
-
/**
|
|
723
|
-
* XMLUI allows the creation of reusable components assembled from other XMLUI components (with markup).
|
|
724
|
-
* This type represents such components. The name `CompoundComponent` refers to the assembled nature
|
|
725
|
-
* of reusable components.
|
|
726
|
-
*/
|
|
727
397
|
export declare interface CompoundComponentDef extends Scriptable {
|
|
728
|
-
/**
|
|
729
|
-
* Each compound component must have a unique name. The markup uses this name to refer to the
|
|
730
|
-
* particular compound component.
|
|
731
|
-
*/
|
|
732
398
|
name: string;
|
|
733
|
-
/**
|
|
734
|
-
* Each compound component must have a single root component defining the component contents.
|
|
735
|
-
*/
|
|
736
399
|
component: ComponentDef;
|
|
737
|
-
/**
|
|
738
|
-
* Compound components may provide an API that other components can use to interact with them. This
|
|
739
|
-
* property holds the API methods associated with this compound component definition.
|
|
740
|
-
*/
|
|
741
400
|
api?: Record<string, any>;
|
|
742
|
-
/**
|
|
743
|
-
* This property holds the variables (name and value pairs) associated with this compound component
|
|
744
|
-
* definition.
|
|
745
|
-
*/
|
|
746
401
|
vars?: Record<string, any>;
|
|
747
|
-
/**
|
|
748
|
-
* A component can define namespaces on it, with the <ComponentName xmlns:KEY="VALUE" /> syntax
|
|
749
|
-
* these are used later to resolve the `type` of the componentDef.
|
|
750
|
-
* <KEY:Button/> will have type `VALUE.Button` (joined with a "." (dot) )
|
|
751
|
-
*/
|
|
752
402
|
namespaces?: Record<string, string>;
|
|
753
|
-
/**
|
|
754
|
-
* Arbitrary debug information that can be attached to a component definition.
|
|
755
|
-
* Current usage:
|
|
756
|
-
* - `debug: { source: { start: number, end: number } }` Ther start and end positions of of the source
|
|
757
|
-
* belonging to the particular component definition.
|
|
758
|
-
*/
|
|
759
403
|
debug?: Record<string, any>;
|
|
760
404
|
codeBehind?: string;
|
|
761
405
|
}
|
|
@@ -776,10 +420,6 @@ declare interface ConstStatement extends ScripNodeBase {
|
|
|
776
420
|
decls: VarDeclaration[];
|
|
777
421
|
}
|
|
778
422
|
|
|
779
|
-
/**
|
|
780
|
-
* We store the state application state in a hierarchical structure of containers. This type represents
|
|
781
|
-
* the state within a single container stored as key and value pairs.
|
|
782
|
-
*/
|
|
783
423
|
declare type ContainerState = Record<string | symbol, any>;
|
|
784
424
|
|
|
785
425
|
declare type CONTINUE_STATEMENT = typeof T_CONTINUE_STATEMENT;
|
|
@@ -854,23 +494,8 @@ declare interface DoWhileStatement extends ScripNodeBase {
|
|
|
854
494
|
body: Statement;
|
|
855
495
|
}
|
|
856
496
|
|
|
857
|
-
/**
|
|
858
|
-
* Some components render their nested child components dynamically using the current context of
|
|
859
|
-
* their parents. For example, reusable components (`CompoundComponentDef`) have a `Slot`
|
|
860
|
-
* placeholder that marks the location where the children should be rendered. Other component types
|
|
861
|
-
* (e.g., `ApiBoundComponent` and `ContainerComponent`) use this dynamic rendering, too.
|
|
862
|
-
*
|
|
863
|
-
* This interface represents this functionality.
|
|
864
|
-
*/
|
|
865
497
|
declare interface DynamicChildComponentDef extends ComponentDef {
|
|
866
|
-
/**
|
|
867
|
-
* This property holds a function that can render a particular child or children into a specific
|
|
868
|
-
* layout context.
|
|
869
|
-
*/
|
|
870
498
|
renderChild: RenderChildFn;
|
|
871
|
-
/**
|
|
872
|
-
* This property holds the child component that should be rendered.
|
|
873
|
-
*/
|
|
874
499
|
childToRender: ComponentDef;
|
|
875
500
|
}
|
|
876
501
|
|
|
@@ -982,36 +607,12 @@ declare interface Extension {
|
|
|
982
607
|
|
|
983
608
|
declare type ExtensionRegisteredCallbackFn = (extension: Extension) => void;
|
|
984
609
|
|
|
985
|
-
/**
|
|
986
|
-
* This type describes a font definition resource.
|
|
987
|
-
*/
|
|
988
610
|
declare type FontDef = {
|
|
989
|
-
/**
|
|
990
|
-
* Specifies a name that will be used as the font face value for font properties
|
|
991
|
-
*/
|
|
992
611
|
fontFamily: string;
|
|
993
|
-
/**
|
|
994
|
-
* A fontStyle value. Accepts two values to specify a range that is supported by a font-face,
|
|
995
|
-
* for example `fontStyle: oblique 20deg 50deg`
|
|
996
|
-
*/
|
|
997
612
|
fontStyle?: string;
|
|
998
|
-
/**
|
|
999
|
-
* A font-weight value. Accepts two values to specify a range that is supported by a font-face,
|
|
1000
|
-
* for example `font-weight: 100 900`
|
|
1001
|
-
*/
|
|
1002
613
|
fontWeight?: string;
|
|
1003
|
-
/**
|
|
1004
|
-
* This property determines how a font face is displayed based on whether and when it is downloaded
|
|
1005
|
-
* and ready to use.
|
|
1006
|
-
*/
|
|
1007
614
|
fontDisplay?: string;
|
|
1008
|
-
/**
|
|
1009
|
-
* The mime type of the font file
|
|
1010
|
-
*/
|
|
1011
615
|
format?: string;
|
|
1012
|
-
/**
|
|
1013
|
-
* Specifies references to font resources.
|
|
1014
|
-
*/
|
|
1015
616
|
src: string;
|
|
1016
617
|
} | string;
|
|
1017
618
|
|
|
@@ -1154,29 +755,9 @@ declare type InterceptorOperationDef = {
|
|
|
1154
755
|
|
|
1155
756
|
declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
|
|
1156
757
|
|
|
1157
|
-
/**
|
|
1158
|
-
* Each component is rendered in a particular layout context (for example, within a stack). This
|
|
1159
|
-
* type provides information about that context and the operations that render children in it.
|
|
1160
|
-
*/
|
|
1161
758
|
declare type LayoutContext<T extends ComponentDef = ComponentDef> = {
|
|
1162
|
-
/**
|
|
1163
|
-
* The type of the layout context
|
|
1164
|
-
*/
|
|
1165
759
|
type?: string;
|
|
1166
|
-
/**
|
|
1167
|
-
* This function allows the React representation of a particular child node to be wrapped in
|
|
1168
|
-
* whatever React components to accommodate the current layout context. When the engine is about to
|
|
1169
|
-
* render children in a particular layout context, it checks the existence of this function.
|
|
1170
|
-
* If declared, the engine invokes it.
|
|
1171
|
-
* @param context Rendering context
|
|
1172
|
-
* @param renderedChild The React node representing the rendered child
|
|
1173
|
-
* @param metadata The metadata of the child component
|
|
1174
|
-
* @returns The wrapped React node
|
|
1175
|
-
*/
|
|
1176
760
|
wrapChild?: (context: RendererContext<T>, renderedChild: ReactNode, metadata?: ComponentMetadata) => ReactNode;
|
|
1177
|
-
/**
|
|
1178
|
-
* Arbitrary props extending the layout context
|
|
1179
|
-
*/
|
|
1180
761
|
[key: string]: any;
|
|
1181
762
|
};
|
|
1182
763
|
|
|
@@ -1229,58 +810,20 @@ export declare const Logo: ForwardRefExoticComponent< {
|
|
|
1229
810
|
style?: CSSProperties;
|
|
1230
811
|
} & RefAttributes<HTMLImageElement>>;
|
|
1231
812
|
|
|
1232
|
-
/**
|
|
1233
|
-
* This type represents the options to use for looking up actions.
|
|
1234
|
-
*/
|
|
1235
813
|
declare type LookupActionOptions = {
|
|
1236
|
-
/**
|
|
1237
|
-
* This property (by default, true) indicates that any error should be signed while
|
|
1238
|
-
* executing an event handler. Set it to `false` to suppress error indication.
|
|
1239
|
-
*/
|
|
1240
814
|
signError?: boolean;
|
|
1241
|
-
/**
|
|
1242
|
-
* We can use the event's name to get info about a particular event's progress. Note: Multiple
|
|
1243
|
-
* events can run simultaneously.
|
|
1244
|
-
*/
|
|
1245
815
|
eventName?: string;
|
|
1246
|
-
/**
|
|
1247
|
-
* By default, we cache resolved action functions. This property signs that we don't want to cache
|
|
1248
|
-
* this function. Use true on one-off handlers, like the ones in Actions (e.g., `MutateAction`).
|
|
1249
|
-
*/
|
|
1250
816
|
ephemeral?: boolean;
|
|
1251
|
-
/**
|
|
1252
|
-
* This property declares the script code to use as a default for a particular event handler.
|
|
1253
|
-
*/
|
|
1254
817
|
defaultHandler?: string;
|
|
1255
818
|
context?: any;
|
|
1256
819
|
};
|
|
1257
820
|
|
|
1258
|
-
/**
|
|
1259
|
-
* This function resolves an action by its name with the specified options and returns the action
|
|
1260
|
-
* function if found. Otherwise, return undefined.
|
|
1261
|
-
*/
|
|
1262
821
|
declare type LookupAsyncFn = (action: string | undefined, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
1263
822
|
|
|
1264
|
-
|
|
1265
|
-
* This function resolves an action by its name (within the component node that runs the action)
|
|
1266
|
-
* with the specified options and returns the action function if found. Otherwise, return undefined.
|
|
1267
|
-
*/
|
|
1268
|
-
declare type LookupAsyncFnInner = (action: string | undefined,
|
|
1269
|
-
/**
|
|
1270
|
-
* The unique identifier of the container that the action is executed in.
|
|
1271
|
-
*/
|
|
1272
|
-
uid: symbol, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
823
|
+
declare type LookupAsyncFnInner = (action: string | undefined, uid: symbol, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
1273
824
|
|
|
1274
|
-
/**
|
|
1275
|
-
* This function retrieves an async function for a particular component's specified event to be
|
|
1276
|
-
* invoked as an event handler (`undefined` if the particular event handler is not defined).
|
|
1277
|
-
*/
|
|
1278
825
|
declare type LookupEventHandlerFn<TMd extends ComponentMetadata = ComponentMetadata> = (eventName: keyof NonNullable<TMd["events"]>, actionOptions?: LookupActionOptions) => AsyncFunction | undefined;
|
|
1279
826
|
|
|
1280
|
-
/**
|
|
1281
|
-
* This function resolves a sync action by its name and returns the action function if it is found.
|
|
1282
|
-
* Otherwise, it returns undefined.
|
|
1283
|
-
*/
|
|
1284
827
|
declare type LookupSyncFn = (action: string | undefined) => SyncFunction | undefined;
|
|
1285
828
|
|
|
1286
829
|
declare type MediaBreakpointType = "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
|
|
@@ -1337,7 +880,7 @@ declare interface NavHierarchyNode {
|
|
|
1337
880
|
lastLink?: boolean;
|
|
1338
881
|
}
|
|
1339
882
|
|
|
1340
|
-
export declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, withFrame, style, refVersion, }: NestedAppProps): JSX_2.Element;
|
|
883
|
+
export declare function NestedApp({ api, app, components, config, activeTheme, activeTone, title, height, allowPlaygroundPopup, popOutUrl, withFrame, style, refVersion, }: NestedAppProps): JSX_2.Element;
|
|
1341
884
|
|
|
1342
885
|
declare type NestedAppProps = {
|
|
1343
886
|
api?: any;
|
|
@@ -1349,6 +892,7 @@ declare type NestedAppProps = {
|
|
|
1349
892
|
title?: string;
|
|
1350
893
|
height?: string | number;
|
|
1351
894
|
allowPlaygroundPopup?: boolean;
|
|
895
|
+
popOutUrl?: string;
|
|
1352
896
|
withFrame?: boolean;
|
|
1353
897
|
style?: CSSProperties;
|
|
1354
898
|
splitView?: boolean;
|
|
@@ -1421,10 +965,6 @@ declare type ProjectCompilation = {
|
|
|
1421
965
|
themes: Record<string, ThemeDefinition>;
|
|
1422
966
|
};
|
|
1423
967
|
|
|
1424
|
-
/**
|
|
1425
|
-
* This type represents the description of a property value, which can be a string, a number,
|
|
1426
|
-
* or an object with a value and a description. This type is used in the metadata of a component.
|
|
1427
|
-
*/
|
|
1428
968
|
declare type PropertyValueDescription = string | number | {
|
|
1429
969
|
value: string | number;
|
|
1430
970
|
description: string;
|
|
@@ -1505,49 +1045,18 @@ declare interface ReactiveVarDeclaration extends ExpressionBase {
|
|
|
1505
1045
|
expr: Expression;
|
|
1506
1046
|
}
|
|
1507
1047
|
|
|
1508
|
-
/**
|
|
1509
|
-
* This type represents a function that registers all API endpoints of a particular component.
|
|
1510
|
-
*/
|
|
1511
1048
|
export declare type RegisterComponentApiFn = (componentApi: ComponentApi) => void;
|
|
1512
1049
|
|
|
1513
1050
|
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[];
|
|
1514
1051
|
|
|
1515
|
-
/**
|
|
1516
|
-
* This interface defines the renderer context for the exposed components of the XMLUI framework.
|
|
1517
|
-
*/
|
|
1518
1052
|
export declare interface RendererContext<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentRendererContextBase<TMd> {
|
|
1519
|
-
/**
|
|
1520
|
-
* The unique identifier of the component instance
|
|
1521
|
-
*/
|
|
1522
1053
|
uid: symbol;
|
|
1523
|
-
/**
|
|
1524
|
-
* A component invokes this function to change its internal state
|
|
1525
|
-
*/
|
|
1526
1054
|
updateState: UpdateStateFn;
|
|
1527
|
-
/**
|
|
1528
|
-
* When a component wants to access a property value (which may contain a binding expression to
|
|
1529
|
-
* evaluate), it must use this property to get the current value.
|
|
1530
|
-
*/
|
|
1531
1055
|
extractValue: ValueExtractor;
|
|
1532
|
-
/**
|
|
1533
|
-
* This function gets a physical resource URL according to the provided logical URL.
|
|
1534
|
-
*/
|
|
1535
1056
|
extractResourceUrl: (url?: string) => string | undefined;
|
|
1536
|
-
/**
|
|
1537
|
-
* This function gets an async executable function that handles an event.
|
|
1538
|
-
*/
|
|
1539
1057
|
lookupEventHandler: LookupEventHandlerFn<TMd>;
|
|
1540
|
-
/**
|
|
1541
|
-
* A component can register its APIs with this function
|
|
1542
|
-
*/
|
|
1543
1058
|
registerComponentApi: RegisterComponentApiFn;
|
|
1544
|
-
/**
|
|
1545
|
-
* This function obtains an action by its name with the specified options
|
|
1546
|
-
*/
|
|
1547
1059
|
lookupAction: LookupAsyncFn;
|
|
1548
|
-
/**
|
|
1549
|
-
* This function retrieves a sync function the component can use as a callback
|
|
1550
|
-
*/
|
|
1551
1060
|
lookupSyncCallback: LookupSyncFn;
|
|
1552
1061
|
layoutCss: CSSProperties;
|
|
1553
1062
|
}
|
|
@@ -1572,21 +1081,9 @@ declare interface ScripNodeBase {
|
|
|
1572
1081
|
endToken?: ScriptingToken;
|
|
1573
1082
|
}
|
|
1574
1083
|
|
|
1575
|
-
/**
|
|
1576
|
-
* This interface holds the properties representing a scriptable component definition.
|
|
1577
|
-
*/
|
|
1578
1084
|
declare interface Scriptable {
|
|
1579
|
-
/**
|
|
1580
|
-
* This property holds the text defined in all <script> sections attached to a component.
|
|
1581
|
-
*/
|
|
1582
1085
|
script?: string;
|
|
1583
|
-
/**
|
|
1584
|
-
* This property holds the parsed form of scripts stored in code-behind files.
|
|
1585
|
-
*/
|
|
1586
1086
|
scriptCollected?: CollectedDeclarations;
|
|
1587
|
-
/**
|
|
1588
|
-
* This property holds errors coming from parsing the code-behind scripts.
|
|
1589
|
-
*/
|
|
1590
1087
|
scriptError?: any;
|
|
1591
1088
|
}
|
|
1592
1089
|
|
|
@@ -1759,98 +1256,95 @@ declare interface SwitchStatement extends ScripNodeBase {
|
|
|
1759
1256
|
cases: SwitchCase[];
|
|
1760
1257
|
}
|
|
1761
1258
|
|
|
1762
|
-
/**
|
|
1763
|
-
* XMLUI executes some code synchronously. This type defines those functions' signature
|
|
1764
|
-
*/
|
|
1765
1259
|
declare type SyncFunction = (...args: any) => any;
|
|
1766
1260
|
|
|
1767
|
-
declare const T_ARRAY_DESTRUCTURE
|
|
1261
|
+
declare const T_ARRAY_DESTRUCTURE: number;
|
|
1768
1262
|
|
|
1769
|
-
declare const T_ARRAY_LITERAL
|
|
1263
|
+
declare const T_ARRAY_LITERAL: number;
|
|
1770
1264
|
|
|
1771
|
-
declare const T_ARROW_EXPRESSION
|
|
1265
|
+
declare const T_ARROW_EXPRESSION: number;
|
|
1772
1266
|
|
|
1773
|
-
declare const T_ARROW_EXPRESSION_STATEMENT
|
|
1267
|
+
declare const T_ARROW_EXPRESSION_STATEMENT: number;
|
|
1774
1268
|
|
|
1775
|
-
declare const T_ASSIGNMENT_EXPRESSION
|
|
1269
|
+
declare const T_ASSIGNMENT_EXPRESSION: number;
|
|
1776
1270
|
|
|
1777
|
-
declare const T_BINARY_EXPRESSION
|
|
1271
|
+
declare const T_BINARY_EXPRESSION: number;
|
|
1778
1272
|
|
|
1779
|
-
declare const T_BLOCK_STATEMENT
|
|
1273
|
+
declare const T_BLOCK_STATEMENT: number;
|
|
1780
1274
|
|
|
1781
|
-
declare const T_BREAK_STATEMENT
|
|
1275
|
+
declare const T_BREAK_STATEMENT: number;
|
|
1782
1276
|
|
|
1783
|
-
declare const T_CALCULATED_MEMBER_ACCESS_EXPRESSION
|
|
1277
|
+
declare const T_CALCULATED_MEMBER_ACCESS_EXPRESSION: number;
|
|
1784
1278
|
|
|
1785
|
-
declare const T_CONDITIONAL_EXPRESSION
|
|
1279
|
+
declare const T_CONDITIONAL_EXPRESSION: number;
|
|
1786
1280
|
|
|
1787
|
-
declare const T_CONST_STATEMENT
|
|
1281
|
+
declare const T_CONST_STATEMENT: number;
|
|
1788
1282
|
|
|
1789
|
-
declare const T_CONTINUE_STATEMENT
|
|
1283
|
+
declare const T_CONTINUE_STATEMENT: number;
|
|
1790
1284
|
|
|
1791
|
-
declare const T_DESTRUCTURE
|
|
1285
|
+
declare const T_DESTRUCTURE: number;
|
|
1792
1286
|
|
|
1793
|
-
declare const T_DO_WHILE_STATEMENT
|
|
1287
|
+
declare const T_DO_WHILE_STATEMENT: number;
|
|
1794
1288
|
|
|
1795
|
-
declare const T_EMPTY_STATEMENT
|
|
1289
|
+
declare const T_EMPTY_STATEMENT: number;
|
|
1796
1290
|
|
|
1797
|
-
declare const T_EXPRESSION_STATEMENT
|
|
1291
|
+
declare const T_EXPRESSION_STATEMENT: number;
|
|
1798
1292
|
|
|
1799
|
-
declare const T_FOR_IN_STATEMENT
|
|
1293
|
+
declare const T_FOR_IN_STATEMENT: number;
|
|
1800
1294
|
|
|
1801
|
-
declare const T_FOR_OF_STATEMENT
|
|
1295
|
+
declare const T_FOR_OF_STATEMENT: number;
|
|
1802
1296
|
|
|
1803
|
-
declare const T_FOR_STATEMENT
|
|
1297
|
+
declare const T_FOR_STATEMENT: number;
|
|
1804
1298
|
|
|
1805
|
-
declare const T_FUNCTION_DECLARATION
|
|
1299
|
+
declare const T_FUNCTION_DECLARATION: number;
|
|
1806
1300
|
|
|
1807
|
-
declare const T_FUNCTION_INVOCATION_EXPRESSION
|
|
1301
|
+
declare const T_FUNCTION_INVOCATION_EXPRESSION: number;
|
|
1808
1302
|
|
|
1809
|
-
declare const T_IDENTIFIER
|
|
1303
|
+
declare const T_IDENTIFIER: number;
|
|
1810
1304
|
|
|
1811
|
-
declare const T_IF_STATEMENT
|
|
1305
|
+
declare const T_IF_STATEMENT: number;
|
|
1812
1306
|
|
|
1813
|
-
declare const T_LET_STATEMENT
|
|
1307
|
+
declare const T_LET_STATEMENT: number;
|
|
1814
1308
|
|
|
1815
|
-
declare const T_LITERAL
|
|
1309
|
+
declare const T_LITERAL: number;
|
|
1816
1310
|
|
|
1817
|
-
declare const T_MEMBER_ACCESS_EXPRESSION
|
|
1311
|
+
declare const T_MEMBER_ACCESS_EXPRESSION: number;
|
|
1818
1312
|
|
|
1819
|
-
declare const T_NO_ARG_EXPRESSION
|
|
1313
|
+
declare const T_NO_ARG_EXPRESSION: number;
|
|
1820
1314
|
|
|
1821
|
-
declare const T_OBJECT_DESTRUCTURE
|
|
1315
|
+
declare const T_OBJECT_DESTRUCTURE: number;
|
|
1822
1316
|
|
|
1823
|
-
declare const T_OBJECT_LITERAL
|
|
1317
|
+
declare const T_OBJECT_LITERAL: number;
|
|
1824
1318
|
|
|
1825
|
-
declare const T_POSTFIX_OP_EXPRESSION
|
|
1319
|
+
declare const T_POSTFIX_OP_EXPRESSION: number;
|
|
1826
1320
|
|
|
1827
|
-
declare const T_PREFIX_OP_EXPRESSION
|
|
1321
|
+
declare const T_PREFIX_OP_EXPRESSION: number;
|
|
1828
1322
|
|
|
1829
|
-
declare const T_REACTIVE_VAR_DECLARATION
|
|
1323
|
+
declare const T_REACTIVE_VAR_DECLARATION: number;
|
|
1830
1324
|
|
|
1831
|
-
declare const T_RETURN_STATEMENT
|
|
1325
|
+
declare const T_RETURN_STATEMENT: number;
|
|
1832
1326
|
|
|
1833
|
-
declare const T_SEQUENCE_EXPRESSION
|
|
1327
|
+
declare const T_SEQUENCE_EXPRESSION: number;
|
|
1834
1328
|
|
|
1835
|
-
declare const T_SPREAD_EXPRESSION
|
|
1329
|
+
declare const T_SPREAD_EXPRESSION: number;
|
|
1836
1330
|
|
|
1837
|
-
declare const T_SWITCH_CASE
|
|
1331
|
+
declare const T_SWITCH_CASE: number;
|
|
1838
1332
|
|
|
1839
|
-
declare const T_SWITCH_STATEMENT
|
|
1333
|
+
declare const T_SWITCH_STATEMENT: number;
|
|
1840
1334
|
|
|
1841
|
-
declare const T_TEMPLATE_LITERAL_EXPRESSION
|
|
1335
|
+
declare const T_TEMPLATE_LITERAL_EXPRESSION: number;
|
|
1842
1336
|
|
|
1843
|
-
declare const T_THROW_STATEMENT
|
|
1337
|
+
declare const T_THROW_STATEMENT: number;
|
|
1844
1338
|
|
|
1845
|
-
declare const T_TRY_STATEMENT
|
|
1339
|
+
declare const T_TRY_STATEMENT: number;
|
|
1846
1340
|
|
|
1847
|
-
declare const T_UNARY_EXPRESSION
|
|
1341
|
+
declare const T_UNARY_EXPRESSION: number;
|
|
1848
1342
|
|
|
1849
|
-
declare const T_VAR_DECLARATION
|
|
1343
|
+
declare const T_VAR_DECLARATION: number;
|
|
1850
1344
|
|
|
1851
|
-
declare const T_VAR_STATEMENT
|
|
1345
|
+
declare const T_VAR_STATEMENT: number;
|
|
1852
1346
|
|
|
1853
|
-
declare const T_WHILE_STATEMENT
|
|
1347
|
+
declare const T_WHILE_STATEMENT: number;
|
|
1854
1348
|
|
|
1855
1349
|
declare type Tab = {
|
|
1856
1350
|
label: string;
|
|
@@ -1896,28 +1390,10 @@ declare type TextVariant = (typeof TextVariantKeys)[number];
|
|
|
1896
1390
|
|
|
1897
1391
|
declare const TextVariantKeys: readonly ["abbr", "cite", "code", "codefence", "deleted", "inherit", "inserted", "keyboard", "marked", "sample", "sub", "sup", "var", "strong", "em", "mono", "title", "subtitle", "small", "caption", "placeholder", "paragraph", "subheading", "tableheading", "secondary"];
|
|
1898
1392
|
|
|
1899
|
-
/**
|
|
1900
|
-
* This type represents a theme definition object. Theme files can use this object's JSON-serialized
|
|
1901
|
-
* format to define an app theme; an app can have multiple theme files.
|
|
1902
|
-
*/
|
|
1903
1393
|
export declare interface ThemeDefinition extends ThemeDefinitionDetails {
|
|
1904
|
-
/**
|
|
1905
|
-
* Theme id
|
|
1906
|
-
*/
|
|
1907
1394
|
id: string;
|
|
1908
|
-
/**
|
|
1909
|
-
* Optional theme name
|
|
1910
|
-
*/
|
|
1911
1395
|
name?: string;
|
|
1912
|
-
/**
|
|
1913
|
-
* A theme can extend existing themes. The extension means that the theme variable values defined
|
|
1914
|
-
* in the new theme override the base theme's variable values.
|
|
1915
|
-
*/
|
|
1916
1396
|
extends?: string | Array<string>;
|
|
1917
|
-
/**
|
|
1918
|
-
* This property defines the tone-dependent theme variable values. When a theme variable value is
|
|
1919
|
-
* resolved, the common theme variable values are overridden with their theme-specific values.
|
|
1920
|
-
*/
|
|
1921
1397
|
tones?: Record<string | ThemeTone, ThemeDefinitionDetails>;
|
|
1922
1398
|
}
|
|
1923
1399
|
|
|
@@ -1931,64 +1407,18 @@ declare type ThemeIdDescriptor = {
|
|
|
1931
1407
|
defaultValue?: DefaultValueDescriptor;
|
|
1932
1408
|
};
|
|
1933
1409
|
|
|
1934
|
-
/**
|
|
1935
|
-
* When rendering any part of an XMLUI app, the styles to apply are enclosed in a theme scope.
|
|
1936
|
-
* Most apps use a single theme scope that includes all nodes within the root app node. However,
|
|
1937
|
-
* any app can use multiple theme scopes.
|
|
1938
|
-
*
|
|
1939
|
-
* The scope determines how the app applies styles to the particular section. This type defines
|
|
1940
|
-
* the properties of such a theme scope.
|
|
1941
|
-
*/
|
|
1942
1410
|
declare type ThemeScope = {
|
|
1943
|
-
/**
|
|
1944
|
-
* Gets the id of the scope's theme
|
|
1945
|
-
*/
|
|
1946
1411
|
activeThemeId: string;
|
|
1947
|
-
/**
|
|
1948
|
-
* Gets the current tone of the scope's theme
|
|
1949
|
-
*/
|
|
1950
1412
|
activeThemeTone: ThemeTone;
|
|
1951
|
-
/**
|
|
1952
|
-
* The HTML element that works as the root of the theme's scope.
|
|
1953
|
-
*/
|
|
1954
1413
|
root: HTMLElement | undefined;
|
|
1955
|
-
/**
|
|
1956
|
-
* The active theme in the current scope
|
|
1957
|
-
*/
|
|
1958
1414
|
activeTheme: ThemeDefinition;
|
|
1959
|
-
/**
|
|
1960
|
-
* This hash object stores the CSS theme variable names with their CSS values definition,
|
|
1961
|
-
* like "--xmlui-verticalAlignment-Text-sub": "sub";
|
|
1962
|
-
* "--xmlui-backgroundColor": "var(--xmlui-color-surface-50)"
|
|
1963
|
-
*/
|
|
1964
1415
|
themeStyles: Record<string, string>;
|
|
1965
|
-
/**
|
|
1966
|
-
* This hash object stores the theme variable names with their CSS values definition, like
|
|
1967
|
-
* "verticalAlignment-Text-sub": "sub"; "backgroundColor": "var(--xmlui-color-surface-50)".
|
|
1968
|
-
*/
|
|
1969
1416
|
themeVars: Record<string, string>;
|
|
1970
|
-
/**
|
|
1971
|
-
* This function retrieves the physical path of the provided resource. The path can be used
|
|
1972
|
-
* as a URL in HTML tags, like in the `src` attribute of `<img>`.
|
|
1973
|
-
* @param resourceString The recource name to resolve to an URL
|
|
1974
|
-
*/
|
|
1975
1417
|
getResourceUrl: (resourceString?: string) => string | undefined;
|
|
1976
|
-
/**
|
|
1977
|
-
* This function gets the value of the specified theme variable.
|
|
1978
|
-
* @param themeVar Theme variable name to resolve
|
|
1979
|
-
*/
|
|
1980
1418
|
getThemeVar: (themeVar: string) => string | undefined;
|
|
1981
1419
|
};
|
|
1982
1420
|
|
|
1983
|
-
|
|
1984
|
-
* This type describes one the available theme tones.
|
|
1985
|
-
*/
|
|
1986
|
-
export declare type ThemeTone = (typeof ThemeToneKeys)[number];
|
|
1987
|
-
|
|
1988
|
-
/**
|
|
1989
|
-
* Each theme can have a light or a dark tone.
|
|
1990
|
-
*/
|
|
1991
|
-
declare const ThemeToneKeys: readonly ["light", "dark"];
|
|
1421
|
+
export declare type ThemeTone = "light" | "dark";
|
|
1992
1422
|
|
|
1993
1423
|
declare type THROW_STATEMENT = typeof T_THROW_STATEMENT;
|
|
1994
1424
|
|
|
@@ -2150,10 +1580,6 @@ declare interface UnaryExpression extends ExpressionBase {
|
|
|
2150
1580
|
|
|
2151
1581
|
declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
|
|
2152
1582
|
|
|
2153
|
-
/**
|
|
2154
|
-
* This function updates the state of a component.
|
|
2155
|
-
* @param componentState The new state of the component
|
|
2156
|
-
*/
|
|
2157
1583
|
declare type UpdateStateFn = (componentState: any, options?: any) => void;
|
|
2158
1584
|
|
|
2159
1585
|
export declare function useAppLayoutContext(): IAppLayoutContext;
|
|
@@ -2191,63 +1617,16 @@ declare type ValidationStatus = (typeof validationStatusValues)[number];
|
|
|
2191
1617
|
|
|
2192
1618
|
declare const validationStatusValues: readonly ["none", "error", "warning", "valid"];
|
|
2193
1619
|
|
|
2194
|
-
/**
|
|
2195
|
-
* This type represent the function that extracts the value from a component property
|
|
2196
|
-
*/
|
|
2197
1620
|
declare type ValueExtractor = {
|
|
2198
|
-
/**
|
|
2199
|
-
* Get a value (any) from a component property
|
|
2200
|
-
* @param expression Value expression
|
|
2201
|
-
* @param strict Strict matching?
|
|
2202
|
-
*/
|
|
2203
1621
|
(expression?: any, strict?: boolean): any;
|
|
2204
|
-
/**
|
|
2205
|
-
* Get a string value from an expression
|
|
2206
|
-
* @param expression Value expression
|
|
2207
|
-
*/
|
|
2208
1622
|
asString(expression?: any): string;
|
|
2209
|
-
/**
|
|
2210
|
-
* Get an optional string value from an expression
|
|
2211
|
-
* @param expression Value expression
|
|
2212
|
-
* @param defValue Default value, if the parameter value is undefined
|
|
2213
|
-
*/
|
|
2214
1623
|
asOptionalString<T extends string>(expression?: any, defValue?: string): T | undefined;
|
|
2215
|
-
/**
|
|
2216
|
-
* Get an optional string value from an expression
|
|
2217
|
-
* @param expression Value expression
|
|
2218
|
-
*/
|
|
2219
1624
|
asOptionalStringArray(expression?: any): (string | undefined)[];
|
|
2220
|
-
/**
|
|
2221
|
-
* Get a display string value from an expression
|
|
2222
|
-
* @param expression Value expression
|
|
2223
|
-
*/
|
|
2224
1625
|
asDisplayText(expression?: any): string;
|
|
2225
|
-
/**
|
|
2226
|
-
* Get a number value from an expression
|
|
2227
|
-
* @param expression Value expression
|
|
2228
|
-
*/
|
|
2229
1626
|
asNumber(expression?: any): number;
|
|
2230
|
-
/**
|
|
2231
|
-
* Get an optional number value from an expression
|
|
2232
|
-
* @param expression Value expression
|
|
2233
|
-
* @param defValue Default value, if the parameter value is undefined
|
|
2234
|
-
*/
|
|
2235
1627
|
asOptionalNumber(expression?: any, defValue?: number): number | undefined;
|
|
2236
|
-
/**
|
|
2237
|
-
* Get a boolean value (JavaScript semantics) from an expression
|
|
2238
|
-
* @param expression Value expression
|
|
2239
|
-
*/
|
|
2240
1628
|
asBoolean(expression?: any): boolean;
|
|
2241
|
-
/**
|
|
2242
|
-
* Get an optional Boolean value from an expression
|
|
2243
|
-
* @param expression Value expression
|
|
2244
|
-
* @param defValue Default value, if the parameter value is undefined
|
|
2245
|
-
*/
|
|
2246
1629
|
asOptionalBoolean(expression?: any, defValue?: boolean): boolean | undefined;
|
|
2247
|
-
/**
|
|
2248
|
-
* Get a CSS size value from an expression
|
|
2249
|
-
* @param expression Value expression
|
|
2250
|
-
*/
|
|
2251
1630
|
asSize(expression?: any): string;
|
|
2252
1631
|
};
|
|
2253
1632
|
|