@rtsee/ngx 0.0.124 → 0.0.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ngx/fesm2022/rtsee-ngx.mjs +751 -465
- package/dist/ngx/fesm2022/rtsee-ngx.mjs.map +1 -1
- package/dist/ngx/index.d.ts +2 -0
- package/package.json +11 -11
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Input, Component, ViewChild, EventEmitter, Output, forwardRef, Directive,
|
|
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, 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\"
|
|
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\"
|
|
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-
|
|
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-
|
|
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: "
|
|
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
|
|
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\"
|
|
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\"
|
|
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,
|
|
@@ -1164,8 +1169,18 @@ class FormFieldComponent {
|
|
|
1164
1169
|
onFieldChanged() {
|
|
1165
1170
|
this.fieldChanged.emit();
|
|
1166
1171
|
}
|
|
1172
|
+
getEditorInitials(name) {
|
|
1173
|
+
if (!name || !name.trim()) {
|
|
1174
|
+
return "?";
|
|
1175
|
+
}
|
|
1176
|
+
const parts = name.trim().split(/\s+/);
|
|
1177
|
+
if (parts.length >= 2) {
|
|
1178
|
+
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
1179
|
+
}
|
|
1180
|
+
return parts[0].substring(0, 2).toUpperCase();
|
|
1181
|
+
}
|
|
1167
1182
|
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
|
|
1183
|
+
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: "<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
1184
|
}
|
|
1170
1185
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
1171
1186
|
type: Component,
|
|
@@ -1189,7 +1204,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1189
1204
|
DateFieldComponent,
|
|
1190
1205
|
VarcharFieldComponent,
|
|
1191
1206
|
FloatFieldComponent
|
|
1192
|
-
], template: "@switch (field.type) {\n
|
|
1207
|
+
], 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"] }]
|
|
1193
1208
|
}], propDecorators: { field: [{
|
|
1194
1209
|
type: Input
|
|
1195
1210
|
}], fieldChanged: [{
|
|
@@ -1230,17 +1245,30 @@ class FormComponent {
|
|
|
1230
1245
|
submit() {
|
|
1231
1246
|
this.formSubmit.emit(this.form);
|
|
1232
1247
|
}
|
|
1248
|
+
onCancelClick() {
|
|
1249
|
+
this.form.onCancel?.();
|
|
1250
|
+
}
|
|
1233
1251
|
onFieldChanged() {
|
|
1234
1252
|
this.form.evaluateIsValid();
|
|
1235
1253
|
this.form.evaluateIsDirty();
|
|
1236
1254
|
this.form.evaluateIsChanged();
|
|
1237
1255
|
}
|
|
1256
|
+
getEditorInitials(name) {
|
|
1257
|
+
if (!name || !name.trim()) {
|
|
1258
|
+
return "?";
|
|
1259
|
+
}
|
|
1260
|
+
const parts = name.trim().split(/\s+/);
|
|
1261
|
+
if (parts.length >= 2) {
|
|
1262
|
+
return `${parts[0][0]}${parts[1][0]}`.toUpperCase();
|
|
1263
|
+
}
|
|
1264
|
+
return parts[0].substring(0, 2).toUpperCase();
|
|
1265
|
+
}
|
|
1238
1266
|
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
|
|
1267
|
+
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
1268
|
}
|
|
1241
1269
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: FormComponent, decorators: [{
|
|
1242
1270
|
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
|
|
1271
|
+
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
1272
|
}], propDecorators: { form: [{
|
|
1245
1273
|
type: Input
|
|
1246
1274
|
}], formSubmit: [{
|
|
@@ -3558,21 +3586,109 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3558
3586
|
type: Input
|
|
3559
3587
|
}] } });
|
|
3560
3588
|
|
|
3589
|
+
class StorytellerWorkflowForm extends RTSeeForm {
|
|
3590
|
+
constructor(options) {
|
|
3591
|
+
const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
|
|
3592
|
+
const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
|
|
3593
|
+
const titleField = new RTSeeFormField({
|
|
3594
|
+
name: 'title',
|
|
3595
|
+
type: 'text',
|
|
3596
|
+
label: 'Story title',
|
|
3597
|
+
description: 'Story title',
|
|
3598
|
+
placeholder: 'The Lighthouse Keeper',
|
|
3599
|
+
maxLength: 255,
|
|
3600
|
+
value: '',
|
|
3601
|
+
validators: [
|
|
3602
|
+
(v) => (!v || !v.trim() ? 'Story title is required' : null),
|
|
3603
|
+
(v) => (v && v.length > 255 ? 'Title must be at most 255 characters' : null),
|
|
3604
|
+
],
|
|
3605
|
+
});
|
|
3606
|
+
const textField = new RTSeeFormField({
|
|
3607
|
+
name: 'text',
|
|
3608
|
+
type: 'textarea',
|
|
3609
|
+
label: 'Story',
|
|
3610
|
+
description: 'Story',
|
|
3611
|
+
placeholder: 'Once upon a time…',
|
|
3612
|
+
showCharCount: true,
|
|
3613
|
+
rows: 5,
|
|
3614
|
+
value: '',
|
|
3615
|
+
validators: [(v) => (!v || !v.trim() ? 'Story text is required' : null)],
|
|
3616
|
+
});
|
|
3617
|
+
const historicDescriptionField = new RTSeeFormField({
|
|
3618
|
+
name: 'historicDescription',
|
|
3619
|
+
type: 'textarea',
|
|
3620
|
+
label: 'Historic description',
|
|
3621
|
+
description: 'Historic description',
|
|
3622
|
+
placeholder: 'Historic context, era, places, people…',
|
|
3623
|
+
rows: 3,
|
|
3624
|
+
value: '',
|
|
3625
|
+
validators: [],
|
|
3626
|
+
});
|
|
3627
|
+
const agentIdField = new RTSeeFormFieldSelect({
|
|
3628
|
+
name: 'agentId',
|
|
3629
|
+
type: 'select',
|
|
3630
|
+
label: 'Agent',
|
|
3631
|
+
description: 'Agent',
|
|
3632
|
+
placeholder: 'Select an agent',
|
|
3633
|
+
hint: options.agents.length
|
|
3634
|
+
? undefined
|
|
3635
|
+
: 'There are no agentic members in this chat. Add an agent to continue.',
|
|
3636
|
+
value: defaultAgentId,
|
|
3637
|
+
selectOptions: agentOptions,
|
|
3638
|
+
labelKey: 'label',
|
|
3639
|
+
valueKey: 'value',
|
|
3640
|
+
validators: [(v) => (!v ? 'Please select an agent' : null)],
|
|
3641
|
+
});
|
|
3642
|
+
super({
|
|
3643
|
+
name: 'Storyteller',
|
|
3644
|
+
fields: [titleField, textField, historicDescriptionField, agentIdField],
|
|
3645
|
+
currentUser: options.currentUser,
|
|
3646
|
+
readonly: options.readonly,
|
|
3647
|
+
submitButtonLabel: '✦ Create story',
|
|
3648
|
+
submittingButtonLabel: 'Creating…',
|
|
3649
|
+
submittedLabel: 'submited the workflow',
|
|
3650
|
+
onSubmit: options.onSubmit,
|
|
3651
|
+
onFieldEdited: options.onFieldEdited,
|
|
3652
|
+
});
|
|
3653
|
+
this.titleField = titleField;
|
|
3654
|
+
this.textField = textField;
|
|
3655
|
+
this.historicDescriptionField = historicDescriptionField;
|
|
3656
|
+
this.agentIdField = agentIdField;
|
|
3657
|
+
}
|
|
3658
|
+
static mapAgentOptions(agents) {
|
|
3659
|
+
return (agents || []).map((agent) => ({
|
|
3660
|
+
label: `${agent.name}${agent.agentConfiguration?.model?.model
|
|
3661
|
+
? ' · ' + agent.agentConfiguration.model.model
|
|
3662
|
+
: ''}`,
|
|
3663
|
+
value: agent.id,
|
|
3664
|
+
}));
|
|
3665
|
+
}
|
|
3666
|
+
updateAgents(agents) {
|
|
3667
|
+
this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
|
|
3668
|
+
this.agentIdField.hint = agents.length
|
|
3669
|
+
? undefined
|
|
3670
|
+
: 'There are no agentic members in this chat. Add an agent to continue.';
|
|
3671
|
+
if (!this.agentIdField.value && agents.length === 1) {
|
|
3672
|
+
this.agentIdField.value = agents[0].id;
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
getModel() {
|
|
3676
|
+
return {
|
|
3677
|
+
title: (this.titleField.value || '').trim(),
|
|
3678
|
+
text: this.textField.value || '',
|
|
3679
|
+
historicDescription: this.historicDescriptionField.value || '',
|
|
3680
|
+
agentId: this.agentIdField.value || '',
|
|
3681
|
+
};
|
|
3682
|
+
}
|
|
3683
|
+
}
|
|
3561
3684
|
/**
|
|
3562
3685
|
* Storyteller step 1: collects the story data and the agent which will build the story.
|
|
3563
3686
|
*/
|
|
3564
3687
|
class StorytellerFormStepComponent {
|
|
3565
3688
|
constructor(cdr) {
|
|
3566
3689
|
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
3690
|
this.onChangedBound = () => this.onWorkflowChanged();
|
|
3691
|
+
this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
|
|
3576
3692
|
}
|
|
3577
3693
|
get agents() {
|
|
3578
3694
|
return (this.chat?.members || []).filter((m) => m.isAgent);
|
|
@@ -3580,61 +3696,104 @@ class StorytellerFormStepComponent {
|
|
|
3580
3696
|
get readonly() {
|
|
3581
3697
|
return !this.step?.isActive || !!this.workflow?.submitInProgress;
|
|
3582
3698
|
}
|
|
3583
|
-
get
|
|
3584
|
-
|
|
3699
|
+
get currentUser() {
|
|
3700
|
+
const myPeer = this.messenger?.myPeer;
|
|
3701
|
+
if (myPeer) {
|
|
3702
|
+
return {
|
|
3703
|
+
id: myPeer.clientId,
|
|
3704
|
+
name: myPeer.name || 'User',
|
|
3705
|
+
imageUrl: myPeer.imageUrl,
|
|
3706
|
+
};
|
|
3707
|
+
}
|
|
3708
|
+
const myId = this.chat?.clientId || this.messenger?.clientId;
|
|
3709
|
+
if (myId) {
|
|
3710
|
+
const member = this.chat?.getMemberById(myId);
|
|
3711
|
+
return {
|
|
3712
|
+
id: myId,
|
|
3713
|
+
name: member?.name || 'User',
|
|
3714
|
+
imageUrl: member?.imageUrl,
|
|
3715
|
+
};
|
|
3716
|
+
}
|
|
3717
|
+
return null;
|
|
3585
3718
|
}
|
|
3586
3719
|
ngOnInit() {
|
|
3720
|
+
this.form = new StorytellerWorkflowForm({
|
|
3721
|
+
agents: this.agents,
|
|
3722
|
+
currentUser: this.currentUser,
|
|
3723
|
+
readonly: this.readonly,
|
|
3724
|
+
onSubmit: (model) => {
|
|
3725
|
+
if (this.readonly) {
|
|
3726
|
+
return;
|
|
3727
|
+
}
|
|
3728
|
+
void this.workflow.submitStep(model, this.form.getCollectiveState());
|
|
3729
|
+
},
|
|
3730
|
+
onFieldEdited: (change, state) => {
|
|
3731
|
+
if (!this.step || this.readonly) {
|
|
3732
|
+
return;
|
|
3733
|
+
}
|
|
3734
|
+
this.workflow?.updateStepForm(this.step.id, state, change.fieldName, change.lastEditedBy || undefined);
|
|
3735
|
+
},
|
|
3736
|
+
});
|
|
3587
3737
|
this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
3588
|
-
|
|
3589
|
-
if (agents.length === 1) {
|
|
3590
|
-
this.form.get('agentId')?.setValue(agents[0].id);
|
|
3591
|
-
}
|
|
3738
|
+
this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
3592
3739
|
this.syncWithStep();
|
|
3593
3740
|
}
|
|
3594
3741
|
ngOnDestroy() {
|
|
3595
3742
|
this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
3743
|
+
this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
3596
3744
|
}
|
|
3597
|
-
|
|
3598
|
-
if (this.
|
|
3745
|
+
onRemoteStepFormUpdated(payload) {
|
|
3746
|
+
if (!this.form || !payload?.formState) {
|
|
3599
3747
|
return;
|
|
3600
3748
|
}
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
return;
|
|
3604
|
-
}
|
|
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;
|
|
3749
|
+
this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
|
|
3750
|
+
this.cdr.detectChanges();
|
|
3616
3751
|
}
|
|
3617
3752
|
onWorkflowChanged() {
|
|
3618
3753
|
this.syncWithStep();
|
|
3619
3754
|
this.cdr.detectChanges();
|
|
3620
3755
|
}
|
|
3621
3756
|
syncWithStep() {
|
|
3622
|
-
if (this.
|
|
3623
|
-
|
|
3757
|
+
if (!this.form) {
|
|
3758
|
+
return;
|
|
3624
3759
|
}
|
|
3625
|
-
|
|
3626
|
-
|
|
3760
|
+
this.form.setCurrentUser(this.currentUser);
|
|
3761
|
+
this.form.updateAgents(this.agents);
|
|
3762
|
+
this.form.setReadonly(this.readonly);
|
|
3763
|
+
this.form.submitInProgress = !!this.workflow?.submitInProgress;
|
|
3764
|
+
if (this.workflow?.submitError) {
|
|
3765
|
+
this.form.submitError = this.workflow.submitError;
|
|
3627
3766
|
}
|
|
3628
|
-
|
|
3629
|
-
this.form.
|
|
3767
|
+
if (this.step?.formState) {
|
|
3768
|
+
this.form.applyCollectiveState(this.step.formState);
|
|
3769
|
+
}
|
|
3770
|
+
if (this.step?.output) {
|
|
3771
|
+
this.form.titleField.value = this.step.output.title || '';
|
|
3772
|
+
this.form.textField.value = this.step.output.text || '';
|
|
3773
|
+
this.form.historicDescriptionField.value =
|
|
3774
|
+
this.step.output.historicDescription || '';
|
|
3775
|
+
this.form.agentIdField.value = this.step.output.agentId || '';
|
|
3776
|
+
}
|
|
3777
|
+
if (this.step?.submittedBy) {
|
|
3778
|
+
this.form.submittedBy = this.step.submittedBy;
|
|
3779
|
+
}
|
|
3780
|
+
else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
|
|
3781
|
+
const creator = this.chat?.getMemberById(this.workflow.creatorId);
|
|
3782
|
+
if (creator) {
|
|
3783
|
+
this.form.submittedBy = {
|
|
3784
|
+
id: creator.id,
|
|
3785
|
+
name: creator.name,
|
|
3786
|
+
imageUrl: creator.imageUrl,
|
|
3787
|
+
};
|
|
3788
|
+
}
|
|
3630
3789
|
}
|
|
3631
3790
|
}
|
|
3632
3791
|
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: "
|
|
3792
|
+
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
3793
|
}
|
|
3635
3794
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StorytellerFormStepComponent, decorators: [{
|
|
3636
3795
|
type: Component,
|
|
3637
|
-
args: [{ selector: 'rtsee-storyteller-form-step', standalone: true, imports: [
|
|
3796
|
+
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
3797
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
|
|
3639
3798
|
type: Input
|
|
3640
3799
|
}], workflow: [{
|
|
@@ -3678,36 +3837,152 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3678
3837
|
type: Input
|
|
3679
3838
|
}] } });
|
|
3680
3839
|
|
|
3681
|
-
|
|
3840
|
+
class StoryTranslatorWorkflowForm extends RTSeeForm {
|
|
3841
|
+
constructor(options) {
|
|
3842
|
+
const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
|
|
3843
|
+
const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
|
|
3844
|
+
const storyField = new RTSeeFormFieldAutocomplete({
|
|
3845
|
+
name: 'storyId',
|
|
3846
|
+
type: 'autocomplete',
|
|
3847
|
+
label: 'Story',
|
|
3848
|
+
description: 'Story',
|
|
3849
|
+
placeholder: 'Search stories by name…',
|
|
3850
|
+
value: [],
|
|
3851
|
+
validators: [
|
|
3852
|
+
(v) => (!v || !v.length || !v[0] ? 'Please select a story' : null),
|
|
3853
|
+
],
|
|
3854
|
+
autocompleteOptions: {
|
|
3855
|
+
inputId: 'storyId',
|
|
3856
|
+
inputName: 'storyId',
|
|
3857
|
+
suggestionLabel: 'name',
|
|
3858
|
+
suggestionId: 'id',
|
|
3859
|
+
placeholder: 'Search stories by name…',
|
|
3860
|
+
dropdown: true,
|
|
3861
|
+
loadOnce: false,
|
|
3862
|
+
allowMultipleSelections: false,
|
|
3863
|
+
fluid: true,
|
|
3864
|
+
getSuggestions: (query) => options.searchStories(query),
|
|
3865
|
+
},
|
|
3866
|
+
});
|
|
3867
|
+
const languageField = new RTSeeFormFieldSelect({
|
|
3868
|
+
name: 'language',
|
|
3869
|
+
type: 'select',
|
|
3870
|
+
label: 'Translate to',
|
|
3871
|
+
description: 'Translate to',
|
|
3872
|
+
placeholder: 'Select a language',
|
|
3873
|
+
value: '',
|
|
3874
|
+
selectOptions: STORY_TRANSLATOR_LANGUAGES.map((l) => ({
|
|
3875
|
+
label: l.nativeName,
|
|
3876
|
+
value: l.code,
|
|
3877
|
+
})),
|
|
3878
|
+
labelKey: 'label',
|
|
3879
|
+
valueKey: 'value',
|
|
3880
|
+
validators: [(v) => (!v ? 'Please select a target language' : null)],
|
|
3881
|
+
});
|
|
3882
|
+
const fromScratchField = new RTSeeFormField({
|
|
3883
|
+
name: 'fromScratch',
|
|
3884
|
+
type: 'checkbox',
|
|
3885
|
+
label: 'From scratch',
|
|
3886
|
+
description: 'From scratch',
|
|
3887
|
+
hint: 'Overwrite existing translations for all story elements',
|
|
3888
|
+
disabled: true,
|
|
3889
|
+
value: false,
|
|
3890
|
+
validators: [],
|
|
3891
|
+
});
|
|
3892
|
+
const agentIdField = new RTSeeFormFieldSelect({
|
|
3893
|
+
name: 'agentId',
|
|
3894
|
+
type: 'select',
|
|
3895
|
+
label: 'Agent',
|
|
3896
|
+
description: 'Agent',
|
|
3897
|
+
placeholder: 'Select an agent',
|
|
3898
|
+
hint: options.agents.length
|
|
3899
|
+
? undefined
|
|
3900
|
+
: 'There are no agentic members in this chat. Add an agent to continue.',
|
|
3901
|
+
value: defaultAgentId,
|
|
3902
|
+
selectOptions: agentOptions,
|
|
3903
|
+
labelKey: 'label',
|
|
3904
|
+
valueKey: 'value',
|
|
3905
|
+
validators: [(v) => (!v ? 'Please select an agent' : null)],
|
|
3906
|
+
});
|
|
3907
|
+
super({
|
|
3908
|
+
name: 'Story Translator',
|
|
3909
|
+
fields: [storyField, languageField, fromScratchField, agentIdField],
|
|
3910
|
+
currentUser: options.currentUser,
|
|
3911
|
+
readonly: options.readonly,
|
|
3912
|
+
canCancel: options.canCancel,
|
|
3913
|
+
onCancel: options.onCancel,
|
|
3914
|
+
cancelButtonLabel: 'Cancel',
|
|
3915
|
+
submitButtonLabel: '🌐 Translate',
|
|
3916
|
+
submittingButtonLabel: 'Translating…',
|
|
3917
|
+
submittedLabel: 'submited the workflow',
|
|
3918
|
+
onSubmit: options.onSubmit,
|
|
3919
|
+
onFieldEdited: options.onFieldEdited,
|
|
3920
|
+
});
|
|
3921
|
+
this.hasExistingTranslation = false;
|
|
3922
|
+
this.lastSelectedStory = null;
|
|
3923
|
+
this.storyField = storyField;
|
|
3924
|
+
this.languageField = languageField;
|
|
3925
|
+
this.fromScratchField = fromScratchField;
|
|
3926
|
+
this.agentIdField = agentIdField;
|
|
3927
|
+
}
|
|
3928
|
+
get selectedStoryId() {
|
|
3929
|
+
return (this.storyField.value && this.storyField.value[0]) || '';
|
|
3930
|
+
}
|
|
3931
|
+
get selectedStoryName() {
|
|
3932
|
+
const item = this.storyField.autocomplete.selectedSuggestions?.[0];
|
|
3933
|
+
if (item?.name) {
|
|
3934
|
+
return item.name;
|
|
3935
|
+
}
|
|
3936
|
+
return this.lastSelectedStory?.name || '';
|
|
3937
|
+
}
|
|
3938
|
+
get selectedLanguage() {
|
|
3939
|
+
return STORY_TRANSLATOR_LANGUAGES.find((l) => l.code === this.languageField.value);
|
|
3940
|
+
}
|
|
3941
|
+
updateAgents(agents) {
|
|
3942
|
+
this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
|
|
3943
|
+
this.agentIdField.hint = agents.length
|
|
3944
|
+
? undefined
|
|
3945
|
+
: 'There are no agentic members in this chat. Add an agent to continue.';
|
|
3946
|
+
if (!this.agentIdField.value && agents.length === 1) {
|
|
3947
|
+
this.agentIdField.value = agents[0].id;
|
|
3948
|
+
}
|
|
3949
|
+
}
|
|
3950
|
+
updateLanguageUI() {
|
|
3951
|
+
const lang = this.selectedLanguage;
|
|
3952
|
+
this.submitButtonLabel = `🌐 Translate${lang ? ' to ' + lang.nativeName : ''}`;
|
|
3953
|
+
this.fromScratchField.hint = `Overwrite existing ${lang?.nativeName || ''} translations for all story elements`;
|
|
3954
|
+
this.fromScratchField.disabled = !this.hasExistingTranslation;
|
|
3955
|
+
}
|
|
3956
|
+
setStorySelection(story) {
|
|
3957
|
+
this.lastSelectedStory = story;
|
|
3958
|
+
if (story?.id) {
|
|
3959
|
+
this.storyField.value = [story.id];
|
|
3960
|
+
this.storyField.autocomplete.setSelectedItems([story]);
|
|
3961
|
+
}
|
|
3962
|
+
else {
|
|
3963
|
+
this.storyField.value = [];
|
|
3964
|
+
this.storyField.autocomplete.setSelectedItems([]);
|
|
3965
|
+
}
|
|
3966
|
+
}
|
|
3967
|
+
getModel() {
|
|
3968
|
+
return {
|
|
3969
|
+
storyId: this.selectedStoryId,
|
|
3970
|
+
storyName: this.selectedStoryName || this.selectedStoryId,
|
|
3971
|
+
language: this.languageField.value || '',
|
|
3972
|
+
agentId: this.agentIdField.value || '',
|
|
3973
|
+
fromScratch: this.hasExistingTranslation ? !!this.fromScratchField.value : false,
|
|
3974
|
+
};
|
|
3975
|
+
}
|
|
3976
|
+
}
|
|
3682
3977
|
/**
|
|
3683
3978
|
* Story Translator step 1: pick a story (autocomplete by name) and the target language.
|
|
3684
3979
|
*/
|
|
3685
3980
|
class StoryTranslatorFormStepComponent {
|
|
3686
|
-
constructor(cdr
|
|
3981
|
+
constructor(cdr) {
|
|
3687
3982
|
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
3983
|
this.translationCheckRequestId = 0;
|
|
3710
3984
|
this.onChangedBound = () => this.onWorkflowChanged();
|
|
3985
|
+
this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
|
|
3711
3986
|
}
|
|
3712
3987
|
get agents() {
|
|
3713
3988
|
return (this.chat?.members || []).filter((m) => m.isAgent);
|
|
@@ -3718,115 +3993,59 @@ class StoryTranslatorFormStepComponent {
|
|
|
3718
3993
|
get canCancel() {
|
|
3719
3994
|
return !!this.workflow?.isDraft && !this.workflow?.submitInProgress && !!this.messenger;
|
|
3720
3995
|
}
|
|
3721
|
-
get
|
|
3722
|
-
|
|
3996
|
+
get currentUser() {
|
|
3997
|
+
const myPeer = this.messenger?.myPeer;
|
|
3998
|
+
if (myPeer) {
|
|
3999
|
+
return {
|
|
4000
|
+
id: myPeer.clientId,
|
|
4001
|
+
name: myPeer.name || 'User',
|
|
4002
|
+
imageUrl: myPeer.imageUrl,
|
|
4003
|
+
};
|
|
4004
|
+
}
|
|
4005
|
+
const myId = this.chat?.clientId || this.messenger?.clientId;
|
|
4006
|
+
if (myId) {
|
|
4007
|
+
const member = this.chat?.getMemberById(myId);
|
|
4008
|
+
return {
|
|
4009
|
+
id: myId,
|
|
4010
|
+
name: member?.name || 'User',
|
|
4011
|
+
imageUrl: member?.imageUrl,
|
|
4012
|
+
};
|
|
4013
|
+
}
|
|
4014
|
+
return null;
|
|
3723
4015
|
}
|
|
3724
4016
|
ngOnInit() {
|
|
4017
|
+
this.form = new StoryTranslatorWorkflowForm({
|
|
4018
|
+
agents: this.agents,
|
|
4019
|
+
searchStories: (query) => this.messenger?.ozzy ? this.messenger.ozzy.searchStories(query) : Promise.resolve([]),
|
|
4020
|
+
currentUser: this.currentUser,
|
|
4021
|
+
readonly: this.readonly,
|
|
4022
|
+
canCancel: this.canCancel,
|
|
4023
|
+
onCancel: () => this.cancel(),
|
|
4024
|
+
onSubmit: (model) => {
|
|
4025
|
+
if (this.readonly) {
|
|
4026
|
+
return;
|
|
4027
|
+
}
|
|
4028
|
+
void this.workflow.submitStep(model, this.form.getCollectiveState());
|
|
4029
|
+
},
|
|
4030
|
+
onFieldEdited: (change, state) => {
|
|
4031
|
+
if (!this.step || this.readonly) {
|
|
4032
|
+
return;
|
|
4033
|
+
}
|
|
4034
|
+
if (change.fieldName === 'storyId' || change.fieldName === 'language') {
|
|
4035
|
+
this.form.fromScratchField.value = false;
|
|
4036
|
+
this.form.updateLanguageUI();
|
|
4037
|
+
void this.checkExistingTranslation();
|
|
4038
|
+
}
|
|
4039
|
+
this.workflow?.updateStepForm(this.step.id, this.form.getCollectiveState(), change.fieldName, change.lastEditedBy || undefined);
|
|
4040
|
+
},
|
|
4041
|
+
});
|
|
3725
4042
|
this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
3726
|
-
|
|
3727
|
-
if (agents.length === 1) {
|
|
3728
|
-
this.form.get('agentId')?.setValue(agents[0].id);
|
|
3729
|
-
}
|
|
4043
|
+
this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
3730
4044
|
this.syncWithStep();
|
|
3731
4045
|
}
|
|
3732
4046
|
ngOnDestroy() {
|
|
3733
4047
|
this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
3734
|
-
this.
|
|
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
|
-
});
|
|
4048
|
+
this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
3830
4049
|
}
|
|
3831
4050
|
cancel() {
|
|
3832
4051
|
if (!this.canCancel) {
|
|
@@ -3834,98 +4053,88 @@ class StoryTranslatorFormStepComponent {
|
|
|
3834
4053
|
}
|
|
3835
4054
|
this.messenger?.discardDraftWorkflow(this.workflow);
|
|
3836
4055
|
}
|
|
3837
|
-
|
|
3838
|
-
|
|
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) {
|
|
4056
|
+
onRemoteStepFormUpdated(payload) {
|
|
4057
|
+
if (!this.form || !payload?.formState) {
|
|
3853
4058
|
return;
|
|
3854
4059
|
}
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
this.
|
|
3858
|
-
this.
|
|
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
|
-
}
|
|
4060
|
+
this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
|
|
4061
|
+
this.form.updateLanguageUI();
|
|
4062
|
+
void this.checkExistingTranslation(true);
|
|
4063
|
+
this.cdr.detectChanges();
|
|
3881
4064
|
}
|
|
3882
4065
|
onWorkflowChanged() {
|
|
3883
4066
|
this.syncWithStep();
|
|
3884
4067
|
this.cdr.detectChanges();
|
|
3885
4068
|
}
|
|
3886
4069
|
syncWithStep() {
|
|
4070
|
+
if (!this.form) {
|
|
4071
|
+
return;
|
|
4072
|
+
}
|
|
4073
|
+
this.form.setCurrentUser(this.currentUser);
|
|
4074
|
+
this.form.updateAgents(this.agents);
|
|
4075
|
+
this.form.setReadonly(this.readonly);
|
|
4076
|
+
this.form.canCancel = this.canCancel;
|
|
4077
|
+
this.form.submitInProgress = !!this.workflow?.submitInProgress;
|
|
4078
|
+
if (this.workflow?.submitError) {
|
|
4079
|
+
this.form.submitError = this.workflow.submitError;
|
|
4080
|
+
}
|
|
4081
|
+
if (this.step?.formState) {
|
|
4082
|
+
this.form.applyCollectiveState(this.step.formState);
|
|
4083
|
+
}
|
|
3887
4084
|
const output = this.step?.output;
|
|
3888
4085
|
if (output?.storyId) {
|
|
3889
|
-
this.
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
}, { emitEvent: false });
|
|
4086
|
+
this.form.setStorySelection({
|
|
4087
|
+
id: output.storyId,
|
|
4088
|
+
name: output.storyName || output.storyId,
|
|
4089
|
+
});
|
|
4090
|
+
this.form.languageField.value = output.language || '';
|
|
4091
|
+
this.form.fromScratchField.value = !!output.fromScratch;
|
|
4092
|
+
this.form.agentIdField.value = output.agentId || '';
|
|
3897
4093
|
if (output.fromScratch) {
|
|
3898
|
-
this.hasExistingTranslation = true;
|
|
4094
|
+
this.form.hasExistingTranslation = true;
|
|
3899
4095
|
}
|
|
3900
4096
|
else {
|
|
3901
4097
|
void this.checkExistingTranslation(true);
|
|
3902
4098
|
}
|
|
3903
4099
|
}
|
|
3904
|
-
if (this.
|
|
3905
|
-
this.
|
|
3906
|
-
this.form.disable({ emitEvent: false });
|
|
4100
|
+
else if (this.form.selectedStoryId && this.form.languageField.value) {
|
|
4101
|
+
void this.checkExistingTranslation(true);
|
|
3907
4102
|
}
|
|
3908
|
-
|
|
3909
|
-
|
|
4103
|
+
this.form.updateLanguageUI();
|
|
4104
|
+
if (this.step?.submittedBy) {
|
|
4105
|
+
this.form.submittedBy = this.step.submittedBy;
|
|
4106
|
+
}
|
|
4107
|
+
else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
|
|
4108
|
+
const creator = this.chat?.getMemberById(this.workflow.creatorId);
|
|
4109
|
+
if (creator) {
|
|
4110
|
+
this.form.submittedBy = {
|
|
4111
|
+
id: creator.id,
|
|
4112
|
+
name: creator.name,
|
|
4113
|
+
imageUrl: creator.imageUrl,
|
|
4114
|
+
};
|
|
4115
|
+
}
|
|
3910
4116
|
}
|
|
3911
4117
|
}
|
|
3912
4118
|
async checkExistingTranslation(preserveCheckboxValue = false) {
|
|
3913
|
-
|
|
3914
|
-
|
|
4119
|
+
if (!this.form) {
|
|
4120
|
+
return;
|
|
4121
|
+
}
|
|
4122
|
+
const storyId = this.form.selectedStoryId;
|
|
4123
|
+
const rawLang = this.form.languageField.value || '';
|
|
3915
4124
|
const langInfo = getStoryTranslatorLanguage(rawLang);
|
|
3916
4125
|
const languageKey = langInfo?.code || rawLang;
|
|
3917
4126
|
if (!storyId || !languageKey) {
|
|
3918
|
-
this.hasExistingTranslation = false;
|
|
3919
|
-
this.checkingTranslations = false;
|
|
4127
|
+
this.form.hasExistingTranslation = false;
|
|
3920
4128
|
if (!preserveCheckboxValue) {
|
|
3921
|
-
this.form.
|
|
4129
|
+
this.form.fromScratchField.value = false;
|
|
3922
4130
|
}
|
|
4131
|
+
this.form.updateLanguageUI();
|
|
3923
4132
|
this.cdr.markForCheck();
|
|
3924
4133
|
return;
|
|
3925
4134
|
}
|
|
3926
4135
|
const requestId = ++this.translationCheckRequestId;
|
|
3927
|
-
|
|
3928
|
-
const aliases = this.
|
|
4136
|
+
const selectedItem = this.form.storyField.autocomplete.selectedSuggestions?.[0];
|
|
4137
|
+
const aliases = selectedItem?.aliases || this.form.lastSelectedStory?.aliases || [];
|
|
3929
4138
|
const hasAliasForLang = aliases.some((a) => {
|
|
3930
4139
|
const norm = getStoryTranslatorLanguage(a.languageKey)?.code || a.languageKey;
|
|
3931
4140
|
return norm === languageKey;
|
|
@@ -3941,31 +4150,31 @@ class StoryTranslatorFormStepComponent {
|
|
|
3941
4150
|
const norm = getStoryTranslatorLanguage(t.languageKey)?.code || t.languageKey;
|
|
3942
4151
|
return norm === languageKey;
|
|
3943
4152
|
});
|
|
3944
|
-
this.hasExistingTranslation = hasAliasForLang || hasStoryTranslation;
|
|
3945
|
-
if (!this.hasExistingTranslation && !preserveCheckboxValue) {
|
|
3946
|
-
this.form.
|
|
4153
|
+
this.form.hasExistingTranslation = hasAliasForLang || hasStoryTranslation;
|
|
4154
|
+
if (!this.form.hasExistingTranslation && !preserveCheckboxValue) {
|
|
4155
|
+
this.form.fromScratchField.value = false;
|
|
3947
4156
|
}
|
|
3948
4157
|
}
|
|
3949
4158
|
catch {
|
|
3950
4159
|
if (requestId !== this.translationCheckRequestId) {
|
|
3951
4160
|
return;
|
|
3952
4161
|
}
|
|
3953
|
-
this.hasExistingTranslation = hasAliasForLang;
|
|
4162
|
+
this.form.hasExistingTranslation = hasAliasForLang;
|
|
3954
4163
|
}
|
|
3955
4164
|
finally {
|
|
3956
4165
|
if (requestId === this.translationCheckRequestId) {
|
|
3957
|
-
this.
|
|
4166
|
+
this.form.updateLanguageUI();
|
|
3958
4167
|
this.cdr.detectChanges();
|
|
3959
4168
|
}
|
|
3960
4169
|
}
|
|
3961
4170
|
}
|
|
3962
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryTranslatorFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }
|
|
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"] }] }); }
|
|
4171
|
+
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 }); }
|
|
4172
|
+
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
4173
|
}
|
|
3965
4174
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryTranslatorFormStepComponent, decorators: [{
|
|
3966
4175
|
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 }
|
|
4176
|
+
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"] }]
|
|
4177
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
|
|
3969
4178
|
type: Input
|
|
3970
4179
|
}], workflow: [{
|
|
3971
4180
|
type: Input
|
|
@@ -3973,56 +4182,144 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
3973
4182
|
type: Input
|
|
3974
4183
|
}], messenger: [{
|
|
3975
4184
|
type: Input
|
|
3976
|
-
}], storyInput: [{
|
|
3977
|
-
type: ViewChild,
|
|
3978
|
-
args: ['storyInput']
|
|
3979
|
-
}], onDocumentMouseDown: [{
|
|
3980
|
-
type: HostListener,
|
|
3981
|
-
args: ['document:mousedown', ['$event']]
|
|
3982
4185
|
}] } });
|
|
3983
4186
|
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4187
|
+
class StoryRepairWorkflowForm extends RTSeeForm {
|
|
4188
|
+
constructor(options) {
|
|
4189
|
+
const agentOptions = StorytellerWorkflowForm.mapAgentOptions(options.agents);
|
|
4190
|
+
const defaultAgentId = options.agents.length === 1 ? options.agents[0].id : '';
|
|
4191
|
+
const storyField = new RTSeeFormFieldAutocomplete({
|
|
4192
|
+
name: 'storyId',
|
|
4193
|
+
type: 'autocomplete',
|
|
4194
|
+
label: 'Story',
|
|
4195
|
+
description: 'Story',
|
|
4196
|
+
placeholder: 'Search stories by name…',
|
|
4197
|
+
value: [],
|
|
4198
|
+
validators: [
|
|
4199
|
+
(v) => (!v || !v.length || !v[0] ? 'Please select a story' : null),
|
|
4200
|
+
],
|
|
4201
|
+
autocompleteOptions: {
|
|
4202
|
+
inputId: 'storyId',
|
|
4203
|
+
inputName: 'storyId',
|
|
4204
|
+
suggestionLabel: 'name',
|
|
4205
|
+
suggestionId: 'id',
|
|
4206
|
+
placeholder: 'Search stories by name…',
|
|
4207
|
+
dropdown: true,
|
|
4208
|
+
loadOnce: false,
|
|
4209
|
+
allowMultipleSelections: false,
|
|
4210
|
+
fluid: true,
|
|
4211
|
+
getSuggestions: (query) => options.searchStories(query),
|
|
4212
|
+
},
|
|
4006
4213
|
});
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4214
|
+
const grammarAndFlowField = new RTSeeFormField({
|
|
4215
|
+
name: 'grammarAndFlow',
|
|
4216
|
+
type: 'checkbox',
|
|
4217
|
+
label: 'Grammar & Flow',
|
|
4218
|
+
description: 'Grammar & Flow',
|
|
4219
|
+
hint: 'Fix typos, punctuation & improve readability across story, slides & entities',
|
|
4220
|
+
value: true,
|
|
4221
|
+
validators: [],
|
|
4222
|
+
});
|
|
4223
|
+
const charactersField = new RTSeeFormField({
|
|
4224
|
+
name: 'characters',
|
|
4225
|
+
type: 'checkbox',
|
|
4226
|
+
label: 'Characters',
|
|
4227
|
+
description: 'Characters',
|
|
4228
|
+
hint: 'Add missing important characters and link them to slides',
|
|
4229
|
+
value: true,
|
|
4230
|
+
validators: [],
|
|
4231
|
+
});
|
|
4232
|
+
const artifactsField = new RTSeeFormField({
|
|
4233
|
+
name: 'artifacts',
|
|
4234
|
+
type: 'checkbox',
|
|
4235
|
+
label: 'Artifacts',
|
|
4236
|
+
description: 'Artifacts',
|
|
4237
|
+
hint: 'Add missing memorable objects and link them to slides',
|
|
4238
|
+
value: true,
|
|
4239
|
+
validators: [],
|
|
4240
|
+
});
|
|
4241
|
+
const locationsField = new RTSeeFormField({
|
|
4242
|
+
name: 'locations',
|
|
4243
|
+
type: 'checkbox',
|
|
4244
|
+
label: 'Locations',
|
|
4245
|
+
description: 'Locations',
|
|
4246
|
+
hint: 'Add missing story locations and link them to slides',
|
|
4247
|
+
value: true,
|
|
4248
|
+
validators: [],
|
|
4249
|
+
});
|
|
4250
|
+
const sanitizeImagesField = new RTSeeFormField({
|
|
4251
|
+
name: 'sanitizeImages',
|
|
4252
|
+
type: 'checkbox',
|
|
4253
|
+
label: 'Sanitize images',
|
|
4254
|
+
description: 'Sanitize images',
|
|
4255
|
+
hint: 'Properly name & upload story, slide, character, artifact, location & author images to the public bucket for SEO',
|
|
4256
|
+
value: true,
|
|
4257
|
+
validators: [],
|
|
4258
|
+
});
|
|
4259
|
+
const agentIdField = new RTSeeFormFieldSelect({
|
|
4260
|
+
name: 'agentId',
|
|
4261
|
+
type: 'select',
|
|
4262
|
+
label: 'Agent',
|
|
4263
|
+
description: 'Agent',
|
|
4264
|
+
placeholder: 'Select an agent',
|
|
4265
|
+
hint: options.agents.length
|
|
4266
|
+
? undefined
|
|
4267
|
+
: 'There are no agentic members in this chat. Add an agent to continue.',
|
|
4268
|
+
value: defaultAgentId,
|
|
4269
|
+
selectOptions: agentOptions,
|
|
4270
|
+
labelKey: 'label',
|
|
4271
|
+
valueKey: 'value',
|
|
4272
|
+
validators: [(v) => (!v ? 'Please select an agent' : null)],
|
|
4273
|
+
});
|
|
4274
|
+
super({
|
|
4275
|
+
name: 'Story Repair',
|
|
4276
|
+
fields: [
|
|
4277
|
+
storyField,
|
|
4278
|
+
grammarAndFlowField,
|
|
4279
|
+
charactersField,
|
|
4280
|
+
artifactsField,
|
|
4281
|
+
locationsField,
|
|
4282
|
+
sanitizeImagesField,
|
|
4283
|
+
agentIdField,
|
|
4284
|
+
],
|
|
4285
|
+
currentUser: options.currentUser,
|
|
4286
|
+
readonly: options.readonly,
|
|
4287
|
+
canCancel: options.canCancel,
|
|
4288
|
+
onCancel: options.onCancel,
|
|
4289
|
+
cancelButtonLabel: 'Cancel',
|
|
4290
|
+
submitButtonLabel: '🛠️ Repair Story',
|
|
4291
|
+
submittingButtonLabel: 'Repairing…',
|
|
4292
|
+
submittedLabel: 'submited the workflow',
|
|
4293
|
+
onSubmit: options.onSubmit,
|
|
4294
|
+
onFieldEdited: options.onFieldEdited,
|
|
4295
|
+
});
|
|
4296
|
+
this.lastSelectedStory = null;
|
|
4297
|
+
this.storyField = storyField;
|
|
4298
|
+
this.grammarAndFlowField = grammarAndFlowField;
|
|
4299
|
+
this.charactersField = charactersField;
|
|
4300
|
+
this.artifactsField = artifactsField;
|
|
4301
|
+
this.locationsField = locationsField;
|
|
4302
|
+
this.sanitizeImagesField = sanitizeImagesField;
|
|
4303
|
+
this.agentIdField = agentIdField;
|
|
4017
4304
|
}
|
|
4018
|
-
get
|
|
4019
|
-
return (this.
|
|
4305
|
+
get selectedStoryId() {
|
|
4306
|
+
return (this.storyField.value && this.storyField.value[0]) || '';
|
|
4020
4307
|
}
|
|
4021
|
-
get
|
|
4022
|
-
|
|
4308
|
+
get selectedStoryName() {
|
|
4309
|
+
const item = this.storyField.autocomplete.selectedSuggestions?.[0];
|
|
4310
|
+
if (item?.name) {
|
|
4311
|
+
return item.name;
|
|
4312
|
+
}
|
|
4313
|
+
return this.lastSelectedStory?.name || '';
|
|
4023
4314
|
}
|
|
4024
|
-
get
|
|
4025
|
-
return
|
|
4315
|
+
get currentOptions() {
|
|
4316
|
+
return {
|
|
4317
|
+
grammarAndFlow: !!this.grammarAndFlowField.value,
|
|
4318
|
+
characters: !!this.charactersField.value,
|
|
4319
|
+
artifacts: !!this.artifactsField.value,
|
|
4320
|
+
locations: !!this.locationsField.value,
|
|
4321
|
+
sanitizeImages: !!this.sanitizeImagesField.value,
|
|
4322
|
+
};
|
|
4026
4323
|
}
|
|
4027
4324
|
get hasAtLeastOneOption() {
|
|
4028
4325
|
const opts = this.currentOptions;
|
|
@@ -4032,114 +4329,120 @@ class StoryRepairFormStepComponent {
|
|
|
4032
4329
|
opts.locations ||
|
|
4033
4330
|
opts.sanitizeImages);
|
|
4034
4331
|
}
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
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);
|
|
4332
|
+
evaluateIsValid() {
|
|
4333
|
+
super.evaluateIsValid();
|
|
4334
|
+
if (!this.hasAtLeastOneOption) {
|
|
4335
|
+
this.isValid = false;
|
|
4049
4336
|
}
|
|
4050
|
-
this.syncWithStep();
|
|
4051
4337
|
}
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
onStoryFocus() {
|
|
4057
|
-
if (this.readonly) {
|
|
4058
|
-
return;
|
|
4338
|
+
getFirstValidationError() {
|
|
4339
|
+
const fieldError = super.getFirstValidationError();
|
|
4340
|
+
if (fieldError) {
|
|
4341
|
+
return fieldError;
|
|
4059
4342
|
}
|
|
4060
|
-
this.
|
|
4061
|
-
|
|
4062
|
-
this.scheduleSearch(0);
|
|
4343
|
+
if (!this.hasAtLeastOneOption) {
|
|
4344
|
+
return 'Please select at least one option to repair.';
|
|
4063
4345
|
}
|
|
4346
|
+
return null;
|
|
4064
4347
|
}
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4348
|
+
updateAgents(agents) {
|
|
4349
|
+
this.agentIdField.setOptions(StorytellerWorkflowForm.mapAgentOptions(agents));
|
|
4350
|
+
this.agentIdField.hint = agents.length
|
|
4351
|
+
? undefined
|
|
4352
|
+
: 'There are no agentic members in this chat. Add an agent to continue.';
|
|
4353
|
+
if (!this.agentIdField.value && agents.length === 1) {
|
|
4354
|
+
this.agentIdField.value = agents[0].id;
|
|
4069
4355
|
}
|
|
4070
|
-
this.suggestionsOpened = true;
|
|
4071
|
-
this.scheduleSearch(SEARCH_DEBOUNCE_MS);
|
|
4072
4356
|
}
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
}
|
|
4079
|
-
return;
|
|
4357
|
+
setStorySelection(story) {
|
|
4358
|
+
this.lastSelectedStory = story;
|
|
4359
|
+
if (story?.id) {
|
|
4360
|
+
this.storyField.value = [story.id];
|
|
4361
|
+
this.storyField.autocomplete.setSelectedItems([story]);
|
|
4080
4362
|
}
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
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;
|
|
4363
|
+
else {
|
|
4364
|
+
this.storyField.value = [];
|
|
4365
|
+
this.storyField.autocomplete.setSelectedItems([]);
|
|
4099
4366
|
}
|
|
4100
4367
|
}
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
this.suggestionsOpened = false;
|
|
4368
|
+
getModel() {
|
|
4369
|
+
return {
|
|
4370
|
+
storyId: this.selectedStoryId,
|
|
4371
|
+
storyName: this.selectedStoryName || this.selectedStoryId,
|
|
4372
|
+
agentId: this.agentIdField.value || '',
|
|
4373
|
+
options: this.currentOptions,
|
|
4374
|
+
};
|
|
4109
4375
|
}
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4376
|
+
}
|
|
4377
|
+
/**
|
|
4378
|
+
* Story Repair step 1 (#RepairStory):
|
|
4379
|
+
* - Pick a story (autocomplete by name)
|
|
4380
|
+
* - Choose repair options via checkboxes (Grammar & Flow, Characters, Artifacts, Locations, Sanitize images), all checked by default
|
|
4381
|
+
* - Pick an agent
|
|
4382
|
+
*/
|
|
4383
|
+
class StoryRepairFormStepComponent {
|
|
4384
|
+
constructor(cdr) {
|
|
4385
|
+
this.cdr = cdr;
|
|
4386
|
+
this.onChangedBound = () => this.onWorkflowChanged();
|
|
4387
|
+
this.onStepFormUpdatedBound = (payload) => this.onRemoteStepFormUpdated(payload);
|
|
4119
4388
|
}
|
|
4120
|
-
|
|
4121
|
-
this.
|
|
4389
|
+
get agents() {
|
|
4390
|
+
return (this.chat?.members || []).filter((m) => m.isAgent);
|
|
4122
4391
|
}
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
this.suggestionsOpened = false;
|
|
4126
|
-
}
|
|
4392
|
+
get readonly() {
|
|
4393
|
+
return !this.step?.isActive || !!this.workflow?.submitInProgress;
|
|
4127
4394
|
}
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4395
|
+
get canCancel() {
|
|
4396
|
+
return !!this.workflow?.isDraft && !this.workflow?.submitInProgress && !!this.messenger;
|
|
4397
|
+
}
|
|
4398
|
+
get currentUser() {
|
|
4399
|
+
const myPeer = this.messenger?.myPeer;
|
|
4400
|
+
if (myPeer) {
|
|
4401
|
+
return {
|
|
4402
|
+
id: myPeer.clientId,
|
|
4403
|
+
name: myPeer.name || 'User',
|
|
4404
|
+
imageUrl: myPeer.imageUrl,
|
|
4405
|
+
};
|
|
4131
4406
|
}
|
|
4132
|
-
this.
|
|
4133
|
-
if (
|
|
4134
|
-
this.
|
|
4135
|
-
return
|
|
4407
|
+
const myId = this.chat?.clientId || this.messenger?.clientId;
|
|
4408
|
+
if (myId) {
|
|
4409
|
+
const member = this.chat?.getMemberById(myId);
|
|
4410
|
+
return {
|
|
4411
|
+
id: myId,
|
|
4412
|
+
name: member?.name || 'User',
|
|
4413
|
+
imageUrl: member?.imageUrl,
|
|
4414
|
+
};
|
|
4136
4415
|
}
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4416
|
+
return null;
|
|
4417
|
+
}
|
|
4418
|
+
ngOnInit() {
|
|
4419
|
+
this.form = new StoryRepairWorkflowForm({
|
|
4420
|
+
agents: this.agents,
|
|
4421
|
+
searchStories: (query) => this.messenger?.ozzy ? this.messenger.ozzy.searchStories(query) : Promise.resolve([]),
|
|
4422
|
+
currentUser: this.currentUser,
|
|
4423
|
+
readonly: this.readonly,
|
|
4424
|
+
canCancel: this.canCancel,
|
|
4425
|
+
onCancel: () => this.cancel(),
|
|
4426
|
+
onSubmit: (model) => {
|
|
4427
|
+
if (this.readonly) {
|
|
4428
|
+
return;
|
|
4429
|
+
}
|
|
4430
|
+
void this.workflow.submitStep(model, this.form.getCollectiveState());
|
|
4431
|
+
},
|
|
4432
|
+
onFieldEdited: (change, state) => {
|
|
4433
|
+
if (!this.step || this.readonly) {
|
|
4434
|
+
return;
|
|
4435
|
+
}
|
|
4436
|
+
this.workflow?.updateStepForm(this.step.id, state, change.fieldName, change.lastEditedBy || undefined);
|
|
4437
|
+
},
|
|
4142
4438
|
});
|
|
4439
|
+
this.workflow?.on(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
4440
|
+
this.workflow?.on(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
4441
|
+
this.syncWithStep();
|
|
4442
|
+
}
|
|
4443
|
+
ngOnDestroy() {
|
|
4444
|
+
this.workflow?.off(OzzyWorkflowClientEvents.CHANGED, this.onChangedBound);
|
|
4445
|
+
this.workflow?.off(OzzyWorkflowClientEvents.STEP_FORM_UPDATED, this.onStepFormUpdatedBound);
|
|
4143
4446
|
}
|
|
4144
4447
|
cancel() {
|
|
4145
4448
|
if (!this.canCancel) {
|
|
@@ -4147,87 +4450,71 @@ class StoryRepairFormStepComponent {
|
|
|
4147
4450
|
}
|
|
4148
4451
|
this.messenger?.discardDraftWorkflow(this.workflow);
|
|
4149
4452
|
}
|
|
4150
|
-
|
|
4151
|
-
|
|
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) {
|
|
4453
|
+
onRemoteStepFormUpdated(payload) {
|
|
4454
|
+
if (!this.form || !payload?.formState) {
|
|
4166
4455
|
return;
|
|
4167
4456
|
}
|
|
4168
|
-
|
|
4169
|
-
|
|
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
|
-
}
|
|
4457
|
+
this.form.applyCollectiveState(payload.formState, payload.changedFieldName);
|
|
4458
|
+
this.cdr.detectChanges();
|
|
4194
4459
|
}
|
|
4195
4460
|
onWorkflowChanged() {
|
|
4196
4461
|
this.syncWithStep();
|
|
4197
4462
|
this.cdr.detectChanges();
|
|
4198
4463
|
}
|
|
4199
4464
|
syncWithStep() {
|
|
4465
|
+
if (!this.form) {
|
|
4466
|
+
return;
|
|
4467
|
+
}
|
|
4468
|
+
this.form.setCurrentUser(this.currentUser);
|
|
4469
|
+
this.form.updateAgents(this.agents);
|
|
4470
|
+
this.form.setReadonly(this.readonly);
|
|
4471
|
+
this.form.canCancel = this.canCancel;
|
|
4472
|
+
this.form.submitInProgress = !!this.workflow?.submitInProgress;
|
|
4473
|
+
if (this.workflow?.submitError) {
|
|
4474
|
+
this.form.submitError = this.workflow.submitError;
|
|
4475
|
+
}
|
|
4476
|
+
if (this.step?.formState) {
|
|
4477
|
+
this.form.applyCollectiveState(this.step.formState);
|
|
4478
|
+
}
|
|
4200
4479
|
const output = this.step?.output;
|
|
4201
4480
|
if (output?.storyId) {
|
|
4202
|
-
this.
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4481
|
+
this.form.setStorySelection({
|
|
4482
|
+
id: output.storyId,
|
|
4483
|
+
name: output.storyName || output.storyId,
|
|
4484
|
+
});
|
|
4485
|
+
this.form.grammarAndFlowField.value = output.options
|
|
4486
|
+
? !!output.options.grammarAndFlow
|
|
4487
|
+
: true;
|
|
4488
|
+
this.form.charactersField.value = output.options ? !!output.options.characters : true;
|
|
4489
|
+
this.form.artifactsField.value = output.options ? !!output.options.artifacts : true;
|
|
4490
|
+
this.form.locationsField.value = output.options ? !!output.options.locations : true;
|
|
4491
|
+
this.form.sanitizeImagesField.value =
|
|
4492
|
+
output.options && output.options.sanitizeImages !== undefined
|
|
4211
4493
|
? !!output.options.sanitizeImages
|
|
4212
|
-
: true
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4494
|
+
: true;
|
|
4495
|
+
this.form.agentIdField.value = output.agentId || '';
|
|
4496
|
+
}
|
|
4497
|
+
if (this.step?.submittedBy) {
|
|
4498
|
+
this.form.submittedBy = this.step.submittedBy;
|
|
4499
|
+
}
|
|
4500
|
+
else if (this.step?.isFinished && !this.form.submittedBy && this.workflow?.creatorId) {
|
|
4501
|
+
const creator = this.chat?.getMemberById(this.workflow.creatorId);
|
|
4502
|
+
if (creator) {
|
|
4503
|
+
this.form.submittedBy = {
|
|
4504
|
+
id: creator.id,
|
|
4505
|
+
name: creator.name,
|
|
4506
|
+
imageUrl: creator.imageUrl,
|
|
4507
|
+
};
|
|
4508
|
+
}
|
|
4222
4509
|
}
|
|
4223
4510
|
}
|
|
4224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryRepairFormStepComponent, deps: [{ token: i0.ChangeDetectorRef }
|
|
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 & Flow</span>\n <span class=\"rts-st-checkbox-desc\">Fix typos, punctuation & improve readability across story, slides & 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 & upload story, slide, character, artifact, location & 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"] }] }); }
|
|
4511
|
+
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 }); }
|
|
4512
|
+
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
4513
|
}
|
|
4227
4514
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: StoryRepairFormStepComponent, decorators: [{
|
|
4228
4515
|
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 & Flow</span>\n <span class=\"rts-st-checkbox-desc\">Fix typos, punctuation & improve readability across story, slides & 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 & upload story, slide, character, artifact, location & 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 }
|
|
4516
|
+
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"] }]
|
|
4517
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { step: [{
|
|
4231
4518
|
type: Input
|
|
4232
4519
|
}], workflow: [{
|
|
4233
4520
|
type: Input
|
|
@@ -4235,12 +4522,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
4235
4522
|
type: Input
|
|
4236
4523
|
}], messenger: [{
|
|
4237
4524
|
type: Input
|
|
4238
|
-
}], storyInput: [{
|
|
4239
|
-
type: ViewChild,
|
|
4240
|
-
args: ['storyInput']
|
|
4241
|
-
}], onDocumentMouseDown: [{
|
|
4242
|
-
type: HostListener,
|
|
4243
|
-
args: ['document:mousedown', ['$event']]
|
|
4244
4525
|
}] } });
|
|
4245
4526
|
|
|
4246
4527
|
/**
|
|
@@ -6738,7 +7019,12 @@ class StoryPlayerComponent {
|
|
|
6738
7019
|
renderExternalUpdate: false,
|
|
6739
7020
|
},
|
|
6740
7021
|
});
|
|
6741
|
-
this.story.initSwiper(this.swiper, {
|
|
7022
|
+
this.story.initSwiper(this.swiper, {
|
|
7023
|
+
virtual: true,
|
|
7024
|
+
onSlideChange: () => {
|
|
7025
|
+
this.cdr.detectChanges();
|
|
7026
|
+
},
|
|
7027
|
+
});
|
|
6742
7028
|
}
|
|
6743
7029
|
/** grows the virtual slides list when the slides count becomes known / changes */
|
|
6744
7030
|
ngDoCheck() {
|
|
@@ -7715,7 +8001,7 @@ class ManageTopicComponent {
|
|
|
7715
8001
|
return this.topicForm.get('key');
|
|
7716
8002
|
}
|
|
7717
8003
|
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"] }] }); }
|
|
8004
|
+
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
8005
|
}
|
|
7720
8006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ManageTopicComponent, decorators: [{
|
|
7721
8007
|
type: Component,
|
|
@@ -8613,7 +8899,7 @@ class RtseeTagGroupManageComponent {
|
|
|
8613
8899
|
return this.tagGroupForm.get('description');
|
|
8614
8900
|
}
|
|
8615
8901
|
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"] }] }); }
|
|
8902
|
+
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
8903
|
}
|
|
8618
8904
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeTagGroupManageComponent, decorators: [{
|
|
8619
8905
|
type: Component,
|