@memberjunction/ng-dashboards 6.2.0-edge.6 → 6.2.0-edge.7
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/README.md +23 -16
- package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js +2 -2
- package/dist/AI/components/analytics/agent-runs/agent-run-analysis.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.js +3 -1
- package/dist/AI/components/analytics/realtime/realtime-management.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-overview.component.d.ts +1 -1
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js +3 -3
- package/dist/AI/components/analytics/realtime/realtime-overview.component.js.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts +6 -4
- package/dist/AI/components/analytics/realtime/realtime-session-data.d.ts.map +1 -1
- package/dist/AI/components/analytics/realtime/realtime-session-data.js +8 -2
- package/dist/AI/components/analytics/realtime/realtime-session-data.js.map +1 -1
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js +6 -6
- package/dist/AI/components/autotagging/autotagging-pipeline-resource.component.js.map +1 -1
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js +1 -1
- package/dist/AI/components/autotagging/components/classify-item-grid.component.js.map +1 -1
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js +1 -0
- package/dist/AI/components/autotagging/components/classify-org-context-editor.component.js.map +1 -1
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js +1 -0
- package/dist/AI/components/autotagging/dialogs/source-type-form.dialog.component.js.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.d.ts.map +1 -1
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js +1 -0
- package/dist/AI/components/autotagging/tabs/sources-tab.component.js.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.d.ts.map +1 -1
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js +1 -0
- package/dist/AI/components/duplicates/duplicate-detection-resource.component.js.map +1 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.js +2 -2
- package/dist/AI/components/tags/tags-resource.component.d.ts.map +1 -1
- package/dist/AI/components/tags/tags-resource.component.js +3 -2
- package/dist/AI/components/tags/tags-resource.component.js.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.d.ts.map +1 -1
- package/dist/AI/components/vectors/vector-management-resource.component.js +12 -6
- package/dist/AI/components/vectors/vector-management-resource.component.js.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.js +4 -2
- package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
- package/dist/Actions/action-result-code.d.ts +80 -0
- package/dist/Actions/action-result-code.d.ts.map +1 -0
- package/dist/Actions/action-result-code.js +163 -0
- package/dist/Actions/action-result-code.js.map +1 -0
- package/dist/Actions/components/actions-overview.component.d.ts +8 -0
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +12 -9
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.d.ts +29 -9
- package/dist/Actions/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +65 -42
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.d.ts.map +1 -1
- package/dist/Actions/components/explorer/action-card.component.js +5 -4
- package/dist/Actions/components/explorer/action-card.component.js.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts +92 -130
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.d.ts.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js +189 -274
- package/dist/ChiefOfStaff/chief-of-staff-agent-context.js.map +1 -1
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts +29 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js +666 -0
- package/dist/ChiefOfStaff/chief-of-staff-approvals.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts +56 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.js +515 -0
- package/dist/ChiefOfStaff/chief-of-staff-governance.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts +14 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js +39 -0
- package/dist/ChiefOfStaff/chief-of-staff-live-refresh.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts +17 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.js +485 -0
- package/dist/ChiefOfStaff/chief-of-staff-overview.component.js.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts +139 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.d.ts.map +1 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.js +602 -0
- package/dist/ChiefOfStaff/chief-of-staff-page-base.js.map +1 -0
- package/dist/ChiefOfStaff/index.d.ts +4 -1
- package/dist/ChiefOfStaff/index.d.ts.map +1 -1
- package/dist/ChiefOfStaff/index.js +4 -1
- package/dist/ChiefOfStaff/index.js.map +1 -1
- package/dist/Communication/communication-monitor-resource.component.js +3 -3
- package/dist/Communication/communication-monitor-resource.component.js.map +1 -1
- package/dist/Communication/communication-runs-resource.component.js +3 -3
- package/dist/Communication/communication-runs-resource.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +1 -0
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.d.ts.map +1 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js +2 -1
- package/dist/ComponentStudio/components/artifact-selection-dialog.component.js.map +1 -1
- package/dist/ComponentStudio/services/component-version.service.d.ts.map +1 -1
- package/dist/ComponentStudio/services/component-version.service.js +3 -0
- package/dist/ComponentStudio/services/component-version.service.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +21 -2
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +32 -5
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DevTools/graphql-console.component.js +2 -2
- package/dist/DevTools/lazy-module-status.component.js +2 -2
- package/dist/FormBuilder/form-builder-resource.component.d.ts.map +1 -1
- package/dist/FormBuilder/form-builder-resource.component.js +5 -0
- package/dist/FormBuilder/form-builder-resource.component.js.map +1 -1
- package/dist/Integration/components/connections/connections.component.js +2 -2
- package/dist/Integration/services/integration-data.service.d.ts +1 -1
- package/dist/Integration/services/integration-data.service.d.ts.map +1 -1
- package/dist/Integration/services/integration-data.service.js +4 -3
- package/dist/Integration/services/integration-data.service.js.map +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js +1 -1
- package/dist/Lists/components/lists-browse-resource.component.js.map +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js +1 -1
- package/dist/Lists/components/lists-my-lists-resource.component.js.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.d.ts.map +1 -1
- package/dist/LoginStudio/login-studio-resource.component.js +1 -0
- package/dist/LoginStudio/login-studio-resource.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-experiments.component.js +1 -0
- package/dist/PredictiveStudio/components/ps-experiments.component.js.map +1 -1
- package/dist/PredictiveStudio/components/ps-pipeline-wizard.component.js +2 -2
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js +3 -0
- package/dist/PredictiveStudio/components/ps-predictions-grid.component.js.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.d.ts.map +1 -1
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js +1 -0
- package/dist/PredictiveStudio/engine/predictive-studio.engine.js.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.d.ts.map +1 -1
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js +1 -0
- package/dist/PredictiveStudio/resources/ps-predictions-resource.component.js.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.d.ts +26 -0
- package/dist/QueryBrowser/query-browser-resource.component.d.ts.map +1 -1
- package/dist/QueryBrowser/query-browser-resource.component.js +375 -252
- package/dist/QueryBrowser/query-browser-resource.component.js.map +1 -1
- package/dist/UserRoutines/user-routines-resource.component.d.ts +8 -1
- package/dist/UserRoutines/user-routines-resource.component.d.ts.map +1 -1
- package/dist/UserRoutines/user-routines-resource.component.js +22 -4
- package/dist/UserRoutines/user-routines-resource.component.js.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.d.ts.map +1 -1
- package/dist/VersionHistory/components/diff-resource.component.js +1 -0
- package/dist/VersionHistory/components/diff-resource.component.js.map +1 -1
- package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts +162 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.js +1105 -0
- package/dist/VideoStudio/components/vs-archetype-editor.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-audio-options.component.d.ts +27 -0
- package/dist/VideoStudio/components/vs-audio-options.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-audio-options.component.js +119 -0
- package/dist/VideoStudio/components/vs-audio-options.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts +105 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.js +560 -0
- package/dist/VideoStudio/components/vs-copilot-panel.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-production-brief.component.d.ts +163 -0
- package/dist/VideoStudio/components/vs-production-brief.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-production-brief.component.js +1054 -0
- package/dist/VideoStudio/components/vs-production-brief.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts +43 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.js +412 -0
- package/dist/VideoStudio/components/vs-setup-health-card.component.js.map +1 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts +73 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.d.ts.map +1 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.js +271 -0
- package/dist/VideoStudio/components/vs-studio-slide-in.component.js.map +1 -0
- package/dist/VideoStudio/index.d.ts +12 -0
- package/dist/VideoStudio/index.d.ts.map +1 -0
- package/dist/VideoStudio/index.js +12 -0
- package/dist/VideoStudio/index.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts +118 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js +964 -0
- package/dist/VideoStudio/resources/video-studio-archetypes-resource.component.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts +70 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js +600 -0
- package/dist/VideoStudio/resources/video-studio-brand-kits-resource.component.js.map +1 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts +182 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.d.ts.map +1 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.js +1481 -0
- package/dist/VideoStudio/resources/video-studio-productions-resource.component.js.map +1 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts +102 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.d.ts.map +1 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js +240 -0
- package/dist/VideoStudio/services/vs-studio-slide-in-state.service.js.map +1 -0
- package/dist/VideoStudio/video-studio-agent-context.d.ts +495 -0
- package/dist/VideoStudio/video-studio-agent-context.d.ts.map +1 -0
- package/dist/VideoStudio/video-studio-agent-context.js +992 -0
- package/dist/VideoStudio/video-studio-agent-context.js.map +1 -0
- package/dist/ai-dashboards.module.d.ts +25 -22
- package/dist/ai-dashboards.module.d.ts.map +1 -1
- package/dist/ai-dashboards.module.js +23 -7
- package/dist/ai-dashboards.module.js.map +1 -1
- package/dist/module.d.ts +13 -12
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +7 -0
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +7 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +9 -2
- package/dist/public-api.js.map +1 -1
- package/dist/shared/action-scheduled-job.d.ts.map +1 -1
- package/dist/shared/action-scheduled-job.js +2 -0
- package/dist/shared/action-scheduled-job.js.map +1 -1
- package/dist/video-studio-dashboards.module.d.ts +40 -0
- package/dist/video-studio-dashboards.module.d.ts.map +1 -0
- package/dist/video-studio-dashboards.module.js +159 -0
- package/dist/video-studio-dashboards.module.js.map +1 -0
- package/package.json +77 -71
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts +0 -195
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.d.ts.map +0 -1
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js +0 -2910
- package/dist/ChiefOfStaff/chief-of-staff-dashboard.component.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vs-archetype-editor.component.js","sourceRoot":"","sources":["../../../src/VideoStudio/components/vs-archetype-editor.component.ts","../../../src/VideoStudio/components/vs-archetype-editor.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,MAAM,EACN,KAAK,EAEL,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAIL,iBAAiB,GAClB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACL,eAAe,EACf,eAAe,GAEhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EAGpB,4BAA4B,EAC5B,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,GAErB,MAAM,+BAA+B,CAAC;;;;;;ICtCjC,8BAIC;IACC,wBAAiE;IACjE,4BAAM;IAAA,YAAe;IACvB,AADuB,iBAAO,EACxB;;;IADE,eAAe;IAAf,sCAAe;;;;IA+KjB,kCAUC;IADC,mNAAS,8BAAoB,KAAC;IAE9B,4CAA2E;IAC7E,iBAAS;;;;IAJP,AAFA,AADA,iCAA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yBAA1B,0BAA0B;6DAA1B,0BAA0B;YC9IrC,AADF,8BAA8D,aAC1B;YAChC,4FAAiB;YAcb,AADF,AADF,8BAAmC,aACM,cACoC;YACvE,4BACF;YAAA,iBAAO;YACP,+BAAmC;YACjC,4EACF;YACF,AADE,iBAAO,EACH;YACN,sCAUC;YADC,kIAAiB,6BAAyB,IAAC;YAE/C,AADG,iBAAc,EACX;YAKF,AADF,AADF,+BAAmC,gBACI,eACC;YAAA,qBAAI;YAAA,iBAAO;YAC/C,kCAOE;YAFA,6MAAkB;YAGtB,AARE,iBAOE,EACI;YAGN,AADF,+BAAmC,gBACsC;YACrE,2BACF;YAAA,iBAAO;YACP,wCAQC;YADC,2NAAsB;YAE1B,AADG,iBAAc,EACX;YAGJ,AADF,+BAAmC,gBACqC;YACpE,0BACF;YAAA,iBAAO;YACP,wCASC;YADC,6NAAuB;YAG7B,AADE,AADG,iBAAc,EACX,EACF;YAKF,AADF,AADF,iCAAqC,cACI,eACD;YAAA,4BAAW;YAAA,iBAAO;YACtD,gCAAmC;YACjC,sGACF;YACF,AADE,iBAAO,EACH;YACN,qCAOC;YAFC,8NAAyB;YAG7B,AADG,iBAAW,EACN;YAOA,AADF,AADF,AADF,AADF,gCAA4C,eACA,cACL,cACM,gBACqC;YACxE,qCACF;YAAA,iBAAO;YACP,iCAGC;YACC,aACF;YACF,AADE,iBAAO,EACH;YACN,6CASC;YADC,wIAAiB,mCAA+B,IAAC;YAErD,AADG,iBAAmB,EAChB;YAIF,AADF,AADF,+BAAmC,cACM,gBACiC;YACpE,+BACF;YAAA,iBAAO;YACP,iCAGC;YACC,aACF;YACF,AADE,iBAAO,EACH;YACN,6CASC;YADC,wIAAiB,+BAA2B,IAAC;YAEjD,AADG,iBAAmB,EAChB;YAIF,AADF,AADF,+BAAmC,cACM,gBACiC;YACpE,8BACF;YAAA,iBAAO;YACP,iCAGC;YACC,aACF;YACF,AADE,iBAAO,EACH;YACN,6CASC;YADC,wIAAiB,+BAA2B,IAAC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,uEACF;YAKA,cAAS;YAIT,AADA,AADA,AADA,AADA,uBAAS,YACE,WACD,0BACW,mCACS;YAc5B,eACF;YADE,uEACF;YAKA,cAAS;YAIT,AADA,AADA,AADA,AADA,uBAAS,YACE,WACD,0BACW,mCACS;YAahC,eAcC;YAdD,mCAcC;YASD,eACF;YADE,yDACF;YAEE,eACF;YADE,4EACF;YAKA,cAA4B;YAA5B,8CAA4B;YAG9B,cAoBC;YApBD,wDAoBC;YAGC,eAsFC;YAtFD,wBAsFC;YAUC,eAAqB;YAArB,uCAAqB;YAevB,eAAqC;;YAKnC,cAA0C;YAC1C,AADA,uDAA0C,uCACF;YAM5C,eAkFC;YAlFD,8CAkFC;YAWD,eAAqB;YAArB,uCAAqB;YAGf,eAAqC;YAArC,yDAAqC;YAQ3C,cAAqB;YAArB,uCAAqB;4BDjVvB,YAAY;YACZ,WAAW,2DACX,eAAe,gEACf,iBAAiB;YACjB,mBAAmB;YACnB,uBAAuB;YACvB,iBAAiB;;iFAMR,0BAA0B;cAhBtC,SAAS;6BACI,IAAI,YACN,qBAAqB,WACtB;oBACP,YAAY;oBACZ,WAAW;oBACX,eAAe;oBACf,iBAAiB;oBACjB,mBAAmB;oBACnB,uBAAuB;oBACvB,iBAAiB;iBAClB,mBAGgB,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kFATI,0BAA0B","sourcesContent":["import { CommonModule } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnInit,\n Output,\n} from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { LogError, RunView } from '@memberjunction/core';\nimport {\n MJVideoArchetypeEntity,\n MJVideoArchetypeEntity_VideoBeatTemplate,\n MJVideoArchetypeEntity_VideoPacing,\n VideoStudioEngine,\n} from '@memberjunction/core-entities';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport {\n ArtifactsModule,\n FormatVideoTime,\n VideoBeatStripItem,\n} from '@memberjunction/ng-artifacts';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport {\n MJButtonDirective,\n MJDropdownComponent,\n MJNumericInputComponent,\n MJSwitchComponent,\n} from '@memberjunction/ng-ui-components';\nimport {\n ARCHETYPE_CATEGORIES,\n ArchetypeBeatTemplateInput,\n ArchetypeCategory,\n BuildArchetypeBeatStripItems,\n DeriveBeatKeyFromLabel,\n ParseArchetypeDefaultFormats,\n STUDIO_VIDEO_FORMATS,\n StudioVideoFormat,\n} from '../video-studio-agent-context';\n\nexport interface ArchetypeEditorCompanyOption {\n ID: string;\n Name: string;\n}\n\nexport interface ArchetypeEditorSourceBeat {\n Key?: string | null;\n Label?: string | null;\n Purpose?: string | null;\n MinDurationSeconds?: number | null;\n MaxDurationSeconds?: number | null;\n DefaultDurationSeconds?: number | null;\n ComputedDurationSeconds?: number | null;\n Guidance?: string | null;\n RequiresDataBinding?: boolean | null;\n}\n\nexport interface ArchetypeEditorSourcePacing {\n AvgSecondsBetweenChanges?: number;\n HoldRules?: string;\n MinBeatDurationSeconds?: number;\n MaxBeatDurationSeconds?: number;\n}\n\nexport interface ArchetypeEditorSourceItem {\n ID: string;\n Name: string;\n Description?: string | null;\n Category?: ArchetypeCategory | string | null;\n CompanyID?: string | null;\n CompanyName?: string | null;\n Company?: string | null;\n IsShipped?: boolean;\n DefaultDurationSeconds?: number | null;\n MinDurationSeconds?: number | null;\n MaxDurationSeconds?: number | null;\n DefaultFormats?: string | null;\n DefaultInteractionMode?: string | null;\n Guidance?: string | null;\n BeatTemplate?: string | null;\n BeatTemplateRaw?: string | null;\n BeatTemplateObject?: ReadonlyArray<ArchetypeEditorSourceBeat> | null;\n Beats?: ReadonlyArray<ArchetypeEditorSourceBeat> | null;\n Pacing?: ArchetypeEditorSourcePacing | string | null;\n PacingRaw?: string | null;\n PacingObject?: ArchetypeEditorSourcePacing | null;\n}\n\nexport interface ArchetypeEditorBeatRow {\n TrackId: number;\n Key?: string;\n Label: string;\n Purpose: string;\n Seconds: number;\n MinDurationSeconds: number;\n MaxDurationSeconds: number;\n Guidance: string;\n RequiresDataBinding: boolean;\n}\n\nexport type ArchetypeEditorMode = 'copy' | 'edit';\n\nexport interface ArchetypeStartFromOption {\n ID: string;\n Label: string;\n}\n\nexport interface ArchetypeCategoryDropdownOption {\n Value: ArchetypeCategory;\n Text: string;\n}\n\n/**\n * Dialog body component (`<vs-archetype-editor>`) for creating a company copy of any\n * video archetype or editing an existing company archetype.\n *\n * Plan rules (§4.3, §12): shipped archetypes (`CompanyID === null`) are read-only\n * templates; a company makes its own by copying one. `Name` is unique per company\n * scope; `Category` is one of the 7 CHECK values; beats are persisted as a valid\n * `VideoBeatTemplate[]` (`Key`, `Label`, `Purpose`, `MinDurationSeconds`,\n * `MaxDurationSeconds`, `DefaultDurationSeconds`, optional `Guidance` and\n * `RequiresDataBinding`); `Pacing` is `VideoPacing`. Saves go through the\n * `MJ: Video Archetypes` entity object and refresh `VideoStudioEngine`.\n */\n@Component({\n standalone: true,\n selector: 'vs-archetype-editor',\n imports: [\n CommonModule,\n FormsModule,\n ArtifactsModule,\n MJButtonDirective,\n MJDropdownComponent,\n MJNumericInputComponent,\n MJSwitchComponent,\n ],\n templateUrl: './vs-archetype-editor.component.html',\n styleUrls: ['./vs-archetype-editor.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VSArchetypeEditorComponent extends BaseAngularComponent implements OnInit {\n @Input() Mode: ArchetypeEditorMode = 'copy';\n @Input() SourceArchetypeId: string | null = null;\n @Input() EditingArchetypeId: string | null = null;\n @Input() Archetypes: ReadonlyArray<ArchetypeEditorSourceItem> | null = null;\n @Input() Companies: ReadonlyArray<ArchetypeEditorCompanyOption> | null = null;\n @Input() InitialCompanyId: string | null = null;\n\n @Output() Saved = new EventEmitter<string>();\n @Output() Cancelled = new EventEmitter<void>();\n\n public AvailableArchetypes: ArchetypeEditorSourceItem[] = [];\n public AvailableCompanies: ArchetypeEditorCompanyOption[] = [];\n public StartFromOptions: ArchetypeStartFromOption[] = [];\n public readonly CategoryOptions: ReadonlyArray<ArchetypeCategoryDropdownOption> =\n ARCHETYPE_CATEGORIES.map((cat) => ({\n Value: cat,\n Text: cat === 'DataStory' ? 'Data Story' : cat,\n }));\n public readonly AvailableFormats: ReadonlyArray<StudioVideoFormat> = STUDIO_VIDEO_FORMATS;\n\n public SelectedSourceId = '';\n public Name = '';\n public Category: ArchetypeCategory = 'Explainer';\n public CompanyID = '';\n public Description = '';\n\n public DefaultDurationSeconds = 60;\n public MinDurationSeconds = 30;\n public MaxDurationSeconds = 120;\n public SelectedFormats: StudioVideoFormat[] = ['16:9'];\n public DefaultInteractionMode = 'Autonomous';\n\n public Beats: ArchetypeEditorBeatRow[] = [];\n\n public IsAdvancedOpen = false;\n public Guidance = '';\n public PacingAvgSeconds = 5;\n public PacingHoldRules = '';\n\n public IsSaving = false;\n public SaveError: string | null = null;\n\n private nextBeatTrackId = 1;\n private lastAutoSuggestedName = '';\n private sourcePacing: ArchetypeEditorSourcePacing | null = null;\n private companiesLoadError: string | null = null;\n private readonly cdr = inject(ChangeDetectorRef);\n\n async ngOnInit(): Promise<void> {\n await this.initializeEditor();\n }\n\n public get IsEditingExistingCompanyArchetype(): boolean {\n if (this.Mode !== 'edit' || !this.EditingArchetypeId) {\n return false;\n }\n const target = this.findArchetypeById(this.EditingArchetypeId);\n if (!target) {\n return true;\n }\n return Boolean(target.CompanyID && target.CompanyID.trim().length > 0);\n }\n\n public get BeatsTotalSeconds(): number {\n return this.Beats.reduce(\n (sum, beat) => sum + Math.max(1, Math.round(Number(beat.Seconds) || 1)),\n 0,\n );\n }\n\n public get BeatsSumSeconds(): number {\n return this.BeatsTotalSeconds;\n }\n\n public get HasBeatsDurationMismatch(): boolean {\n return (\n this.Beats.length > 0 &&\n this.BeatsTotalSeconds !== Math.max(1, Math.round(Number(this.DefaultDurationSeconds) || 1))\n );\n }\n\n public get HasDurationMismatch(): boolean {\n return this.HasBeatsDurationMismatch;\n }\n\n public get LiveBeatStripItems(): VideoBeatStripItem[] {\n const keys = this.resolveBeatKeys();\n return this.Beats.map((beat, idx) => {\n const label = (beat.Label ?? '').trim() || `Beat ${idx + 1}`;\n const seconds = Math.max(1, Math.round(Number(beat.Seconds) || 1));\n const detail = (beat.Purpose ?? '').trim();\n return {\n Key: keys[idx],\n Label: label,\n Seconds: seconds,\n ...(detail ? { Detail: detail } : {}),\n };\n });\n }\n\n public FormatTime(seconds: number): string {\n const safe = Number.isFinite(seconds) && seconds >= 0 ? Math.round(seconds) : 0;\n return FormatVideoTime(safe);\n }\n\n public OnStartFromChange(sourceId: string | null): void {\n const trimmed = (sourceId ?? '').trim();\n if (!trimmed) {\n return;\n }\n this.SelectedSourceId = trimmed;\n const source = this.findArchetypeById(trimmed);\n if (!source) {\n return;\n }\n this.applySourceArchetype(source, false);\n this.cdr.markForCheck();\n }\n\n public OnDefaultDurationChange(value: number | string | null): void {\n const numeric = typeof value === 'number' ? value : Number(value);\n if (Number.isFinite(numeric) && numeric > 0) {\n this.DefaultDurationSeconds = Math.max(1, Math.round(numeric));\n }\n this.cdr.markForCheck();\n }\n\n public OnMinDurationChange(value: number | string | null): void {\n const numeric = typeof value === 'number' ? value : Number(value);\n if (Number.isFinite(numeric) && numeric > 0) {\n this.MinDurationSeconds = Math.max(1, Math.round(numeric));\n }\n this.cdr.markForCheck();\n }\n\n public OnMaxDurationChange(value: number | string | null): void {\n const numeric = typeof value === 'number' ? value : Number(value);\n if (Number.isFinite(numeric) && numeric > 0) {\n this.MaxDurationSeconds = Math.max(1, Math.round(numeric));\n }\n this.cdr.markForCheck();\n }\n\n public IsFormatSelected(format: string): boolean {\n return this.SelectedFormats.includes(format as StudioVideoFormat);\n }\n\n public ToggleFormat(format: StudioVideoFormat): void {\n if (this.SelectedFormats.includes(format)) {\n if (this.SelectedFormats.length > 1) {\n this.SelectedFormats = this.SelectedFormats.filter((f) => f !== format);\n }\n } else {\n this.SelectedFormats = [...this.SelectedFormats, format];\n }\n this.cdr.markForCheck();\n }\n\n public OnBeatLabelChange(index: number, label: string): void {\n const beat = this.Beats[index];\n if (!beat) {\n return;\n }\n beat.Label = label ?? '';\n this.Beats = [...this.Beats];\n this.cdr.markForCheck();\n }\n\n public OnBeatPurposeChange(index: number, purpose: string): void {\n const beat = this.Beats[index];\n if (!beat) {\n return;\n }\n beat.Purpose = purpose ?? '';\n this.Beats = [...this.Beats];\n this.cdr.markForCheck();\n }\n\n public OnBeatSecondsChange(index: number, value: number | string | null): void {\n const beat = this.Beats[index];\n if (!beat) {\n return;\n }\n const numeric = typeof value === 'number' ? value : Number(value);\n const seconds = Number.isFinite(numeric) && numeric >= 1 ? Math.round(numeric) : 1;\n beat.Seconds = seconds;\n beat.MinDurationSeconds =\n beat.MinDurationSeconds > 0\n ? Math.min(beat.MinDurationSeconds, seconds)\n : Math.max(1, Math.floor(seconds * 0.6));\n beat.MaxDurationSeconds = Math.max(seconds, beat.MaxDurationSeconds || seconds);\n this.Beats = [...this.Beats];\n this.cdr.markForCheck();\n }\n\n public MoveBeatUp(index: number): void {\n if (index <= 0 || index >= this.Beats.length) {\n return;\n }\n const next = [...this.Beats];\n const temp = next[index - 1];\n next[index - 1] = next[index];\n next[index] = temp;\n this.Beats = next;\n this.cdr.markForCheck();\n }\n\n public MoveBeatDown(index: number): void {\n if (index < 0 || index >= this.Beats.length - 1) {\n return;\n }\n const next = [...this.Beats];\n const temp = next[index + 1];\n next[index + 1] = next[index];\n next[index] = temp;\n this.Beats = next;\n this.cdr.markForCheck();\n }\n\n public RemoveBeat(index: number): void {\n if (this.Beats.length <= 1 || index < 0 || index >= this.Beats.length) {\n return;\n }\n this.Beats = this.Beats.filter((_, idx) => idx !== index);\n this.cdr.markForCheck();\n }\n\n public AddBeat(): void {\n const nextIdx = this.Beats.length + 1;\n this.Beats = [\n ...this.Beats,\n {\n TrackId: this.nextBeatTrackId++,\n Key: '',\n Label: `Beat ${nextIdx}`,\n Purpose: 'Advance the story with a clear visual focus.',\n Seconds: 5,\n MinDurationSeconds: 3,\n MaxDurationSeconds: 10,\n Guidance: '',\n RequiresDataBinding: false,\n },\n ];\n this.cdr.markForCheck();\n }\n\n /**\n * Scales all beat durations with {@link BuildArchetypeBeatStripItems} so their\n * integer `Seconds` sum to `DefaultDurationSeconds`.\n */\n public FitBeatsToLength(): void {\n if (this.Beats.length === 0) {\n return;\n }\n const targetDuration = Math.max(\n this.Beats.length,\n Math.round(Number(this.DefaultDurationSeconds) || 30),\n );\n this.DefaultDurationSeconds = targetDuration;\n\n const keys = this.resolveBeatKeys();\n const inputs: ArchetypeBeatTemplateInput[] = this.Beats.map((b, idx) => ({\n Key: keys[idx],\n Label: b.Label,\n Purpose: b.Purpose,\n DefaultDurationSeconds: Math.max(1, Math.round(Number(b.Seconds) || 1)),\n MinDurationSeconds: b.MinDurationSeconds,\n MaxDurationSeconds: b.MaxDurationSeconds,\n }));\n\n const scaled = BuildArchetypeBeatStripItems(inputs, targetDuration);\n this.Beats = this.Beats.map((beat, idx) => {\n const nextSeconds = scaled[idx]?.Seconds ?? beat.Seconds;\n return {\n ...beat,\n Seconds: nextSeconds,\n MinDurationSeconds:\n beat.MinDurationSeconds > 0\n ? Math.min(beat.MinDurationSeconds, nextSeconds)\n : Math.max(1, Math.floor(nextSeconds * 0.6)),\n MaxDurationSeconds: Math.max(nextSeconds, beat.MaxDurationSeconds),\n };\n });\n this.cdr.markForCheck();\n }\n\n public ToggleAdvanced(): void {\n this.IsAdvancedOpen = !this.IsAdvancedOpen;\n this.cdr.markForCheck();\n }\n\n public BuildBeatTemplatePayload(): MJVideoArchetypeEntity_VideoBeatTemplate[] {\n const keys = this.resolveBeatKeys();\n return this.Beats.map((beat, idx) => {\n const label = (beat.Label ?? '').trim() || `Beat ${idx + 1}`;\n const key = keys[idx];\n const purpose = (beat.Purpose ?? '').trim() || label;\n const defaultDur = Math.max(1, Math.round(Number(beat.Seconds) || 1));\n const rawMin = Number(beat.MinDurationSeconds);\n const minDur =\n Number.isFinite(rawMin) && rawMin > 0\n ? Math.min(defaultDur, rawMin)\n : Math.max(1, Math.floor(defaultDur * 0.6));\n const rawMax = Number(beat.MaxDurationSeconds);\n const maxDur =\n Number.isFinite(rawMax) && rawMax >= defaultDur\n ? rawMax\n : Math.max(defaultDur, Math.ceil(defaultDur * 1.5));\n const guidance = (beat.Guidance ?? '').trim();\n\n return {\n Key: key,\n Label: label,\n Purpose: purpose,\n MinDurationSeconds: minDur,\n MaxDurationSeconds: maxDur,\n DefaultDurationSeconds: defaultDur,\n ...(guidance ? { Guidance: guidance } : {}),\n ...(beat.RequiresDataBinding ? { RequiresDataBinding: true } : {}),\n };\n });\n }\n\n public BuildPacingPayload(): MJVideoArchetypeEntity_VideoPacing {\n const numericAvg = Number(this.PacingAvgSeconds);\n const avg =\n Number.isFinite(numericAvg) && numericAvg > 0\n ? numericAvg\n : 5;\n return {\n ...(this.sourcePacing ?? {}),\n AvgSecondsBetweenChanges: avg,\n HoldRules: (this.PacingHoldRules ?? '').trim(),\n };\n }\n\n public Cancel(): void {\n this.Cancelled.emit();\n }\n\n public async Save(): Promise<void> {\n if (this.IsSaving) {\n return;\n }\n\n const trimmedName = (this.Name ?? '').trim();\n if (!trimmedName) {\n this.SaveError = 'Please enter a name for the archetype.';\n this.cdr.markForCheck();\n return;\n }\n\n const companyId = (this.CompanyID ?? '').trim();\n if (!companyId) {\n this.SaveError =\n this.companiesLoadError || 'Please select a company for this archetype.';\n this.cdr.markForCheck();\n return;\n }\n\n if (this.Beats.length === 0) {\n this.SaveError = 'Add at least one beat to the archetype.';\n this.cdr.markForCheck();\n return;\n }\n\n const rawDefaultDur = Number(this.DefaultDurationSeconds);\n const rawMinDur = Number(this.MinDurationSeconds);\n const rawMaxDur = Number(this.MaxDurationSeconds);\n if (\n !Number.isFinite(rawDefaultDur) ||\n !Number.isFinite(rawMinDur) ||\n !Number.isFinite(rawMaxDur) ||\n rawMinDur < 1 ||\n rawDefaultDur < 1 ||\n rawMaxDur < 1 ||\n rawMinDur > rawDefaultDur ||\n rawDefaultDur > rawMaxDur\n ) {\n this.SaveError =\n 'Shortest length, default length, and longest length must satisfy Shortest <= Default <= Longest.';\n this.cdr.markForCheck();\n return;\n }\n const defaultDur = Math.round(rawDefaultDur);\n const minDur = Math.round(rawMinDur);\n const maxDur = Math.round(rawMaxDur);\n\n const isEditing = this.IsEditingExistingCompanyArchetype;\n const duplicate = this.AvailableArchetypes.find((arch) => {\n if (!arch.CompanyID || !UUIDsEqual(arch.CompanyID, companyId)) {\n return false;\n }\n if (isEditing && this.EditingArchetypeId && UUIDsEqual(arch.ID, this.EditingArchetypeId)) {\n return false;\n }\n return (arch.Name ?? '').trim().toLowerCase() === trimmedName.toLowerCase();\n });\n if (duplicate) {\n this.SaveError = `An archetype named \"${trimmedName}\" already exists for this company.`;\n this.cdr.markForCheck();\n return;\n }\n\n this.IsSaving = true;\n this.SaveError = null;\n this.cdr.markForCheck();\n\n try {\n const entity = await this.ProviderToUse.GetEntityObject<MJVideoArchetypeEntity>(\n 'MJ: Video Archetypes',\n this.ProviderToUse.CurrentUser,\n );\n\n if (isEditing && this.EditingArchetypeId && typeof entity.Load === 'function') {\n const loaded = await entity.Load(this.EditingArchetypeId);\n if (!loaded) {\n this.SaveError = 'Unable to load the company archetype for editing.';\n return;\n }\n }\n\n const beatTemplates = this.BuildBeatTemplatePayload();\n const pacingPayload = this.BuildPacingPayload();\n const formatsList =\n this.SelectedFormats.length > 0 ? this.SelectedFormats : (['16:9'] as StudioVideoFormat[]);\n\n entity.Name = trimmedName;\n entity.Description = (this.Description ?? '').trim();\n entity.Category = this.Category;\n entity.CompanyID = companyId;\n entity.DefaultDurationSeconds = defaultDur;\n entity.MinDurationSeconds = minDur;\n entity.MaxDurationSeconds = maxDur;\n entity.DefaultFormats = formatsList.join(',');\n entity.DefaultInteractionMode = (this.DefaultInteractionMode ||\n 'Autonomous') as MJVideoArchetypeEntity['DefaultInteractionMode'];\n entity.Guidance = (this.Guidance ?? '').trim() || null;\n if (!isEditing) {\n entity.Status = 'Active';\n }\n\n entity.BeatTemplate = JSON.stringify(beatTemplates);\n try {\n entity.BeatTemplateObject = beatTemplates;\n } catch {\n // Test doubles that do not implement BaseEntity JSON accessors still keep BeatTemplate.\n }\n\n entity.Pacing = JSON.stringify(pacingPayload);\n try {\n entity.PacingObject = pacingPayload;\n } catch {\n // Test doubles that do not implement BaseEntity JSON accessors still keep Pacing.\n }\n\n const saved = await entity.Save();\n if (!saved) {\n this.SaveError =\n entity.LatestResult?.CompleteMessage || 'Failed to save archetype.';\n return;\n }\n\n try {\n const engine = VideoStudioEngine.GetProviderInstance<VideoStudioEngine>(\n this.ProviderToUse,\n VideoStudioEngine,\n ) as VideoStudioEngine;\n await engine.Config(true, this.ProviderToUse?.CurrentUser, this.ProviderToUse);\n } catch {\n // Non-fatal in isolated component tests.\n }\n\n this.Saved.emit(entity.ID);\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n LogError(msg);\n this.SaveError = msg;\n } finally {\n this.IsSaving = false;\n this.cdr.markForCheck();\n }\n }\n\n private resolveBeatKeys(): string[] {\n const usedKeys = new Set<string>();\n for (const beat of this.Beats) {\n const existing = (beat.Key ?? '').trim();\n if (existing) {\n usedKeys.add(existing);\n }\n }\n return this.Beats.map((beat, idx) => {\n const existing = (beat.Key ?? '').trim();\n if (existing) {\n return existing;\n }\n const label = (beat.Label ?? '').trim() || `Beat ${idx + 1}`;\n return DeriveBeatKeyFromLabel(label, idx + 1, usedKeys);\n });\n }\n\n private async initializeEditor(): Promise<void> {\n if (Array.isArray(this.Archetypes) && this.Archetypes.length > 0) {\n this.AvailableArchetypes = [...this.Archetypes];\n } else {\n await this.loadEngineArchetypes();\n }\n\n if (Array.isArray(this.Companies) && this.Companies.length > 0) {\n this.AvailableCompanies = [...this.Companies];\n } else {\n await this.loadAvailableCompanies();\n }\n\n if (this.companiesLoadError) {\n this.SaveError = this.companiesLoadError;\n }\n\n this.StartFromOptions = this.AvailableArchetypes.map((arch) => {\n const isShipped =\n arch.IsShipped !== undefined ? arch.IsShipped : arch.CompanyID == null;\n const scopeSuffix = isShipped\n ? 'Shipped'\n : (arch.CompanyName ?? arch.Company ?? 'Company');\n return {\n ID: arch.ID,\n Label: `${arch.Name} (${scopeSuffix})`,\n };\n });\n\n const initialId =\n (this.Mode === 'edit' && this.EditingArchetypeId\n ? this.EditingArchetypeId\n : this.SourceArchetypeId) ?? '';\n\n const initialSource = initialId ? this.findArchetypeById(initialId) : null;\n if (initialSource) {\n this.SelectedSourceId = initialSource.ID;\n this.applySourceArchetype(initialSource, true);\n } else {\n this.SelectedSourceId = '';\n this.Name = '';\n this.Description = '';\n this.Category = 'Explainer';\n this.CompanyID = this.resolveInitialCompanyId(null);\n this.DefaultDurationSeconds = 30;\n this.MinDurationSeconds = 15;\n this.MaxDurationSeconds = 60;\n this.SelectedFormats = ['16:9'];\n this.DefaultInteractionMode = 'Autonomous';\n this.Guidance = '';\n this.sourcePacing = null;\n this.PacingAvgSeconds = 5;\n this.PacingHoldRules = '';\n this.Beats = [\n {\n TrackId: this.nextBeatTrackId++,\n Key: '',\n Label: '',\n Purpose: '',\n Seconds: 30,\n MinDurationSeconds: 15,\n MaxDurationSeconds: 60,\n Guidance: '',\n RequiresDataBinding: false,\n },\n ];\n }\n\n this.cdr.markForCheck();\n }\n\n private applySourceArchetype(\n source: ArchetypeEditorSourceItem,\n isInitialLoad: boolean,\n ): void {\n const isEditingTarget =\n isInitialLoad &&\n this.IsEditingExistingCompanyArchetype &&\n this.EditingArchetypeId !== null &&\n UUIDsEqual(source.ID, this.EditingArchetypeId);\n\n if (isEditingTarget) {\n this.Name = source.Name ?? '';\n this.lastAutoSuggestedName = '';\n } else {\n const copyName = `${source.Name} (Copy)`;\n if (isInitialLoad || !this.Name.trim() || this.Name === this.lastAutoSuggestedName) {\n this.Name = copyName;\n this.lastAutoSuggestedName = copyName;\n }\n }\n\n const rawCategory = (source.Category ?? 'Explainer').trim();\n this.Category = (ARCHETYPE_CATEGORIES as readonly string[]).includes(rawCategory)\n ? (rawCategory as ArchetypeCategory)\n : 'Explainer';\n\n this.Description = source.Description ?? '';\n if (isInitialLoad) {\n this.CompanyID = this.resolveInitialCompanyId(source.CompanyID ?? null);\n }\n\n const defaultDur =\n typeof source.DefaultDurationSeconds === 'number' &&\n Number.isFinite(source.DefaultDurationSeconds) &&\n source.DefaultDurationSeconds > 0\n ? Math.round(source.DefaultDurationSeconds)\n : 60;\n const minDur =\n typeof source.MinDurationSeconds === 'number' &&\n Number.isFinite(source.MinDurationSeconds) &&\n source.MinDurationSeconds > 0\n ? Math.round(source.MinDurationSeconds)\n : 30;\n const maxDur =\n typeof source.MaxDurationSeconds === 'number' &&\n Number.isFinite(source.MaxDurationSeconds) &&\n source.MaxDurationSeconds >= minDur\n ? Math.round(source.MaxDurationSeconds)\n : Math.max(defaultDur, 120);\n\n this.DefaultDurationSeconds = defaultDur;\n this.MinDurationSeconds = minDur;\n this.MaxDurationSeconds = maxDur;\n this.SelectedFormats = ParseArchetypeDefaultFormats(source.DefaultFormats);\n this.DefaultInteractionMode = source.DefaultInteractionMode ?? 'Autonomous';\n this.Guidance = source.Guidance ?? '';\n\n const rawBeats = this.extractSourceBeats(source);\n const scaledItems = BuildArchetypeBeatStripItems(rawBeats, defaultDur);\n const allHaveExplicitDefault =\n rawBeats.length > 0 &&\n rawBeats.every(\n (b) => typeof b.DefaultDurationSeconds === 'number' && b.DefaultDurationSeconds > 0,\n );\n const rawExplicitSum = allHaveExplicitDefault\n ? rawBeats.reduce((sum, b) => sum + (b.DefaultDurationSeconds ?? 0), 0)\n : defaultDur;\n const useScaledIntegerBeats =\n !allHaveExplicitDefault || Math.abs(rawExplicitSum - defaultDur) < 0.5;\n\n if (rawBeats.length > 0) {\n this.Beats = rawBeats.map((b, idx) => {\n const seconds = useScaledIntegerBeats\n ? (scaledItems[idx]?.Seconds ?? 5)\n : Math.max(1, Math.round(b.DefaultDurationSeconds ?? 5));\n return {\n TrackId: this.nextBeatTrackId++,\n Key: (b.Key ?? '').trim(),\n Label: (b.Label ?? b.Key ?? '').trim() || `Beat ${idx + 1}`,\n Purpose: (b.Purpose ?? '').trim(),\n Seconds: seconds,\n MinDurationSeconds:\n typeof b.MinDurationSeconds === 'number' &&\n Number.isFinite(b.MinDurationSeconds) &&\n b.MinDurationSeconds > 0\n ? b.MinDurationSeconds\n : Math.max(1, Math.floor(seconds * 0.6)),\n MaxDurationSeconds:\n typeof b.MaxDurationSeconds === 'number' &&\n Number.isFinite(b.MaxDurationSeconds) &&\n b.MaxDurationSeconds > 0\n ? b.MaxDurationSeconds\n : Math.max(seconds, Math.ceil(seconds * 1.5)),\n Guidance: (b.Guidance ?? '').trim(),\n RequiresDataBinding: Boolean(b.RequiresDataBinding),\n };\n });\n } else {\n this.Beats = [\n {\n TrackId: this.nextBeatTrackId++,\n Key: '',\n Label: 'Hook',\n Purpose: 'Open with the core takeaway.',\n Seconds: defaultDur,\n MinDurationSeconds: minDur,\n MaxDurationSeconds: maxDur,\n Guidance: '',\n RequiresDataBinding: false,\n },\n ];\n }\n\n const pacing = this.extractSourcePacing(source);\n this.sourcePacing = pacing ? { ...pacing } : null;\n this.PacingAvgSeconds =\n pacing &&\n typeof pacing.AvgSecondsBetweenChanges === 'number' &&\n Number.isFinite(pacing.AvgSecondsBetweenChanges) &&\n pacing.AvgSecondsBetweenChanges > 0\n ? pacing.AvgSecondsBetweenChanges\n : 5;\n this.PacingHoldRules = pacing?.HoldRules ?? '';\n }\n\n private extractSourceBeats(\n source: ArchetypeEditorSourceItem,\n ): ReadonlyArray<ArchetypeEditorSourceBeat> {\n if (Array.isArray(source.Beats) && source.Beats.length > 0) {\n return source.Beats;\n }\n if (Array.isArray(source.BeatTemplateObject) && source.BeatTemplateObject.length > 0) {\n return source.BeatTemplateObject;\n }\n const rawJson = source.BeatTemplateRaw ?? source.BeatTemplate ?? null;\n if (typeof rawJson === 'string' && rawJson.trim().startsWith('[')) {\n try {\n const parsed: unknown = JSON.parse(rawJson);\n if (Array.isArray(parsed)) {\n return parsed as ArchetypeEditorSourceBeat[];\n }\n } catch {\n return [];\n }\n }\n return [];\n }\n\n private extractSourcePacing(\n source: ArchetypeEditorSourceItem,\n ): ArchetypeEditorSourcePacing | null {\n let parsedFromRaw: ArchetypeEditorSourcePacing | null = null;\n const rawJson =\n source.PacingRaw ?? (typeof source.Pacing === 'string' ? source.Pacing : null);\n if (typeof rawJson === 'string' && rawJson.trim().startsWith('{')) {\n try {\n const parsed: unknown = JSON.parse(rawJson);\n if (parsed && typeof parsed === 'object') {\n parsedFromRaw = parsed as ArchetypeEditorSourcePacing;\n }\n } catch {\n parsedFromRaw = null;\n }\n }\n const fromPacingObj =\n source.PacingObject && typeof source.PacingObject === 'object'\n ? source.PacingObject\n : null;\n const fromPacingField =\n source.Pacing && typeof source.Pacing === 'object' ? source.Pacing : null;\n if (!parsedFromRaw && !fromPacingObj && !fromPacingField) {\n return null;\n }\n return {\n ...(parsedFromRaw ?? {}),\n ...(fromPacingField ?? {}),\n ...(fromPacingObj ?? {}),\n };\n }\n\n private resolveInitialCompanyId(sourceCompanyId: string | null): string {\n if (\n this.InitialCompanyId &&\n this.InitialCompanyId.trim().length > 0 &&\n this.InitialCompanyId !== 'all'\n ) {\n return this.InitialCompanyId.trim();\n }\n if (sourceCompanyId && sourceCompanyId.trim().length > 0) {\n return sourceCompanyId.trim();\n }\n return this.AvailableCompanies[0]?.ID ?? '';\n }\n\n private findArchetypeById(id: string | null | undefined): ArchetypeEditorSourceItem | null {\n const trimmed = (id ?? '').trim();\n if (!trimmed) {\n return null;\n }\n return (\n this.AvailableArchetypes.find((a) => UUIDsEqual(a.ID, trimmed)) ?? null\n );\n }\n\n private async loadEngineArchetypes(): Promise<void> {\n try {\n const engine = VideoStudioEngine.GetProviderInstance<VideoStudioEngine>(\n this.ProviderToUse,\n VideoStudioEngine,\n ) as VideoStudioEngine;\n await engine.Config(false, this.ProviderToUse?.CurrentUser, this.ProviderToUse);\n this.AvailableArchetypes = [...(engine.Archetypes ?? [])];\n } catch {\n this.AvailableArchetypes = [];\n }\n }\n\n private async loadAvailableCompanies(): Promise<void> {\n this.companiesLoadError = null;\n try {\n const rv = RunView.FromMetadataProvider(this.ProviderToUse);\n const res = await rv.RunView<{ ID: string; Name: string }>({\n EntityName: 'MJ: Companies',\n Fields: ['ID', 'Name'],\n OrderBy: 'Name ASC',\n ResultType: 'simple',\n });\n if (!res.Success) {\n const msg = res.ErrorMessage || 'Failed to load companies.';\n LogError(msg);\n this.companiesLoadError = `Couldn't load companies: ${msg}`;\n return;\n }\n if (Array.isArray(res.Results)) {\n this.AvailableCompanies = res.Results.map((r) => ({\n ID: r.ID,\n Name: r.Name,\n }));\n }\n } catch (err: unknown) {\n const msg = err instanceof Error ? err.message : String(err);\n LogError(msg);\n this.companiesLoadError = `Couldn't load companies: ${msg}`;\n }\n }\n}\n","<div class=\"vs-arch-editor\" data-testid=\"vs-archetype-editor\">\n <div class=\"vs-arch-editor__body\">\n @if (SaveError) {\n <div\n class=\"vs-arch-editor__error\"\n role=\"alert\"\n data-testid=\"vs-arch-editor-error\"\n >\n <i class=\"fa-solid fa-circle-exclamation\" aria-hidden=\"true\"></i>\n <span>{{ SaveError }}</span>\n </div>\n }\n\n <!-- Start from -->\n <div class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-start-from-label\">\n Start from\n </span>\n <span class=\"vs-arch-editor__hint\">\n Copies fields into this form without changing the original\n </span>\n </div>\n <mj-dropdown\n data-testid=\"vs-arch-editor-start-from\"\n AriaLabelledBy=\"vs-arch-editor-start-from-label\"\n Placeholder=\"Choose an archetype to copy from...\"\n [Data]=\"StartFromOptions\"\n TextField=\"Label\"\n ValueField=\"ID\"\n [ValuePrimitive]=\"true\"\n [ngModel]=\"SelectedSourceId\"\n (ngModelChange)=\"OnStartFromChange($event)\"\n ></mj-dropdown>\n </div>\n\n <!-- Name, Category, Company -->\n <div class=\"vs-arch-editor__row-3\">\n <label class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\">Name</span>\n <input\n type=\"text\"\n class=\"vs-arch-editor__input\"\n data-testid=\"vs-arch-editor-name\"\n placeholder=\"e.g. Quarterly Member Update\"\n [(ngModel)]=\"Name\"\n [disabled]=\"IsSaving\"\n />\n </label>\n\n <div class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-category-label\">\n Category\n </span>\n <mj-dropdown\n data-testid=\"vs-arch-editor-category\"\n AriaLabelledBy=\"vs-arch-editor-category-label\"\n [Data]=\"CategoryOptions\"\n TextField=\"Text\"\n ValueField=\"Value\"\n [ValuePrimitive]=\"true\"\n [(ngModel)]=\"Category\"\n ></mj-dropdown>\n </div>\n\n <div class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-company-label\">\n Company\n </span>\n <mj-dropdown\n data-testid=\"vs-arch-editor-company\"\n AriaLabelledBy=\"vs-arch-editor-company-label\"\n Placeholder=\"Select a company...\"\n [Data]=\"AvailableCompanies\"\n TextField=\"Name\"\n ValueField=\"ID\"\n [ValuePrimitive]=\"true\"\n [(ngModel)]=\"CompanyID\"\n ></mj-dropdown>\n </div>\n </div>\n\n <!-- Description -->\n <label class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\">Description</span>\n <span class=\"vs-arch-editor__hint\">\n One short paragraph — the Director reads it to choose and shape this archetype\n </span>\n </div>\n <textarea\n class=\"vs-arch-editor__textarea\"\n data-testid=\"vs-arch-editor-description\"\n rows=\"2\"\n placeholder=\"Describe what this archetype is for and the story arc it follows...\"\n [(ngModel)]=\"Description\"\n [disabled]=\"IsSaving\"\n ></textarea>\n </label>\n\n <!-- Length & Formats -->\n <div class=\"vs-arch-editor__length-formats\">\n <div class=\"vs-arch-editor__length-group\">\n <div class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-default-dur-label\">\n Default length (s)\n </span>\n <span\n class=\"vs-arch-editor__time-readout\"\n data-testid=\"vs-arch-editor-default-readout\"\n >\n {{ FormatTime(DefaultDurationSeconds) }}\n </span>\n </div>\n <mj-numeric-input\n data-testid=\"vs-arch-editor-default-duration\"\n AriaLabelledBy=\"vs-arch-editor-default-dur-label\"\n [Min]=\"1\"\n [Max]=\"600\"\n [Step]=\"1\"\n [Disabled]=\"IsSaving\"\n [ngModel]=\"DefaultDurationSeconds\"\n (ngModelChange)=\"OnDefaultDurationChange($event)\"\n ></mj-numeric-input>\n </div>\n\n <div class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-min-dur-label\">\n Shortest (s)\n </span>\n <span\n class=\"vs-arch-editor__time-readout\"\n data-testid=\"vs-arch-editor-min-readout\"\n >\n {{ FormatTime(MinDurationSeconds) }}\n </span>\n </div>\n <mj-numeric-input\n data-testid=\"vs-arch-editor-min-duration\"\n AriaLabelledBy=\"vs-arch-editor-min-dur-label\"\n [Min]=\"1\"\n [Max]=\"600\"\n [Step]=\"1\"\n [Disabled]=\"IsSaving\"\n [ngModel]=\"MinDurationSeconds\"\n (ngModelChange)=\"OnMinDurationChange($event)\"\n ></mj-numeric-input>\n </div>\n\n <div class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-max-dur-label\">\n Longest (s)\n </span>\n <span\n class=\"vs-arch-editor__time-readout\"\n data-testid=\"vs-arch-editor-max-readout\"\n >\n {{ FormatTime(MaxDurationSeconds) }}\n </span>\n </div>\n <mj-numeric-input\n data-testid=\"vs-arch-editor-max-duration\"\n AriaLabelledBy=\"vs-arch-editor-max-dur-label\"\n [Min]=\"1\"\n [Max]=\"600\"\n [Step]=\"1\"\n [Disabled]=\"IsSaving\"\n [ngModel]=\"MaxDurationSeconds\"\n (ngModelChange)=\"OnMaxDurationChange($event)\"\n ></mj-numeric-input>\n </div>\n </div>\n\n <div class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\">Formats</span>\n <div\n class=\"vs-arch-editor__format-toggles\"\n role=\"group\"\n aria-label=\"Default video formats\"\n >\n @for (format of AvailableFormats; track format) {\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n [Toggleable]=\"true\"\n [Selected]=\"IsFormatSelected(format)\"\n [attr.data-testid]=\"'vs-arch-editor-format-' + format\"\n [disabled]=\"IsSaving\"\n (click)=\"ToggleFormat(format)\"\n >\n <mj-video-format-glyph [Format]=\"format\" Size=\"sm\"></mj-video-format-glyph>\n </button>\n }\n </div>\n </div>\n </div>\n\n <!-- Beats -->\n <section class=\"vs-arch-editor__beats-section\" data-testid=\"vs-arch-editor-beats-section\">\n <div class=\"vs-arch-editor__beats-header\">\n <span class=\"vs-arch-editor__label\">\n Beats ({{ Beats.length }})\n </span>\n <span class=\"vs-arch-editor__time-readout\" data-testid=\"vs-arch-editor-beats-sum\">\n {{ FormatTime(BeatsTotalSeconds) }} total\n </span>\n </div>\n\n <mj-video-beat-strip\n data-testid=\"vs-arch-editor-beat-strip\"\n [Beats]=\"LiveBeatStripItems\"\n ></mj-video-beat-strip>\n\n @if (HasBeatsDurationMismatch) {\n <div\n class=\"vs-arch-editor__mismatch\"\n data-testid=\"vs-arch-editor-beats-mismatch\"\n >\n <span class=\"vs-arch-editor__mismatch-text\">\n Beats add up to {{ FormatTime(BeatsTotalSeconds) }} of {{ FormatTime(DefaultDurationSeconds) }}\n </span>\n <button\n type=\"button\"\n mjButton\n Variant=\"flat\"\n Size=\"sm\"\n data-testid=\"vs-arch-editor-fit-to-length\"\n [disabled]=\"IsSaving\"\n (click)=\"FitBeatsToLength()\"\n >\n <span>Fit to length</span>\n </button>\n </div>\n }\n\n <div class=\"vs-arch-editor__beat-rows\">\n @for (beat of Beats; track beat.TrackId; let idx = $index) {\n <div\n class=\"vs-arch-editor__beat-row\"\n [attr.data-testid]=\"'vs-arch-editor-beat-row-' + idx\"\n >\n <span class=\"vs-arch-editor__beat-index\" aria-hidden=\"true\">\n {{ idx + 1 }}\n </span>\n\n <input\n type=\"text\"\n class=\"vs-arch-editor__input vs-arch-editor__beat-label-input\"\n [attr.data-testid]=\"'vs-arch-editor-beat-label-' + idx\"\n [attr.aria-label]=\"'Beat ' + (idx + 1) + ' label'\"\n placeholder=\"Beat label\"\n [ngModel]=\"beat.Label\"\n (ngModelChange)=\"OnBeatLabelChange(idx, $event)\"\n [disabled]=\"IsSaving\"\n />\n\n <input\n type=\"text\"\n class=\"vs-arch-editor__input vs-arch-editor__beat-purpose-input\"\n [attr.data-testid]=\"'vs-arch-editor-beat-purpose-' + idx\"\n [attr.aria-label]=\"'Beat ' + (idx + 1) + ' purpose'\"\n placeholder=\"What this beat accomplishes\"\n [ngModel]=\"beat.Purpose\"\n (ngModelChange)=\"OnBeatPurposeChange(idx, $event)\"\n [disabled]=\"IsSaving\"\n />\n\n <div class=\"vs-arch-editor__beat-seconds-wrap\">\n <mj-numeric-input\n [attr.data-testid]=\"'vs-arch-editor-beat-seconds-' + idx\"\n [AriaLabel]=\"'Beat ' + (idx + 1) + ' seconds'\"\n [Min]=\"1\"\n [Max]=\"600\"\n [Step]=\"1\"\n [Disabled]=\"IsSaving\"\n [ngModel]=\"beat.Seconds\"\n (ngModelChange)=\"OnBeatSecondsChange(idx, $event)\"\n ></mj-numeric-input>\n <span class=\"vs-arch-editor__beat-time-readout\">\n {{ FormatTime(beat.Seconds) }}\n </span>\n </div>\n\n <div class=\"vs-arch-editor__beat-actions\">\n <button\n type=\"button\"\n mjButton\n Variant=\"icon\"\n Size=\"sm\"\n [AriaLabel]=\"'Move beat ' + (idx + 1) + ' up'\"\n [attr.data-testid]=\"'vs-arch-editor-beat-up-' + idx\"\n [disabled]=\"IsSaving || idx === 0\"\n (click)=\"MoveBeatUp(idx)\"\n >\n <i class=\"fa-solid fa-arrow-up\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n mjButton\n Variant=\"icon\"\n Size=\"sm\"\n [AriaLabel]=\"'Move beat ' + (idx + 1) + ' down'\"\n [attr.data-testid]=\"'vs-arch-editor-beat-down-' + idx\"\n [disabled]=\"IsSaving || idx === Beats.length - 1\"\n (click)=\"MoveBeatDown(idx)\"\n >\n <i class=\"fa-solid fa-arrow-down\" aria-hidden=\"true\"></i>\n </button>\n <button\n type=\"button\"\n mjButton\n Variant=\"icon\"\n Size=\"sm\"\n [AriaLabel]=\"'Remove beat ' + (idx + 1)\"\n [attr.data-testid]=\"'vs-arch-editor-beat-remove-' + idx\"\n [disabled]=\"IsSaving || Beats.length <= 1\"\n (click)=\"RemoveBeat(idx)\"\n >\n <i class=\"fa-solid fa-trash-can\" aria-hidden=\"true\"></i>\n </button>\n </div>\n </div>\n }\n </div>\n\n <div class=\"vs-arch-editor__beats-footer\">\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n data-testid=\"vs-arch-editor-add-beat\"\n [disabled]=\"IsSaving\"\n (click)=\"AddBeat()\"\n >\n <i class=\"fa-solid fa-plus\" aria-hidden=\"true\"></i>\n <span>Add beat</span>\n </button>\n </div>\n </section>\n\n <!-- Advanced (collapsed) -->\n <section class=\"vs-arch-editor__advanced\">\n <button\n type=\"button\"\n class=\"vs-arch-editor__advanced-toggle\"\n data-testid=\"vs-arch-editor-advanced-toggle\"\n [attr.aria-expanded]=\"IsAdvancedOpen\"\n (click)=\"ToggleAdvanced()\"\n >\n <i\n class=\"fa-solid\"\n [class.fa-chevron-right]=\"!IsAdvancedOpen\"\n [class.fa-chevron-down]=\"IsAdvancedOpen\"\n aria-hidden=\"true\"\n ></i>\n <span>Advanced (guidance, pacing, data binding)</span>\n </button>\n\n @if (IsAdvancedOpen) {\n <div\n class=\"vs-arch-editor__advanced-body\"\n data-testid=\"vs-arch-editor-advanced-body\"\n >\n <label class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\">Guidance (markdown)</span>\n <textarea\n class=\"vs-arch-editor__textarea\"\n data-testid=\"vs-arch-editor-guidance\"\n rows=\"3\"\n placeholder=\"Markdown guidance for the Director and Storyboard...\"\n [(ngModel)]=\"Guidance\"\n [disabled]=\"IsSaving\"\n ></textarea>\n </label>\n\n <div class=\"vs-arch-editor__pacing-grid\">\n <div class=\"vs-arch-editor__field\">\n <div class=\"vs-arch-editor__label-row\">\n <span class=\"vs-arch-editor__label\" id=\"vs-arch-editor-pacing-avg-label\">\n Average cut cadence (s)\n </span>\n <span class=\"vs-arch-editor__time-readout\">\n {{ FormatTime(PacingAvgSeconds) }}\n </span>\n </div>\n <mj-numeric-input\n data-testid=\"vs-arch-editor-pacing-avg\"\n AriaLabelledBy=\"vs-arch-editor-pacing-avg-label\"\n [Min]=\"0.5\"\n [Max]=\"60\"\n [Step]=\"0.5\"\n [Disabled]=\"IsSaving\"\n [(ngModel)]=\"PacingAvgSeconds\"\n ></mj-numeric-input>\n </div>\n\n <label class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\">Hold rules</span>\n <input\n type=\"text\"\n class=\"vs-arch-editor__input\"\n data-testid=\"vs-arch-editor-pacing-hold-rules\"\n placeholder=\"e.g. Hold key numbers and charts for at least 3 seconds\"\n [(ngModel)]=\"PacingHoldRules\"\n [disabled]=\"IsSaving\"\n />\n </label>\n </div>\n\n <div class=\"vs-arch-editor__field\">\n <span class=\"vs-arch-editor__label\">Beat data binding & guidance</span>\n <div class=\"vs-arch-editor__advanced-beats\">\n @for (beat of Beats; track beat.TrackId; let idx = $index) {\n <div class=\"vs-arch-editor__advanced-beat-row\">\n <span class=\"vs-arch-editor__advanced-beat-name\">\n {{ idx + 1 }}. {{ beat.Label || 'Beat ' + (idx + 1) }}\n </span>\n <div class=\"vs-arch-editor__advanced-beat-switch\">\n <mj-switch\n [attr.data-testid]=\"'vs-arch-editor-beat-databinding-' + idx\"\n [AriaLabel]=\"'Requires data binding for ' + (beat.Label || 'Beat ' + (idx + 1))\"\n [Disabled]=\"IsSaving\"\n [(ngModel)]=\"beat.RequiresDataBinding\"\n ></mj-switch>\n <span class=\"vs-arch-editor__hint\">Data bound</span>\n </div>\n <input\n type=\"text\"\n class=\"vs-arch-editor__input\"\n [attr.data-testid]=\"'vs-arch-editor-beat-guidance-' + idx\"\n [attr.aria-label]=\"'Guidance for ' + (beat.Label || 'Beat ' + (idx + 1))\"\n placeholder=\"Optional beat guidance...\"\n [(ngModel)]=\"beat.Guidance\"\n [disabled]=\"IsSaving\"\n />\n </div>\n }\n </div>\n </div>\n </div>\n }\n </section>\n </div>\n\n <footer class=\"vs-arch-editor__footer\">\n <button\n type=\"button\"\n mjButton\n Variant=\"primary\"\n Size=\"md\"\n data-testid=\"vs-arch-editor-save\"\n [disabled]=\"IsSaving\"\n (click)=\"Save()\"\n >\n <span>{{ IsSaving ? 'Saving...' : 'Save' }}</span>\n </button>\n <button\n type=\"button\"\n mjButton\n Variant=\"secondary\"\n Size=\"md\"\n data-testid=\"vs-arch-editor-cancel\"\n [disabled]=\"IsSaving\"\n (click)=\"Cancel()\"\n >\n <span>Cancel</span>\n </button>\n </footer>\n</div>\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { VideoCaptionMode } from '@memberjunction/video-studio-core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface VideoCaptionModeOption {
|
|
5
|
+
Mode: VideoCaptionMode;
|
|
6
|
+
Label: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Shared audio options control (`vs-audio-options`) for Video Studio.
|
|
10
|
+
* Renders a Voiceover `mj-switch` and, when Voiceover is enabled, a Captions
|
|
11
|
+
* toggle-button group built from the canonical `VideoCaptionMode` values.
|
|
12
|
+
*/
|
|
13
|
+
export declare class VSAudioOptionsComponent {
|
|
14
|
+
NarrationEnabled: boolean;
|
|
15
|
+
NarrationEnabledChange: EventEmitter<boolean>;
|
|
16
|
+
CaptionsMode: VideoCaptionMode;
|
|
17
|
+
CaptionsModeChange: EventEmitter<VideoCaptionMode>;
|
|
18
|
+
Disabled: boolean;
|
|
19
|
+
private captionButtons?;
|
|
20
|
+
private readonly cdr;
|
|
21
|
+
readonly CaptionOptions: readonly VideoCaptionModeOption[];
|
|
22
|
+
OnNarrationSwitchChange(enabled: boolean): void;
|
|
23
|
+
SelectCaptionsMode(mode: VideoCaptionMode): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VSAudioOptionsComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VSAudioOptionsComponent, "vs-audio-options, mj-vs-audio-options", never, { "NarrationEnabled": { "alias": "NarrationEnabled"; "required": false; }; "CaptionsMode": { "alias": "CaptionsMode"; "required": false; }; "Disabled": { "alias": "Disabled"; "required": false; }; }, { "NarrationEnabledChange": "NarrationEnabledChange"; "CaptionsModeChange": "CaptionsModeChange"; }, never, never, true, never>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=vs-audio-options.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vs-audio-options.component.d.ts","sourceRoot":"","sources":["../../../src/VideoStudio/components/vs-audio-options.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAMb,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAuB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;;AAE1F,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAUD;;;;GAIG;AACH,qBAQa,uBAAuB;IACzB,gBAAgB,UAAQ;IACvB,sBAAsB,wBAA+B;IAEtD,YAAY,EAAE,gBAAgB,CAAY;IACzC,kBAAkB,iCAAwC;IAE3D,QAAQ,UAAS;IAG1B,OAAO,CAAC,cAAc,CAAC,CAA+B;IAEtD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEjD,SAAgB,cAAc,EAAE,SAAS,sBAAsB,EAAE,CAK7D;IAEG,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAM/C,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI;yCA3B5C,uBAAuB;2CAAvB,uBAAuB;CA2CnC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChildren, inject, } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { MJButtonDirective, MJSwitchComponent } from '@memberjunction/ng-ui-components';
|
|
5
|
+
import { VIDEO_CAPTION_MODES } from '@memberjunction/video-studio-core';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "@angular/forms";
|
|
8
|
+
const _forTrack0 = ($index, $item) => $item.Mode;
|
|
9
|
+
function VSAudioOptionsComponent_Conditional_5_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
11
|
+
i0.ɵɵelementStart(0, "button", 8);
|
|
12
|
+
i0.ɵɵlistener("click", function VSAudioOptionsComponent_Conditional_5_For_5_Template_button_click_0_listener() { const option_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.SelectCaptionsMode(option_r2.Mode)); });
|
|
13
|
+
i0.ɵɵtext(1);
|
|
14
|
+
i0.ɵɵelementEnd();
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const option_r2 = ctx.$implicit;
|
|
17
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
18
|
+
i0.ɵɵproperty("Toggleable", true)("Selected", ctx_r2.CaptionsMode === option_r2.Mode)("disabled", ctx_r2.Disabled);
|
|
19
|
+
i0.ɵɵattribute("data-testid", "vs-audio-caption-" + option_r2.Mode.toLowerCase());
|
|
20
|
+
i0.ɵɵadvance();
|
|
21
|
+
i0.ɵɵtextInterpolate1(" ", option_r2.Label, " ");
|
|
22
|
+
} }
|
|
23
|
+
function VSAudioOptionsComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "span", 5);
|
|
25
|
+
i0.ɵɵtext(2, " Captions ");
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
i0.ɵɵelementStart(3, "div", 6);
|
|
28
|
+
i0.ɵɵrepeaterCreate(4, VSAudioOptionsComponent_Conditional_5_For_5_Template, 2, 5, "button", 7, _forTrack0);
|
|
29
|
+
i0.ɵɵelementEnd()();
|
|
30
|
+
} if (rf & 2) {
|
|
31
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵadvance(4);
|
|
33
|
+
i0.ɵɵrepeater(ctx_r2.CaptionOptions);
|
|
34
|
+
} }
|
|
35
|
+
const CAPTION_MODE_LABELS = {
|
|
36
|
+
Burned: 'In the video',
|
|
37
|
+
Sidecar: 'Separate file',
|
|
38
|
+
None: 'Off',
|
|
39
|
+
};
|
|
40
|
+
const CAPTION_MODE_ORDER = ['Burned', 'Sidecar', 'None'];
|
|
41
|
+
/**
|
|
42
|
+
* Shared audio options control (`vs-audio-options`) for Video Studio.
|
|
43
|
+
* Renders a Voiceover `mj-switch` and, when Voiceover is enabled, a Captions
|
|
44
|
+
* toggle-button group built from the canonical `VideoCaptionMode` values.
|
|
45
|
+
*/
|
|
46
|
+
export class VSAudioOptionsComponent {
|
|
47
|
+
NarrationEnabled = true;
|
|
48
|
+
NarrationEnabledChange = new EventEmitter();
|
|
49
|
+
CaptionsMode = 'Burned';
|
|
50
|
+
CaptionsModeChange = new EventEmitter();
|
|
51
|
+
Disabled = false;
|
|
52
|
+
captionButtons;
|
|
53
|
+
cdr = inject(ChangeDetectorRef);
|
|
54
|
+
CaptionOptions = CAPTION_MODE_ORDER.filter((mode) => VIDEO_CAPTION_MODES.includes(mode)).map((mode) => ({
|
|
55
|
+
Mode: mode,
|
|
56
|
+
Label: CAPTION_MODE_LABELS[mode],
|
|
57
|
+
}));
|
|
58
|
+
OnNarrationSwitchChange(enabled) {
|
|
59
|
+
this.NarrationEnabled = Boolean(enabled);
|
|
60
|
+
this.NarrationEnabledChange.emit(this.NarrationEnabled);
|
|
61
|
+
this.cdr.markForCheck();
|
|
62
|
+
}
|
|
63
|
+
SelectCaptionsMode(mode) {
|
|
64
|
+
if (this.Disabled) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
this.CaptionsMode = mode;
|
|
68
|
+
this.CaptionsModeChange.emit(mode);
|
|
69
|
+
// Keep MJButtonDirective.Selected in sync even if the user clicked the already-active option
|
|
70
|
+
const buttons = this.captionButtons?.toArray() ?? [];
|
|
71
|
+
this.CaptionOptions.forEach((opt, idx) => {
|
|
72
|
+
const btn = buttons[idx];
|
|
73
|
+
if (btn) {
|
|
74
|
+
btn.Selected = opt.Mode === mode;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
this.cdr.markForCheck();
|
|
78
|
+
}
|
|
79
|
+
static ɵfac = function VSAudioOptionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || VSAudioOptionsComponent)(); };
|
|
80
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VSAudioOptionsComponent, selectors: [["vs-audio-options"], ["mj-vs-audio-options"]], viewQuery: function VSAudioOptionsComponent_Query(rf, ctx) { if (rf & 1) {
|
|
81
|
+
i0.ɵɵviewQuery(MJButtonDirective, 5);
|
|
82
|
+
} if (rf & 2) {
|
|
83
|
+
let _t;
|
|
84
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.captionButtons = _t);
|
|
85
|
+
} }, inputs: { NarrationEnabled: "NarrationEnabled", CaptionsMode: "CaptionsMode", Disabled: "Disabled" }, outputs: { NarrationEnabledChange: "NarrationEnabledChange", CaptionsModeChange: "CaptionsModeChange" }, decls: 6, vars: 3, consts: [["data-testid", "vs-audio-options", 1, "vs-audio-options"], [1, "vs-audio-options__row"], ["for", "vs-audio-voiceover-switch", 1, "vs-audio-options__label"], ["InputId", "vs-audio-voiceover-switch", "AriaLabel", "Voiceover", "data-testid", "vs-audio-voiceover-switch", 3, "ngModelChange", "Disabled", "ngModel"], ["data-testid", "vs-audio-captions-group", 1, "vs-audio-options__captions"], ["id", "vs-audio-captions-label", 1, "vs-audio-options__sublabel"], ["role", "group", "aria-labelledby", "vs-audio-captions-label", 1, "vs-audio-options__buttons"], ["type", "button", "mjButton", "", "Variant", "outline", "Size", "sm", 3, "Toggleable", "Selected", "disabled"], ["type", "button", "mjButton", "", "Variant", "outline", "Size", "sm", 3, "click", "Toggleable", "Selected", "disabled"]], template: function VSAudioOptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
86
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "label", 2);
|
|
87
|
+
i0.ɵɵtext(3, " Voiceover ");
|
|
88
|
+
i0.ɵɵelementEnd();
|
|
89
|
+
i0.ɵɵelementStart(4, "mj-switch", 3);
|
|
90
|
+
i0.ɵɵlistener("ngModelChange", function VSAudioOptionsComponent_Template_mj_switch_ngModelChange_4_listener($event) { return ctx.OnNarrationSwitchChange($event); });
|
|
91
|
+
i0.ɵɵelementEnd()();
|
|
92
|
+
i0.ɵɵconditionalCreate(5, VSAudioOptionsComponent_Conditional_5_Template, 6, 0, "div", 4);
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
} if (rf & 2) {
|
|
95
|
+
i0.ɵɵadvance(4);
|
|
96
|
+
i0.ɵɵproperty("Disabled", ctx.Disabled)("ngModel", ctx.NarrationEnabled);
|
|
97
|
+
i0.ɵɵadvance();
|
|
98
|
+
i0.ɵɵconditional(ctx.NarrationEnabled ? 5 : -1);
|
|
99
|
+
} }, dependencies: [CommonModule, FormsModule, i1.NgControlStatus, i1.NgModel, MJButtonDirective, MJSwitchComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n width: 100%;\n}\n\n.vs-audio-options[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-audio-options__row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-3);\n}\n\n.vs-audio-options__label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-primary);\n cursor: pointer;\n}\n\n.vs-audio-options__captions[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-audio-options__sublabel[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n}\n\n.vs-audio-options__buttons[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-1-5);\n}"], changeDetection: 0 });
|
|
100
|
+
}
|
|
101
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VSAudioOptionsComponent, [{
|
|
102
|
+
type: Component,
|
|
103
|
+
args: [{ standalone: true, selector: 'vs-audio-options, mj-vs-audio-options', imports: [CommonModule, FormsModule, MJButtonDirective, MJSwitchComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"vs-audio-options\" data-testid=\"vs-audio-options\">\n <div class=\"vs-audio-options__row\">\n <label class=\"vs-audio-options__label\" for=\"vs-audio-voiceover-switch\">\n Voiceover\n </label>\n <mj-switch\n InputId=\"vs-audio-voiceover-switch\"\n AriaLabel=\"Voiceover\"\n data-testid=\"vs-audio-voiceover-switch\"\n [Disabled]=\"Disabled\"\n [ngModel]=\"NarrationEnabled\"\n (ngModelChange)=\"OnNarrationSwitchChange($event)\"\n ></mj-switch>\n </div>\n\n @if (NarrationEnabled) {\n <div class=\"vs-audio-options__captions\" data-testid=\"vs-audio-captions-group\">\n <span class=\"vs-audio-options__sublabel\" id=\"vs-audio-captions-label\">\n Captions\n </span>\n <div\n class=\"vs-audio-options__buttons\"\n role=\"group\"\n aria-labelledby=\"vs-audio-captions-label\"\n >\n @for (option of CaptionOptions; track option.Mode) {\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n [Toggleable]=\"true\"\n [Selected]=\"CaptionsMode === option.Mode\"\n [disabled]=\"Disabled\"\n [attr.data-testid]=\"'vs-audio-caption-' + option.Mode.toLowerCase()\"\n (click)=\"SelectCaptionsMode(option.Mode)\"\n >\n {{ option.Label }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n", styles: [":host {\n display: block;\n width: 100%;\n}\n\n.vs-audio-options {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1-5);\n}\n\n.vs-audio-options__row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-3);\n}\n\n.vs-audio-options__label {\n font-size: var(--mj-text-sm);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-primary);\n cursor: pointer;\n}\n\n.vs-audio-options__captions {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-2);\n}\n\n.vs-audio-options__sublabel {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-medium);\n color: var(--mj-text-secondary);\n}\n\n.vs-audio-options__buttons {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-1-5);\n}\n"] }]
|
|
104
|
+
}], null, { NarrationEnabled: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], NarrationEnabledChange: [{
|
|
107
|
+
type: Output
|
|
108
|
+
}], CaptionsMode: [{
|
|
109
|
+
type: Input
|
|
110
|
+
}], CaptionsModeChange: [{
|
|
111
|
+
type: Output
|
|
112
|
+
}], Disabled: [{
|
|
113
|
+
type: Input
|
|
114
|
+
}], captionButtons: [{
|
|
115
|
+
type: ViewChildren,
|
|
116
|
+
args: [MJButtonDirective]
|
|
117
|
+
}] }); })();
|
|
118
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VSAudioOptionsComponent, { className: "VSAudioOptionsComponent", filePath: "src/VideoStudio/components/vs-audio-options.component.ts", lineNumber: 43 }); })();
|
|
119
|
+
//# sourceMappingURL=vs-audio-options.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vs-audio-options.component.js","sourceRoot":"","sources":["../../../src/VideoStudio/components/vs-audio-options.component.ts","../../../src/VideoStudio/components/vs-audio-options.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,KAAK,EACL,MAAM,EAEN,YAAY,EACZ,MAAM,GACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAoB,MAAM,mCAAmC,CAAC;;;;;;ICYhF,iCAUC;IADC,8NAAS,yCAA+B,KAAC;IAEzC,YACF;IAAA,iBAAS;;;;IALP,AADA,AADA,iCAAmB,oDACsB,6BACpB;;IAIrB,cACF;IADE,gDACF;;;IArBJ,AADF,8BAA8E,cACN;IACpE,0BACF;IAAA,iBAAO;IACP,8BAIC;IACC,2GAcC;IAEL,AADE,iBAAM,EACF;;;IAhBF,eAcC;IAdD,oCAcC;;ADlBT,MAAM,mBAAmB,GAAqC;IAC5D,MAAM,EAAE,cAAc;IACtB,OAAO,EAAE,eAAe;IAC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AC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,GAAG,EAAE,CAAC;gBACR,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;YACnC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;IAC1B,CAAC;iHA1CU,uBAAuB;6DAAvB,uBAAuB;2BASpB,iBAAiB;;;;;YCjD7B,AADF,AADF,8BAA6D,aACxB,eACsC;YACrE,2BACF;YAAA,iBAAQ;YACR,oCAOC;YADC,6HAAiB,mCAA+B,IAAC;YAErD,AADG,iBAAY,EACT;YAEN,yFAAwB;YA4B1B,iBAAM;;YAlCA,eAAqB;YACrB,AADA,uCAAqB,iCACO;YAKhC,cA2BC;YA3BD,+CA2BC;4BDLS,YAAY,EAAE,WAAW,kCAAE,iBAAiB,EAAE,iBAAiB;;iFAK9D,uBAAuB;cARnC,SAAS;6BACI,IAAI,YACN,uCAAuC,WACxC,CAAC,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,mBAGzD,uBAAuB,CAAC,MAAM;;kBAG9C,KAAK;;kBACL,MAAM;;kBAEN,KAAK;;kBACL,MAAM;;kBAEN,KAAK;;kBAEL,YAAY;mBAAC,iBAAiB;;kFATpB,uBAAuB","sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n Output,\n QueryList,\n ViewChildren,\n inject,\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MJButtonDirective, MJSwitchComponent } from '@memberjunction/ng-ui-components';\nimport { VIDEO_CAPTION_MODES, VideoCaptionMode } from '@memberjunction/video-studio-core';\n\nexport interface VideoCaptionModeOption {\n Mode: VideoCaptionMode;\n Label: string;\n}\n\nconst CAPTION_MODE_LABELS: Record<VideoCaptionMode, string> = {\n Burned: 'In the video',\n Sidecar: 'Separate file',\n None: 'Off',\n};\n\nconst CAPTION_MODE_ORDER: readonly VideoCaptionMode[] = ['Burned', 'Sidecar', 'None'];\n\n/**\n * Shared audio options control (`vs-audio-options`) for Video Studio.\n * Renders a Voiceover `mj-switch` and, when Voiceover is enabled, a Captions\n * toggle-button group built from the canonical `VideoCaptionMode` values.\n */\n@Component({\n standalone: true,\n selector: 'vs-audio-options, mj-vs-audio-options',\n imports: [CommonModule, FormsModule, MJButtonDirective, MJSwitchComponent],\n templateUrl: './vs-audio-options.component.html',\n styleUrls: ['./vs-audio-options.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VSAudioOptionsComponent {\n @Input() NarrationEnabled = true;\n @Output() NarrationEnabledChange = new EventEmitter<boolean>();\n\n @Input() CaptionsMode: VideoCaptionMode = 'Burned';\n @Output() CaptionsModeChange = new EventEmitter<VideoCaptionMode>();\n\n @Input() Disabled = false;\n\n @ViewChildren(MJButtonDirective)\n private captionButtons?: QueryList<MJButtonDirective>;\n\n private readonly cdr = inject(ChangeDetectorRef);\n\n public readonly CaptionOptions: readonly VideoCaptionModeOption[] = CAPTION_MODE_ORDER.filter(\n (mode): mode is VideoCaptionMode => (VIDEO_CAPTION_MODES as readonly string[]).includes(mode),\n ).map((mode) => ({\n Mode: mode,\n Label: CAPTION_MODE_LABELS[mode],\n }));\n\n public OnNarrationSwitchChange(enabled: boolean): void {\n this.NarrationEnabled = Boolean(enabled);\n this.NarrationEnabledChange.emit(this.NarrationEnabled);\n this.cdr.markForCheck();\n }\n\n public SelectCaptionsMode(mode: VideoCaptionMode): void {\n if (this.Disabled) {\n return;\n }\n this.CaptionsMode = mode;\n this.CaptionsModeChange.emit(mode);\n // Keep MJButtonDirective.Selected in sync even if the user clicked the already-active option\n const buttons = this.captionButtons?.toArray() ?? [];\n this.CaptionOptions.forEach((opt, idx) => {\n const btn = buttons[idx];\n if (btn) {\n btn.Selected = opt.Mode === mode;\n }\n });\n this.cdr.markForCheck();\n }\n}\n","<div class=\"vs-audio-options\" data-testid=\"vs-audio-options\">\n <div class=\"vs-audio-options__row\">\n <label class=\"vs-audio-options__label\" for=\"vs-audio-voiceover-switch\">\n Voiceover\n </label>\n <mj-switch\n InputId=\"vs-audio-voiceover-switch\"\n AriaLabel=\"Voiceover\"\n data-testid=\"vs-audio-voiceover-switch\"\n [Disabled]=\"Disabled\"\n [ngModel]=\"NarrationEnabled\"\n (ngModelChange)=\"OnNarrationSwitchChange($event)\"\n ></mj-switch>\n </div>\n\n @if (NarrationEnabled) {\n <div class=\"vs-audio-options__captions\" data-testid=\"vs-audio-captions-group\">\n <span class=\"vs-audio-options__sublabel\" id=\"vs-audio-captions-label\">\n Captions\n </span>\n <div\n class=\"vs-audio-options__buttons\"\n role=\"group\"\n aria-labelledby=\"vs-audio-captions-label\"\n >\n @for (option of CaptionOptions; track option.Mode) {\n <button\n type=\"button\"\n mjButton\n Variant=\"outline\"\n Size=\"sm\"\n [Toggleable]=\"true\"\n [Selected]=\"CaptionsMode === option.Mode\"\n [disabled]=\"Disabled\"\n [attr.data-testid]=\"'vs-audio-caption-' + option.Mode.toLowerCase()\"\n (click)=\"SelectCaptionsMode(option.Mode)\"\n >\n {{ option.Label }}\n </button>\n }\n </div>\n </div>\n }\n</div>\n"]}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { UserInfo } from '@memberjunction/core';
|
|
3
|
+
import { MJConversationEntity, VideoStudioSetupHealthOutput } from '@memberjunction/core-entities';
|
|
4
|
+
import { NavigationRequest } from '@memberjunction/ng-artifacts';
|
|
5
|
+
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
|
|
6
|
+
import { PendingAttachment } from '@memberjunction/ng-composer';
|
|
7
|
+
import { VideoCaptionMode } from '@memberjunction/video-studio-core';
|
|
8
|
+
import { ArchetypeCardSnapshot, BrandKitCardSnapshot, StudioSavedQueryItem } from '../video-studio-agent-context';
|
|
9
|
+
import { VSProductionBriefComponent, VSProductionBriefSetupHealthEvent, VSProductionBriefStartEvent, VSProductionBriefStateSnapshot } from './vs-production-brief.component';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/** Canonical AI agent name for the Video Studio orchestrator. */
|
|
12
|
+
export declare const VIDEO_STUDIO_AGENT_NAME = "Video Studio";
|
|
13
|
+
/** User-facing message rendered when the Video Studio agent is missing or inaccessible. */
|
|
14
|
+
export declare const VIDEO_STUDIO_AGENT_MISSING_MESSAGE = "Video Studio isn't installed or you can't run it";
|
|
15
|
+
export interface VSCopilotConversationCreatedEvent {
|
|
16
|
+
conversation: MJConversationEntity;
|
|
17
|
+
pendingMessage?: string;
|
|
18
|
+
pendingAttachments?: PendingAttachment[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Shared Video Studio slide-in panel wrapping `<mj-conversation-chat-area>` pinned
|
|
22
|
+
* to the `'Video Studio'` orchestrator agent, with `<vs-production-brief>` projected
|
|
23
|
+
* into `mjChatSlot="composerExtra"` before the first message and header controls
|
|
24
|
+
* projected into `mjChatSlot="headerActions"`.
|
|
25
|
+
*/
|
|
26
|
+
export declare class VSCopilotPanelComponent extends BaseAngularComponent implements OnInit, OnChanges {
|
|
27
|
+
private _conversationId;
|
|
28
|
+
CurrentUser: UserInfo | null;
|
|
29
|
+
EnvironmentId: string;
|
|
30
|
+
ApplicationId: string;
|
|
31
|
+
set ConversationId(value: string | null);
|
|
32
|
+
get ConversationId(): string | null;
|
|
33
|
+
PendingMessage: string | null;
|
|
34
|
+
PendingArtifactId: string | null;
|
|
35
|
+
PendingArtifactVersionNumber: number | null;
|
|
36
|
+
AppContext: Record<string, unknown> | null;
|
|
37
|
+
HeaderTitle: string;
|
|
38
|
+
ShowCloseButton: boolean;
|
|
39
|
+
SetupHealthResult: VideoStudioSetupHealthOutput | null;
|
|
40
|
+
BriefSelectedArchetype: ArchetypeCardSnapshot | null;
|
|
41
|
+
BriefSelectedBrandKit: BrandKitCardSnapshot | null;
|
|
42
|
+
BriefSelectedBrandKitExplicitNone: boolean;
|
|
43
|
+
BriefSelectedFormats: string[];
|
|
44
|
+
BriefDurationSeconds: number;
|
|
45
|
+
BriefTopic: string;
|
|
46
|
+
BriefSelectedQueries: StudioSavedQueryItem[];
|
|
47
|
+
BriefNarrationEnabled: boolean;
|
|
48
|
+
BriefCaptionsMode: VideoCaptionMode;
|
|
49
|
+
ConversationCreated: EventEmitter<VSCopilotConversationCreatedEvent>;
|
|
50
|
+
PendingMessageConsumed: EventEmitter<void>;
|
|
51
|
+
PendingArtifactConsumed: EventEmitter<void>;
|
|
52
|
+
NavigationRequest: EventEmitter<NavigationRequest>;
|
|
53
|
+
CloseRequested: EventEmitter<void>;
|
|
54
|
+
BriefStateChange: EventEmitter<VSProductionBriefStateSnapshot>;
|
|
55
|
+
BriefStartRequested: EventEmitter<VSProductionBriefStartEvent>;
|
|
56
|
+
private chatArea?;
|
|
57
|
+
BriefComponent?: VSProductionBriefComponent;
|
|
58
|
+
VideoStudioAgentId: string | null;
|
|
59
|
+
IsResolvingAgent: boolean;
|
|
60
|
+
AgentMissing: boolean;
|
|
61
|
+
ActiveConversation: MJConversationEntity | null;
|
|
62
|
+
ChatIsNewConversation: boolean;
|
|
63
|
+
ComposerDraft: string | null;
|
|
64
|
+
IsBriefCollapsed: boolean;
|
|
65
|
+
BriefSummaryLine: string;
|
|
66
|
+
IsCheckingSetupHealth: boolean;
|
|
67
|
+
ShowHealthySetupDetails: boolean;
|
|
68
|
+
private readonly cdr;
|
|
69
|
+
ngOnInit(): Promise<void>;
|
|
70
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
71
|
+
get IsImageViewerOpen(): boolean;
|
|
72
|
+
get IsCreatingConversation(): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Opens an artifact directly on the active `<mj-conversation-chat-area>` when
|
|
75
|
+
* `Iterate` is clicked for a production whose conversation is already loaded.
|
|
76
|
+
*/
|
|
77
|
+
OpenIterateArtifact(artifactId: string, versionNumber?: number | null): boolean;
|
|
78
|
+
get IsBriefVisible(): boolean;
|
|
79
|
+
ToggleBriefCollapsed(): void;
|
|
80
|
+
get IsSetupAllOk(): boolean;
|
|
81
|
+
get ShouldShowCollapsedSetupHealth(): boolean;
|
|
82
|
+
CheckSetupHealth(): Promise<void>;
|
|
83
|
+
OnBriefSetupHealthChange(event: VSProductionBriefSetupHealthEvent): void;
|
|
84
|
+
OnBriefShowHealthySetupDetailsChange(expanded: boolean): void;
|
|
85
|
+
ToggleHealthySetupDetails(): void;
|
|
86
|
+
OnBriefStateChange(snapshot: VSProductionBriefStateSnapshot): void;
|
|
87
|
+
OnBriefStartRequested(event: VSProductionBriefStartEvent): void;
|
|
88
|
+
OnComposerDraftConsumed(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Resolves the `'Video Studio'` agent ID via `AIEngineBase.GetProviderInstance`.
|
|
91
|
+
* Logs an error and enters the inline missing-agent state if the agent cannot be found.
|
|
92
|
+
*/
|
|
93
|
+
ResolveVideoStudioAgent(): Promise<void>;
|
|
94
|
+
get EffectiveCurrentUser(): UserInfo | null;
|
|
95
|
+
get MissingAgentMessage(): string;
|
|
96
|
+
OnChatConversationCreated(event: VSCopilotConversationCreatedEvent): void;
|
|
97
|
+
OnPendingMessageConsumed(): void;
|
|
98
|
+
OnPendingArtifactConsumed(): void;
|
|
99
|
+
OnNavigationRequest(event: NavigationRequest): void;
|
|
100
|
+
OnCloseClick(): void;
|
|
101
|
+
private syncConversationMode;
|
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VSCopilotPanelComponent, never>;
|
|
103
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<VSCopilotPanelComponent, "vs-copilot-panel, mj-vs-copilot-panel", never, { "CurrentUser": { "alias": "CurrentUser"; "required": false; }; "EnvironmentId": { "alias": "EnvironmentId"; "required": false; }; "ApplicationId": { "alias": "ApplicationId"; "required": false; }; "ConversationId": { "alias": "ConversationId"; "required": false; }; "PendingMessage": { "alias": "PendingMessage"; "required": false; }; "PendingArtifactId": { "alias": "PendingArtifactId"; "required": false; }; "PendingArtifactVersionNumber": { "alias": "PendingArtifactVersionNumber"; "required": false; }; "AppContext": { "alias": "AppContext"; "required": false; }; "HeaderTitle": { "alias": "HeaderTitle"; "required": false; }; "ShowCloseButton": { "alias": "ShowCloseButton"; "required": false; }; "SetupHealthResult": { "alias": "SetupHealthResult"; "required": false; }; "BriefSelectedArchetype": { "alias": "BriefSelectedArchetype"; "required": false; }; "BriefSelectedBrandKit": { "alias": "BriefSelectedBrandKit"; "required": false; }; "BriefSelectedBrandKitExplicitNone": { "alias": "BriefSelectedBrandKitExplicitNone"; "required": false; }; "BriefSelectedFormats": { "alias": "BriefSelectedFormats"; "required": false; }; "BriefDurationSeconds": { "alias": "BriefDurationSeconds"; "required": false; }; "BriefTopic": { "alias": "BriefTopic"; "required": false; }; "BriefSelectedQueries": { "alias": "BriefSelectedQueries"; "required": false; }; "BriefNarrationEnabled": { "alias": "BriefNarrationEnabled"; "required": false; }; "BriefCaptionsMode": { "alias": "BriefCaptionsMode"; "required": false; }; }, { "ConversationCreated": "ConversationCreated"; "PendingMessageConsumed": "PendingMessageConsumed"; "PendingArtifactConsumed": "PendingArtifactConsumed"; "NavigationRequest": "NavigationRequest"; "CloseRequested": "CloseRequested"; "BriefStateChange": "BriefStateChange"; "BriefStartRequested": "BriefStartRequested"; }, never, never, true, never>;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=vs-copilot-panel.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vs-copilot-panel.component.d.ts","sourceRoot":"","sources":["../../../src/VideoStudio/components/vs-copilot-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAEZ,SAAS,EACT,MAAM,EAEN,aAAa,EAGd,MAAM,eAAe,CAAC;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