mftsccs-browser 2.2.50-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.
@@ -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
  *
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-browser",
3
- "version": "2.2.50-beta",
3
+ "version": "2.2.51-beta",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/main.bundle.js",