mftsccs-browser 2.2.49-beta → 2.2.51-beta
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.
|
@@ -96,6 +96,16 @@ export declare class BuilderStatefulWidget extends StatefulWidget {
|
|
|
96
96
|
customFunctions: TCustomFunction[];
|
|
97
97
|
/** JavaScript code (as string) for widget dependencies initialization */
|
|
98
98
|
widgetDependenciesData: string;
|
|
99
|
+
/** ID of the widget this instance was built from, used to identify it in error logs */
|
|
100
|
+
widgetId: number;
|
|
101
|
+
/** Name of the widget this instance was built from, used to identify it in error logs */
|
|
102
|
+
widgetName: string;
|
|
103
|
+
/**
|
|
104
|
+
* Runs one lifecycle hook's source with `this` bound to the widget. The hook is async and its
|
|
105
|
+
* promise is not awaited by callers, so a rejection is logged here with the widget it came from
|
|
106
|
+
* and then rethrown, which keeps the usual "Uncaught (in promise)" report.
|
|
107
|
+
*/
|
|
108
|
+
protected runLifecycle(hook: string, source: unknown): any;
|
|
99
109
|
/**
|
|
100
110
|
* Retrieves the current user's ID from local storage.
|
|
101
111
|
*
|
|
@@ -91,6 +91,26 @@ export declare function renderLatestWidget(widgetId: number, attachNode: HTMLEle
|
|
|
91
91
|
* @returns Promise resolving to the rendered widget instance
|
|
92
92
|
*/
|
|
93
93
|
export declare function renderWidget(widgetId: number, attachNode: HTMLElement, props?: any, showDocumentation?: boolean): Promise<BuilderStatefulWidget | undefined>;
|
|
94
|
+
/**
|
|
95
|
+
* Renders an exact widget version the way a published page renders its widget.
|
|
96
|
+
*
|
|
97
|
+
* Unlike {@link renderWidget}, child widgets marked "use latest" are swapped for their latest
|
|
98
|
+
* version, as {@link renderLatestWidget} does, so an unpublished version renders exactly as it
|
|
99
|
+
* will once published. The version is fetched from the API, not the cache server, so a version
|
|
100
|
+
* saved moments ago renders as saved.
|
|
101
|
+
*
|
|
102
|
+
* Errors are thrown instead of only logged, so a caller (such as a test harness) can tell a
|
|
103
|
+
* failed render from a successful one.
|
|
104
|
+
*
|
|
105
|
+
* @param widgetId - The widget version ID to render
|
|
106
|
+
* @param attachNode - DOM element to attach the widget to
|
|
107
|
+
* @param props - Optional properties to pass to the widget
|
|
108
|
+
* @param showDocumentation - Whether to show documentation button (default: false)
|
|
109
|
+
* @param options - Optional render behaviour, see {@link WidgetRenderOptions}
|
|
110
|
+
* @returns Promise resolving to the rendered widget instance
|
|
111
|
+
* @throws When the widget does not exist or does not render
|
|
112
|
+
*/
|
|
113
|
+
export declare function renderWidgetVersion(widgetId: number, attachNode: HTMLElement, props?: any, showDocumentation?: boolean, options?: WidgetRenderOptions): Promise<BuilderStatefulWidget>;
|
|
94
114
|
/**
|
|
95
115
|
* Materializes a widget tree into DOM elements with styles and scripts.
|
|
96
116
|
*
|
package/dist/types/app.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ export { CountInfo } from './DataStructures/Count/CountInfo';
|
|
|
136
136
|
export { LogEvent } from './Services/Logs/LogEvent';
|
|
137
137
|
export { Selector } from './Api/Prototype/Selector';
|
|
138
138
|
export { AccessControlService } from './Services/AccessControl/AccessControl';
|
|
139
|
-
export { importLatestWidget, importRecentWidget, renderImportedWidget, renderLatestWidget, renderPage, renderWidget, convertWidgetTreeToWidgetWithWrapper, getWidgetFromId, convertWidgetTreeToWidget, unwrapContainers, getWidgetBulkFromId } from './Widgets/RenderWidgetService';
|
|
139
|
+
export { importLatestWidget, importRecentWidget, renderImportedWidget, renderLatestWidget, renderPage, renderWidget, renderWidgetVersion, convertWidgetTreeToWidgetWithWrapper, getWidgetFromId, convertWidgetTreeToWidget, unwrapContainers, getWidgetBulkFromId } from './Widgets/RenderWidgetService';
|
|
140
140
|
export type { WidgetRenderOptions } from './Widgets/RenderWidgetService';
|
|
141
141
|
export { CreateData } from './Services/automated/automated-concept-connection';
|
|
142
142
|
export { Prototype } from './DataStructures/Prototype/Prototype';
|