@masterteam/faris 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/ar.json +6 -1
- package/assets/i18n/en.json +6 -1
- package/fesm2022/masterteam-faris.mjs +56 -52
- package/fesm2022/masterteam-faris.mjs.map +1 -1
- package/package.json +15 -14
|
@@ -26,10 +26,10 @@ class FarisTranslatePipe {
|
|
|
26
26
|
}
|
|
27
27
|
return this.transloco.translate(key, params);
|
|
28
28
|
}
|
|
29
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
30
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
29
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisTranslatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
30
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: FarisTranslatePipe, isStandalone: true, name: "translate", pure: false });
|
|
31
31
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisTranslatePipe, decorators: [{
|
|
33
33
|
type: Pipe,
|
|
34
34
|
args: [{
|
|
35
35
|
name: 'translate',
|
|
@@ -535,10 +535,10 @@ class FarisService {
|
|
|
535
535
|
s4() {
|
|
536
536
|
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
537
537
|
}
|
|
538
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
539
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
538
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
539
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisService, providedIn: 'root' });
|
|
540
540
|
}
|
|
541
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisService, decorators: [{
|
|
542
542
|
type: Injectable,
|
|
543
543
|
args: [{
|
|
544
544
|
providedIn: 'root',
|
|
@@ -573,10 +573,10 @@ class FarisCanvasComponent {
|
|
|
573
573
|
? this.sanitizer.bypassSecurityTrustResourceUrl(url)
|
|
574
574
|
: null;
|
|
575
575
|
}
|
|
576
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
577
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
576
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisCanvasComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
577
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisCanvasComponent, isStandalone: true, selector: "mt-faris-canvas", inputs: { message: "message", conversationId: "conversationId" }, outputs: { closed: "closed" }, usesOnChanges: true, ngImport: i0, template: "@if (iframeUrl) {\r\n <div class=\"faris-canvas-frame\">\r\n <div class=\"faris-canvas-frame-header\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n aria-label=\"Close Canvas\"\r\n (click)=\"closeCanvas()\"\r\n ></mt-button>\r\n </div>\r\n\r\n <div class=\"faris-canvas-iframe-container\">\r\n @if (loading) {\r\n <div class=\"iframe-loading\">\r\n <div\r\n class=\"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-[var(--primary-color)]\"\r\n ></div>\r\n </div>\r\n }\r\n\r\n <iframe\r\n [src]=\"iframeUrl\"\r\n width=\"100%\"\r\n height=\"100vh\"\r\n frameborder=\"0\"\r\n allowfullscreen\r\n (load)=\"onIframeLoad()\"\r\n ></iframe>\r\n </div>\r\n </div>\r\n} @else {\r\n <div class=\"faris-canvas-empty p-4 text-sm text-slate-600\">\r\n {{ \"faris.unable-to-load-content\" | translate }}\r\n </div>\r\n}\r\n", styles: [":host{background-color:#fff;padding:.25em}.faris-canvas-frame{border:2px solid lightgray;border-radius:var(--faris-border-radius);background:#fff;overflow:hidden;position:relative;height:calc(100vh - 1em);display:flex;flex-direction:column}.faris-canvas-frame-header{display:flex;justify-content:flex-end;align-items:center;background:#f7f9fa;border-bottom:1px solid #e0e0e0;padding:.5em 1em;min-height:48px;z-index:10}.faris-canvas-iframe-container{height:100%;width:100%;position:relative;flex:1 1 auto}.faris-canvas-iframe-container .iframe-loading{position:absolute;inset:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:2;background:#ffffffb3}.faris-canvas-iframe-container iframe{border:none;min-height:400px;height:100%;width:100%;display:block}.faris-canvas-iframe-container .spinner-border{width:1.25em;height:1.25em}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }] });
|
|
578
578
|
}
|
|
579
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisCanvasComponent, decorators: [{
|
|
580
580
|
type: Component,
|
|
581
581
|
args: [{ selector: 'mt-faris-canvas', standalone: true, imports: [FarisTranslatePipe, Button], template: "@if (iframeUrl) {\r\n <div class=\"faris-canvas-frame\">\r\n <div class=\"faris-canvas-frame-header\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n aria-label=\"Close Canvas\"\r\n (click)=\"closeCanvas()\"\r\n ></mt-button>\r\n </div>\r\n\r\n <div class=\"faris-canvas-iframe-container\">\r\n @if (loading) {\r\n <div class=\"iframe-loading\">\r\n <div\r\n class=\"h-6 w-6 animate-spin rounded-full border-2 border-slate-300 border-t-[var(--primary-color)]\"\r\n ></div>\r\n </div>\r\n }\r\n\r\n <iframe\r\n [src]=\"iframeUrl\"\r\n width=\"100%\"\r\n height=\"100vh\"\r\n frameborder=\"0\"\r\n allowfullscreen\r\n (load)=\"onIframeLoad()\"\r\n ></iframe>\r\n </div>\r\n </div>\r\n} @else {\r\n <div class=\"faris-canvas-empty p-4 text-sm text-slate-600\">\r\n {{ \"faris.unable-to-load-content\" | translate }}\r\n </div>\r\n}\r\n", styles: [":host{background-color:#fff;padding:.25em}.faris-canvas-frame{border:2px solid lightgray;border-radius:var(--faris-border-radius);background:#fff;overflow:hidden;position:relative;height:calc(100vh - 1em);display:flex;flex-direction:column}.faris-canvas-frame-header{display:flex;justify-content:flex-end;align-items:center;background:#f7f9fa;border-bottom:1px solid #e0e0e0;padding:.5em 1em;min-height:48px;z-index:10}.faris-canvas-iframe-container{height:100%;width:100%;position:relative;flex:1 1 auto}.faris-canvas-iframe-container .iframe-loading{position:absolute;inset:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;z-index:2;background:#ffffffb3}.faris-canvas-iframe-container iframe{border:none;min-height:400px;height:100%;width:100%;display:block}.faris-canvas-iframe-container .spinner-border{width:1.25em;height:1.25em}\n"] }]
|
|
582
582
|
}], propDecorators: { message: [{
|
|
@@ -589,10 +589,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
589
589
|
|
|
590
590
|
class AgentCardComponent {
|
|
591
591
|
agent;
|
|
592
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
593
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
592
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AgentCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
593
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: AgentCardComponent, isStandalone: true, selector: "mt-faris-agent-card", inputs: { agent: "agent" }, ngImport: i0, template: "<div\r\n class=\"flex cursor-pointer items-center gap-3 rounded-md border border-slate-200 bg-slate-50 px-2 py-2 transition hover:bg-slate-100\"\r\n [style.border-color]=\"agent?.color || null\"\r\n>\r\n <img\r\n class=\"h-10 w-10 rounded object-contain p-1\"\r\n [src]=\"agent?.icon\"\r\n alt=\"\"\r\n />\r\n <div class=\"text-sm leading-5\">\r\n <strong class=\"block text-slate-900\">{{ agent?.title }}</strong>\r\n <p class=\"m-0 text-slate-600\">{{ agent?.desc }}</p>\r\n </div>\r\n</div>\r\n", styles: [""] });
|
|
594
594
|
}
|
|
595
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
595
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: AgentCardComponent, decorators: [{
|
|
596
596
|
type: Component,
|
|
597
597
|
args: [{ selector: 'mt-faris-agent-card', standalone: true, template: "<div\r\n class=\"flex cursor-pointer items-center gap-3 rounded-md border border-slate-200 bg-slate-50 px-2 py-2 transition hover:bg-slate-100\"\r\n [style.border-color]=\"agent?.color || null\"\r\n>\r\n <img\r\n class=\"h-10 w-10 rounded object-contain p-1\"\r\n [src]=\"agent?.icon\"\r\n alt=\"\"\r\n />\r\n <div class=\"text-sm leading-5\">\r\n <strong class=\"block text-slate-900\">{{ agent?.title }}</strong>\r\n <p class=\"m-0 text-slate-600\">{{ agent?.desc }}</p>\r\n </div>\r\n</div>\r\n" }]
|
|
598
598
|
}], propDecorators: { agent: [{
|
|
@@ -648,10 +648,10 @@ class FarisMarkdownPipe {
|
|
|
648
648
|
.replace(/"/g, '"')
|
|
649
649
|
.replace(/'/g, ''');
|
|
650
650
|
}
|
|
651
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
652
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
651
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMarkdownPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
652
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: FarisMarkdownPipe, isStandalone: true, name: "farisMarkdown" });
|
|
653
653
|
}
|
|
654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
654
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMarkdownPipe, decorators: [{
|
|
655
655
|
type: Pipe,
|
|
656
656
|
args: [{
|
|
657
657
|
name: 'farisMarkdown',
|
|
@@ -667,10 +667,10 @@ class FarisMessageActionsComponent {
|
|
|
667
667
|
emitAction(action) {
|
|
668
668
|
this.action.emit(action);
|
|
669
669
|
}
|
|
670
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
671
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
670
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMessageActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
671
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisMessageActionsComponent, isStandalone: true, selector: "mt-faris-message-actions", inputs: { currentVote: "currentVote", canvasMessage: "canvasMessage", downloading: "downloading" }, outputs: { action: "action" }, ngImport: i0, template: "<div class=\"feedback-controls mt-3 flex items-center gap-1\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.copy-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [tooltip]=\"'faris.copy-response' | translate\"\r\n (click)=\"emitAction('copy')\"\r\n ></mt-button>\r\n\r\n @if (!canvasMessage) {\r\n <mt-button\r\n type=\"button\"\r\n icon=\"file.file-plus-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [loading]=\"downloading\"\r\n [tooltip]=\"'faris.create-document' | translate\"\r\n (click)=\"emitAction('download')\"\r\n ></mt-button>\r\n }\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"arrow.refresh-cw-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [tooltip]=\"'faris.retry-response' | translate\"\r\n (click)=\"emitAction('retry')\"\r\n ></mt-button>\r\n\r\n <div class=\"feedback-separator mx-1 h-6 w-px bg-black/10\"></div>\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"alert.thumbs-up\"\r\n variant=\"text\"\r\n [styleClass]=\"\r\n 'faris-btn faris-btn-muted like' +\r\n (currentVote === 'like' ? ' text-green-600' : '')\r\n \"\r\n [tooltip]=\"'faris.helpful' | translate\"\r\n (click)=\"emitAction('like')\"\r\n ></mt-button>\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"alert.thumbs-down\"\r\n variant=\"text\"\r\n [styleClass]=\"\r\n 'faris-btn faris-btn-muted dislike' +\r\n (currentVote === 'dislike' ? ' text-red-600' : '')\r\n \"\r\n [tooltip]=\"'faris.not-helpful' | translate\"\r\n (click)=\"emitAction('dislike')\"\r\n ></mt-button>\r\n</div>\r\n", styles: [".feedback-controls{display:flex;align-items:center;margin-top:.75em;gap:.25em}.faris-btn.like:hover{background-color:rgb(from var(--success) r g b / 10%)}.faris-btn.dislike:hover{background-color:rgb(from var(--danger) r g b / 10%)}.feedback-separator{width:1px;height:1.5em;background-color:#0000001a;margin:0 .25em}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }] });
|
|
672
672
|
}
|
|
673
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
673
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMessageActionsComponent, decorators: [{
|
|
674
674
|
type: Component,
|
|
675
675
|
args: [{ selector: 'mt-faris-message-actions', standalone: true, imports: [FarisTranslatePipe, Button], template: "<div class=\"feedback-controls mt-3 flex items-center gap-1\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.copy-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [tooltip]=\"'faris.copy-response' | translate\"\r\n (click)=\"emitAction('copy')\"\r\n ></mt-button>\r\n\r\n @if (!canvasMessage) {\r\n <mt-button\r\n type=\"button\"\r\n icon=\"file.file-plus-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [loading]=\"downloading\"\r\n [tooltip]=\"'faris.create-document' | translate\"\r\n (click)=\"emitAction('download')\"\r\n ></mt-button>\r\n }\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"arrow.refresh-cw-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted\"\r\n [tooltip]=\"'faris.retry-response' | translate\"\r\n (click)=\"emitAction('retry')\"\r\n ></mt-button>\r\n\r\n <div class=\"feedback-separator mx-1 h-6 w-px bg-black/10\"></div>\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"alert.thumbs-up\"\r\n variant=\"text\"\r\n [styleClass]=\"\r\n 'faris-btn faris-btn-muted like' +\r\n (currentVote === 'like' ? ' text-green-600' : '')\r\n \"\r\n [tooltip]=\"'faris.helpful' | translate\"\r\n (click)=\"emitAction('like')\"\r\n ></mt-button>\r\n\r\n <mt-button\r\n type=\"button\"\r\n icon=\"alert.thumbs-down\"\r\n variant=\"text\"\r\n [styleClass]=\"\r\n 'faris-btn faris-btn-muted dislike' +\r\n (currentVote === 'dislike' ? ' text-red-600' : '')\r\n \"\r\n [tooltip]=\"'faris.not-helpful' | translate\"\r\n (click)=\"emitAction('dislike')\"\r\n ></mt-button>\r\n</div>\r\n", styles: [".feedback-controls{display:flex;align-items:center;margin-top:.75em;gap:.25em}.faris-btn.like:hover{background-color:rgb(from var(--success) r g b / 10%)}.faris-btn.dislike:hover{background-color:rgb(from var(--danger) r g b / 10%)}.feedback-separator{width:1px;height:1.5em;background-color:#0000001a;margin:0 .25em}\n"] }]
|
|
676
676
|
}], propDecorators: { currentVote: [{
|
|
@@ -699,10 +699,10 @@ class ParseMentionPipe {
|
|
|
699
699
|
}
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
703
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.
|
|
702
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ParseMentionPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
703
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.8", ngImport: i0, type: ParseMentionPipe, isStandalone: true, name: "parseMention" });
|
|
704
704
|
}
|
|
705
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: ParseMentionPipe, decorators: [{
|
|
706
706
|
type: Pipe,
|
|
707
707
|
args: [{
|
|
708
708
|
name: 'parseMention',
|
|
@@ -757,10 +757,10 @@ class FarisMessageComponent {
|
|
|
757
757
|
return String(content);
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
761
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
761
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisMessageComponent, isStandalone: true, selector: "mt-faris-message", inputs: { item: "item", currentUserPhoto: "currentUserPhoto", loading: "loading", thinkingText: "thinkingText" }, outputs: { action: "action", canvas: "canvas" }, ngImport: i0, template: "@if (item.role === \"user\") {\r\n <div class=\"faris-message\">\r\n <img\r\n [src]=\"currentUserPhoto || fallbackUserPhoto\"\r\n (error)=\"setFallbackUserPhoto()\"\r\n class=\"rounded-full user-img-md\"\r\n alt=\"\"\r\n />\r\n <div\r\n class=\"result-markdown result-width user\"\r\n [innerHTML]=\"item.content | parseMention | farisMarkdown\"\r\n ></div>\r\n </div>\r\n}\r\n\r\n@if (item.role === \"assistant\") {\r\n <div class=\"faris-message\">\r\n <div class=\"gemini-ic\" [class.thinking]=\"loading && !item.loaded\">\r\n <svg\r\n focusable=\"false\"\r\n viewBox=\"0 -960 960 960\"\r\n height=\"28\"\r\n width=\"28\"\r\n class=\"EiVpKc aoH\"\r\n >\r\n <path\r\n d=\"M480-80q2,0 2-2q0-82 31-154t85-126t126-85t154-31q2,0 2-2t-2-2q-82,0-154-31T598-598T513-724T482-878q0-2-2-2t-2,2q0,82-31,154T362-598T236-513T82-482q-2,0-2,2t2,2q82,0 154,31t126,85t85,126T478-82q0,2 2,2Z\"\r\n ></path>\r\n </svg>\r\n </div>\r\n\r\n <div class=\"flex w-[85%] max-w-[98%] flex-col\">\r\n @if (!loading || item.loaded) {\r\n <div class=\"w-full\">\r\n <div\r\n class=\"result-markdown faris\"\r\n [innerHTML]=\"item.content | farisMarkdown\"\r\n ></div>\r\n\r\n @if (canvasMessage) {\r\n <mt-button\r\n type=\"button\"\r\n [label]=\"'faris.launch-canvas' | translate\"\r\n variant=\"outlined\"\r\n size=\"small\"\r\n styleClass=\"mt-2\"\r\n (click)=\"launchCanvas()\"\r\n ></mt-button>\r\n }\r\n\r\n <mt-faris-message-actions\r\n [downloading]=\"downloading\"\r\n [canvasMessage]=\"canvasMessage\"\r\n [currentVote]=\"\r\n item.feedback === '1'\r\n ? 'like'\r\n : item.feedback === '-1'\r\n ? 'dislike'\r\n : null\r\n \"\r\n (action)=\"takeAction($event, item)\"\r\n >\r\n </mt-faris-message-actions>\r\n </div>\r\n }\r\n\r\n @if (loading && !item.loaded) {\r\n <div class=\"thinking-text\">{{ thinkingText }}</div>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@charset \"UTF-8\";@keyframes thinking-animation{0%{filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}50%{filter:drop-shadow(0 0 8px rgb(123,207,255))}to{filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}}@keyframes thinking-text-animation{0%{background-position:0% 50%}to{background-position:100% 50%}}.faris-message{display:flex;gap:1em}.user-img-md{height:24px;width:24px;object-fit:cover}.result-width{width:85%;max-width:98%}.result-markdown{padding:10px;border-radius:var(--faris-lg-border-radius);overflow-wrap:anywhere}.result-markdown pre.faris-code{margin:8px 0;overflow-x:auto;border-radius:var(--faris-sm-border-radius);background:#f6f8fa;padding:8px}.result-markdown code{border-radius:var(--faris-sm-border-radius);background:#f6f8fa;padding:2px 4px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.85em}.result-markdown h1,.result-markdown h2,.result-markdown h3{margin:10px 0 6px;font-weight:600;line-height:1.3}.result-markdown h1{font-size:1.1em}.result-markdown h2{font-size:1em}.result-markdown h3{font-size:.95em}.result-markdown a{color:var(--primary-color);text-decoration:underline}.result-markdown.user{background-color:var(--primary-color, #e9eef6);color:#fff}.result-markdown.faris{border:1px solid #dfe2e5}::ng-deep .md-table-wrapper{width:100%;overflow-y:auto}::ng-deep .gemini-ic.thinking{animation:thinking-animation 2s infinite}.thinking-text{background:linear-gradient(to right,#a3a3a3 20%,#c3c3c3 30%,#f0f0f0 50%,#f8f8f8,#f0f0f0,#c3c3c3 80%,#a3a3a3);animation:thinking-text-animation 1.5s infinite linear;-webkit-background-clip:text;background-clip:text;background-size:500% auto;color:transparent;font-size:1em}.thinking-text:after{overflow:hidden;display:inline-block;vertical-align:bottom;content:\"\\2026\";color:#f8f8f8;width:0;animation:ellipsis .9s infinite steps(4,end)}@keyframes ellipsis{to{width:1.25em}}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: FarisMessageActionsComponent, selector: "mt-faris-message-actions", inputs: ["currentVote", "canvasMessage", "downloading"], outputs: ["action"] }, { kind: "pipe", type: ParseMentionPipe, name: "parseMention" }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }, { kind: "pipe", type: FarisMarkdownPipe, name: "farisMarkdown" }] });
|
|
762
762
|
}
|
|
763
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisMessageComponent, decorators: [{
|
|
764
764
|
type: Component,
|
|
765
765
|
args: [{ selector: 'mt-faris-message', standalone: true, imports: [
|
|
766
766
|
Button,
|
|
@@ -798,10 +798,10 @@ class MentionApiService {
|
|
|
798
798
|
params: { query: term },
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
802
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
801
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
802
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionApiService, providedIn: 'root' });
|
|
803
803
|
}
|
|
804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionApiService, decorators: [{
|
|
805
805
|
type: Injectable,
|
|
806
806
|
args: [{ providedIn: 'root' }]
|
|
807
807
|
}], ctorParameters: () => [] });
|
|
@@ -852,10 +852,10 @@ class MentionListComponent {
|
|
|
852
852
|
const activeItem = items[this.activeIndex];
|
|
853
853
|
activeItem?.scrollIntoView({ block: 'nearest' });
|
|
854
854
|
}
|
|
855
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
856
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
855
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
856
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MentionListComponent, isStandalone: true, selector: "mt-faris-mention-list", inputs: { items: "items", loading: "loading" }, outputs: { itemSelected: "itemSelected" }, usesOnChanges: true, ngImport: i0, template: "<ul class=\"mention-list\">\r\n @if (loading) {\r\n <li title=\"loading...\">\r\n <div class=\"mention-item skeleton\"> </div>\r\n <div class=\"mention-item skeleton\"> </div>\r\n <div class=\"mention-item skeleton\"> </div>\r\n </li>\r\n }\r\n\r\n @if (!loading && items.length === 0) {\r\n <li class=\"mention-item-empty\">\r\n {{ \"faris.no-results-found\" | translate }}\r\n </li>\r\n }\r\n\r\n @for (item of items; track item.id; let i = $index) {\r\n <li\r\n (mousedown)=\"onItemClick($event, item)\"\r\n class=\"mention-item\"\r\n [class.active]=\"i === activeIndex\"\r\n [hidden]=\"loading\"\r\n >\r\n {{ item.title }}\r\n @if (item.levelType) {\r\n <span class=\"mention-item-type\">({{ item.levelType }})</span>\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", styles: [".mention-list{list-style:none;margin:0;padding:5px;background:#fff;border-radius:var(--faris-border-radius);box-shadow:0 5px 10px #0000001a;max-height:200px;overflow-y:auto;z-index:1503;background-color:#ffffffbf;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.mention-item{padding:8px 12px;cursor:pointer;border-radius:var(--faris-sm-border-radius)}.mention-item:not(:last-child){margin-bottom:4px}.mention-item:hover{background-color:#f2f2f2}.mention-item-empty{padding:8px 12px;color:#888;font-style:italic}.mention-item.active{background-color:#e5e5e5;font-weight:700}.mention-item-type{opacity:.75;font-size:.9em}.skeleton{background-color:#e0e0e0;animation:pulse 1.5s infinite ease-in-out}@keyframes pulse{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}\n"], dependencies: [{ kind: "pipe", type: FarisTranslatePipe, name: "translate" }] });
|
|
857
857
|
}
|
|
858
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
858
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionListComponent, decorators: [{
|
|
859
859
|
type: Component,
|
|
860
860
|
args: [{ selector: 'mt-faris-mention-list', standalone: true, imports: [FarisTranslatePipe], template: "<ul class=\"mention-list\">\r\n @if (loading) {\r\n <li title=\"loading...\">\r\n <div class=\"mention-item skeleton\"> </div>\r\n <div class=\"mention-item skeleton\"> </div>\r\n <div class=\"mention-item skeleton\"> </div>\r\n </li>\r\n }\r\n\r\n @if (!loading && items.length === 0) {\r\n <li class=\"mention-item-empty\">\r\n {{ \"faris.no-results-found\" | translate }}\r\n </li>\r\n }\r\n\r\n @for (item of items; track item.id; let i = $index) {\r\n <li\r\n (mousedown)=\"onItemClick($event, item)\"\r\n class=\"mention-item\"\r\n [class.active]=\"i === activeIndex\"\r\n [hidden]=\"loading\"\r\n >\r\n {{ item.title }}\r\n @if (item.levelType) {\r\n <span class=\"mention-item-type\">({{ item.levelType }})</span>\r\n }\r\n </li>\r\n }\r\n</ul>\r\n", styles: [".mention-list{list-style:none;margin:0;padding:5px;background:#fff;border-radius:var(--faris-border-radius);box-shadow:0 5px 10px #0000001a;max-height:200px;overflow-y:auto;z-index:1503;background-color:#ffffffbf;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.mention-item{padding:8px 12px;cursor:pointer;border-radius:var(--faris-sm-border-radius)}.mention-item:not(:last-child){margin-bottom:4px}.mention-item:hover{background-color:#f2f2f2}.mention-item-empty{padding:8px 12px;color:#888;font-style:italic}.mention-item.active{background-color:#e5e5e5;font-weight:700}.mention-item-type{opacity:.75;font-size:.9em}.skeleton{background-color:#e0e0e0;animation:pulse 1.5s infinite ease-in-out}@keyframes pulse{0%{background-color:#e0e0e0}50%{background-color:#f0f0f0}to{background-color:#e0e0e0}}\n"] }]
|
|
861
861
|
}], propDecorators: { items: [{
|
|
@@ -1220,8 +1220,8 @@ class MentionInputComponent {
|
|
|
1220
1220
|
selection?.addRange(range);
|
|
1221
1221
|
element.focus();
|
|
1222
1222
|
}
|
|
1223
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1224
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.
|
|
1223
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1224
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.8", type: MentionInputComponent, isStandalone: true, selector: "mt-faris-mention-input", providers: [
|
|
1225
1225
|
{
|
|
1226
1226
|
provide: NG_VALUE_ACCESSOR,
|
|
1227
1227
|
useExisting: forwardRef(() => MentionInputComponent),
|
|
@@ -1229,7 +1229,7 @@ class MentionInputComponent {
|
|
|
1229
1229
|
},
|
|
1230
1230
|
], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["mentionInput"], descendants: true, static: true }], ngImport: i0, template: "<div\r\n #mentionInput\r\n class=\"mention-input\"\r\n contenteditable=\"true\"\r\n (input)=\"onInput()\"\r\n (blur)=\"onBlur()\"\r\n (keydown.arrowUp)=\"onArrowUpDown($event)\"\r\n (keydown.arrowDown)=\"onArrowUpDown($event)\"\r\n (keydown.enter)=\"onEnter($event)\"\r\n (keydown.tab)=\"onTab($event)\"\r\n></div>\r\n", styles: [":host{width:100%;display:block}::ng-deep .cdk-overlay-connected-position-bounding-box:has(.mention-overlay-panel){display:flex;flex-direction:column;position:absolute}::ng-deep .mention-overlay-panel{z-index:1501}::ng-deep .mention-input .mention-highlight{font-weight:700;border-radius:var(--faris-sm-border-radius)}.mention-input{min-height:40px;min-height:3em;height:3em;max-height:3em;cursor:text;line-height:1.5;outline:none;overflow-y:auto;border:1px solid #dee2e6;padding:.5em;border-radius:var(--faris-border-radius);resize:none;font-size:1em;background-color:#fff}.mention-input p{margin:0}.mention-input:focus{box-shadow:0 5px 10px #00000014}\n"] });
|
|
1231
1231
|
}
|
|
1232
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1232
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MentionInputComponent, decorators: [{
|
|
1233
1233
|
type: Component,
|
|
1234
1234
|
args: [{ selector: 'mt-faris-mention-input', standalone: true, providers: [
|
|
1235
1235
|
{
|
|
@@ -1501,10 +1501,10 @@ class FarisChatComponent {
|
|
|
1501
1501
|
return String(content);
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1505
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1504
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisChatComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1505
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisChatComponent, isStandalone: true, selector: "mt-faris-chat", inputs: { selectedConversation: "selectedConversation" }, outputs: { launchCanvas: "launchCanvas", selectConversation: "selectConversation" }, ngImport: i0, template: "<div class=\"relative flex h-full w-full flex-col justify-between\" #container>\r\n @if (!showResult) {\r\n <div class=\"welcome-user\">\r\n <span class=\"hello-gradient\"\r\n >{{ \"faris.hello\" | translate }}, {{ currentUserDisplayName }}</span\r\n >\r\n <span class=\"welcome-text\">{{\r\n \"faris.welcome-message\" | translate\r\n }}</span>\r\n </div>\r\n }\r\n\r\n <div class=\"results-container\" id=\"results-container\">\r\n <div class=\"pre-defined-questions flex w-full flex-col\">\r\n @if (!showResult) {\r\n @for (agent of agents; track agent?.title) {\r\n <mt-faris-agent-card\r\n class=\"real-content\"\r\n [agent]=\"agent\"\r\n (click)=\"sendQuery(agent.title)\"\r\n ></mt-faris-agent-card>\r\n }\r\n }\r\n\r\n @if (showResult) {\r\n @for (\r\n item of chatHistory;\r\n track item.trace_id || item.message_id || $index\r\n ) {\r\n <mt-faris-message\r\n [item]=\"item\"\r\n [currentUserPhoto]=\"currentUserPhoto\"\r\n [loading]=\"loading\"\r\n [thinkingText]=\"thinkingText\"\r\n (action)=\"takeAction($event.action, $event.item)\"\r\n (canvas)=\"launchCanvas.emit($event)\"\r\n >\r\n </mt-faris-message>\r\n }\r\n }\r\n </div>\r\n </div>\r\n\r\n <div class=\"search-box\">\r\n <form class=\"w-full\" #chatForm=\"ngForm\" (ngSubmit)=\"sendQuery(userInput)\">\r\n <div class=\"input-box\">\r\n <mt-faris-mention-input\r\n [(ngModel)]=\"userInput\"\r\n [ngModelOptions]=\"{ standalone: true }\"\r\n (keydown.enter)=\"sendQuery(userInput)\"\r\n ></mt-faris-mention-input>\r\n\r\n <mt-button\r\n type=\"submit\"\r\n icon=\"communication.send-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-lg\"\r\n [disabled]=\"!userInput || !userInput.trim() || loading\"\r\n ></mt-button>\r\n </div>\r\n </form>\r\n\r\n <small>{{ \"faris.input-message\" | translate }}</small>\r\n </div>\r\n</div>\r\n", styles: [".results-container{height:90%;overflow-y:auto;margin:0 1em 100px}.conversations-container{height:85%;overflow-y:auto;margin:0 1em 140px}.search-box{position:absolute;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:90px;border-top:1px solid #dee2e6;gap:.5em;padding:.5em 1em;bottom:0;left:0}.search-box small{font-size:.65em;opacity:.8}.search-box .input-box{display:flex;align-items:center;gap:.5em}.search-box .input-box textarea{border:1px solid #dee2e6;padding:.5em;border-radius:var(--faris-border-radius);box-shadow:0 5px 10px #00000014;resize:none;height:unset!important;width:100%!important;outline:none;font-size:1em}.search-box .input-box textarea::-webkit-input-placeholder{font-size:1em}.pre-defined-questions{gap:1em;width:100%}.welcome-user{display:flex;flex-direction:column;gap:.5em;font-size:1.1em;font-weight:500;padding:0 1em 1.2em;line-height:22px}.welcome-user .hello-gradient{font-size:1.5em;font-weight:700;background:-webkit-linear-gradient(315deg,#217bfe 0,#078efb 33%,#ac87eb 100%);background:linear-gradient(135deg,#217bfe 0,#078efb 33%,#ac87eb);background-size:200% 100%;display:-webkit-inline-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-word;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;inline-size:-webkit-fit-content;inline-size:fit-content;display:block;animation:gradient-shine 1.5s ease-in}@keyframes gradient-shine{0%{background-position:200% center;opacity:0}60%{opacity:1}to{background-position:0% center;opacity:1}}.welcome-user .welcome-text{display:inline-block;background:linear-gradient(90deg,#888 100%,transparent 0%);background-size:0% 100%;background-repeat:no-repeat;color:transparent;background-clip:text;-webkit-background-clip:text;animation:fill-gray 1.5s forwards;animation-delay:.5s}@keyframes fill-text{0%{background-size:0% 100%;opacity:0}30%{opacity:1}to{background-size:200% 100%;opacity:1}}@keyframes fill-gray{0%{background-size:0% 100%;opacity:0}30%{opacity:1}to{background-size:100% 100%;opacity:1}}:dir(rtl) .welcome-user .hello-gradient{background:linear-gradient(-135deg,#217bfe 0,#078efb 33%,#ac87eb);background-size:200% 100%;background-position:0% center;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:gradient-shine-rtl 1.5s ease-in}@keyframes gradient-shine-rtl{0%{background-position:-200% center;opacity:0}60%{opacity:1}to{background-position:0% center;opacity:1}}:dir(rtl) .welcome-user .welcome-text{background:linear-gradient(270deg,#888 100%,transparent 0%);background-size:0% 100%;background-repeat:no-repeat;background-position:right center;background-clip:text;-webkit-background-clip:text;color:transparent;animation:fill-gray-rtl 1.5s forwards;animation-delay:.5s}@keyframes fill-gray-rtl{0%{background-size:0% 100%;opacity:0}30%{opacity:1}to{background-size:100% 100%;opacity:1}}::ng-deep markdown{width:calc(100% - 28px)}::ng-deep markdown h1{font-size:1em}::ng-deep markdown h2{font-size:.9em}::ng-deep markdown h3{font-size:.8em}::ng-deep markdown h4{font-size:.7em}::ng-deep markdown h5{font-size:.6em}::ng-deep markdown h6{font-size:.5em}::ng-deep markdown p{font-size:.9em;line-height:1.5;margin:8px 0}::ng-deep markdown ul,::ng-deep markdown ol{font-size:.9em;line-height:1.5;margin-inline-start:1.5em;padding:0;list-style-type:disclosure-closed}::ng-deep markdown li{margin-bottom:.5em}::ng-deep markdown blockquote{border-inline-start:4px solid #dfe2e5;padding:.5em 1em;margin:1em 0;background-color:#f6f8fa}::ng-deep markdown code{background-color:#f6f8fa;padding:.2em .4em;border-radius:var(--faris-sm-border-radius);font-family:Courier New,Courier,monospace}::ng-deep markdown table{width:100%;border-collapse:collapse;margin:1em 0}::ng-deep markdown th,::ng-deep markdown td{border:1px solid #dfe2e5;padding:.5em;text-align:start}::ng-deep markdown th{background-color:#f6f8fa;font-weight:700}::ng-deep markdown img{max-width:100%;height:auto;display:block;margin:1em 0}::ng-deep markdown .chart-placeholder{width:100%!important}.thinking{position:absolute;inset-inline-start:0;bottom:110px}#thinkingText{font-size:12px;font-weight:700}@keyframes dots{0%{content:\".\"}33%{content:\"..\"}66%{content:\"...\"}}#dots:after{content:\".\";animation:dots 1s infinite steps(3,end)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: AgentCardComponent, selector: "mt-faris-agent-card", inputs: ["agent"] }, { kind: "component", type: FarisMessageComponent, selector: "mt-faris-message", inputs: ["item", "currentUserPhoto", "loading", "thinkingText"], outputs: ["action", "canvas"] }, { kind: "component", type: MentionInputComponent, selector: "mt-faris-mention-input" }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }] });
|
|
1506
1506
|
}
|
|
1507
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisChatComponent, decorators: [{
|
|
1508
1508
|
type: Component,
|
|
1509
1509
|
args: [{ selector: 'mt-faris-chat', standalone: true, imports: [
|
|
1510
1510
|
FormsModule,
|
|
@@ -1523,6 +1523,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1523
1523
|
}] } });
|
|
1524
1524
|
|
|
1525
1525
|
class FarisChatHistoryComponent {
|
|
1526
|
+
transloco = inject(TranslocoService);
|
|
1526
1527
|
userConversations = [];
|
|
1527
1528
|
showChatHistory = false;
|
|
1528
1529
|
selectedConversation = null;
|
|
@@ -1549,17 +1550,20 @@ class FarisChatHistoryComponent {
|
|
|
1549
1550
|
const normalized = (conversations || []).map((conversation, index) => this.normalizeConversation(conversation, index));
|
|
1550
1551
|
const sorted = [...normalized].sort((a, b) => this.resolveConversationTimestamp(b) -
|
|
1551
1552
|
this.resolveConversationTimestamp(a));
|
|
1552
|
-
const todayGroup = {
|
|
1553
|
+
const todayGroup = {
|
|
1554
|
+
label: this.transloco.translate('faris.today'),
|
|
1555
|
+
conversations: [],
|
|
1556
|
+
};
|
|
1553
1557
|
const yesterdayGroup = {
|
|
1554
|
-
label: '
|
|
1558
|
+
label: this.transloco.translate('faris.yesterday'),
|
|
1555
1559
|
conversations: [],
|
|
1556
1560
|
};
|
|
1557
1561
|
const thisWeekGroup = {
|
|
1558
|
-
label: '
|
|
1562
|
+
label: this.transloco.translate('faris.this-week'),
|
|
1559
1563
|
conversations: [],
|
|
1560
1564
|
};
|
|
1561
1565
|
const lastWeekGroup = {
|
|
1562
|
-
label: '
|
|
1566
|
+
label: this.transloco.translate('faris.last-week'),
|
|
1563
1567
|
conversations: [],
|
|
1564
1568
|
};
|
|
1565
1569
|
const monthGroups = new Map();
|
|
@@ -1572,12 +1576,12 @@ class FarisChatHistoryComponent {
|
|
|
1572
1576
|
const updatedDate = this.resolveConversationDate(conversation) ?? now;
|
|
1573
1577
|
const updatedStart = this.startOfDay(updatedDate).getTime();
|
|
1574
1578
|
if (updatedStart === todayStart) {
|
|
1575
|
-
conversation.displayDate = '
|
|
1579
|
+
conversation.displayDate = this.transloco.translate('faris.today');
|
|
1576
1580
|
todayGroup.conversations.push(conversation);
|
|
1577
1581
|
continue;
|
|
1578
1582
|
}
|
|
1579
1583
|
if (updatedStart === yesterdayStart) {
|
|
1580
|
-
conversation.displayDate = '
|
|
1584
|
+
conversation.displayDate = this.transloco.translate('faris.yesterday');
|
|
1581
1585
|
yesterdayGroup.conversations.push(conversation);
|
|
1582
1586
|
continue;
|
|
1583
1587
|
}
|
|
@@ -1684,10 +1688,10 @@ class FarisChatHistoryComponent {
|
|
|
1684
1688
|
resolveConversationTimestamp(conversation) {
|
|
1685
1689
|
return this.resolveConversationDate(conversation)?.getTime() ?? 0;
|
|
1686
1690
|
}
|
|
1687
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1688
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1691
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisChatHistoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1692
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisChatHistoryComponent, isStandalone: true, selector: "mt-faris-chat-history", inputs: { userConversations: "userConversations", showChatHistory: "showChatHistory", selectedConversation: "selectedConversation" }, outputs: { selectConversation: "selectConversation", deleteConversationHandler: "deleteConversationHandler", closeHistory: "closeHistory" }, usesOnChanges: true, ngImport: i0, template: "<div\r\n class=\"conversations-history\"\r\n [class.closed-chat-history-side]=\"!showChatHistory\"\r\n>\r\n <div class=\"conversations-header\">\r\n <span class=\"conversations-title\">{{\r\n \"faris.chat-history\" | translate\r\n }}</span>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"onCloseHistory()\"\r\n ></mt-button>\r\n </div>\r\n\r\n <div class=\"conversations-list\">\r\n @for (group of groupedConversations; track group.label) {\r\n <div class=\"conversation-group-header\">{{ group.label }}</div>\r\n\r\n @for (conversation of group.conversations; track conversation.id) {\r\n <div\r\n class=\"conversation-item flex w-full cursor-pointer items-center justify-between gap-2 rounded-md p-2\"\r\n (click)=\"onSelectConversation(conversation)\"\r\n [class.active-conversation]=\"\r\n selectedConversation?.id === conversation.id\r\n \"\r\n >\r\n <mt-icon icon=\"communication.message-chat-circle\"></mt-icon>\r\n\r\n <div class=\"conversation-title-group\">\r\n <div class=\"conversation-title\">\r\n {{ (conversation?.title | parseMention) || \" \" }}\r\n </div>\r\n <div class=\"conversation-subtitle\">\r\n {{ conversation.displayDate }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"conversation-actions\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.trash-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted text-red-600\"\r\n [tooltip]=\"'faris.delete' | translate\"\r\n (click)=\"onDeleteConversation($event, conversation?.id)\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: [".conversations-history{display:flex;flex-direction:column;height:100%;background:#f8f9fa;border-inline-end:1px solid #e0e0e0;overflow-y:auto;width:20vw;min-width:220px;max-width:320px;transition:width .2s;overflow-x:hidden}.conversations-history .conversations-header{display:flex;align-items:center;justify-content:space-between;padding:.5em .75em;font-size:1.1em;font-weight:500;color:#333;border-bottom:1px solid #e0e0e0}.conversations-history .conversations-header .history-close-button{display:flex;align-items:center;justify-content:center;border:1px solid transparent;background-color:transparent;border-radius:var(--faris-sm-border-radius);width:2em;height:2em;cursor:pointer;font-size:1.1em;padding:0;transition:all .2s ease}.conversations-history .conversations-header .history-close-button:hover{background-color:#0000000d}.conversations-history .conversations-list{display:flex;flex-direction:column;padding:.5em;gap:.5em;overflow-y:auto;height:calc(100vh - 50px)}.conversations-history .conversation-title-group{flex:1;overflow:hidden}.conversations-history .conversation-title-group .conversation-title{font-size:.98em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:inherit}.conversations-history .conversation-title-group .conversation-subtitle{font-size:.9em;opacity:.8}.conversations-history .conversation-group-header{margin-top:1em;margin-bottom:.5em;font-size:1.1em}.conversations-history .conversation-item{cursor:pointer;color:#333;border-radius:var(--faris-border-radius);transition:background .15s;-webkit-user-select:none;user-select:none}.conversations-history .conversation-item .conversation-actions{display:flex;align-items:center;gap:.5em;opacity:0;transition:all .2s ease}.conversations-history .conversation-item:hover .conversation-actions{opacity:1}.conversations-history mt-icon{font-size:1.2em}.conversations-history .conversation-item{gap:.5em}.conversations-history .conversation-item.active,.conversations-history .conversation-item.active-conversation{background:#e3f2fd;color:var(--primary-color);font-weight:600}.conversations-history .conversation-item:hover:not(.active-conversation){background:#f1f1f1}.closed-chat-history-side{width:0px!important;min-width:0px!important;border-inline-end:none!important}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Icon, selector: "mt-icon", inputs: ["icon"] }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }, { kind: "pipe", type: ParseMentionPipe, name: "parseMention" }] });
|
|
1689
1693
|
}
|
|
1690
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1694
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisChatHistoryComponent, decorators: [{
|
|
1691
1695
|
type: Component,
|
|
1692
1696
|
args: [{ selector: 'mt-faris-chat-history', standalone: true, imports: [FarisTranslatePipe, ParseMentionPipe, Button, Icon], template: "<div\r\n class=\"conversations-history\"\r\n [class.closed-chat-history-side]=\"!showChatHistory\"\r\n>\r\n <div class=\"conversations-header\">\r\n <span class=\"conversations-title\">{{\r\n \"faris.chat-history\" | translate\r\n }}</span>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"onCloseHistory()\"\r\n ></mt-button>\r\n </div>\r\n\r\n <div class=\"conversations-list\">\r\n @for (group of groupedConversations; track group.label) {\r\n <div class=\"conversation-group-header\">{{ group.label }}</div>\r\n\r\n @for (conversation of group.conversations; track conversation.id) {\r\n <div\r\n class=\"conversation-item flex w-full cursor-pointer items-center justify-between gap-2 rounded-md p-2\"\r\n (click)=\"onSelectConversation(conversation)\"\r\n [class.active-conversation]=\"\r\n selectedConversation?.id === conversation.id\r\n \"\r\n >\r\n <mt-icon icon=\"communication.message-chat-circle\"></mt-icon>\r\n\r\n <div class=\"conversation-title-group\">\r\n <div class=\"conversation-title\">\r\n {{ (conversation?.title | parseMention) || \" \" }}\r\n </div>\r\n <div class=\"conversation-subtitle\">\r\n {{ conversation.displayDate }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"conversation-actions\">\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.trash-01\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn faris-btn-muted text-red-600\"\r\n [tooltip]=\"'faris.delete' | translate\"\r\n (click)=\"onDeleteConversation($event, conversation?.id)\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n }\r\n }\r\n </div>\r\n</div>\r\n", styles: [".conversations-history{display:flex;flex-direction:column;height:100%;background:#f8f9fa;border-inline-end:1px solid #e0e0e0;overflow-y:auto;width:20vw;min-width:220px;max-width:320px;transition:width .2s;overflow-x:hidden}.conversations-history .conversations-header{display:flex;align-items:center;justify-content:space-between;padding:.5em .75em;font-size:1.1em;font-weight:500;color:#333;border-bottom:1px solid #e0e0e0}.conversations-history .conversations-header .history-close-button{display:flex;align-items:center;justify-content:center;border:1px solid transparent;background-color:transparent;border-radius:var(--faris-sm-border-radius);width:2em;height:2em;cursor:pointer;font-size:1.1em;padding:0;transition:all .2s ease}.conversations-history .conversations-header .history-close-button:hover{background-color:#0000000d}.conversations-history .conversations-list{display:flex;flex-direction:column;padding:.5em;gap:.5em;overflow-y:auto;height:calc(100vh - 50px)}.conversations-history .conversation-title-group{flex:1;overflow:hidden}.conversations-history .conversation-title-group .conversation-title{font-size:.98em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:inherit}.conversations-history .conversation-title-group .conversation-subtitle{font-size:.9em;opacity:.8}.conversations-history .conversation-group-header{margin-top:1em;margin-bottom:.5em;font-size:1.1em}.conversations-history .conversation-item{cursor:pointer;color:#333;border-radius:var(--faris-border-radius);transition:background .15s;-webkit-user-select:none;user-select:none}.conversations-history .conversation-item .conversation-actions{display:flex;align-items:center;gap:.5em;opacity:0;transition:all .2s ease}.conversations-history .conversation-item:hover .conversation-actions{opacity:1}.conversations-history mt-icon{font-size:1.2em}.conversations-history .conversation-item{gap:.5em}.conversations-history .conversation-item.active,.conversations-history .conversation-item.active-conversation{background:#e3f2fd;color:var(--primary-color);font-weight:600}.conversations-history .conversation-item:hover:not(.active-conversation){background:#f1f1f1}.closed-chat-history-side{width:0px!important;min-width:0px!important;border-inline-end:none!important}\n"] }]
|
|
1693
1697
|
}], propDecorators: { userConversations: [{
|
|
@@ -1733,8 +1737,8 @@ class MinimizablePopupComponent {
|
|
|
1733
1737
|
this.closed.emit(true);
|
|
1734
1738
|
}
|
|
1735
1739
|
}
|
|
1736
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1737
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.3", type: MinimizablePopupComponent, isStandalone: true, selector: "mt-faris-popup", inputs: { title: "title", maximized: "maximized" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"custom-window-backdrop\"></div>\r\n@if (!isClosing) {\r\n <div\r\n class=\"custom-window-modal\"\r\n [@slideInOut]=\"{\r\n value: '',\r\n params: {\r\n enterTransform: enterTransform,\r\n leaveTransform: leaveTransform,\r\n },\r\n }\"\r\n (@slideInOut.done)=\"onAnimationDone($event)\"\r\n >\r\n <ng-content select=\"[panelCanvas]\"></ng-content>\r\n <div class=\"custom-window-container\" [class.maximized]=\"maximized\">\r\n <ng-content select=\"[panelSidebar]\"></ng-content>\r\n <div class=\"resizable-panel\">\r\n <div class=\"panel-content\">\r\n <div\r\n class=\"modal-header flex items-center justify-between p-4 border-bottom-1 border-b border-surface-300\"\r\n >\r\n <h5 class=\"modal-title custom-window-title\">\r\n <ng-content select=\"[panelTitle]\"></ng-content>\r\n </h5>\r\n <div class=\"modal-controls flex items-center\">\r\n <ng-content select=\"[panelActions]\"></ng-content>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"close()\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n <div class=\"modal-body w-full\">\r\n <ng-content select=\"[panelChat]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@keyframes smooth-appear{0%{opacity:0}to{opacity:1}}:host{display:block;position:fixed;inset:0;z-index:1501!important}.custom-window-backdrop{position:fixed;inset:0;background-color:#0003;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:1500!important}.custom-window-modal{position:relative;display:flex;justify-content:flex-end;z-index:1501!important}.custom-window-modal .modal-header{background:#fff;border-radius:0!important}.custom-window-modal .modal-controls{display:flex;align-items:center;justify-content:flex-end;gap:.5em}.custom-window-modal .modal-controls button{margin-left:.25em}.custom-window-modal .modal-body{height:calc(100% - 79px)!important;max-height:100%!important;padding:1em 0!important}.custom-window-modal .custom-window-container{display:flex;justify-content:flex-end;transition:all .4s ease}.custom-window-modal .custom-window-container.maximized,.custom-window-modal .custom-window-container.maximized .resizable-panel{flex:1}.custom-window-title{flex:1;overflow:hidden}.minimized-tab{position:fixed;bottom:10px;left:0;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.resizable-container{position:fixed;inset:0;display:flex;justify-content:flex-end;pointer-events:none;transition:all .4s ease;transform:translate(0);align-items:end}.resizable-container.resizing{background-color:#0000001a;pointer-events:auto}.resizable-panel{position:relative;flex:1;width:35vw;min-width:600px;height:100vh;background:#fff;pointer-events:auto;display:flex;flex-direction:column;align-items:end}.resize-handle{height:6px;cursor:ns-resize;background:#ccc;position:absolute;top:0;left:0;right:0}.resize-handle.horizontal{width:3px;height:100%;cursor:ew-resize;z-index:1500}.panel-content{flex:1;overflow:auto;width:100%}.custom-close-badge{top:-30%;right:-10%}.minimized-tab-1{left:115px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-2{left:230px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-3{left:345px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-4{left:460px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-5{left:575px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-6{left:690px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-7{left:805px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-8{left:920px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-9{left:1035px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-10{left:1150px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-11{left:1265px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-12{left:1380px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-13{left:1495px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-14{left:1610px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-15{left:1725px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-16{left:1840px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-17{left:1955px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-18{left:2070px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-19{left:2185px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-20{left:2300px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-1{right:115px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-2{right:230px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-3{right:345px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-4{right:460px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-5{right:575px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-6{right:690px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-7{right:805px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-8{right:920px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-9{right:1035px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-10{right:1150px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-11{right:1265px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-12{right:1380px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-13{right:1495px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-14{right:1610px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-15{right:1725px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-16{right:1840px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-17{right:1955px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-18{right:2070px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-19{right:2185px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-20{right:2300px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .custom-close-badge{left:-10%;right:auto}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }], animations: [
|
|
1740
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MinimizablePopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1741
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: MinimizablePopupComponent, isStandalone: true, selector: "mt-faris-popup", inputs: { title: "title", maximized: "maximized" }, outputs: { closed: "closed" }, ngImport: i0, template: "<div class=\"custom-window-backdrop\"></div>\r\n@if (!isClosing) {\r\n <div\r\n class=\"custom-window-modal\"\r\n [@slideInOut]=\"{\r\n value: '',\r\n params: {\r\n enterTransform: enterTransform,\r\n leaveTransform: leaveTransform,\r\n },\r\n }\"\r\n (@slideInOut.done)=\"onAnimationDone($event)\"\r\n >\r\n <ng-content select=\"[panelCanvas]\"></ng-content>\r\n <div class=\"custom-window-container\" [class.maximized]=\"maximized\">\r\n <ng-content select=\"[panelSidebar]\"></ng-content>\r\n <div class=\"resizable-panel\">\r\n <div class=\"panel-content\">\r\n <div\r\n class=\"modal-header flex items-center justify-between p-4 border-bottom-1 border-b border-surface-300\"\r\n >\r\n <h5 class=\"modal-title custom-window-title\">\r\n <ng-content select=\"[panelTitle]\"></ng-content>\r\n </h5>\r\n <div class=\"modal-controls flex items-center\">\r\n <ng-content select=\"[panelActions]\"></ng-content>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.x-close\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"close()\"\r\n ></mt-button>\r\n </div>\r\n </div>\r\n <div class=\"modal-body w-full\">\r\n <ng-content select=\"[panelChat]\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: ["@keyframes smooth-appear{0%{opacity:0}to{opacity:1}}:host{display:block;position:fixed;inset:0;z-index:1501!important}.custom-window-backdrop{position:fixed;inset:0;background-color:#0003;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);z-index:1500!important}.custom-window-modal{position:relative;display:flex;justify-content:flex-end;z-index:1501!important}.custom-window-modal .modal-header{background:#fff;border-radius:0!important}.custom-window-modal .modal-controls{display:flex;align-items:center;justify-content:flex-end;gap:.5em}.custom-window-modal .modal-controls button{margin-left:.25em}.custom-window-modal .modal-body{height:calc(100% - 79px)!important;max-height:100%!important;padding:1em 0!important}.custom-window-modal .custom-window-container{display:flex;justify-content:flex-end;transition:all .4s ease}.custom-window-modal .custom-window-container.maximized,.custom-window-modal .custom-window-container.maximized .resizable-panel{flex:1}.custom-window-title{flex:1;overflow:hidden}.minimized-tab{position:fixed;bottom:10px;left:0;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.resizable-container{position:fixed;inset:0;display:flex;justify-content:flex-end;pointer-events:none;transition:all .4s ease;transform:translate(0);align-items:end}.resizable-container.resizing{background-color:#0000001a;pointer-events:auto}.resizable-panel{position:relative;flex:1;width:35vw;min-width:600px;height:100vh;background:#fff;pointer-events:auto;display:flex;flex-direction:column;align-items:end}.resize-handle{height:6px;cursor:ns-resize;background:#ccc;position:absolute;top:0;left:0;right:0}.resize-handle.horizontal{width:3px;height:100%;cursor:ew-resize;z-index:1500}.panel-content{flex:1;overflow:auto;width:100%}.custom-close-badge{top:-30%;right:-10%}.minimized-tab-1{left:115px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-2{left:230px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-3{left:345px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-4{left:460px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-5{left:575px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-6{left:690px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-7{left:805px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-8{left:920px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-9{left:1035px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-10{left:1150px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-11{left:1265px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-12{left:1380px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-13{left:1495px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-14{left:1610px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-15{left:1725px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-16{left:1840px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-17{left:1955px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-18{left:2070px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-19{left:2185px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}.minimized-tab-20{left:2300px;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-1{right:115px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-2{right:230px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-3{right:345px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-4{right:460px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-5{right:575px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-6{right:690px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-7{right:805px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-8{right:920px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-9{right:1035px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-10{right:1150px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-11{right:1265px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-12{right:1380px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-13{right:1495px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-14{right:1610px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-15{right:1725px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-16{right:1840px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-17{right:1955px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-18{right:2070px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-19{right:2185px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .minimized-tab-20{right:2300px;left:auto;position:fixed;bottom:10px;z-index:1501;background-color:var(--primary-color, #2a2e34);color:#fff;border:none;padding:.5em 1em;border-radius:.25em;cursor:pointer}::ng-deep [lang=ar] .custom-close-badge{left:-10%;right:auto}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }], animations: [
|
|
1738
1742
|
trigger('slideInOut', [
|
|
1739
1743
|
transition(':enter', [
|
|
1740
1744
|
style({ transform: '{{enterTransform}}' }),
|
|
@@ -1746,7 +1750,7 @@ class MinimizablePopupComponent {
|
|
|
1746
1750
|
]),
|
|
1747
1751
|
] });
|
|
1748
1752
|
}
|
|
1749
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: MinimizablePopupComponent, decorators: [{
|
|
1750
1754
|
type: Component,
|
|
1751
1755
|
args: [{ selector: 'mt-faris-popup', standalone: true, imports: [Button], animations: [
|
|
1752
1756
|
trigger('slideInOut', [
|
|
@@ -1904,10 +1908,10 @@ class FarisComponent {
|
|
|
1904
1908
|
this.subscription.unsubscribe();
|
|
1905
1909
|
}
|
|
1906
1910
|
}
|
|
1907
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
1908
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
1911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1912
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: FarisComponent, isStandalone: true, selector: "mt-faris", inputs: { showChatBot: "showChatBot" }, outputs: { showChatBotChange: "showChatBotChange" }, usesOnChanges: true, ngImport: i0, template: "@if (showChatBot) {\r\n <mt-faris-popup\r\n class=\"chat-bot-popup\"\r\n [maximized]=\"maximized && !canvasData.visible\"\r\n (closed)=\"closeChatBot()\"\r\n >\r\n <div panelTitle class=\"faris-title-container\">\r\n <div class=\"gemini-ic has-hover\">\r\n <svg\r\n focusable=\"false\"\r\n viewBox=\"0 -960 960 960\"\r\n height=\"28\"\r\n width=\"28\"\r\n class=\"EiVpKc aoH\"\r\n >\r\n <path\r\n d=\"M480-80q2,0 2-2q0-82 31-154t85-126t126-85t154-31q2,0 2-2t-2-2q-82,0-154-31T598-598T513-724T482-878q0-2-2-2t-2,2q0,82-31,154T362-598T236-513T82-482q-2,0-2,2t2,2q82,0 154,31t126,85t85,126T478-82q0,2 2,2Z\"\r\n ></path>\r\n </svg>\r\n </div>\r\n <div class=\"faris-title-group\">\r\n <div class=\"faris-title\">{{ \"faris.ask-faris\" | translate }}</div>\r\n <div\r\n class=\"faris-subtitle\"\r\n [title]=\"(selectedConversation?.title | parseMention) ?? ''\"\r\n >\r\n {{\r\n (selectedConversation?.title | parseMention) ||\r\n (\"faris.new-conversation\" | translate)\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container panelActions>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.plus\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"openNewChat()\"\r\n ></mt-button>\r\n <mt-button\r\n type=\"button\"\r\n [icon]=\"maximized ? 'layout.minimize-02' : 'layout.maximize-02'\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"maximized = !maximized\"\r\n ></mt-button>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"custom.history-sp\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"toggleChatHistory()\"\r\n ></mt-button>\r\n </ng-container>\r\n\r\n @if (canvasData.visible) {\r\n <mt-faris-canvas\r\n [message]=\"canvasData.message\"\r\n [conversationId]=\"canvasData.conversationId\"\r\n class=\"flex-1\"\r\n panelCanvas\r\n (closed)=\"canvasData.visible = false\"\r\n ></mt-faris-canvas>\r\n }\r\n\r\n <mt-faris-chat-history\r\n panelSidebar\r\n [userConversations]=\"userConversations\"\r\n [showChatHistory]=\"showChatHistory\"\r\n [selectedConversation]=\"selectedConversation\"\r\n (selectConversation)=\"onSelectConversation($event)\"\r\n (deleteConversationHandler)=\"onDeleteConversationHandler($event)\"\r\n (closeHistory)=\"onCloseHistory()\"\r\n >\r\n </mt-faris-chat-history>\r\n\r\n <div panelChat class=\"flex h-full w-full\">\r\n <mt-faris-chat\r\n class=\"w-full\"\r\n (launchCanvas)=\"launchCanvas($event)\"\r\n (selectConversation)=\"onSelectConversation($event)\"\r\n [selectedConversation]=\"selectedConversation\"\r\n >\r\n </mt-faris-chat>\r\n </div>\r\n </mt-faris-popup>\r\n}\r\n", styles: [":host{font-size:15.4545px}::ng-deep :root{--faris-border-radius: 8px;--faris-sm-border-radius: 5px;--faris-lg-border-radius: 10px}::ng-deep .faris-btn{display:flex;align-items:center;justify-content:center;border:1px solid transparent;background-color:transparent;border-radius:var(--faris-sm-border-radius);width:2em;height:2em;cursor:pointer;font-size:1.1em;padding:0;transition:all .2s ease}::ng-deep .faris-btn-muted{color:#99a1af}::ng-deep .faris-btn:hover{background-color:#0000000d}::ng-deep .faris-btn-lg{width:2.5em;height:2.5em;font-size:1.4em}::ng-deep .faris-btn:disabled{cursor:not-allowed;opacity:.7}::ng-deep .gemini-ic{display:inline-block;cursor:pointer;transition:transform .3s ease;transform-origin:center center;position:relative}::ng-deep .gemini-ic svg{fill:#4a90e2;transition:fill .3s ease;filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}::ng-deep .gemini-ic.has-hover:hover{animation:gemini-hover-animation 1.5s infinite alternate ease-in-out;transform-origin:center center}::ng-deep .gemini-ic:hover svg{fill:#4a90e2;filter:drop-shadow(0 0 8px rgba(123,207,255,.9))}::ng-deep .gemini-ic.rotating{display:flex;width:22px;height:22px;animation:rotate 2s linear infinite;transform-origin:center center}@keyframes gemini-hover-animation{0%{transform:scale(1) rotate(0);filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}50%{transform:scale(1.15) rotate(10deg);filter:drop-shadow(0 0 12px rgb(123,207,255))}to{transform:scale(1) rotate(-10deg);filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.faris-title-container{display:flex;align-items:center;font-weight:500;gap:.5em;overflow:hidden}.faris-title-container .faris-title-group{flex:1;overflow:hidden}.faris-title-container .faris-title-group .faris-title{font-size:1em}.faris-title-container .faris-title-group .faris-subtitle{font-size:.9em;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.closed-chat-history-side{min-width:60px!important}.hide-shadow-btn:focus{box-shadow:none!important}.conversation-item{height:40px}.conversation-item.active-conversation{background-color:var(--primary-color);color:var(--white)}.conversation-item.active-conversation mt-icon{color:var(--white)}.conversation-item label{font-size:15px;font-weight:600;line-height:20px}\n"], dependencies: [{ kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: MinimizablePopupComponent, selector: "mt-faris-popup", inputs: ["title", "maximized"], outputs: ["closed"] }, { kind: "component", type: FarisCanvasComponent, selector: "mt-faris-canvas", inputs: ["message", "conversationId"], outputs: ["closed"] }, { kind: "component", type: FarisChatHistoryComponent, selector: "mt-faris-chat-history", inputs: ["userConversations", "showChatHistory", "selectedConversation"], outputs: ["selectConversation", "deleteConversationHandler", "closeHistory"] }, { kind: "component", type: FarisChatComponent, selector: "mt-faris-chat", inputs: ["selectedConversation"], outputs: ["launchCanvas", "selectConversation"] }, { kind: "pipe", type: ParseMentionPipe, name: "parseMention" }, { kind: "pipe", type: FarisTranslatePipe, name: "translate" }] });
|
|
1909
1913
|
}
|
|
1910
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
1914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: FarisComponent, decorators: [{
|
|
1911
1915
|
type: Component,
|
|
1912
1916
|
args: [{ selector: 'mt-faris', standalone: true, imports: [
|
|
1913
1917
|
Button,
|
|
@@ -1917,7 +1921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.3", ngImpor
|
|
|
1917
1921
|
FarisCanvasComponent,
|
|
1918
1922
|
FarisChatHistoryComponent,
|
|
1919
1923
|
FarisChatComponent,
|
|
1920
|
-
], template: "@if (showChatBot) {\r\n <mt-faris-popup\r\n class=\"chat-bot-popup\"\r\n [maximized]=\"maximized && !canvasData.visible\"\r\n (closed)=\"closeChatBot()\"\r\n >\r\n <div panelTitle class=\"faris-title-container\">\r\n <div class=\"gemini-ic has-hover\">\r\n <svg\r\n focusable=\"false\"\r\n viewBox=\"0 -960 960 960\"\r\n height=\"28\"\r\n width=\"28\"\r\n class=\"EiVpKc aoH\"\r\n >\r\n <path\r\n d=\"M480-80q2,0 2-2q0-82 31-154t85-126t126-85t154-31q2,0 2-2t-2-2q-82,0-154-31T598-598T513-724T482-878q0-2-2-2t-2,2q0,82-31,154T362-598T236-513T82-482q-2,0-2,2t2,2q82,0 154,31t126,85t85,126T478-82q0,2 2,2Z\"\r\n ></path>\r\n </svg>\r\n </div>\r\n <div class=\"faris-title-group\">\r\n <div class=\"faris-title\">
|
|
1924
|
+
], template: "@if (showChatBot) {\r\n <mt-faris-popup\r\n class=\"chat-bot-popup\"\r\n [maximized]=\"maximized && !canvasData.visible\"\r\n (closed)=\"closeChatBot()\"\r\n >\r\n <div panelTitle class=\"faris-title-container\">\r\n <div class=\"gemini-ic has-hover\">\r\n <svg\r\n focusable=\"false\"\r\n viewBox=\"0 -960 960 960\"\r\n height=\"28\"\r\n width=\"28\"\r\n class=\"EiVpKc aoH\"\r\n >\r\n <path\r\n d=\"M480-80q2,0 2-2q0-82 31-154t85-126t126-85t154-31q2,0 2-2t-2-2q-82,0-154-31T598-598T513-724T482-878q0-2-2-2t-2,2q0,82-31,154T362-598T236-513T82-482q-2,0-2,2t2,2q82,0 154,31t126,85t85,126T478-82q0,2 2,2Z\"\r\n ></path>\r\n </svg>\r\n </div>\r\n <div class=\"faris-title-group\">\r\n <div class=\"faris-title\">{{ \"faris.ask-faris\" | translate }}</div>\r\n <div\r\n class=\"faris-subtitle\"\r\n [title]=\"(selectedConversation?.title | parseMention) ?? ''\"\r\n >\r\n {{\r\n (selectedConversation?.title | parseMention) ||\r\n (\"faris.new-conversation\" | translate)\r\n }}\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <ng-container panelActions>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"general.plus\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"openNewChat()\"\r\n ></mt-button>\r\n <mt-button\r\n type=\"button\"\r\n [icon]=\"maximized ? 'layout.minimize-02' : 'layout.maximize-02'\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"maximized = !maximized\"\r\n ></mt-button>\r\n <mt-button\r\n type=\"button\"\r\n icon=\"custom.history-sp\"\r\n variant=\"text\"\r\n styleClass=\"faris-btn\"\r\n (click)=\"toggleChatHistory()\"\r\n ></mt-button>\r\n </ng-container>\r\n\r\n @if (canvasData.visible) {\r\n <mt-faris-canvas\r\n [message]=\"canvasData.message\"\r\n [conversationId]=\"canvasData.conversationId\"\r\n class=\"flex-1\"\r\n panelCanvas\r\n (closed)=\"canvasData.visible = false\"\r\n ></mt-faris-canvas>\r\n }\r\n\r\n <mt-faris-chat-history\r\n panelSidebar\r\n [userConversations]=\"userConversations\"\r\n [showChatHistory]=\"showChatHistory\"\r\n [selectedConversation]=\"selectedConversation\"\r\n (selectConversation)=\"onSelectConversation($event)\"\r\n (deleteConversationHandler)=\"onDeleteConversationHandler($event)\"\r\n (closeHistory)=\"onCloseHistory()\"\r\n >\r\n </mt-faris-chat-history>\r\n\r\n <div panelChat class=\"flex h-full w-full\">\r\n <mt-faris-chat\r\n class=\"w-full\"\r\n (launchCanvas)=\"launchCanvas($event)\"\r\n (selectConversation)=\"onSelectConversation($event)\"\r\n [selectedConversation]=\"selectedConversation\"\r\n >\r\n </mt-faris-chat>\r\n </div>\r\n </mt-faris-popup>\r\n}\r\n", styles: [":host{font-size:15.4545px}::ng-deep :root{--faris-border-radius: 8px;--faris-sm-border-radius: 5px;--faris-lg-border-radius: 10px}::ng-deep .faris-btn{display:flex;align-items:center;justify-content:center;border:1px solid transparent;background-color:transparent;border-radius:var(--faris-sm-border-radius);width:2em;height:2em;cursor:pointer;font-size:1.1em;padding:0;transition:all .2s ease}::ng-deep .faris-btn-muted{color:#99a1af}::ng-deep .faris-btn:hover{background-color:#0000000d}::ng-deep .faris-btn-lg{width:2.5em;height:2.5em;font-size:1.4em}::ng-deep .faris-btn:disabled{cursor:not-allowed;opacity:.7}::ng-deep .gemini-ic{display:inline-block;cursor:pointer;transition:transform .3s ease;transform-origin:center center;position:relative}::ng-deep .gemini-ic svg{fill:#4a90e2;transition:fill .3s ease;filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}::ng-deep .gemini-ic.has-hover:hover{animation:gemini-hover-animation 1.5s infinite alternate ease-in-out;transform-origin:center center}::ng-deep .gemini-ic:hover svg{fill:#4a90e2;filter:drop-shadow(0 0 8px rgba(123,207,255,.9))}::ng-deep .gemini-ic.rotating{display:flex;width:22px;height:22px;animation:rotate 2s linear infinite;transform-origin:center center}@keyframes gemini-hover-animation{0%{transform:scale(1) rotate(0);filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}50%{transform:scale(1.15) rotate(10deg);filter:drop-shadow(0 0 12px rgb(123,207,255))}to{transform:scale(1) rotate(-10deg);filter:drop-shadow(0 0 2px rgba(74,144,226,.5))}}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.faris-title-container{display:flex;align-items:center;font-weight:500;gap:.5em;overflow:hidden}.faris-title-container .faris-title-group{flex:1;overflow:hidden}.faris-title-container .faris-title-group .faris-title{font-size:1em}.faris-title-container .faris-title-group .faris-subtitle{font-size:.9em;opacity:.8;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.closed-chat-history-side{min-width:60px!important}.hide-shadow-btn:focus{box-shadow:none!important}.conversation-item{height:40px}.conversation-item.active-conversation{background-color:var(--primary-color);color:var(--white)}.conversation-item.active-conversation mt-icon{color:var(--white)}.conversation-item label{font-size:15px;font-weight:600;line-height:20px}\n"] }]
|
|
1921
1925
|
}], propDecorators: { showChatBot: [{
|
|
1922
1926
|
type: Input
|
|
1923
1927
|
}], showChatBotChange: [{
|