@social-mail/social-mail-client 1.2.355 → 1.2.357

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.
@@ -2539,7 +2539,7 @@ html, body {
2539
2539
  }
2540
2540
  }
2541
2541
  }
2542
- `.installLocal();_export("default",SignupPage=class SignupPage extends ContentPage{constructor(){super(...arguments);this.termsAgreed=false;this.model={name:"",username:"",password:"",passwordAgain:"",phoneNumber:"",country:"US",phoneNumberText:"",captcha:{code:""},phone:{code:""}}}init(){return __awaiter(this,void 0,void 0,(function*(){this.hideToolbar=true;this.element.className=css;this.title="Social Mail Signup";const{id}=yield FetchBuilder.put("/api/users/captcha").responseAsJson();this.model.captcha.id=id;this.renderer=XNode.create("div",null,XNode.create("div",null,XNode.create("div",{"data-max-width":"size-large"},XNode.create(Form,null,XNode.create(FormField,{label:"Your Name"},XNode.create("input",{autofocus:true,placeholder:"Display Name",value:Bind.twoWaysImmediate((()=>this.model.name))})),XNode.create(FormField,{label:"Email Address"},XNode.create("div",{"data-layout":"row","data-padding":"auto"},XNode.create("input",{"data-border":"none",placeholder:"first-last-name",style:"outline: none",type:"text",value:Bind.twoWaysImmediate((()=>this.model.username))}),XNode.create("span",{text:"@socialmail.me"}))),XNode.create("details",null,XNode.create("summary",null,"Username Policy"),"Please choose username that resembles your real legal name. Any other name will be banned and blocked permanently. And you will not be able to create new username with same phone number as well."),XNode.create(FormField,{label:"Password"},XNode.create("input",{type:"password",value:Bind.twoWaysImmediate((()=>this.model.password))})),XNode.create(FormField,{label:"Password Again"},XNode.create("input",{type:"password",value:Bind.twoWaysImmediate((()=>this.model.passwordAgain))})),XNode.create(FormField,{label:"Phone Number"},XNode.create("div",{"data-layout":"row"},XNode.create(CountrySelect,{value:Bind.twoWaysImmediate((()=>this.model.country))}),XNode.create(MaskedInput,{"data-mask":Bind.oneWayAsync((()=>formatForCountry(this.model.country))),value:Bind.twoWaysImmediate((()=>this.model.phoneNumberText))}))),XNode.create("div",null,"We require phone number verification to prevent misuse and fraud over the email. And it will also help you in setting up two factor authentication to prevent hackers from accessing your private emails."),XNode.create("br",null),XNode.create("br",null),XNode.create(FormField,{label:"Captcha"},XNode.create("img",{src:`/api/users/captcha/${id}`})),XNode.create(FormField,{label:"Enter 5 Digit Code"},XNode.create("input",{type:"tel",value:Bind.twoWaysImmediate((()=>this.model.captcha.code))})),XNode.create("div",{"data-layout":"row"},XNode.create("input",{type:"checkbox",checked:Bind.twoWaysImmediate((()=>this.termsAgreed))}),XNode.create("span",{text:"I agree the "}),XNode.create("a",{href:"https://socialmail.in/terms.html",target:"_blank"},"Terms & Conditions")),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"signup"},"Signup"))))))}))}signup(){return __awaiter(this,void 0,void 0,(function*(){const{model}=this;if(!this.termsAgreed){throw new Error("You must agree to Terms & Conditions.")}if(!model.password){throw new Error("Password is required")}if(model.password.length<7){throw new Error("Password is cannot be less than 7 characters")}if(/\s/i.test(model.password)){throw new Error("Password must not any whitespace characters")}const isdCode=yield isdForCountry(model.country);const phoneNumber=model.phoneNumberText.replace(/[^0-9]/g,"");model.phoneNumber=isdCode.startsWith("+")?isdCode+phoneNumber:`+${isdCode}${phoneNumber}`;const{userID,phone={},captcha={}}=yield FetchBuilder.post("/api/users/signup").jsonBody(model).responseAsJson();if(userID){location.href="/";return}if(captcha){model.captcha.verified=captcha.verified}if(phone===null||phone===void 0?void 0:phone.verified){model.phone.verified=phone.verified}if(phone===null||phone===void 0?void 0:phone.id){model.phone.id=phone.id;model.phone.smsConfig=phone.smsConfig;yield this.askPhoneCode()}}))}askPhoneCode(){return __awaiter(this,void 0,void 0,(function*(){this.renderer=XNode.create("div",null,XNode.create("div",null,XNode.create("div",{"data-max-width":"size-large"},XNode.create(QRCodeControl,{smsConfig:this.model.phone.smsConfig}))));do{yield sleep(5e3);yield this.signup()}while(true)}))}});__decorate([Action({onEvent:"signup"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],SignupPage.prototype,"signup",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/users/SignupPage");System.register([],(function(_export,_context){"use strict";var FileTypes;_export("default",void 0);return{setters:[],execute:function(){_export("default",FileTypes=class FileTypes{static canPreview(file){if(/(image|video|audio)\//.test(file.contentType)){return true}return/\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt)$/i.test(file.name)}static isMedia(file){return/^(audio|video)\//i.test(file.contentType)}static isImage(file){return/^image\//i.test(file.contentType)||/\.(jpg|png|bmp|gif|tif|tiff|jiff|jpg)$/i.test(file.name)}static isDocument(file){return/\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt|md)$/i.test(file.name)}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/FileTypes");System.register(["@web-atoms/core/dist/core/Command","../../common/commands/CommonCommands","../../services/FileTypes"],(function(_export,_context){"use strict";var Command,CommonCommands,FileTypes,AppCommands;_export("default",void 0);return{setters:[function(_webAtomsCoreDistCoreCommand){Command=_webAtomsCoreDistCoreCommand.default},function(_commonCommandsCommonCommands){CommonCommands=_commonCommandsCommonCommands.default},function(_servicesFileTypes){FileTypes=_servicesFileTypes.default}],execute:function(){_export("default",AppCommands=class AppCommands extends CommonCommands{static getPreviewCommand(p){if(FileTypes.isDocument(p)){return this.previewPdf}if(FileTypes.isImage(p)){return this.previewImage}if(FileTypes.isMedia(p)){return this.previewMedia}}});AppCommands.openHome=Command.create({route:"/",routeOrder:200,openPage:()=>_context.import("../page/home/HomePage")});AppCommands.openMailboxList=Command.create({route:"/mailboxes",routeOrder:100,openPage:()=>_context.import("../../common/pages/mailboxes/MailboxListPage")});AppCommands.openMails=Command.create({route:"/mails",routeOrder:100,openPage:()=>_context.import("../page/mails/MailboxContacts")});AppCommands.openFiles=Command.create({route:"/files/{id}",routeOrder:100,openPage:()=>_context.import("../page/files/FolderPage")});AppCommands.openTemplates=Command.create({route:"/templates",routeOrder:100,routeDefaults:{templates:true},openPage:()=>_context.import("../page/files/FolderPage")});AppCommands.previewImage=Command.create({route:"/social-mail/file-preview/image/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/image/PreviewImage")});AppCommands.previewHtml=Command.create({route:"/social-mail/file-preview/html/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/document/PreviewDocument")});AppCommands.previewPdf=Command.create({route:"/social-mail/file-preview/pdf/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/document/PreviewPDF")});AppCommands.previewMedia=Command.create({route:"/social-mail/file-preview/media/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/media/PreviewMedia")});AppCommands.signup=Command.create({route:"/social-mail/users/signup",openPage:()=>_context.import("../page/users/SignupPage")})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/commands/AppCommands");System.register(["@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/style/styled","../../NumberFormats","../../../web/commands/AppCommands","@social-mail/social-mail-client/content/icons/audio.svg","../../apiPath"],(function(_export,_context){"use strict";var XNode,styled,toFileSize,AppCommands,audioIcon,apiPath;function FilePreview(a){const size=a.fileSize&&toFileSize(a.fileSize);const{appFileID,name,fileContentID}=a;let src=apiPath(`/api/files/webp(300)/${appFileID}/${fileContentID}/${name}/${name}.300.webp`);const p={appFileID,name,fileContentID};if(/^audio\//i.test(a.contentType)){src=audioIcon}const command=AppCommands.getPreviewCommand(a);if(command){return XNode.create("a",{href:command.displayRoute(p),"data-click-event":"route",title:size?`${name} (${size})`:name,"data-file-preview":"file-preview"},XNode.create("img",{"data-element":"preview",src}),XNode.create("label",{"data-element":"file-name"},name))}return XNode.create("a",{href:a.downloadUrl,title:size?`${name} (${size})`:name,target:"_blank","data-file-preview":"attachment"},XNode.create("i",{class:"fas fa-paperclip"}),XNode.create("label",{"data-element":"file-name"},name))}_export("default",FilePreview);return{setters:[function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_NumberFormats){toFileSize=_NumberFormats.toFileSize},function(_webCommandsAppCommands){AppCommands=_webCommandsAppCommands.default},function(_socialMailSocialMailClientContentIconsAudioSvg){audioIcon=_socialMailSocialMailClientContentIconsAudioSvg.default},function(_apiPath){apiPath=_apiPath.apiPath}],execute:function(){styled.css`
2542
+ `.installLocal();_export("default",SignupPage=class SignupPage extends ContentPage{constructor(){super(...arguments);this.termsAgreed=false;this.model={name:"",username:"",password:"",passwordAgain:"",phoneNumber:"",country:"US",phoneNumberText:"",captcha:{code:""},phone:{code:""}}}init(){return __awaiter(this,void 0,void 0,(function*(){this.hideToolbar=true;this.element.className=css;this.title="Social Mail Signup";const{id,accessCode}=this.model.captcha=yield FetchBuilder.put("/api/users/captcha").responseAsJson();this.renderer=XNode.create("div",null,XNode.create("div",null,XNode.create("div",{"data-max-width":"size-large"},XNode.create(Form,null,XNode.create(FormField,{label:"Your Name"},XNode.create("input",{autofocus:true,placeholder:"Display Name",value:Bind.twoWaysImmediate((()=>this.model.name))})),XNode.create(FormField,{label:"Email Address"},XNode.create("div",{"data-layout":"row","data-padding":"auto"},XNode.create("input",{"data-border":"none",placeholder:"first-last-name",style:"outline: none",type:"text",value:Bind.twoWaysImmediate((()=>this.model.username))}),XNode.create("span",{text:"@socialmail.me"}))),XNode.create("details",null,XNode.create("summary",null,"Username Policy"),"Please choose username that resembles your real legal name. Any other name will be banned and blocked permanently. And you will not be able to create new username with same phone number as well."),XNode.create(FormField,{label:"Password"},XNode.create("input",{type:"password",value:Bind.twoWaysImmediate((()=>this.model.password))})),XNode.create(FormField,{label:"Password Again"},XNode.create("input",{type:"password",value:Bind.twoWaysImmediate((()=>this.model.passwordAgain))})),XNode.create(FormField,{label:"Phone Number"},XNode.create("div",{"data-layout":"row"},XNode.create(CountrySelect,{value:Bind.twoWaysImmediate((()=>this.model.country))}),XNode.create(MaskedInput,{"data-mask":Bind.oneWayAsync((()=>formatForCountry(this.model.country))),value:Bind.twoWaysImmediate((()=>this.model.phoneNumberText))}))),XNode.create("div",null,"We require phone number verification to prevent misuse and fraud over the email. And it will also help you in setting up two factor authentication to prevent hackers from accessing your private emails."),XNode.create("br",null),XNode.create("br",null),XNode.create(FormField,{label:"Captcha"},XNode.create("img",{src:`/api/users/captcha/${id}/${accessCode}`})),XNode.create(FormField,{label:"Enter 5 Digit Code"},XNode.create("input",{type:"tel",value:Bind.twoWaysImmediate((()=>this.model.captcha.code))})),XNode.create("div",{"data-layout":"row"},XNode.create("input",{type:"checkbox",checked:Bind.twoWaysImmediate((()=>this.termsAgreed))}),XNode.create("span",{text:"I agree the "}),XNode.create("a",{href:"https://socialmail.in/terms.html",target:"_blank"},"Terms & Conditions")),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"signup"},"Signup"))))))}))}signup(){return __awaiter(this,void 0,void 0,(function*(){const{model}=this;if(!this.termsAgreed){throw new Error("You must agree to Terms & Conditions.")}if(!model.password){throw new Error("Password is required")}if(model.password.length<7){throw new Error("Password is cannot be less than 7 characters")}if(/\s/i.test(model.password)){throw new Error("Password must not any whitespace characters")}const isdCode=yield isdForCountry(model.country);const phoneNumber=model.phoneNumberText.replace(/[^0-9]/g,"");model.phoneNumber=isdCode.startsWith("+")?isdCode+phoneNumber:`+${isdCode}${phoneNumber}`;const{userID,phone={},captcha={}}=yield FetchBuilder.post("/api/users/signup").jsonBody(model).responseAsJson();if(userID){location.href="/";return}if(captcha){model.captcha.verified=captcha.verified}if(phone===null||phone===void 0?void 0:phone.verified){model.phone.verified=phone.verified}if(phone===null||phone===void 0?void 0:phone.id){model.phone.id=phone.id;model.phone.smsConfig=phone.smsConfig;yield this.askPhoneCode()}}))}askPhoneCode(){return __awaiter(this,void 0,void 0,(function*(){this.renderer=XNode.create("div",null,XNode.create("div",null,XNode.create("div",{"data-max-width":"size-large"},XNode.create(QRCodeControl,{smsConfig:this.model.phone.smsConfig}))));do{yield sleep(5e3);yield this.signup()}while(true)}))}});__decorate([Action({onEvent:"signup"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],SignupPage.prototype,"signup",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/page/users/SignupPage");System.register([],(function(_export,_context){"use strict";var FileTypes;_export("default",void 0);return{setters:[],execute:function(){_export("default",FileTypes=class FileTypes{static canPreview(file){if(/(image|video|audio)\//.test(file.contentType)){return true}return/\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt)$/i.test(file.name)}static isMedia(file){return/^(audio|video)\//i.test(file.contentType)}static isImage(file){return/^image\//i.test(file.contentType)||/\.(jpg|png|bmp|gif|tif|tiff|jiff|jpg)$/i.test(file.name)}static isDocument(file){return/\.(pdf|docx|docm|pptx|pptm|xlsx|xlsm|doc|xls|pdf|ppt|dot|xlst|sxw|sxc|sxd|sxi|sxm|sxg|txt|md)$/i.test(file.name)}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/services/FileTypes");System.register(["@web-atoms/core/dist/core/Command","../../common/commands/CommonCommands","../../services/FileTypes"],(function(_export,_context){"use strict";var Command,CommonCommands,FileTypes,AppCommands;_export("default",void 0);return{setters:[function(_webAtomsCoreDistCoreCommand){Command=_webAtomsCoreDistCoreCommand.default},function(_commonCommandsCommonCommands){CommonCommands=_commonCommandsCommonCommands.default},function(_servicesFileTypes){FileTypes=_servicesFileTypes.default}],execute:function(){_export("default",AppCommands=class AppCommands extends CommonCommands{static getPreviewCommand(p){if(FileTypes.isDocument(p)){return this.previewPdf}if(FileTypes.isImage(p)){return this.previewImage}if(FileTypes.isMedia(p)){return this.previewMedia}}});AppCommands.openHome=Command.create({route:"/",routeOrder:200,openPage:()=>_context.import("../page/home/HomePage")});AppCommands.openMailboxList=Command.create({route:"/mailboxes",routeOrder:100,openPage:()=>_context.import("../../common/pages/mailboxes/MailboxListPage")});AppCommands.openMails=Command.create({route:"/mails",routeOrder:100,openPage:()=>_context.import("../page/mails/MailboxContacts")});AppCommands.openFiles=Command.create({route:"/files/{id}",routeOrder:100,openPage:()=>_context.import("../page/files/FolderPage")});AppCommands.openTemplates=Command.create({route:"/templates",routeOrder:100,routeDefaults:{templates:true},openPage:()=>_context.import("../page/files/FolderPage")});AppCommands.previewImage=Command.create({route:"/social-mail/file-preview/image/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/image/PreviewImage")});AppCommands.previewHtml=Command.create({route:"/social-mail/file-preview/html/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/document/PreviewDocument")});AppCommands.previewPdf=Command.create({route:"/social-mail/file-preview/pdf/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/document/PreviewPDF")});AppCommands.previewMedia=Command.create({route:"/social-mail/file-preview/media/{appFileID}/{fileContentID}/{name}",pushPage:()=>_context.import("../page/files/preview/media/PreviewMedia")});AppCommands.signup=Command.create({route:"/social-mail/users/signup",openPage:()=>_context.import("../page/users/SignupPage")})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/web/commands/AppCommands");System.register(["@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/style/styled","../../NumberFormats","../../../web/commands/AppCommands","@social-mail/social-mail-client/content/icons/audio.svg","../../apiPath"],(function(_export,_context){"use strict";var XNode,styled,toFileSize,AppCommands,audioIcon,apiPath;function FilePreview(a){const size=a.fileSize&&toFileSize(a.fileSize);const{appFileID,name,fileContentID}=a;let src=apiPath(`/api/files/webp(300)/${appFileID}/${fileContentID}/${name}/${name}.300.webp`);const p={appFileID,name,fileContentID};if(/^audio\//i.test(a.contentType)){src=audioIcon}const command=AppCommands.getPreviewCommand(a);if(command){return XNode.create("a",{href:command.displayRoute(p),"data-click-event":"route",title:size?`${name} (${size})`:name,"data-file-preview":"file-preview"},XNode.create("img",{"data-element":"preview",src}),XNode.create("label",{"data-element":"file-name"},name))}return XNode.create("a",{href:a.downloadUrl,title:size?`${name} (${size})`:name,target:"_blank","data-file-preview":"attachment"},XNode.create("i",{class:"fas fa-paperclip"}),XNode.create("label",{"data-element":"file-name"},name))}_export("default",FilePreview);return{setters:[function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_NumberFormats){toFileSize=_NumberFormats.toFileSize},function(_webCommandsAppCommands){AppCommands=_webCommandsAppCommands.default},function(_socialMailSocialMailClientContentIconsAudioSvg){audioIcon=_socialMailSocialMailClientContentIconsAudioSvg.default},function(_apiPath){apiPath=_apiPath.apiPath}],execute:function(){styled.css`
2543
2543
  border: solid 2px lightgray;
2544
2544
  display: inline-grid;
2545
2545
  margin: 5px;
@@ -5004,7 +5004,7 @@ display: grid;
5004
5004
  min-width: 250px;
5005
5005
  }
5006
5006
  }
5007
- `.installLocal();_export("default",ForgotPassword=class ForgotPassword extends ContentPage{constructor(){super(...arguments);this.model={username:"",password:"",passwordAgain:"",phoneNumber:"",country:"US",phoneNumberText:"",phone:{code:""},captcha:{code:""}}}init(){return __awaiter(this,void 0,void 0,(function*(){this.hideToolbar=true;this.title="Reset Password";const{id}=yield FetchBuilder.put(apiPath("/api/users/captcha")).responseAsJson();this.model.captcha.id=id;this.render(XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(Form,{"data-border":"frame"},XNode.create("h3",null,"To reset password, enter following."),XNode.create(FormField,{label:"Username"},XNode.create("input",{autofocus:true,value:Bind.twoWaysImmediate((()=>this.model.username))})),XNode.create(FormField,{label:"Phone Number"},XNode.create("div",{"data-layout":"row"},XNode.create(CountrySelect,{value:Bind.twoWaysImmediate((()=>this.model.country))}),XNode.create(MaskedInput,{"data-mask":Bind.oneWayAsync((()=>formatForCountry(this.model.country))),value:Bind.twoWaysImmediate((()=>this.model.phoneNumberText))}))),XNode.create(FormField,{label:"Captcha"},XNode.create("img",{src:apiPath(`/api/users/captcha/${id}`)})),XNode.create(FormField,{label:"Enter 5 Digit Code"},XNode.create("input",{type:"tel",value:Bind.twoWaysImmediate((()=>this.model.captcha.code))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"ask-code"},"Next"))))))}))}resetPassword(){return __awaiter(this,void 0,void 0,(function*(){const{model}=this;if(model.phone.verified){if(!model.password){throw new Error("Password is required")}}if(model.password){if(model.password.length<7){throw new Error("Password is cannot be less than 7 characters")}if(/\s/i.test(model.password)){throw new Error("Password must not any whitespace characters")}if(model.passwordAgain!==model.password){throw new Error("Passwords do not match")}}const isdCode=yield isdForCountry(model.country);const phoneNumber=model.phoneNumberText.replace(/[^0-9]/g,"");model.phoneNumber=isdCode.startsWith("+")?isdCode+phoneNumber:`+${isdCode}${phoneNumber}`;const{userID,phone,captcha}=yield FetchBuilder.post(apiPath("/api/users/password/reset/")).jsonBody(this.model).responseAsJson();if(captcha===null||captcha===void 0?void 0:captcha.verified){model.captcha.verified=captcha.verified}if(userID){yield PopupService.alert({message:"Password has been reset successfully, please login with your new password."});location.href="/";return}if(phone.verified){this.model.phone.verified=phone.verified;this.askPasswords();return}if(phone.id){this.model.phone.id=phone.id;this.model.phone.smsConfig=phone.smsConfig}yield this.askCode()}))}askCode(){return __awaiter(this,void 0,void 0,(function*(){this.renderer=XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(QRCodeControl,{smsConfig:this.model.phone.smsConfig})));yield sleep(3e3);yield this.resetPassword()}))}askPasswords(){this.renderer=XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(Form,{"data-border":"frame"},XNode.create("h3",null,"Enter new password."),XNode.create(FormField,{label:"Password"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.password))})),XNode.create(FormField,{label:"Password Again"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.passwordAgain))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"ask-code"},"Next")))))}});__decorate([Action({onEvent:"ask-code"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ForgotPassword.prototype,"resetPassword",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/pages/user/forgot/ForgotPassword");System.register(["tslib","@web-atoms/core/dist/core/XNode","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/web-controls/dist/basic/FormField","../../../../model/model","@web-atoms/core/dist/core/Bind","@web-atoms/web-controls/dist/basic/PasswordBox","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/core/InjectProperty","../../../../services/LoginService","../../../controls/password/PasswordStrength","../../../validators/Validators","../../../controls/buttons/IconButton","@web-atoms/web-controls/dist/PageNavigator","../forgot/ForgotPassword","@web-atoms/core/dist/web/services/PopupService","../../../form/AppForm","../../../../web/commands/AppCommands","@web-atoms/date-time/dist/DateTime","../../../controls/qrcode/QRCode"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,XNode,ContentPage,FormField,LoginSession,Bind,PasswordBox,Action,InjectProperty,LoginService,PasswordStrength,Validators,SaveIconTextButton,PageNavigator,ForgotPassword,PopupService,AppForm,AppCommands,DateTime,QRCode,LoginPage,isSocialMail;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsWebControlsDistMobileAppMobileApp){ContentPage=_webAtomsWebControlsDistMobileAppMobileApp.ContentPage},function(_webAtomsWebControlsDistBasicFormField){FormField=_webAtomsWebControlsDistBasicFormField.default},function(_modelModel){LoginSession=_modelModel.LoginSession},function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsWebControlsDistBasicPasswordBox){PasswordBox=_webAtomsWebControlsDistBasicPasswordBox.default},function(_webAtomsCoreDistViewModelAction){Action=_webAtomsCoreDistViewModelAction.default},function(_webAtomsCoreDistCoreInjectProperty){InjectProperty=_webAtomsCoreDistCoreInjectProperty.default},function(_servicesLoginService){LoginService=_servicesLoginService.default},function(_controlsPasswordPasswordStrength){PasswordStrength=_controlsPasswordPasswordStrength.default},function(_validatorsValidators){Validators=_validatorsValidators.Validators},function(_controlsButtonsIconButton){SaveIconTextButton=_controlsButtonsIconButton.SaveIconTextButton},function(_webAtomsWebControlsDistPageNavigator){PageNavigator=_webAtomsWebControlsDistPageNavigator.default},function(_forgotForgotPassword){ForgotPassword=_forgotForgotPassword.default},function(_webAtomsCoreDistWebServicesPopupService){PopupService=_webAtomsCoreDistWebServicesPopupService.default},function(_formAppForm){AppForm=_formAppForm.default},function(_webCommandsAppCommands){AppCommands=_webCommandsAppCommands.default},function(_webAtomsDateTimeDistDateTime){DateTime=_webAtomsDateTimeDistDateTime.default},function(_controlsQrcodeQRCode){QRCode=_controlsQrcodeQRCode.default}],execute:function(){isSocialMail=/socialmail\.(me|in)/i.test(location.href)||/\d+.\d+.\d+.\d+/i.test(location.href);_export("default",LoginPage=class LoginPage extends ContentPage{constructor(){super(...arguments);this.password=""}init(){return __awaiter(this,void 0,void 0,(function*(){this.footerRenderer=()=>XNode.create("div",{"data-layout":"row"},XNode.create("a",{target:"_blank","data-margin-left":"auto",href:"https://socialmail.me"},"Social Mail"));this.hideToolbar=true;this.model=LoginSession.create({});this.model.userName="";this.model.checkPassword="";this.model.timeToken="";this.model.oneTimePassword="";this.render(XNode.create("div",null,XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("h3",null,"Sign in to continue"),XNode.create(FormField,{label:"Username"},XNode.create("input",{autofocus:true,value:Bind.twoWaysImmediate((()=>this.model.userName))})),XNode.create(FormField,{label:"Password"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.checkPassword))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"accent-button","data-submit-event":"login",text:"Login"})),isSocialMail&&XNode.create("div",{"data-layout":"row"},XNode.create("span",{"data-click-event":"forgot-password","data-layout":"link"},"Forgot password?")),isSocialMail&&XNode.create("div",{"data-layout":"row"},XNode.create("a",{"data-click-event":"route",href:AppCommands.signup.displayRoute({})},"Sign Up"))))))}))}login(){return __awaiter(this,void 0,void 0,(function*(){this.model.dateUpdated=DateTime.now;const status=yield this.userService.login(this.model);if(!status){return}if(status==="change-password"){yield this.showChangePassword();return}this.showOtherFactors()}))}showOtherFactors(){const smsConfig=this.model.verificationToken;this.renderer=XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,(smsConfig===null||smsConfig===void 0?void 0:smsConfig.smsConfig)&&XNode.create(QRCode,{smsConfig:smsConfig.smsConfig}),XNode.create("h4",null,"OR"),XNode.create("h4",null,"Enter Authenticator Code"),XNode.create(FormField,{label:"Code"},XNode.create("input",{autofocus:true,type:"tel",value:Bind.twoWaysImmediate((()=>this.model.timeToken))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"event-click":()=>this.showOTP(),"data-layout":"link"},"Enter One Time Password instead.")),XNode.create("div",{"data-layout":"command-row"},XNode.create(SaveIconTextButton,{"event-click":()=>this.login(),text:"Go"}))))}showOTP(){this.renderer=XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("h4",null,"Enter One Time Password"),XNode.create(FormField,{label:"Password"},XNode.create("input",{autofocus:true,type:"tel",value:Bind.twoWaysImmediate((()=>this.model.oneTimePassword))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"event-click":()=>this.showOtherFactors(),"data-layout":"link"},"Enter Authenticator Code instad.")),XNode.create("div",{"data-layout":"command-row"},XNode.create(SaveIconTextButton,{"event-click":()=>this.login(),text:"Go"}))))}showChangePassword(){return __awaiter(this,void 0,void 0,(function*(){this.model.newPassword="";this.renderer=XNode.create("div",null,XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("div",null,"Update your password, your one time password is expired."),XNode.create(FormField,{label:"Password",autofocus:true,required:true,error:Bind.oneWay((()=>Validators.isValidPassword(this.password)?"":"Password must contain one symbol, one number and should be minimum 7 characters"))},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.password))})),XNode.create(PasswordStrength,{password:Bind.oneWay((()=>this.password))}),XNode.create(FormField,{label:"Password Again",required:true,error:Bind.oneWay((()=>this.model.newPassword!==this.password?"Passwords do not match":""))},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.newPassword))})),XNode.create("div",{"data-layout":"command-row"},XNode.create("button",{"data-submit-event":"login",text:"Change Password & Login"})))))}))}forgotPassword(){return __awaiter(this,void 0,void 0,(function*(){if(isSocialMail){PageNavigator.openPage(ForgotPassword);return}yield PopupService.alert({message:"Please contact your administrator"})}))}});__decorate([InjectProperty,__metadata("design:type",LoginService)],LoginPage.prototype,"userService",void 0);__decorate([Action({onEvent:"login"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],LoginPage.prototype,"login",null);__decorate([Action({onEvent:"forgot-password"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],LoginPage.prototype,"forgotPassword",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/pages/user/login/LoginPage");System.register(["tslib","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/style/styled"],(function(_export,_context){"use strict";var __rest,XNode,styled;function MenuItem(_a){var{label,icon=void 0,click=undefined,title=label,description=void 0,href="",commandLink="",target=undefined,bell=void 0,bellTitle=void 0,bellClick=void 0}=_a,a=__rest(_a,["label","icon","click","title","description","href","commandLink","target","bell","bellTitle","bellClick"]);return href||commandLink?XNode.create("a",Object.assign({"data-layout":"menu-item","data-text-decoration":"none",title,"data-click-event":commandLink?"route":void 0,href:href||commandLink,target,"event-click":click},a),icon&&XNode.create("i",{class:icon}),XNode.create("span",{text:label}),description&&XNode.create("small",{text:description}),bell!==void 0&&XNode.create("i",Object.assign({"data-element":"badge",title:bellTitle,class:bell?"fad fa-bell":"fad fa-bell-slash"},typeof bellClick==="string"?{"data-click-event":bellClick}:{"data-click-event":"none","event-click":bellClick}))):XNode.create("div",Object.assign({title,"data-layout":"menu-item","event-click":click},a),icon&&XNode.create("i",{class:icon}),XNode.create("span",{text:label}),description&&XNode.create("small",{text:description}),bell!==void 0&&XNode.create("i",{"data-click-event":bellClick,"data-element":"badge",title:bellTitle,class:bell?"fad fa-bell":"fad fa-bell-slash"}))}_export("default",MenuItem);return{setters:[function(_tslib){__rest=_tslib.__rest},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default}],execute:function(){styled.css`
5007
+ `.installLocal();_export("default",ForgotPassword=class ForgotPassword extends ContentPage{constructor(){super(...arguments);this.model={username:"",password:"",passwordAgain:"",phoneNumber:"",country:"US",phoneNumberText:"",phone:{code:""},captcha:{code:""}}}init(){return __awaiter(this,void 0,void 0,(function*(){this.hideToolbar=true;this.title="Reset Password";const{id,accessCode}=this.model.captcha=yield FetchBuilder.put(apiPath("/api/users/captcha")).responseAsJson();this.render(XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(Form,{"data-border":"frame"},XNode.create("h3",null,"To reset password, enter following."),XNode.create(FormField,{label:"Username"},XNode.create("input",{autofocus:true,value:Bind.twoWaysImmediate((()=>this.model.username))})),XNode.create(FormField,{label:"Phone Number"},XNode.create("div",{"data-layout":"row"},XNode.create(CountrySelect,{value:Bind.twoWaysImmediate((()=>this.model.country))}),XNode.create(MaskedInput,{"data-mask":Bind.oneWayAsync((()=>formatForCountry(this.model.country))),value:Bind.twoWaysImmediate((()=>this.model.phoneNumberText))}))),XNode.create(FormField,{label:"Captcha"},XNode.create("img",{src:apiPath(`/api/users/captcha/${id}/${accessCode}`)})),XNode.create(FormField,{label:"Enter 5 Digit Code"},XNode.create("input",{type:"tel",value:Bind.twoWaysImmediate((()=>this.model.captcha.code))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"ask-code"},"Next"))))))}))}resetPassword(){return __awaiter(this,void 0,void 0,(function*(){const{model}=this;if(model.phone.verified){if(!model.password){throw new Error("Password is required")}}if(model.password){if(model.password.length<7){throw new Error("Password is cannot be less than 7 characters")}if(/\s/i.test(model.password)){throw new Error("Password must not any whitespace characters")}if(model.passwordAgain!==model.password){throw new Error("Passwords do not match")}}const isdCode=yield isdForCountry(model.country);const phoneNumber=model.phoneNumberText.replace(/[^0-9]/g,"");model.phoneNumber=isdCode.startsWith("+")?isdCode+phoneNumber:`+${isdCode}${phoneNumber}`;const{userID,phone,captcha}=yield FetchBuilder.post(apiPath("/api/users/password/reset/")).jsonBody(this.model).responseAsJson();if(captcha===null||captcha===void 0?void 0:captcha.verified){model.captcha.verified=captcha.verified}if(userID){yield PopupService.alert({message:"Password has been reset successfully, please login with your new password."});location.href="/";return}if(phone.verified){this.model.phone.verified=phone.verified;this.askPasswords();return}if(phone.id){this.model.phone.id=phone.id;this.model.phone.smsConfig=phone.smsConfig}yield this.askCode()}))}askCode(){return __awaiter(this,void 0,void 0,(function*(){this.renderer=XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(QRCodeControl,{smsConfig:this.model.phone.smsConfig})));yield sleep(3e3);yield this.resetPassword()}))}askPasswords(){this.renderer=XNode.create("div",{class:css},XNode.create("div",{"data-layout":"center-all"},XNode.create(Form,{"data-border":"frame"},XNode.create("h3",null,"Enter new password."),XNode.create(FormField,{label:"Password"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.password))})),XNode.create(FormField,{label:"Password Again"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.passwordAgain))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"go-button","data-submit-event":"ask-code"},"Next")))))}});__decorate([Action({onEvent:"ask-code"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],ForgotPassword.prototype,"resetPassword",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/pages/user/forgot/ForgotPassword");System.register(["tslib","@web-atoms/core/dist/core/XNode","@web-atoms/web-controls/dist/mobile-app/MobileApp","@web-atoms/web-controls/dist/basic/FormField","../../../../model/model","@web-atoms/core/dist/core/Bind","@web-atoms/web-controls/dist/basic/PasswordBox","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/core/InjectProperty","../../../../services/LoginService","../../../controls/password/PasswordStrength","../../../validators/Validators","../../../controls/buttons/IconButton","@web-atoms/web-controls/dist/PageNavigator","../forgot/ForgotPassword","@web-atoms/core/dist/web/services/PopupService","../../../form/AppForm","../../../../web/commands/AppCommands","@web-atoms/date-time/dist/DateTime","../../../controls/qrcode/QRCode"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,XNode,ContentPage,FormField,LoginSession,Bind,PasswordBox,Action,InjectProperty,LoginService,PasswordStrength,Validators,SaveIconTextButton,PageNavigator,ForgotPassword,PopupService,AppForm,AppCommands,DateTime,QRCode,LoginPage,isSocialMail;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsWebControlsDistMobileAppMobileApp){ContentPage=_webAtomsWebControlsDistMobileAppMobileApp.ContentPage},function(_webAtomsWebControlsDistBasicFormField){FormField=_webAtomsWebControlsDistBasicFormField.default},function(_modelModel){LoginSession=_modelModel.LoginSession},function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsWebControlsDistBasicPasswordBox){PasswordBox=_webAtomsWebControlsDistBasicPasswordBox.default},function(_webAtomsCoreDistViewModelAction){Action=_webAtomsCoreDistViewModelAction.default},function(_webAtomsCoreDistCoreInjectProperty){InjectProperty=_webAtomsCoreDistCoreInjectProperty.default},function(_servicesLoginService){LoginService=_servicesLoginService.default},function(_controlsPasswordPasswordStrength){PasswordStrength=_controlsPasswordPasswordStrength.default},function(_validatorsValidators){Validators=_validatorsValidators.Validators},function(_controlsButtonsIconButton){SaveIconTextButton=_controlsButtonsIconButton.SaveIconTextButton},function(_webAtomsWebControlsDistPageNavigator){PageNavigator=_webAtomsWebControlsDistPageNavigator.default},function(_forgotForgotPassword){ForgotPassword=_forgotForgotPassword.default},function(_webAtomsCoreDistWebServicesPopupService){PopupService=_webAtomsCoreDistWebServicesPopupService.default},function(_formAppForm){AppForm=_formAppForm.default},function(_webCommandsAppCommands){AppCommands=_webCommandsAppCommands.default},function(_webAtomsDateTimeDistDateTime){DateTime=_webAtomsDateTimeDistDateTime.default},function(_controlsQrcodeQRCode){QRCode=_controlsQrcodeQRCode.default}],execute:function(){isSocialMail=/socialmail\.(me|in)/i.test(location.href)||/\d+.\d+.\d+.\d+/i.test(location.href);_export("default",LoginPage=class LoginPage extends ContentPage{constructor(){super(...arguments);this.password=""}init(){return __awaiter(this,void 0,void 0,(function*(){this.footerRenderer=()=>XNode.create("div",{"data-layout":"row"},XNode.create("a",{target:"_blank","data-margin-left":"auto",href:"https://socialmail.me"},"Social Mail"));this.hideToolbar=true;this.model=LoginSession.create({});this.model.userName="";this.model.checkPassword="";this.model.timeToken="";this.model.oneTimePassword="";this.render(XNode.create("div",null,XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("h3",null,"Sign in to continue"),XNode.create(FormField,{label:"Username"},XNode.create("input",{autofocus:true,value:Bind.twoWaysImmediate((()=>this.model.userName))})),XNode.create(FormField,{label:"Password"},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.checkPassword))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"data-layout":"accent-button","data-submit-event":"login",text:"Login"})),isSocialMail&&XNode.create("div",{"data-layout":"row"},XNode.create("span",{"data-click-event":"forgot-password","data-layout":"link"},"Forgot password?")),isSocialMail&&XNode.create("div",{"data-layout":"row"},XNode.create("a",{"data-click-event":"route",href:AppCommands.signup.displayRoute({})},"Sign Up"))))))}))}login(){return __awaiter(this,void 0,void 0,(function*(){this.model.dateUpdated=DateTime.now;const status=yield this.userService.login(this.model);if(!status){return}if(status==="change-password"){yield this.showChangePassword();return}this.showOtherFactors()}))}showOtherFactors(){const smsConfig=this.model.verificationToken;this.renderer=XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,(smsConfig===null||smsConfig===void 0?void 0:smsConfig.smsConfig)&&XNode.create(QRCode,{smsConfig:smsConfig.smsConfig}),XNode.create("h4",null,"OR"),XNode.create("h4",null,"Enter Authenticator Code"),XNode.create(FormField,{label:"Code"},XNode.create("input",{autofocus:true,type:"tel",value:Bind.twoWaysImmediate((()=>this.model.timeToken))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"event-click":()=>this.showOTP(),"data-layout":"link"},"Enter One Time Password instead.")),XNode.create("div",{"data-layout":"command-row"},XNode.create(SaveIconTextButton,{"event-click":()=>this.login(),text:"Go"}))))}showOTP(){this.renderer=XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("h4",null,"Enter One Time Password"),XNode.create(FormField,{label:"Password"},XNode.create("input",{autofocus:true,type:"tel",value:Bind.twoWaysImmediate((()=>this.model.oneTimePassword))})),XNode.create("div",{"data-layout":"row"},XNode.create("button",{"event-click":()=>this.showOtherFactors(),"data-layout":"link"},"Enter Authenticator Code instad.")),XNode.create("div",{"data-layout":"command-row"},XNode.create(SaveIconTextButton,{"event-click":()=>this.login(),text:"Go"}))))}showChangePassword(){return __awaiter(this,void 0,void 0,(function*(){this.model.newPassword="";this.renderer=XNode.create("div",null,XNode.create("div",{"data-layout":"center-all"},XNode.create(AppForm,null,XNode.create("div",null,"Update your password, your one time password is expired."),XNode.create(FormField,{label:"Password",autofocus:true,required:true,error:Bind.oneWay((()=>Validators.isValidPassword(this.password)?"":"Password must contain one symbol, one number and should be minimum 7 characters"))},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.password))})),XNode.create(PasswordStrength,{password:Bind.oneWay((()=>this.password))}),XNode.create(FormField,{label:"Password Again",required:true,error:Bind.oneWay((()=>this.model.newPassword!==this.password?"Passwords do not match":""))},XNode.create(PasswordBox,{value:Bind.twoWaysImmediate((()=>this.model.newPassword))})),XNode.create("div",{"data-layout":"command-row"},XNode.create("button",{"data-submit-event":"login",text:"Change Password & Login"})))))}))}forgotPassword(){return __awaiter(this,void 0,void 0,(function*(){if(isSocialMail){PageNavigator.openPage(ForgotPassword);return}yield PopupService.alert({message:"Please contact your administrator"})}))}});__decorate([InjectProperty,__metadata("design:type",LoginService)],LoginPage.prototype,"userService",void 0);__decorate([Action({onEvent:"login"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],LoginPage.prototype,"login",null);__decorate([Action({onEvent:"forgot-password"}),__metadata("design:type",Function),__metadata("design:paramtypes",[]),__metadata("design:returntype",Promise)],LoginPage.prototype,"forgotPassword",null)}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/common/pages/user/login/LoginPage");System.register(["tslib","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/style/styled"],(function(_export,_context){"use strict";var __rest,XNode,styled;function MenuItem(_a){var{label,icon=void 0,click=undefined,title=label,description=void 0,href="",commandLink="",target=undefined,bell=void 0,bellTitle=void 0,bellClick=void 0}=_a,a=__rest(_a,["label","icon","click","title","description","href","commandLink","target","bell","bellTitle","bellClick"]);return href||commandLink?XNode.create("a",Object.assign({"data-layout":"menu-item","data-text-decoration":"none",title,"data-click-event":commandLink?"route":void 0,href:href||commandLink,target,"event-click":click},a),icon&&XNode.create("i",{class:icon}),XNode.create("span",{text:label}),description&&XNode.create("small",{text:description}),bell!==void 0&&XNode.create("i",Object.assign({"data-element":"badge",title:bellTitle,class:bell?"fad fa-bell":"fad fa-bell-slash"},typeof bellClick==="string"?{"data-click-event":bellClick}:{"data-click-event":"none","event-click":bellClick}))):XNode.create("div",Object.assign({title,"data-layout":"menu-item","event-click":click},a),icon&&XNode.create("i",{class:icon}),XNode.create("span",{text:label}),description&&XNode.create("small",{text:description}),bell!==void 0&&XNode.create("i",{"data-click-event":bellClick,"data-element":"badge",title:bellTitle,class:bell?"fad fa-bell":"fad fa-bell-slash"}))}_export("default",MenuItem);return{setters:[function(_tslib){__rest=_tslib.__rest},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default}],execute:function(){styled.css`
5008
5008
  display: grid;
5009
5009
  grid-template-columns: auto 1fr auto;
5010
5010
  grid-template-rows: 1fr auto;