@seniorsistemas/angular-components 17.27.1-feature-sds-110-174b0744 → 17.27.1-feature-sds-110-660dd566
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/button/lib/button/button.component.d.ts +3 -3
- package/button/lib/button/button.module.d.ts +1 -6
- package/confirm-dialog/README.md +226 -0
- package/confirm-dialog/index.d.ts +5 -0
- package/confirm-dialog/lib/confirm-dialog.model.d.ts +8 -0
- package/confirm-dialog/lib/confirm-dialog.service.d.ts +8 -0
- package/confirm-dialog/lib/popup-confirm-dialog/popup-confirm-dialog.component.d.ts +7 -0
- package/confirm-dialog/package.json +3 -0
- package/confirm-dialog/public-api.d.ts +2 -0
- package/dialog/index.d.ts +5 -0
- package/dialog/lib/src/dialog/dialog.component.d.ts +29 -0
- package/dialog/lib/src/dialog/models/active-dialog.d.ts +11 -0
- package/dialog/lib/src/dialog/models/dialog-models.d.ts +18 -0
- package/dialog/lib/src/dialog/services/dialog.service.d.ts +24 -0
- package/dialog/lib/src/dialog/services/internal-dialog.service.d.ts +10 -0
- package/dialog/package.json +3 -0
- package/dialog/public-api.d.ts +4 -0
- package/dynamic-form/lib/dynamic-form/components/lookup/lookup.component.d.ts +2 -2
- package/dynamic-form/lib/dynamic-form/dynamic-form.module.d.ts +2 -2
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-accordion.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-button.mjs +16 -25
- package/fesm2022/seniorsistemas-angular-components-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-confirm-dialog.mjs +54 -0
- package/fesm2022/seniorsistemas-angular-components-confirm-dialog.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components-dialog.mjs +221 -0
- package/fesm2022/seniorsistemas-angular-components-dialog.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +83 -78
- package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs +11 -7
- package/fesm2022/seniorsistemas-angular-components-fieldset.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-gantt.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs +15 -10
- package/fesm2022/seniorsistemas-angular-components-image-cropper.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-info-sign.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-inline-edit.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs +1 -0
- package/fesm2022/seniorsistemas-angular-components-interactive-content.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-navigation-button.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs +3 -3
- package/fesm2022/seniorsistemas-angular-components-object-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-select.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-select.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-shared.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-slider.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-slider.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-stats-card.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-steps.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-steps.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-structure.mjs +5 -15
- package/fesm2022/seniorsistemas-angular-components-structure.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-table.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tabs.mjs +91 -0
- package/fesm2022/seniorsistemas-angular-components-tabs.mjs.map +1 -0
- package/fesm2022/seniorsistemas-angular-components-template.mjs +8 -11
- package/fesm2022/seniorsistemas-angular-components-template.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-text-area-ia.mjs +22 -15
- package/fesm2022/seniorsistemas-angular-components-text-area-ia.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tile.mjs +1 -1
- package/fesm2022/seniorsistemas-angular-components-tile.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs +2 -2
- package/fesm2022/seniorsistemas-angular-components-timeline.mjs.map +1 -1
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs +16 -6
- package/fesm2022/seniorsistemas-angular-components-tooltip.mjs.map +1 -1
- package/fieldset/lib/fieldset/fieldset.component.d.ts +7 -5
- package/image-cropper/lib/image-cropper/image-cropper.component.d.ts +2 -0
- package/image-cropper/lib/image-cropper/image-cropper.module.d.ts +6 -5
- package/package.json +23 -2
- package/structure/lib/structure/header.component.d.ts +0 -2
- package/tabs/index.d.ts +5 -0
- package/tabs/lib/tab-item/tab-item.component.d.ts +18 -0
- package/tabs/lib/tabs/tabs.component.d.ts +16 -0
- package/tabs/package.json +3 -0
- package/tabs/public-api.d.ts +2 -0
- package/tailwind.css +135 -2
- package/template/lib/template/template.directive.d.ts +2 -3
- package/template/lib/template/template.module.d.ts +3 -3
- package/text-area-ia/lib/text-area-ia/text-area-ia.module.d.ts +7 -6
- package/tooltip/lib/tooltip/tooltip.directive.d.ts +4 -2
- package/tooltip/lib/tooltip/tooltip.module.d.ts +3 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { NgTemplateOutlet, NgClass } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { viewChild, contentChildren, computed, input, model, Component } from '@angular/core';
|
|
4
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
5
|
+
import { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';
|
|
6
|
+
import { Subject, takeUntil } from 'rxjs';
|
|
7
|
+
import { TemplateDirective } from '@seniorsistemas/angular-components/template';
|
|
8
|
+
import { InteractiveContentDirective } from '@seniorsistemas/angular-components/interactive-content';
|
|
9
|
+
|
|
10
|
+
class TabItemComponent {
|
|
11
|
+
_template = viewChild('template');
|
|
12
|
+
headerTemplateDirectives = contentChildren(TemplateDirective);
|
|
13
|
+
templateContent = computed(() => {
|
|
14
|
+
return this.headerTemplateDirectives()?.find((x) => x.type === 'body')?.template;
|
|
15
|
+
});
|
|
16
|
+
icon = input();
|
|
17
|
+
header = input();
|
|
18
|
+
disabled = input(false);
|
|
19
|
+
value = model();
|
|
20
|
+
destroyOnHide = input(false);
|
|
21
|
+
template = computed(() => {
|
|
22
|
+
const _template = this._template();
|
|
23
|
+
const templateContent = this.templateContent();
|
|
24
|
+
return templateContent ? templateContent : _template;
|
|
25
|
+
});
|
|
26
|
+
headerElement = computed(() => {
|
|
27
|
+
return this.headerTemplateDirectives()?.find((x) => x.type === 'header')?.template;
|
|
28
|
+
});
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
if (this.destroyOnHide() && !this.templateContent()) {
|
|
31
|
+
console.error("When destroyOnHide is true sTemplate='body' is required");
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.13", type: TabItemComponent, isStandalone: true, selector: "s-tab-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, destroyOnHide: { classPropertyName: "destroyOnHide", publicName: "destroyOnHide", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, queries: [{ propertyName: "headerTemplateDirectives", predicate: TemplateDirective, isSignal: true }], viewQueries: [{ propertyName: "_template", first: true, predicate: ["template"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #template>\n <ng-content></ng-content>\n</ng-template>\n" });
|
|
37
|
+
}
|
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabItemComponent, decorators: [{
|
|
39
|
+
type: Component,
|
|
40
|
+
args: [{ selector: 's-tab-item', standalone: true, template: "<ng-template #template>\n <ng-content></ng-content>\n</ng-template>\n" }]
|
|
41
|
+
}] });
|
|
42
|
+
|
|
43
|
+
class TabsComponent {
|
|
44
|
+
onDestroy$ = new Subject();
|
|
45
|
+
tabItems = contentChildren(TabItemComponent);
|
|
46
|
+
activeTabComponent = computed(() => {
|
|
47
|
+
return this.tabItems().find((tab) => tab.value() === this.activeTab() && tab.destroyOnHide())?.template();
|
|
48
|
+
});
|
|
49
|
+
keepAliveTabsContent = computed(() => {
|
|
50
|
+
return this.tabItems().filter((tab) => !tab.destroyOnHide());
|
|
51
|
+
});
|
|
52
|
+
activeTab = model(0);
|
|
53
|
+
layoutType = input('horizontal');
|
|
54
|
+
constructor() {
|
|
55
|
+
toObservable(this.tabItems).pipe(takeUntil(this.onDestroy$)).subscribe(() => {
|
|
56
|
+
const tabs = this.tabItems();
|
|
57
|
+
tabs.forEach((tab, $index) => {
|
|
58
|
+
const tabHasValue = !!tab.value();
|
|
59
|
+
if (!tabHasValue) {
|
|
60
|
+
tab.value.set($index);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
ngOnDestroy() {
|
|
66
|
+
this.onDestroy$.next();
|
|
67
|
+
}
|
|
68
|
+
onActiveTab(tab) {
|
|
69
|
+
if (tab.disabled()) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const _previousTab = this.tabItems().find((tab) => tab.value() === this.activeTab());
|
|
73
|
+
if (_previousTab && !_previousTab.templateContent() && _previousTab.destroyOnHide()) {
|
|
74
|
+
_previousTab.template();
|
|
75
|
+
}
|
|
76
|
+
this.activeTab.set(tab.value());
|
|
77
|
+
}
|
|
78
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TabsComponent, isStandalone: true, selector: "s-tabs", inputs: { activeTab: { classPropertyName: "activeTab", publicName: "activeTab", isSignal: true, isRequired: false, transformFunction: null }, layoutType: { classPropertyName: "layoutType", publicName: "layoutType", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeTab: "activeTabChange" }, queries: [{ propertyName: "tabItems", predicate: TabItemComponent, isSignal: true }], ngImport: i0, template: "@let layout = layoutType();\n@let isHorizontal = layout === 'horizontal';\n@let isVertical = layout === 'vertical';\n<ng-template #buttonsRender>\n @for (tab of tabItems(); track $index) {\n @let isActiveTab = tab.value() === activeTab();\n @let disabledTab = tab.disabled();\n <button\n #tabButton\n (sInteractiveContent)=\"onActiveTab(tab)\"\n class=\"flex min-h-11 min-w-24 justify-start overflow-hidden text-ellipsis whitespace-nowrap border-primary p-2 hover:transition-all disabled:border-grayscale-30 disabled:text-grayscale-30\"\n [class.active-tab]=\"isActiveTab\"\n [disabled]=\"disabledTab\"\n [ngClass]=\"{\n 'font-bold': isActiveTab,\n 'text-primary': !isActiveTab,\n 'border-b-4': isActiveTab && isHorizontal,\n 'border-r-4': isActiveTab && isVertical,\n 'hover:border-b-4': isHorizontal && !disabledTab,\n 'hover:border-r-4': isVertical && !disabledTab,\n 'flex items-center gap-2': tab.icon(),\n }\"\n >\n @let headerElement = tab.headerElement();\n @if (headerElement) {\n <ng-container *ngTemplateOutlet=\"headerElement\"></ng-container>\n } @else {\n @if (tab.icon()) {\n <i\n class=\"text-grayscale-100\"\n [class]=\"tab.icon()\"\n ></i>\n }\n <span\n class=\"block overflow-hidden text-ellipsis whitespace-nowrap text-left\"\n [class.max-w-28]=\"isHorizontal\"\n [sTooltip]=\"tab.header()\"\n [visible]=\"!disabledTab\"\n [checkTruncatedText]=\"true\"\n >\n {{ tab.header() }}\n </span>\n }\n </button>\n }\n</ng-template>\n\n<ng-template #renderComponent>\n @let template = activeTabComponent();\n @if (template) {\n <section class=\"h-full min-h-10 bg-grayscale-0 p-2\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </section>\n }\n @for (keepAliveTab of keepAliveTabsContent(); track $index) {\n @let isActiveTab = keepAliveTab.value() === activeTab();\n\n <section\n class=\"h-full min-h-10 bg-grayscale-0 p-2\"\n [class.hidden]=\"!isActiveTab\"\n [class.block]=\"isActiveTab\"\n >\n @if (keepAliveTab.template()) {\n <ng-container *ngTemplateOutlet=\"keepAliveTab.template()!\"></ng-container>\n }\n </section>\n }\n</ng-template>\n\n@if (isHorizontal) {\n <section class=\"p-2\">\n <div class=\"flex grid-flow-col overflow-auto border-b-[1px] border-b-grayscale-20\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </section>\n} @else if (isVertical) {\n <section class=\"vertical-tab flex w-full flex-wrap gap-2\">\n <aside class=\"vertical-tab-buttons flex max-h-96 flex-col overflow-auto\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </aside>\n <aside class=\"vertical-tab-content flex-1\">\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </aside>\n </section>\n}\n", styles: [".vertical-tab{container:vertical-tab/inline-size}.vertical-tab-buttons{width:14rem}.vertical-tab-content{min-width:20rem}@container vertical-tab (max-width: 552px){.vertical-tab-buttons{width:100%;flex-direction:row}.vertical-tab-buttons .active-tab,.vertical-tab-buttons button:hover{border-right:none;border-bottom-width:4px}}\n"], dependencies: [{ kind: "directive", type: InteractiveContentDirective, selector: "[sInteractiveContent]", inputs: ["focusable", "disabled"], outputs: ["sInteractiveContent"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }] });
|
|
80
|
+
}
|
|
81
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TabsComponent, decorators: [{
|
|
82
|
+
type: Component,
|
|
83
|
+
args: [{ selector: 's-tabs', standalone: true, imports: [InteractiveContentDirective, NgTemplateOutlet, NgClass, TooltipDirective], template: "@let layout = layoutType();\n@let isHorizontal = layout === 'horizontal';\n@let isVertical = layout === 'vertical';\n<ng-template #buttonsRender>\n @for (tab of tabItems(); track $index) {\n @let isActiveTab = tab.value() === activeTab();\n @let disabledTab = tab.disabled();\n <button\n #tabButton\n (sInteractiveContent)=\"onActiveTab(tab)\"\n class=\"flex min-h-11 min-w-24 justify-start overflow-hidden text-ellipsis whitespace-nowrap border-primary p-2 hover:transition-all disabled:border-grayscale-30 disabled:text-grayscale-30\"\n [class.active-tab]=\"isActiveTab\"\n [disabled]=\"disabledTab\"\n [ngClass]=\"{\n 'font-bold': isActiveTab,\n 'text-primary': !isActiveTab,\n 'border-b-4': isActiveTab && isHorizontal,\n 'border-r-4': isActiveTab && isVertical,\n 'hover:border-b-4': isHorizontal && !disabledTab,\n 'hover:border-r-4': isVertical && !disabledTab,\n 'flex items-center gap-2': tab.icon(),\n }\"\n >\n @let headerElement = tab.headerElement();\n @if (headerElement) {\n <ng-container *ngTemplateOutlet=\"headerElement\"></ng-container>\n } @else {\n @if (tab.icon()) {\n <i\n class=\"text-grayscale-100\"\n [class]=\"tab.icon()\"\n ></i>\n }\n <span\n class=\"block overflow-hidden text-ellipsis whitespace-nowrap text-left\"\n [class.max-w-28]=\"isHorizontal\"\n [sTooltip]=\"tab.header()\"\n [visible]=\"!disabledTab\"\n [checkTruncatedText]=\"true\"\n >\n {{ tab.header() }}\n </span>\n }\n </button>\n }\n</ng-template>\n\n<ng-template #renderComponent>\n @let template = activeTabComponent();\n @if (template) {\n <section class=\"h-full min-h-10 bg-grayscale-0 p-2\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </section>\n }\n @for (keepAliveTab of keepAliveTabsContent(); track $index) {\n @let isActiveTab = keepAliveTab.value() === activeTab();\n\n <section\n class=\"h-full min-h-10 bg-grayscale-0 p-2\"\n [class.hidden]=\"!isActiveTab\"\n [class.block]=\"isActiveTab\"\n >\n @if (keepAliveTab.template()) {\n <ng-container *ngTemplateOutlet=\"keepAliveTab.template()!\"></ng-container>\n }\n </section>\n }\n</ng-template>\n\n@if (isHorizontal) {\n <section class=\"p-2\">\n <div class=\"flex grid-flow-col overflow-auto border-b-[1px] border-b-grayscale-20\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </section>\n} @else if (isVertical) {\n <section class=\"vertical-tab flex w-full flex-wrap gap-2\">\n <aside class=\"vertical-tab-buttons flex max-h-96 flex-col overflow-auto\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </aside>\n <aside class=\"vertical-tab-content flex-1\">\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </aside>\n </section>\n}\n", styles: [".vertical-tab{container:vertical-tab/inline-size}.vertical-tab-buttons{width:14rem}.vertical-tab-content{min-width:20rem}@container vertical-tab (max-width: 552px){.vertical-tab-buttons{width:100%;flex-direction:row}.vertical-tab-buttons .active-tab,.vertical-tab-buttons button:hover{border-right:none;border-bottom-width:4px}}\n"] }]
|
|
84
|
+
}], ctorParameters: () => [] });
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Generated bundle index. Do not edit.
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
export { TabItemComponent, TabsComponent };
|
|
91
|
+
//# sourceMappingURL=seniorsistemas-angular-components-tabs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-tabs.mjs","sources":["../../projects/angular-components/tabs/src/lib/tab-item/tab-item.component.ts","../../projects/angular-components/tabs/src/lib/tab-item/tab-item.component.html","../../projects/angular-components/tabs/src/lib/tabs/tabs.component.ts","../../projects/angular-components/tabs/src/lib/tabs/tabs.component.html","../../projects/angular-components/tabs/src/seniorsistemas-angular-components-tabs.ts"],"sourcesContent":["import { AfterViewInit, Component, computed, contentChildren, input, model, TemplateRef, viewChild } from '@angular/core';\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\n\n@Component({\n selector: 's-tab-item',\n standalone: true,\n templateUrl: './tab-item.component.html',\n})\nexport class TabItemComponent implements AfterViewInit {\n readonly _template = viewChild<TemplateRef<any>>('template');\n readonly headerTemplateDirectives = contentChildren(TemplateDirective);\n readonly templateContent = computed(() => {\n return this.headerTemplateDirectives()?.find((x) => x.type === 'body')?.template;\n })\n icon = input<string>();\n header = input<string>();\n disabled = input<boolean>(false);\n value = model<string | number>();\n destroyOnHide = input(false);\n template = computed(() => {\n const _template = this._template();\n const templateContent = this.templateContent();\n return templateContent ? templateContent : _template;\n })\n headerElement = computed(() => {\n return this.headerTemplateDirectives()?.find((x) => x.type === 'header')?.template;\n })\n\n ngAfterViewInit(): void {\n if (this.destroyOnHide() && !this.templateContent()) {\n console.error(\"When destroyOnHide is true sTemplate='body' is required\")\n }\n return;\n\n }\n}\n","<ng-template #template>\n <ng-content></ng-content>\n</ng-template>\n","import { NgClass, NgTemplateOutlet } from '@angular/common';\nimport { Component, computed, contentChildren, input, model, OnDestroy } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { TooltipDirective } from '@seniorsistemas/angular-components/tooltip';\nimport { Subject, takeUntil } from 'rxjs';\nimport { TabItemComponent } from '../tab-item/tab-item.component';\nimport { InteractiveContentDirective } from '@seniorsistemas/angular-components/interactive-content';\n\n@Component({\n selector: 's-tabs',\n standalone: true,\n imports: [InteractiveContentDirective, NgTemplateOutlet, NgClass, TooltipDirective],\n templateUrl: './tabs.component.html',\n styleUrls: ['./tabs.component.scss']\n})\nexport class TabsComponent implements OnDestroy {\n private readonly onDestroy$ = new Subject<void>();\n protected readonly tabItems = contentChildren(TabItemComponent);\n\n protected readonly activeTabComponent = computed(() => {\n return this.tabItems().find((tab) => tab.value() === this.activeTab() && tab.destroyOnHide())?.template();\n })\n\n protected readonly keepAliveTabsContent = computed(() => {\n return this.tabItems().filter((tab) => !tab.destroyOnHide())\n })\n\n activeTab = model<string | number>(0);\n layoutType = input<'horizontal' | 'vertical'>('horizontal');\n\n constructor() {\n toObservable(this.tabItems).pipe(takeUntil(this.onDestroy$)).subscribe(() => {\n const tabs = this.tabItems();\n tabs.forEach((tab, $index) => {\n const tabHasValue = !!tab.value();\n if (!tabHasValue) {\n tab.value.set($index);\n }\n })\n })\n }\n\n ngOnDestroy(): void {\n this.onDestroy$.next();\n }\n\n protected onActiveTab(tab: TabItemComponent) {\n if (tab.disabled()) {\n return;\n }\n const _previousTab = this.tabItems().find((tab) => tab.value() === this.activeTab());\n if (_previousTab && !_previousTab.templateContent() && _previousTab.destroyOnHide()) {\n _previousTab.template()\n }\n this.activeTab.set(tab.value() as string | number);\n }\n\n}\n","@let layout = layoutType();\n@let isHorizontal = layout === 'horizontal';\n@let isVertical = layout === 'vertical';\n<ng-template #buttonsRender>\n @for (tab of tabItems(); track $index) {\n @let isActiveTab = tab.value() === activeTab();\n @let disabledTab = tab.disabled();\n <button\n #tabButton\n (sInteractiveContent)=\"onActiveTab(tab)\"\n class=\"flex min-h-11 min-w-24 justify-start overflow-hidden text-ellipsis whitespace-nowrap border-primary p-2 hover:transition-all disabled:border-grayscale-30 disabled:text-grayscale-30\"\n [class.active-tab]=\"isActiveTab\"\n [disabled]=\"disabledTab\"\n [ngClass]=\"{\n 'font-bold': isActiveTab,\n 'text-primary': !isActiveTab,\n 'border-b-4': isActiveTab && isHorizontal,\n 'border-r-4': isActiveTab && isVertical,\n 'hover:border-b-4': isHorizontal && !disabledTab,\n 'hover:border-r-4': isVertical && !disabledTab,\n 'flex items-center gap-2': tab.icon(),\n }\"\n >\n @let headerElement = tab.headerElement();\n @if (headerElement) {\n <ng-container *ngTemplateOutlet=\"headerElement\"></ng-container>\n } @else {\n @if (tab.icon()) {\n <i\n class=\"text-grayscale-100\"\n [class]=\"tab.icon()\"\n ></i>\n }\n <span\n class=\"block overflow-hidden text-ellipsis whitespace-nowrap text-left\"\n [class.max-w-28]=\"isHorizontal\"\n [sTooltip]=\"tab.header()\"\n [visible]=\"!disabledTab\"\n [checkTruncatedText]=\"true\"\n >\n {{ tab.header() }}\n </span>\n }\n </button>\n }\n</ng-template>\n\n<ng-template #renderComponent>\n @let template = activeTabComponent();\n @if (template) {\n <section class=\"h-full min-h-10 bg-grayscale-0 p-2\">\n <ng-container *ngTemplateOutlet=\"template\" />\n </section>\n }\n @for (keepAliveTab of keepAliveTabsContent(); track $index) {\n @let isActiveTab = keepAliveTab.value() === activeTab();\n\n <section\n class=\"h-full min-h-10 bg-grayscale-0 p-2\"\n [class.hidden]=\"!isActiveTab\"\n [class.block]=\"isActiveTab\"\n >\n @if (keepAliveTab.template()) {\n <ng-container *ngTemplateOutlet=\"keepAliveTab.template()!\"></ng-container>\n }\n </section>\n }\n</ng-template>\n\n@if (isHorizontal) {\n <section class=\"p-2\">\n <div class=\"flex grid-flow-col overflow-auto border-b-[1px] border-b-grayscale-20\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </div>\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </section>\n} @else if (isVertical) {\n <section class=\"vertical-tab flex w-full flex-wrap gap-2\">\n <aside class=\"vertical-tab-buttons flex max-h-96 flex-col overflow-auto\">\n <ng-container *ngTemplateOutlet=\"buttonsRender\"></ng-container>\n </aside>\n <aside class=\"vertical-tab-content flex-1\">\n <ng-container *ngTemplateOutlet=\"renderComponent\"></ng-container>\n </aside>\n </section>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAQa,gBAAgB,CAAA;AAClB,IAAA,SAAS,GAAG,SAAS,CAAmB,UAAU,CAAC,CAAC;AACpD,IAAA,wBAAwB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAC9D,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAK;QACvC,OAAO,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,MAAM,CAAC,EAAE,QAAQ,CAAC;AACnF,KAAC,CAAC,CAAA;IACF,IAAI,GAAG,KAAK,EAAU,CAAC;IACvB,MAAM,GAAG,KAAK,EAAU,CAAC;AACzB,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;IACjC,KAAK,GAAG,KAAK,EAAmB,CAAC;AACjC,IAAA,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;AAC7B,IAAA,QAAQ,GAAG,QAAQ,CAAC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AAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,cAAA,EAAA,QAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIvE,aAAa,EAAA,UAAA,EAAA,CAAA;kBAPzB,SAAS;+BACE,QAAQ,EAAA,UAAA,EACN,IAAI,EAAA,OAAA,EACP,CAAC,2BAA2B,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,w9GAAA,EAAA,MAAA,EAAA,CAAA,4UAAA,CAAA,EAAA,CAAA;;;AEXrF;;AAEG;;;;"}
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, TemplateRef, Directive, Input, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
class TemplateDirective {
|
|
6
|
-
template;
|
|
7
6
|
type;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TemplateDirective, selector: "[sTemplate]", inputs: { type: ["sTemplate", "type"] }, ngImport: i0 });
|
|
7
|
+
template = inject((TemplateRef));
|
|
8
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
9
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TemplateDirective, isStandalone: true, selector: "[sTemplate]", inputs: { type: ["sTemplate", "type"] }, ngImport: i0 });
|
|
13
10
|
}
|
|
14
11
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateDirective, decorators: [{
|
|
15
12
|
type: Directive,
|
|
16
13
|
args: [{
|
|
17
14
|
selector: '[sTemplate]',
|
|
15
|
+
standalone: true
|
|
18
16
|
}]
|
|
19
|
-
}],
|
|
17
|
+
}], propDecorators: { type: [{
|
|
20
18
|
type: Input,
|
|
21
19
|
args: [{
|
|
22
20
|
alias: 'sTemplate',
|
|
@@ -26,14 +24,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
26
24
|
|
|
27
25
|
class TemplateModule {
|
|
28
26
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
29
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TemplateModule,
|
|
27
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TemplateModule, imports: [CommonModule, TemplateDirective], exports: [TemplateDirective] });
|
|
30
28
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateModule, imports: [CommonModule] });
|
|
31
29
|
}
|
|
32
30
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TemplateModule, decorators: [{
|
|
33
31
|
type: NgModule,
|
|
34
32
|
args: [{
|
|
35
|
-
imports: [CommonModule],
|
|
36
|
-
declarations: [TemplateDirective],
|
|
33
|
+
imports: [CommonModule, TemplateDirective],
|
|
37
34
|
exports: [TemplateDirective],
|
|
38
35
|
}]
|
|
39
36
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-template.mjs","sources":["../../projects/angular-components/template/src/lib/template/template.directive.ts","../../projects/angular-components/template/src/lib/template/template.module.ts","../../projects/angular-components/template/src/seniorsistemas-angular-components-template.ts"],"sourcesContent":["import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[sTemplate]',\n})\nexport class TemplateDirective {\n @Input({\n alias: 'sTemplate',\n required: true,\n })\n public type!: string;\n\n
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-template.mjs","sources":["../../projects/angular-components/template/src/lib/template/template.directive.ts","../../projects/angular-components/template/src/lib/template/template.module.ts","../../projects/angular-components/template/src/seniorsistemas-angular-components-template.ts"],"sourcesContent":["import { Directive, inject, Input, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[sTemplate]',\n standalone: true\n})\nexport class TemplateDirective {\n @Input({\n alias: 'sTemplate',\n required: true,\n })\n public type!: string;\n\n readonly template = inject(TemplateRef<any>)\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TemplateDirective } from './template.directive';\n\n@NgModule({\n imports: [CommonModule, TemplateDirective],\n exports: [TemplateDirective],\n})\nexport class TemplateModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAMa,iBAAiB,CAAA;AAKnB,IAAA,IAAI,CAAU;AAEZ,IAAA,QAAQ,GAAG,MAAM,EAAC,WAAgB,EAAC,CAAA;wGAPnC,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EA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,iBAAiB,CAAC;AAC/B,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -9,16 +9,18 @@ import * as i2 from '@seniorsistemas/angular-components/toast';
|
|
|
9
9
|
import * as i3 from '@ngx-translate/core';
|
|
10
10
|
import { TranslateModule } from '@ngx-translate/core';
|
|
11
11
|
import * as i4 from '@seniorsistemas/angular-components/speech-recognition';
|
|
12
|
-
import * as i5 from '
|
|
13
|
-
import { DialogModule } from 'primeng/dialog';
|
|
14
|
-
import * as i6 from '@seniorsistemas/angular-components/button';
|
|
12
|
+
import * as i5 from '@seniorsistemas/angular-components/button';
|
|
15
13
|
import { ButtonModule } from '@seniorsistemas/angular-components/button';
|
|
16
|
-
import * as
|
|
14
|
+
import * as i6 from '@seniorsistemas/angular-components/loading-state';
|
|
17
15
|
import { LoadingStateModule } from '@seniorsistemas/angular-components/loading-state';
|
|
18
|
-
import * as
|
|
16
|
+
import * as i7 from '@angular/common';
|
|
19
17
|
import { NgTemplateOutlet } from '@angular/common';
|
|
20
|
-
import * as
|
|
18
|
+
import * as i8 from '@seniorsistemas/angular-components/text-area';
|
|
21
19
|
import { TextAreaModule } from '@seniorsistemas/angular-components/text-area';
|
|
20
|
+
import * as i9 from '@seniorsistemas/angular-components/dialog';
|
|
21
|
+
import { DialogComponent } from '@seniorsistemas/angular-components/dialog';
|
|
22
|
+
import * as i10 from '@seniorsistemas/angular-components/template';
|
|
23
|
+
import { TemplateModule } from '@seniorsistemas/angular-components/template';
|
|
22
24
|
|
|
23
25
|
class IAssistService {
|
|
24
26
|
http;
|
|
@@ -151,7 +153,9 @@ class TextAreaIAComponent {
|
|
|
151
153
|
this.isVisible = false;
|
|
152
154
|
}
|
|
153
155
|
onHideDialog() {
|
|
154
|
-
this.
|
|
156
|
+
if (this.isVisible === false) {
|
|
157
|
+
this.formGroup.get('context')?.setValue('');
|
|
158
|
+
}
|
|
155
159
|
}
|
|
156
160
|
submitContext() {
|
|
157
161
|
const context = this.formGroup.get('context');
|
|
@@ -189,7 +193,7 @@ class TextAreaIAComponent {
|
|
|
189
193
|
useExisting: forwardRef(() => TextAreaIAComponent),
|
|
190
194
|
multi: true,
|
|
191
195
|
},
|
|
192
|
-
], viewQueries: [{ propertyName: "textArea", first: true, predicate: ["textAreaElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\"\n>\n <ng-template #header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </ng-template>\n\n <form [formGroup]=\"formGroup\">\n <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n <s-textarea inputId=\"context\" formControlName=\"context\" [speechRecognition]=\"speechRecognition\" [keepContext]=\"keepContext\" />\n </form>\n\n <ng-template #footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (clicked)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n >\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (clicked)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n >\n </s-button>\n </div>\n </ng-template>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textAreaElement\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [rows]=\"rows\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n [maxLength]=\"maxLength\"\n [speechRecognition]=\"speechRecognition\">\n </s-textarea>\n <!--TODO: Tooltip em propriedade-->\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\"\n >\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg\n style=\"width: 100%; height: 100%\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n fill=\"#F3F3F5\"\n />\n <path\n d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n fill=\"#0C847B\"\n />\n <path\n d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n fill=\"#0C847B\"\n />\n </svg>\n</ng-template>\n", styles: [".footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.iassist-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}s-textarea{width:100%}.speech-recognition{margin-bottom:12.5px}\n"], dependencies: [{ kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "positionLeft", "positionTop", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "responsive", "appendTo", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "breakpoint", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "component", type: i6.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i7.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "directive", type: i8.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i9.TextAreaComponent, selector: "s-textarea", inputs: ["inputId", "rows", "speechRecognition", "keyFilter", "keepContext", "speechRecognitionPlaceholder", "maxLength", "placeholder", "inputStyle", "readOnly"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
196
|
+
], viewQueries: [{ propertyName: "textArea", first: true, predicate: ["textAreaElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<s-dialog\n [(visible)]=\"isVisible\"\n [escapeOnEsc]=\"false\"\n [destroyClickOutside]=\"false\"\n size=\"lg\"\n (visibleChange)=\"onHideDialog()\"\n>\n <ng-template sTemplate=\"header\">\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </ng-template>\n\n <form [formGroup]=\"formGroup\">\n <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n <s-textarea\n inputId=\"context\"\n formControlName=\"context\"\n [speechRecognition]=\"speechRecognition\"\n [keepContext]=\"keepContext\"\n />\n </form>\n\n <ng-template sTemplate=\"footer\">\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (clicked)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n >\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (clicked)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n >\n </s-button>\n </div>\n </ng-template>\n</s-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textAreaElement\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [rows]=\"rows\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n [maxLength]=\"maxLength\"\n [speechRecognition]=\"speechRecognition\"\n >\n </s-textarea>\n <!--TODO: Tooltip em propriedade-->\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\"\n >\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg\n style=\"width: 100%; height: 100%\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n fill=\"#F3F3F5\"\n />\n <path\n d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n fill=\"#0C847B\"\n />\n <path\n d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n fill=\"#0C847B\"\n />\n </svg>\n</ng-template>\n", styles: [".footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.iassist-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}s-textarea{width:100%}.speech-recognition{margin-bottom:12.5px}\n"], dependencies: [{ kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i5.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }, { kind: "component", type: i6.LoadingStateComponent, selector: "s-loading-state", inputs: ["indicator", "id", "blockWindow", "loading"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.TextAreaComponent, selector: "s-textarea", inputs: ["inputId", "rows", "speechRecognition", "keyFilter", "keepContext", "speechRecognitionPlaceholder", "maxLength", "placeholder", "inputStyle", "readOnly"] }, { kind: "component", type: i9.DialogComponent, selector: "s-dialog", inputs: ["header", "visible", "size", "contentClassName", "escapeOnEsc", "destroyClickOutside"], outputs: ["visibleChange"] }, { kind: "directive", type: i10.TemplateDirective, selector: "[sTemplate]", inputs: ["sTemplate"] }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
|
|
193
197
|
}
|
|
194
198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextAreaIAComponent, decorators: [{
|
|
195
199
|
type: Component,
|
|
@@ -199,7 +203,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
199
203
|
useExisting: forwardRef(() => TextAreaIAComponent),
|
|
200
204
|
multi: true,
|
|
201
205
|
},
|
|
202
|
-
], template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<
|
|
206
|
+
], template: "<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<s-dialog\n [(visible)]=\"isVisible\"\n [escapeOnEsc]=\"false\"\n [destroyClickOutside]=\"false\"\n size=\"lg\"\n (visibleChange)=\"onHideDialog()\"\n>\n <ng-template sTemplate=\"header\">\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </ng-template>\n\n <form [formGroup]=\"formGroup\">\n <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n <s-textarea\n inputId=\"context\"\n formControlName=\"context\"\n [speechRecognition]=\"speechRecognition\"\n [keepContext]=\"keepContext\"\n />\n </form>\n\n <ng-template sTemplate=\"footer\">\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (clicked)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n >\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (clicked)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n >\n </s-button>\n </div>\n </ng-template>\n</s-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textAreaElement\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [rows]=\"rows\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n [maxLength]=\"maxLength\"\n [speechRecognition]=\"speechRecognition\"\n >\n </s-textarea>\n <!--TODO: Tooltip em propriedade-->\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\"\n >\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg\n style=\"width: 100%; height: 100%\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n fill=\"#F3F3F5\"\n />\n <path\n d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n fill=\"#0C847B\"\n />\n <path\n d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n fill=\"#0C847B\"\n />\n </svg>\n</ng-template>\n", styles: [".footer-content{display:flex;flex-grow:0}.textarea-ia{display:flex;align-items:flex-end;gap:8px}.iassist-button{display:flex;justify-content:center;align-items:center;border:none;border-radius:50%;box-shadow:none;cursor:pointer;height:32px;width:32px}.dialog-header{display:flex;gap:12px}.dialog-header .iassist-icon{display:block;height:24px;width:24px}s-textarea{width:100%}.speech-recognition{margin-bottom:12.5px}\n"] }]
|
|
203
207
|
}], ctorParameters: () => [{ type: IAssistService }, { type: i2$1.FormBuilder }, { type: i3.TranslateService }, { type: i4.SpeechRecognitionService }], propDecorators: { id: [{
|
|
204
208
|
type: Input
|
|
205
209
|
}], label: [{
|
|
@@ -229,18 +233,20 @@ class TextAreaIAModule {
|
|
|
229
233
|
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: TextAreaIAModule, declarations: [TextAreaIAComponent], imports: [FormsModule,
|
|
230
234
|
ReactiveFormsModule,
|
|
231
235
|
TranslateModule,
|
|
232
|
-
DialogModule,
|
|
233
236
|
ButtonModule,
|
|
234
237
|
LoadingStateModule,
|
|
235
238
|
NgTemplateOutlet,
|
|
236
|
-
TextAreaModule
|
|
239
|
+
TextAreaModule,
|
|
240
|
+
DialogComponent,
|
|
241
|
+
TemplateModule], exports: [TextAreaIAComponent] });
|
|
237
242
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextAreaIAModule, imports: [FormsModule,
|
|
238
243
|
ReactiveFormsModule,
|
|
239
244
|
TranslateModule,
|
|
240
|
-
DialogModule,
|
|
241
245
|
ButtonModule,
|
|
242
246
|
LoadingStateModule,
|
|
243
|
-
TextAreaModule
|
|
247
|
+
TextAreaModule,
|
|
248
|
+
DialogComponent,
|
|
249
|
+
TemplateModule] });
|
|
244
250
|
}
|
|
245
251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TextAreaIAModule, decorators: [{
|
|
246
252
|
type: NgModule,
|
|
@@ -249,11 +255,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
249
255
|
FormsModule,
|
|
250
256
|
ReactiveFormsModule,
|
|
251
257
|
TranslateModule,
|
|
252
|
-
DialogModule,
|
|
253
258
|
ButtonModule,
|
|
254
259
|
LoadingStateModule,
|
|
255
260
|
NgTemplateOutlet,
|
|
256
|
-
TextAreaModule
|
|
261
|
+
TextAreaModule,
|
|
262
|
+
DialogComponent,
|
|
263
|
+
TemplateModule
|
|
257
264
|
],
|
|
258
265
|
declarations: [TextAreaIAComponent],
|
|
259
266
|
exports: [TextAreaIAComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seniorsistemas-angular-components-text-area-ia.mjs","sources":["../../projects/angular-components/text-area-ia/src/lib/services/IAssist/iassist.service.ts","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.component.ts","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.component.html","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.module.ts","../../projects/angular-components/text-area-ia/src/seniorsistemas-angular-components-text-area-ia.ts"],"sourcesContent":["/* eslint-disable max-len */\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { IAssistInputData } from './models/iassist-input-data';\nimport { IAssistResponse } from './models/iassist-response';\nimport { ToastService } from \"@seniorsistemas/angular-components/toast\";\n\n@Injectable({ providedIn: 'root' })\nexport class IAssistService {\n\tconstructor(\n\t\tprivate readonly http: HttpClient,\n\t\tprivate readonly toastService: ToastService,\n\t) { }\n\n\tpublic askIA(context: string, data: IAssistInputData): Observable<IAssistResponse> {\n\t\tconst prompt: string = data.prompt\n\t\t\t? this._replacePlaceholder(context, data)\n\t\t\t: this._createPrompt(context, data);\n\n\t\treturn this.http\n\t\t\t.post<IAssistResponse>('platform/iassist/api/latest/completions', {\n\t\t\t\tprompt,\n\t\t\t\tprovider: 'OPEN_AI',\n\t\t\t\tparameters: {\n\t\t\t\t\tmodel: 'gpt-3.5-turbo',\n\t\t\t\t\tmax_tokens: 700,\n\t\t\t\t\ttemperature: 1,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tcatchError((err: HttpErrorResponse) => {\n\t\t\t\t\tthis.toastService.show({\n\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\ttitle: err.status ? String(err.status) : 'Error',\n\t\t\t\t\t\ttext: (err.error && err.error.message) || err.statusText || err.message || 'Error',\n\t\t\t\t\t});\n\t\t\t\t\treturn throwError(() => new Error(err.message));\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\tprivate _replacePlaceholder(context: string, data: IAssistInputData): string {\n\t\tconst values = { ...data, context };\n\t\tdelete (values as Partial<IAssistInputData>).prompt;\n\n\t\tlet result = data.prompt;\n\t\tfor (const key in { ...values, context: context }) {\n\t\t\tconst placeholder = new RegExp(`{{\\\\s*${key}\\\\s*}}`, 'g');\n\t\t\tresult = result.replace(placeholder, values[key as keyof typeof values]);\n\t\t}\n\n\t\tconsole.log('prompt', result);\n\t\treturn result;\n\t}\n\n\tprivate _createPrompt(context: string, data: IAssistInputData): string {\n\t\treturn `Crie um texto genérico para preencher o campo de textarea.\n ${data.label ? `O campo tem o label ${data.label}.` : ''}\n ${data.id ? `O campo tem o id ${data.id}.` : ''}\n ${data.placeholder ? `Considere as instruções/sugestões do placeholder: ${data.placeholder}.` : ''}\n Baseie-se no contexto informado pelo usuário: '${context}'.\n O texto deve ser formal e conter informações pertinentes a um campo como este, como se um usuário real tivesse preenchido com as informações necessárias.\n O texto deve ser neutro com relação a generos, raças, religiões, etc.\n O texto deve ser impessoal e não deve conter informações pessoais do usuário.\n Não direcione o texto a ninguém, não use expressões como: caro, atenciosamente. gostaria, agradeço. O texto deve ser genérico.\n\n Exemplos de texto:\n Um campo de descrição de usuário: \"Usuário com 20 anos, estudante de engenharia, gosta de jogar futebol e assistir filmes.\"\n Outro exemplo de descrição de usuário: \"Usuário administrador, com acesso total ao sistema, responsável por gerenciar os usuários e os produtos.\"\n Um campo de descrição de um produto: \"O produto é um celular, com tela de 6 polegadas, 128GB de armazenamento, 4GB de memória RAM, câmera de 12MP e bateria de 4000mAh.\"\n Outro exemplo de descrição de produto: \"O produto é uma geladeira, com capacidade de 500 litros, 2 portas, cor branca, com freezer e gaveta de legumes.\"\n Outro exemplo de descrição de produto: \"O produto é uma camiseta, tamanho M, cor azul, 100% algodão, com estampa de um gato.\"\n\n Em caso de contexto incompleto crie um texto genérico, como se fosse um exemplo de preenchimento do campo.\n O texto é para um campo de textarea, então escreva um texto sucinto.\n Exiba apenas o texto do output`;\n\t}\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, computed, ElementRef, forwardRef, Input, OnInit, viewChild } from '@angular/core';\nimport { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { TranslateService } from '@ngx-translate/core';\n\nimport { throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { IAssistService } from '../services/IAssist/iassist.service';\nimport { IAssistResponse } from '../services/IAssist/models/iassist-response';\nimport { SpeechRecognitionService } from '@seniorsistemas/angular-components/speech-recognition';\nimport { TextAreaComponent } from '@seniorsistemas/angular-components/text-area';\n\n@Component({\n selector: 's-text-area-ia',\n templateUrl: './text-area-ia.component.html',\n styleUrls: ['./text-area-ia.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextAreaIAComponent),\n multi: true,\n },\n ],\n})\nexport class TextAreaIAComponent implements OnInit, ControlValueAccessor {\n textArea = viewChild<TextAreaComponent>('textAreaElement');\n private static id = 0;\n @Input()\n public id = `TextAreaIA_${TextAreaIAComponent.id--}`;\n\n @Input()\n public label!: string;\n\n @Input()\n public placeholder: string = '';\n\n @Input()\n public prompt!: string;\n\n @Input()\n public readonly: boolean = false;\n\n @Input()\n public rows: number = 10;\n\n @Input()\n public cols: number = 10;\n\n @Input()\n public speechRecognition = false;\n\n @Input()\n public keepContext = false;\n\n @Input()\n speechRecognitionPlaceholder = '';\n\n @Input()\n maxLength: number | null = null;\n\n // public fields: FormField[] = [];\n public formGroup: FormGroup = new FormGroup({});\n public contextForm: FormGroup = new FormGroup({});\n public isVisible = false;\n public isLoading = false;\n public value = '';\n\n private _onChange?: (value: string) => void;\n private _onTouched?: () => void;\n\n constructor(\n private readonly _iassistService: IAssistService, // TODO: Mover pra uma pasta global\n private readonly _formBuilder: FormBuilder,\n private readonly _translateService: TranslateService,\n public speechRecognitionService: SpeechRecognitionService\n ) { }\n\n public ngOnInit(): void {\n // this._createDialogFields();\n this._createDialogFormGroup();\n }\n\n public writeValue(value: string): void {\n this.value = value;\n }\n\n public registerOnChange(onChange: (value: string) => void): void {\n this._onChange = onChange;\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this._onTouched = onTouched;\n }\n\n public onValueChange(value: string): void {\n this.value = value;\n this._onChange?.(value);\n }\n\n public showDialog(): void {\n this.isVisible = true;\n if (this._onTouched) {\n this._onTouched();\n }\n }\n\n public hideDialog(): void {\n this.isVisible = false;\n }\n\n public onHideDialog(): void {\n this.formGroup.get('context')?.setValue('');\n }\n\n public submitContext(): void {\n const context = this.formGroup.get('context');\n if (!context) {\n return;\n }\n this.isLoading = true;\n\n this._iassistService\n .askIA(context.value, {\n id: this.id,\n label: this.label,\n placeholder: this.placeholder,\n prompt: this.prompt,\n })\n .pipe(\n catchError((err: HttpErrorResponse) => {\n this.isLoading = false;\n return throwError(() => new Error(err.message));\n }),\n )\n .subscribe((res: IAssistResponse) => {\n this.value = res.text;\n this._onChange?.(this.value);\n this.isLoading = false;\n });\n\n this.hideDialog();\n }\n\n private _createDialogFormGroup(): void {\n this.formGroup = this._formBuilder.group({\n context: [''],\n });\n }\n}\n\n","<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n [style]=\"{ width: '50vw' }\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n (onHide)=\"onHideDialog()\"\n>\n <ng-template #header>\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </ng-template>\n\n <form [formGroup]=\"formGroup\">\n <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n <s-textarea inputId=\"context\" formControlName=\"context\" [speechRecognition]=\"speechRecognition\" [keepContext]=\"keepContext\" />\n </form>\n\n <ng-template #footer>\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (clicked)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n >\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (clicked)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n >\n </s-button>\n </div>\n </ng-template>\n</p-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textAreaElement\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [rows]=\"rows\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n [maxLength]=\"maxLength\"\n [speechRecognition]=\"speechRecognition\">\n </s-textarea>\n <!--TODO: Tooltip em propriedade-->\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\"\n >\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg\n style=\"width: 100%; height: 100%\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n fill=\"#F3F3F5\"\n />\n <path\n d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n fill=\"#0C847B\"\n />\n <path\n d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n fill=\"#0C847B\"\n />\n </svg>\n</ng-template>\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { TranslateModule } from \"@ngx-translate/core\";\nimport { DialogModule } from \"primeng/dialog\";\n\nimport { TextAreaIAComponent } from \"./text-area-ia.component\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { ButtonModule } from \"@seniorsistemas/angular-components/button\";\nimport { LoadingStateModule } from \"@seniorsistemas/angular-components/loading-state\";\nimport { TextAreaModule } from \"@seniorsistemas/angular-components/text-area\";\n\n@NgModule({\n imports: [\n FormsModule,\n ReactiveFormsModule,\n TranslateModule,\n DialogModule,\n ButtonModule,\n LoadingStateModule,\n NgTemplateOutlet,\n TextAreaModule\n ],\n declarations: [TextAreaIAComponent],\n exports: [TextAreaIAComponent],\n})\nexport class TextAreaIAModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.IAssistService","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAYa,cAAc,CAAA;AAER,IAAA,IAAA,CAAA;AACA,IAAA,YAAA,CAAA;IAFlB,WACkB,CAAA,IAAgB,EAChB,YAA0B,EAAA;QAD1B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KACvC;IAEE,KAAK,CAAC,OAAe,EAAE,IAAsB,EAAA;AACnD,QAAA,MAAM,MAAM,GAAW,IAAI,CAAC,MAAM;cAC/B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC;cACvC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAErC,OAAO,IAAI,CAAC,IAAI;aACd,IAAI,CAAkB,yCAAyC,EAAE;YACjE,MAAM;AACN,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,UAAU,EAAE;AACX,gBAAA,KAAK,EAAE,eAAe;AACtB,gBAAA,UAAU,EAAE,GAAG;AACf,gBAAA,WAAW,EAAE,CAAC;AACd,aAAA;SACD,CAAC;AACD,aAAA,IAAI,CACJ,UAAU,CAAC,CAAC,GAAsB,KAAI;AACrC,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACtB,gBAAA,QAAQ,EAAE,OAAO;AACjB,gBAAA,KAAK,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO;gBAChD,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,OAAO,IAAI,OAAO;AAClF,aAAA,CAAC,CAAC;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AgB;AAChB,YAAA,cAAc,aAGR,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAZrB,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,YAAY;YACZ,YAAY;YACZ,kBAAkB;YAElB,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAKT,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAd5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,YAAY;wBACZ,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,cAAc;AACjB,qBAAA;oBACD,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"seniorsistemas-angular-components-text-area-ia.mjs","sources":["../../projects/angular-components/text-area-ia/src/lib/services/IAssist/iassist.service.ts","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.component.ts","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.component.html","../../projects/angular-components/text-area-ia/src/lib/text-area-ia/text-area-ia.module.ts","../../projects/angular-components/text-area-ia/src/seniorsistemas-angular-components-text-area-ia.ts"],"sourcesContent":["/* eslint-disable max-len */\nimport { HttpClient, HttpErrorResponse } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\n\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { IAssistInputData } from './models/iassist-input-data';\nimport { IAssistResponse } from './models/iassist-response';\nimport { ToastService } from \"@seniorsistemas/angular-components/toast\";\n\n@Injectable({ providedIn: 'root' })\nexport class IAssistService {\n\tconstructor(\n\t\tprivate readonly http: HttpClient,\n\t\tprivate readonly toastService: ToastService,\n\t) { }\n\n\tpublic askIA(context: string, data: IAssistInputData): Observable<IAssistResponse> {\n\t\tconst prompt: string = data.prompt\n\t\t\t? this._replacePlaceholder(context, data)\n\t\t\t: this._createPrompt(context, data);\n\n\t\treturn this.http\n\t\t\t.post<IAssistResponse>('platform/iassist/api/latest/completions', {\n\t\t\t\tprompt,\n\t\t\t\tprovider: 'OPEN_AI',\n\t\t\t\tparameters: {\n\t\t\t\t\tmodel: 'gpt-3.5-turbo',\n\t\t\t\t\tmax_tokens: 700,\n\t\t\t\t\ttemperature: 1,\n\t\t\t\t},\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tcatchError((err: HttpErrorResponse) => {\n\t\t\t\t\tthis.toastService.show({\n\t\t\t\t\t\tseverity: 'error',\n\t\t\t\t\t\ttitle: err.status ? String(err.status) : 'Error',\n\t\t\t\t\t\ttext: (err.error && err.error.message) || err.statusText || err.message || 'Error',\n\t\t\t\t\t});\n\t\t\t\t\treturn throwError(() => new Error(err.message));\n\t\t\t\t}),\n\t\t\t);\n\t}\n\n\tprivate _replacePlaceholder(context: string, data: IAssistInputData): string {\n\t\tconst values = { ...data, context };\n\t\tdelete (values as Partial<IAssistInputData>).prompt;\n\n\t\tlet result = data.prompt;\n\t\tfor (const key in { ...values, context: context }) {\n\t\t\tconst placeholder = new RegExp(`{{\\\\s*${key}\\\\s*}}`, 'g');\n\t\t\tresult = result.replace(placeholder, values[key as keyof typeof values]);\n\t\t}\n\n\t\tconsole.log('prompt', result);\n\t\treturn result;\n\t}\n\n\tprivate _createPrompt(context: string, data: IAssistInputData): string {\n\t\treturn `Crie um texto genérico para preencher o campo de textarea.\n ${data.label ? `O campo tem o label ${data.label}.` : ''}\n ${data.id ? `O campo tem o id ${data.id}.` : ''}\n ${data.placeholder ? `Considere as instruções/sugestões do placeholder: ${data.placeholder}.` : ''}\n Baseie-se no contexto informado pelo usuário: '${context}'.\n O texto deve ser formal e conter informações pertinentes a um campo como este, como se um usuário real tivesse preenchido com as informações necessárias.\n O texto deve ser neutro com relação a generos, raças, religiões, etc.\n O texto deve ser impessoal e não deve conter informações pessoais do usuário.\n Não direcione o texto a ninguém, não use expressões como: caro, atenciosamente. gostaria, agradeço. O texto deve ser genérico.\n\n Exemplos de texto:\n Um campo de descrição de usuário: \"Usuário com 20 anos, estudante de engenharia, gosta de jogar futebol e assistir filmes.\"\n Outro exemplo de descrição de usuário: \"Usuário administrador, com acesso total ao sistema, responsável por gerenciar os usuários e os produtos.\"\n Um campo de descrição de um produto: \"O produto é um celular, com tela de 6 polegadas, 128GB de armazenamento, 4GB de memória RAM, câmera de 12MP e bateria de 4000mAh.\"\n Outro exemplo de descrição de produto: \"O produto é uma geladeira, com capacidade de 500 litros, 2 portas, cor branca, com freezer e gaveta de legumes.\"\n Outro exemplo de descrição de produto: \"O produto é uma camiseta, tamanho M, cor azul, 100% algodão, com estampa de um gato.\"\n\n Em caso de contexto incompleto crie um texto genérico, como se fosse um exemplo de preenchimento do campo.\n O texto é para um campo de textarea, então escreva um texto sucinto.\n Exiba apenas o texto do output`;\n\t}\n}\n","import { HttpErrorResponse } from '@angular/common/http';\nimport { Component, computed, ElementRef, forwardRef, Input, OnInit, viewChild } from '@angular/core';\nimport { ControlValueAccessor, FormBuilder, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport { TranslateService } from '@ngx-translate/core';\n\nimport { throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\n\nimport { IAssistService } from '../services/IAssist/iassist.service';\nimport { IAssistResponse } from '../services/IAssist/models/iassist-response';\nimport { SpeechRecognitionService } from '@seniorsistemas/angular-components/speech-recognition';\nimport { TextAreaComponent } from '@seniorsistemas/angular-components/text-area';\n\n@Component({\n selector: 's-text-area-ia',\n templateUrl: './text-area-ia.component.html',\n styleUrls: ['./text-area-ia.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => TextAreaIAComponent),\n multi: true,\n },\n ],\n})\nexport class TextAreaIAComponent implements OnInit, ControlValueAccessor {\n textArea = viewChild<TextAreaComponent>('textAreaElement');\n private static id = 0;\n @Input()\n public id = `TextAreaIA_${TextAreaIAComponent.id--}`;\n\n @Input()\n public label!: string;\n\n @Input()\n public placeholder: string = '';\n\n @Input()\n public prompt!: string;\n\n @Input()\n public readonly: boolean = false;\n\n @Input()\n public rows: number = 10;\n\n @Input()\n public cols: number = 10;\n\n @Input()\n public speechRecognition = false;\n\n @Input()\n public keepContext = false;\n\n @Input()\n speechRecognitionPlaceholder = '';\n\n @Input()\n maxLength: number | null = null;\n\n // public fields: FormField[] = [];\n public formGroup: FormGroup = new FormGroup({});\n public contextForm: FormGroup = new FormGroup({});\n public isVisible = false;\n public isLoading = false;\n public value = '';\n\n private _onChange?: (value: string) => void;\n private _onTouched?: () => void;\n\n constructor(\n private readonly _iassistService: IAssistService, // TODO: Mover pra uma pasta global\n private readonly _formBuilder: FormBuilder,\n private readonly _translateService: TranslateService,\n public speechRecognitionService: SpeechRecognitionService\n ) { }\n\n public ngOnInit(): void {\n // this._createDialogFields();\n this._createDialogFormGroup();\n }\n\n public writeValue(value: string): void {\n this.value = value;\n }\n\n public registerOnChange(onChange: (value: string) => void): void {\n this._onChange = onChange;\n }\n\n public registerOnTouched(onTouched: () => void): void {\n this._onTouched = onTouched;\n }\n\n public onValueChange(value: string): void {\n this.value = value;\n this._onChange?.(value);\n }\n\n public showDialog(): void {\n this.isVisible = true;\n if (this._onTouched) {\n this._onTouched();\n }\n }\n\n public hideDialog(): void {\n this.isVisible = false;\n }\n\n public onHideDialog(): void {\n if (this.isVisible === false) {\n this.formGroup.get('context')?.setValue('');\n }\n }\n\n public submitContext(): void {\n const context = this.formGroup.get('context');\n if (!context) {\n return;\n }\n this.isLoading = true;\n\n this._iassistService\n .askIA(context.value, {\n id: this.id,\n label: this.label,\n placeholder: this.placeholder,\n prompt: this.prompt,\n })\n .pipe(\n catchError((err: HttpErrorResponse) => {\n this.isLoading = false;\n return throwError(() => new Error(err.message));\n }),\n )\n .subscribe((res: IAssistResponse) => {\n this.value = res.text;\n this._onChange?.(this.value);\n this.isLoading = false;\n });\n\n this.hideDialog();\n }\n\n private _createDialogFormGroup(): void {\n this.formGroup = this._formBuilder.group({\n context: [''],\n });\n }\n}\n\n","<s-loading-state\n [loading]=\"isLoading\"\n [blockWindow]=\"true\"\n>\n</s-loading-state>\n\n<s-dialog\n [(visible)]=\"isVisible\"\n [escapeOnEsc]=\"false\"\n [destroyClickOutside]=\"false\"\n size=\"lg\"\n (visibleChange)=\"onHideDialog()\"\n>\n <ng-template sTemplate=\"header\">\n <div class=\"dialog-header\">\n <span class=\"iassist-icon\">\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </span>\n IAssist - Content Generator\n </div>\n </ng-template>\n\n <form [formGroup]=\"formGroup\">\n <label for=\"context\">{{ 'platform.angular_components.context' | translate }}</label>\n <s-textarea\n inputId=\"context\"\n formControlName=\"context\"\n [speechRecognition]=\"speechRecognition\"\n [keepContext]=\"keepContext\"\n />\n </form>\n\n <ng-template sTemplate=\"footer\">\n <div class=\"footer-content\">\n <s-button\n id=\"-submit-button\"\n type=\"button\"\n [label]=\"'platform.angular_components.generate_text' | translate\"\n (clicked)=\"submitContext()\"\n sTooltip=\"(ALT + SHIFT + S)\"\n showDelay=\"500\"\n >\n </s-button>\n <s-button\n id=\"-cancel-button\"\n type=\"button\"\n priority=\"link\"\n [label]=\"'platform.angular_components.cancel' | translate\"\n (clicked)=\"hideDialog()\"\n sTooltip=\"(ALT + SHIFT + C)\"\n showDelay=\"500\"\n >\n </s-button>\n </div>\n </ng-template>\n</s-dialog>\n\n<div class=\"textarea-ia\">\n <s-textarea\n #textAreaElement\n [inputId]=\"id\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [rows]=\"rows\"\n [readOnly]=\"readonly\"\n [placeholder]=\"placeholder\"\n [keepContext]=\"keepContext\"\n [speechRecognitionPlaceholder]=\"speechRecognitionPlaceholder\"\n [maxLength]=\"maxLength\"\n [speechRecognition]=\"speechRecognition\"\n >\n </s-textarea>\n <!--TODO: Tooltip em propriedade-->\n <button\n class=\"iassist-button\"\n [class.speech-recognition]=\"speechRecognition && speechRecognitionService.hasSupportSpeechRecognition\"\n (click)=\"showDialog()\"\n sTooltip=\"IAssist - Content Generator\"\n >\n <ng-container [ngTemplateOutlet]=\"iassistIcon\"></ng-container>\n </button>\n</div>\n\n<ng-template #iassistIcon>\n <svg\n style=\"width: 100%; height: 100%\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5.81451 18.1054L5.99593 17.6059L7.52166 13.4099L7.60877 13.1726L7.61277 13.1614L7.94285 12.2543L8.01159 12.0648L8.05394 11.949L5.2998 8.52426L5.02726 8.18379C5.00569 8.15821 4.9881 8.13104 4.97292 8.10226C4.90099 7.9632 4.85063 7.81294 4.82186 7.6531C4.73075 7.1344 4.90418 6.60771 5.28382 6.24326C5.29421 6.23447 5.3038 6.22567 5.31419 6.21688L5.47164 6.0914L9.3439 3.00238L9.5469 2.84094L9.57088 2.82096L10.4101 2.15041L11.8007 1.04188C11.2181 0.925188 10.6163 0.863647 10.0001 0.863647C4.95374 0.863647 0.863281 4.9541 0.863281 9.99963C0.863281 13.5346 2.87254 16.5989 5.80971 18.1182\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.099 1.83472L13.9495 2.24632L11.997 7.61074L11.9427 7.7594L11.9003 7.87369L14.7448 11.4103C14.7463 11.4127 14.7479 11.4143 14.7495 11.4167L14.9414 11.654C14.9541 11.67 14.9661 11.6868 14.9765 11.7044C15.0764 11.8698 15.1444 12.0505 15.1779 12.2431C15.273 12.7826 15.0812 13.3284 14.676 13.6897C14.656 13.7129 14.6345 13.7344 14.6105 13.7536L11.8563 15.9507L11.6789 16.0922L11.6022 16.1537L10.7406 16.8402V16.841L10.3937 17.1176L9.85747 17.5452L9.39951 17.9112L8.11035 18.9398C8.72016 19.0677 9.35155 19.1364 9.99973 19.1364C15.0461 19.1364 19.1365 15.046 19.1365 9.99964C19.1365 6.42789 17.0857 3.33727 14.099 1.83472Z\"\n fill=\"#0FA389\"\n />\n <path\n d=\"M14.7287 12.3222C14.7047 12.1832 14.6551 12.0545 14.5864 11.941L14.3954 11.7036C14.3954 11.7036 14.3946 11.7028 14.3938 11.7028L11.3839 7.96005L10.5031 6.86511L10.4256 6.7676L9.03255 5.03487L8.83674 4.79191C8.79278 4.71678 8.75681 4.63446 8.73204 4.54814C8.72085 4.51058 8.71286 4.47222 8.70566 4.43465C8.68568 4.32196 8.68408 4.21007 8.69847 4.10217L8.62334 4.16291L8.44511 4.30438L5.75731 6.44871L5.60066 6.57339C5.34011 6.82275 5.20584 7.19279 5.27218 7.57482C5.29296 7.68751 5.32892 7.79541 5.37927 7.89292C5.37927 7.89292 5.37927 7.89292 5.38007 7.89371L5.6566 8.23818L8.57139 11.8627L8.63293 11.9394L9.53047 13.0559L9.59041 13.1303L9.98363 13.6186L11.0178 14.9046C11.0186 14.9054 11.0194 14.9069 11.0202 14.9077L11.1361 15.0516V15.0524C11.2184 15.1755 11.2768 15.317 11.3048 15.4728C11.3239 15.5807 11.3263 15.6878 11.3143 15.7925L11.3175 15.7965L11.3943 15.735L11.5717 15.5935L14.3266 13.3964L14.3218 13.3908C14.6335 13.1438 14.8022 12.7394 14.7287 12.3222Z\"\n fill=\"#F3F3F5\"\n />\n <path\n d=\"M10.6822 15.0082C10.6814 15.0074 10.6806 15.0058 10.6806 15.005L10.5672 14.8643L10.3809 14.6325L10.3282 14.567L10.2211 14.4335L9.40028 13.4129L9.32835 13.3242L8.77289 12.6345L8.68098 12.5194L8.44121 12.2205L8.37168 12.4099L8.04159 13.317L8.0376 13.329L7.95128 13.5664L6.42475 17.7623L6.24333 18.2618L5.90605 19.1881L5.73262 19.6645C5.73182 19.6661 5.73102 19.6677 5.73102 19.6685C5.72863 19.6749 5.72703 19.6821 5.72543 19.6885C5.71584 19.7228 5.71424 19.758 5.72063 19.7948C5.74461 19.929 5.87329 20.0193 6.00836 19.9962C6.04112 19.9898 6.07229 19.9778 6.09867 19.9602C6.09867 19.9602 6.09947 19.9602 6.10027 19.9594L6.14103 19.9266L7.39422 18.9268L9.11496 17.5537L9.57292 17.1877L10.1092 16.7601L10.4561 16.4827L10.4537 16.4811C10.7582 16.2382 10.9236 15.8402 10.8509 15.4294C10.8237 15.2735 10.7654 15.1313 10.6822 15.0082Z\"\n fill=\"#0C847B\"\n />\n <path\n d=\"M9.17644 4.56325C9.2124 4.68713 9.26915 4.80062 9.34268 4.90053C9.34348 4.90053 9.34428 4.90213 9.34428 4.90213L9.40342 4.97645C9.40502 4.97805 9.40582 4.97885 9.40662 4.98045L9.56806 5.17946L9.64878 5.28096L9.67915 5.31932L9.8414 5.51993L10.5559 6.40947L10.7054 6.59569L11.2169 7.23188L11.5142 7.60192L11.5693 7.45247L13.5202 2.08964L14.1596 0.332135C14.1596 0.330536 14.1604 0.328139 14.1612 0.32654C14.174 0.288177 14.1772 0.246617 14.17 0.205058C14.1468 0.0699879 14.0182 -0.0195258 13.8823 0.00365186C13.8407 0.0116442 13.8024 0.028428 13.7712 0.0540033L12.578 1.00589L12.498 1.06982L10.6958 2.50844L9.85658 3.17819L9.8326 3.19737L9.6296 3.35961L9.45297 3.50028C9.2116 3.73925 9.08692 4.08931 9.15006 4.44976C9.15726 4.48813 9.16525 4.52649 9.17644 4.56325Z\"\n fill=\"#0C847B\"\n />\n </svg>\n</ng-template>\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { TranslateModule } from \"@ngx-translate/core\";\n\nimport { TextAreaIAComponent } from \"./text-area-ia.component\";\nimport { NgTemplateOutlet } from \"@angular/common\";\nimport { ButtonModule } from \"@seniorsistemas/angular-components/button\";\nimport { LoadingStateModule } from \"@seniorsistemas/angular-components/loading-state\";\nimport { TextAreaModule } from \"@seniorsistemas/angular-components/text-area\";\nimport { DialogComponent } from \"@seniorsistemas/angular-components/dialog\";\nimport { TemplateModule } from \"@seniorsistemas/angular-components/template\";\n\n@NgModule({\n imports: [\n FormsModule,\n ReactiveFormsModule,\n TranslateModule,\n ButtonModule,\n LoadingStateModule,\n NgTemplateOutlet,\n TextAreaModule,\n DialogComponent,\n TemplateModule\n ],\n declarations: [TextAreaIAComponent],\n exports: [TextAreaIAComponent],\n})\nexport class TextAreaIAModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.IAssistService","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;MAYa,cAAc,CAAA;AAER,IAAA,IAAA,CAAA;AACA,IAAA,YAAA,CAAA;IAFlB,WACkB,CAAA,IAAgB,EAChB,YAA0B,EAAA;QAD1B,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAChB,IAAY,CAAA,YAAA,GAAZ,YAAY,CAAc;KACvC;IAEE,KAAK,CAAC,OAAe,EAAE,IAAsB,EAAA;AACnD,QAAA,MAAM,MAAM,GAAW,IAAI,CAAC,MAAM;cAC/B,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC;cACvC,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAErC,OAAO,IAAI,CAAC,IAAI;aACd,IAAI,CAAkB,yCAAyC,EAAE;YACjE,MAAM;AACN,YAAA,QAAQ,EAAE,SAAS;AACnB,YAAA,UAAU,EAAE;AACX,gBAAA,KAAK,EAAE,eAAe;AACtB,gBAAA,UAAU,EAAE,GAAG;AACf,gBAAA,WAAW,EAAE,CAAC;AACd,aAAA;SACD,CAAC;AACD,aAAA,IAAI,CACJ,UAAU,CAAC,CAAC,GAAsB,KAAI;AACrC,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACtB,gBAAA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BAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAbrB,WAAW;YACX,mBAAmB;YACnB,eAAe;YACf,YAAY;YACZ,kBAAkB;YAElB,cAAc;YACd,eAAe;YACf,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAKT,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAf5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,WAAW;wBACX,mBAAmB;wBACnB,eAAe;wBACf,YAAY;wBACZ,kBAAkB;wBAClB,gBAAgB;wBAChB,cAAc;wBACd,eAAe;wBACf,cAAc;AACjB,qBAAA;oBACD,YAAY,EAAE,CAAC,mBAAmB,CAAC;oBACnC,OAAO,EAAE,CAAC,mBAAmB,CAAC;AACjC,iBAAA,CAAA;;;AC3BD;;AAEG;;;;"}
|
|
@@ -36,7 +36,7 @@ class TileComponent {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileComponent, selector: "s-tile", inputs: { id: "id", label: "label", description: "description", iconClass: "iconClass", imageSource: "imageSource", imageAlt: "imageAlt", disabled: "disabled", tabIndex: "tabIndex", thumbnail: "thumbnail" }, outputs: { clicked: "clicked" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"tile\"\n [attr.tabindex]=\"disabled ? undefined : tabIndex\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"disabled\"\n role=\"button\"\n [ngClass]=\"{ 'tile--disabled': disabled }\"\n (click)=\"!disabled && clicked.emit($event)\"\n>\n\n @if(imageSource || iconClass) {\n <div class=\"thumbnail\">\n @if(imageSource) {\n @if(!thumbnail) {\n <div\n class=\"image-icon\">\n <div\n class=\"icon\"\n [style.background-image]=\"'url(' + imageSource + ')'\">\n </div>\n </div>\n\n }\n @if(thumbnail) {\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n size=\"small\"\n [isTile]=\"true\"/>\n }\n }\n @if(!imageSource && iconClass) {\n <span\n [id]=\"id + '-icon'\"\n [class]=\"'icon ' + iconClass\"\n aria-hidden=\"true\">\n </span>\n }\n </div>\n }\n\n @if (!iconClass && !imageSource) {\n <div class=\"first-letter-container\">\n <div class=\"first-letter\">\n <span>{{ initialLetter }}</span>\n </div>\n </div>\n }\n\n <div class=\"info\">\n <span\n [id]=\"id + '-title'\"\n class=\"title\"\n [sTooltip]=\"label\"\n >\n {{ label }}\n </span>\n <span\n [id]=\"id + '-description'\"\n class=\"description\"\n [sTooltip]=\"description\"\n >\n {{ description }}\n </span>\n </div>\n</div>\n", styles: [".tile{align-items:center;background-color:#fff;border:1px solid #c1c1cc;cursor:pointer;display:flex;min-height:80px;overflow:hidden;padding:15px;position:relative;transition:background-color .2s ease-out,border-color .2s ease-out}.tile:hover:not(.tile--disabled),.tile:focus:not(.tile--disabled){background-color:#eeebf2;outline:none}.tile .thumbnail{display:flex;align-items:center;margin-right:15px}.tile .thumbnail .icon{color:#428bca;font-size:2.5rem}.tile .info{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.tile .info .title,.tile .info .description{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile .info .title{color:#428bca;font-size:1.25rem}.tile .info .description{color:#6e7280;font-size:.875rem}.tile .first-letter-container{float:left;margin-right:10px;position:relative;text-align:center}.tile .first-letter-container .first-letter{background-color:#428bca;border-radius:50%;color:#fff;font-size:1.375rem;height:40px;line-height:1.8em;margin:0 auto 5px;width:40px}.tile--disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.tile--disabled,.tile--disabled *{cursor:text!important}.tile .image-icon{padding:8px;background-color:#eeebf2;border-radius:4px}.tile .image-icon .icon{height:32px;width:32px;background-size:cover;background-repeat:no-repeat}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef"] }, { kind: "component", type: i3.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }] });
|
|
39
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: TileComponent, selector: "s-tile", inputs: { id: "id", label: "label", description: "description", iconClass: "iconClass", imageSource: "imageSource", imageAlt: "imageAlt", disabled: "disabled", tabIndex: "tabIndex", thumbnail: "thumbnail" }, outputs: { clicked: "clicked" }, host: { listeners: { "keydown": "onKeyDown($event)" } }, ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"tile\"\n [attr.tabindex]=\"disabled ? undefined : tabIndex\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"disabled\"\n role=\"button\"\n [ngClass]=\"{ 'tile--disabled': disabled }\"\n (click)=\"!disabled && clicked.emit($event)\"\n>\n\n @if(imageSource || iconClass) {\n <div class=\"thumbnail\">\n @if(imageSource) {\n @if(!thumbnail) {\n <div\n class=\"image-icon\">\n <div\n class=\"icon\"\n [style.background-image]=\"'url(' + imageSource + ')'\">\n </div>\n </div>\n\n }\n @if(thumbnail) {\n <s-thumbnail\n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n size=\"small\"\n [isTile]=\"true\"/>\n }\n }\n @if(!imageSource && iconClass) {\n <span\n [id]=\"id + '-icon'\"\n [class]=\"'icon ' + iconClass\"\n aria-hidden=\"true\">\n </span>\n }\n </div>\n }\n\n @if (!iconClass && !imageSource) {\n <div class=\"first-letter-container\">\n <div class=\"first-letter\">\n <span>{{ initialLetter }}</span>\n </div>\n </div>\n }\n\n <div class=\"info\">\n <span\n [id]=\"id + '-title'\"\n class=\"title\"\n [sTooltip]=\"label\"\n >\n {{ label }}\n </span>\n <span\n [id]=\"id + '-description'\"\n class=\"description\"\n [sTooltip]=\"description\"\n >\n {{ description }}\n </span>\n </div>\n</div>\n", styles: [".tile{align-items:center;background-color:#fff;border:1px solid #c1c1cc;cursor:pointer;display:flex;min-height:80px;overflow:hidden;padding:15px;position:relative;transition:background-color .2s ease-out,border-color .2s ease-out}.tile:hover:not(.tile--disabled),.tile:focus:not(.tile--disabled){background-color:#eeebf2;outline:none}.tile .thumbnail{display:flex;align-items:center;margin-right:15px}.tile .thumbnail .icon{color:#428bca;font-size:2.5rem}.tile .info{display:flex;flex-direction:column;justify-content:center;overflow:hidden}.tile .info .title,.tile .info .description{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile .info .title{color:#428bca;font-size:1.25rem}.tile .info .description{color:#6e7280;font-size:.875rem}.tile .first-letter-container{float:left;margin-right:10px;position:relative;text-align:center}.tile .first-letter-container .first-letter{background-color:#428bca;border-radius:50%;color:#fff;font-size:1.375rem;height:40px;line-height:1.8em;margin:0 auto 5px;width:40px}.tile--disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.tile--disabled,.tile--disabled *{cursor:text!important}.tile .image-icon{padding:8px;background-color:#eeebf2;border-radius:4px}.tile .image-icon .icon{height:32px;width:32px;background-size:cover;background-repeat:no-repeat}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }, { kind: "component", type: i3.ThumbnailComponent, selector: "s-thumbnail", inputs: ["id", "size", "imageSource", "imageFallback", "imageAlt", "iconClass", "hasAction", "actionIconClass", "isTile", "isBrand"] }] });
|
|
40
40
|
}
|
|
41
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TileComponent, decorators: [{
|
|
42
42
|
type: Component,
|