feat: add hosted embed URL functionality and enhance widget embed options with tabbed interface

This commit is contained in:
Rotimi Best
2026-05-19 16:32:42 +01:00
parent eec65283a4
commit 0f388ae0d3
18 changed files with 203 additions and 11 deletions
+3
View File
@@ -30,6 +30,7 @@ import {
getCourseBaseUrl,
getCourseWidgetScriptUrl,
getWidgetEmbedCode,
getWidgetHostedEmbedUrl,
listWidgetAvailableEditorData
} from './widget-payload';
@@ -100,6 +101,7 @@ export async function getOrganizationWidgetDetail(orgId: string, widgetId: strin
config: normalizeWidgetConfig(widget.config as Record<string, unknown>, editorData.planName),
selectedCourseIds: selectedCourses.map((course) => course.courseId),
embedCode: getWidgetEmbedCode(widget.publicKey),
hostedEmbedUrl: getWidgetHostedEmbedUrl(widget.publicKey),
publicScriptUrl: getCourseWidgetScriptUrl()
},
organization: {
@@ -227,6 +229,7 @@ export async function publishOrganizationWidget(orgId: string, widgetId: string,
version,
payload,
embedCode: getWidgetEmbedCode(widget.publicKey),
hostedEmbedUrl: getWidgetHostedEmbedUrl(widget.publicKey),
publicScriptUrl: getCourseWidgetScriptUrl()
};
} catch (error) {