@xsmusices/ui 1.44.24 → 1.44.28
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/fesm2022/{xsmusices-ui-xs-chat-textarea.xsstory-NG2p0Tdw.mjs → xsmusices-ui-xs-chat-textarea.xsstory-CGZcBSLI.mjs} +26 -2
- package/fesm2022/xsmusices-ui-xs-chat-textarea.xsstory-CGZcBSLI.mjs.map +1 -0
- package/fesm2022/{xsmusices-ui-xs-title-collapse.xsstory-COqb1jdP.mjs → xsmusices-ui-xs-title-collapse.xsstory-Bs_SOeq_.mjs} +19 -1
- package/fesm2022/xsmusices-ui-xs-title-collapse.xsstory-Bs_SOeq_.mjs.map +1 -0
- package/fesm2022/xsmusices-ui.mjs +209 -19
- package/fesm2022/xsmusices-ui.mjs.map +1 -1
- package/index.d.ts +62 -29
- package/package.json +1 -1
- package/fesm2022/xsmusices-ui-xs-chat-textarea.xsstory-NG2p0Tdw.mjs.map +0 -1
- package/fesm2022/xsmusices-ui-xs-title-collapse.xsstory-COqb1jdP.mjs.map +0 -1
|
@@ -6,7 +6,7 @@ import * as i1 from '@fortawesome/angular-fontawesome';
|
|
|
6
6
|
import { FaIconLibrary, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
7
7
|
import { BehaviorSubject, Subject, Subscription, of, from, fromEvent, debounceTime as debounceTime$1, distinctUntilChanged as distinctUntilChanged$1, firstValueFrom, filter as filter$1, switchMap as switchMap$1 } from 'rxjs';
|
|
8
8
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
9
|
-
import { faCircleQuestion, faPlus, faMagnifyingGlass, faInbox, faCircleExclamation, faCircleCheck, faCircleInfo, faAddressBook, faArrowLeft, faArrowRightFromBracket, faArrowTrendUp, faArrowUpRightFromSquare, faArrowsRotate, faAward, faBackwardStep, faBan, faBars, faBell, faBook, faBuilding, faCalendar, faCalendarDays, faCalculator, faCaretDown, faCaretRight, faCaretUp, faCartShopping, faChartBar, faChartLine, faChartPie, faChartSimple, faCheck, faCheckCircle, faCheckDouble, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faCircleNotch, faCircleXmark, faClipboard, faClock, faClone, faCloudArrowDown, faCode, faCodeCommit, faCog, faCogs, faColumns, faComment, faComments, faCompactDisc, faCopy, faCreditCard, faCrown, faCube, faCubes, faDatabase, faDesktop, faDice, faDollarSign, faDownload, faEdit, faEllipsisVertical, faEnvelope, faEquals, faExclamationTriangle, faExpand, faExternalLink, faExternalLinkAlt, faEye, faFaceSmile, faFile, faFileContract, faFileLines, faFilePdf, faFilter, faFire, faFlag, faFlask, faFloppyDisk, faFolder, faFolderOpen, faForwardStep, faGamepad, faGlobe, faGraduationCap, faGripLines, faGripVertical, faHeadphones, faHardDrive, faHashtag, faHeadphonesSimple, faHeart, faHeartbeat, faHome, faImage, faImages, faKey, faLayerGroup, faLightbulb, faLink, faList, faLocation, faLock, faMap, faMapMarker, faMapMarkerAlt, faMapPin, faMessage, faMicrochip, faMicrophone, faMinus, faMobile, faMoon, faMusic, faNewspaper, faPaperPlane, faPause, faPalette, faPencil, faPlay, faPowerOff, faPuzzlePiece, faRankingStar, faRecordVinyl, faRefresh, faRepeat, faRightFromBracket, faRightToBracket, faRotateRight, faSchool, faSchoolFlag, faSearch, faServer, faShare, faShareNodes, faShield, faShoePrints, faShuffle, faSkull, faSliders, faSort, faSpellCheck, faSpinner, faStar, faStop, faSync, faTableCells, faTable, faTabletScreenButton, faTag, faThumbsUp, faThumbsDown, faTicket, faThumbTack, faToolbox, faTrash, faTrophy, faUnlock, faUpload, faUser, faUserCheck, faUserPlus, faUserSecret, faUsers, faUserXmark, faVolumeDown, faVolumeLow, faVolumeMute, faVolumeUp, faVolumeXmark, faWallet, faWandMagic, faWandMagicSparkles, faWrench, faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
9
|
+
import { faCircleQuestion, faPlus, faMagnifyingGlass, faInbox, faCircleExclamation, faCircleCheck, faCircleInfo, faAddressBook, faArrowLeft, faArrowRightFromBracket, faArrowTrendUp, faArrowUpRightFromSquare, faArrowsRotate, faAward, faBackwardStep, faBan, faBars, faBell, faBook, faBuilding, faCalendar, faCalendarDays, faCalculator, faCaretDown, faCaretRight, faCaretUp, faCartShopping, faChartBar, faChartLine, faChartPie, faChartSimple, faCheck, faCheckCircle, faCheckDouble, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faCircleNotch, faCircleXmark, faClipboard, faClock, faClone, faCloudArrowDown, faCode, faCodeCommit, faCog, faCogs, faColumns, faComment, faComments, faCompactDisc, faCopy, faCreditCard, faCrown, faCube, faCubes, faDatabase, faDesktop, faDice, faDollarSign, faDownload, faEdit, faEllipsisVertical, faEnvelope, faEquals, faExclamationTriangle, faExpand, faExternalLink, faExternalLinkAlt, faEye, faFaceSmile, faFile, faFileContract, faFileLines, faFilePdf, faFilter, faFire, faFlag, faFlask, faFloppyDisk, faFolder, faFolderOpen, faForwardStep, faGamepad, faGlobe, faGraduationCap, faGripLines, faGripVertical, faHeadphones, faHardDrive, faHashtag, faHeadphonesSimple, faHeart, faHeartbeat, faHome, faImage, faImages, faKey, faLayerGroup, faLightbulb, faLink, faList, faLocation, faLock, faMap, faMapMarker, faMapMarkerAlt, faMapPin, faMessage, faMicrochip, faMicrophone, faMinus, faMobile, faMoon, faMusic, faNewspaper, faPaperclip, faPaperPlane, faPause, faPalette, faPencil, faPlay, faPowerOff, faPuzzlePiece, faRankingStar, faRecordVinyl, faRefresh, faRepeat, faRightFromBracket, faRightToBracket, faRotateRight, faSchool, faSchoolFlag, faSearch, faServer, faShare, faShareNodes, faShield, faShoePrints, faShuffle, faSkull, faSliders, faSort, faSpellCheck, faSpinner, faStar, faStop, faSync, faTableCells, faTable, faTabletScreenButton, faTag, faThumbsUp, faThumbsDown, faTicket, faThumbTack, faToolbox, faTrash, faTrophy, faUnlock, faUpload, faUser, faUserCheck, faUserPlus, faUserSecret, faUsers, faUserXmark, faVolumeDown, faVolumeLow, faVolumeMute, faVolumeUp, faVolumeXmark, faWallet, faWandMagic, faWandMagicSparkles, faWrench, faXmark } from '@fortawesome/free-solid-svg-icons';
|
|
10
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
11
|
import * as i2 from '@angular/router';
|
|
12
12
|
import { Router, RouterModule } from '@angular/router';
|
|
@@ -5585,6 +5585,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
5585
5585
|
|
|
5586
5586
|
class XSTitleCollapseComponent {
|
|
5587
5587
|
config = input.required(...(ngDevMode ? [{ debugName: "config" }] : []));
|
|
5588
|
+
// Cuando es false, la cabecera es estática: sin toggle, sin click y sin hover.
|
|
5589
|
+
collapsible = input(true, ...(ngDevMode ? [{ debugName: "collapsible" }] : []));
|
|
5588
5590
|
toggle = output();
|
|
5589
5591
|
translateService = inject(XSTranslateService);
|
|
5590
5592
|
langVersion = signal(0, ...(ngDevMode ? [{ debugName: "langVersion" }] : []));
|
|
@@ -5603,16 +5605,29 @@ class XSTitleCollapseComponent {
|
|
|
5603
5605
|
onClickToggle() {
|
|
5604
5606
|
this.toggle.emit();
|
|
5605
5607
|
}
|
|
5608
|
+
onClickHeader() {
|
|
5609
|
+
if (!this.collapsible())
|
|
5610
|
+
return;
|
|
5611
|
+
this.toggle.emit();
|
|
5612
|
+
}
|
|
5613
|
+
onKeydownHeader(event) {
|
|
5614
|
+
if (!this.collapsible())
|
|
5615
|
+
return;
|
|
5616
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
5617
|
+
event.preventDefault();
|
|
5618
|
+
this.toggle.emit();
|
|
5619
|
+
}
|
|
5620
|
+
}
|
|
5606
5621
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTitleCollapseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5607
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTitleCollapseComponent, isStandalone: true, selector: "xs-title-collapse", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { toggle: "toggle" }, host: { attributes: { "xs-title-collapse-host": "" }, properties: { "class.is-expanded": "config().state" } }, ngImport: i0, template: "<div\n class=\"flex items-center uppercase justify-between w-full mb-2 tracking-widest text-white border-b border-transparent transition-all\"\n>\n <p
|
|
5622
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSTitleCollapseComponent, isStandalone: true, selector: "xs-title-collapse", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggle: "toggle" }, host: { attributes: { "xs-title-collapse-host": "" }, properties: { "class.is-expanded": "config().state" } }, ngImport: i0, template: "<div\n class=\"flex items-center uppercase justify-between w-full mb-2 tracking-widest text-white border-b border-transparent transition-all\"\n [class.cursor-pointer]=\"collapsible()\"\n [attr.role]=\"collapsible() ? 'button' : null\"\n [attr.tabindex]=\"collapsible() ? 0 : null\"\n [attr.aria-expanded]=\"collapsible() ? config().state : null\"\n (click)=\"onClickHeader()\"\n (keydown)=\"onKeydownHeader($event)\"\n>\n <p\n class=\"font-bold text-lg\"\n [class.hover:opacity-70]=\"collapsible()\"\n >\n {{ config().name }}\n\n @if (config().total !== undefined) {\n <span class=\"text-sm font-extralight\">\n ({{ config().total }})\n </span>\n }\n </p>\n\n @if (collapsible()) {\n <xs-button\n (onClick)=\"onClickToggle()\"\n [label]=\"toggleLabel\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[10px] font-black hover:text-white uppercase tracking-[0.1em]\"\n [title]=\"toggleLabel\"\n />\n }\n</div>\n\n<div\n [id]=\"'collapsible-content-' + (config().name | lowercase)\"\n class=\"grid-collapsible\"\n [class.is-open]=\"config().state\"\n>\n <div class=\"inner-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".grid-collapsible{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s cubic-bezier(.4,0,.2,1),opacity .25s;opacity:0;visibility:hidden}.grid-collapsible.is-open{grid-template-rows:1fr;opacity:1;visibility:visible}.grid-collapsible.is-open .inner-content{overflow:visible}.inner-content{overflow:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PipesModule }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }, { kind: "pipe", type: i1$1.LowerCasePipe, name: "lowercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
5608
5623
|
}
|
|
5609
5624
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSTitleCollapseComponent, decorators: [{
|
|
5610
5625
|
type: Component,
|
|
5611
5626
|
args: [{ selector: 'xs-title-collapse', host: {
|
|
5612
5627
|
'xs-title-collapse-host': '',
|
|
5613
5628
|
'[class.is-expanded]': 'config().state',
|
|
5614
|
-
}, imports: [CommonModule, PipesModule, XSButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex items-center uppercase justify-between w-full mb-2 tracking-widest text-white border-b border-transparent transition-all\"\n>\n <p
|
|
5615
|
-
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
5629
|
+
}, imports: [CommonModule, PipesModule, XSButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"flex items-center uppercase justify-between w-full mb-2 tracking-widest text-white border-b border-transparent transition-all\"\n [class.cursor-pointer]=\"collapsible()\"\n [attr.role]=\"collapsible() ? 'button' : null\"\n [attr.tabindex]=\"collapsible() ? 0 : null\"\n [attr.aria-expanded]=\"collapsible() ? config().state : null\"\n (click)=\"onClickHeader()\"\n (keydown)=\"onKeydownHeader($event)\"\n>\n <p\n class=\"font-bold text-lg\"\n [class.hover:opacity-70]=\"collapsible()\"\n >\n {{ config().name }}\n\n @if (config().total !== undefined) {\n <span class=\"text-sm font-extralight\">\n ({{ config().total }})\n </span>\n }\n </p>\n\n @if (collapsible()) {\n <xs-button\n (onClick)=\"onClickToggle()\"\n [label]=\"toggleLabel\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[10px] font-black hover:text-white uppercase tracking-[0.1em]\"\n [title]=\"toggleLabel\"\n />\n }\n</div>\n\n<div\n [id]=\"'collapsible-content-' + (config().name | lowercase)\"\n class=\"grid-collapsible\"\n [class.is-open]=\"config().state\"\n>\n <div class=\"inner-content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".grid-collapsible{display:grid;grid-template-rows:0fr;transition:grid-template-rows .3s cubic-bezier(.4,0,.2,1),opacity .25s;opacity:0;visibility:hidden}.grid-collapsible.is-open{grid-template-rows:1fr;opacity:1;visibility:visible}.grid-collapsible.is-open .inner-content{overflow:visible}.inner-content{overflow:hidden}\n"] }]
|
|
5630
|
+
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: true }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], toggle: [{ type: i0.Output, args: ["toggle"] }] } });
|
|
5616
5631
|
|
|
5617
5632
|
var CLOSE$1 = "Cerrar";
|
|
5618
5633
|
var es$s = {
|
|
@@ -12001,6 +12016,8 @@ class XSAuthComponent {
|
|
|
12001
12016
|
this.isFormValid = this.formGroup?.valid ?? false;
|
|
12002
12017
|
}
|
|
12003
12018
|
actionSocial(provider) {
|
|
12019
|
+
if (this.loading())
|
|
12020
|
+
return;
|
|
12004
12021
|
this.onAction.emit({
|
|
12005
12022
|
action: provider === 'google'
|
|
12006
12023
|
? 'socialLoginGoogle'
|
|
@@ -12008,6 +12025,8 @@ class XSAuthComponent {
|
|
|
12008
12025
|
});
|
|
12009
12026
|
}
|
|
12010
12027
|
onEmailLogin() {
|
|
12028
|
+
if (this.loading())
|
|
12029
|
+
return;
|
|
12011
12030
|
this.onAction.emit({
|
|
12012
12031
|
action: 'loginEmail',
|
|
12013
12032
|
data: {
|
|
@@ -12017,6 +12036,8 @@ class XSAuthComponent {
|
|
|
12017
12036
|
});
|
|
12018
12037
|
}
|
|
12019
12038
|
onRegister() {
|
|
12039
|
+
if (this.loading())
|
|
12040
|
+
return;
|
|
12020
12041
|
this.onAction.emit({
|
|
12021
12042
|
action: 'registerEmail',
|
|
12022
12043
|
data: {
|
|
@@ -12027,12 +12048,16 @@ class XSAuthComponent {
|
|
|
12027
12048
|
});
|
|
12028
12049
|
}
|
|
12029
12050
|
onForgotPassword() {
|
|
12051
|
+
if (this.loading())
|
|
12052
|
+
return;
|
|
12030
12053
|
this.onAction.emit({
|
|
12031
12054
|
action: 'forgotPassword',
|
|
12032
12055
|
data: { email: String(this.formModel?.['email'] ?? '') },
|
|
12033
12056
|
});
|
|
12034
12057
|
}
|
|
12035
12058
|
onVerify2fa() {
|
|
12059
|
+
if (this.loading())
|
|
12060
|
+
return;
|
|
12036
12061
|
const code = String(this.formModel?.['code'] ?? '').trim();
|
|
12037
12062
|
if (code.length === 6) {
|
|
12038
12063
|
this.onAction.emit({
|
|
@@ -12042,7 +12067,7 @@ class XSAuthComponent {
|
|
|
12042
12067
|
}
|
|
12043
12068
|
}
|
|
12044
12069
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12045
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSAuthComponent, isStandalone: true, selector: "xs-auth", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isModal: { classPropertyName: "isModal", publicName: "isModal", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, host: { attributes: { "xs-auth-host": "" } }, ngImport: i0, template: "@if (!isModal()) {\n <div\n class=\"flex items-center justify-center min-h-screen px-4 bg-black\"\n >\n <div class=\"w-full max-w-md p-6 bg-black rounded-xl shadow-lg\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n </div>\n}\n\n@if (isModal()) {\n <div class=\"w-full\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n}\n\n<ng-template #contentTpl>\n @if (activeMode === 'home') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n </div>\n </div>\n }\n\n @if (showSocialButtons) {\n <div class=\"grid grid-cols-2 gap-4\">\n @if (showGoogleButton) {\n <xs-button\n [label]=\"texts.continueWithGoogleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'google', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('google')\"\n >\n </xs-button>\n }\n @if (showAppleButton) {\n <xs-button\n [label]=\"texts.continueWithAppleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'apple', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('apple')\"\n >\n </xs-button>\n }\n </div>\n\n <div class=\"w-full flex items-center justify-center my-8\">\n <span class=\"text-[9px] uppercase tracking-[0.4em] font-black text-white/40\">{{ texts.dividerText }}</span>\n </div>\n }\n\n @if (cfg.showEmail !== false) {\n <xs-button\n id=\"buttonSocial-enterWithEmail\"\n [label]=\"texts.continueWithEmailButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n layout=\"base\"\n [icon]=\"{ name: 'envelope', position: 'left' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n }\n\n @if (cfg.showRegister || cfg.showForgotPassword) {\n <div class=\"mt-10 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showRegister && cfg.showForgotPassword) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (activeMode === 'email') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"loginFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onEmailLogin()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n <xs-button\n id=\"button-login-auth\"\n [label]=\"texts.loginButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onEmailLogin()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [isFull]=\"true\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n\n @if (cfg.showForgotPassword || cfg.showRegister) {\n <div class=\"mt-8 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showForgotPassword && cfg.showRegister) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (activeMode === 'register') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <xs-formly\n [fields]=\"registerFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onRegister()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <xs-button\n [id]=\"'register-form-submit'\"\n [label]=\"texts.registerButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onRegister()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <div class=\"flex items-center justify-center gap-2 text-sm text-gray-400\">\n {{ texts.hasAccountLink }}\n </div>\n <xs-button\n [label]=\"texts.loginTitle!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === 'forgotPassword') {\n <div>\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n @if (emailSent()) {\n <xs-alert\n type=\"success\"\n [title]=\"texts.emailSentTitle!\"\n [message]=\"texts.emailSentMessage!\"\n class=\"mb-6\"\n ></xs-alert>\n }\n\n @if (!emailSent()) {\n <xs-formly\n [fields]=\"forgotFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onForgotPassword()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <xs-button\n [label]=\"texts.sendResetButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onForgotPassword()\"\n customClass=\"mt-6\"\n ></xs-button>\n }\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === '2fa') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"twoFactorFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onVerify2fa()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n <xs-button\n id=\"button-2fa-verify\"\n [label]=\"texts.verifyButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onVerify2fa()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n </div>\n </div>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XSFormlyComponent, selector: "xs-formly", inputs: ["layout", "gridClass", "size", "fields", "model", "options"], outputs: ["modelChange", "submit", "formReady"] }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }, { kind: "component", type: XSAlertComponent, selector: "xs-alert", inputs: ["type", "title", "message", "actionText", "actionClass", "dismissible", "grouped", "date", "icon", "iconClass", "customClass"], outputs: ["action", "alertClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12070
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSAuthComponent, isStandalone: true, selector: "xs-auth", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, isModal: { classPropertyName: "isModal", publicName: "isModal", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onAction: "onAction" }, host: { attributes: { "xs-auth-host": "" } }, ngImport: i0, template: "@if (!isModal()) {\n <div\n class=\"flex items-center justify-center min-h-screen px-4 bg-black\"\n >\n <div class=\"w-full max-w-md p-6 bg-black rounded-xl shadow-lg\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n </div>\n}\n\n@if (isModal()) {\n <div class=\"w-full\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n}\n\n<ng-template #contentTpl>\n @if (activeMode === 'home') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n </div>\n </div>\n }\n\n @if (showSocialButtons) {\n <div class=\"grid grid-cols-2 gap-4\">\n @if (showGoogleButton) {\n <xs-button\n [label]=\"texts.continueWithGoogleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'google', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('google')\"\n >\n </xs-button>\n }\n @if (showAppleButton) {\n <xs-button\n [label]=\"texts.continueWithAppleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'apple', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('apple')\"\n >\n </xs-button>\n }\n </div>\n\n <div class=\"w-full flex items-center justify-center my-8\">\n <span class=\"text-[9px] uppercase tracking-[0.4em] font-black text-white/40\">{{ texts.dividerText }}</span>\n </div>\n }\n\n @if (cfg.showEmail !== false) {\n <xs-button\n id=\"buttonSocial-enterWithEmail\"\n [label]=\"texts.continueWithEmailButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n layout=\"base\"\n [icon]=\"{ name: 'envelope', position: 'left' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n }\n\n @if (cfg.showRegister || cfg.showForgotPassword) {\n <div class=\"mt-10 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showRegister && cfg.showForgotPassword) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (activeMode === 'email') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"loginFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onEmailLogin()\"\n class=\"space-y-4\"\n >\n <xs-button\n id=\"button-login-auth\"\n type=\"submit\"\n [label]=\"texts.loginButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [isFull]=\"true\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n\n @if (cfg.showForgotPassword || cfg.showRegister) {\n <div class=\"mt-8 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showForgotPassword && cfg.showRegister) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (activeMode === 'register') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <xs-formly\n [fields]=\"registerFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onRegister()\"\n class=\"space-y-4\"\n >\n <xs-button\n [id]=\"'register-form-submit'\"\n type=\"submit\"\n [label]=\"texts.registerButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <div class=\"flex items-center justify-center gap-2 text-sm text-gray-400\">\n {{ texts.hasAccountLink }}\n </div>\n <xs-button\n [label]=\"texts.loginTitle!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === 'forgotPassword') {\n <div>\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n @if (emailSent()) {\n <xs-alert\n type=\"success\"\n [title]=\"texts.emailSentTitle!\"\n [message]=\"texts.emailSentMessage!\"\n class=\"mb-6\"\n ></xs-alert>\n }\n\n @if (!emailSent()) {\n <xs-formly\n [fields]=\"forgotFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onForgotPassword()\"\n class=\"space-y-4\"\n >\n <xs-button\n type=\"submit\"\n [label]=\"texts.sendResetButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n }\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === '2fa') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"twoFactorFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onVerify2fa()\"\n class=\"space-y-4\"\n >\n <xs-button\n id=\"button-2fa-verify\"\n type=\"submit\"\n [label]=\"texts.verifyButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n </div>\n </div>\n </div>\n }\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: XSFormlyComponent, selector: "xs-formly", inputs: ["layout", "gridClass", "size", "fields", "model", "options"], outputs: ["modelChange", "submit", "formReady"] }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }, { kind: "component", type: XSAlertComponent, selector: "xs-alert", inputs: ["type", "title", "message", "actionText", "actionClass", "dismissible", "grouped", "date", "icon", "iconClass", "customClass"], outputs: ["action", "alertClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12046
12071
|
}
|
|
12047
12072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSAuthComponent, decorators: [{
|
|
12048
12073
|
type: Component,
|
|
@@ -12052,7 +12077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
12052
12077
|
XSFormlyComponent,
|
|
12053
12078
|
XSButtonComponent,
|
|
12054
12079
|
XSAlertComponent,
|
|
12055
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!isModal()) {\n <div\n class=\"flex items-center justify-center min-h-screen px-4 bg-black\"\n >\n <div class=\"w-full max-w-md p-6 bg-black rounded-xl shadow-lg\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n </div>\n}\n\n@if (isModal()) {\n <div class=\"w-full\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n}\n\n<ng-template #contentTpl>\n @if (activeMode === 'home') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n </div>\n </div>\n }\n\n @if (showSocialButtons) {\n <div class=\"grid grid-cols-2 gap-4\">\n @if (showGoogleButton) {\n <xs-button\n [label]=\"texts.continueWithGoogleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'google', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('google')\"\n >\n </xs-button>\n }\n @if (showAppleButton) {\n <xs-button\n [label]=\"texts.continueWithAppleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'apple', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('apple')\"\n >\n </xs-button>\n }\n </div>\n\n <div class=\"w-full flex items-center justify-center my-8\">\n <span class=\"text-[9px] uppercase tracking-[0.4em] font-black text-white/40\">{{ texts.dividerText }}</span>\n </div>\n }\n\n @if (cfg.showEmail !== false) {\n <xs-button\n id=\"buttonSocial-enterWithEmail\"\n [label]=\"texts.continueWithEmailButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n layout=\"base\"\n [icon]=\"{ name: 'envelope', position: 'left' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n }\n\n @if (cfg.showRegister || cfg.showForgotPassword) {\n <div class=\"mt-10 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showRegister && cfg.showForgotPassword) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (activeMode === 'email') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"loginFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onEmailLogin()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n <xs-button\n id=\"button-login-auth\"\n [label]=\"texts.loginButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onEmailLogin()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [isFull]=\"true\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n\n @if (cfg.showForgotPassword || cfg.showRegister) {\n <div class=\"mt-8 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showForgotPassword && cfg.showRegister) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (activeMode === 'register') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <xs-formly\n [fields]=\"registerFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onRegister()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <xs-button\n [id]=\"'register-form-submit'\"\n [label]=\"texts.registerButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onRegister()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <div class=\"flex items-center justify-center gap-2 text-sm text-gray-400\">\n {{ texts.hasAccountLink }}\n </div>\n <xs-button\n [label]=\"texts.loginTitle!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === 'forgotPassword') {\n <div>\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n @if (emailSent()) {\n <xs-alert\n type=\"success\"\n [title]=\"texts.emailSentTitle!\"\n [message]=\"texts.emailSentMessage!\"\n class=\"mb-6\"\n ></xs-alert>\n }\n\n @if (!emailSent()) {\n <xs-formly\n [fields]=\"forgotFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onForgotPassword()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <xs-button\n [label]=\"texts.sendResetButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onForgotPassword()\"\n customClass=\"mt-6\"\n ></xs-button>\n }\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === '2fa') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"twoFactorFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onVerify2fa()\"\n class=\"space-y-4\"\n ></xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n <xs-button\n id=\"button-2fa-verify\"\n [label]=\"texts.verifyButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n (onClick)=\"onVerify2fa()\"\n customClass=\"mt-6\"\n ></xs-button>\n\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n </div>\n </div>\n </div>\n }\n</ng-template>\n" }]
|
|
12080
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!isModal()) {\n <div\n class=\"flex items-center justify-center min-h-screen px-4 bg-black\"\n >\n <div class=\"w-full max-w-md p-6 bg-black rounded-xl shadow-lg\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n </div>\n}\n\n@if (isModal()) {\n <div class=\"w-full\">\n <ng-container [ngTemplateOutlet]=\"contentTpl\"></ng-container>\n </div>\n}\n\n<ng-template #contentTpl>\n @if (activeMode === 'home') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n </div>\n </div>\n }\n\n @if (showSocialButtons) {\n <div class=\"grid grid-cols-2 gap-4\">\n @if (showGoogleButton) {\n <xs-button\n [label]=\"texts.continueWithGoogleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'google', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('google')\"\n >\n </xs-button>\n }\n @if (showAppleButton) {\n <xs-button\n [label]=\"texts.continueWithAppleButton!\"\n variant=\"social\"\n [isFull]=\"true\"\n layout=\"social\"\n [icon]=\"{ name: 'apple', prefix: 'fab', position: 'left', customClass: 'text-4xl' }\"\n [loading]=\"loading()\"\n (onClick)=\"actionSocial('apple')\"\n >\n </xs-button>\n }\n </div>\n\n <div class=\"w-full flex items-center justify-center my-8\">\n <span class=\"text-[9px] uppercase tracking-[0.4em] font-black text-white/40\">{{ texts.dividerText }}</span>\n </div>\n }\n\n @if (cfg.showEmail !== false) {\n <xs-button\n id=\"buttonSocial-enterWithEmail\"\n [label]=\"texts.continueWithEmailButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n layout=\"base\"\n [icon]=\"{ name: 'envelope', position: 'left' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n }\n\n @if (cfg.showRegister || cfg.showForgotPassword) {\n <div class=\"mt-10 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showRegister && cfg.showForgotPassword) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n }\n\n @if (activeMode === 'email') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"loginFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onEmailLogin()\"\n class=\"space-y-4\"\n >\n <xs-button\n id=\"button-login-auth\"\n type=\"submit\"\n [label]=\"texts.loginButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [isFull]=\"true\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n\n @if (cfg.showForgotPassword || cfg.showRegister) {\n <div class=\"mt-8 flex items-center justify-center gap-3 w-full\">\n @if (cfg.showForgotPassword) {\n <xs-button\n (onClick)=\"changeMode('forgotPassword')\"\n [label]=\"texts.forgotPasswordLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n @if (cfg.showForgotPassword && cfg.showRegister) {\n <span class=\"w-1 h-1 bg-zinc-800 rounded-full\"></span>\n }\n @if (cfg.showRegister) {\n <xs-button\n (onClick)=\"changeMode('register')\"\n [label]=\"texts.registerLinkText\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-[9px] uppercase tracking-widest font-bold text-zinc-400 hover:text-white transition-colors duration-500\"\n />\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n\n @if (activeMode === 'register') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <xs-formly\n [fields]=\"registerFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onRegister()\"\n class=\"space-y-4\"\n >\n <xs-button\n [id]=\"'register-form-submit'\"\n type=\"submit\"\n [label]=\"texts.registerButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <div class=\"flex items-center justify-center gap-2 text-sm text-gray-400\">\n {{ texts.hasAccountLink }}\n </div>\n <xs-button\n [label]=\"texts.loginTitle!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === 'forgotPassword') {\n <div>\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n @if (emailSent()) {\n <xs-alert\n type=\"success\"\n [title]=\"texts.emailSentTitle!\"\n [message]=\"texts.emailSentMessage!\"\n class=\"mb-6\"\n ></xs-alert>\n }\n\n @if (!emailSent()) {\n <xs-formly\n [fields]=\"forgotFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onForgotPassword()\"\n class=\"space-y-4\"\n >\n <xs-button\n type=\"submit\"\n [label]=\"texts.sendResetButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n }\n\n <div class=\"flex flex-col gap-2 mt-6\">\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n </div>\n </div>\n }\n\n @if (activeMode === '2fa') {\n <div class=\"space-y-6\">\n @if (title && showTitleValue) {\n <div class=\"relative px-4\">\n <div class=\"flex flex-col items-center justify-center\">\n <h2 class=\"mt-4 text-xl font-bold text-white\">{{ title }}</h2>\n @if (subtitle) {\n <p class=\"mt-1 text-sm text-center text-gray-400\">{{ subtitle }}</p>\n }\n </div>\n </div>\n }\n\n <div>\n <xs-formly\n [fields]=\"twoFactorFields\"\n [model]=\"formModel\"\n (modelChange)=\"onFormChange($event)\"\n (formReady)=\"onFormReady($event)\"\n (submit)=\"onVerify2fa()\"\n class=\"space-y-4\"\n >\n <xs-button\n id=\"button-2fa-verify\"\n type=\"submit\"\n [label]=\"texts.verifyButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n [loading]=\"loading()\"\n [disabled]=\"!isFormValid\"\n customClass=\"mt-6\"\n ></xs-button>\n </xs-formly>\n\n <div class=\"flex flex-col gap-3\">\n\n <xs-button\n [label]=\"texts.backToLoginLink!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('email')\"\n ></xs-button>\n\n @if (cfg.defaultMode === 'home') {\n <xs-button\n [label]=\"texts.backButton!\"\n variant=\"primary\"\n [isFull]=\"true\"\n [layout]=\"'between'\"\n [icon]=\"{ name: 'chevron-right' }\"\n (onClick)=\"changeMode('home')\"\n ></xs-button>\n }\n </div>\n </div>\n </div>\n }\n</ng-template>\n" }]
|
|
12056
12081
|
}], ctorParameters: () => [], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], isModal: [{ type: i0.Input, args: [{ isSignal: true, alias: "isModal", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], onAction: [{ type: i0.Output, args: ["onAction"] }] } });
|
|
12057
12082
|
|
|
12058
12083
|
class XSScrollAreaComponent {
|
|
@@ -15011,6 +15036,11 @@ var RETRY$1 = "Reintentar";
|
|
|
15011
15036
|
var SENDING$1 = "Enviando...";
|
|
15012
15037
|
var REPLY$3 = "Responder";
|
|
15013
15038
|
var YOURSELF$1 = "ti mismo";
|
|
15039
|
+
var ATTACH_FILE$1 = "Adjuntar archivo";
|
|
15040
|
+
var ATTACH_ERROR_TYPE$1 = "Tipo de archivo no permitido";
|
|
15041
|
+
var ATTACH_ERROR_SIZE$1 = "El archivo supera los 30MB";
|
|
15042
|
+
var ATTACH_ERROR_LIMIT$1 = "Máximo 5 archivos por mensaje";
|
|
15043
|
+
var UPLOADING$1 = "Subiendo...";
|
|
15014
15044
|
var es$b = {
|
|
15015
15045
|
SEARCH_PLACEHOLDER: SEARCH_PLACEHOLDER$3,
|
|
15016
15046
|
NO_RESULTS: NO_RESULTS$3,
|
|
@@ -15045,7 +15075,12 @@ var es$b = {
|
|
|
15045
15075
|
RETRY: RETRY$1,
|
|
15046
15076
|
SENDING: SENDING$1,
|
|
15047
15077
|
REPLY: REPLY$3,
|
|
15048
|
-
YOURSELF: YOURSELF$1
|
|
15078
|
+
YOURSELF: YOURSELF$1,
|
|
15079
|
+
ATTACH_FILE: ATTACH_FILE$1,
|
|
15080
|
+
ATTACH_ERROR_TYPE: ATTACH_ERROR_TYPE$1,
|
|
15081
|
+
ATTACH_ERROR_SIZE: ATTACH_ERROR_SIZE$1,
|
|
15082
|
+
ATTACH_ERROR_LIMIT: ATTACH_ERROR_LIMIT$1,
|
|
15083
|
+
UPLOADING: UPLOADING$1
|
|
15049
15084
|
};
|
|
15050
15085
|
|
|
15051
15086
|
var SEARCH_PLACEHOLDER$2 = "Search chats...";
|
|
@@ -15082,6 +15117,11 @@ var RETRY = "Retry";
|
|
|
15082
15117
|
var SENDING = "Sending...";
|
|
15083
15118
|
var REPLY$2 = "Reply";
|
|
15084
15119
|
var YOURSELF = "yourself";
|
|
15120
|
+
var ATTACH_FILE = "Attach file";
|
|
15121
|
+
var ATTACH_ERROR_TYPE = "File type not allowed";
|
|
15122
|
+
var ATTACH_ERROR_SIZE = "File exceeds 30MB";
|
|
15123
|
+
var ATTACH_ERROR_LIMIT = "Maximum 5 files per message";
|
|
15124
|
+
var UPLOADING = "Uploading...";
|
|
15085
15125
|
var en$b = {
|
|
15086
15126
|
SEARCH_PLACEHOLDER: SEARCH_PLACEHOLDER$2,
|
|
15087
15127
|
NO_RESULTS: NO_RESULTS$2,
|
|
@@ -15116,7 +15156,12 @@ var en$b = {
|
|
|
15116
15156
|
RETRY: RETRY,
|
|
15117
15157
|
SENDING: SENDING,
|
|
15118
15158
|
REPLY: REPLY$2,
|
|
15119
|
-
YOURSELF: YOURSELF
|
|
15159
|
+
YOURSELF: YOURSELF,
|
|
15160
|
+
ATTACH_FILE: ATTACH_FILE,
|
|
15161
|
+
ATTACH_ERROR_TYPE: ATTACH_ERROR_TYPE,
|
|
15162
|
+
ATTACH_ERROR_SIZE: ATTACH_ERROR_SIZE,
|
|
15163
|
+
ATTACH_ERROR_LIMIT: ATTACH_ERROR_LIMIT,
|
|
15164
|
+
UPLOADING: UPLOADING
|
|
15120
15165
|
};
|
|
15121
15166
|
|
|
15122
15167
|
class XSChatListComponent {
|
|
@@ -15397,18 +15442,39 @@ const MIN_MESSAGE_LENGTH = 1;
|
|
|
15397
15442
|
const MESSAGE_REPEAT_DELAY_MS = 3000;
|
|
15398
15443
|
const RATE_LIMIT_MAX_MESSAGES = 10;
|
|
15399
15444
|
const RATE_LIMIT_WINDOW_MS = 10000;
|
|
15445
|
+
// XS-483: adjuntos de chat (espejo del backend: chats-admin.controller upload).
|
|
15446
|
+
const MAX_CHAT_ATTACHMENTS = 5;
|
|
15447
|
+
const MAX_CHAT_ATTACHMENT_BYTES = 30 * 1024 * 1024;
|
|
15448
|
+
const ALLOWED_CHAT_ATTACHMENT_MIMES = [
|
|
15449
|
+
'image/jpeg',
|
|
15450
|
+
'image/png',
|
|
15451
|
+
'image/webp',
|
|
15452
|
+
'image/gif',
|
|
15453
|
+
'application/pdf',
|
|
15454
|
+
'application/zip',
|
|
15455
|
+
];
|
|
15456
|
+
const CHAT_ATTACHMENT_ACCEPT = 'image/jpeg,image/png,image/webp,image/gif,application/pdf,application/zip';
|
|
15400
15457
|
|
|
15401
15458
|
class XSChatTextareaComponent {
|
|
15402
15459
|
placeholder = input('', ...(ngDevMode ? [{ debugName: "placeholder" }] : []));
|
|
15403
15460
|
disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : []));
|
|
15461
|
+
// XS-483: adjuntos (desactivado por defecto para no afectar a otros consumidores).
|
|
15462
|
+
attachEnabled = input(false, ...(ngDevMode ? [{ debugName: "attachEnabled" }] : []));
|
|
15463
|
+
uploading = input(false, ...(ngDevMode ? [{ debugName: "uploading" }] : []));
|
|
15464
|
+
uploadProgress = input(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
|
|
15404
15465
|
sendMessage = output();
|
|
15466
|
+
sendWithAttachments = output();
|
|
15405
15467
|
sendError = output();
|
|
15406
15468
|
textareaEl = viewChild('textareaEl', ...(ngDevMode ? [{ debugName: "textareaEl" }] : []));
|
|
15469
|
+
fileInputEl = viewChild('fileInputEl', ...(ngDevMode ? [{ debugName: "fileInputEl" }] : []));
|
|
15407
15470
|
messageText = signal('', ...(ngDevMode ? [{ debugName: "messageText" }] : []));
|
|
15408
15471
|
showEmojiPicker = signal(false, ...(ngDevMode ? [{ debugName: "showEmojiPicker" }] : []));
|
|
15409
15472
|
emojis = EMOJIS;
|
|
15410
15473
|
maxLength = MAX_MESSAGE_LENGTH;
|
|
15474
|
+
attachmentAccept = CHAT_ATTACHMENT_ACCEPT;
|
|
15475
|
+
drafts = signal([], ...(ngDevMode ? [{ debugName: "drafts" }] : []));
|
|
15411
15476
|
translateService = inject(XSTranslateService);
|
|
15477
|
+
destroyRef = inject(DestroyRef);
|
|
15412
15478
|
langVersion = signal(0, ...(ngDevMode ? [{ debugName: "langVersion" }] : []));
|
|
15413
15479
|
get placeholderText() {
|
|
15414
15480
|
this.langVersion();
|
|
@@ -15425,6 +15491,7 @@ class XSChatTextareaComponent {
|
|
|
15425
15491
|
'function') {
|
|
15426
15492
|
this.translateService.registerTranslations({ es: es$b, en: en$b });
|
|
15427
15493
|
}
|
|
15494
|
+
this.destroyRef.onDestroy(() => this.revokeAllPreviews());
|
|
15428
15495
|
}
|
|
15429
15496
|
lastMessage = '';
|
|
15430
15497
|
lastSentTime = 0;
|
|
@@ -15450,6 +15517,62 @@ class XSChatTextareaComponent {
|
|
|
15450
15517
|
this.showEmojiPicker.set(false);
|
|
15451
15518
|
this.textareaEl()?.nativeElement.focus();
|
|
15452
15519
|
}
|
|
15520
|
+
openFilePicker() {
|
|
15521
|
+
if (!this.attachEnabled() ||
|
|
15522
|
+
this.disabled() ||
|
|
15523
|
+
this.uploading())
|
|
15524
|
+
return;
|
|
15525
|
+
this.fileInputEl()?.nativeElement.click();
|
|
15526
|
+
}
|
|
15527
|
+
onFilesSelected(event) {
|
|
15528
|
+
const input = event.target;
|
|
15529
|
+
const files = input?.files ? Array.from(input.files) : [];
|
|
15530
|
+
if (input)
|
|
15531
|
+
input.value = '';
|
|
15532
|
+
for (const file of files) {
|
|
15533
|
+
if (this.drafts().length >= MAX_CHAT_ATTACHMENTS) {
|
|
15534
|
+
this.sendError.emit('FILE_LIMIT');
|
|
15535
|
+
break;
|
|
15536
|
+
}
|
|
15537
|
+
if (!ALLOWED_CHAT_ATTACHMENT_MIMES.includes(file.type)) {
|
|
15538
|
+
this.sendError.emit('FILE_TYPE');
|
|
15539
|
+
continue;
|
|
15540
|
+
}
|
|
15541
|
+
if (file.size > MAX_CHAT_ATTACHMENT_BYTES) {
|
|
15542
|
+
this.sendError.emit('FILE_SIZE');
|
|
15543
|
+
continue;
|
|
15544
|
+
}
|
|
15545
|
+
this.drafts.update((drafts) => [
|
|
15546
|
+
...drafts,
|
|
15547
|
+
{
|
|
15548
|
+
file,
|
|
15549
|
+
previewUrl: file.type.startsWith('image/')
|
|
15550
|
+
? URL.createObjectURL(file)
|
|
15551
|
+
: '',
|
|
15552
|
+
name: file.name,
|
|
15553
|
+
size: file.size,
|
|
15554
|
+
mime: file.type,
|
|
15555
|
+
},
|
|
15556
|
+
]);
|
|
15557
|
+
}
|
|
15558
|
+
}
|
|
15559
|
+
removeDraft(index) {
|
|
15560
|
+
this.drafts.update((drafts) => {
|
|
15561
|
+
const removed = drafts[index];
|
|
15562
|
+
if (removed?.previewUrl)
|
|
15563
|
+
URL.revokeObjectURL(removed.previewUrl);
|
|
15564
|
+
return drafts.filter((_, i) => i !== index);
|
|
15565
|
+
});
|
|
15566
|
+
}
|
|
15567
|
+
isImageDraft(draft) {
|
|
15568
|
+
return draft.mime.startsWith('image/');
|
|
15569
|
+
}
|
|
15570
|
+
revokeAllPreviews() {
|
|
15571
|
+
for (const draft of this.drafts()) {
|
|
15572
|
+
if (draft.previewUrl)
|
|
15573
|
+
URL.revokeObjectURL(draft.previewUrl);
|
|
15574
|
+
}
|
|
15575
|
+
}
|
|
15453
15576
|
onKeyDown(event) {
|
|
15454
15577
|
if (event.key === 'Enter' && !event.shiftKey) {
|
|
15455
15578
|
event.preventDefault();
|
|
@@ -15462,9 +15585,19 @@ class XSChatTextareaComponent {
|
|
|
15462
15585
|
}
|
|
15463
15586
|
}
|
|
15464
15587
|
canSend() {
|
|
15465
|
-
|
|
15588
|
+
if (this.disabled() || this.uploading())
|
|
15589
|
+
return false;
|
|
15590
|
+
if (this.drafts().length > 0)
|
|
15591
|
+
return true;
|
|
15592
|
+
return this.messageText().trim().length > 0;
|
|
15466
15593
|
}
|
|
15467
15594
|
send() {
|
|
15595
|
+
if (this.disabled() || this.uploading())
|
|
15596
|
+
return;
|
|
15597
|
+
if (this.drafts().length > 0) {
|
|
15598
|
+
this.sendWithDrafts();
|
|
15599
|
+
return;
|
|
15600
|
+
}
|
|
15468
15601
|
const trimmed = this.messageText().trim();
|
|
15469
15602
|
if (!trimmed ||
|
|
15470
15603
|
trimmed.length < MIN_MESSAGE_LENGTH ||
|
|
@@ -15500,6 +15633,43 @@ class XSChatTextareaComponent {
|
|
|
15500
15633
|
this.messageText.set('');
|
|
15501
15634
|
this.showEmojiPicker.set(false);
|
|
15502
15635
|
}
|
|
15636
|
+
sendWithDrafts() {
|
|
15637
|
+
const trimmed = this.messageText().trim();
|
|
15638
|
+
if (trimmed.length > MAX_MESSAGE_LENGTH) {
|
|
15639
|
+
this.sendError.emit('TOO_LONG');
|
|
15640
|
+
return;
|
|
15641
|
+
}
|
|
15642
|
+
if (trimmed) {
|
|
15643
|
+
const now = Date.now();
|
|
15644
|
+
this.messageTimestamps = this.messageTimestamps.filter((t) => now - t < RATE_LIMIT_WINDOW_MS);
|
|
15645
|
+
if (this.messageTimestamps.length >= RATE_LIMIT_MAX_MESSAGES) {
|
|
15646
|
+
this.sendError.emit('RATE_LIMIT');
|
|
15647
|
+
return;
|
|
15648
|
+
}
|
|
15649
|
+
if (this.containsBlockedWords(trimmed)) {
|
|
15650
|
+
this.sendError.emit('BLOCKED');
|
|
15651
|
+
return;
|
|
15652
|
+
}
|
|
15653
|
+
const sanitized = this.sanitize(trimmed);
|
|
15654
|
+
this.lastMessage = sanitized;
|
|
15655
|
+
this.lastSentTime = now;
|
|
15656
|
+
this.messageTimestamps.push(now);
|
|
15657
|
+
this.sendWithAttachments.emit({
|
|
15658
|
+
text: sanitized,
|
|
15659
|
+
attachments: this.drafts(),
|
|
15660
|
+
});
|
|
15661
|
+
}
|
|
15662
|
+
else {
|
|
15663
|
+
this.sendWithAttachments.emit({
|
|
15664
|
+
text: '',
|
|
15665
|
+
attachments: this.drafts(),
|
|
15666
|
+
});
|
|
15667
|
+
}
|
|
15668
|
+
this.revokeAllPreviews();
|
|
15669
|
+
this.drafts.set([]);
|
|
15670
|
+
this.messageText.set('');
|
|
15671
|
+
this.showEmojiPicker.set(false);
|
|
15672
|
+
}
|
|
15503
15673
|
sanitize(text) {
|
|
15504
15674
|
return text
|
|
15505
15675
|
.replace(/[\u0000-\u001F\u007F]+/g, '')
|
|
@@ -15509,12 +15679,12 @@ class XSChatTextareaComponent {
|
|
|
15509
15679
|
return BLOCKED_WORDS.some((word) => text.toLowerCase().includes(word));
|
|
15510
15680
|
}
|
|
15511
15681
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15512
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatTextareaComponent, isStandalone: true, selector: "xs-chat-textarea", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", sendError: "sendError" }, host: { attributes: { "xs-chat-textarea-host": "" } }, viewQueries: [{ propertyName: "textareaEl", first: true, predicate: ["textareaEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n <div\n class=\"flex items-end gap-2 px-4 py-2 border-t border-zinc-800\"\n >\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n <div class=\"flex-1 relative\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"w-full px-4 py-2.5 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n <span\n class=\"absolute bottom-2 right-3 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15682
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatTextareaComponent, isStandalone: true, selector: "xs-chat-textarea", inputs: { placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", sendWithAttachments: "sendWithAttachments", sendError: "sendError" }, host: { attributes: { "xs-chat-textarea-host": "" } }, viewQueries: [{ propertyName: "textareaEl", first: true, predicate: ["textareaEl"], descendants: true, isSignal: true }, { propertyName: "fileInputEl", first: true, predicate: ["fileInputEl"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-2 px-4 py-2 border-t border-zinc-800\"\n >\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n <div class=\"flex-1 relative\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"block w-full px-4 py-2.5 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n <span\n class=\"absolute bottom-2 right-3 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: XSButtonComponent, selector: "xs-button", inputs: ["id", "label", "type", "icon", "action", "customClass", "variant", "layout", "badgeCount", "isFull", "disabled", "loading", "title", "ariaLabel", "borderRadius", "isGrouped", "groupPosition"], outputs: ["isGroupedChange", "groupPositionChange", "click", "onClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15513
15683
|
}
|
|
15514
15684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatTextareaComponent, decorators: [{
|
|
15515
15685
|
type: Component,
|
|
15516
|
-
args: [{ selector: 'xs-chat-textarea', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], host: { 'xs-chat-textarea-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n <div\n class=\"flex items-end gap-2 px-4 py-2 border-t border-zinc-800\"\n >\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n <div class=\"flex-1 relative\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"w-full px-4 py-2.5 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n <span\n class=\"absolute bottom-2 right-3 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n" }]
|
|
15517
|
-
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], textareaEl: [{ type: i0.ViewChild, args: ['textareaEl', { isSignal: true }] }] } });
|
|
15686
|
+
args: [{ selector: 'xs-chat-textarea', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], host: { 'xs-chat-textarea-host': '' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"flex flex-col\">\n @if (showEmojiPicker()) {\n <div\n class=\"flex flex-wrap gap-1 p-2 border-t border-zinc-800 max-h-32 overflow-y-auto\"\n >\n @for (emoji of emojis; track emoji) {\n <button\n (click)=\"insertEmoji(emoji)\"\n class=\"w-8 h-8 flex items-center justify-center hover:bg-zinc-800 rounded-lg text-lg transition-colors\"\n >\n {{ emoji }}\n </button>\n }\n </div>\n }\n @if (attachEnabled() && drafts().length > 0) {\n <div class=\"flex flex-wrap gap-2 px-4 pt-2\">\n @for (draft of drafts(); track draft.name; let i = $index) {\n <div\n class=\"relative flex items-center gap-2 max-w-40 rounded-xl bg-zinc-900/70 border border-zinc-800 p-1.5\"\n >\n @if (isImageDraft(draft) && draft.previewUrl) {\n <img\n [src]=\"draft.previewUrl\"\n [alt]=\"draft.name\"\n class=\"w-10 h-10 rounded-lg object-cover shrink-0\"\n />\n }\n <div class=\"flex flex-col min-w-0\">\n <span class=\"text-xs font-medium text-white truncate\">\n {{ draft.name }}\n </span>\n <span class=\"text-[10px] text-zinc-500\">\n {{ (draft.size / 1024).toFixed(0) }} KB\n </span>\n </div>\n <button\n (click)=\"removeDraft(i)\"\n class=\"absolute -top-2 -right-2 w-5 h-5 flex items-center justify-center rounded-full bg-zinc-700 text-white text-[10px] leading-none hover:bg-zinc-600\"\n >\n \u2715\n </button>\n </div>\n }\n </div>\n }\n @if (uploading()) {\n <div class=\"px-4 pt-2\">\n <div class=\"h-1 rounded-full bg-zinc-800 overflow-hidden\">\n <div\n class=\"h-full rounded-full bg-white transition-all\"\n [style.width.%]=\"uploadProgress()\"\n ></div>\n </div>\n </div>\n }\n <div\n class=\"flex items-end gap-2 px-4 py-2 border-t border-zinc-800\"\n >\n @if (attachEnabled()) {\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paperclip\"\n [disabled]=\"disabled() || uploading()\"\n (click)=\"openFilePicker()\"\n ></xs-button>\n <input\n #fileInputEl\n type=\"file\"\n class=\"hidden\"\n [accept]=\"attachmentAccept\"\n multiple\n (change)=\"onFilesSelected($event)\"\n />\n }\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"face-smile\"\n (click)=\"toggleEmojiPicker()\"\n ></xs-button>\n <div class=\"flex-1 relative\">\n <textarea\n #textareaEl\n [(ngModel)]=\"messageText\"\n (ngModelChange)=\"onTextChange()\"\n (keydown)=\"onKeyDown($event)\"\n (input)=\"autoResize()\"\n [placeholder]=\"placeholderText\"\n [maxLength]=\"maxLength\"\n class=\"block w-full px-4 py-2.5 text-sm font-medium text-white bg-zinc-900/50 border-0 focus:ring-0 focus:outline-none placeholder:text-zinc-500 resize-none overflow-hidden rounded-xl\"\n rows=\"1\"\n [disabled]=\"disabled()\"\n ></textarea>\n <span\n class=\"absolute bottom-2 right-3 text-[10px] text-zinc-500 pointer-events-none select-none leading-none\"\n >\n {{ messageText().length }}/{{ maxLength }}\n </span>\n </div>\n <xs-button\n layout=\"iconOnly\"\n variant=\"primary\"\n icon=\"paper-plane\"\n [disabled]=\"!canSend() || disabled()\"\n (click)=\"send()\"\n ></xs-button>\n </div>\n</div>\n" }]
|
|
15687
|
+
}], ctorParameters: () => [], propDecorators: { placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], sendWithAttachments: [{ type: i0.Output, args: ["sendWithAttachments"] }], sendError: [{ type: i0.Output, args: ["sendError"] }], textareaEl: [{ type: i0.ViewChild, args: ['textareaEl', { isSignal: true }] }], fileInputEl: [{ type: i0.ViewChild, args: ['fileInputEl', { isSignal: true }] }] } });
|
|
15518
15688
|
|
|
15519
15689
|
class XSChatConversationInfoComponent {
|
|
15520
15690
|
xsTranslate = inject(XSTranslateService);
|
|
@@ -15656,6 +15826,10 @@ class XSChatConversationComponent {
|
|
|
15656
15826
|
textareaPlaceholder = input('', ...(ngDevMode ? [{ debugName: "textareaPlaceholder" }] : []));
|
|
15657
15827
|
todayLabel = input('', ...(ngDevMode ? [{ debugName: "todayLabel" }] : []));
|
|
15658
15828
|
yesterdayLabel = input('', ...(ngDevMode ? [{ debugName: "yesterdayLabel" }] : []));
|
|
15829
|
+
// XS-483: adjuntos (desactivado por defecto para no afectar a otros consumidores).
|
|
15830
|
+
attachEnabled = input(false, ...(ngDevMode ? [{ debugName: "attachEnabled" }] : []));
|
|
15831
|
+
uploading = input(false, ...(ngDevMode ? [{ debugName: "uploading" }] : []));
|
|
15832
|
+
uploadProgress = input(0, ...(ngDevMode ? [{ debugName: "uploadProgress" }] : []));
|
|
15659
15833
|
_typingLabel = computed(() => this.typingLabel() || this.t('TYPING'), ...(ngDevMode ? [{ debugName: "_typingLabel" }] : []));
|
|
15660
15834
|
_onlineLabel = computed(() => this.onlineLabel() || this.t('ONLINE'), ...(ngDevMode ? [{ debugName: "_onlineLabel" }] : []));
|
|
15661
15835
|
_offlineLabel = computed(() => this.offlineLabel() || this.t('OFFLINE'), ...(ngDevMode ? [{ debugName: "_offlineLabel" }] : []));
|
|
@@ -15782,6 +15956,22 @@ class XSChatConversationComponent {
|
|
|
15782
15956
|
});
|
|
15783
15957
|
setTimeout(() => this.scrollToBottomFn(), 100);
|
|
15784
15958
|
}
|
|
15959
|
+
onSendWithAttachments(payload) {
|
|
15960
|
+
const reply = this.replyToMsg();
|
|
15961
|
+
this.replyToMsg.set(null);
|
|
15962
|
+
this.sendMessage.emit({
|
|
15963
|
+
text: payload.text,
|
|
15964
|
+
attachments: payload.attachments,
|
|
15965
|
+
replyTo: reply
|
|
15966
|
+
? {
|
|
15967
|
+
_id: reply._id || '',
|
|
15968
|
+
sender: reply.sender,
|
|
15969
|
+
text: reply.text,
|
|
15970
|
+
}
|
|
15971
|
+
: undefined,
|
|
15972
|
+
});
|
|
15973
|
+
setTimeout(() => this.scrollToBottomFn(), 100);
|
|
15974
|
+
}
|
|
15785
15975
|
scrollToBottomFn() {
|
|
15786
15976
|
if (this.loadingMore)
|
|
15787
15977
|
return;
|
|
@@ -15816,7 +16006,7 @@ class XSChatConversationComponent {
|
|
|
15816
16006
|
}
|
|
15817
16007
|
}
|
|
15818
16008
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15819
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatConversationComponent, isStandalone: true, selector: "xs-chat-conversation", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", goToList: "goToList", loadMoreMessages: "loadMoreMessages", clickInfoButton: "clickInfoButton", retryMessage: "retryMessage", replyToMessage: "replyToMessage" }, host: { attributes: { "xs-chat-conversation-host": "" }, classAttribute: "flex flex-col min-h-0 flex-1" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n typeItem=\"user\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n class=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n (sendMessage)=\"onSendMessage($event)\"\n />\n </div>\n ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatTextareaComponent, selector: "xs-chat-textarea", inputs: ["placeholder", "disabled"], outputs: ["sendMessage", "sendError"] }, { kind: "component", type: XSChatConversationInfoComponent, selector: "xs-chat-conversation-info", inputs: ["currentChatInfo", "userId", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "buttons"], outputs: ["goToList", "clickButton"] }, { kind: "component", type: XSChatAlertComponent, selector: "xs-chat-alert", inputs: ["type", "message"] }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16009
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatConversationComponent, isStandalone: true, selector: "xs-chat-conversation", inputs: { messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, attachEnabled: { classPropertyName: "attachEnabled", publicName: "attachEnabled", isSignal: true, isRequired: false, transformFunction: null }, uploading: { classPropertyName: "uploading", publicName: "uploading", isSignal: true, isRequired: false, transformFunction: null }, uploadProgress: { classPropertyName: "uploadProgress", publicName: "uploadProgress", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { sendMessage: "sendMessage", goToList: "goToList", loadMoreMessages: "loadMoreMessages", clickInfoButton: "clickInfoButton", retryMessage: "retryMessage", replyToMessage: "replyToMessage" }, host: { attributes: { "xs-chat-conversation-host": "" }, classAttribute: "flex flex-col min-h-0 flex-1" }, viewQueries: [{ propertyName: "messagesContainer", first: true, predicate: ["messagesContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n typeItem=\"user\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n class=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n />\n </div>\n ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatTextareaComponent, selector: "xs-chat-textarea", inputs: ["placeholder", "disabled", "attachEnabled", "uploading", "uploadProgress"], outputs: ["sendMessage", "sendWithAttachments", "sendError"] }, { kind: "component", type: XSChatConversationInfoComponent, selector: "xs-chat-conversation-info", inputs: ["currentChatInfo", "userId", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "buttons"], outputs: ["goToList", "clickButton"] }, { kind: "component", type: XSChatAlertComponent, selector: "xs-chat-alert", inputs: ["type", "message"] }, { kind: "component", type: XSImageComponent, selector: "xs-image", inputs: ["config", "viewTransitionName", "src", "alt", "width", "height", "size", "rounded", "objectFit", "clickable", "item", "typeItem", "imageType", "fallbackSrc", "loading", "priority", "customClass", "generateAvatar"], outputs: ["onClick", "onLoad", "onError"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15820
16010
|
}
|
|
15821
16011
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatConversationComponent, decorators: [{
|
|
15822
16012
|
type: Component,
|
|
@@ -15829,8 +16019,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
15829
16019
|
], host: {
|
|
15830
16020
|
'xs-chat-conversation-host': '',
|
|
15831
16021
|
class: 'flex flex-col min-h-0 flex-1',
|
|
15832
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n typeItem=\"user\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n class=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n (sendMessage)=\"onSendMessage($event)\"\n />\n </div>\n " }]
|
|
15833
|
-
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], loadMoreMessages: [{ type: i0.Output, args: ["loadMoreMessages"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }] } });
|
|
16022
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n #messagesContainer\n class=\"flex flex-col flex-1 min-h-[300px] overflow-y-auto\"\n (scroll)=\"onScroll()\"\n >\n <xs-chat-conversation-info\n class=\"sticky top-0 z-10 bg-zinc-900\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingLabel()\"\n [onlineLabel]=\"onlineLabel()\"\n [offlineLabel]=\"offlineLabel()\"\n [roleLabel]=\"roleLabel()\"\n [buttons]=\"infoButtons()\"\n (goToList)=\"goToList.emit()\"\n (clickButton)=\"clickInfoButton.emit($event)\"\n />\n\n @if (alertType(); as type) {\n <xs-chat-alert\n [type]=\"type\"\n [message]=\"alertMessage()\"\n />\n }\n\n <div class=\"flex-1 flex flex-col px-4 py-3\">\n @for (msg of messages(); track msg._id; let i = $index) {\n @if (showDateSeparator(i)) {\n <div class=\"flex justify-center py-2\">\n <span\n class=\"text-[10px] text-zinc-600 bg-zinc-900 px-3 py-1 rounded-full\"\n >\n {{ formatDateSeparator(msg.created) }}\n </span>\n </div>\n }\n <div\n class=\"flex group px-4 items-end gap-2\"\n [class.justify-end]=\"isMine(msg)\"\n [class.justify-start]=\"!isMine(msg)\"\n [class.mt-2]=\"i > 0 && isSameSender(i)\"\n [class.mt-3]=\"i > 0 && !isSameSender(i)\"\n >\n @if (!isMine(msg) && !isSameSender(i)) {\n <xs-image\n [item]=\"otherUser(msg)!\"\n typeItem=\"user\"\n imageType=\"small\"\n [alt]=\"otherUser(msg)?.name ?? ''\"\n class=\"w-7 h-7 rounded-full overflow-hidden shrink-0 mt-1\"\n [objectFit]=\"'cover'\"\n />\n } @else {\n <div class=\"w-7 shrink-0\"></div>\n }\n <div\n class=\"max-w-[80%] text-sm relative\"\n [class.rounded-2xl]=\"!isSameSender(i)\"\n [class.rounded-md]=\"i > 0 && isSameSender(i)\"\n [class.bg-zinc-500]=\"!isMine(msg)\"\n [class.bg-zinc-900]=\"isMine(msg)\"\n [class.px-3]=\"true\"\n [class.py-2]=\"!isSameSender(i)\"\n [class.py-1]=\"i > 0 && isSameSender(i)\"\n [class.rounded-br-md]=\"\n isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-bl-md]=\"\n !isMine(msg) && !isSameSender(i)\n \"\n [class.rounded-tr-md]=\"\n isMine(msg) && isSameSender(i)\n \"\n [class.rounded-tl-md]=\"\n !isMine(msg) && isSameSender(i)\n \"\n >\n @if (msg.replyTo) {\n <div\n class=\"mb-1.5 pl-2 border-l-2 border-zinc-500 text-[11px] text-zinc-400 leading-tight\"\n >\n <span class=\"font-semibold text-zinc-300\">{{\n msg.replyTo.sender === userId()\n ? t('YOU')\n : msg.replyTo.sender\n }}</span>\n <p class=\"truncate\">{{ msg.replyTo.text }}</p>\n </div>\n }\n @if (hasLink(msg.text); as link) {\n <a\n [href]=\"link\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"block mb-1.5 p-2 rounded-lg bg-black/20 border border-zinc-700/50 hover:border-zinc-500 transition-colors\"\n >\n <span\n class=\"text-[11px] text-zinc-400 truncate block\"\n >{{ link }}</span\n >\n <span class=\"text-[10px] text-zinc-500\"\n >{{ t('OPEN_LINK') }}</span\n >\n </a>\n }\n <p\n class=\"text-white break-words whitespace-pre-wrap\"\n >\n {{ msg.text }}\n </p>\n @if (\n msg.attachments && msg.attachments.length > 0\n ) {\n <div class=\"flex flex-wrap gap-1.5 mt-1.5\">\n @for (att of msg.attachments; track att.url) {\n @if (att.type.startsWith('image/')) {\n <xs-image\n [item]=\"{ _id: att.url, image: true }\"\n [typeItem]=\"'media'\"\n imageType=\"normal\"\n [objectFit]=\"'cover'\"\n customClass=\"rounded-lg w-full max-h-48 object-cover\"\n />\n }\n }\n </div>\n }\n <div\n class=\"flex items-center justify-end gap-1 mt-1\"\n >\n <span class=\"text-[10px]\" [class.text-zinc-400]=\"!isMine(msg)\" [class.text-zinc-500]=\"isMine(msg)\">{{\n formatTime(msg.created)\n }}</span>\n @if (isMine(msg)) {\n @if (msg.isFailed) {\n <button\n (click)=\"onRetry(msg)\"\n class=\"text-red-400 hover:text-red-300 text-[10px] flex items-center gap-0.5\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z\"\n />\n </svg>\n {{ t('RETRY') }}\n </button>\n } @else if (msg.isTemp) {\n <span\n class=\"text-[10px] text-zinc-500 animate-pulse\"\n >{{ t('SENDING') }}</span\n >\n } @else {\n <span\n class=\"text-[10px]\"\n [class.text-zinc-400]=\"msg.isRead\"\n [class.text-zinc-500]=\"!msg.isRead\"\n >\n {{ msg.isRead ? '\u2713\u2713' : '\u2713' }}\n </span>\n }\n }\n <button\n (click)=\"onReply(msg)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n [title]=\"t('REPLY')\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z\"\n />\n </svg>\n </button>\n <button\n (click)=\"copyMessage(msg.text)\"\n class=\"opacity-0 group-hover:opacity-100 text-[10px] transition-opacity\"\n [class.text-zinc-600]=\"isMine(msg)\"\n [class.text-zinc-400]=\"!isMine(msg)\"\n [class.hover:text-zinc-300]=\"!isMine(msg)\"\n [class.hover:text-zinc-400]=\"isMine(msg)\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-3 h-3\"\n >\n <path\n d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"\n />\n </svg>\n </button>\n </div>\n </div>\n </div>\n } @empty {\n <div\n class=\"flex-1 flex items-center justify-center text-zinc-500 text-sm\"\n >\n {{ _emptyMessagesLabel() }}\n </div>\n }\n\n @if (typingUserId() && typingUserId() !== userId()) {\n <div class=\"flex justify-start px-4 pt-2\">\n <div\n class=\"flex items-center gap-2 px-4 py-3 rounded-2xl rounded-bl-md bg-zinc-800\"\n >\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.15s]\"\n ></span>\n <span\n class=\"w-2 h-2 bg-zinc-500 rounded-full animate-bounce delay-[0.3s]\"\n ></span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <div class=\"shrink-0\">\n @if (replyToMsg(); as replyMsg) {\n <div\n class=\"bg-zinc-900 border-t border-zinc-800\"\n >\n <div class=\"flex items-center gap-2 px-4 py-2\">\n <div class=\"flex-1 min-w-0\">\n <span\n class=\"text-[11px] font-semibold text-zinc-400\"\n >{{ t('REPLYING_TO') }}\n {{\n replyMsg.sender === userId() ? t('YOURSELF') : ''\n }}</span\n >\n <p class=\"text-xs text-zinc-400 truncate\">\n {{ replyMsg.text }}\n </p>\n </div>\n <button\n (click)=\"cancelReply()\"\n class=\"text-zinc-500 hover:text-white shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n </div>\n }\n\n <xs-chat-textarea\n [placeholder]=\"\n replyToMsg()\n ? t('REPLY_PLACEHOLDER')\n : _textareaPlaceholder()\n \"\n [disabled]=\"disabled()\"\n [attachEnabled]=\"attachEnabled()\"\n [uploading]=\"uploading()\"\n [uploadProgress]=\"uploadProgress()\"\n (sendMessage)=\"onSendMessage($event)\"\n (sendWithAttachments)=\"onSendWithAttachments($event)\"\n />\n </div>\n " }]
|
|
16023
|
+
}], ctorParameters: () => [], propDecorators: { messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], currentChatInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "currentChatInfo", required: false }] }], userId: [{ type: i0.Input, args: [{ isSignal: true, alias: "userId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], typingUserId: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingUserId", required: false }] }], typingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "typingLabel", required: false }] }], onlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "onlineLabel", required: false }] }], offlineLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "offlineLabel", required: false }] }], roleLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "roleLabel", required: false }] }], emptyMessagesLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessagesLabel", required: false }] }], textareaPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "textareaPlaceholder", required: false }] }], todayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "todayLabel", required: false }] }], yesterdayLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "yesterdayLabel", required: false }] }], attachEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "attachEnabled", required: false }] }], uploading: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploading", required: false }] }], uploadProgress: [{ type: i0.Input, args: [{ isSignal: true, alias: "uploadProgress", required: false }] }], infoButtons: [{ type: i0.Input, args: [{ isSignal: true, alias: "infoButtons", required: false }] }], alertType: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertType", required: false }] }], alertMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "alertMessage", required: false }] }], sendMessage: [{ type: i0.Output, args: ["sendMessage"] }], goToList: [{ type: i0.Output, args: ["goToList"] }], loadMoreMessages: [{ type: i0.Output, args: ["loadMoreMessages"] }], clickInfoButton: [{ type: i0.Output, args: ["clickInfoButton"] }], retryMessage: [{ type: i0.Output, args: ["retryMessage"] }], replyToMessage: [{ type: i0.Output, args: ["replyToMessage"] }], messagesContainer: [{ type: i0.ViewChild, args: ['messagesContainer', { isSignal: true }] }] } });
|
|
15834
16024
|
|
|
15835
16025
|
class XSChatFloatingPanelComponent {
|
|
15836
16026
|
isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
@@ -15967,7 +16157,7 @@ class XSChatFloatingPanelComponent {
|
|
|
15967
16157
|
this.clickDropdownItem.emit(event);
|
|
15968
16158
|
}
|
|
15969
16159
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
15970
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatFloatingPanelComponent, isStandalone: true, selector: "xs-chat-floating-panel", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, chats: { classPropertyName: "chats", publicName: "chats", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, selectedChatId: { classPropertyName: "selectedChatId", publicName: "selectedChatId", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, dropdownItems: { classPropertyName: "dropdownItems", publicName: "dropdownItems", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, noChatsLabel: { classPropertyName: "noChatsLabel", publicName: "noChatsLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeBlockLabel: { classPropertyName: "swipeBlockLabel", publicName: "swipeBlockLabel", isSignal: true, isRequired: false, transformFunction: null }, swipePinLabel: { classPropertyName: "swipePinLabel", publicName: "swipePinLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeDeleteLabel: { classPropertyName: "swipeDeleteLabel", publicName: "swipeDeleteLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeCancelLabel: { classPropertyName: "swipeCancelLabel", publicName: "swipeCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectChat: "selectChat", sendMessage: "sendMessage", closePanel: "closePanel", goToList: "goToList", clickDropdownItem: "clickDropdownItem", clickInfoButton: "clickInfoButton" }, host: { attributes: { "xs-chat-floating-panel-host": "" } }, ngImport: i0, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"chats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n (sendMessage)=\"onSendMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatListComponent, selector: "xs-chat-list", inputs: ["chats", "loading", "showSearch", "dropdownItems", "userId", "searchPlaceholder", "noResultsLabel", "noChatsLabel", "swipeBlockLabel", "swipePinLabel", "swipeDeleteLabel", "swipeCancelLabel"], outputs: ["searchQueryChange", "selectChat", "clickDropdownItem"] }, { kind: "component", type: XSChatConversationComponent, selector: "xs-chat-conversation", inputs: ["messages", "currentChatInfo", "userId", "disabled", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "emptyMessagesLabel", "textareaPlaceholder", "todayLabel", "yesterdayLabel", "infoButtons", "alertType", "alertMessage"], outputs: ["sendMessage", "goToList", "loadMoreMessages", "clickInfoButton", "retryMessage", "replyToMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16160
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSChatFloatingPanelComponent, isStandalone: true, selector: "xs-chat-floating-panel", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, chats: { classPropertyName: "chats", publicName: "chats", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null }, currentChatInfo: { classPropertyName: "currentChatInfo", publicName: "currentChatInfo", isSignal: true, isRequired: false, transformFunction: null }, userId: { classPropertyName: "userId", publicName: "userId", isSignal: true, isRequired: false, transformFunction: null }, selectedChatId: { classPropertyName: "selectedChatId", publicName: "selectedChatId", isSignal: true, isRequired: false, transformFunction: null }, typingUserId: { classPropertyName: "typingUserId", publicName: "typingUserId", isSignal: true, isRequired: false, transformFunction: null }, dropdownItems: { classPropertyName: "dropdownItems", publicName: "dropdownItems", isSignal: true, isRequired: false, transformFunction: null }, typingLabel: { classPropertyName: "typingLabel", publicName: "typingLabel", isSignal: true, isRequired: false, transformFunction: null }, onlineLabel: { classPropertyName: "onlineLabel", publicName: "onlineLabel", isSignal: true, isRequired: false, transformFunction: null }, offlineLabel: { classPropertyName: "offlineLabel", publicName: "offlineLabel", isSignal: true, isRequired: false, transformFunction: null }, roleLabel: { classPropertyName: "roleLabel", publicName: "roleLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyMessagesLabel: { classPropertyName: "emptyMessagesLabel", publicName: "emptyMessagesLabel", isSignal: true, isRequired: false, transformFunction: null }, textareaPlaceholder: { classPropertyName: "textareaPlaceholder", publicName: "textareaPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, todayLabel: { classPropertyName: "todayLabel", publicName: "todayLabel", isSignal: true, isRequired: false, transformFunction: null }, yesterdayLabel: { classPropertyName: "yesterdayLabel", publicName: "yesterdayLabel", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, noChatsLabel: { classPropertyName: "noChatsLabel", publicName: "noChatsLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeBlockLabel: { classPropertyName: "swipeBlockLabel", publicName: "swipeBlockLabel", isSignal: true, isRequired: false, transformFunction: null }, swipePinLabel: { classPropertyName: "swipePinLabel", publicName: "swipePinLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeDeleteLabel: { classPropertyName: "swipeDeleteLabel", publicName: "swipeDeleteLabel", isSignal: true, isRequired: false, transformFunction: null }, swipeCancelLabel: { classPropertyName: "swipeCancelLabel", publicName: "swipeCancelLabel", isSignal: true, isRequired: false, transformFunction: null }, infoButtons: { classPropertyName: "infoButtons", publicName: "infoButtons", isSignal: true, isRequired: false, transformFunction: null }, alertType: { classPropertyName: "alertType", publicName: "alertType", isSignal: true, isRequired: false, transformFunction: null }, alertMessage: { classPropertyName: "alertMessage", publicName: "alertMessage", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectChat: "selectChat", sendMessage: "sendMessage", closePanel: "closePanel", goToList: "goToList", clickDropdownItem: "clickDropdownItem", clickInfoButton: "clickInfoButton" }, host: { attributes: { "xs-chat-floating-panel-host": "" } }, ngImport: i0, template: "\n @if (isOpen()) {\n <div\n class=\"fixed inset-0 z-[300] hidden lg:block\"\n (click)=\"closePanel.emit()\"\n ></div>\n\n <div\n class=\"fixed bottom-20 right-4 z-[301] hidden lg:flex flex-col bg-zinc-900/95 backdrop-blur-2xl border border-white/10 rounded-2xl shadow-2xl w-[380px] h-[560px]\"\n (click)=\"$event.stopPropagation()\"\n >\n <div\n class=\"flex items-center justify-between px-4 py-3 border-b border-white/10 shrink-0\"\n >\n <div class=\"flex items-center gap-2 min-w-0\">\n @if (selectedChatId()) {\n <button\n (click)=\"goToList.emit()\"\n class=\"text-zinc-400 hover:text-white shrink-0 transition-colors\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z\"\n />\n </svg>\n </button>\n }\n <span\n class=\"text-sm font-semibold text-white truncate\"\n >{{ title() }}</span\n >\n </div>\n <button\n (click)=\"closePanel.emit()\"\n class=\"flex items-center justify-center w-7 h-7 text-zinc-400 hover:text-white hover:bg-zinc-800 rounded-full transition-colors shrink-0\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n class=\"w-4 h-4\"\n >\n <path\n d=\"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n />\n </svg>\n </button>\n </div>\n\n <div class=\"flex-1 min-h-0 flex flex-col\">\n @if (!selectedChatId()) {\n <xs-chat-list\n [chats]=\"chats()\"\n [loading]=\"loading()\"\n [dropdownItems]=\"dropdownItems()\"\n [userId]=\"userId()\"\n [searchPlaceholder]=\"searchPlaceholderText\"\n [noResultsLabel]=\"noResultsText\"\n [noChatsLabel]=\"noChatsText\"\n [swipeBlockLabel]=\"swipeBlockText\"\n [swipePinLabel]=\"swipePinText\"\n [swipeDeleteLabel]=\"swipeDeleteText\"\n [swipeCancelLabel]=\"swipeCancelText\"\n (selectChat)=\"onSelectChat($event)\"\n (clickDropdownItem)=\"onDropdownItemClick($event)\"\n />\n } @else {\n <div class=\"flex-1 min-h-0 flex flex-col\">\n <xs-chat-conversation\n [messages]=\"messages()\"\n [currentChatInfo]=\"currentChatInfo()\"\n [userId]=\"userId()\"\n [typingUserId]=\"typingUserId()\"\n [typingLabel]=\"typingText\"\n [onlineLabel]=\"onlineText\"\n [offlineLabel]=\"offlineText\"\n [roleLabel]=\"roleLabel()\"\n [emptyMessagesLabel]=\"emptyMessagesText\"\n [textareaPlaceholder]=\"textareaPlaceholderText\"\n [todayLabel]=\"todayText\"\n [yesterdayLabel]=\"yesterdayText\"\n [infoButtons]=\"infoButtons()\"\n [alertType]=\"alertType()\"\n [alertMessage]=\"alertMessage()\"\n (sendMessage)=\"onSendMessage($event)\"\n (goToList)=\"onGoToList()\"\n (clickInfoButton)=\"onClickInfoButton($event)\"\n />\n </div>\n }\n </div>\n\n @if (selectedChatId() && showFooter()) {\n <div\n class=\"flex items-center justify-between px-3 py-1 border-t border-white/10 shrink-0\"\n >\n <ng-content select=\"[footerLeft]\" />\n <ng-content select=\"[footerRight]\" />\n </div>\n }\n </div>\n }\n ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: XSChatListComponent, selector: "xs-chat-list", inputs: ["chats", "loading", "showSearch", "dropdownItems", "userId", "searchPlaceholder", "noResultsLabel", "noChatsLabel", "swipeBlockLabel", "swipePinLabel", "swipeDeleteLabel", "swipeCancelLabel"], outputs: ["searchQueryChange", "selectChat", "clickDropdownItem"] }, { kind: "component", type: XSChatConversationComponent, selector: "xs-chat-conversation", inputs: ["messages", "currentChatInfo", "userId", "disabled", "typingUserId", "typingLabel", "onlineLabel", "offlineLabel", "roleLabel", "emptyMessagesLabel", "textareaPlaceholder", "todayLabel", "yesterdayLabel", "attachEnabled", "uploading", "uploadProgress", "infoButtons", "alertType", "alertMessage"], outputs: ["sendMessage", "goToList", "loadMoreMessages", "clickInfoButton", "retryMessage", "replyToMessage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
15971
16161
|
}
|
|
15972
16162
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSChatFloatingPanelComponent, decorators: [{
|
|
15973
16163
|
type: Component,
|
|
@@ -16887,7 +17077,7 @@ const XS_ICON_ALIAS = (def, name) => ({
|
|
|
16887
17077
|
iconName: name,
|
|
16888
17078
|
});
|
|
16889
17079
|
function registerXSUiIcons(library) {
|
|
16890
|
-
library.addIcons(faAddressBook, faAndroid, faApple, faArrowLeft, faArrowRightFromBracket, faArrowTrendUp, faArrowUpRightFromSquare, faArrowsRotate, faAward, faBackwardStep, faBan, faBandcamp, faBars, faBell, faBook, faBuilding, faCalendar, faCalendarDays, faCalculator, faCaretDown, faCaretRight, faCaretUp, faCartShopping, faChartBar, faChartLine, faChartPie, faChartSimple, faCheck, faCheckCircle, faCheckDouble, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faCircleExclamation, faCircleInfo, faCircleNotch, faCircleQuestion, faCircleXmark, faClipboard, faClock, faClone, faCloudArrowDown, faCode, faCodeCommit, faCog, faCogs, faColumns, faComment, faComments, faCompactDisc, faCopy, faCreditCard, faCrown, faCube, faCubes, faDatabase, faDesktop, faDice, faDollarSign, faDownload, faEdit, faEllipsisVertical, faEnvelope, faEquals, faExclamationTriangle, faExpand, faExternalLink, faExternalLinkAlt, faEye, faFaceSmile, faFacebook, faFile, faFileContract, faFileLines, faFilePdf, faFilter, faFire, faFlag, faFlask, faFloppyDisk, faFolder, faFolderOpen, faForwardStep, faGamepad, faGithub, faGlobe, faGoogle, faGraduationCap, faGripLines, faGripVertical, faHeadphones, faHardDrive, faHashtag, faHeadphonesSimple, faHeart, faHeart$1, faHeartbeat, faHome, faImage, faImages, faInstagram, faKey, faLayerGroup, faLightbulb, faLink, faLinux, faList, faLocation, faLock, faMagnifyingGlass, faMap, faMapMarker, faMapMarkerAlt, faMapPin, faMessage, faMicrochip, faMicrophone, faMicrosoft, faMinus, faMobile, faMoon, faMusic, faNewspaper, faPaperPlane, faPause, faPalette, faPencil, faPlay, faPlus, faPowerOff, faPuzzlePiece, faRankingStar, faRecordVinyl, faRefresh, faRepeat, faRightFromBracket, faRightToBracket, faRotateRight, faSchool, faSchoolFlag, faSearch, faServer, faShare, faShareNodes, faShield, faShoePrints, faShuffle, faSkull, faSliders, faSoundcloud, faSort, faSpellCheck, faSpotify, faSpinner, faStar, faStar$1, faStop, faSync, faTableCells, faTable, faTabletScreenButton, faTag, faThumbsUp, faThumbsDown, faTicket, faThumbTack, faTiktok, faToolbox, faTrash, faTrophy, faUnlock, faUpload, faUser, faUserCheck, faUserPlus, faUserSecret, faUsers, faUserXmark, faVolumeDown, faVolumeLow, faVolumeMute, faVolumeUp, faVolumeXmark, faWallet, faWandMagic, faWandMagicSparkles, faWhatsapp, faWindows, faWrench, faXTwitter, faXmark, faYoutube, XS_ICON_ALIAS(faCartShopping, 'shopping-cart'), XS_ICON_ALIAS(faCheckCircle, 'check-circle'), XS_ICON_ALIAS(faCircleExclamation, 'exclamation-circle'), XS_ICON_ALIAS(faExclamationTriangle, 'exclamation-triangle'), XS_ICON_ALIAS(faHeartbeat, 'heartbeat'), XS_ICON_ALIAS(faCircleInfo, 'info'), XS_ICON_ALIAS(faCircleInfo, 'info-circle'), XS_ICON_ALIAS(faCircleQuestion, 'help-circle'), XS_ICON_ALIAS(faCircleXmark, 'times-circle'), XS_ICON_ALIAS(faCog, 'cog'), XS_ICON_ALIAS(faCog, 'settings'), XS_ICON_ALIAS(faCogs, 'cogs'), XS_ICON_ALIAS(faColumns, 'columns'), XS_ICON_ALIAS(faEdit, 'edit'), XS_ICON_ALIAS(faEnvelope, 'mail'), XS_ICON_ALIAS(faExternalLink, 'external-link'), XS_ICON_ALIAS(faExternalLinkAlt, 'external-link-alt'), XS_ICON_ALIAS(faHardDrive, 'hdd'), XS_ICON_ALIAS(faHome, 'home'), XS_ICON_ALIAS(faLayerGroup, 'layers'), XS_ICON_ALIAS(faLocation, 'location'), XS_ICON_ALIAS(faMagnifyingGlass, 'search'), XS_ICON_ALIAS(faMapMarker, 'map-marker'), XS_ICON_ALIAS(faMapMarkerAlt, 'map-marker-alt'), XS_ICON_ALIAS(faMessage, 'message-square'), XS_ICON_ALIAS(faRefresh, 'refresh'), XS_ICON_ALIAS(faRightFromBracket, 'logout'), XS_ICON_ALIAS(faRightFromBracket, 'sign-out-alt'), XS_ICON_ALIAS(faPowerOff, 'power-off'), XS_ICON_ALIAS(faRightToBracket, 'log-in'), XS_ICON_ALIAS(faRightToBracket, 'sign-in-alt'), XS_ICON_ALIAS(faArrowsRotate, 'sync'), XS_ICON_ALIAS(faArrowsRotate, 'sync-alt'), XS_ICON_ALIAS(faArrowTrendUp, 'trending-up'), XS_ICON_ALIAS(faShield, 'shield'), XS_ICON_ALIAS(faTabletScreenButton, 'tablet'), XS_ICON_ALIAS(faThumbTack, 'thumb-tack'), XS_ICON_ALIAS(faVolumeLow, 'volume-down'), XS_ICON_ALIAS(faVolumeUp, 'volume-up'), XS_ICON_ALIAS(faVolumeXmark, 'volume-mute'), XS_ICON_ALIAS(faXmark, 'close'), XS_ICON_ALIAS(faXmark, 'times'));
|
|
17080
|
+
library.addIcons(faAddressBook, faAndroid, faApple, faArrowLeft, faArrowRightFromBracket, faArrowTrendUp, faArrowUpRightFromSquare, faArrowsRotate, faAward, faBackwardStep, faBan, faBandcamp, faBars, faBell, faBook, faBuilding, faCalendar, faCalendarDays, faCalculator, faCaretDown, faCaretRight, faCaretUp, faCartShopping, faChartBar, faChartLine, faChartPie, faChartSimple, faCheck, faCheckCircle, faCheckDouble, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faCircleExclamation, faCircleInfo, faCircleNotch, faCircleQuestion, faCircleXmark, faClipboard, faClock, faClone, faCloudArrowDown, faCode, faCodeCommit, faCog, faCogs, faColumns, faComment, faComments, faCompactDisc, faCopy, faCreditCard, faCrown, faCube, faCubes, faDatabase, faDesktop, faDice, faDollarSign, faDownload, faEdit, faEllipsisVertical, faEnvelope, faEquals, faExclamationTriangle, faExpand, faExternalLink, faExternalLinkAlt, faEye, faFaceSmile, faFacebook, faFile, faFileContract, faFileLines, faFilePdf, faFilter, faFire, faFlag, faFlask, faFloppyDisk, faFolder, faFolderOpen, faForwardStep, faGamepad, faGithub, faGlobe, faGoogle, faGraduationCap, faGripLines, faGripVertical, faHeadphones, faHardDrive, faHashtag, faHeadphonesSimple, faHeart, faHeart$1, faHeartbeat, faHome, faImage, faImages, faInstagram, faKey, faLayerGroup, faLightbulb, faLink, faLinux, faList, faLocation, faLock, faMagnifyingGlass, faMap, faMapMarker, faMapMarkerAlt, faMapPin, faMessage, faMicrochip, faMicrophone, faMicrosoft, faMinus, faMobile, faMoon, faMusic, faNewspaper, faPaperclip, faPaperPlane, faPause, faPalette, faPencil, faPlay, faPlus, faPowerOff, faPuzzlePiece, faRankingStar, faRecordVinyl, faRefresh, faRepeat, faRightFromBracket, faRightToBracket, faRotateRight, faSchool, faSchoolFlag, faSearch, faServer, faShare, faShareNodes, faShield, faShoePrints, faShuffle, faSkull, faSliders, faSoundcloud, faSort, faSpellCheck, faSpotify, faSpinner, faStar, faStar$1, faStop, faSync, faTableCells, faTable, faTabletScreenButton, faTag, faThumbsUp, faThumbsDown, faTicket, faThumbTack, faTiktok, faToolbox, faTrash, faTrophy, faUnlock, faUpload, faUser, faUserCheck, faUserPlus, faUserSecret, faUsers, faUserXmark, faVolumeDown, faVolumeLow, faVolumeMute, faVolumeUp, faVolumeXmark, faWallet, faWandMagic, faWandMagicSparkles, faWhatsapp, faWindows, faWrench, faXTwitter, faXmark, faYoutube, XS_ICON_ALIAS(faCartShopping, 'shopping-cart'), XS_ICON_ALIAS(faCheckCircle, 'check-circle'), XS_ICON_ALIAS(faCircleExclamation, 'exclamation-circle'), XS_ICON_ALIAS(faExclamationTriangle, 'exclamation-triangle'), XS_ICON_ALIAS(faHeartbeat, 'heartbeat'), XS_ICON_ALIAS(faCircleInfo, 'info'), XS_ICON_ALIAS(faCircleInfo, 'info-circle'), XS_ICON_ALIAS(faCircleQuestion, 'help-circle'), XS_ICON_ALIAS(faCircleXmark, 'times-circle'), XS_ICON_ALIAS(faCog, 'cog'), XS_ICON_ALIAS(faCog, 'settings'), XS_ICON_ALIAS(faCogs, 'cogs'), XS_ICON_ALIAS(faColumns, 'columns'), XS_ICON_ALIAS(faEdit, 'edit'), XS_ICON_ALIAS(faEnvelope, 'mail'), XS_ICON_ALIAS(faExternalLink, 'external-link'), XS_ICON_ALIAS(faExternalLinkAlt, 'external-link-alt'), XS_ICON_ALIAS(faHardDrive, 'hdd'), XS_ICON_ALIAS(faHome, 'home'), XS_ICON_ALIAS(faLayerGroup, 'layers'), XS_ICON_ALIAS(faLocation, 'location'), XS_ICON_ALIAS(faMagnifyingGlass, 'search'), XS_ICON_ALIAS(faMapMarker, 'map-marker'), XS_ICON_ALIAS(faMapMarkerAlt, 'map-marker-alt'), XS_ICON_ALIAS(faMessage, 'message-square'), XS_ICON_ALIAS(faRefresh, 'refresh'), XS_ICON_ALIAS(faRightFromBracket, 'logout'), XS_ICON_ALIAS(faRightFromBracket, 'sign-out-alt'), XS_ICON_ALIAS(faPowerOff, 'power-off'), XS_ICON_ALIAS(faRightToBracket, 'log-in'), XS_ICON_ALIAS(faRightToBracket, 'sign-in-alt'), XS_ICON_ALIAS(faArrowsRotate, 'sync'), XS_ICON_ALIAS(faArrowsRotate, 'sync-alt'), XS_ICON_ALIAS(faArrowTrendUp, 'trending-up'), XS_ICON_ALIAS(faShield, 'shield'), XS_ICON_ALIAS(faTabletScreenButton, 'tablet'), XS_ICON_ALIAS(faThumbTack, 'thumb-tack'), XS_ICON_ALIAS(faVolumeLow, 'volume-down'), XS_ICON_ALIAS(faVolumeUp, 'volume-up'), XS_ICON_ALIAS(faVolumeXmark, 'volume-mute'), XS_ICON_ALIAS(faXmark, 'close'), XS_ICON_ALIAS(faXmark, 'times'));
|
|
16891
17081
|
}
|
|
16892
17082
|
|
|
16893
17083
|
class XSWindowService {
|
|
@@ -23646,7 +23836,7 @@ const LIB_STORIES = [
|
|
|
23646
23836
|
() => import('./xsmusices-ui-xs-skeleton-for-slider.xsstory-k-uutKIV.mjs').then((m) => m.story),
|
|
23647
23837
|
() => import('./xsmusices-ui-xs-table-items.xsstory-qKGBMrjP.mjs').then((m) => m.story),
|
|
23648
23838
|
() => import('./xsmusices-ui-xs-table.xsstory-BNaB0GGa.mjs').then((m) => m.story),
|
|
23649
|
-
() => import('./xsmusices-ui-xs-title-collapse.xsstory-
|
|
23839
|
+
() => import('./xsmusices-ui-xs-title-collapse.xsstory-Bs_SOeq_.mjs').then((m) => m.story),
|
|
23650
23840
|
() => Promise.resolve().then(function () { return xsSpinner_xsstory; }).then((m) => m.story),
|
|
23651
23841
|
() => import('./xsmusices-ui-country-flag.xsstory-BPTu5b4i.mjs').then((m) => m.story),
|
|
23652
23842
|
() => import('./xsmusices-ui-country-name.xsstory-ENhKrPTw.mjs').then((m) => m.story),
|
|
@@ -23677,7 +23867,7 @@ const LIB_STORIES = [
|
|
|
23677
23867
|
() => import('./xsmusices-ui-xs-chat-conversation.xsstory-sK9b5_Wo.mjs').then((m) => m.story),
|
|
23678
23868
|
() => import('./xsmusices-ui-xs-chat-floating-panel.xsstory-_XfEzM1j.mjs').then((m) => m.story),
|
|
23679
23869
|
() => import('./xsmusices-ui-xs-chat-alert.xsstory-rdpQcMgJ.mjs').then((m) => m.story),
|
|
23680
|
-
() => import('./xsmusices-ui-xs-chat-textarea.xsstory-
|
|
23870
|
+
() => import('./xsmusices-ui-xs-chat-textarea.xsstory-CGZcBSLI.mjs').then((m) => m.story),
|
|
23681
23871
|
() => import('./xsmusices-ui-xs-chat-conversation-info.xsstory-BQjdjpbB.mjs').then((m) => m.story),
|
|
23682
23872
|
() => import('./xsmusices-ui-xs-stepper.xsstory-gKU4wN-_.mjs').then((m) => m.story),
|
|
23683
23873
|
() => import('./xsmusices-ui-xs-send-scraper.xsstory-Cq6PuwN7.mjs').then((m) => m.story),
|