@dataclouder/ngx-agent-cards 0.2.10 → 0.2.11
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.
|
@@ -4412,7 +4412,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
4412
4412
|
}]
|
|
4413
4413
|
}], ctorParameters: () => [] });
|
|
4414
4414
|
|
|
4415
|
-
const Endpoints = '
|
|
4415
|
+
const Endpoints = 'conversation-rules';
|
|
4416
4416
|
class ConversationRuleService extends EntityCommunicationService {
|
|
4417
4417
|
constructor() {
|
|
4418
4418
|
super(Endpoints);
|
|
@@ -9414,7 +9414,10 @@ class ConversationRuleFormComponent extends EntityBaseSignalFormComponent {
|
|
|
9414
9414
|
}
|
|
9415
9415
|
}
|
|
9416
9416
|
loadEntity(entity) {
|
|
9417
|
-
this.entityForm.set(
|
|
9417
|
+
this.entityForm.set({
|
|
9418
|
+
...emptyConversationRule(),
|
|
9419
|
+
...entity,
|
|
9420
|
+
});
|
|
9418
9421
|
}
|
|
9419
9422
|
getFormValue() {
|
|
9420
9423
|
return this.entityForm();
|
|
@@ -9435,7 +9438,7 @@ class ConversationRuleFormComponent extends EntityBaseSignalFormComponent {
|
|
|
9435
9438
|
this.relationPopupSelector.push(relation);
|
|
9436
9439
|
}
|
|
9437
9440
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationRuleFormComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
9438
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ConversationRuleFormComponent, isStandalone: true, selector: "app-conversation-rule-form", usesInheritance: true, ngImport: i0, template: "<h3>ConversationRules Form</h3>\n\n<div class=\"source-form-card\">\n <p-card>\n <ng-template pTemplate=\"header\">\n <div class=\"form-card-header\">\n <span class=\"form-card-title\">{{ entityId() ? 'Edit Conversation Rule' : 'New Conversation Rule' }}</span>\n @if (entityId()) {\n <p-button label=\"Ver detalles\" icon=\"pi pi-eye\" [text]=\"true\" (click)=\"goToDetail()\"></p-button>\n }\n </div>\n </ng-template>\n\n <div style=\"display: flex; gap: 10px\">\n <div style=\"width: 100%\">\n\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\"\n [formField]=\"form.name\"\n placeholder=\"Enter rule name\" />\n @if (form.name().touched() && form.name().invalid()) {\n <small class=\"p-error\">{{ form.name().errors()[0].message }}</small>\n }\n </div>\n\n <div class=\"form-field\">\n <label for=\"type\" class=\"block\">Type</label>\n <p-select id=\"type\" class=\"w-full\"\n [options]=\"typeOptions\" optionLabel=\"label\" optionValue=\"value\"\n [ngModel]=\"entityForm().type\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, type: $event }))\"\n placeholder=\"None\"></p-select>\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea rows=\"1\" class=\"w-full\"\n [ngModel]=\"entityForm().description\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, description: $event }))\"\n placeholder=\"Enter description\"></textarea>\n </div>\n\n <div class=\"form-field\">\n <label for=\"rule\" class=\"block\">Rule</label>\n <textarea id=\"rule\" pTextarea rows=\"3\" class=\"w-full\"\n [ngModel]=\"entityForm().rule\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, rule: $event }))\"\n placeholder=\"Enter rule content\"></textarea>\n </div>\n\n </div>\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button (click)=\"save()\" label=\"Save Rule\" [disabled]=\"!isValid()\" icon=\"pi pi-check\" iconPos=\"right\"></p-button>\n </div>\n\n
|
|
9441
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: ConversationRuleFormComponent, isStandalone: true, selector: "app-conversation-rule-form", usesInheritance: true, ngImport: i0, template: "<h3>ConversationRules Form</h3>\n\n<div class=\"source-form-card\">\n <p-card>\n <ng-template pTemplate=\"header\">\n <div class=\"form-card-header\">\n <span class=\"form-card-title\">{{ entityId() ? 'Edit Conversation Rule' : 'New Conversation Rule' }}</span>\n @if (entityId()) {\n <p-button label=\"Ver detalles\" icon=\"pi pi-eye\" [text]=\"true\" (click)=\"goToDetail()\"></p-button>\n }\n </div>\n </ng-template>\n\n <div style=\"display: flex; gap: 10px\">\n <div style=\"width: 100%\">\n\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\"\n [formField]=\"form.name\"\n placeholder=\"Enter rule name\" />\n @if (form.name().touched() && form.name().invalid()) {\n <small class=\"p-error\">{{ form.name().errors()[0].message }}</small>\n }\n </div>\n\n <div class=\"form-field\">\n <label for=\"type\" class=\"block\">Type</label>\n <p-select id=\"type\" class=\"w-full\"\n [options]=\"typeOptions\" optionLabel=\"label\" optionValue=\"value\"\n [ngModel]=\"entityForm().type\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, type: $event }))\"\n placeholder=\"None\"></p-select>\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea rows=\"1\" class=\"w-full\"\n [ngModel]=\"entityForm().description\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, description: $event }))\"\n placeholder=\"Enter description\"></textarea>\n </div>\n\n <div class=\"form-field\">\n <label for=\"rule\" class=\"block\">Rule</label>\n <textarea id=\"rule\" pTextarea rows=\"3\" class=\"w-full\"\n [ngModel]=\"entityForm().rule\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, rule: $event }))\"\n placeholder=\"Enter rule content\"></textarea>\n </div>\n\n </div>\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button (click)=\"save()\" label=\"Save Rule\" [disabled]=\"!isValid()\" icon=\"pi pi-check\" iconPos=\"right\"></p-button>\n </div>\n\n\n </p-card>\n</div>\n", styles: [":host{display:block;padding:1rem}.source-form-card{max-width:800px;margin:0 auto}.form-field{margin-bottom:1.5rem;display:flex;flex-direction:column}.form-field label{margin-bottom:.5rem;font-weight:500;color:#495057}.form-field input,.form-field textarea,.form-field ::ng-deep .p-element{margin-top:.25rem}:host ::ng-deep .p-card .p-card-content>div:last-child{margin-top:1.5rem;display:flex;justify-content:flex-end}:host ::ng-deep .p-card .p-card-header{background-color:#f8f9fa;padding:1rem;border-bottom:1px solid #dee2e6}.form-card-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.form-card-title{font-weight:600;font-size:1.1rem;color:#495057}h3{color:#495057;margin-bottom:1.5rem;text-align:center}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.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$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CardModule }, { kind: "component", type: i2$6.Card, selector: "p-card", inputs: ["header", "subheader", "style", "styleClass"] }, { kind: "directive", type: i3$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "ngmodule", type: TextareaModule }, { kind: "directive", type: i4.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i2.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i6.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", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i3$3.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ChipModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "ngmodule", type: DialogModule }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
9439
9442
|
}
|
|
9440
9443
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: ConversationRuleFormComponent, decorators: [{
|
|
9441
9444
|
type: Component,
|
|
@@ -9451,7 +9454,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImpor
|
|
|
9451
9454
|
DialogModule,
|
|
9452
9455
|
ConversationRuleListComponent,
|
|
9453
9456
|
FormField,
|
|
9454
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<h3>ConversationRules Form</h3>\n\n<div class=\"source-form-card\">\n <p-card>\n <ng-template pTemplate=\"header\">\n <div class=\"form-card-header\">\n <span class=\"form-card-title\">{{ entityId() ? 'Edit Conversation Rule' : 'New Conversation Rule' }}</span>\n @if (entityId()) {\n <p-button label=\"Ver detalles\" icon=\"pi pi-eye\" [text]=\"true\" (click)=\"goToDetail()\"></p-button>\n }\n </div>\n </ng-template>\n\n <div style=\"display: flex; gap: 10px\">\n <div style=\"width: 100%\">\n\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\"\n [formField]=\"form.name\"\n placeholder=\"Enter rule name\" />\n @if (form.name().touched() && form.name().invalid()) {\n <small class=\"p-error\">{{ form.name().errors()[0].message }}</small>\n }\n </div>\n\n <div class=\"form-field\">\n <label for=\"type\" class=\"block\">Type</label>\n <p-select id=\"type\" class=\"w-full\"\n [options]=\"typeOptions\" optionLabel=\"label\" optionValue=\"value\"\n [ngModel]=\"entityForm().type\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, type: $event }))\"\n placeholder=\"None\"></p-select>\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea rows=\"1\" class=\"w-full\"\n [ngModel]=\"entityForm().description\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, description: $event }))\"\n placeholder=\"Enter description\"></textarea>\n </div>\n\n <div class=\"form-field\">\n <label for=\"rule\" class=\"block\">Rule</label>\n <textarea id=\"rule\" pTextarea rows=\"3\" class=\"w-full\"\n [ngModel]=\"entityForm().rule\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, rule: $event }))\"\n placeholder=\"Enter rule content\"></textarea>\n </div>\n\n </div>\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button (click)=\"save()\" label=\"Save Rule\" [disabled]=\"!isValid()\" icon=\"pi pi-check\" iconPos=\"right\"></p-button>\n </div>\n\n
|
|
9457
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<h3>ConversationRules Form</h3>\n\n<div class=\"source-form-card\">\n <p-card>\n <ng-template pTemplate=\"header\">\n <div class=\"form-card-header\">\n <span class=\"form-card-title\">{{ entityId() ? 'Edit Conversation Rule' : 'New Conversation Rule' }}</span>\n @if (entityId()) {\n <p-button label=\"Ver detalles\" icon=\"pi pi-eye\" [text]=\"true\" (click)=\"goToDetail()\"></p-button>\n }\n </div>\n </ng-template>\n\n <div style=\"display: flex; gap: 10px\">\n <div style=\"width: 100%\">\n\n <div class=\"form-field\">\n <label for=\"name\" class=\"block\">Name</label>\n <input pInputText id=\"name\" type=\"text\"\n [formField]=\"form.name\"\n placeholder=\"Enter rule name\" />\n @if (form.name().touched() && form.name().invalid()) {\n <small class=\"p-error\">{{ form.name().errors()[0].message }}</small>\n }\n </div>\n\n <div class=\"form-field\">\n <label for=\"type\" class=\"block\">Type</label>\n <p-select id=\"type\" class=\"w-full\"\n [options]=\"typeOptions\" optionLabel=\"label\" optionValue=\"value\"\n [ngModel]=\"entityForm().type\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, type: $event }))\"\n placeholder=\"None\"></p-select>\n </div>\n\n <div class=\"form-field\">\n <label for=\"description\" class=\"block\">Description</label>\n <textarea id=\"description\" pTextarea rows=\"1\" class=\"w-full\"\n [ngModel]=\"entityForm().description\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, description: $event }))\"\n placeholder=\"Enter description\"></textarea>\n </div>\n\n <div class=\"form-field\">\n <label for=\"rule\" class=\"block\">Rule</label>\n <textarea id=\"rule\" pTextarea rows=\"3\" class=\"w-full\"\n [ngModel]=\"entityForm().rule\"\n (ngModelChange)=\"entityForm.update(m => ({ ...m, rule: $event }))\"\n placeholder=\"Enter rule content\"></textarea>\n </div>\n\n </div>\n </div>\n\n <div style=\"display: flex; justify-content: flex-end\">\n <p-button (click)=\"save()\" label=\"Save Rule\" [disabled]=\"!isValid()\" icon=\"pi pi-check\" iconPos=\"right\"></p-button>\n </div>\n\n\n </p-card>\n</div>\n", styles: [":host{display:block;padding:1rem}.source-form-card{max-width:800px;margin:0 auto}.form-field{margin-bottom:1.5rem;display:flex;flex-direction:column}.form-field label{margin-bottom:.5rem;font-weight:500;color:#495057}.form-field input,.form-field textarea,.form-field ::ng-deep .p-element{margin-top:.25rem}:host ::ng-deep .p-card .p-card-content>div:last-child{margin-top:1.5rem;display:flex;justify-content:flex-end}:host ::ng-deep .p-card .p-card-header{background-color:#f8f9fa;padding:1rem;border-bottom:1px solid #dee2e6}.form-card-header{display:flex;align-items:center;justify-content:space-between;gap:1rem}.form-card-title{font-weight:600;font-size:1.1rem;color:#495057}h3{color:#495057;margin-bottom:1.5rem;text-align:center}\n"] }]
|
|
9455
9458
|
}] });
|
|
9456
9459
|
|
|
9457
9460
|
const GENERICS_ROUTES = [
|
|
@@ -9656,7 +9659,10 @@ class CardRouteFormComponent extends EntityBaseSignalFormComponent {
|
|
|
9656
9659
|
};
|
|
9657
9660
|
}
|
|
9658
9661
|
loadEntity(entity) {
|
|
9659
|
-
this.entityForm.set(
|
|
9662
|
+
this.entityForm.set({
|
|
9663
|
+
...emptyCardRoute(),
|
|
9664
|
+
...entity,
|
|
9665
|
+
});
|
|
9660
9666
|
}
|
|
9661
9667
|
getFormValue() {
|
|
9662
9668
|
return this.entityForm();
|