@rtsee/ngx 0.0.124 → 0.0.126

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Input, Component, ViewChild, EventEmitter, Output, forwardRef, Directive, HostListener, reflectComponentType, DOCUMENT, Inject, ChangeDetectionStrategy, output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
2
+ import { Injectable, Input, Component, ViewChild, EventEmitter, Output, forwardRef, Directive, reflectComponentType, DOCUMENT, HostListener, Inject, ChangeDetectionStrategy, output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
3
3
  import * as i1$3 from '@angular/common';
4
4
  import { NgClass, NgIf, NgForOf, DecimalPipe, DatePipe, NgComponentOutlet, SlicePipe, JsonPipe, DOCUMENT as DOCUMENT$1, CommonModule, NgStyle, NgOptimizedImage } from '@angular/common';
5
5
  import * as i1 from '@angular/forms';
@@ -15,7 +15,7 @@ import * as i2 from '@angular/router';
15
15
  import { RouterLink, RouterLinkActive, NavigationEnd } from '@angular/router';
16
16
  import * as i1$1 from '@angular/common/http';
17
17
  import { RTSeeChatMemberRoles, RTSeeIllustratorEvents, RTSeeChatTypes, OzzyTaskStatus, CREATE_STORY_ACTION_NAME, EDIT_STORY_ACTION_NAME, CREATE_SLIDE_ACTION_NAME, EDIT_SLIDE_ACTION_NAME, getStoryTranslatorLanguage, STORY_TRANSLATOR_LANGUAGES } from '@rtsee/common';
18
- import { sanitizeImageUrl, ManageAgentForm, RTSeeForm, RTSeeFormFieldRadioGroup, RTSeeFormField, RTSeeFormFieldImageUploader, fetchImageBlob, RTSeeRater } from '@rtsee/utilities-ui';
18
+ import { sanitizeImageUrl, RTSeeFormFieldEvents, ManageAgentForm, RTSeeForm, RTSeeFormFieldRadioGroup, RTSeeFormField, RTSeeFormFieldImageUploader, fetchImageBlob, RTSeeFormFieldSelect, RTSeeFormFieldAutocomplete, RTSeeRater } from '@rtsee/utilities-ui';
19
19
  import { InputText } from 'primeng/inputtext';
20
20
  import { InputGroup } from 'primeng/inputgroup';
21
21
  import * as i2$1 from 'primeng/message';
@@ -506,11 +506,11 @@ class TextFieldComponent {
506
506
  this.fieldChanged.emit();
507
507
  }
508
508
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TextFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
509
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TextFieldComponent, isStandalone: true, selector: "rtsee-field-text", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pInputText\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n />\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
509
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TextFieldComponent, isStandalone: true, selector: "rtsee-field-text", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pInputText\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [attr.maxlength]=\"field.maxLength || null\"\n [attr.placeholder]=\"field.placeholder || null\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n />\n <label [for]=\"field.name\">{{ field.label || field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
510
510
  }
511
511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TextFieldComponent, decorators: [{
512
512
  type: Component,
513
- args: [{ selector: "rtsee-field-text", standalone: true, imports: [FormsModule, InputText, InputGroup, FloatLabel, Message], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pInputText\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n />\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
513
+ args: [{ selector: "rtsee-field-text", standalone: true, imports: [FormsModule, InputText, InputGroup, FloatLabel, Message], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pInputText\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [attr.maxlength]=\"field.maxLength || null\"\n [attr.placeholder]=\"field.placeholder || null\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n />\n <label [for]=\"field.name\">{{ field.label || field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
514
514
  }], propDecorators: { field: [{
515
515
  type: Input
516
516
  }], fieldChanged: [{
@@ -526,11 +526,11 @@ class TextareaFieldComponent {
526
526
  this.fieldChanged.emit();
527
527
  }
528
528
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TextareaFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
529
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TextareaFieldComponent, isStandalone: true, selector: "rtsee-field-textarea", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pTextarea\n rows=\"3\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></textarea>\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
529
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: TextareaFieldComponent, isStandalone: true, selector: "rtsee-field-textarea", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pTextarea\n [rows]=\"field.rows || 3\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [attr.placeholder]=\"field.placeholder || null\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></textarea>\n <label [for]=\"field.name\">\n {{ field.label || field.name }}\n @if (field.showCharCount) {\n <span class=\"rtsee-field-char-count\">({{ (field.value || '').length }} chars)</span>\n }\n </label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
530
530
  }
531
531
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TextareaFieldComponent, decorators: [{
532
532
  type: Component,
533
- args: [{ selector: "rtsee-field-textarea", standalone: true, imports: [FormsModule, Textarea, InputGroup, FloatLabel, Message], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pTextarea\n rows=\"3\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></textarea>\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
533
+ args: [{ selector: "rtsee-field-textarea", standalone: true, imports: [FormsModule, Textarea, InputGroup, FloatLabel, Message], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [id]=\"field.name\"\n class=\"rtsee-form-field\"\n pTextarea\n [rows]=\"field.rows || 3\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [attr.placeholder]=\"field.placeholder || null\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></textarea>\n <label [for]=\"field.name\">\n {{ field.label || field.name }}\n @if (field.showCharCount) {\n <span class=\"rtsee-field-char-count\">({{ (field.value || '').length }} chars)</span>\n }\n </label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
534
534
  }], propDecorators: { field: [{
535
535
  type: Input
536
536
  }], fieldChanged: [{
@@ -546,11 +546,11 @@ class CheckboxFieldComponent {
546
546
  this.fieldChanged.emit();
547
547
  }
548
548
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
549
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: CheckboxFieldComponent, isStandalone: true, selector: "rtsee-field-checkbox", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container flex items-center\">\n <p-checkbox [inputId]=\"field.name\"\n [binary]=\"true\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n ></p-checkbox>\n <label [for]=\"field.name\" class=\"ml-2\">{{ field.name }}</label>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
549
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: CheckboxFieldComponent, isStandalone: true, selector: "rtsee-field-checkbox", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container flex items-start\">\n <p-checkbox [inputId]=\"field.name\"\n [binary]=\"true\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n ></p-checkbox>\n <label [for]=\"field.name\" class=\"ml-2 flex flex-col cursor-pointer\">\n <span>{{ field.label || field.name }}</span>\n @if (field.hint) {\n <span class=\"text-xs opacity-75 mt-0.5\">{{ field.hint }}</span>\n }\n </label>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
550
550
  }
551
551
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
552
552
  type: Component,
553
- args: [{ selector: "rtsee-field-checkbox", standalone: true, imports: [FormsModule, Checkbox, Message], template: "<div class=\"rtsee-form-field-container flex items-center\">\n <p-checkbox [inputId]=\"field.name\"\n [binary]=\"true\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n ></p-checkbox>\n <label [for]=\"field.name\" class=\"ml-2\">{{ field.name }}</label>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
553
+ args: [{ selector: "rtsee-field-checkbox", standalone: true, imports: [FormsModule, Checkbox, Message], template: "<div class=\"rtsee-form-field-container flex items-start\">\n <p-checkbox [inputId]=\"field.name\"\n [binary]=\"true\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n ></p-checkbox>\n <label [for]=\"field.name\" class=\"ml-2 flex flex-col cursor-pointer\">\n <span>{{ field.label || field.name }}</span>\n @if (field.hint) {\n <span class=\"text-xs opacity-75 mt-0.5\">{{ field.hint }}</span>\n }\n </label>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
554
554
  }], propDecorators: { field: [{
555
555
  type: Input
556
556
  }], fieldChanged: [{
@@ -604,14 +604,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
604
604
  }] } });
605
605
 
606
606
  class AutocompleteComponent {
607
+ constructor() {
608
+ this.disabled = false;
609
+ }
607
610
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
608
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AutocompleteComponent, isStandalone: true, selector: "rtsee-autocomplete", inputs: { config: "config" }, ngImport: i0, template: "<div class=\"rtsee-autocomplete rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-autoComplete [(ngModel)]=\"config.selectedSuggestions\"\n [inputId]=\"config.inputId\"\n [multiple]=\"true\"\n [fluid]=\"config.fluid\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n ></p-autoComplete>\n <label [for]=\"config.inputId\">{{config.inputName}}</label>\n </p-floatlabel>\n </p-inputgroup>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
611
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AutocompleteComponent, isStandalone: true, selector: "rtsee-autocomplete", inputs: { config: "config", disabled: "disabled" }, ngImport: i0, template: "<div class=\"rtsee-autocomplete rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n @if (config.allowMultipleSelections) {\n <p-autoComplete [(ngModel)]=\"config.selectedSuggestions\"\n [inputId]=\"config.inputId\"\n [multiple]=\"true\"\n [fluid]=\"config.fluid\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder || ''\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n ></p-autoComplete>\n } @else {\n <p-autoComplete [(ngModel)]=\"config.singleSelection\"\n [inputId]=\"config.inputId\"\n [multiple]=\"false\"\n [dropdown]=\"config.dropdown ?? true\"\n [showClear]=\"true\"\n [fluid]=\"config.fluid\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder || ''\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n (onClear)=\"config.onClear()\"\n ></p-autoComplete>\n }\n <label [for]=\"config.inputId\">{{config.inputName}}</label>\n </p-floatlabel>\n </p-inputgroup>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AutoCompleteModule }, { kind: "component", type: i1$2.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
609
612
  }
610
613
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AutocompleteComponent, decorators: [{
611
614
  type: Component,
612
- args: [{ selector: 'rtsee-autocomplete', imports: [AutoCompleteModule, FloatLabel, InputGroup, FormsModule], template: "<div class=\"rtsee-autocomplete rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-autoComplete [(ngModel)]=\"config.selectedSuggestions\"\n [inputId]=\"config.inputId\"\n [multiple]=\"true\"\n [fluid]=\"config.fluid\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n ></p-autoComplete>\n <label [for]=\"config.inputId\">{{config.inputName}}</label>\n </p-floatlabel>\n </p-inputgroup>\n</div>\n" }]
615
+ args: [{ selector: 'rtsee-autocomplete', imports: [AutoCompleteModule, FloatLabel, InputGroup, FormsModule], template: "<div class=\"rtsee-autocomplete rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n @if (config.allowMultipleSelections) {\n <p-autoComplete [(ngModel)]=\"config.selectedSuggestions\"\n [inputId]=\"config.inputId\"\n [multiple]=\"true\"\n [fluid]=\"config.fluid\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder || ''\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n ></p-autoComplete>\n } @else {\n <p-autoComplete [(ngModel)]=\"config.singleSelection\"\n [inputId]=\"config.inputId\"\n [multiple]=\"false\"\n [dropdown]=\"config.dropdown ?? true\"\n [showClear]=\"true\"\n [fluid]=\"config.fluid\"\n [disabled]=\"disabled\"\n [placeholder]=\"config.placeholder || ''\"\n [suggestions]=\"config.visibleSuggestions\"\n [optionLabel]=\"config.suggestionLabel\"\n (completeMethod)=\"config.onQueryChanged($event)\"\n (onSelect)=\"config.onSelect($event)\"\n (onClear)=\"config.onClear()\"\n ></p-autoComplete>\n }\n <label [for]=\"config.inputId\">{{config.inputName}}</label>\n </p-floatlabel>\n </p-inputgroup>\n</div>\n" }]
613
616
  }], propDecorators: { config: [{
614
617
  type: Input
618
+ }], disabled: [{
619
+ type: Input
615
620
  }] } });
616
621
 
617
622
  class AutocompleteFieldComponent {
@@ -628,11 +633,11 @@ class AutocompleteFieldComponent {
628
633
  this.fieldChanged.emit();
629
634
  }
630
635
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AutocompleteFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
631
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AutocompleteFieldComponent, isStandalone: true, selector: "rtsee-field-autocomplete", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"field.autocomplete\"></rtsee-autocomplete>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
636
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: AutocompleteFieldComponent, isStandalone: true, selector: "rtsee-field-autocomplete", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"field.autocomplete\"\n [disabled]=\"field.isEffectivelyDisabled\"\n ></rtsee-autocomplete>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config", "disabled"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
632
637
  }
633
638
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AutocompleteFieldComponent, decorators: [{
634
639
  type: Component,
635
- args: [{ selector: "rtsee-field-autocomplete", standalone: true, imports: [AutocompleteComponent, Message], template: "<div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"field.autocomplete\"></rtsee-autocomplete>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
640
+ args: [{ selector: "rtsee-field-autocomplete", standalone: true, imports: [AutocompleteComponent, Message], template: "<div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"field.autocomplete\"\n [disabled]=\"field.isEffectivelyDisabled\"\n ></rtsee-autocomplete>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n" }]
636
641
  }], propDecorators: { field: [{
637
642
  type: Input
638
643
  }], fieldChanged: [{
@@ -958,11 +963,11 @@ class SelectFieldComponent {
958
963
  this.fieldChanged.emit();
959
964
  }
960
965
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
961
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: SelectFieldComponent, isStandalone: true, selector: "rtsee-field-select", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-select [inputId]=\"field.name\"\n class=\"rtsee-form-field\"\n [options]=\"field.options\"\n [optionLabel]=\"field.labelKey\"\n [optionValue]=\"field.valueKey\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></p-select>\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"c\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
966
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: SelectFieldComponent, isStandalone: true, selector: "rtsee-field-select", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-select [inputId]=\"field.name\"\n class=\"rtsee-form-field\"\n [options]=\"field.options\"\n [optionLabel]=\"field.labelKey\"\n [optionValue]=\"field.valueKey\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [placeholder]=\"field.placeholder || ''\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></p-select>\n <label [for]=\"field.name\">{{ field.label || field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (field.hint && (!field.options || field.options.length === 0)) {\n <div class=\"text-xs opacity-75 mt-1\">{{ field.hint }}</div>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }] }); }
962
967
  }
963
968
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: SelectFieldComponent, decorators: [{
964
969
  type: Component,
965
- args: [{ selector: "rtsee-field-select", standalone: true, imports: [FormsModule, InputGroup, FloatLabel, Message, Select], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-select [inputId]=\"field.name\"\n class=\"rtsee-form-field\"\n [options]=\"field.options\"\n [optionLabel]=\"field.labelKey\"\n [optionValue]=\"field.valueKey\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></p-select>\n <label [for]=\"field.name\">{{ field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"c\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n\n" }]
970
+ args: [{ selector: "rtsee-field-select", standalone: true, imports: [FormsModule, InputGroup, FloatLabel, Message, Select], template: "<div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <p-select [inputId]=\"field.name\"\n class=\"rtsee-form-field\"\n [options]=\"field.options\"\n [optionLabel]=\"field.labelKey\"\n [optionValue]=\"field.valueKey\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onModelChange()\"\n [disabled]=\"field.isEffectivelyDisabled\"\n [placeholder]=\"field.placeholder || ''\"\n [class.p-invalid]=\"!field.isValid && field.isDirty\"\n ></p-select>\n <label [for]=\"field.name\">{{ field.label || field.name }}</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (field.hint && (!field.options || field.options.length === 0)) {\n <div class=\"text-xs opacity-75 mt-1\">{{ field.hint }}</div>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n\n" }]
966
971
  }], propDecorators: { field: [{
967
972
  type: Input
968
973
  }], fieldChanged: [{
@@ -1059,7 +1064,7 @@ class EntityFieldComponent {
1059
1064
  this.fieldChanged.emit();
1060
1065
  }
1061
1066
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EntityFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1062
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: EntityFieldComponent, isStandalone: true, selector: "rtsee-field-entity", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n @if (field.autocompleteField) {\n <rtsee-autocomplete [config]=\"field.autocompleteField.autocomplete\"></rtsee-autocomplete>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
1067
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: EntityFieldComponent, isStandalone: true, selector: "rtsee-field-entity", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n @if (field.autocompleteField) {\n <rtsee-autocomplete [config]=\"field.autocompleteField.autocomplete\"></rtsee-autocomplete>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config", "disabled"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
1063
1068
  }
1064
1069
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EntityFieldComponent, decorators: [{
1065
1070
  type: Component,
@@ -1086,7 +1091,7 @@ class EntitiesListFieldComponent {
1086
1091
  this.fieldChanged.emit();
1087
1092
  }
1088
1093
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EntitiesListFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1089
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: EntitiesListFieldComponent, isStandalone: true, selector: "rtsee-field-entities-list", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n @if (field.autocompleteField) {\n <rtsee-autocomplete [config]=\"field.autocompleteField.autocomplete\"></rtsee-autocomplete>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
1094
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: EntitiesListFieldComponent, isStandalone: true, selector: "rtsee-field-entities-list", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "<div class=\"rtsee-form-field-container\">\n @if (field.autocompleteField) {\n <rtsee-autocomplete [config]=\"field.autocompleteField.autocomplete\"></rtsee-autocomplete>\n }\n @if (!field.isValid && field.isDirty) {\n @for (error of field.validator.result.errors; track error.message) {\n <p-message class=\"rtsee-form-field-error-message block mt-1\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >{{ error.message }}</p-message>\n }\n }\n</div>\n", dependencies: [{ kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config", "disabled"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
1090
1095
  }
1091
1096
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: EntitiesListFieldComponent, decorators: [{
1092
1097
  type: Component,
@@ -1158,14 +1163,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
1158
1163
  }] } });
1159
1164
 
1160
1165
  class FormFieldComponent {
1161
- constructor() {
1166
+ constructor(cdr) {
1167
+ this.cdr = cdr;
1162
1168
  this.fieldChanged = new EventEmitter();
1169
+ this.subscribedField = null;
1170
+ this.onDigestBound = () => {
1171
+ this.cdr.markForCheck();
1172
+ this.cdr.detectChanges();
1173
+ void Promise.resolve().then(() => {
1174
+ this.cdr.markForCheck();
1175
+ this.cdr.detectChanges();
1176
+ });
1177
+ };
1178
+ }
1179
+ ngOnInit() {
1180
+ this.bindField(this.field);
1181
+ }
1182
+ ngOnChanges(changes) {
1183
+ if (changes["field"]) {
1184
+ this.bindField(this.field);
1185
+ }
1186
+ }
1187
+ ngOnDestroy() {
1188
+ this.unbindField();
1189
+ }
1190
+ bindField(field) {
1191
+ if (this.subscribedField === field) {
1192
+ return;
1193
+ }
1194
+ this.unbindField();
1195
+ if (field && typeof field.on === "function") {
1196
+ this.subscribedField = field;
1197
+ field.on(RTSeeFormFieldEvents.DIGEST, this.onDigestBound);
1198
+ }
1199
+ }
1200
+ unbindField() {
1201
+ if (this.subscribedField && typeof this.subscribedField.off === "function") {
1202
+ this.subscribedField.off(RTSeeFormFieldEvents.DIGEST, this.onDigestBound);
1203
+ }
1204
+ this.subscribedField = null;
1163
1205
  }
1164
1206
  onFieldChanged() {
1165
1207
  this.fieldChanged.emit();
1166
1208
  }
1167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1168
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormFieldComponent, isStandalone: true, selector: "rtsee-form-field", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, ngImport: i0, template: "@switch (field.type) {\n @case ('text') {\n <rtsee-field-text [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-text>\n }\n @case ('varchar') {\n <rtsee-field-varchar [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-varchar>\n }\n @case ('textarea') {\n <rtsee-field-textarea [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-textarea>\n }\n @case ('checkbox') {\n <rtsee-field-checkbox [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-checkbox>\n }\n @case ('radio') {\n <rtsee-field-radio [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-radio>\n }\n @case ('number') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('integer') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('float4') {\n <rtsee-field-float [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-float>\n }\n @case ('date') {\n <rtsee-field-date [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-date>\n }\n @case ('autocomplete') {\n <rtsee-field-autocomplete [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-autocomplete>\n }\n @case ('entity') {\n <rtsee-field-entity [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entity>\n }\n @case ('entities-list') {\n <rtsee-field-entities-list [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entities-list>\n }\n @case ('location') {\n <rtsee-field-location [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-location>\n }\n @case ('time_slot') {\n <rtsee-field-time-slot [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slot>\n }\n @case ('time_slots') {\n <rtsee-field-time-slots [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slots>\n }\n @case ('recursive-select') {\n <rtsee-field-recursive-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-recursive-select>\n }\n @case ('select') {\n <rtsee-field-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-select>\n }\n @case ('image-uploader') {\n <rtsee-field-image-uploader [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-image-uploader>\n }\n @case ('field-definition') {\n <rtsee-field-definition-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-definition-field>\n }\n @case ('dynamic-fields') {\n <rtsee-dynamic-fields-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-dynamic-fields-field>\n }\n}\n", dependencies: [{ kind: "component", type: i0.forwardRef(() => TextFieldComponent), selector: "rtsee-field-text", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TextareaFieldComponent), selector: "rtsee-field-textarea", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => CheckboxFieldComponent), selector: "rtsee-field-checkbox", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => RadioFieldComponent), selector: "rtsee-field-radio", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => NumberFieldComponent), selector: "rtsee-field-number", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => AutocompleteFieldComponent), selector: "rtsee-field-autocomplete", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => RecursiveSelectFieldComponent), selector: "rtsee-field-recursive-select", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => ImageUploaderFieldComponent), selector: "rtsee-field-image-uploader", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => FieldDefinitionFieldComponent), selector: "rtsee-field-definition-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => DynamicFieldsFieldComponent), selector: "rtsee-dynamic-fields-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => SelectFieldComponent), selector: "rtsee-field-select", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => LocationFieldComponent), selector: "rtsee-field-location", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TimeSlotFieldComponent), selector: "rtsee-field-time-slot", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TimeSlotsFieldComponent), selector: "rtsee-field-time-slots", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => EntityFieldComponent), selector: "rtsee-field-entity", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => EntitiesListFieldComponent), selector: "rtsee-field-entities-list", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => DateFieldComponent), selector: "rtsee-field-date", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => VarcharFieldComponent), selector: "rtsee-field-varchar", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => FloatFieldComponent), selector: "rtsee-field-float", inputs: ["field"], outputs: ["fieldChanged"] }] }); }
1209
+ getEditorInitials(name) {
1210
+ if (!name || !name.trim()) {
1211
+ return "?";
1212
+ }
1213
+ const parts = name.trim().split(/\s+/);
1214
+ if (parts.length >= 2) {
1215
+ return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
1216
+ }
1217
+ return parts[0].substring(0, 2).toUpperCase();
1218
+ }
1219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormFieldComponent, isStandalone: true, selector: "rtsee-form-field", inputs: { field: "field" }, outputs: { fieldChanged: "fieldChanged" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"rtsee-form-field-row\"\n [class.rtsee-form-field-row--remote-editing]=\"field.isBeingEditedRemotely\"\n>\n <div class=\"rtsee-form-field-control\">\n @switch (field.type) {\n @case ('text') {\n <rtsee-field-text [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-text>\n }\n @case ('varchar') {\n <rtsee-field-varchar [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-varchar>\n }\n @case ('textarea') {\n <rtsee-field-textarea [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-textarea>\n }\n @case ('checkbox') {\n <rtsee-field-checkbox [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-checkbox>\n }\n @case ('radio') {\n <rtsee-field-radio [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-radio>\n }\n @case ('number') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('integer') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('float4') {\n <rtsee-field-float [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-float>\n }\n @case ('date') {\n <rtsee-field-date [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-date>\n }\n @case ('autocomplete') {\n <rtsee-field-autocomplete [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-autocomplete>\n }\n @case ('entity') {\n <rtsee-field-entity [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entity>\n }\n @case ('entities-list') {\n <rtsee-field-entities-list [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entities-list>\n }\n @case ('location') {\n <rtsee-field-location [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-location>\n }\n @case ('time_slot') {\n <rtsee-field-time-slot [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slot>\n }\n @case ('time_slots') {\n <rtsee-field-time-slots [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slots>\n }\n @case ('recursive-select') {\n <rtsee-field-recursive-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-recursive-select>\n }\n @case ('select') {\n <rtsee-field-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-select>\n }\n @case ('image-uploader') {\n <rtsee-field-image-uploader [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-image-uploader>\n }\n @case ('field-definition') {\n <rtsee-field-definition-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-definition-field>\n }\n @case ('dynamic-fields') {\n <rtsee-dynamic-fields-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-dynamic-fields-field>\n }\n }\n </div>\n\n @if (field.lastEditedBy; as editor) {\n <div class=\"rtsee-form-field-editor-badge\"\n [class.rtsee-form-field-editor-badge--active]=\"field.isBeingEditedRemotely\"\n [title]=\"field.isBeingEditedRemotely ? (editor.name + ' is editing...') : ('Edited by ' + editor.name)\"\n >\n @if (editor.imageUrl) {\n <img class=\"rtsee-form-field-editor-avatar\"\n [src]=\"editor.imageUrl\"\n [alt]=\"editor.name\"\n />\n } @else {\n <span class=\"rtsee-form-field-editor-initials\">\n {{ getEditorInitials(editor.name) }}\n </span>\n }\n </div>\n }\n</div>\n", styles: [".rtsee-form-field-row{display:flex;align-items:center;gap:.5rem;width:100%}.rtsee-form-field-control{flex:1 1 auto;min-width:0}.rtsee-form-field-editor-badge{flex:0 0 1.65rem;width:1.65rem;height:1.65rem;border-radius:999px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--rtsee-primary, #6366f1);color:#fff;font-size:.65rem;font-weight:700;border:2px solid rgba(99,102,241,.35);box-shadow:0 1px 4px #00000040;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.rtsee-form-field-editor-badge--active{border-color:#22c55e;box-shadow:0 0 0 3px #22c55e52;transform:scale(1.08)}.rtsee-form-field-editor-avatar{width:100%;height:100%;object-fit:cover;display:block}.rtsee-form-field-editor-initials{line-height:1;letter-spacing:.02em}\n"], dependencies: [{ kind: "component", type: i0.forwardRef(() => TextFieldComponent), selector: "rtsee-field-text", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TextareaFieldComponent), selector: "rtsee-field-textarea", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => CheckboxFieldComponent), selector: "rtsee-field-checkbox", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => RadioFieldComponent), selector: "rtsee-field-radio", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => NumberFieldComponent), selector: "rtsee-field-number", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => AutocompleteFieldComponent), selector: "rtsee-field-autocomplete", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => RecursiveSelectFieldComponent), selector: "rtsee-field-recursive-select", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => ImageUploaderFieldComponent), selector: "rtsee-field-image-uploader", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => FieldDefinitionFieldComponent), selector: "rtsee-field-definition-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => DynamicFieldsFieldComponent), selector: "rtsee-dynamic-fields-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => SelectFieldComponent), selector: "rtsee-field-select", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => LocationFieldComponent), selector: "rtsee-field-location", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TimeSlotFieldComponent), selector: "rtsee-field-time-slot", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => TimeSlotsFieldComponent), selector: "rtsee-field-time-slots", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => EntityFieldComponent), selector: "rtsee-field-entity", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => EntitiesListFieldComponent), selector: "rtsee-field-entities-list", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => DateFieldComponent), selector: "rtsee-field-date", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => VarcharFieldComponent), selector: "rtsee-field-varchar", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "component", type: i0.forwardRef(() => FloatFieldComponent), selector: "rtsee-field-float", inputs: ["field"], outputs: ["fieldChanged"] }] }); }
1169
1221
  }
1170
1222
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormFieldComponent, decorators: [{
1171
1223
  type: Component,
@@ -1189,8 +1241,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
1189
1241
  DateFieldComponent,
1190
1242
  VarcharFieldComponent,
1191
1243
  FloatFieldComponent
1192
- ], template: "@switch (field.type) {\n @case ('text') {\n <rtsee-field-text [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-text>\n }\n @case ('varchar') {\n <rtsee-field-varchar [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-varchar>\n }\n @case ('textarea') {\n <rtsee-field-textarea [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-textarea>\n }\n @case ('checkbox') {\n <rtsee-field-checkbox [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-checkbox>\n }\n @case ('radio') {\n <rtsee-field-radio [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-radio>\n }\n @case ('number') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('integer') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('float4') {\n <rtsee-field-float [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-float>\n }\n @case ('date') {\n <rtsee-field-date [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-date>\n }\n @case ('autocomplete') {\n <rtsee-field-autocomplete [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-autocomplete>\n }\n @case ('entity') {\n <rtsee-field-entity [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entity>\n }\n @case ('entities-list') {\n <rtsee-field-entities-list [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entities-list>\n }\n @case ('location') {\n <rtsee-field-location [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-location>\n }\n @case ('time_slot') {\n <rtsee-field-time-slot [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slot>\n }\n @case ('time_slots') {\n <rtsee-field-time-slots [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slots>\n }\n @case ('recursive-select') {\n <rtsee-field-recursive-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-recursive-select>\n }\n @case ('select') {\n <rtsee-field-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-select>\n }\n @case ('image-uploader') {\n <rtsee-field-image-uploader [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-image-uploader>\n }\n @case ('field-definition') {\n <rtsee-field-definition-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-definition-field>\n }\n @case ('dynamic-fields') {\n <rtsee-dynamic-fields-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-dynamic-fields-field>\n }\n}\n" }]
1193
- }], propDecorators: { field: [{
1244
+ ], template: "<div class=\"rtsee-form-field-row\"\n [class.rtsee-form-field-row--remote-editing]=\"field.isBeingEditedRemotely\"\n>\n <div class=\"rtsee-form-field-control\">\n @switch (field.type) {\n @case ('text') {\n <rtsee-field-text [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-text>\n }\n @case ('varchar') {\n <rtsee-field-varchar [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-varchar>\n }\n @case ('textarea') {\n <rtsee-field-textarea [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-textarea>\n }\n @case ('checkbox') {\n <rtsee-field-checkbox [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-checkbox>\n }\n @case ('radio') {\n <rtsee-field-radio [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-radio>\n }\n @case ('number') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('integer') {\n <rtsee-field-number [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-number>\n }\n @case ('float4') {\n <rtsee-field-float [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-float>\n }\n @case ('date') {\n <rtsee-field-date [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-date>\n }\n @case ('autocomplete') {\n <rtsee-field-autocomplete [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-autocomplete>\n }\n @case ('entity') {\n <rtsee-field-entity [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entity>\n }\n @case ('entities-list') {\n <rtsee-field-entities-list [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-entities-list>\n }\n @case ('location') {\n <rtsee-field-location [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-location>\n }\n @case ('time_slot') {\n <rtsee-field-time-slot [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slot>\n }\n @case ('time_slots') {\n <rtsee-field-time-slots [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-time-slots>\n }\n @case ('recursive-select') {\n <rtsee-field-recursive-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-recursive-select>\n }\n @case ('select') {\n <rtsee-field-select [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-select>\n }\n @case ('image-uploader') {\n <rtsee-field-image-uploader [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-image-uploader>\n }\n @case ('field-definition') {\n <rtsee-field-definition-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-field-definition-field>\n }\n @case ('dynamic-fields') {\n <rtsee-dynamic-fields-field [field]=\"$any(field)\" (fieldChanged)=\"onFieldChanged()\"></rtsee-dynamic-fields-field>\n }\n }\n </div>\n\n @if (field.lastEditedBy; as editor) {\n <div class=\"rtsee-form-field-editor-badge\"\n [class.rtsee-form-field-editor-badge--active]=\"field.isBeingEditedRemotely\"\n [title]=\"field.isBeingEditedRemotely ? (editor.name + ' is editing...') : ('Edited by ' + editor.name)\"\n >\n @if (editor.imageUrl) {\n <img class=\"rtsee-form-field-editor-avatar\"\n [src]=\"editor.imageUrl\"\n [alt]=\"editor.name\"\n />\n } @else {\n <span class=\"rtsee-form-field-editor-initials\">\n {{ getEditorInitials(editor.name) }}\n </span>\n }\n </div>\n }\n</div>\n", styles: [".rtsee-form-field-row{display:flex;align-items:center;gap:.5rem;width:100%}.rtsee-form-field-control{flex:1 1 auto;min-width:0}.rtsee-form-field-editor-badge{flex:0 0 1.65rem;width:1.65rem;height:1.65rem;border-radius:999px;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:var(--rtsee-primary, #6366f1);color:#fff;font-size:.65rem;font-weight:700;border:2px solid rgba(99,102,241,.35);box-shadow:0 1px 4px #00000040;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.rtsee-form-field-editor-badge--active{border-color:#22c55e;box-shadow:0 0 0 3px #22c55e52;transform:scale(1.08)}.rtsee-form-field-editor-avatar{width:100%;height:100%;object-fit:cover;display:block}.rtsee-form-field-editor-initials{line-height:1;letter-spacing:.02em}\n"] }]
1245
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { field: [{
1194
1246
  type: Input
1195
1247
  }], fieldChanged: [{
1196
1248
  type: Output
@@ -1230,17 +1282,30 @@ class FormComponent {
1230
1282
  submit() {
1231
1283
  this.formSubmit.emit(this.form);
1232
1284
  }
1285
+ onCancelClick() {
1286
+ this.form.onCancel?.();
1287
+ }
1233
1288
  onFieldChanged() {
1234
1289
  this.form.evaluateIsValid();
1235
1290
  this.form.evaluateIsDirty();
1236
1291
  this.form.evaluateIsChanged();
1237
1292
  }
1293
+ getEditorInitials(name) {
1294
+ if (!name || !name.trim()) {
1295
+ return "?";
1296
+ }
1297
+ const parts = name.trim().split(/\s+/);
1298
+ if (parts.length >= 2) {
1299
+ return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
1300
+ }
1301
+ return parts[0].substring(0, 2).toUpperCase();
1302
+ }
1238
1303
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1239
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormComponent, isStandalone: true, selector: "rtsee-form", inputs: { form: "form" }, outputs: { formSubmit: "formSubmit" }, ngImport: i0, template: "<div class=\"rtsee-form-container\">\n @if (form.name) {\n <h3 class=\"rts-form-title\">{{ form.name }}</h3>\n }\n @if (form.description) {\n <p class=\"rts-form-description\">{{ form.description }}</p>\n }\n <form class=\"rtsee-form rts-form-group\" (ngSubmit)=\"submit()\">\n @for (field of form.fields; track field.name) {\n <div class=\"rtsee-form-field-container rts-form-field\">\n @if (field.active) {\n <rtsee-form-field [field]=\"field\"\n (fieldChanged)=\"onFieldChanged()\"\n ></rtsee-form-field>\n }\n </div>\n }\n <div class=\"rtsee-form-submit-container rts-form-actions\">\n <ng-content>\n </ng-content>\n </div>\n </form>\n @if (form.translatable && form.translations) {\n <rtsee-translations-panel [panel]=\"form.translations\"></rtsee-translations-panel>\n }\n</div>\n", dependencies: [{ kind: "component", type: FormFieldComponent, selector: "rtsee-form-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TranslationsPanelComponent, selector: "rtsee-translations-panel", inputs: ["panel"] }] }); }
1304
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: FormComponent, isStandalone: true, selector: "rtsee-form", inputs: { form: "form" }, outputs: { formSubmit: "formSubmit" }, ngImport: i0, template: "<div class=\"rtsee-form-container\">\n @if (form.name) {\n <h3 class=\"rts-form-title\">{{ form.name }}</h3>\n }\n @if (form.description) {\n <p class=\"rts-form-description\">{{ form.description }}</p>\n }\n <form class=\"rtsee-form rts-form-group\" (ngSubmit)=\"submit()\">\n @for (field of form.fields; track field.name) {\n @if (field.active) {\n <div class=\"rtsee-form-field-container rts-form-field\">\n <rtsee-form-field [field]=\"field\"\n (fieldChanged)=\"onFieldChanged()\"\n ></rtsee-form-field>\n </div>\n }\n }\n\n @if (form.submitError) {\n <div class=\"rtsee-form-error\" role=\"alert\">\n <i class=\"pi pi-exclamation-triangle\" aria-hidden=\"true\"></i>\n <span>{{ form.submitError }}</span>\n </div>\n }\n\n @if (form.submittedBy; as submitter) {\n <div class=\"rtsee-form-submitted-by\">\n <div class=\"rtsee-form-submitted-by__avatar-wrap\">\n @if (submitter.imageUrl) {\n <img class=\"rtsee-form-submitted-by__avatar\"\n [src]=\"submitter.imageUrl\"\n [alt]=\"submitter.name\"\n />\n } @else {\n <span class=\"rtsee-form-submitted-by__initials\">\n {{ getEditorInitials(submitter.name) }}\n </span>\n }\n </div>\n <span class=\"rtsee-form-submitted-by__text\">\n <strong>{{ submitter.name }}</strong> {{ form.submittedLabel || 'submited the workflow' }}\n </span>\n </div>\n }\n\n <div class=\"rtsee-form-submit-container rts-form-actions\">\n @if (form.submitButtonLabel && !form.readonly) {\n @if (form.canCancel) {\n <button\n type=\"button\"\n class=\"rtsee-form-btn rtsee-form-btn--cancel\"\n [disabled]=\"form.submitInProgress\"\n (click)=\"onCancelClick()\"\n >\n {{ form.cancelButtonLabel || 'Cancel' }}\n </button>\n }\n <button\n type=\"submit\"\n class=\"rtsee-form-btn rtsee-form-btn--submit\"\n [disabled]=\"form.submitInProgress\"\n >\n @if (form.submitInProgress) {\n <i class=\"pi pi-spin pi-spinner\" aria-hidden=\"true\"></i>\n <span>{{ form.submittingButtonLabel || 'Starting...' }}</span>\n } @else {\n <i class=\"pi pi-sparkles\" aria-hidden=\"true\"></i>\n <span>{{ form.submitButtonLabel }}</span>\n }\n </button>\n }\n <ng-content>\n </ng-content>\n </div>\n </form>\n @if (form.translatable && form.translations) {\n <rtsee-translations-panel [panel]=\"form.translations\"></rtsee-translations-panel>\n }\n</div>\n", styles: [".rtsee-form-error{display:flex;align-items:center;gap:.45rem;padding:.45rem .65rem;border-radius:.45rem;font-size:.78rem;color:var(--rtsee-danger, #ef4444);background:#ef44441a;border:1px solid rgba(239,68,68,.3);margin-top:.25rem}.rtsee-form-submitted-by{display:flex;align-items:center;gap:.55rem;padding:.5rem .7rem;margin-top:.35rem;border-radius:.5rem;background:#6366f11a;border:1px solid rgba(99,102,241,.25);font-size:.8rem;color:var(--rtsee-text, inherit)}.rtsee-form-submitted-by__avatar-wrap{width:1.6rem;height:1.6rem;border-radius:999px;overflow:hidden;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:var(--rtsee-primary, #6366f1);color:#fff;font-size:.65rem;font-weight:700}.rtsee-form-submitted-by__avatar{width:100%;height:100%;object-fit:cover;display:block}.rtsee-form-submitted-by__initials{line-height:1}.rtsee-form-submitted-by__text{line-height:1.3}.rtsee-form-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.45rem .9rem;border-radius:.5rem;font-size:.82rem;font-weight:600;cursor:pointer;border:1px solid transparent;transition:opacity .15s ease,background .15s ease}.rtsee-form-btn:disabled{opacity:.55;cursor:not-allowed}.rtsee-form-btn--cancel{background:transparent;border-color:var(--rtsee-border, rgba(148, 163, 184, .35));color:var(--rtsee-text-muted, inherit)}.rtsee-form-btn--submit{background:var(--rtsee-primary, #6366f1);color:#fff}\n"], dependencies: [{ kind: "component", type: FormFieldComponent, selector: "rtsee-form-field", inputs: ["field"], outputs: ["fieldChanged"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: TranslationsPanelComponent, selector: "rtsee-translations-panel", inputs: ["panel"] }] }); }
1240
1305
  }
1241
1306
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormComponent, decorators: [{
1242
1307
  type: Component,
1243
- args: [{ selector: "rtsee-form", standalone: true, imports: [FormFieldComponent, FormsModule, TranslationsPanelComponent], template: "<div class=\"rtsee-form-container\">\n @if (form.name) {\n <h3 class=\"rts-form-title\">{{ form.name }}</h3>\n }\n @if (form.description) {\n <p class=\"rts-form-description\">{{ form.description }}</p>\n }\n <form class=\"rtsee-form rts-form-group\" (ngSubmit)=\"submit()\">\n @for (field of form.fields; track field.name) {\n <div class=\"rtsee-form-field-container rts-form-field\">\n @if (field.active) {\n <rtsee-form-field [field]=\"field\"\n (fieldChanged)=\"onFieldChanged()\"\n ></rtsee-form-field>\n }\n </div>\n }\n <div class=\"rtsee-form-submit-container rts-form-actions\">\n <ng-content>\n </ng-content>\n </div>\n </form>\n @if (form.translatable && form.translations) {\n <rtsee-translations-panel [panel]=\"form.translations\"></rtsee-translations-panel>\n }\n</div>\n" }]
1308
+ args: [{ selector: "rtsee-form", standalone: true, imports: [FormFieldComponent, FormsModule, TranslationsPanelComponent], template: "<div class=\"rtsee-form-container\">\n @if (form.name) {\n <h3 class=\"rts-form-title\">{{ form.name }}</h3>\n }\n @if (form.description) {\n <p class=\"rts-form-description\">{{ form.description }}</p>\n }\n <form class=\"rtsee-form rts-form-group\" (ngSubmit)=\"submit()\">\n @for (field of form.fields; track field.name) {\n @if (field.active) {\n <div class=\"rtsee-form-field-container rts-form-field\">\n <rtsee-form-field [field]=\"field\"\n (fieldChanged)=\"onFieldChanged()\"\n ></rtsee-form-field>\n </div>\n }\n }\n\n @if (form.submitError) {\n <div class=\"rtsee-form-error\" role=\"alert\">\n <i class=\"pi pi-exclamation-triangle\" aria-hidden=\"true\"></i>\n <span>{{ form.submitError }}</span>\n </div>\n }\n\n @if (form.submittedBy; as submitter) {\n <div class=\"rtsee-form-submitted-by\">\n <div class=\"rtsee-form-submitted-by__avatar-wrap\">\n @if (submitter.imageUrl) {\n <img class=\"rtsee-form-submitted-by__avatar\"\n [src]=\"submitter.imageUrl\"\n [alt]=\"submitter.name\"\n />\n } @else {\n <span class=\"rtsee-form-submitted-by__initials\">\n {{ getEditorInitials(submitter.name) }}\n </span>\n }\n </div>\n <span class=\"rtsee-form-submitted-by__text\">\n <strong>{{ submitter.name }}</strong> {{ form.submittedLabel || 'submited the workflow' }}\n </span>\n </div>\n }\n\n <div class=\"rtsee-form-submit-container rts-form-actions\">\n @if (form.submitButtonLabel && !form.readonly) {\n @if (form.canCancel) {\n <button\n type=\"button\"\n class=\"rtsee-form-btn rtsee-form-btn--cancel\"\n [disabled]=\"form.submitInProgress\"\n (click)=\"onCancelClick()\"\n >\n {{ form.cancelButtonLabel || 'Cancel' }}\n </button>\n }\n <button\n type=\"submit\"\n class=\"rtsee-form-btn rtsee-form-btn--submit\"\n [disabled]=\"form.submitInProgress\"\n >\n @if (form.submitInProgress) {\n <i class=\"pi pi-spin pi-spinner\" aria-hidden=\"true\"></i>\n <span>{{ form.submittingButtonLabel || 'Starting...' }}</span>\n } @else {\n <i class=\"pi pi-sparkles\" aria-hidden=\"true\"></i>\n <span>{{ form.submitButtonLabel }}</span>\n }\n </button>\n }\n <ng-content>\n </ng-content>\n </div>\n </form>\n @if (form.translatable && form.translations) {\n <rtsee-translations-panel [panel]=\"form.translations\"></rtsee-translations-panel>\n }\n</div>\n", styles: [".rtsee-form-error{display:flex;align-items:center;gap:.45rem;padding:.45rem .65rem;border-radius:.45rem;font-size:.78rem;color:var(--rtsee-danger, #ef4444);background:#ef44441a;border:1px solid rgba(239,68,68,.3);margin-top:.25rem}.rtsee-form-submitted-by{display:flex;align-items:center;gap:.55rem;padding:.5rem .7rem;margin-top:.35rem;border-radius:.5rem;background:#6366f11a;border:1px solid rgba(99,102,241,.25);font-size:.8rem;color:var(--rtsee-text, inherit)}.rtsee-form-submitted-by__avatar-wrap{width:1.6rem;height:1.6rem;border-radius:999px;overflow:hidden;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:var(--rtsee-primary, #6366f1);color:#fff;font-size:.65rem;font-weight:700}.rtsee-form-submitted-by__avatar{width:100%;height:100%;object-fit:cover;display:block}.rtsee-form-submitted-by__initials{line-height:1}.rtsee-form-submitted-by__text{line-height:1.3}.rtsee-form-btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.45rem .9rem;border-radius:.5rem;font-size:.82rem;font-weight:600;cursor:pointer;border:1px solid transparent;transition:opacity .15s ease,background .15s ease}.rtsee-form-btn:disabled{opacity:.55;cursor:not-allowed}.rtsee-form-btn--cancel{background:transparent;border-color:var(--rtsee-border, rgba(148, 163, 184, .35));color:var(--rtsee-text-muted, inherit)}.rtsee-form-btn--submit{background:var(--rtsee-primary, #6366f1);color:#fff}\n"] }]
1244
1309
  }], propDecorators: { form: [{
1245
1310
  type: Input
1246
1311
  }], formSubmit: [{
@@ -3558,21 +3623,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
3558
3623
  type: Input
3559
3624
  }] } });
3560
3625
 
3626
+ class StorytellerWorkflowForm extends RTSeeForm {
3627
+ constructor(options) {
3628
+ const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
3629
+ const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
3630
+ const titleField = new RTSeeFormField({
3631
+ name: 'title',
3632
+ type: 'text',
3633
+ label: 'Story title',
3634
+ description: 'Story title',
3635
+ placeholder: 'The Lighthouse Keeper',
3636
+ maxLength: 255,
3637
+ value: '',
3638
+ validators: [
3639
+ (v) => (!v || !v.trim() ? 'Story title is required' : null),
3640
+ (v) => (v && v.length > 255 ? 'Title must be at most 255 characters' : null),
3641
+ ],
3642
+ });
3643
+ const textField = new RTSeeFormField({
3644
+ name: 'text',
3645
+ type: 'textarea',
3646
+ label: 'Story',
3647
+ description: 'Story',
3648
+ placeholder: 'Once upon a time…',
3649
+ showCharCount: true,
3650
+ rows: 5,
3651
+ value: '',
3652
+ validators: [(v) => (!v || !v.trim() ? 'Story text is required' : null)],
3653
+ });
3654
+ const historicDescriptionField = new RTSeeFormField({
3655
+ name: 'historicDescription',
3656
+ type: 'textarea',
3657
+ label: 'Historic description',
3658
+ description: 'Historic description',
3659
+ placeholder: 'Historic context, era, places, people…',
3660
+ rows: 3,
3661
+ value: '',
3662
+ validators: [],
3663
+ });
3664
+ const agentIdField = new RTSeeFormFieldSelect({
3665
+ name: 'agentId',
3666
+ type: 'select',
3667
+ label: 'Agent',
3668
+ description: 'Agent',
3669
+ placeholder: 'Select an agent',
3670
+ hint: options.agents.length
3671
+ ? undefined
3672
+ : 'There are no agentic members in this chat. Add an agent to continue.',
3673
+ value: defaultAgentId,
3674
+ selectOptions: agentOptions,
3675
+ labelKey: 'label',
3676
+ valueKey: 'value',
3677
+ validators: [(v) => (!v ? 'Please select an agent' : null)],
3678
+ });
3679
+ super({
3680
+ name: 'Storyteller',
3681
+ fields: [titleField, textField, historicDescriptionField, agentIdField],
3682
+ currentUser: options.currentUser,
3683
+ readonly: options.readonly,
3684
+ submitButtonLabel: '✦ Create story',
3685
+ submittingButtonLabel: 'Creating…',
3686
+ submittedLabel: 'submited the workflow',
3687
+ onSubmit: options.onSubmit,
3688
+ onFieldEdited: options.onFieldEdited,
3689
+ });
3690
+ this.titleField = titleField;
3691
+ this.textField = textField;
3692
+ this.historicDescriptionField = historicDescriptionField;
3693
+ this.agentIdField = agentIdField;
3694
+ }
3695
+ static mapAgentOptions(agents) {
3696
+ return (agents || []).map((agent) => ({
3697
+ label: `${agent.name}${agent.agentConfiguration?.model?.model
3698
+ ? ' · ' + agent.agentConfiguration.model.model
3699
+ : ''}`,
3700
+ value: agent.id,
3701
+ }));
3702
+ }
3703
+ updateAgents(agents) {
3704
+ this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
3705
+ this.agentIdField.hint = agents.length
3706
+ ? undefined
3707
+ : 'There are no agentic members in this chat. Add an agent to continue.';
3708
+ if (!this.agentIdField.value && agents.length === 1) {
3709
+ this.agentIdField.value = agents[0].id;
3710
+ }
3711
+ }
3712
+ getModel() {
3713
+ return {
3714
+ title: (this.titleField.value || '').trim(),
3715
+ text: this.textField.value || '',
3716
+ historicDescription: this.historicDescriptionField.value || '',
3717
+ agentId: this.agentIdField.value || '',
3718
+ };
3719
+ }
3720
+ }
3561
3721
  /**
3562
3722
  * Storyteller step 1: collects the story data and the agent which will build the story.
3563
3723
  */
3564
3724
  class StorytellerFormStepComponent {
3565
3725
  constructor(cdr) {
3566
3726
  this.cdr = cdr;
3567
- this.form = new FormGroup({
3568
- /* eslint-disable */
3569
- title: new FormControl('', [Validators.required, Validators.maxLength(255)]),
3570
- text: new FormControl('', Validators.required),
3571
- historicDescription: new FormControl(''),
3572
- agentId: new FormControl('', Validators.required),
3573
- /* eslint-enable */
3574
- });
3575
3727
  this.onChangedBound = () => this.onWorkflowChanged();
3728
+ this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
3576
3729
  }
3577
3730
  get agents() {
3578
3731
  return (this.chat?.members || []).filter((m) => m.isAgent);
@@ -3580,61 +3733,106 @@ class StorytellerFormStepComponent {
3580
3733
  get readonly() {
3581
3734
  return !this.step?.isActive || !!this.workflow?.submitInProgress;
3582
3735
  }
3583
- get textLength() {
3584
- return (this.form.get('text')?.value || '').length;
3736
+ get currentUser() {
3737
+ const myPeer = this.messenger?.myPeer;
3738
+ if (myPeer) {
3739
+ return {
3740
+ id: myPeer.clientId,
3741
+ name: myPeer.name || 'User',
3742
+ imageUrl: myPeer.imageUrl,
3743
+ };
3744
+ }
3745
+ const myId = this.chat?.clientId || this.messenger?.clientId;
3746
+ if (myId) {
3747
+ const member = this.chat?.getMemberById(myId);
3748
+ return {
3749
+ id: myId,
3750
+ name: member?.name || 'User',
3751
+ imageUrl: member?.imageUrl,
3752
+ };
3753
+ }
3754
+ return null;
3585
3755
  }
3586
3756
  ngOnInit() {
3757
+ this.form = new StorytellerWorkflowForm({
3758
+ agents: this.agents,
3759
+ currentUser: this.currentUser,
3760
+ readonly: this.readonly,
3761
+ onSubmit: (model) => {
3762
+ if (this.readonly) {
3763
+ return;
3764
+ }
3765
+ void this.workflow.submitStep(model, this.form.getCollectiveState());
3766
+ },
3767
+ onFieldEdited: (change, state) => {
3768
+ if (!this.step || this.readonly) {
3769
+ return;
3770
+ }
3771
+ this.workflow?.updateStepForm(this.step.id, state, change.fieldName, change.lastEditedBy || undefined);
3772
+ },
3773
+ });
3587
3774
  this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
3588
- const agents = this.agents;
3589
- if (agents.length === 1) {
3590
- this.form.get('agentId')?.setValue(agents[0].id);
3591
- }
3775
+ this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
3592
3776
  this.syncWithStep();
3593
3777
  }
3594
3778
  ngOnDestroy() {
3595
3779
  this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
3780
+ this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
3596
3781
  }
3597
- submit() {
3598
- if (this.readonly) {
3599
- return;
3600
- }
3601
- if (this.form.invalid) {
3602
- this.form.markAllAsTouched();
3782
+ onRemoteStepFormUpdated(payload) {
3783
+ if (!this.form || !payload?.formState) {
3603
3784
  return;
3604
3785
  }
3605
- const value = this.form.value;
3606
- void this.workflow.submitStep({
3607
- title: value.title.trim(),
3608
- text: value.text,
3609
- historicDescription: value.historicDescription || '',
3610
- agentId: value.agentId,
3611
- });
3612
- }
3613
- isInvalid(name) {
3614
- const control = this.form.get(name);
3615
- return !!control && control.invalid && control.touched;
3786
+ this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
3787
+ this.cdr.detectChanges();
3788
+ void Promise.resolve().then(() => this.cdr.detectChanges());
3616
3789
  }
3617
3790
  onWorkflowChanged() {
3618
3791
  this.syncWithStep();
3619
3792
  this.cdr.detectChanges();
3793
+ void Promise.resolve().then(() => this.cdr.detectChanges());
3620
3794
  }
3621
3795
  syncWithStep() {
3622
- if (this.step?.output) {
3623
- this.form.patchValue(this.step.output, { emitEvent: false });
3796
+ if (!this.form) {
3797
+ return;
3624
3798
  }
3625
- if (this.readonly) {
3626
- this.form.disable({ emitEvent: false });
3799
+ this.form.setCurrentUser(this.currentUser);
3800
+ this.form.updateAgents(this.agents);
3801
+ this.form.setReadonly(this.readonly);
3802
+ this.form.submitInProgress = !!this.workflow?.submitInProgress;
3803
+ if (this.workflow?.submitError) {
3804
+ this.form.submitError = this.workflow.submitError;
3627
3805
  }
3628
- else {
3629
- this.form.enable({ emitEvent: false });
3806
+ if (this.step?.formState) {
3807
+ this.form.applyCollectiveState(this.step.formState);
3808
+ }
3809
+ if (this.step?.output) {
3810
+ this.form.titleField.value = this.step.output.title || '';
3811
+ this.form.textField.value = this.step.output.text || '';
3812
+ this.form.historicDescriptionField.value =
3813
+ this.step.output.historicDescription || '';
3814
+ this.form.agentIdField.value = this.step.output.agentId || '';
3815
+ }
3816
+ if (this.step?.submittedBy) {
3817
+ this.form.submittedBy = this.step.submittedBy;
3818
+ }
3819
+ else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
3820
+ const creator = this.chat?.getMemberById(this.workflow.creatorId);
3821
+ if (creator) {
3822
+ this.form.submittedBy = {
3823
+ id: creator.id,
3824
+ name: creator.name,
3825
+ imageUrl: creator.imageUrl,
3826
+ };
3827
+ }
3630
3828
  }
3631
3829
  }
3632
3830
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorytellerFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
3633
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: StorytellerFormStepComponent, isStandalone: true, selector: "rtsee-storyteller-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, ngImport: i0, template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Story title</span>\n <input class=\"rts-storyteller-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('title')\"\n formControlName=\"title\"\n type=\"text\"\n placeholder=\"The Lighthouse Keeper\"\n id=\"storyteller-title-{{ step.id }}\"\n />\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">\n Story\n <span class=\"rts-storyteller-counter\">{{ textLength }} chars</span>\n </span>\n <textarea class=\"rts-storyteller-input rts-storyteller-textarea rts-storyteller-textarea-lg\"\n [class.rts-storyteller-invalid]=\"isInvalid('text')\"\n formControlName=\"text\"\n placeholder=\"Once upon a time\u2026\"\n id=\"storyteller-text-{{ step.id }}\"\n ></textarea>\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Historic description</span>\n <textarea class=\"rts-storyteller-input rts-storyteller-textarea\"\n formControlName=\"historicDescription\"\n placeholder=\"Historic context, era, places, people\u2026\"\n id=\"storyteller-historic-{{ step.id }}\"\n ></textarea>\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"storyteller-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions\">\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length\"\n id=\"storyteller-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Creating\u2026\n } @else {\n \u2726 Create story\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
3831
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: StorytellerFormStepComponent, isStandalone: true, selector: "rtsee-storyteller-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n"], dependencies: [{ kind: "component", type: FormComponent, selector: "rtsee-form", inputs: ["form"], outputs: ["formSubmit"] }] }); }
3634
3832
  }
3635
3833
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorytellerFormStepComponent, decorators: [{
3636
3834
  type: Component,
3637
- args: [{ selector: 'rtsee-storyteller-form-step', standalone: true, imports: [ReactiveFormsModule], template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\">\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Story title</span>\n <input class=\"rts-storyteller-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('title')\"\n formControlName=\"title\"\n type=\"text\"\n placeholder=\"The Lighthouse Keeper\"\n id=\"storyteller-title-{{ step.id }}\"\n />\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">\n Story\n <span class=\"rts-storyteller-counter\">{{ textLength }} chars</span>\n </span>\n <textarea class=\"rts-storyteller-input rts-storyteller-textarea rts-storyteller-textarea-lg\"\n [class.rts-storyteller-invalid]=\"isInvalid('text')\"\n formControlName=\"text\"\n placeholder=\"Once upon a time\u2026\"\n id=\"storyteller-text-{{ step.id }}\"\n ></textarea>\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Historic description</span>\n <textarea class=\"rts-storyteller-input rts-storyteller-textarea\"\n formControlName=\"historicDescription\"\n placeholder=\"Historic context, era, places, people\u2026\"\n id=\"storyteller-historic-{{ step.id }}\"\n ></textarea>\n </label>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"storyteller-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions\">\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length\"\n id=\"storyteller-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Creating\u2026\n } @else {\n \u2726 Create story\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n"] }]
3835
+ args: [{ selector: 'rtsee-storyteller-form-step', standalone: true, imports: [FormComponent], template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n"] }]
3638
3836
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
3639
3837
  type: Input
3640
3838
  }], workflow: [{
@@ -3678,36 +3876,152 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
3678
3876
  type: Input
3679
3877
  }] } });
3680
3878
 
3681
- const SEARCH_DEBOUNCE_MS$1 = 250;
3879
+ class StoryTranslatorWorkflowForm extends RTSeeForm {
3880
+ constructor(options) {
3881
+ const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
3882
+ const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
3883
+ const storyField = new RTSeeFormFieldAutocomplete({
3884
+ name: 'storyId',
3885
+ type: 'autocomplete',
3886
+ label: 'Story',
3887
+ description: 'Story',
3888
+ placeholder: 'Search stories by name…',
3889
+ value: [],
3890
+ validators: [
3891
+ (v) => (!v || !v.length || !v[0] ? 'Please select a story' : null),
3892
+ ],
3893
+ autocompleteOptions: {
3894
+ inputId: 'storyId',
3895
+ inputName: 'storyId',
3896
+ suggestionLabel: 'name',
3897
+ suggestionId: 'id',
3898
+ placeholder: 'Search stories by name…',
3899
+ dropdown: true,
3900
+ loadOnce: false,
3901
+ allowMultipleSelections: false,
3902
+ fluid: true,
3903
+ getSuggestions: (query) => options.searchStories(query),
3904
+ },
3905
+ });
3906
+ const languageField = new RTSeeFormFieldSelect({
3907
+ name: 'language',
3908
+ type: 'select',
3909
+ label: 'Translate to',
3910
+ description: 'Translate to',
3911
+ placeholder: 'Select a language',
3912
+ value: '',
3913
+ selectOptions: STORY_TRANSLATOR_LANGUAGES.map((l) => ({
3914
+ label: l.nativeName,
3915
+ value: l.code,
3916
+ })),
3917
+ labelKey: 'label',
3918
+ valueKey: 'value',
3919
+ validators: [(v) => (!v ? 'Please select a target language' : null)],
3920
+ });
3921
+ const fromScratchField = new RTSeeFormField({
3922
+ name: 'fromScratch',
3923
+ type: 'checkbox',
3924
+ label: 'From scratch',
3925
+ description: 'From scratch',
3926
+ hint: 'Overwrite existing translations for all story elements',
3927
+ disabled: true,
3928
+ value: false,
3929
+ validators: [],
3930
+ });
3931
+ const agentIdField = new RTSeeFormFieldSelect({
3932
+ name: 'agentId',
3933
+ type: 'select',
3934
+ label: 'Agent',
3935
+ description: 'Agent',
3936
+ placeholder: 'Select an agent',
3937
+ hint: options.agents.length
3938
+ ? undefined
3939
+ : 'There are no agentic members in this chat. Add an agent to continue.',
3940
+ value: defaultAgentId,
3941
+ selectOptions: agentOptions,
3942
+ labelKey: 'label',
3943
+ valueKey: 'value',
3944
+ validators: [(v) => (!v ? 'Please select an agent' : null)],
3945
+ });
3946
+ super({
3947
+ name: 'Story Translator',
3948
+ fields: [storyField, languageField, fromScratchField, agentIdField],
3949
+ currentUser: options.currentUser,
3950
+ readonly: options.readonly,
3951
+ canCancel: options.canCancel,
3952
+ onCancel: options.onCancel,
3953
+ cancelButtonLabel: 'Cancel',
3954
+ submitButtonLabel: '🌐 Translate',
3955
+ submittingButtonLabel: 'Translating…',
3956
+ submittedLabel: 'submited the workflow',
3957
+ onSubmit: options.onSubmit,
3958
+ onFieldEdited: options.onFieldEdited,
3959
+ });
3960
+ this.hasExistingTranslation = false;
3961
+ this.lastSelectedStory = null;
3962
+ this.storyField = storyField;
3963
+ this.languageField = languageField;
3964
+ this.fromScratchField = fromScratchField;
3965
+ this.agentIdField = agentIdField;
3966
+ }
3967
+ get selectedStoryId() {
3968
+ return (this.storyField.value && this.storyField.value[0]) || '';
3969
+ }
3970
+ get selectedStoryName() {
3971
+ const item = this.storyField.autocomplete.selectedSuggestions?.[0];
3972
+ if (item?.name) {
3973
+ return item.name;
3974
+ }
3975
+ return this.lastSelectedStory?.name || '';
3976
+ }
3977
+ get selectedLanguage() {
3978
+ return STORY_TRANSLATOR_LANGUAGES.find((l) => l.code === this.languageField.value);
3979
+ }
3980
+ updateAgents(agents) {
3981
+ this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
3982
+ this.agentIdField.hint = agents.length
3983
+ ? undefined
3984
+ : 'There are no agentic members in this chat. Add an agent to continue.';
3985
+ if (!this.agentIdField.value && agents.length === 1) {
3986
+ this.agentIdField.value = agents[0].id;
3987
+ }
3988
+ }
3989
+ updateLanguageUI() {
3990
+ const lang = this.selectedLanguage;
3991
+ this.submitButtonLabel = `🌐 Translate${lang ? ' to ' + lang.nativeName : ''}`;
3992
+ this.fromScratchField.hint = `Overwrite existing ${lang?.nativeName || ''} translations for all story elements`;
3993
+ this.fromScratchField.disabled = !this.hasExistingTranslation;
3994
+ }
3995
+ setStorySelection(story) {
3996
+ this.lastSelectedStory = story;
3997
+ if (story?.id) {
3998
+ this.storyField.value = [story.id];
3999
+ this.storyField.autocomplete.setSelectedItems([story]);
4000
+ }
4001
+ else {
4002
+ this.storyField.value = [];
4003
+ this.storyField.autocomplete.setSelectedItems([]);
4004
+ }
4005
+ }
4006
+ getModel() {
4007
+ return {
4008
+ storyId: this.selectedStoryId,
4009
+ storyName: this.selectedStoryName || this.selectedStoryId,
4010
+ language: this.languageField.value || '',
4011
+ agentId: this.agentIdField.value || '',
4012
+ fromScratch: this.hasExistingTranslation ? !!this.fromScratchField.value : false,
4013
+ };
4014
+ }
4015
+ }
3682
4016
  /**
3683
4017
  * Story Translator step 1: pick a story (autocomplete by name) and the target language.
3684
4018
  */
3685
4019
  class StoryTranslatorFormStepComponent {
3686
- constructor(cdr, host) {
4020
+ constructor(cdr) {
3687
4021
  this.cdr = cdr;
3688
- this.host = host;
3689
- this.languages = STORY_TRANSLATOR_LANGUAGES;
3690
- this.form = new FormGroup({
3691
- /* eslint-disable */
3692
- storyQuery: new FormControl(''),
3693
- storyId: new FormControl('', Validators.required),
3694
- language: new FormControl('', Validators.required),
3695
- fromScratch: new FormControl(false),
3696
- agentId: new FormControl('', Validators.required),
3697
- /* eslint-enable */
3698
- });
3699
- this.selectedStory = null;
3700
- this.hasExistingTranslation = false;
3701
- this.checkingTranslations = false;
3702
- this.suggestions = [];
3703
- this.suggestionsOpened = false;
3704
- this.highlightedIndex = 0;
3705
- this.searchInProgress = false;
3706
- this.searchError = null;
3707
- this.searchTimer = null;
3708
- this.searchRequestId = 0;
3709
4022
  this.translationCheckRequestId = 0;
3710
4023
  this.onChangedBound = () => this.onWorkflowChanged();
4024
+ this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
3711
4025
  }
3712
4026
  get agents() {
3713
4027
  return (this.chat?.members || []).filter((m) => m.isAgent);
@@ -3718,115 +4032,59 @@ class StoryTranslatorFormStepComponent {
3718
4032
  get canCancel() {
3719
4033
  return !!this.workflow?.isDraft && !this.workflow?.submitInProgress && !!this.messenger;
3720
4034
  }
3721
- get selectedLanguage() {
3722
- return this.languages.find((l) => l.code === this.form.get('language')?.value);
4035
+ get currentUser() {
4036
+ const myPeer = this.messenger?.myPeer;
4037
+ if (myPeer) {
4038
+ return {
4039
+ id: myPeer.clientId,
4040
+ name: myPeer.name || 'User',
4041
+ imageUrl: myPeer.imageUrl,
4042
+ };
4043
+ }
4044
+ const myId = this.chat?.clientId || this.messenger?.clientId;
4045
+ if (myId) {
4046
+ const member = this.chat?.getMemberById(myId);
4047
+ return {
4048
+ id: myId,
4049
+ name: member?.name || 'User',
4050
+ imageUrl: member?.imageUrl,
4051
+ };
4052
+ }
4053
+ return null;
3723
4054
  }
3724
4055
  ngOnInit() {
4056
+ this.form = new StoryTranslatorWorkflowForm({
4057
+ agents: this.agents,
4058
+ searchStories: (query) => this.messenger?.ozzy ? this.messenger.ozzy.searchStories(query) : Promise.resolve([]),
4059
+ currentUser: this.currentUser,
4060
+ readonly: this.readonly,
4061
+ canCancel: this.canCancel,
4062
+ onCancel: () => this.cancel(),
4063
+ onSubmit: (model) => {
4064
+ if (this.readonly) {
4065
+ return;
4066
+ }
4067
+ void this.workflow.submitStep(model, this.form.getCollectiveState());
4068
+ },
4069
+ onFieldEdited: (change, state) => {
4070
+ if (!this.step || this.readonly) {
4071
+ return;
4072
+ }
4073
+ if (change.fieldName === 'storyId' || change.fieldName === 'language') {
4074
+ this.form.fromScratchField.value = false;
4075
+ this.form.updateLanguageUI();
4076
+ void this.checkExistingTranslation();
4077
+ }
4078
+ this.workflow?.updateStepForm(this.step.id, this.form.getCollectiveState(), change.fieldName, change.lastEditedBy || undefined);
4079
+ },
4080
+ });
3725
4081
  this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
3726
- const agents = this.agents;
3727
- if (agents.length === 1) {
3728
- this.form.get('agentId')?.setValue(agents[0].id);
3729
- }
4082
+ this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
3730
4083
  this.syncWithStep();
3731
4084
  }
3732
4085
  ngOnDestroy() {
3733
4086
  this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
3734
- this.clearSearchTimer();
3735
- }
3736
- onStoryFocus() {
3737
- if (this.readonly) {
3738
- return;
3739
- }
3740
- this.suggestionsOpened = true;
3741
- if (!this.suggestions.length) {
3742
- this.scheduleSearch(0);
3743
- }
3744
- }
3745
- onStoryInput() {
3746
- // typing invalidates the previous selection
3747
- if (this.selectedStory) {
3748
- this.selectedStory = null;
3749
- this.hasExistingTranslation = false;
3750
- this.form.patchValue({ storyId: '', fromScratch: false }, { emitEvent: false });
3751
- }
3752
- this.suggestionsOpened = true;
3753
- this.scheduleSearch(SEARCH_DEBOUNCE_MS$1);
3754
- }
3755
- onStoryKeydown(event) {
3756
- if (!this.suggestionsOpened || !this.suggestions.length) {
3757
- if (event.key === 'ArrowDown') {
3758
- this.suggestionsOpened = true;
3759
- this.scheduleSearch(0);
3760
- }
3761
- return;
3762
- }
3763
- switch (event.key) {
3764
- case 'ArrowDown':
3765
- event.preventDefault();
3766
- this.highlightedIndex = (this.highlightedIndex + 1) % this.suggestions.length;
3767
- break;
3768
- case 'ArrowUp':
3769
- event.preventDefault();
3770
- this.highlightedIndex = (this.highlightedIndex - 1 + this.suggestions.length) % this.suggestions.length;
3771
- break;
3772
- case 'Enter':
3773
- event.preventDefault();
3774
- this.selectStory(this.suggestions[this.highlightedIndex]);
3775
- break;
3776
- case 'Escape':
3777
- event.preventDefault();
3778
- this.suggestionsOpened = false;
3779
- break;
3780
- }
3781
- }
3782
- selectStory(story) {
3783
- if (!story || this.readonly) {
3784
- return;
3785
- }
3786
- this.selectedStory = story;
3787
- this.form.patchValue({ storyId: story.id, storyQuery: story.name, fromScratch: false }, { emitEvent: false });
3788
- this.form.get('storyId')?.markAsTouched();
3789
- this.suggestionsOpened = false;
3790
- void this.checkExistingTranslation();
3791
- }
3792
- clearStory() {
3793
- if (this.readonly) {
3794
- return;
3795
- }
3796
- this.selectedStory = null;
3797
- this.hasExistingTranslation = false;
3798
- this.form.patchValue({ storyId: '', storyQuery: '', fromScratch: false }, { emitEvent: false });
3799
- this.suggestionsOpened = true;
3800
- this.scheduleSearch(0);
3801
- setTimeout(() => this.storyInput?.nativeElement.focus());
3802
- }
3803
- onLanguageChange() {
3804
- if (this.readonly) {
3805
- return;
3806
- }
3807
- this.form.get('fromScratch')?.setValue(false, { emitEvent: false });
3808
- void this.checkExistingTranslation();
3809
- }
3810
- onDocumentMouseDown(event) {
3811
- if (this.suggestionsOpened && !this.host.nativeElement.contains(event.target)) {
3812
- this.suggestionsOpened = false;
3813
- }
3814
- }
3815
- submit() {
3816
- if (this.readonly) {
3817
- return;
3818
- }
3819
- if (this.form.invalid || !this.selectedStory) {
3820
- this.form.markAllAsTouched();
3821
- return;
3822
- }
3823
- void this.workflow.submitStep({
3824
- storyId: this.selectedStory.id,
3825
- storyName: this.selectedStory.name,
3826
- language: this.form.get('language')?.value,
3827
- agentId: this.form.get('agentId')?.value,
3828
- fromScratch: this.hasExistingTranslation ? !!this.form.get('fromScratch')?.value : false,
3829
- });
4087
+ this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
3830
4088
  }
3831
4089
  cancel() {
3832
4090
  if (!this.canCancel) {
@@ -3834,98 +4092,90 @@ class StoryTranslatorFormStepComponent {
3834
4092
  }
3835
4093
  this.messenger?.discardDraftWorkflow(this.workflow);
3836
4094
  }
3837
- isInvalid(name) {
3838
- const control = this.form.get(name);
3839
- return !!control && control.invalid && control.touched;
3840
- }
3841
- scheduleSearch(delay) {
3842
- this.clearSearchTimer();
3843
- this.searchTimer = setTimeout(() => void this.search(), delay);
3844
- }
3845
- clearSearchTimer() {
3846
- if (this.searchTimer) {
3847
- clearTimeout(this.searchTimer);
3848
- this.searchTimer = null;
3849
- }
3850
- }
3851
- async search() {
3852
- if (!this.messenger) {
4095
+ onRemoteStepFormUpdated(payload) {
4096
+ if (!this.form || !payload?.formState) {
3853
4097
  return;
3854
4098
  }
3855
- const requestId = ++this.searchRequestId;
3856
- const query = this.form.get('storyQuery')?.value || '';
3857
- this.searchInProgress = true;
3858
- this.searchError = null;
3859
- this.cdr.markForCheck();
3860
- try {
3861
- const stories = await this.messenger.ozzy.searchStories(query);
3862
- if (requestId !== this.searchRequestId) {
3863
- return;
3864
- }
3865
- this.suggestions = stories;
3866
- this.highlightedIndex = 0;
3867
- }
3868
- catch (e) {
3869
- if (requestId !== this.searchRequestId) {
3870
- return;
3871
- }
3872
- this.suggestions = [];
3873
- this.searchError = e?.friendlyMessage || e?.message || 'Failed to load stories.';
3874
- }
3875
- finally {
3876
- if (requestId === this.searchRequestId) {
3877
- this.searchInProgress = false;
3878
- this.cdr.detectChanges();
3879
- }
3880
- }
4099
+ this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
4100
+ this.form.updateLanguageUI();
4101
+ void this.checkExistingTranslation(true);
4102
+ this.cdr.detectChanges();
4103
+ void Promise.resolve().then(() => this.cdr.detectChanges());
3881
4104
  }
3882
4105
  onWorkflowChanged() {
3883
4106
  this.syncWithStep();
3884
4107
  this.cdr.detectChanges();
4108
+ void Promise.resolve().then(() => this.cdr.detectChanges());
3885
4109
  }
3886
4110
  syncWithStep() {
4111
+ if (!this.form) {
4112
+ return;
4113
+ }
4114
+ this.form.setCurrentUser(this.currentUser);
4115
+ this.form.updateAgents(this.agents);
4116
+ this.form.setReadonly(this.readonly);
4117
+ this.form.canCancel = this.canCancel;
4118
+ this.form.submitInProgress = !!this.workflow?.submitInProgress;
4119
+ if (this.workflow?.submitError) {
4120
+ this.form.submitError = this.workflow.submitError;
4121
+ }
4122
+ if (this.step?.formState) {
4123
+ this.form.applyCollectiveState(this.step.formState);
4124
+ }
3887
4125
  const output = this.step?.output;
3888
4126
  if (output?.storyId) {
3889
- this.selectedStory = { id: output.storyId, name: output.storyName || output.storyId };
3890
- this.form.patchValue({
3891
- storyId: output.storyId,
3892
- storyQuery: output.storyName || '',
3893
- language: output.language,
3894
- fromScratch: !!output.fromScratch,
3895
- agentId: output.agentId,
3896
- }, { emitEvent: false });
4127
+ this.form.setStorySelection({
4128
+ id: output.storyId,
4129
+ name: output.storyName || output.storyId,
4130
+ });
4131
+ this.form.languageField.value = output.language || '';
4132
+ this.form.fromScratchField.value = !!output.fromScratch;
4133
+ this.form.agentIdField.value = output.agentId || '';
3897
4134
  if (output.fromScratch) {
3898
- this.hasExistingTranslation = true;
4135
+ this.form.hasExistingTranslation = true;
3899
4136
  }
3900
4137
  else {
3901
4138
  void this.checkExistingTranslation(true);
3902
4139
  }
3903
4140
  }
3904
- if (this.readonly) {
3905
- this.suggestionsOpened = false;
3906
- this.form.disable({ emitEvent: false });
4141
+ else if (this.form.selectedStoryId && this.form.languageField.value) {
4142
+ void this.checkExistingTranslation(true);
3907
4143
  }
3908
- else {
3909
- this.form.enable({ emitEvent: false });
4144
+ this.form.updateLanguageUI();
4145
+ if (this.step?.submittedBy) {
4146
+ this.form.submittedBy = this.step.submittedBy;
4147
+ }
4148
+ else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
4149
+ const creator = this.chat?.getMemberById(this.workflow.creatorId);
4150
+ if (creator) {
4151
+ this.form.submittedBy = {
4152
+ id: creator.id,
4153
+ name: creator.name,
4154
+ imageUrl: creator.imageUrl,
4155
+ };
4156
+ }
3910
4157
  }
3911
4158
  }
3912
4159
  async checkExistingTranslation(preserveCheckboxValue = false) {
3913
- const storyId = this.selectedStory?.id;
3914
- const rawLang = this.form.get('language')?.value || '';
4160
+ if (!this.form) {
4161
+ return;
4162
+ }
4163
+ const storyId = this.form.selectedStoryId;
4164
+ const rawLang = this.form.languageField.value || '';
3915
4165
  const langInfo = getStoryTranslatorLanguage(rawLang);
3916
4166
  const languageKey = langInfo?.code || rawLang;
3917
4167
  if (!storyId || !languageKey) {
3918
- this.hasExistingTranslation = false;
3919
- this.checkingTranslations = false;
4168
+ this.form.hasExistingTranslation = false;
3920
4169
  if (!preserveCheckboxValue) {
3921
- this.form.get('fromScratch')?.setValue(false, { emitEvent: false });
4170
+ this.form.fromScratchField.value = false;
3922
4171
  }
4172
+ this.form.updateLanguageUI();
3923
4173
  this.cdr.markForCheck();
3924
4174
  return;
3925
4175
  }
3926
4176
  const requestId = ++this.translationCheckRequestId;
3927
- this.checkingTranslations = true;
3928
- const aliases = this.selectedStory?.aliases || [];
4177
+ const selectedItem = this.form.storyField.autocomplete.selectedSuggestions?.[0];
4178
+ const aliases = selectedItem?.aliases || this.form.lastSelectedStory?.aliases || [];
3929
4179
  const hasAliasForLang = aliases.some((a) => {
3930
4180
  const norm = getStoryTranslatorLanguage(a.languageKey)?.code || a.languageKey;
3931
4181
  return norm === languageKey;
@@ -3941,31 +4191,31 @@ class StoryTranslatorFormStepComponent {
3941
4191
  const norm = getStoryTranslatorLanguage(t.languageKey)?.code || t.languageKey;
3942
4192
  return norm === languageKey;
3943
4193
  });
3944
- this.hasExistingTranslation = hasAliasForLang || hasStoryTranslation;
3945
- if (!this.hasExistingTranslation && !preserveCheckboxValue) {
3946
- this.form.get('fromScratch')?.setValue(false, { emitEvent: false });
4194
+ this.form.hasExistingTranslation = hasAliasForLang || hasStoryTranslation;
4195
+ if (!this.form.hasExistingTranslation && !preserveCheckboxValue) {
4196
+ this.form.fromScratchField.value = false;
3947
4197
  }
3948
4198
  }
3949
4199
  catch {
3950
4200
  if (requestId !== this.translationCheckRequestId) {
3951
4201
  return;
3952
4202
  }
3953
- this.hasExistingTranslation = hasAliasForLang;
4203
+ this.form.hasExistingTranslation = hasAliasForLang;
3954
4204
  }
3955
4205
  finally {
3956
4206
  if (requestId === this.translationCheckRequestId) {
3957
- this.checkingTranslations = false;
4207
+ this.form.updateLanguageUI();
3958
4208
  this.cdr.detectChanges();
3959
4209
  }
3960
4210
  }
3961
4211
  }
3962
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryTranslatorFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
3963
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: StoryTranslatorFormStepComponent, isStandalone: true, selector: "rtsee-story-translator-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, host: { listeners: { "document:mousedown": "onDocumentMouseDown($event)" } }, viewQueries: [{ propertyName: "storyInput", first: true, predicate: ["storyInput"], descendants: true }], ngImport: i0, template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" autocomplete=\"off\">\n <div class=\"rts-storyteller-field\">\n <label class=\"rts-storyteller-label\" for=\"story-translator-story-{{ step.id }}\">Story</label>\n <div class=\"rts-st-autocomplete\">\n <span class=\"rts-st-autocomplete-icon pi\" [class.pi-search]=\"!searchInProgress\" [class.pi-spin]=\"searchInProgress\" [class.pi-spinner]=\"searchInProgress\"></span>\n <input #storyInput\n class=\"rts-storyteller-input rts-st-autocomplete-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('storyId')\"\n [class.rts-st-autocomplete-selected]=\"!!selectedStory\"\n formControlName=\"storyQuery\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"suggestionsOpened\"\n placeholder=\"Search stories by name\u2026\"\n id=\"story-translator-story-{{ step.id }}\"\n (focus)=\"onStoryFocus()\"\n (input)=\"onStoryInput()\"\n (keydown)=\"onStoryKeydown($event)\"\n />\n @if (selectedStory && !readonly) {\n <button type=\"button\"\n class=\"rts-st-autocomplete-clear pi pi-times\"\n aria-label=\"Clear story\"\n id=\"story-translator-clear-{{ step.id }}\"\n (click)=\"clearStory()\"\n ></button>\n }\n\n @if (suggestionsOpened && !readonly) {\n <ul class=\"rts-st-autocomplete-panel\" role=\"listbox\">\n @if (searchError) {\n <li class=\"rts-st-autocomplete-empty rts-st-autocomplete-error\">{{ searchError }}</li>\n } @else if (!suggestions.length && !searchInProgress) {\n <li class=\"rts-st-autocomplete-empty\">No stories found</li>\n }\n @for (story of suggestions; track story.id; let i = $index) {\n <li class=\"rts-st-autocomplete-option\"\n role=\"option\"\n [class.rts-st-autocomplete-option-active]=\"i === highlightedIndex\"\n [attr.aria-selected]=\"story.id === selectedStory?.id\"\n (mouseenter)=\"highlightedIndex = i\"\n (mousedown)=\"$event.preventDefault(); selectStory(story)\"\n >\n @if (story.imageUrl) {\n <img class=\"rts-st-autocomplete-thumb\" [src]=\"story.imageUrl\" [alt]=\"story.name\" loading=\"lazy\" />\n } @else {\n <span class=\"rts-st-autocomplete-thumb rts-st-autocomplete-thumb-empty\">\uD83D\uDCD6</span>\n }\n <span class=\"rts-st-autocomplete-option-body\">\n <span class=\"rts-st-autocomplete-option-name\">{{ story.name }}</span>\n @if (story.totalSlides) {\n <span class=\"rts-st-autocomplete-option-meta\">{{ story.totalSlides }} slides</span>\n }\n </span>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Translate to</span>\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('language')\"\n formControlName=\"language\"\n id=\"story-translator-language-{{ step.id }}\"\n (change)=\"onLanguageChange()\"\n >\n <option value=\"\" disabled>Select a language</option>\n @for (language of languages; track language.code) {\n <option [value]=\"language.code\">{{ language.nativeName }}</option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n </label>\n\n @if (hasExistingTranslation) {\n <label class=\"rts-st-checkbox-row\" for=\"story-translator-from-scratch-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"fromScratch\"\n id=\"story-translator-from-scratch-{{ step.id }}\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">From scratch</span>\n <span class=\"rts-st-checkbox-desc\">Overwrite existing {{ selectedLanguage?.nativeName || '' }} translations for all story elements</span>\n </span>\n </label>\n }\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"story-translator-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions rts-st-translator-actions\">\n @if (canCancel) {\n <button class=\"rts-st-cancel\"\n type=\"button\"\n id=\"story-translator-cancel-{{ step.id }}\"\n (click)=\"cancel()\"\n >Cancel</button>\n }\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length\"\n id=\"story-translator-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Translating\u2026\n } @else {\n \uD83C\uDF10 Translate{{ selectedLanguage ? ' to ' + selectedLanguage.nativeName : '' }}\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
4212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryTranslatorFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: StoryTranslatorFormStepComponent, isStandalone: true, selector: "rtsee-story-translator-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n"], dependencies: [{ kind: "component", type: FormComponent, selector: "rtsee-form", inputs: ["form"], outputs: ["formSubmit"] }] }); }
3964
4214
  }
3965
4215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryTranslatorFormStepComponent, decorators: [{
3966
4216
  type: Component,
3967
- args: [{ selector: 'rtsee-story-translator-form-step', standalone: true, imports: [ReactiveFormsModule], template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" autocomplete=\"off\">\n <div class=\"rts-storyteller-field\">\n <label class=\"rts-storyteller-label\" for=\"story-translator-story-{{ step.id }}\">Story</label>\n <div class=\"rts-st-autocomplete\">\n <span class=\"rts-st-autocomplete-icon pi\" [class.pi-search]=\"!searchInProgress\" [class.pi-spin]=\"searchInProgress\" [class.pi-spinner]=\"searchInProgress\"></span>\n <input #storyInput\n class=\"rts-storyteller-input rts-st-autocomplete-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('storyId')\"\n [class.rts-st-autocomplete-selected]=\"!!selectedStory\"\n formControlName=\"storyQuery\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"suggestionsOpened\"\n placeholder=\"Search stories by name\u2026\"\n id=\"story-translator-story-{{ step.id }}\"\n (focus)=\"onStoryFocus()\"\n (input)=\"onStoryInput()\"\n (keydown)=\"onStoryKeydown($event)\"\n />\n @if (selectedStory && !readonly) {\n <button type=\"button\"\n class=\"rts-st-autocomplete-clear pi pi-times\"\n aria-label=\"Clear story\"\n id=\"story-translator-clear-{{ step.id }}\"\n (click)=\"clearStory()\"\n ></button>\n }\n\n @if (suggestionsOpened && !readonly) {\n <ul class=\"rts-st-autocomplete-panel\" role=\"listbox\">\n @if (searchError) {\n <li class=\"rts-st-autocomplete-empty rts-st-autocomplete-error\">{{ searchError }}</li>\n } @else if (!suggestions.length && !searchInProgress) {\n <li class=\"rts-st-autocomplete-empty\">No stories found</li>\n }\n @for (story of suggestions; track story.id; let i = $index) {\n <li class=\"rts-st-autocomplete-option\"\n role=\"option\"\n [class.rts-st-autocomplete-option-active]=\"i === highlightedIndex\"\n [attr.aria-selected]=\"story.id === selectedStory?.id\"\n (mouseenter)=\"highlightedIndex = i\"\n (mousedown)=\"$event.preventDefault(); selectStory(story)\"\n >\n @if (story.imageUrl) {\n <img class=\"rts-st-autocomplete-thumb\" [src]=\"story.imageUrl\" [alt]=\"story.name\" loading=\"lazy\" />\n } @else {\n <span class=\"rts-st-autocomplete-thumb rts-st-autocomplete-thumb-empty\">\uD83D\uDCD6</span>\n }\n <span class=\"rts-st-autocomplete-option-body\">\n <span class=\"rts-st-autocomplete-option-name\">{{ story.name }}</span>\n @if (story.totalSlides) {\n <span class=\"rts-st-autocomplete-option-meta\">{{ story.totalSlides }} slides</span>\n }\n </span>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Translate to</span>\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('language')\"\n formControlName=\"language\"\n id=\"story-translator-language-{{ step.id }}\"\n (change)=\"onLanguageChange()\"\n >\n <option value=\"\" disabled>Select a language</option>\n @for (language of languages; track language.code) {\n <option [value]=\"language.code\">{{ language.nativeName }}</option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n </label>\n\n @if (hasExistingTranslation) {\n <label class=\"rts-st-checkbox-row\" for=\"story-translator-from-scratch-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"fromScratch\"\n id=\"story-translator-from-scratch-{{ step.id }}\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">From scratch</span>\n <span class=\"rts-st-checkbox-desc\">Overwrite existing {{ selectedLanguage?.nativeName || '' }} translations for all story elements</span>\n </span>\n </label>\n }\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"story-translator-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions rts-st-translator-actions\">\n @if (canCancel) {\n <button class=\"rts-st-cancel\"\n type=\"button\"\n id=\"story-translator-cancel-{{ step.id }}\"\n (click)=\"cancel()\"\n >Cancel</button>\n }\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length\"\n id=\"story-translator-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Translating\u2026\n } @else {\n \uD83C\uDF10 Translate{{ selectedLanguage ? ' to ' + selectedLanguage.nativeName : '' }}\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n"] }]
3968
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { step: [{
4217
+ args: [{ selector: 'rtsee-story-translator-form-step', standalone: true, imports: [FormComponent], template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n"] }]
4218
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
3969
4219
  type: Input
3970
4220
  }], workflow: [{
3971
4221
  type: Input
@@ -3973,56 +4223,144 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
3973
4223
  type: Input
3974
4224
  }], messenger: [{
3975
4225
  type: Input
3976
- }], storyInput: [{
3977
- type: ViewChild,
3978
- args: ['storyInput']
3979
- }], onDocumentMouseDown: [{
3980
- type: HostListener,
3981
- args: ['document:mousedown', ['$event']]
3982
4226
  }] } });
3983
4227
 
3984
- const SEARCH_DEBOUNCE_MS = 250;
3985
- /**
3986
- * Story Repair step 1 (#RepairStory):
3987
- * - Pick a story (autocomplete by name)
3988
- * - Choose repair options via 4 checkboxes (Grammar & Flow, Characters, Artifacts, Locations), all checked by default
3989
- * - Pick an agent
3990
- */
3991
- class StoryRepairFormStepComponent {
3992
- constructor(cdr, host) {
3993
- this.cdr = cdr;
3994
- this.host = host;
3995
- this.form = new FormGroup({
3996
- /* eslint-disable */
3997
- storyQuery: new FormControl(''),
3998
- storyId: new FormControl('', Validators.required),
3999
- grammarAndFlow: new FormControl(true),
4000
- characters: new FormControl(true),
4001
- artifacts: new FormControl(true),
4002
- locations: new FormControl(true),
4003
- sanitizeImages: new FormControl(true),
4004
- agentId: new FormControl('', Validators.required),
4005
- /* eslint-enable */
4228
+ class StoryRepairWorkflowForm extends RTSeeForm {
4229
+ constructor(options) {
4230
+ const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
4231
+ const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
4232
+ const storyField = new RTSeeFormFieldAutocomplete({
4233
+ name: 'storyId',
4234
+ type: 'autocomplete',
4235
+ label: 'Story',
4236
+ description: 'Story',
4237
+ placeholder: 'Search stories by name…',
4238
+ value: [],
4239
+ validators: [
4240
+ (v) => (!v || !v.length || !v[0] ? 'Please select a story' : null),
4241
+ ],
4242
+ autocompleteOptions: {
4243
+ inputId: 'storyId',
4244
+ inputName: 'storyId',
4245
+ suggestionLabel: 'name',
4246
+ suggestionId: 'id',
4247
+ placeholder: 'Search stories by name…',
4248
+ dropdown: true,
4249
+ loadOnce: false,
4250
+ allowMultipleSelections: false,
4251
+ fluid: true,
4252
+ getSuggestions: (query) => options.searchStories(query),
4253
+ },
4006
4254
  });
4007
- this.selectedStory = null;
4008
- this.suggestions = [];
4009
- this.suggestionsOpened = false;
4010
- this.highlightedIndex = 0;
4011
- this.searchInProgress = false;
4012
- this.searchError = null;
4013
- this.optionsTouched = false;
4014
- this.searchTimer = null;
4015
- this.searchRequestId = 0;
4016
- this.onChangedBound = () => this.onWorkflowChanged();
4255
+ const grammarAndFlowField = new RTSeeFormField({
4256
+ name: 'grammarAndFlow',
4257
+ type: 'checkbox',
4258
+ label: 'Grammar & Flow',
4259
+ description: 'Grammar & Flow',
4260
+ hint: 'Fix typos, punctuation & improve readability across story, slides & entities',
4261
+ value: true,
4262
+ validators: [],
4263
+ });
4264
+ const charactersField = new RTSeeFormField({
4265
+ name: 'characters',
4266
+ type: 'checkbox',
4267
+ label: 'Characters',
4268
+ description: 'Characters',
4269
+ hint: 'Add missing important characters and link them to slides',
4270
+ value: true,
4271
+ validators: [],
4272
+ });
4273
+ const artifactsField = new RTSeeFormField({
4274
+ name: 'artifacts',
4275
+ type: 'checkbox',
4276
+ label: 'Artifacts',
4277
+ description: 'Artifacts',
4278
+ hint: 'Add missing memorable objects and link them to slides',
4279
+ value: true,
4280
+ validators: [],
4281
+ });
4282
+ const locationsField = new RTSeeFormField({
4283
+ name: 'locations',
4284
+ type: 'checkbox',
4285
+ label: 'Locations',
4286
+ description: 'Locations',
4287
+ hint: 'Add missing story locations and link them to slides',
4288
+ value: true,
4289
+ validators: [],
4290
+ });
4291
+ const sanitizeImagesField = new RTSeeFormField({
4292
+ name: 'sanitizeImages',
4293
+ type: 'checkbox',
4294
+ label: 'Sanitize images',
4295
+ description: 'Sanitize images',
4296
+ hint: 'Properly name & upload story, slide, character, artifact, location & author images to the public bucket for SEO',
4297
+ value: true,
4298
+ validators: [],
4299
+ });
4300
+ const agentIdField = new RTSeeFormFieldSelect({
4301
+ name: 'agentId',
4302
+ type: 'select',
4303
+ label: 'Agent',
4304
+ description: 'Agent',
4305
+ placeholder: 'Select an agent',
4306
+ hint: options.agents.length
4307
+ ? undefined
4308
+ : 'There are no agentic members in this chat. Add an agent to continue.',
4309
+ value: defaultAgentId,
4310
+ selectOptions: agentOptions,
4311
+ labelKey: 'label',
4312
+ valueKey: 'value',
4313
+ validators: [(v) => (!v ? 'Please select an agent' : null)],
4314
+ });
4315
+ super({
4316
+ name: 'Story Repair',
4317
+ fields: [
4318
+ storyField,
4319
+ grammarAndFlowField,
4320
+ charactersField,
4321
+ artifactsField,
4322
+ locationsField,
4323
+ sanitizeImagesField,
4324
+ agentIdField,
4325
+ ],
4326
+ currentUser: options.currentUser,
4327
+ readonly: options.readonly,
4328
+ canCancel: options.canCancel,
4329
+ onCancel: options.onCancel,
4330
+ cancelButtonLabel: 'Cancel',
4331
+ submitButtonLabel: '🛠️ Repair Story',
4332
+ submittingButtonLabel: 'Repairing…',
4333
+ submittedLabel: 'submited the workflow',
4334
+ onSubmit: options.onSubmit,
4335
+ onFieldEdited: options.onFieldEdited,
4336
+ });
4337
+ this.lastSelectedStory = null;
4338
+ this.storyField = storyField;
4339
+ this.grammarAndFlowField = grammarAndFlowField;
4340
+ this.charactersField = charactersField;
4341
+ this.artifactsField = artifactsField;
4342
+ this.locationsField = locationsField;
4343
+ this.sanitizeImagesField = sanitizeImagesField;
4344
+ this.agentIdField = agentIdField;
4017
4345
  }
4018
- get agents() {
4019
- return (this.chat?.members || []).filter((m) => m.isAgent);
4346
+ get selectedStoryId() {
4347
+ return (this.storyField.value && this.storyField.value[0]) || '';
4020
4348
  }
4021
- get readonly() {
4022
- return !this.step?.isActive || !!this.workflow?.submitInProgress;
4349
+ get selectedStoryName() {
4350
+ const item = this.storyField.autocomplete.selectedSuggestions?.[0];
4351
+ if (item?.name) {
4352
+ return item.name;
4353
+ }
4354
+ return this.lastSelectedStory?.name || '';
4023
4355
  }
4024
- get canCancel() {
4025
- return !!this.workflow?.isDraft && !this.workflow?.submitInProgress && !!this.messenger;
4356
+ get currentOptions() {
4357
+ return {
4358
+ grammarAndFlow: !!this.grammarAndFlowField.value,
4359
+ characters: !!this.charactersField.value,
4360
+ artifacts: !!this.artifactsField.value,
4361
+ locations: !!this.locationsField.value,
4362
+ sanitizeImages: !!this.sanitizeImagesField.value,
4363
+ };
4026
4364
  }
4027
4365
  get hasAtLeastOneOption() {
4028
4366
  const opts = this.currentOptions;
@@ -4032,114 +4370,120 @@ class StoryRepairFormStepComponent {
4032
4370
  opts.locations ||
4033
4371
  opts.sanitizeImages);
4034
4372
  }
4035
- get currentOptions() {
4036
- return {
4037
- grammarAndFlow: !!this.form.get('grammarAndFlow')?.value,
4038
- characters: !!this.form.get('characters')?.value,
4039
- artifacts: !!this.form.get('artifacts')?.value,
4040
- locations: !!this.form.get('locations')?.value,
4041
- sanitizeImages: !!this.form.get('sanitizeImages')?.value,
4042
- };
4043
- }
4044
- ngOnInit() {
4045
- this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
4046
- const agents = this.agents;
4047
- if (agents.length === 1) {
4048
- this.form.get('agentId')?.setValue(agents[0].id);
4373
+ evaluateIsValid() {
4374
+ super.evaluateIsValid();
4375
+ if (!this.hasAtLeastOneOption) {
4376
+ this.isValid = false;
4049
4377
  }
4050
- this.syncWithStep();
4051
- }
4052
- ngOnDestroy() {
4053
- this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
4054
- this.clearSearchTimer();
4055
4378
  }
4056
- onStoryFocus() {
4057
- if (this.readonly) {
4058
- return;
4379
+ getFirstValidationError() {
4380
+ const fieldError = super.getFirstValidationError();
4381
+ if (fieldError) {
4382
+ return fieldError;
4059
4383
  }
4060
- this.suggestionsOpened = true;
4061
- if (!this.suggestions.length) {
4062
- this.scheduleSearch(0);
4384
+ if (!this.hasAtLeastOneOption) {
4385
+ return 'Please select at least one option to repair.';
4063
4386
  }
4387
+ return null;
4064
4388
  }
4065
- onStoryInput() {
4066
- if (this.selectedStory) {
4067
- this.selectedStory = null;
4068
- this.form.get('storyId')?.setValue('');
4389
+ updateAgents(agents) {
4390
+ this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
4391
+ this.agentIdField.hint = agents.length
4392
+ ? undefined
4393
+ : 'There are no agentic members in this chat. Add an agent to continue.';
4394
+ if (!this.agentIdField.value && agents.length === 1) {
4395
+ this.agentIdField.value = agents[0].id;
4069
4396
  }
4070
- this.suggestionsOpened = true;
4071
- this.scheduleSearch(SEARCH_DEBOUNCE_MS);
4072
4397
  }
4073
- onStoryKeydown(event) {
4074
- if (!this.suggestionsOpened || !this.suggestions.length) {
4075
- if (event.key === 'ArrowDown') {
4076
- this.suggestionsOpened = true;
4077
- this.scheduleSearch(0);
4078
- }
4079
- return;
4398
+ setStorySelection(story) {
4399
+ this.lastSelectedStory = story;
4400
+ if (story?.id) {
4401
+ this.storyField.value = [story.id];
4402
+ this.storyField.autocomplete.setSelectedItems([story]);
4080
4403
  }
4081
- switch (event.key) {
4082
- case 'ArrowDown':
4083
- event.preventDefault();
4084
- this.highlightedIndex = (this.highlightedIndex + 1) % this.suggestions.length;
4085
- break;
4086
- case 'ArrowUp':
4087
- event.preventDefault();
4088
- this.highlightedIndex =
4089
- (this.highlightedIndex - 1 + this.suggestions.length) % this.suggestions.length;
4090
- break;
4091
- case 'Enter':
4092
- event.preventDefault();
4093
- this.selectStory(this.suggestions[this.highlightedIndex]);
4094
- break;
4095
- case 'Escape':
4096
- event.preventDefault();
4097
- this.suggestionsOpened = false;
4098
- break;
4404
+ else {
4405
+ this.storyField.value = [];
4406
+ this.storyField.autocomplete.setSelectedItems([]);
4099
4407
  }
4100
4408
  }
4101
- selectStory(story) {
4102
- if (!story || this.readonly) {
4103
- return;
4104
- }
4105
- this.selectedStory = story;
4106
- this.form.patchValue({ storyId: story.id, storyQuery: story.name }, { emitEvent: false });
4107
- this.form.get('storyId')?.markAsTouched();
4108
- this.suggestionsOpened = false;
4409
+ getModel() {
4410
+ return {
4411
+ storyId: this.selectedStoryId,
4412
+ storyName: this.selectedStoryName || this.selectedStoryId,
4413
+ agentId: this.agentIdField.value || '',
4414
+ options: this.currentOptions,
4415
+ };
4109
4416
  }
4110
- clearStory() {
4111
- if (this.readonly) {
4112
- return;
4113
- }
4114
- this.selectedStory = null;
4115
- this.form.patchValue({ storyId: '', storyQuery: '' }, { emitEvent: false });
4116
- this.suggestionsOpened = true;
4117
- this.scheduleSearch(0);
4118
- setTimeout(() => this.storyInput?.nativeElement.focus());
4417
+ }
4418
+ /**
4419
+ * Story Repair step 1 (#RepairStory):
4420
+ * - Pick a story (autocomplete by name)
4421
+ * - Choose repair options via checkboxes (Grammar & Flow, Characters, Artifacts, Locations, Sanitize images), all checked by default
4422
+ * - Pick an agent
4423
+ */
4424
+ class StoryRepairFormStepComponent {
4425
+ constructor(cdr) {
4426
+ this.cdr = cdr;
4427
+ this.onChangedBound = () => this.onWorkflowChanged();
4428
+ this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
4119
4429
  }
4120
- onOptionChanged() {
4121
- this.optionsTouched = true;
4430
+ get agents() {
4431
+ return (this.chat?.members || []).filter((m) => m.isAgent);
4122
4432
  }
4123
- onDocumentMouseDown(event) {
4124
- if (this.suggestionsOpened && !this.host.nativeElement.contains(event.target)) {
4125
- this.suggestionsOpened = false;
4126
- }
4433
+ get readonly() {
4434
+ return !this.step?.isActive || !!this.workflow?.submitInProgress;
4127
4435
  }
4128
- submit() {
4129
- if (this.readonly) {
4130
- return;
4436
+ get canCancel() {
4437
+ return !!this.workflow?.isDraft && !this.workflow?.submitInProgress && !!this.messenger;
4438
+ }
4439
+ get currentUser() {
4440
+ const myPeer = this.messenger?.myPeer;
4441
+ if (myPeer) {
4442
+ return {
4443
+ id: myPeer.clientId,
4444
+ name: myPeer.name || 'User',
4445
+ imageUrl: myPeer.imageUrl,
4446
+ };
4131
4447
  }
4132
- this.optionsTouched = true;
4133
- if (this.form.invalid || !this.selectedStory || !this.hasAtLeastOneOption) {
4134
- this.form.markAllAsTouched();
4135
- return;
4448
+ const myId = this.chat?.clientId || this.messenger?.clientId;
4449
+ if (myId) {
4450
+ const member = this.chat?.getMemberById(myId);
4451
+ return {
4452
+ id: myId,
4453
+ name: member?.name || 'User',
4454
+ imageUrl: member?.imageUrl,
4455
+ };
4136
4456
  }
4137
- void this.workflow.submitStep({
4138
- storyId: this.selectedStory.id,
4139
- storyName: this.selectedStory.name,
4140
- agentId: this.form.get('agentId')?.value,
4141
- options: this.currentOptions,
4457
+ return null;
4458
+ }
4459
+ ngOnInit() {
4460
+ this.form = new StoryRepairWorkflowForm({
4461
+ agents: this.agents,
4462
+ searchStories: (query) => this.messenger?.ozzy ? this.messenger.ozzy.searchStories(query) : Promise.resolve([]),
4463
+ currentUser: this.currentUser,
4464
+ readonly: this.readonly,
4465
+ canCancel: this.canCancel,
4466
+ onCancel: () => this.cancel(),
4467
+ onSubmit: (model) => {
4468
+ if (this.readonly) {
4469
+ return;
4470
+ }
4471
+ void this.workflow.submitStep(model, this.form.getCollectiveState());
4472
+ },
4473
+ onFieldEdited: (change, state) => {
4474
+ if (!this.step || this.readonly) {
4475
+ return;
4476
+ }
4477
+ this.workflow?.updateStepForm(this.step.id, state, change.fieldName, change.lastEditedBy || undefined);
4478
+ },
4142
4479
  });
4480
+ this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
4481
+ this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
4482
+ this.syncWithStep();
4483
+ }
4484
+ ngOnDestroy() {
4485
+ this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
4486
+ this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
4143
4487
  }
4144
4488
  cancel() {
4145
4489
  if (!this.canCancel) {
@@ -4147,87 +4491,73 @@ class StoryRepairFormStepComponent {
4147
4491
  }
4148
4492
  this.messenger?.discardDraftWorkflow(this.workflow);
4149
4493
  }
4150
- isInvalid(name) {
4151
- const control = this.form.get(name);
4152
- return !!control && control.invalid && control.touched;
4153
- }
4154
- scheduleSearch(delay) {
4155
- this.clearSearchTimer();
4156
- this.searchTimer = setTimeout(() => void this.search(), delay);
4157
- }
4158
- clearSearchTimer() {
4159
- if (this.searchTimer) {
4160
- clearTimeout(this.searchTimer);
4161
- this.searchTimer = null;
4162
- }
4163
- }
4164
- async search() {
4165
- if (!this.messenger) {
4494
+ onRemoteStepFormUpdated(payload) {
4495
+ if (!this.form || !payload?.formState) {
4166
4496
  return;
4167
4497
  }
4168
- const requestId = ++this.searchRequestId;
4169
- const query = this.form.get('storyQuery')?.value || '';
4170
- this.searchInProgress = true;
4171
- this.searchError = null;
4172
- this.cdr.markForCheck();
4173
- try {
4174
- const stories = await this.messenger.ozzy.searchStories(query);
4175
- if (requestId !== this.searchRequestId) {
4176
- return;
4177
- }
4178
- this.suggestions = stories;
4179
- this.highlightedIndex = 0;
4180
- }
4181
- catch (e) {
4182
- if (requestId !== this.searchRequestId) {
4183
- return;
4184
- }
4185
- this.suggestions = [];
4186
- this.searchError = e?.friendlyMessage || e?.message || 'Failed to load stories.';
4187
- }
4188
- finally {
4189
- if (requestId === this.searchRequestId) {
4190
- this.searchInProgress = false;
4191
- this.cdr.detectChanges();
4192
- }
4193
- }
4498
+ this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
4499
+ this.cdr.detectChanges();
4500
+ void Promise.resolve().then(() => this.cdr.detectChanges());
4194
4501
  }
4195
4502
  onWorkflowChanged() {
4196
4503
  this.syncWithStep();
4197
4504
  this.cdr.detectChanges();
4505
+ void Promise.resolve().then(() => this.cdr.detectChanges());
4198
4506
  }
4199
4507
  syncWithStep() {
4508
+ if (!this.form) {
4509
+ return;
4510
+ }
4511
+ this.form.setCurrentUser(this.currentUser);
4512
+ this.form.updateAgents(this.agents);
4513
+ this.form.setReadonly(this.readonly);
4514
+ this.form.canCancel = this.canCancel;
4515
+ this.form.submitInProgress = !!this.workflow?.submitInProgress;
4516
+ if (this.workflow?.submitError) {
4517
+ this.form.submitError = this.workflow.submitError;
4518
+ }
4519
+ if (this.step?.formState) {
4520
+ this.form.applyCollectiveState(this.step.formState);
4521
+ }
4200
4522
  const output = this.step?.output;
4201
4523
  if (output?.storyId) {
4202
- this.selectedStory = { id: output.storyId, name: output.storyName || output.storyId };
4203
- this.form.patchValue({
4204
- storyId: output.storyId,
4205
- storyQuery: output.storyName || '',
4206
- grammarAndFlow: output.options ? !!output.options.grammarAndFlow : true,
4207
- characters: output.options ? !!output.options.characters : true,
4208
- artifacts: output.options ? !!output.options.artifacts : true,
4209
- locations: output.options ? !!output.options.locations : true,
4210
- sanitizeImages: output.options && output.options.sanitizeImages !== undefined
4524
+ this.form.setStorySelection({
4525
+ id: output.storyId,
4526
+ name: output.storyName || output.storyId,
4527
+ });
4528
+ this.form.grammarAndFlowField.value = output.options
4529
+ ? !!output.options.grammarAndFlow
4530
+ : true;
4531
+ this.form.charactersField.value = output.options ? !!output.options.characters : true;
4532
+ this.form.artifactsField.value = output.options ? !!output.options.artifacts : true;
4533
+ this.form.locationsField.value = output.options ? !!output.options.locations : true;
4534
+ this.form.sanitizeImagesField.value =
4535
+ output.options && output.options.sanitizeImages !== undefined
4211
4536
  ? !!output.options.sanitizeImages
4212
- : true,
4213
- agentId: output.agentId,
4214
- }, { emitEvent: false });
4215
- }
4216
- if (this.readonly) {
4217
- this.suggestionsOpened = false;
4218
- this.form.disable({ emitEvent: false });
4219
- }
4220
- else {
4221
- this.form.enable({ emitEvent: false });
4537
+ : true;
4538
+ this.form.agentIdField.value = output.agentId || '';
4539
+ }
4540
+ if (this.step?.submittedBy) {
4541
+ this.form.submittedBy = this.step.submittedBy;
4542
+ }
4543
+ else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
4544
+ const creator = this.chat?.getMemberById(this.workflow.creatorId);
4545
+ if (creator) {
4546
+ this.form.submittedBy = {
4547
+ id: creator.id,
4548
+ name: creator.name,
4549
+ imageUrl: creator.imageUrl,
4550
+ };
4551
+ }
4222
4552
  }
4223
4553
  }
4224
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryRepairFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
4225
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: StoryRepairFormStepComponent, isStandalone: true, selector: "rtsee-story-repair-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, host: { listeners: { "document:mousedown": "onDocumentMouseDown($event)" } }, viewQueries: [{ propertyName: "storyInput", first: true, predicate: ["storyInput"], descendants: true }], ngImport: i0, template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" autocomplete=\"off\">\n <div class=\"rts-storyteller-field\">\n <label class=\"rts-storyteller-label\" for=\"story-repair-story-{{ step.id }}\">Story</label>\n <div class=\"rts-st-autocomplete\">\n <span class=\"rts-st-autocomplete-icon pi\" [class.pi-search]=\"!searchInProgress\" [class.pi-spin]=\"searchInProgress\" [class.pi-spinner]=\"searchInProgress\"></span>\n <input #storyInput\n class=\"rts-storyteller-input rts-st-autocomplete-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('storyId')\"\n [class.rts-st-autocomplete-selected]=\"!!selectedStory\"\n formControlName=\"storyQuery\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"suggestionsOpened\"\n placeholder=\"Search stories by name\u2026\"\n id=\"story-repair-story-{{ step.id }}\"\n (focus)=\"onStoryFocus()\"\n (input)=\"onStoryInput()\"\n (keydown)=\"onStoryKeydown($event)\"\n />\n @if (selectedStory && !readonly) {\n <button type=\"button\"\n class=\"rts-st-autocomplete-clear pi pi-times\"\n aria-label=\"Clear story\"\n id=\"story-repair-clear-{{ step.id }}\"\n (click)=\"clearStory()\"\n ></button>\n }\n\n @if (suggestionsOpened && !readonly) {\n <ul class=\"rts-st-autocomplete-panel\" role=\"listbox\">\n @if (searchError) {\n <li class=\"rts-st-autocomplete-empty rts-st-autocomplete-error\">{{ searchError }}</li>\n } @else if (!suggestions.length && !searchInProgress) {\n <li class=\"rts-st-autocomplete-empty\">No stories found</li>\n }\n @for (story of suggestions; track story.id; let i = $index) {\n <li class=\"rts-st-autocomplete-option\"\n role=\"option\"\n [class.rts-st-autocomplete-option-active]=\"i === highlightedIndex\"\n [attr.aria-selected]=\"story.id === selectedStory?.id\"\n (mouseenter)=\"highlightedIndex = i\"\n (mousedown)=\"$event.preventDefault(); selectStory(story)\"\n >\n @if (story.imageUrl) {\n <img class=\"rts-st-autocomplete-thumb\" [src]=\"story.imageUrl\" [alt]=\"story.name\" loading=\"lazy\" />\n } @else {\n <span class=\"rts-st-autocomplete-thumb rts-st-autocomplete-thumb-empty\">\uD83D\uDCD6</span>\n }\n <span class=\"rts-st-autocomplete-option-body\">\n <span class=\"rts-st-autocomplete-option-name\">{{ story.name }}</span>\n @if (story.totalSlides) {\n <span class=\"rts-st-autocomplete-option-meta\">{{ story.totalSlides }} slides</span>\n }\n </span>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n @if (selectedStory) {\n <div class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Repair options</span>\n <div class=\"rts-st-repair-options-grid\">\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-grammar-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"grammarAndFlow\"\n id=\"story-repair-grammar-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Grammar &amp; Flow</span>\n <span class=\"rts-st-checkbox-desc\">Fix typos, punctuation &amp; improve readability across story, slides &amp; entities</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-characters-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"characters\"\n id=\"story-repair-characters-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Characters</span>\n <span class=\"rts-st-checkbox-desc\">Add missing important characters and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-artifacts-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"artifacts\"\n id=\"story-repair-artifacts-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Artifacts</span>\n <span class=\"rts-st-checkbox-desc\">Add missing memorable objects and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-locations-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"locations\"\n id=\"story-repair-locations-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Locations</span>\n <span class=\"rts-st-checkbox-desc\">Add missing story locations and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-sanitize-images-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"sanitizeImages\"\n id=\"story-repair-sanitize-images-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Sanitize images</span>\n <span class=\"rts-st-checkbox-desc\">Properly name &amp; upload story, slide, character, artifact, location &amp; author images to the public bucket for SEO</span>\n </span>\n </label>\n </div>\n @if (!hasAtLeastOneOption) {\n <div class=\"rts-storyteller-error\">Please select at least one option to repair.</div>\n }\n </div>\n }\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"story-repair-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions rts-st-translator-actions\">\n @if (canCancel) {\n <button class=\"rts-st-cancel\"\n type=\"button\"\n id=\"story-repair-cancel-{{ step.id }}\"\n (click)=\"cancel()\"\n >Cancel</button>\n }\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length || !selectedStory || !hasAtLeastOneOption\"\n id=\"story-repair-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Repairing\u2026\n } @else {\n \uD83D\uDEE0\uFE0F Repair Story\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n", ".rts-st-repair-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}@media (max-width: 480px){.rts-st-repair-options-grid{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
4554
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryRepairFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
4555
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: StoryRepairFormStepComponent, isStandalone: true, selector: "rtsee-story-repair-form-step", inputs: { step: "step", workflow: "workflow", chat: "chat", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n", ".rts-st-repair-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}@media (max-width: 480px){.rts-st-repair-options-grid{grid-template-columns:1fr}}\n"], dependencies: [{ kind: "component", type: FormComponent, selector: "rtsee-form", inputs: ["form"], outputs: ["formSubmit"] }] }); }
4226
4556
  }
4227
4557
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryRepairFormStepComponent, decorators: [{
4228
4558
  type: Component,
4229
- args: [{ selector: 'rtsee-story-repair-form-step', standalone: true, imports: [ReactiveFormsModule], template: "<form class=\"rts-storyteller-form\" [formGroup]=\"form\" (ngSubmit)=\"submit()\" autocomplete=\"off\">\n <div class=\"rts-storyteller-field\">\n <label class=\"rts-storyteller-label\" for=\"story-repair-story-{{ step.id }}\">Story</label>\n <div class=\"rts-st-autocomplete\">\n <span class=\"rts-st-autocomplete-icon pi\" [class.pi-search]=\"!searchInProgress\" [class.pi-spin]=\"searchInProgress\" [class.pi-spinner]=\"searchInProgress\"></span>\n <input #storyInput\n class=\"rts-storyteller-input rts-st-autocomplete-input\"\n [class.rts-storyteller-invalid]=\"isInvalid('storyId')\"\n [class.rts-st-autocomplete-selected]=\"!!selectedStory\"\n formControlName=\"storyQuery\"\n type=\"text\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n [attr.aria-expanded]=\"suggestionsOpened\"\n placeholder=\"Search stories by name\u2026\"\n id=\"story-repair-story-{{ step.id }}\"\n (focus)=\"onStoryFocus()\"\n (input)=\"onStoryInput()\"\n (keydown)=\"onStoryKeydown($event)\"\n />\n @if (selectedStory && !readonly) {\n <button type=\"button\"\n class=\"rts-st-autocomplete-clear pi pi-times\"\n aria-label=\"Clear story\"\n id=\"story-repair-clear-{{ step.id }}\"\n (click)=\"clearStory()\"\n ></button>\n }\n\n @if (suggestionsOpened && !readonly) {\n <ul class=\"rts-st-autocomplete-panel\" role=\"listbox\">\n @if (searchError) {\n <li class=\"rts-st-autocomplete-empty rts-st-autocomplete-error\">{{ searchError }}</li>\n } @else if (!suggestions.length && !searchInProgress) {\n <li class=\"rts-st-autocomplete-empty\">No stories found</li>\n }\n @for (story of suggestions; track story.id; let i = $index) {\n <li class=\"rts-st-autocomplete-option\"\n role=\"option\"\n [class.rts-st-autocomplete-option-active]=\"i === highlightedIndex\"\n [attr.aria-selected]=\"story.id === selectedStory?.id\"\n (mouseenter)=\"highlightedIndex = i\"\n (mousedown)=\"$event.preventDefault(); selectStory(story)\"\n >\n @if (story.imageUrl) {\n <img class=\"rts-st-autocomplete-thumb\" [src]=\"story.imageUrl\" [alt]=\"story.name\" loading=\"lazy\" />\n } @else {\n <span class=\"rts-st-autocomplete-thumb rts-st-autocomplete-thumb-empty\">\uD83D\uDCD6</span>\n }\n <span class=\"rts-st-autocomplete-option-body\">\n <span class=\"rts-st-autocomplete-option-name\">{{ story.name }}</span>\n @if (story.totalSlides) {\n <span class=\"rts-st-autocomplete-option-meta\">{{ story.totalSlides }} slides</span>\n }\n </span>\n </li>\n }\n </ul>\n }\n </div>\n </div>\n\n @if (selectedStory) {\n <div class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Repair options</span>\n <div class=\"rts-st-repair-options-grid\">\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-grammar-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"grammarAndFlow\"\n id=\"story-repair-grammar-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Grammar &amp; Flow</span>\n <span class=\"rts-st-checkbox-desc\">Fix typos, punctuation &amp; improve readability across story, slides &amp; entities</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-characters-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"characters\"\n id=\"story-repair-characters-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Characters</span>\n <span class=\"rts-st-checkbox-desc\">Add missing important characters and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-artifacts-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"artifacts\"\n id=\"story-repair-artifacts-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Artifacts</span>\n <span class=\"rts-st-checkbox-desc\">Add missing memorable objects and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-locations-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"locations\"\n id=\"story-repair-locations-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Locations</span>\n <span class=\"rts-st-checkbox-desc\">Add missing story locations and link them to slides</span>\n </span>\n </label>\n\n <label class=\"rts-st-checkbox-row\" for=\"story-repair-sanitize-images-{{ step.id }}\">\n <input type=\"checkbox\"\n class=\"rts-st-checkbox-input\"\n formControlName=\"sanitizeImages\"\n id=\"story-repair-sanitize-images-{{ step.id }}\"\n (change)=\"onOptionChanged()\"\n />\n <span class=\"rts-st-checkbox-body\">\n <span class=\"rts-st-checkbox-title\">Sanitize images</span>\n <span class=\"rts-st-checkbox-desc\">Properly name &amp; upload story, slide, character, artifact, location &amp; author images to the public bucket for SEO</span>\n </span>\n </label>\n </div>\n @if (!hasAtLeastOneOption) {\n <div class=\"rts-storyteller-error\">Please select at least one option to repair.</div>\n }\n </div>\n }\n\n <label class=\"rts-storyteller-field\">\n <span class=\"rts-storyteller-label\">Agent</span>\n @if (agents.length) {\n <div class=\"rts-storyteller-select-wrap\">\n <select class=\"rts-storyteller-input rts-storyteller-select\"\n [class.rts-storyteller-invalid]=\"isInvalid('agentId')\"\n formControlName=\"agentId\"\n id=\"story-repair-agent-{{ step.id }}\"\n >\n <option value=\"\" disabled>Select an agent</option>\n @for (agent of agents; track agent.id) {\n <option [value]=\"agent.id\">\n {{ agent.name }}{{ agent.agentConfiguration?.model?.model ? ' \u00B7 ' + agent.agentConfiguration?.model?.model : '' }}\n </option>\n }\n </select>\n <span class=\"rts-storyteller-select-caret pi pi-chevron-down\"></span>\n </div>\n } @else {\n <div class=\"rts-storyteller-hint\">There are no agentic members in this chat. Add an agent to continue.</div>\n }\n </label>\n\n @if (workflow.submitError) {\n <div class=\"rts-storyteller-error\">{{ workflow.submitError }}</div>\n }\n\n @if (step.isActive) {\n <div class=\"rts-storyteller-actions rts-st-translator-actions\">\n @if (canCancel) {\n <button class=\"rts-st-cancel\"\n type=\"button\"\n id=\"story-repair-cancel-{{ step.id }}\"\n (click)=\"cancel()\"\n >Cancel</button>\n }\n <button class=\"rts-storyteller-submit\"\n type=\"submit\"\n [disabled]=\"workflow.submitInProgress || !agents.length || !selectedStory || !hasAtLeastOneOption\"\n id=\"story-repair-submit-{{ step.id }}\"\n >\n @if (workflow.submitInProgress) {\n <span class=\"rts-storyteller-spinner\"></span> Repairing\u2026\n } @else {\n \uD83D\uDEE0\uFE0F Repair Story\n }\n </button>\n </div>\n }\n</form>\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n", ".rts-st-repair-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}@media (max-width: 480px){.rts-st-repair-options-grid{grid-template-columns:1fr}}\n"] }]
4230
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }], propDecorators: { step: [{
4559
+ args: [{ selector: 'rtsee-story-repair-form-step', standalone: true, imports: [FormComponent], template: "<div class=\"rts-storyteller-form\">\n <rtsee-form [form]=\"form\"></rtsee-form>\n</div>\n\n", styles: [":host{display:block;--rts-st-accent: #8b5cf6;--rts-st-accent-2: #6366f1}.rts-storyteller-form{display:flex;flex-direction:column;gap:12px}.rts-storyteller-field{display:flex;flex-direction:column;gap:5px}.rts-storyteller-label{display:flex;justify-content:space-between;align-items:baseline;font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-counter{font-weight:500;letter-spacing:0;text-transform:none}.rts-storyteller-input{width:100%;box-sizing:border-box;padding:9px 12px;border-radius:9px;border:1px solid rgba(139,92,246,.25);background:#0f101cc7;color:var(--rts-text-primary, #f3f4f6);font:inherit;font-size:13px;outline:none;transition:border-color .15s ease,box-shadow .15s ease,background .15s ease}.rts-storyteller-input::placeholder{color:var(--rts-text-muted, #6a6a7a)}.rts-storyteller-input:focus{border-color:var(--rts-st-accent);background:#141524eb;box-shadow:0 0 0 3px #8b5cf638}.rts-storyteller-input:disabled{opacity:.75;cursor:default}.rts-storyteller-input.rts-storyteller-invalid{border-color:#f43f5e;box-shadow:0 0 0 3px #f43f5e1f}.rts-storyteller-textarea{min-height:80px;resize:vertical;line-height:1.5}.rts-storyteller-textarea-lg{min-height:160px;max-height:480px}.rts-storyteller-select-wrap{position:relative}.rts-storyteller-select{appearance:none;padding-right:32px;cursor:pointer}.rts-storyteller-select option{background:#181926;color:#f3f4f6}.rts-storyteller-select-caret{position:absolute;right:12px;top:50%;transform:translateY(-50%);font-size:10px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-hint{font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-storyteller-error{padding:6px 10px;border-radius:6px;font-size:12px;color:#f43f5e;background:#f43f5e14;border:1px solid rgba(244,63,94,.25)}.rts-storyteller-actions{display:flex;justify-content:flex-end}.rts-storyteller-submit{display:inline-flex;align-items:center;gap:6px;padding:8px 18px;border:none;border-radius:9px;color:#fff;font-weight:600;font-size:13px;cursor:pointer;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent) 60%,#a78bfa);background-size:160% 160%;box-shadow:0 4px 14px -4px #6366f199;transition:transform .15s ease,box-shadow .15s ease,background-position .4s ease}.rts-storyteller-submit:hover:not(:disabled){transform:translateY(-1px);background-position:100% 0;box-shadow:0 6px 18px -4px #6366f1bf}.rts-storyteller-submit:disabled{opacity:.6;cursor:default;box-shadow:none}.rts-storyteller-spinner{width:11px;height:11px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:rts-st-spin .8s linear infinite}.rts-story-link-card{display:flex;align-items:center;gap:12px;padding:14px;border-radius:12px;text-decoration:none;color:inherit;background:linear-gradient(135deg,#6366f11a,#8b5cf60f);border:1px solid rgba(139,92,246,.3);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;animation:rts-st-pop .4s cubic-bezier(.2,.9,.3,1.3)}.rts-story-link-card:hover{transform:translateY(-2px);border-color:var(--rts-st-accent);box-shadow:0 10px 28px -12px #8b5cf699}.rts-story-link-card:hover .rts-story-link-arrow{transform:translate(3px)}.rts-story-link-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:42px;height:42px;border-radius:12px;font-size:20px;background:linear-gradient(135deg,var(--rts-st-accent-2),var(--rts-st-accent))}.rts-story-link-body{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}.rts-story-link-kicker{font-size:10px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--rts-st-accent)}.rts-story-link-title{font-size:15px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-story-link-description{font-size:12px;color:var(--rts-text-secondary, #8a8fa3);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.rts-story-link-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-story-link-arrow{color:var(--rts-st-accent);transition:transform .2s ease}@keyframes rts-st-spin{to{transform:rotate(360deg)}}@keyframes rts-st-pop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:none}}\n", ".rts-st-autocomplete{position:relative}.rts-st-autocomplete-icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-size:12px;pointer-events:none;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-input{padding-left:32px;padding-right:32px}.rts-st-autocomplete-input.rts-st-autocomplete-selected{font-weight:600}.rts-st-autocomplete-clear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:22px;height:22px;padding:0;border:none;border-radius:50%;font-size:10px;cursor:pointer;color:var(--rts-text-secondary, #8a8fa3);background:transparent;transition:background .15s ease,color .15s ease}.rts-st-autocomplete-clear:hover{color:var(--rts-text-primary);background:#8b5cf626}.rts-st-autocomplete-panel{position:absolute;z-index:20;left:0;right:0;top:calc(100% + 4px);max-height:240px;margin:0;padding:4px;overflow-y:auto;list-style:none;border-radius:10px;border:1px solid rgba(139,92,246,.28);background:linear-gradient(145deg,#1f2132,#161826);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);box-shadow:0 14px 32px -12px #0000008c;animation:rts-st-panel-in .14s ease-out}.rts-st-autocomplete-option{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:7px;cursor:pointer;transition:background .12s ease}.rts-st-autocomplete-option.rts-st-autocomplete-option-active{background:linear-gradient(135deg,#6366f129,#8b5cf61a)}.rts-st-autocomplete-option[aria-selected=true] .rts-st-autocomplete-option-name{color:var(--rts-st-accent)}.rts-st-autocomplete-thumb{flex-shrink:0;width:30px;height:30px;border-radius:7px;object-fit:cover}.rts-st-autocomplete-thumb-empty{display:flex;align-items:center;justify-content:center;font-size:15px;background:#8b5cf624}.rts-st-autocomplete-option-body{display:flex;flex-direction:column;min-width:0}.rts-st-autocomplete-option-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:13px;font-weight:500;color:var(--rts-text-primary, #f3f4f6)}.rts-st-autocomplete-option-meta{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-empty{padding:8px;font-size:12px;font-style:italic;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-autocomplete-error{font-style:normal;color:#f43f5e}.rts-st-translator-actions{gap:8px}.rts-st-checkbox-row{display:flex;align-items:flex-start;gap:10px;padding:9px 11px;border-radius:9px;border:1px solid rgba(139,92,246,.22);background:#0f101ca6;cursor:pointer;-webkit-user-select:none;user-select:none;transition:border-color .15s ease,background .15s ease}.rts-st-checkbox-row:hover{border-color:#8b5cf673;background:#8b5cf61a}.rts-st-checkbox-input{margin-top:2px;width:15px;height:15px;flex-shrink:0;accent-color:var(--rts-st-accent, #8b5cf6);cursor:pointer}.rts-st-checkbox-body{display:flex;flex-direction:column;gap:2px;min-width:0}.rts-st-checkbox-title{font-size:13px;font-weight:600;color:var(--rts-text-primary, #f3f4f6)}.rts-st-checkbox-desc{font-size:11px;color:var(--rts-text-secondary, #8a8fa3)}.rts-st-cancel{padding:8px 16px;border-radius:9px;border:1px solid var(--rts-border-dim, rgba(120, 120, 160, .25));background:transparent;color:var(--rts-text-secondary, #8a8fa3);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.rts-st-cancel:hover{color:var(--rts-text-primary);border-color:#f43f5e73;background:#f43f5e0f}@keyframes rts-st-panel-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}\n", ".rts-st-repair-options-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}@media (max-width: 480px){.rts-st-repair-options-grid{grid-template-columns:1fr}}\n"] }]
4560
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
4231
4561
  type: Input
4232
4562
  }], workflow: [{
4233
4563
  type: Input
@@ -4235,12 +4565,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
4235
4565
  type: Input
4236
4566
  }], messenger: [{
4237
4567
  type: Input
4238
- }], storyInput: [{
4239
- type: ViewChild,
4240
- args: ['storyInput']
4241
- }], onDocumentMouseDown: [{
4242
- type: HostListener,
4243
- args: ['document:mousedown', ['$event']]
4244
4568
  }] } });
4245
4569
 
4246
4570
  /**
@@ -6275,6 +6599,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
6275
6599
  args: [{ selector: 'rtsee-request-demo-clicked-widget', standalone: true, imports: [CommonModule], template: "<div class=\"rtsee-event-widget request-demo-clicked-widget\">\n <div class=\"widget-header\">\n <div class=\"widget-badge demo-badge\">\n <span class=\"material-icons-outlined widget-badge-icon\">campaign</span>\n <span class=\"widget-badge-label\">Demo Requested</span>\n </div>\n <div\n class=\"widget-timer\"\n [class.live]=\"isLive\"\n [title]=\"isLive ? 'Currently active' : 'Time spent before next event'\"\n >\n <span class=\"material-icons-outlined widget-timer-icon\">timer</span>\n <span class=\"widget-timer-text\">{{ durationText }}</span>\n </div>\n </div>\n\n <div class=\"widget-body\">\n <div class=\"widget-media\">\n <div class=\"widget-thumbnail-placeholder demo-placeholder\">\n <span class=\"material-icons-outlined\">event_available</span>\n </div>\n </div>\n\n <div class=\"widget-info\">\n <span class=\"widget-title\" [title]=\"title\">{{ title }}</span>\n <span class=\"widget-subtitle\">Opened demo request modal</span>\n </div>\n </div>\n</div>\n" }]
6276
6600
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
6277
6601
 
6602
+ class TestChatNowClickedWidgetComponent extends BaseEventWidgetComponent {
6603
+ constructor(cd) {
6604
+ super(cd);
6605
+ }
6606
+ get title() {
6607
+ return this.event?.payload?.text || 'Test Chat Now';
6608
+ }
6609
+ get inviteUrl() {
6610
+ return (this.event?.payload?.data?.inviteUrl ||
6611
+ this.event?.payload?.url ||
6612
+ null);
6613
+ }
6614
+ get chatName() {
6615
+ return this.event?.payload?.data?.chatName || null;
6616
+ }
6617
+ onTestChatButtonClick(event) {
6618
+ event.stopPropagation();
6619
+ if (this.inviteUrl && typeof window !== 'undefined') {
6620
+ window.open(this.inviteUrl, '_blank', 'noopener,noreferrer');
6621
+ }
6622
+ }
6623
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TestChatNowClickedWidgetComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
6624
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: TestChatNowClickedWidgetComponent, isStandalone: true, selector: "rtsee-test-chat-now-clicked-widget", usesInheritance: true, ngImport: i0, template: "<div class=\"rtsee-event-widget test-chat-now-clicked-widget\">\n <div class=\"widget-header\">\n <div class=\"widget-badge test-chat-badge\">\n <span class=\"material-icons-outlined widget-badge-icon\">forum</span>\n <span class=\"widget-badge-label\">Test Chat Now</span>\n </div>\n <div\n class=\"widget-timer\"\n [class.live]=\"isLive\"\n [title]=\"isLive ? 'Currently active' : 'Time spent before next event'\"\n >\n <span class=\"material-icons-outlined widget-timer-icon\">timer</span>\n <span class=\"widget-timer-text\">{{ durationText }}</span>\n </div>\n </div>\n\n <div class=\"widget-body\">\n <div class=\"widget-media\">\n <div class=\"widget-thumbnail-placeholder test-chat-placeholder\">\n <span class=\"material-icons-outlined\">chat_bubble_outline</span>\n </div>\n </div>\n\n <div class=\"widget-info\">\n <span class=\"widget-title\" [title]=\"title\">{{ title }}</span>\n <span class=\"widget-subtitle\">\n {{ chatName ? 'Testing in ' + chatName : 'Opened new tab to test live chat' }}\n </span>\n <div class=\"widget-actions\">\n <button\n type=\"button\"\n class=\"widget-test-chat-btn\"\n (click)=\"onTestChatButtonClick($event)\"\n >\n <span class=\"material-icons-outlined widget-test-chat-btn-icon\">open_in_new</span>\n <span>Test it now</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
6625
+ }
6626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: TestChatNowClickedWidgetComponent, decorators: [{
6627
+ type: Component,
6628
+ args: [{ selector: 'rtsee-test-chat-now-clicked-widget', standalone: true, imports: [CommonModule], template: "<div class=\"rtsee-event-widget test-chat-now-clicked-widget\">\n <div class=\"widget-header\">\n <div class=\"widget-badge test-chat-badge\">\n <span class=\"material-icons-outlined widget-badge-icon\">forum</span>\n <span class=\"widget-badge-label\">Test Chat Now</span>\n </div>\n <div\n class=\"widget-timer\"\n [class.live]=\"isLive\"\n [title]=\"isLive ? 'Currently active' : 'Time spent before next event'\"\n >\n <span class=\"material-icons-outlined widget-timer-icon\">timer</span>\n <span class=\"widget-timer-text\">{{ durationText }}</span>\n </div>\n </div>\n\n <div class=\"widget-body\">\n <div class=\"widget-media\">\n <div class=\"widget-thumbnail-placeholder test-chat-placeholder\">\n <span class=\"material-icons-outlined\">chat_bubble_outline</span>\n </div>\n </div>\n\n <div class=\"widget-info\">\n <span class=\"widget-title\" [title]=\"title\">{{ title }}</span>\n <span class=\"widget-subtitle\">\n {{ chatName ? 'Testing in ' + chatName : 'Opened new tab to test live chat' }}\n </span>\n <div class=\"widget-actions\">\n <button\n type=\"button\"\n class=\"widget-test-chat-btn\"\n (click)=\"onTestChatButtonClick($event)\"\n >\n <span class=\"material-icons-outlined widget-test-chat-btn-icon\">open_in_new</span>\n <span>Test it now</span>\n </button>\n </div>\n </div>\n </div>\n</div>\n" }]
6629
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }] });
6630
+
6278
6631
  class EventsWidgetsService {
6279
6632
  constructor() {
6280
6633
  this.widgetsMap = [
@@ -6330,6 +6683,14 @@ class EventsWidgetsService {
6330
6683
  name: 'request-demo-clicked',
6331
6684
  component: RequestDemoClickedWidgetComponent,
6332
6685
  },
6686
+ {
6687
+ name: 'test-chat-now-clicked',
6688
+ component: TestChatNowClickedWidgetComponent,
6689
+ },
6690
+ {
6691
+ name: 'Test Chat Now',
6692
+ component: TestChatNowClickedWidgetComponent,
6693
+ },
6333
6694
  ];
6334
6695
  }
6335
6696
  getWidgetComponentByName(name) {
@@ -6548,19 +6909,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
6548
6909
  }] } });
6549
6910
 
6550
6911
  class RtseeEventsDashboardComponent {
6912
+ constructor() {
6913
+ this.framed = false;
6914
+ this.isFramed = false;
6915
+ }
6551
6916
  loadMore() {
6552
6917
  if (this.eventsDashboard) {
6553
6918
  this.eventsDashboard.loadMoreClients();
6554
6919
  }
6555
6920
  }
6556
6921
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeEventsDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6557
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeEventsDashboardComponent, isStandalone: true, selector: "rtsee-events-dashboard", inputs: { eventsDashboard: "eventsDashboard" }, ngImport: i0, template: "<div class=\"rtsee-events-dashboard\">\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: RtseeEventsDashboardClientThumbnailComponent, selector: "ngx-rtsee-events-dashboard-client-thumbnail", inputs: ["dashboard", "client"] }] }); }
6922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeEventsDashboardComponent, isStandalone: true, selector: "rtsee-events-dashboard", inputs: { eventsDashboard: "eventsDashboard", framed: "framed", isFramed: "isFramed" }, ngImport: i0, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RtseeEventsDashboardClientThumbnailComponent, selector: "ngx-rtsee-events-dashboard-client-thumbnail", inputs: ["dashboard", "client"] }] }); }
6558
6923
  }
6559
6924
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeEventsDashboardComponent, decorators: [{
6560
6925
  type: Component,
6561
- args: [{ selector: 'rtsee-events-dashboard', imports: [RtseeEventsDashboardClientThumbnailComponent], standalone: true, template: "<div class=\"rtsee-events-dashboard\">\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n</div>\n" }]
6926
+ args: [{ selector: 'rtsee-events-dashboard', imports: [NgClass, RtseeEventsDashboardClientThumbnailComponent], standalone: true, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n</div>\n" }]
6562
6927
  }], propDecorators: { eventsDashboard: [{
6563
6928
  type: Input
6929
+ }], framed: [{
6930
+ type: Input
6931
+ }], isFramed: [{
6932
+ type: Input
6564
6933
  }] } });
6565
6934
 
6566
6935
  class JoinCallComponent {
@@ -6738,7 +7107,12 @@ class StoryPlayerComponent {
6738
7107
  renderExternalUpdate: false,
6739
7108
  },
6740
7109
  });
6741
- this.story.initSwiper(this.swiper, { virtual: true });
7110
+ this.story.initSwiper(this.swiper, {
7111
+ virtual: true,
7112
+ onSlideChange: () => {
7113
+ this.cdr.detectChanges();
7114
+ },
7115
+ });
6742
7116
  }
6743
7117
  /** grows the virtual slides list when the slides count becomes known / changes */
6744
7118
  ngDoCheck() {
@@ -7715,7 +8089,7 @@ class ManageTopicComponent {
7715
8089
  return this.topicForm.get('key');
7716
8090
  }
7717
8091
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ManageTopicComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
7718
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ManageTopicComponent, isStandalone: true, selector: "rtsee-manage-topic", inputs: { manageTopic: "manageTopic" }, ngImport: i0, template: "<div class=\"rtsee-manage-story-topic\">\n <div class=\"rtsee-manage-story-topic-info rtsee-form-container\">\n <form class=\"rtsee-story-topic-form rtsee-form\"\n [formGroup]=\"topicForm\" (ngSubmit)=\"submit()\">\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-topic-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"rtsee-story-topic-name-field\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-topic-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-topic-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-topic-key-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"keyField\"\n [class.p-invalid]=\"keyField.invalid && keyField.touched\"\n />\n <label for=\"rtsee-story-topic-key-field\">Key</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (keyField.hasError('required') && keyField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Key is required, pick a smile, dummy</p-message>\n }\n </div>\n <rtsee-autocomplete [config]=\"manageTopic.categoriesMultiselect\"></rtsee-autocomplete>\n <div class=\"rtsee-manage-story-topic-categories-list rtsee-ordered-list\">\n <p-orderList [value]=\"manageTopic.topic.categories\"\n dataKey=\"id\"\n [dragdrop]=\"true\"\n [responsive]=\"true\"\n scrollHeight=\"40rem\"\n controlsPosition=\"right\"\n (onReorder)=\"manageTopic.onReorder($event)\"\n >\n <ng-template let-option let-selected=\"selected\" #item>\n <p>{{option.name}}</p>\n <p-button label=\"Delete\" (click)=\"manageTopic.removeCategory(option.id)\"></p-button>\n </ng-template>\n </p-orderList>\n </div>\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageTopic.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"manageTopic.cancel()\"\n [disabled]=\"manageTopic.saveInProgress\"\n />\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }, { kind: "component", type: OrderList, selector: "p-orderList, p-orderlist, p-order-list", inputs: ["header", "styleClass", "tabindex", "ariaLabel", "ariaLabelledBy", "listStyle", "responsive", "filterBy", "filterPlaceholder", "filterLocale", "metaKeySelection", "dragdrop", "controlsPosition", "ariaFilterLabel", "filterMatchMode", "breakpoint", "stripedRows", "disabled", "trackBy", "scrollHeight", "autoOptionFocus", "dataKey", "selection", "value", "buttonProps", "moveUpButtonProps", "moveTopButtonProps", "moveDownButtonProps", "moveBottomButtonProps"], outputs: ["selectionChange", "onReorder", "onSelectionChange", "onFilterEvent", "onFocus", "onBlur"] }] }); }
8092
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ManageTopicComponent, isStandalone: true, selector: "rtsee-manage-topic", inputs: { manageTopic: "manageTopic" }, ngImport: i0, template: "<div class=\"rtsee-manage-story-topic\">\n <div class=\"rtsee-manage-story-topic-info rtsee-form-container\">\n <form class=\"rtsee-story-topic-form rtsee-form\"\n [formGroup]=\"topicForm\" (ngSubmit)=\"submit()\">\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-topic-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"rtsee-story-topic-name-field\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-topic-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-topic-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-topic-key-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"keyField\"\n [class.p-invalid]=\"keyField.invalid && keyField.touched\"\n />\n <label for=\"rtsee-story-topic-key-field\">Key</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (keyField.hasError('required') && keyField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Key is required, pick a smile, dummy</p-message>\n }\n </div>\n <rtsee-autocomplete [config]=\"manageTopic.categoriesMultiselect\"></rtsee-autocomplete>\n <div class=\"rtsee-manage-story-topic-categories-list rtsee-ordered-list\">\n <p-orderList [value]=\"manageTopic.topic.categories\"\n dataKey=\"id\"\n [dragdrop]=\"true\"\n [responsive]=\"true\"\n scrollHeight=\"40rem\"\n controlsPosition=\"right\"\n (onReorder)=\"manageTopic.onReorder($event)\"\n >\n <ng-template let-option let-selected=\"selected\" #item>\n <p>{{option.name}}</p>\n <p-button label=\"Delete\" (click)=\"manageTopic.removeCategory(option.id)\"></p-button>\n </ng-template>\n </p-orderList>\n </div>\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageTopic.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"manageTopic.cancel()\"\n [disabled]=\"manageTopic.saveInProgress\"\n />\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config", "disabled"] }, { kind: "component", type: OrderList, selector: "p-orderList, p-orderlist, p-order-list", inputs: ["header", "styleClass", "tabindex", "ariaLabel", "ariaLabelledBy", "listStyle", "responsive", "filterBy", "filterPlaceholder", "filterLocale", "metaKeySelection", "dragdrop", "controlsPosition", "ariaFilterLabel", "filterMatchMode", "breakpoint", "stripedRows", "disabled", "trackBy", "scrollHeight", "autoOptionFocus", "dataKey", "selection", "value", "buttonProps", "moveUpButtonProps", "moveTopButtonProps", "moveDownButtonProps", "moveBottomButtonProps"], outputs: ["selectionChange", "onReorder", "onSelectionChange", "onFilterEvent", "onFocus", "onBlur"] }] }); }
7719
8093
  }
7720
8094
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ManageTopicComponent, decorators: [{
7721
8095
  type: Component,
@@ -8287,6 +8661,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
8287
8661
 
8288
8662
  class PresentationComponent {
8289
8663
  constructor() {
8664
+ this.framed = false;
8665
+ this.isFramed = false;
8290
8666
  this.RTSeeTextLabelKeys = RTSeeTextLabelKeys;
8291
8667
  }
8292
8668
  onStoryThumbnailClicked(story) {
@@ -8295,29 +8671,34 @@ class PresentationComponent {
8295
8671
  }
8296
8672
  }
8297
8673
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PresentationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8298
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PresentationComponent, isStandalone: true, selector: "rtsee-presentation", inputs: { presentation: "presentation", messenger: "messenger" }, ngImport: i0, template: "<div class=\"rtsee-presentation\">\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if (presentation.activeSessionsStories.length) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{presentation.labels[RTSeeTextLabelKeys.CONTINUE_SESSIONS_LABEL]}}</h2>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of presentation.activeSessionsStories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n\n @for (category of presentation.categories; track category.id) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{ category.name }}</h2>\n <span class=\"rtsee-presentation-category-description\">{{ category.description }}</span>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory && !presentation.isDashboardOpen) {\n <div class=\"rtsee-presentation-story-viewer-container\"\n [class.rtsee-presentation-story-viewer-container-dark]=\"presentation.settings.isDarkReadingTheme\"\n >\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails && !presentation.isDashboardOpen) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n", dependencies: [{ kind: "component", type: PresentationHeaderComponent, selector: "rtsee-presentation-header", inputs: ["presentation"] }, { kind: "component", type: StoryThumbnailComponent, selector: "rtsee-story-thumbnail", inputs: ["story", "presentation"] }, { kind: "component", type: StoryPlayerComponent, selector: "rtsee-story-player", inputs: ["story", "settings", "presentation"] }, { kind: "component", type: PreloaderComponent, selector: "rtsee-preloader", inputs: ["diameter", "color"] }, { kind: "component", type: PresentationsDashboardComponent, selector: "rtsee-presentations-dashboard", inputs: ["dashboard"] }, { kind: "component", type: PresentationSettingsComponent, selector: "rtsee-presentation-settings", inputs: ["settings", "presentation"] }, { kind: "component", type: StoryDetailsComponent, selector: "rtsee-story-details", inputs: ["story", "presentation", "messenger"] }] }); }
8674
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PresentationComponent, isStandalone: true, selector: "rtsee-presentation", inputs: { presentation: "presentation", messenger: "messenger", framed: "framed", isFramed: "isFramed" }, ngImport: i0, template: "<div class=\"rtsee-presentation\"\n [ngClass]=\"{\n 'rts-messenger-framed': framed || isFramed,\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rtsee-presentation-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if (presentation.activeSessionsStories.length) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{presentation.labels[RTSeeTextLabelKeys.CONTINUE_SESSIONS_LABEL]}}</h2>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of presentation.activeSessionsStories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n\n @for (category of presentation.categories; track category.id) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{ category.name }}</h2>\n <span class=\"rtsee-presentation-category-description\">{{ category.description }}</span>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory && !presentation.isDashboardOpen) {\n <div class=\"rtsee-presentation-story-viewer-container\"\n [class.rtsee-presentation-story-viewer-container-dark]=\"presentation.settings.isDarkReadingTheme\"\n >\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails && !presentation.isDashboardOpen) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PresentationHeaderComponent, selector: "rtsee-presentation-header", inputs: ["presentation"] }, { kind: "component", type: StoryThumbnailComponent, selector: "rtsee-story-thumbnail", inputs: ["story", "presentation"] }, { kind: "component", type: StoryPlayerComponent, selector: "rtsee-story-player", inputs: ["story", "settings", "presentation"] }, { kind: "component", type: PreloaderComponent, selector: "rtsee-preloader", inputs: ["diameter", "color"] }, { kind: "component", type: PresentationsDashboardComponent, selector: "rtsee-presentations-dashboard", inputs: ["dashboard"] }, { kind: "component", type: PresentationSettingsComponent, selector: "rtsee-presentation-settings", inputs: ["settings", "presentation"] }, { kind: "component", type: StoryDetailsComponent, selector: "rtsee-story-details", inputs: ["story", "presentation", "messenger"] }] }); }
8299
8675
  }
8300
8676
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PresentationComponent, decorators: [{
8301
8677
  type: Component,
8302
8678
  args: [{ selector: 'rtsee-presentation', imports: [
8679
+ NgClass,
8303
8680
  PresentationHeaderComponent,
8304
8681
  StoryThumbnailComponent,
8305
8682
  StoryPlayerComponent,
8306
8683
  PreloaderComponent,
8307
- PreloaderComponent,
8308
8684
  PresentationsDashboardComponent,
8309
8685
  PresentationSettingsComponent,
8310
8686
  StoryDetailsComponent,
8311
- ], standalone: true, template: "<div class=\"rtsee-presentation\">\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if (presentation.activeSessionsStories.length) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{presentation.labels[RTSeeTextLabelKeys.CONTINUE_SESSIONS_LABEL]}}</h2>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of presentation.activeSessionsStories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n\n @for (category of presentation.categories; track category.id) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{ category.name }}</h2>\n <span class=\"rtsee-presentation-category-description\">{{ category.description }}</span>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory && !presentation.isDashboardOpen) {\n <div class=\"rtsee-presentation-story-viewer-container\"\n [class.rtsee-presentation-story-viewer-container-dark]=\"presentation.settings.isDarkReadingTheme\"\n >\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails && !presentation.isDashboardOpen) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n" }]
8687
+ ], standalone: true, template: "<div class=\"rtsee-presentation\"\n [ngClass]=\"{\n 'rts-messenger-framed': framed || isFramed,\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rtsee-presentation-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-presentation-header-block\">\n <rtsee-presentation-header [presentation]=\"presentation\"\n ></rtsee-presentation-header>\n </div>\n\n @if (presentation.storyLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if(presentation.isDashboardOpen && presentation.dashboard) {\n <rtsee-presentations-dashboard [dashboard]=\"presentation.dashboard\"\n ></rtsee-presentations-dashboard>\n }\n\n @if (presentation.settings.isExpanded) {\n <rtsee-presentation-settings [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-presentation-settings>\n }\n\n @if (presentation.isCategoriesListVisible && !presentation.storyLoadInProgress) {\n <div class=\"rtsee-presentation-categories-list\">\n @if (presentation.categoriesLoadInProgress) {\n <rtsee-preloader [diameter]=\"15\"></rtsee-preloader>\n }\n\n @if (presentation.activeSessionsStories.length) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{presentation.labels[RTSeeTextLabelKeys.CONTINUE_SESSIONS_LABEL]}}</h2>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of presentation.activeSessionsStories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n\n @for (category of presentation.categories; track category.id) {\n <div class=\"rtsee-presentation-category-header\">\n <h2 class=\"rtsee-presentation-category-name\">{{ category.name }}</h2>\n <span class=\"rtsee-presentation-category-description\">{{ category.description }}</span>\n </div>\n <div class=\"rtsee-presentation-stories-list\">\n @for (story of category.stories; track story.id) {\n <div class=\"rtsee-presentation-story-thumbnail-container\"\n (click)=\"onStoryThumbnailClicked(story)\"\n >\n <rtsee-story-thumbnail\n [story]=\"story\"\n [presentation]=\"presentation\"\n ></rtsee-story-thumbnail>\n </div>\n }\n </div>\n }\n </div>\n }\n\n @if (presentation.activeStory && !presentation.isDashboardOpen) {\n <div class=\"rtsee-presentation-story-viewer-container\"\n [class.rtsee-presentation-story-viewer-container-dark]=\"presentation.settings.isDarkReadingTheme\"\n >\n <rtsee-story-player [story]=\"presentation.activeStory\"\n [settings]=\"presentation.settings\"\n [presentation]=\"presentation\"\n ></rtsee-story-player>\n </div>\n } @else if (presentation.openedStoryDetails && !presentation.isDashboardOpen) {\n <rtsee-story-details [story]=\"presentation.openedStoryDetails\"\n [presentation]=\"presentation\"\n [messenger]=\"messenger\"\n ></rtsee-story-details>\n }\n</div>\n" }]
8312
8688
  }], ctorParameters: () => [], propDecorators: { presentation: [{
8313
8689
  type: Input
8314
8690
  }], messenger: [{
8315
8691
  type: Input
8692
+ }], framed: [{
8693
+ type: Input
8694
+ }], isFramed: [{
8695
+ type: Input
8316
8696
  }] } });
8317
8697
 
8318
8698
  class RtseeNavComponent {
8319
8699
  constructor(authService) {
8320
8700
  this.authService = authService;
8701
+ this.RTSeeRoutesList = RTSeeRoutesList;
8321
8702
  this.profileLink = '';
8322
8703
  this.queryParams = {};
8323
8704
  }
@@ -8356,7 +8737,7 @@ class RtseeNavComponent {
8356
8737
  return false;
8357
8738
  }
8358
8739
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeNavComponent, deps: [{ token: RTSeeAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
8359
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeNavComponent, isStandalone: true, selector: "rtsee-nav", inputs: { config: "config", rtsee: "rtsee" }, ngImport: i0, template: "<div class=\"rtsee-nav\">\n @if (config.siteLogo) {\n <div class=\"rtsee-site-logo\">\n <p-image [src]=\"config.siteLogo.src\" class=\"rtsee-site-logo-image\"></p-image>\n <p-divider class=\"rtsee-site-logo-divider\" />\n </div>\n }\n <div class=\"rtsee-nav-bar\">\n @for (route of config.routes; track route.name) {\n <a [routerLink]=\"route.link\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [ngClass]=\"{'rtsee-nav-item-hidden': !route.isEnabled || !route.iconClassName}\"\n [routerLinkActiveOptions]=\"{ exact: route.exactActiveLinkMatcher || false }\"\n class=\"rtsee-nav-item\"\n [pTooltip]=\"route.name\"\n >\n <span [ngClass]=\"route.iconClassName\"\n class=\"rtsee-nav-item-icon\" >\n </span>\n </a>\n }\n <p-avatar [image]=\"rtsee.socketConnection?.myPeer?.imageUrl\"\n class=\"rtsee-nav-item rtsee-nav-image rtsee-nav-profile\"\n [routerLink]=\"profileLink\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [queryParams]=\"queryParams\"\n ></p-avatar>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "component", type: Image$1, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "preview", "showTransitionOptions", "hideTransitionOptions", "appendTo"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }] }); }
8740
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeNavComponent, isStandalone: true, selector: "rtsee-nav", inputs: { config: "config", rtsee: "rtsee" }, ngImport: i0, template: "<div class=\"rtsee-nav\">\n @if (config.siteLogo) {\n <div class=\"rtsee-site-logo\">\n <p-image [src]=\"config.siteLogo.src\" class=\"rtsee-site-logo-image\"></p-image>\n <p-divider class=\"rtsee-site-logo-divider\" />\n </div>\n }\n <div class=\"rtsee-nav-bar\">\n @for (route of config.routes; track route.name) {\n <a [routerLink]=\"route.link\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [ngClass]=\"{'rtsee-nav-item-hidden': !route.isEnabled || !route.iconClassName}\"\n [routerLinkActiveOptions]=\"{ exact: route.exactActiveLinkMatcher || false }\"\n class=\"rtsee-nav-item\"\n [pTooltip]=\"route.name\"\n >\n <span [ngClass]=\"route.iconClassName\"\n class=\"rtsee-nav-item-icon\" >\n </span>\n @if (route.rtseeRoute === RTSeeRoutesList.MESSENGER && rtsee.messenger && rtsee.messenger.unreadMessagesCount > 0) {\n <span class=\"rtsee-nav-unread-badge\">\n {{ rtsee.messenger.unreadMessagesCount > 99 ? '99+' : rtsee.messenger.unreadMessagesCount }}\n </span>\n }\n </a>\n }\n <p-avatar [image]=\"rtsee.socketConnection?.myPeer?.imageUrl\"\n class=\"rtsee-nav-item rtsee-nav-image rtsee-nav-profile\"\n [routerLink]=\"profileLink\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [queryParams]=\"queryParams\"\n ></p-avatar>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "component", type: Image$1, selector: "p-image", inputs: ["imageClass", "imageStyle", "styleClass", "src", "srcSet", "sizes", "previewImageSrc", "previewImageSrcSet", "previewImageSizes", "alt", "width", "height", "loading", "preview", "showTransitionOptions", "hideTransitionOptions", "appendTo"], outputs: ["onShow", "onHide", "onImageError"] }, { kind: "component", type: Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "directive", type: Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }] }); }
8360
8741
  }
8361
8742
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeNavComponent, decorators: [{
8362
8743
  type: Component,
@@ -8368,7 +8749,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
8368
8749
  Image$1,
8369
8750
  Divider,
8370
8751
  Tooltip,
8371
- ], standalone: true, template: "<div class=\"rtsee-nav\">\n @if (config.siteLogo) {\n <div class=\"rtsee-site-logo\">\n <p-image [src]=\"config.siteLogo.src\" class=\"rtsee-site-logo-image\"></p-image>\n <p-divider class=\"rtsee-site-logo-divider\" />\n </div>\n }\n <div class=\"rtsee-nav-bar\">\n @for (route of config.routes; track route.name) {\n <a [routerLink]=\"route.link\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [ngClass]=\"{'rtsee-nav-item-hidden': !route.isEnabled || !route.iconClassName}\"\n [routerLinkActiveOptions]=\"{ exact: route.exactActiveLinkMatcher || false }\"\n class=\"rtsee-nav-item\"\n [pTooltip]=\"route.name\"\n >\n <span [ngClass]=\"route.iconClassName\"\n class=\"rtsee-nav-item-icon\" >\n </span>\n </a>\n }\n <p-avatar [image]=\"rtsee.socketConnection?.myPeer?.imageUrl\"\n class=\"rtsee-nav-item rtsee-nav-image rtsee-nav-profile\"\n [routerLink]=\"profileLink\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [queryParams]=\"queryParams\"\n ></p-avatar>\n </div>\n</div>\n" }]
8752
+ ], standalone: true, template: "<div class=\"rtsee-nav\">\n @if (config.siteLogo) {\n <div class=\"rtsee-site-logo\">\n <p-image [src]=\"config.siteLogo.src\" class=\"rtsee-site-logo-image\"></p-image>\n <p-divider class=\"rtsee-site-logo-divider\" />\n </div>\n }\n <div class=\"rtsee-nav-bar\">\n @for (route of config.routes; track route.name) {\n <a [routerLink]=\"route.link\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [ngClass]=\"{'rtsee-nav-item-hidden': !route.isEnabled || !route.iconClassName}\"\n [routerLinkActiveOptions]=\"{ exact: route.exactActiveLinkMatcher || false }\"\n class=\"rtsee-nav-item\"\n [pTooltip]=\"route.name\"\n >\n <span [ngClass]=\"route.iconClassName\"\n class=\"rtsee-nav-item-icon\" >\n </span>\n @if (route.rtseeRoute === RTSeeRoutesList.MESSENGER && rtsee.messenger && rtsee.messenger.unreadMessagesCount > 0) {\n <span class=\"rtsee-nav-unread-badge\">\n {{ rtsee.messenger.unreadMessagesCount > 99 ? '99+' : rtsee.messenger.unreadMessagesCount }}\n </span>\n }\n </a>\n }\n <p-avatar [image]=\"rtsee.socketConnection?.myPeer?.imageUrl\"\n class=\"rtsee-nav-item rtsee-nav-image rtsee-nav-profile\"\n [routerLink]=\"profileLink\"\n routerLinkActive=\"rtsee-nav-item-active\"\n [routerLinkActiveOptions]=\"{exact: true}\"\n [queryParams]=\"queryParams\"\n ></p-avatar>\n </div>\n</div>\n" }]
8372
8753
  }], ctorParameters: () => [{ type: RTSeeAuthService }], propDecorators: { config: [{
8373
8754
  type: Input
8374
8755
  }], rtsee: [{
@@ -8419,7 +8800,7 @@ class RTSeeContainerComponent {
8419
8800
  this.isSidenavFullScreen = rtseeRoute.fullScreen || false;
8420
8801
  }
8421
8802
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeContainerComponent, deps: [{ token: RTSeeAuthService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
8422
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeContainerComponent, isStandalone: true, selector: "rtsee-container", inputs: { rtsee: "rtsee", navigationConfig: "navigationConfig", auth: "auth" }, ngImport: i0, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded,\n 'rtsee-shell-side-nav-is-content': isSidenavContent,\n 'rtsee-shell-side-nav-full-screen': isSidenavFullScreen,\n 'rtsee-lang-eng': rtsee.messenger && rtsee.messenger.currentLanguage === 'eng',\n 'rtsee-lang-ua': rtsee.messenger && rtsee.messenger.currentLanguage === 'ua'\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger && rtsee.messenger.pendingInviteToken && rtsee.activeTab !== 'messenger') {\n <div class=\"rtsee-mobile-invite-popup-wrapper rts-theme-dark\">\n <div class=\"rts-invite-popup-modal\">\n <div class=\"rts-invite-popup-content\">\n <span class=\"material-icons-outlined rts-invite-popup-icon\">mail_outline</span>\n <div class=\"rts-invite-popup-text\">\n @if (rtsee.messenger.pendingInviteInfo?.inviter?.name) {\n <strong>{{ rtsee.messenger.pendingInviteInfo?.inviter?.name }}</strong>\n <span> {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_POPUP_TEXT] }}</span>\n @if (rtsee.messenger.pendingInviteInfo?.chat?.name) {\n <span class=\"rts-invite-popup-chat-name\"> ({{ rtsee.messenger.pendingInviteInfo?.chat?.name }})</span>\n }\n } @else {\n <span>{{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_POPUP_GENERIC_TEXT] }}</span>\n }\n </div>\n </div>\n <div class=\"rts-invite-popup-actions\">\n <button type=\"button\"\n class=\"rts-btn rts-btn-secondary rts-invite-popup-btn\"\n [disabled]=\"rtsee.messenger.inviteJoinInProgress\"\n (click)=\"rtsee.messenger.ignoreChatInvitation()\"\n >\n {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_IGNORE_BUTTON] }}\n </button>\n <button type=\"button\"\n class=\"rts-btn rts-btn-primary rts-invite-popup-btn\"\n [disabled]=\"rtsee.messenger.inviteJoinInProgress\"\n (click)=\"rtsee.messenger.acceptChatInvitation()\"\n >\n {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_JOIN_BUTTON] }}\n </button>\n </div>\n </div>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n [messenger]=\"rtsee.messenger\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RTSeeConferenceComponent, selector: "rtsee-conference", inputs: ["rtSee"] }, { kind: "component", type: MessengerComponent, selector: "rtsee-messenger", inputs: ["messenger", "isFramed"] }, { kind: "component", type: RtseeEventsDashboardComponent, selector: "rtsee-events-dashboard", inputs: ["eventsDashboard"] }, { kind: "component", type: PresentationComponent, selector: "rtsee-presentation", inputs: ["presentation", "messenger"] }, { kind: "component", type: RtseeNavComponent, selector: "rtsee-nav", inputs: ["config", "rtsee"] }] }); }
8803
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RTSeeContainerComponent, isStandalone: true, selector: "rtsee-container", inputs: { rtsee: "rtsee", navigationConfig: "navigationConfig", auth: "auth" }, ngImport: i0, template: "<div class=\"rtsee-shell\"\n [ngClass]=\"{\n 'rtsee-shell-conference-mode': rtsee.conference && rtsee.conference.isInActiveCall,\n 'rtsee-shell-messenger-active': rtsee.messenger && rtsee.activeTab === 'messenger',\n 'rtsee-shell-dashboard-active': rtsee.eventsDashboard && rtsee.activeTab === 'events-dashboard',\n 'rtsee-shell-presentation-active': rtsee.presentation && rtsee.activeTab === 'presentation',\n 'rtsee-shell-side-nav-expanded': isSidenavExpanded,\n 'rtsee-shell-side-nav-is-content': isSidenavContent,\n 'rtsee-shell-side-nav-full-screen': isSidenavFullScreen,\n 'rtsee-lang-eng': rtsee.messenger && rtsee.messenger.currentLanguage === 'eng',\n 'rtsee-lang-ua': rtsee.messenger && rtsee.messenger.currentLanguage === 'ua'\n }\"\n>\n <div class=\"rtsee-nav-block\">\n <rtsee-nav [config]=\"navigationConfig\" [rtsee]=\"rtsee\"></rtsee-nav>\n </div>\n\n <div class=\"rtsee-shell-panel\">\n <div class=\"rtsee-shell-panel-inner\">\n @if (rtsee.conference && rtsee.conference.isInActiveCall) {\n <div class=\"rtsee-conference-container\">\n <rtsee-conference [rtSee]=\"rtsee.conference\"\n ></rtsee-conference>\n </div>\n }\n\n @if (rtsee.messenger && rtsee.messenger.pendingInviteToken && rtsee.activeTab !== 'messenger') {\n <div class=\"rtsee-mobile-invite-popup-wrapper rts-theme-dark\">\n <div class=\"rts-invite-popup-modal\">\n <div class=\"rts-invite-popup-content\">\n <span class=\"material-icons-outlined rts-invite-popup-icon\">mail_outline</span>\n <div class=\"rts-invite-popup-text\">\n @if (rtsee.messenger.pendingInviteInfo?.inviter?.name) {\n <strong>{{ rtsee.messenger.pendingInviteInfo?.inviter?.name }}</strong>\n <span> {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_POPUP_TEXT] }}</span>\n @if (rtsee.messenger.pendingInviteInfo?.chat?.name) {\n <span class=\"rts-invite-popup-chat-name\"> ({{ rtsee.messenger.pendingInviteInfo?.chat?.name }})</span>\n }\n } @else {\n <span>{{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_POPUP_GENERIC_TEXT] }}</span>\n }\n </div>\n </div>\n <div class=\"rts-invite-popup-actions\">\n <button type=\"button\"\n class=\"rts-btn rts-btn-secondary rts-invite-popup-btn\"\n [disabled]=\"rtsee.messenger.inviteJoinInProgress\"\n (click)=\"rtsee.messenger.ignoreChatInvitation()\"\n >\n {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_IGNORE_BUTTON] }}\n </button>\n <button type=\"button\"\n class=\"rts-btn rts-btn-primary rts-invite-popup-btn\"\n [disabled]=\"rtsee.messenger.inviteJoinInProgress\"\n (click)=\"rtsee.messenger.acceptChatInvitation()\"\n >\n {{ rtsee.messenger.labels[RTSeeTextLabelKeys.MESSENGER_INVITE_JOIN_BUTTON] }}\n </button>\n </div>\n </div>\n </div>\n }\n\n @if (rtsee.messenger) {\n <div class=\"rtsee-messenger-container\">\n <rtsee-messenger [messenger]=\"rtsee.messenger\"\n ></rtsee-messenger>\n </div>\n }\n\n @if (rtsee.eventsDashboard && rtsee.eventsDashboard.isReady) {\n <div class=\"rtsee-events-dashboard-container\">\n <rtsee-events-dashboard [eventsDashboard]=\"rtsee.eventsDashboard\"\n ></rtsee-events-dashboard>\n </div>\n }\n\n @if (rtsee.presentation && rtsee.presentation.isActive) {\n <div class=\"rtsee-presentation-container\">\n <rtsee-presentation [presentation]=\"rtsee.presentation\"\n [messenger]=\"rtsee.messenger\"\n ></rtsee-presentation>\n </div>\n }\n </div>\n </div>\n\n <div class=\"rtsee-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RTSeeConferenceComponent, selector: "rtsee-conference", inputs: ["rtSee"] }, { kind: "component", type: MessengerComponent, selector: "rtsee-messenger", inputs: ["messenger", "isFramed"] }, { kind: "component", type: RtseeEventsDashboardComponent, selector: "rtsee-events-dashboard", inputs: ["eventsDashboard", "framed", "isFramed"] }, { kind: "component", type: PresentationComponent, selector: "rtsee-presentation", inputs: ["presentation", "messenger", "framed", "isFramed"] }, { kind: "component", type: RtseeNavComponent, selector: "rtsee-nav", inputs: ["config", "rtsee"] }] }); }
8423
8804
  }
8424
8805
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RTSeeContainerComponent, decorators: [{
8425
8806
  type: Component,
@@ -8613,7 +8994,7 @@ class RtseeTagGroupManageComponent {
8613
8994
  return this.tagGroupForm.get('description');
8614
8995
  }
8615
8996
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeTagGroupManageComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
8616
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeTagGroupManageComponent, isStandalone: true, selector: "rtsee-rtsee-tag-group-manage", inputs: { manageTagGroups: "manageTagGroups" }, ngImport: i0, template: "<div class=\"rtsee-manage-tag-group\">\n <div class=\"rtsee-manage-tag-group-info rtsee-form-container\">\n <form class=\"rtsee-tag-form rtsee-form\"\n [formGroup]=\"tagGroupForm\" (ngSubmit)=\"submit()\">\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-label-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"rtsee-story-label-name-field\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-label-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-label-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n\n @if (manageTagGroups && manageTagGroups.tagsMultiselect) {\n <div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"manageTagGroups.tagsMultiselect\"></rtsee-autocomplete>\n </div>\n }\n\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageTagGroups.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"cancel()\"\n [disabled]=\"manageTagGroups.saveInProgress\"\n />\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config"] }] }); }
8997
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeTagGroupManageComponent, isStandalone: true, selector: "rtsee-rtsee-tag-group-manage", inputs: { manageTagGroups: "manageTagGroups" }, ngImport: i0, template: "<div class=\"rtsee-manage-tag-group\">\n <div class=\"rtsee-manage-tag-group-info rtsee-form-container\">\n <form class=\"rtsee-tag-form rtsee-form\"\n [formGroup]=\"tagGroupForm\" (ngSubmit)=\"submit()\">\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <input id=\"rtsee-story-label-name-field\"\n class=\"rtsee-form-field\"\n pInputText\n [formControl]=\"nameField\"\n [class.p-invalid]=\"nameField.invalid && nameField.touched\"\n />\n <label for=\"rtsee-story-label-name-field\">Name</label>\n </p-floatlabel>\n </p-inputgroup>\n @if (nameField.hasError('required') && nameField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Name is required</p-message>\n }\n </div>\n <div class=\"rtsee-form-field-container\">\n <p-inputgroup>\n <p-floatlabel variant=\"on\">\n <textarea [formControl]=\"descriptionField\"\n id=\"rtsee-story-label-description-field\"\n class=\"rtsee-form-field\"\n rows=\"3\"\n cols=\"30\"\n pTextarea\n [class.p-invalid]=\"descriptionField.invalid && descriptionField.touched\"\n ></textarea>\n <label for=\"rtsee-story-label-description-field\">Description</label>\n </p-floatlabel>\n </p-inputgroup>\n\n @if (descriptionField.hasError('required') && descriptionField.touched) {\n <p-message class=\"rtsee-form-field-error-message\"\n severity=\"error\"\n variant=\"simple\"\n size=\"small\"\n >Description is required</p-message>\n }\n </div>\n\n @if (manageTagGroups && manageTagGroups.tagsMultiselect) {\n <div class=\"rtsee-form-field-container\">\n <rtsee-autocomplete [config]=\"manageTagGroups.tagsMultiselect\"></rtsee-autocomplete>\n </div>\n }\n\n <p-button type=\"submit\"\n [label]=\"'Save'\"\n [disabled]=\"manageTagGroups.saveInProgress\"\n />\n <p-button [label]=\"'Cancel'\"\n severity=\"secondary\"\n (click)=\"cancel()\"\n [disabled]=\"manageTagGroups.saveInProgress\"\n />\n </form>\n </div>\n</div>\n", dependencies: [{ kind: "component", type: Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "directive", type: InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "component", type: AutocompleteComponent, selector: "rtsee-autocomplete", inputs: ["config", "disabled"] }] }); }
8617
8998
  }
8618
8999
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeTagGroupManageComponent, decorators: [{
8619
9000
  type: Component,
@@ -9695,5 +10076,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
9695
10076
  * Generated bundle index. Do not edit.
9696
10077
  */
9697
10078
 
9698
- export { ApplicationEventWidgetComponent, BaseEventWidgetComponent, ChatAgentCreatedWidgetComponent, ChatCreatedWidgetComponent, ChatMemberInviteClickedWidgetComponent, ChatMessageSentWidgetComponent, ChatOpenedWidgetComponent, DefaultTaskActionPromptComponent, DefaultTaskActionThumbnailComponent, EntitiesConfigurationsListComponent, EntitiesListComponent, EventsWidgetsService, FormComponent, GtagService, IllustratorComponent, InteractiveStoryEditorComponent, ManageEntityComponent, ManageEntityConfigurationComponent, MessengerComponent, NgxService, PaymentProductSnippetComponent, PresentationComponent, ProfileComponent, ProfileOpenedWidgetComponent, RTSeeAuthComponent, RTSeeConferenceComponent, RTSeeContainerComponent, RTSeeControlsComponent, RTSeeModule, RTSeeTaskActionComponent, RTSeeTaskComponent, RequestDemoClickedWidgetComponent, RtseeEntityCommentsComponent, RtseeEntityPreviewComponent, RtseeEntityTagsComponent, RtseeEventsDashboardComponent, RtseePeerComponent, RtseeSettingsComponent, RtseeTagGroupManageComponent, RtseeTagGroupsManageComponent, RtseeTagManageComponent, RtseeTagsAccordionMenuComponent, SlideNumberChangedWidgetComponent, SlideTaskActionThumbnailComponent, StoryDetailsOpenedWidgetComponent, StoryElementsSectionComponent, StoryReadingStartedWidgetComponent, StoryTaskActionThumbnailComponent, TaskActionPromptComponent, TaskActionThumbnailComponent, TaskActionWidgetsService, TranslationsPanelComponent };
10079
+ export { ApplicationEventWidgetComponent, BaseEventWidgetComponent, ChatAgentCreatedWidgetComponent, ChatCreatedWidgetComponent, ChatMemberInviteClickedWidgetComponent, ChatMessageSentWidgetComponent, ChatOpenedWidgetComponent, DefaultTaskActionPromptComponent, DefaultTaskActionThumbnailComponent, EntitiesConfigurationsListComponent, EntitiesListComponent, EventsWidgetsService, FormComponent, GtagService, IllustratorComponent, InteractiveStoryEditorComponent, ManageEntityComponent, ManageEntityConfigurationComponent, MessengerComponent, NgxService, PaymentProductSnippetComponent, PresentationComponent, ProfileComponent, ProfileOpenedWidgetComponent, RTSeeAuthComponent, RTSeeConferenceComponent, RTSeeContainerComponent, RTSeeControlsComponent, RTSeeModule, RTSeeTaskActionComponent, RTSeeTaskComponent, RequestDemoClickedWidgetComponent, RtseeEntityCommentsComponent, RtseeEntityPreviewComponent, RtseeEntityTagsComponent, RtseeEventsDashboardComponent, RtseePeerComponent, RtseeSettingsComponent, RtseeTagGroupManageComponent, RtseeTagGroupsManageComponent, RtseeTagManageComponent, RtseeTagsAccordionMenuComponent, SlideNumberChangedWidgetComponent, SlideTaskActionThumbnailComponent, StoryDetailsOpenedWidgetComponent, StoryElementsSectionComponent, StoryReadingStartedWidgetComponent, StoryTaskActionThumbnailComponent, TaskActionPromptComponent, TaskActionThumbnailComponent, TaskActionWidgetsService, TestChatNowClickedWidgetComponent, TranslationsPanelComponent };
9699
10080
  //# sourceMappingURL=rtsee-ngx.mjs.map