@xsmusices/ui 1.44.39 → 1.44.43
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.
|
@@ -12067,7 +12067,7 @@ class XSAuthComponent {
|
|
|
12067
12067
|
}
|
|
12068
12068
|
}
|
|
12069
12069
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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 });
|
|
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 @if (cfg.defaultMode === 'home') {\n <div class=\"mt-3 flex flex-col gap-3\">\n <xs-button\n type=\"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 </div>\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 }\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=\"mt-3 flex flex-col gap-3\">\n <xs-button\n type=\"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 type=\"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 });
|
|
12071
12071
|
}
|
|
12072
12072
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSAuthComponent, decorators: [{
|
|
12073
12073
|
type: Component,
|
|
@@ -12077,7 +12077,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImpo
|
|
|
12077
12077
|
XSFormlyComponent,
|
|
12078
12078
|
XSButtonComponent,
|
|
12079
12079
|
XSAlertComponent,
|
|
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" }]
|
|
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 @if (cfg.defaultMode === 'home') {\n <div class=\"mt-3 flex flex-col gap-3\">\n <xs-button\n type=\"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 </div>\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 }\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=\"mt-3 flex flex-col gap-3\">\n <xs-button\n type=\"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 type=\"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" }]
|
|
12081
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"] }] } });
|
|
12082
12082
|
|
|
12083
12083
|
class XSScrollAreaComponent {
|
|
@@ -14179,11 +14179,11 @@ class XSFilterPanelComponent {
|
|
|
14179
14179
|
this.applied.emit();
|
|
14180
14180
|
}
|
|
14181
14181
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSFilterPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
14182
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSFilterPanelComponent, isStandalone: true, selector: "xs-filter-panel", inputs: { show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, externalTranslateService: { classPropertyName: "externalTranslateService", publicName: "externalTranslateService", isSignal: true, isRequired: false, transformFunction: null }, demoItems: { classPropertyName: "demoItems", publicName: "demoItems", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersCount: { classPropertyName: "activeFiltersCount", publicName: "activeFiltersCount", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { show: "showChange", panelClose: "panelClose", applied: "applied", filterChange: "filterChange", clear: "clear" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!embedded() && _demoItems().length > 0) {\n <div\n class=\"p-4 mb-4 rounded-xl bg-zinc-900/50 flex justify-between items-center\"\n >\n <div>\n <p class=\"text-white font-bold text-sm\">\n {{ t('DEMO_TITLE') }}\n </p>\n <p class=\"text-zinc-500 text-xs\">\n {{ t('DEMO_DESCRIPTION') }}\n </p>\n </div>\n <xs-button\n (onClick)=\"show.set(true)\"\n [label]=\"t('OPEN_FILTERS')\"\n variant=\"custom\"\n customClass=\"px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-xl active:scale-95\"\n />\n </div>\n}\n\n@if (show() || embedded()) {\n @if (show() && !embedded()) {\n <div\n class=\"fixed inset-0 z-[9000] bg-black/60 backdrop-blur-sm overlay-fade-in cursor-default\"\n (click)=\"handleClose()\"\n role=\"presentation\"\n ></div>\n <div\n class=\"fixed inset-0 z-[9000] pointer-events-none flex\"\n [class.items-end]=\"layout() === 'bottom-sheet'\"\n [class.justify-center]=\"layout() === 'bottom-sheet'\"\n [class.justify-end]=\"layout() === 'side-panel'\"\n [class.items-stretch]=\"layout() === 'side-panel'\"\n >\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"t('FILTERS')\"\n tabindex=\"-1\"\n class=\"relative w-full overflow-hidden bg-black shadow-2xl flex flex-col cursor-auto pointer-events-auto outline-none\"\n [class.max-w-md]=\"layout() === 'bottom-sheet'\"\n [class.mx-auto]=\"layout() === 'bottom-sheet'\"\n [class.rounded-t-2xl]=\"layout() === 'bottom-sheet'\"\n [class.sheet-slide-up]=\"layout() === 'bottom-sheet'\"\n [class.max-h-[85vh]]=\"layout() === 'bottom-sheet'\"\n [class.h-full]=\"layout() === 'side-panel'\"\n [class.sm:max-w-md]=\"layout() === 'side-panel'\"\n [class.sm:rounded-l-2xl]=\"layout() === 'side-panel'\"\n [class.panel-slide-in]=\"layout() === 'side-panel'\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <div class=\"flex justify-center pt-4 pb-2\">\n <div class=\"w-12 h-1.5 bg-zinc-800 rounded-full\"></div>\n </div>\n\n <div class=\"px-6 py-2 flex justify-between items-center\">\n <h2\n class=\"text-xl font-bold text-white tracking-tight uppercase\"\n >\n {{ t('FILTERS') }}\n </h2>\n <div class=\"flex items-center gap-2\">\n @if (activeFiltersCount() > 0) {\n <xs-button\n (onClick)=\"clear.emit()\"\n [label]=\"capitalize(t('CLEAR'))\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n }\n <xs-button\n (onClick)=\"handleApply()\"\n [label]=\"t('DONE')\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n </section>\n </div>\n } @else if (embedded()) {\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n }\n}\n\n<ng-template #groupsTpl>\n <div\n #scrollContainer\n [class.flex-1]=\"!embedded()\"\n [class.overflow-y-auto]=\"!embedded()\"\n [class.no-scrollbar]=\"!embedded()\"\n class=\"px-4 pt-4 pb-12 space-y-3\"\n >\n @if (searchGroup(); as search) {\n <div class=\"relative\">\n <input\n type=\"text\"\n [value]=\"search.selectedSearchValue || ''\"\n (input)=\"onGlobalSearch($event)\"\n [placeholder]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n [attr.aria-label]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 pl-10 pr-4 text-sm text-white outline-none focus:ring-0 transition-all placeholder:text-zinc-500\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n }\n @for (group of filteredData(); track group.id) {\n <div\n [id]=\"'group-' + group.id\"\n class=\"overflow-hidden rounded-2xl bg-zinc-900/50 transition-all duration-300 filter-group-item border-none\"\n >\n <button\n (click)=\"toggleGroup(group.id)\"\n type=\"button\"\n [attr.aria-expanded]=\"activeGroupId() === group.id\"\n [attr.aria-controls]=\"'group-content-' + group.id\"\n class=\"w-full flex items-center justify-between px-6 py-4 transition-colors border-none\"\n [class]=\"\n activeGroupId() === group.id\n ? 'bg-zinc-900/50'\n : 'bg-transparent hover:bg-black/40 active:bg-black/20'\n \"\n >\n <div\n class=\"flex-1 flex flex-col text-left justify-center h-full\"\n >\n <span\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-[0.15em] leading-none mb-2\"\n >\n {{ t(group.title) }}\n </span>\n <span\n class=\"text-base font-semibold leading-tight\"\n [class.text-white]=\"\n group.selectedId ||\n (group.type === 'dateRange' &&\n (group.dateFrom || group.dateTo))\n \"\n >\n {{\n getSelectedLabel(group) || t('NOT_SELECTED')\n }}\n </span>\n </div>\n <div class=\"flex items-center justify-center pl-4\">\n <div\n class=\"chevron opacity-40\"\n [class.open]=\"activeGroupId() === group.id\"\n ></div>\n </div>\n </button>\n\n <div\n [id]=\"'group-content-' + group.id\"\n class=\"collapsible-content\"\n [class.open]=\"activeGroupId() === group.id\"\n role=\"region\"\n [attr.aria-label]=\"t(group.title)\"\n >\n <div class=\"collapsible-inner\">\n <div class=\"px-2 pb-3 bg-zinc-900/50\">\n <div\n class=\"bg-zinc-900/50 rounded-xl overflow-hidden inner-panel shadow-2xl border-none\"\n >\n @if (activeGroupType() !== 'searchSelect' && activeGroupType() !== 'dateRange') {\n <div class=\"p-3 bg-zinc-900/50\">\n <div class=\"relative\">\n <input\n type=\"text\"\n [ngModel]=\"searchQuery()\"\n (ngModelChange)=\"\n searchQuery.set($event)\n \"\n [placeholder]=\"capitalize(t('SEARCH')) + '...'\"\n [attr.aria-label]=\"capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 rounded-xl py-3 pl-10 pr-4 text-sm text-white focus:ring-0 placeholder:text-zinc-500 transition-all outline-none border-none\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n </div>\n }\n\n <div class=\"flex flex-col\">\n @if (\n group.type === 'select' ||\n group.type === undefined ||\n group.type === 'searchSelect'\n ) {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onSelectOption(group.id, opt.id)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedId === opt.id\n \"\n [class.font-bold]=\"\n group.selectedId === opt.id\n \"\n [class.text-zinc-500]=\"\n group.selectedId !== opt.id\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedId !== opt.id\n \"\n [class.opacity-100]=\"\n group.selectedId === opt.id\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'multiSelect') {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onMultiSelectOption(\n group.id,\n opt.id\n )\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.font-bold]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.text-zinc-500]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.opacity-100]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'boolean') {\n <button\n (click)=\"\n onBooleanToggle(group.id, true)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === true\n \"\n [class.font-bold]=\"\n group.selectedBoolean === true\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== true\n \"\n >{{ capitalize(t('YES')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== true\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === true\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n <button\n (click)=\"\n onBooleanToggle(group.id, false)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === false\n \"\n [class.font-bold]=\"\n group.selectedBoolean === false\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== false\n \"\n >{{ capitalize(t('NO')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== false\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === false\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n\n @if (group.type === 'range') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MIN_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMin ||\n group.minValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'min',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MAX_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMax ||\n group.maxValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'max',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n\n @if (group.type === 'searchSelect') {\n <div class=\"px-6 py-4 bg-zinc-900/50\">\n <input\n type=\"text\"\n [value]=\"\n group.selectedSearchValue || ''\n \"\n (input)=\"\n onSearchChange(group.id, $event)\n \"\n [placeholder]=\"\n group.searchPlaceholder ||\n capitalize(t('SEARCH'))\n \"\n [attr.aria-label]=\"group.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n }\n\n @if (group.type === 'dateRange') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('FROM_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateFrom || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'from',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('TO_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateTo || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'to',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".overlay-fade-in{animation:fadeIn .25s ease-out forwards}.sheet-slide-up{will-change:transform;animation:slideUp .4s cubic-bezier(.32,.72,0,1) forwards}.panel-slide-in{will-change:transform;animation:slideInRight .4s cubic-bezier(.32,.72,0,1) forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.chevron{height:.5rem;width:.5rem;border-right-width:2px;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1));transition:transform .4s cubic-bezier(.33,1,.68,1),border-color .3s ease;transform:rotate(45deg)}.chevron.open{transform:rotate(225deg) translateY(-1px) translate(-1px)}.filter-group-item:has(.collapsible-content.open){border-color:#3f3f4699;box-shadow:0 10px 30px -10px #00000080}.collapsible-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s cubic-bezier(.33,1,.68,1),opacity .3s ease,visibility .3s;visibility:hidden;opacity:0;overflow:hidden}.collapsible-content.open{grid-template-rows:1fr;visibility:visible;opacity:1}.collapsible-inner{min-height:0}.inner-panel{transform:scale(.98) translateY(-5px);transition:transform .4s cubic-bezier(.33,1,.68,1),opacity .4s ease;opacity:0}.collapsible-content.open .inner-panel{transform:scale(1) translateY(0);opacity:1}@media(hover:hover){.active\\:bg-zinc-800\\/50:hover{background-color:#3f3f464d}.active\\:bg-zinc-900\\/40:hover{background-color:#24242780}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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 });
|
|
14182
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.33", type: XSFilterPanelComponent, isStandalone: true, selector: "xs-filter-panel", inputs: { show: { classPropertyName: "show", publicName: "show", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, externalTranslateService: { classPropertyName: "externalTranslateService", publicName: "externalTranslateService", isSignal: true, isRequired: false, transformFunction: null }, demoItems: { classPropertyName: "demoItems", publicName: "demoItems", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, activeFiltersCount: { classPropertyName: "activeFiltersCount", publicName: "activeFiltersCount", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { show: "showChange", panelClose: "panelClose", applied: "applied", filterChange: "filterChange", clear: "clear" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (!embedded() && _demoItems().length > 0) {\n <div\n class=\"p-4 mb-4 rounded-xl bg-zinc-900/50 flex justify-between items-center\"\n >\n <div>\n <p class=\"text-white font-bold text-sm\">\n {{ t('DEMO_TITLE') }}\n </p>\n <p class=\"text-zinc-500 text-xs\">\n {{ t('DEMO_DESCRIPTION') }}\n </p>\n </div>\n <xs-button\n (onClick)=\"show.set(true)\"\n [label]=\"t('OPEN_FILTERS')\"\n variant=\"custom\"\n customClass=\"px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-xl active:scale-95\"\n />\n </div>\n}\n\n@if (show() || embedded()) {\n @if (show() && !embedded()) {\n <div\n class=\"fixed inset-0 z-[9000] bg-black/60 backdrop-blur-sm overlay-fade-in cursor-default\"\n (click)=\"handleClose()\"\n role=\"presentation\"\n ></div>\n <div\n class=\"fixed inset-0 z-[9000] pointer-events-none flex\"\n [class.items-end]=\"layout() === 'bottom-sheet'\"\n [class.justify-center]=\"layout() === 'bottom-sheet'\"\n [class.justify-end]=\"layout() === 'side-panel'\"\n [class.items-stretch]=\"layout() === 'side-panel'\"\n >\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"t('FILTERS')\"\n tabindex=\"-1\"\n class=\"relative w-full overflow-hidden bg-black shadow-2xl flex flex-col cursor-auto pointer-events-auto outline-none\"\n [class.max-w-md]=\"layout() === 'bottom-sheet'\"\n [class.mx-auto]=\"layout() === 'bottom-sheet'\"\n [class.rounded-t-2xl]=\"layout() === 'bottom-sheet'\"\n [class.sheet-slide-up]=\"layout() === 'bottom-sheet'\"\n [class.max-h-[85vh]]=\"layout() === 'bottom-sheet'\"\n [class.h-full]=\"layout() === 'side-panel'\"\n [class.sm:max-w-md]=\"layout() === 'side-panel'\"\n [class.sm:rounded-l-2xl]=\"layout() === 'side-panel'\"\n [class.panel-slide-in]=\"layout() === 'side-panel'\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <div class=\"flex justify-center pt-4 pb-2\">\n <div class=\"w-12 h-1.5 bg-zinc-800 rounded-full\"></div>\n </div>\n\n <div class=\"px-6 py-2 flex justify-between items-center\">\n <h2\n class=\"text-xl font-bold text-white tracking-tight uppercase\"\n >\n {{ t('FILTERS') }}\n </h2>\n <div class=\"flex items-center gap-2\">\n @if (activeFiltersCount() > 0) {\n <xs-button\n (onClick)=\"clear.emit()\"\n [label]=\"capitalize(t('CLEAR'))\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n }\n <xs-button\n (onClick)=\"handleApply()\"\n [label]=\"t('DONE')\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n </section>\n </div>\n } @else if (embedded()) {\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n }\n}\n\n<ng-template #groupsTpl>\n <div\n #scrollContainer\n [class.flex-1]=\"!embedded()\"\n [class.overflow-y-auto]=\"!embedded()\"\n [class.no-scrollbar]=\"!embedded()\"\n class=\"px-4 pt-4 pb-12 space-y-3\"\n >\n @if (searchGroup(); as search) {\n <div class=\"relative\">\n <input\n type=\"text\"\n [value]=\"search.selectedSearchValue || ''\"\n (input)=\"onGlobalSearch($event)\"\n [placeholder]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n [attr.aria-label]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 pl-10 pr-4 text-sm text-white outline-none focus:ring-0 transition-all placeholder:text-zinc-500\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n }\n @for (group of filteredData(); track group.id) {\n <div\n [id]=\"'group-' + group.id\"\n class=\"overflow-hidden rounded-2xl bg-zinc-900/50 transition-all duration-300 filter-group-item border-none\"\n >\n <button\n (click)=\"toggleGroup(group.id)\"\n type=\"button\"\n [attr.aria-expanded]=\"activeGroupId() === group.id\"\n [attr.aria-controls]=\"'group-content-' + group.id\"\n class=\"w-full flex items-center justify-between px-6 py-4 transition-colors border-none\"\n [class]=\"\n activeGroupId() === group.id\n ? 'bg-zinc-900/50'\n : 'bg-transparent hover:bg-black/40 active:bg-black/20'\n \"\n >\n <div\n class=\"flex-1 flex flex-col text-left justify-center h-full\"\n >\n <span\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-[0.15em] leading-none mb-2\"\n >\n {{ t(group.title) }}\n </span>\n <span\n class=\"text-base font-semibold leading-tight\"\n [class.text-white]=\"\n group.selectedId ||\n (group.type === 'dateRange' &&\n (group.dateFrom || group.dateTo))\n \"\n >\n {{\n getSelectedLabel(group) || t('NOT_SELECTED')\n }}\n </span>\n </div>\n <div class=\"flex items-center justify-center pl-4\">\n <div\n class=\"chevron opacity-40\"\n [class.open]=\"activeGroupId() === group.id\"\n ></div>\n </div>\n </button>\n\n <div\n [id]=\"'group-content-' + group.id\"\n class=\"collapsible-content\"\n [class.open]=\"activeGroupId() === group.id\"\n role=\"region\"\n [attr.aria-label]=\"t(group.title)\"\n >\n <div class=\"collapsible-inner\">\n <div class=\"px-2 pb-3 bg-zinc-900/50\">\n <div\n class=\"bg-zinc-900/50 rounded-xl overflow-hidden inner-panel shadow-2xl border-none\"\n >\n @if (activeGroupType() !== 'searchSelect' && activeGroupType() !== 'dateRange') {\n <div class=\"p-3 bg-zinc-900/50\">\n <div class=\"relative\">\n <input\n type=\"text\"\n [ngModel]=\"searchQuery()\"\n (ngModelChange)=\"\n searchQuery.set($event)\n \"\n [placeholder]=\"capitalize(t('SEARCH')) + '...'\"\n [attr.aria-label]=\"capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 rounded-xl py-3 pl-10 pr-4 text-sm text-white focus:ring-0 placeholder:text-zinc-500 transition-all outline-none border-none\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n </div>\n }\n\n <div class=\"flex flex-col filter-options-list\">\n @if (\n group.type === 'select' ||\n group.type === undefined ||\n group.type === 'searchSelect'\n ) {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onSelectOption(group.id, opt.id)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedId === opt.id\n \"\n [class.font-bold]=\"\n group.selectedId === opt.id\n \"\n [class.text-zinc-500]=\"\n group.selectedId !== opt.id\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedId !== opt.id\n \"\n [class.opacity-100]=\"\n group.selectedId === opt.id\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'multiSelect') {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onMultiSelectOption(\n group.id,\n opt.id\n )\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.font-bold]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.text-zinc-500]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.opacity-100]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'boolean') {\n <button\n (click)=\"\n onBooleanToggle(group.id, true)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === true\n \"\n [class.font-bold]=\"\n group.selectedBoolean === true\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== true\n \"\n >{{ capitalize(t('YES')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== true\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === true\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n <button\n (click)=\"\n onBooleanToggle(group.id, false)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === false\n \"\n [class.font-bold]=\"\n group.selectedBoolean === false\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== false\n \"\n >{{ capitalize(t('NO')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== false\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === false\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n\n @if (group.type === 'range') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MIN_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMin ||\n group.minValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'min',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MAX_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMax ||\n group.maxValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'max',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n\n @if (group.type === 'searchSelect') {\n <div class=\"px-6 py-4 bg-zinc-900/50\">\n <input\n type=\"text\"\n [value]=\"\n group.selectedSearchValue || ''\n \"\n (input)=\"\n onSearchChange(group.id, $event)\n \"\n [placeholder]=\"\n group.searchPlaceholder ||\n capitalize(t('SEARCH'))\n \"\n [attr.aria-label]=\"group.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n }\n\n @if (group.type === 'dateRange') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('FROM_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateFrom || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'from',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('TO_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateTo || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'to',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".overlay-fade-in{animation:fadeIn .25s ease-out forwards}.sheet-slide-up{will-change:transform;animation:slideUp .4s cubic-bezier(.32,.72,0,1) forwards}.panel-slide-in{will-change:transform;animation:slideInRight .4s cubic-bezier(.32,.72,0,1) forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.chevron{height:.5rem;width:.5rem;border-right-width:2px;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1));transition:transform .4s cubic-bezier(.33,1,.68,1),border-color .3s ease;transform:rotate(45deg)}.chevron.open{transform:rotate(225deg) translateY(-1px) translate(-1px)}.filter-group-item:has(.collapsible-content.open){border-color:#3f3f4699;box-shadow:0 10px 30px -10px #00000080}.collapsible-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s cubic-bezier(.33,1,.68,1),opacity .3s ease,visibility .3s;visibility:hidden;opacity:0;overflow:hidden}.collapsible-content.open{grid-template-rows:1fr;visibility:visible;opacity:1}.collapsible-inner{min-height:0}.filter-options-list{max-height:16rem;overflow-y:auto}.inner-panel{transform:scale(.98) translateY(-5px);transition:transform .4s cubic-bezier(.33,1,.68,1),opacity .4s ease;opacity:0}.collapsible-content.open .inner-panel{transform:scale(1) translateY(0);opacity:1}@media(hover:hover){.active\\:bg-zinc-800\\/50:hover{background-color:#3f3f464d}.active\\:bg-zinc-900\\/40:hover{background-color:#24242780}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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 });
|
|
14183
14183
|
}
|
|
14184
14184
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.33", ngImport: i0, type: XSFilterPanelComponent, decorators: [{
|
|
14185
14185
|
type: Component,
|
|
14186
|
-
args: [{ selector: 'xs-filter-panel', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!embedded() && _demoItems().length > 0) {\n <div\n class=\"p-4 mb-4 rounded-xl bg-zinc-900/50 flex justify-between items-center\"\n >\n <div>\n <p class=\"text-white font-bold text-sm\">\n {{ t('DEMO_TITLE') }}\n </p>\n <p class=\"text-zinc-500 text-xs\">\n {{ t('DEMO_DESCRIPTION') }}\n </p>\n </div>\n <xs-button\n (onClick)=\"show.set(true)\"\n [label]=\"t('OPEN_FILTERS')\"\n variant=\"custom\"\n customClass=\"px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-xl active:scale-95\"\n />\n </div>\n}\n\n@if (show() || embedded()) {\n @if (show() && !embedded()) {\n <div\n class=\"fixed inset-0 z-[9000] bg-black/60 backdrop-blur-sm overlay-fade-in cursor-default\"\n (click)=\"handleClose()\"\n role=\"presentation\"\n ></div>\n <div\n class=\"fixed inset-0 z-[9000] pointer-events-none flex\"\n [class.items-end]=\"layout() === 'bottom-sheet'\"\n [class.justify-center]=\"layout() === 'bottom-sheet'\"\n [class.justify-end]=\"layout() === 'side-panel'\"\n [class.items-stretch]=\"layout() === 'side-panel'\"\n >\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"t('FILTERS')\"\n tabindex=\"-1\"\n class=\"relative w-full overflow-hidden bg-black shadow-2xl flex flex-col cursor-auto pointer-events-auto outline-none\"\n [class.max-w-md]=\"layout() === 'bottom-sheet'\"\n [class.mx-auto]=\"layout() === 'bottom-sheet'\"\n [class.rounded-t-2xl]=\"layout() === 'bottom-sheet'\"\n [class.sheet-slide-up]=\"layout() === 'bottom-sheet'\"\n [class.max-h-[85vh]]=\"layout() === 'bottom-sheet'\"\n [class.h-full]=\"layout() === 'side-panel'\"\n [class.sm:max-w-md]=\"layout() === 'side-panel'\"\n [class.sm:rounded-l-2xl]=\"layout() === 'side-panel'\"\n [class.panel-slide-in]=\"layout() === 'side-panel'\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <div class=\"flex justify-center pt-4 pb-2\">\n <div class=\"w-12 h-1.5 bg-zinc-800 rounded-full\"></div>\n </div>\n\n <div class=\"px-6 py-2 flex justify-between items-center\">\n <h2\n class=\"text-xl font-bold text-white tracking-tight uppercase\"\n >\n {{ t('FILTERS') }}\n </h2>\n <div class=\"flex items-center gap-2\">\n @if (activeFiltersCount() > 0) {\n <xs-button\n (onClick)=\"clear.emit()\"\n [label]=\"capitalize(t('CLEAR'))\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n }\n <xs-button\n (onClick)=\"handleApply()\"\n [label]=\"t('DONE')\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n </section>\n </div>\n } @else if (embedded()) {\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n }\n}\n\n<ng-template #groupsTpl>\n <div\n #scrollContainer\n [class.flex-1]=\"!embedded()\"\n [class.overflow-y-auto]=\"!embedded()\"\n [class.no-scrollbar]=\"!embedded()\"\n class=\"px-4 pt-4 pb-12 space-y-3\"\n >\n @if (searchGroup(); as search) {\n <div class=\"relative\">\n <input\n type=\"text\"\n [value]=\"search.selectedSearchValue || ''\"\n (input)=\"onGlobalSearch($event)\"\n [placeholder]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n [attr.aria-label]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 pl-10 pr-4 text-sm text-white outline-none focus:ring-0 transition-all placeholder:text-zinc-500\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n }\n @for (group of filteredData(); track group.id) {\n <div\n [id]=\"'group-' + group.id\"\n class=\"overflow-hidden rounded-2xl bg-zinc-900/50 transition-all duration-300 filter-group-item border-none\"\n >\n <button\n (click)=\"toggleGroup(group.id)\"\n type=\"button\"\n [attr.aria-expanded]=\"activeGroupId() === group.id\"\n [attr.aria-controls]=\"'group-content-' + group.id\"\n class=\"w-full flex items-center justify-between px-6 py-4 transition-colors border-none\"\n [class]=\"\n activeGroupId() === group.id\n ? 'bg-zinc-900/50'\n : 'bg-transparent hover:bg-black/40 active:bg-black/20'\n \"\n >\n <div\n class=\"flex-1 flex flex-col text-left justify-center h-full\"\n >\n <span\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-[0.15em] leading-none mb-2\"\n >\n {{ t(group.title) }}\n </span>\n <span\n class=\"text-base font-semibold leading-tight\"\n [class.text-white]=\"\n group.selectedId ||\n (group.type === 'dateRange' &&\n (group.dateFrom || group.dateTo))\n \"\n >\n {{\n getSelectedLabel(group) || t('NOT_SELECTED')\n }}\n </span>\n </div>\n <div class=\"flex items-center justify-center pl-4\">\n <div\n class=\"chevron opacity-40\"\n [class.open]=\"activeGroupId() === group.id\"\n ></div>\n </div>\n </button>\n\n <div\n [id]=\"'group-content-' + group.id\"\n class=\"collapsible-content\"\n [class.open]=\"activeGroupId() === group.id\"\n role=\"region\"\n [attr.aria-label]=\"t(group.title)\"\n >\n <div class=\"collapsible-inner\">\n <div class=\"px-2 pb-3 bg-zinc-900/50\">\n <div\n class=\"bg-zinc-900/50 rounded-xl overflow-hidden inner-panel shadow-2xl border-none\"\n >\n @if (activeGroupType() !== 'searchSelect' && activeGroupType() !== 'dateRange') {\n <div class=\"p-3 bg-zinc-900/50\">\n <div class=\"relative\">\n <input\n type=\"text\"\n [ngModel]=\"searchQuery()\"\n (ngModelChange)=\"\n searchQuery.set($event)\n \"\n [placeholder]=\"capitalize(t('SEARCH')) + '...'\"\n [attr.aria-label]=\"capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 rounded-xl py-3 pl-10 pr-4 text-sm text-white focus:ring-0 placeholder:text-zinc-500 transition-all outline-none border-none\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n </div>\n }\n\n <div class=\"flex flex-col\">\n @if (\n group.type === 'select' ||\n group.type === undefined ||\n group.type === 'searchSelect'\n ) {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onSelectOption(group.id, opt.id)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedId === opt.id\n \"\n [class.font-bold]=\"\n group.selectedId === opt.id\n \"\n [class.text-zinc-500]=\"\n group.selectedId !== opt.id\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedId !== opt.id\n \"\n [class.opacity-100]=\"\n group.selectedId === opt.id\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'multiSelect') {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onMultiSelectOption(\n group.id,\n opt.id\n )\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.font-bold]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.text-zinc-500]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.opacity-100]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'boolean') {\n <button\n (click)=\"\n onBooleanToggle(group.id, true)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === true\n \"\n [class.font-bold]=\"\n group.selectedBoolean === true\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== true\n \"\n >{{ capitalize(t('YES')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== true\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === true\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n <button\n (click)=\"\n onBooleanToggle(group.id, false)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === false\n \"\n [class.font-bold]=\"\n group.selectedBoolean === false\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== false\n \"\n >{{ capitalize(t('NO')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== false\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === false\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n\n @if (group.type === 'range') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MIN_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMin ||\n group.minValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'min',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MAX_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMax ||\n group.maxValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'max',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n\n @if (group.type === 'searchSelect') {\n <div class=\"px-6 py-4 bg-zinc-900/50\">\n <input\n type=\"text\"\n [value]=\"\n group.selectedSearchValue || ''\n \"\n (input)=\"\n onSearchChange(group.id, $event)\n \"\n [placeholder]=\"\n group.searchPlaceholder ||\n capitalize(t('SEARCH'))\n \"\n [attr.aria-label]=\"group.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n }\n\n @if (group.type === 'dateRange') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('FROM_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateFrom || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'from',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('TO_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateTo || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'to',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".overlay-fade-in{animation:fadeIn .25s ease-out forwards}.sheet-slide-up{will-change:transform;animation:slideUp .4s cubic-bezier(.32,.72,0,1) forwards}.panel-slide-in{will-change:transform;animation:slideInRight .4s cubic-bezier(.32,.72,0,1) forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.chevron{height:.5rem;width:.5rem;border-right-width:2px;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1));transition:transform .4s cubic-bezier(.33,1,.68,1),border-color .3s ease;transform:rotate(45deg)}.chevron.open{transform:rotate(225deg) translateY(-1px) translate(-1px)}.filter-group-item:has(.collapsible-content.open){border-color:#3f3f4699;box-shadow:0 10px 30px -10px #00000080}.collapsible-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s cubic-bezier(.33,1,.68,1),opacity .3s ease,visibility .3s;visibility:hidden;opacity:0;overflow:hidden}.collapsible-content.open{grid-template-rows:1fr;visibility:visible;opacity:1}.collapsible-inner{min-height:0}.inner-panel{transform:scale(.98) translateY(-5px);transition:transform .4s cubic-bezier(.33,1,.68,1),opacity .4s ease;opacity:0}.collapsible-content.open .inner-panel{transform:scale(1) translateY(0);opacity:1}@media(hover:hover){.active\\:bg-zinc-800\\/50:hover{background-color:#3f3f464d}.active\\:bg-zinc-900\\/40:hover{background-color:#24242780}}\n"] }]
|
|
14186
|
+
args: [{ selector: 'xs-filter-panel', standalone: true, imports: [CommonModule, FormsModule, XSButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!embedded() && _demoItems().length > 0) {\n <div\n class=\"p-4 mb-4 rounded-xl bg-zinc-900/50 flex justify-between items-center\"\n >\n <div>\n <p class=\"text-white font-bold text-sm\">\n {{ t('DEMO_TITLE') }}\n </p>\n <p class=\"text-zinc-500 text-xs\">\n {{ t('DEMO_DESCRIPTION') }}\n </p>\n </div>\n <xs-button\n (onClick)=\"show.set(true)\"\n [label]=\"t('OPEN_FILTERS')\"\n variant=\"custom\"\n customClass=\"px-4 py-2 bg-blue-600 text-white text-sm font-semibold rounded-xl active:scale-95\"\n />\n </div>\n}\n\n@if (show() || embedded()) {\n @if (show() && !embedded()) {\n <div\n class=\"fixed inset-0 z-[9000] bg-black/60 backdrop-blur-sm overlay-fade-in cursor-default\"\n (click)=\"handleClose()\"\n role=\"presentation\"\n ></div>\n <div\n class=\"fixed inset-0 z-[9000] pointer-events-none flex\"\n [class.items-end]=\"layout() === 'bottom-sheet'\"\n [class.justify-center]=\"layout() === 'bottom-sheet'\"\n [class.justify-end]=\"layout() === 'side-panel'\"\n [class.items-stretch]=\"layout() === 'side-panel'\"\n >\n <section\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"t('FILTERS')\"\n tabindex=\"-1\"\n class=\"relative w-full overflow-hidden bg-black shadow-2xl flex flex-col cursor-auto pointer-events-auto outline-none\"\n [class.max-w-md]=\"layout() === 'bottom-sheet'\"\n [class.mx-auto]=\"layout() === 'bottom-sheet'\"\n [class.rounded-t-2xl]=\"layout() === 'bottom-sheet'\"\n [class.sheet-slide-up]=\"layout() === 'bottom-sheet'\"\n [class.max-h-[85vh]]=\"layout() === 'bottom-sheet'\"\n [class.h-full]=\"layout() === 'side-panel'\"\n [class.sm:max-w-md]=\"layout() === 'side-panel'\"\n [class.sm:rounded-l-2xl]=\"layout() === 'side-panel'\"\n [class.panel-slide-in]=\"layout() === 'side-panel'\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\"\n >\n <div class=\"flex justify-center pt-4 pb-2\">\n <div class=\"w-12 h-1.5 bg-zinc-800 rounded-full\"></div>\n </div>\n\n <div class=\"px-6 py-2 flex justify-between items-center\">\n <h2\n class=\"text-xl font-bold text-white tracking-tight uppercase\"\n >\n {{ t('FILTERS') }}\n </h2>\n <div class=\"flex items-center gap-2\">\n @if (activeFiltersCount() > 0) {\n <xs-button\n (onClick)=\"clear.emit()\"\n [label]=\"capitalize(t('CLEAR'))\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n }\n <xs-button\n (onClick)=\"handleApply()\"\n [label]=\"t('DONE')\"\n layout=\"mini\"\n variant=\"custom\"\n customClass=\"text-zinc-400 hover:text-white text-sm font-medium p-2 uppercase\"\n />\n </div>\n </div>\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n </section>\n </div>\n } @else if (embedded()) {\n <ng-container *ngTemplateOutlet=\"groupsTpl\" />\n }\n}\n\n<ng-template #groupsTpl>\n <div\n #scrollContainer\n [class.flex-1]=\"!embedded()\"\n [class.overflow-y-auto]=\"!embedded()\"\n [class.no-scrollbar]=\"!embedded()\"\n class=\"px-4 pt-4 pb-12 space-y-3\"\n >\n @if (searchGroup(); as search) {\n <div class=\"relative\">\n <input\n type=\"text\"\n [value]=\"search.selectedSearchValue || ''\"\n (input)=\"onGlobalSearch($event)\"\n [placeholder]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n [attr.aria-label]=\"search.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 pl-10 pr-4 text-sm text-white outline-none focus:ring-0 transition-all placeholder:text-zinc-500\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n }\n @for (group of filteredData(); track group.id) {\n <div\n [id]=\"'group-' + group.id\"\n class=\"overflow-hidden rounded-2xl bg-zinc-900/50 transition-all duration-300 filter-group-item border-none\"\n >\n <button\n (click)=\"toggleGroup(group.id)\"\n type=\"button\"\n [attr.aria-expanded]=\"activeGroupId() === group.id\"\n [attr.aria-controls]=\"'group-content-' + group.id\"\n class=\"w-full flex items-center justify-between px-6 py-4 transition-colors border-none\"\n [class]=\"\n activeGroupId() === group.id\n ? 'bg-zinc-900/50'\n : 'bg-transparent hover:bg-black/40 active:bg-black/20'\n \"\n >\n <div\n class=\"flex-1 flex flex-col text-left justify-center h-full\"\n >\n <span\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-[0.15em] leading-none mb-2\"\n >\n {{ t(group.title) }}\n </span>\n <span\n class=\"text-base font-semibold leading-tight\"\n [class.text-white]=\"\n group.selectedId ||\n (group.type === 'dateRange' &&\n (group.dateFrom || group.dateTo))\n \"\n >\n {{\n getSelectedLabel(group) || t('NOT_SELECTED')\n }}\n </span>\n </div>\n <div class=\"flex items-center justify-center pl-4\">\n <div\n class=\"chevron opacity-40\"\n [class.open]=\"activeGroupId() === group.id\"\n ></div>\n </div>\n </button>\n\n <div\n [id]=\"'group-content-' + group.id\"\n class=\"collapsible-content\"\n [class.open]=\"activeGroupId() === group.id\"\n role=\"region\"\n [attr.aria-label]=\"t(group.title)\"\n >\n <div class=\"collapsible-inner\">\n <div class=\"px-2 pb-3 bg-zinc-900/50\">\n <div\n class=\"bg-zinc-900/50 rounded-xl overflow-hidden inner-panel shadow-2xl border-none\"\n >\n @if (activeGroupType() !== 'searchSelect' && activeGroupType() !== 'dateRange') {\n <div class=\"p-3 bg-zinc-900/50\">\n <div class=\"relative\">\n <input\n type=\"text\"\n [ngModel]=\"searchQuery()\"\n (ngModelChange)=\"\n searchQuery.set($event)\n \"\n [placeholder]=\"capitalize(t('SEARCH')) + '...'\"\n [attr.aria-label]=\"capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 rounded-xl py-3 pl-10 pr-4 text-sm text-white focus:ring-0 placeholder:text-zinc-500 transition-all outline-none border-none\"\n />\n <span\n class=\"absolute left-3 top-3 opacity-40 text-sm\"\n aria-hidden=\"true\"\n >\uD83D\uDD0D</span\n >\n </div>\n </div>\n }\n\n <div class=\"flex flex-col filter-options-list\">\n @if (\n group.type === 'select' ||\n group.type === undefined ||\n group.type === 'searchSelect'\n ) {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onSelectOption(group.id, opt.id)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedId === opt.id\n \"\n [class.font-bold]=\"\n group.selectedId === opt.id\n \"\n [class.text-zinc-500]=\"\n group.selectedId !== opt.id\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedId !== opt.id\n \"\n [class.opacity-100]=\"\n group.selectedId === opt.id\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'multiSelect') {\n @for (\n opt of group.options;\n track $index\n ) {\n <button\n (click)=\"\n onMultiSelectOption(\n group.id,\n opt.id\n )\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50 group/opt\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.font-bold]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.text-zinc-500]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n >\n {{ capitalize(t(opt.label)) }}\n </span>\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n !group.selectedIds?.includes(\n opt.id\n )\n \"\n [class.opacity-100]=\"\n group.selectedIds?.includes(\n opt.id\n )\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n }\n\n @if (group.type === 'boolean') {\n <button\n (click)=\"\n onBooleanToggle(group.id, true)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === true\n \"\n [class.font-bold]=\"\n group.selectedBoolean === true\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== true\n \"\n >{{ capitalize(t('YES')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== true\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === true\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n <button\n (click)=\"\n onBooleanToggle(group.id, false)\n \"\n type=\"button\"\n class=\"w-full flex items-center justify-between px-6 py-4 text-sm border-none bg-transparent transition-all hover:bg-zinc-900/50 active:bg-zinc-900/50\"\n >\n <span\n class=\"transition-colors duration-200\"\n [class.text-white]=\"\n group.selectedBoolean === false\n \"\n [class.font-bold]=\"\n group.selectedBoolean === false\n \"\n [class.text-zinc-500]=\"\n group.selectedBoolean !== false\n \"\n >{{ capitalize(t('NO')) }}</span\n >\n <div\n class=\"flex items-center justify-center w-5 h-5\"\n >\n <div\n [class.opacity-0]=\"\n group.selectedBoolean !== false\n \"\n [class.opacity-100]=\"\n group.selectedBoolean === false\n \"\n class=\"w-2.5 h-2.5 rounded-full bg-red-500 transition-opacity duration-200\"\n ></div>\n </div>\n </button>\n }\n\n @if (group.type === 'range') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MIN_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMin ||\n group.minValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'min',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >\n {{ t('MAX_VALUE') }}\n </label>\n <input\n type=\"number\"\n [value]=\"\n group.selectedMax ||\n group.maxValue ||\n ''\n \"\n (input)=\"\n onRangeChange(\n group.id,\n 'max',\n $event\n )\n \"\n [min]=\"group.minValue\"\n [max]=\"group.maxValue\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n\n @if (group.type === 'searchSelect') {\n <div class=\"px-6 py-4 bg-zinc-900/50\">\n <input\n type=\"text\"\n [value]=\"\n group.selectedSearchValue || ''\n \"\n (input)=\"\n onSearchChange(group.id, $event)\n \"\n [placeholder]=\"\n group.searchPlaceholder ||\n capitalize(t('SEARCH'))\n \"\n [attr.aria-label]=\"group.searchPlaceholder || capitalize(t('SEARCH'))\"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n }\n\n @if (group.type === 'dateRange') {\n <div\n class=\"px-6 py-4 space-y-4 bg-zinc-900/50\"\n >\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('FROM_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateFrom || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'from',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n <div class=\"space-y-2\">\n <label\n class=\"text-[10px] font-bold text-zinc-500 uppercase tracking-widest pl-1\"\n >{{ t('TO_DATE') }}</label\n >\n <input\n type=\"date\"\n [value]=\"group.dateTo || ''\"\n (change)=\"\n onDateChange(\n group.id,\n 'to',\n $event\n )\n \"\n class=\"w-full bg-zinc-900/50 border-none rounded-xl py-3 px-4 text-sm text-white outline-none focus:ring-0 transition-all\"\n />\n </div>\n </div>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n</ng-template>\n", styles: [".overlay-fade-in{animation:fadeIn .25s ease-out forwards}.sheet-slide-up{will-change:transform;animation:slideUp .4s cubic-bezier(.32,.72,0,1) forwards}.panel-slide-in{will-change:transform;animation:slideInRight .4s cubic-bezier(.32,.72,0,1) forwards}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes slideUp{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideInRight{0%{transform:translate(100%)}to{transform:translate(0)}}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.chevron{height:.5rem;width:.5rem;border-right-width:2px;border-bottom-width:2px;--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1));transition:transform .4s cubic-bezier(.33,1,.68,1),border-color .3s ease;transform:rotate(45deg)}.chevron.open{transform:rotate(225deg) translateY(-1px) translate(-1px)}.filter-group-item:has(.collapsible-content.open){border-color:#3f3f4699;box-shadow:0 10px 30px -10px #00000080}.collapsible-content{display:grid;grid-template-rows:0fr;transition:grid-template-rows .4s cubic-bezier(.33,1,.68,1),opacity .3s ease,visibility .3s;visibility:hidden;opacity:0;overflow:hidden}.collapsible-content.open{grid-template-rows:1fr;visibility:visible;opacity:1}.collapsible-inner{min-height:0}.filter-options-list{max-height:16rem;overflow-y:auto}.inner-panel{transform:scale(.98) translateY(-5px);transition:transform .4s cubic-bezier(.33,1,.68,1),opacity .4s ease;opacity:0}.collapsible-content.open .inner-panel{transform:scale(1) translateY(0);opacity:1}@media(hover:hover){.active\\:bg-zinc-800\\/50:hover{background-color:#3f3f464d}.active\\:bg-zinc-900\\/40:hover{background-color:#24242780}}\n"] }]
|
|
14187
14187
|
}], ctorParameters: () => [], propDecorators: { scrollContainer: [{ type: i0.ViewChild, args: ['scrollContainer', { isSignal: true }] }], show: [{ type: i0.Input, args: [{ isSignal: true, alias: "show", required: false }] }, { type: i0.Output, args: ["showChange"] }], embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }], externalTranslateService: [{ type: i0.Input, args: [{ isSignal: true, alias: "externalTranslateService", required: false }] }], demoItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "demoItems", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], activeFiltersCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "activeFiltersCount", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], panelClose: [{ type: i0.Output, args: ["panelClose"] }], applied: [{ type: i0.Output, args: ["applied"] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], clear: [{ type: i0.Output, args: ["clear"] }] } });
|
|
14188
14188
|
|
|
14189
14189
|
var MENU_LABEL$1 = "Menú";
|