quickblox-react-ui-kit 0.3.1-beta.6 → 0.3.1-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-ui.js +9 -40
- package/dist/index-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/Presentation/Views/DialogList/DialogList.tsx +0 -37
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +1 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +5 -2
- package/src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx +2 -0
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss +1 -1
- package/src/Presentation/ui-components/Toast/Toast.scss +1 -1
- package/storybook-static/{703.2cbec951.iframe.bundle.js → 703.776b9f13.iframe.bundle.js} +2 -2
- package/storybook-static/{703.2cbec951.iframe.bundle.js.map → 703.776b9f13.iframe.bundle.js.map} +1 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.0d1800d9.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.33c5683e.iframe.bundle.js → Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js} +2 -2
- package/storybook-static/{Presentation-ui-components-TextField-TextField-stories.33c5683e.iframe.bundle.js.map → Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js.map} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.2f520e2d.iframe.bundle.js → runtime~main.3464b25a.iframe.bundle.js} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css.map → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css.map} +1 -1
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-Toast-Toast-stories.3c874f4c.chunk.css → Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-Toast-Toast-stories.3c874f4c.chunk.css.map → Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css.map} +1 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.bf8a24d1.iframe.bundle.js +0 -1
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[119],{"./src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MessageInputDefault:()=>MessageInputDefault,MessageInputLoadingState:()=>MessageInputLoadingState,MessageInputWithPreview:()=>MessageInputWithPreview,MessageInputWithVoiceMessage:()=>MessageInputWithVoiceMessage,__namedExportsOrder:()=>__namedExportsOrder,default:()=>MessageInput_stories});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let VoiceRecordingProgress_VoiceRecordingProgress=_ref=>{let timerId,{startStatus,longRecInSec,onClick,onTouch}=_ref,[currentTime,setCurrentTime]=(0,react.useState)(Date.now()),[timeString,setTimeString]=(0,react.useState)("00:00:00"),[startTime]=(0,react.useState)(Date.now());(0,react.useEffect)(()=>{let valueToCalc=Math.round((currentTime-(startTime||0))/1e3),sec=valueToCalc%60,min=Math.round(valueToCalc/60),secStr=sec<=9?"0".concat(sec.toString()):sec,minStr=min<=9?"0".concat(min.toString()):min;setTimeString("00:".concat(minStr,":").concat(secStr))},[currentTime]);let stopTimer=()=>{timerId&&(clearTimeout(timerId),timerId=void 0),onClick&&onClick(),onTouch&&onTouch()},startTimer=()=>{setTimeout(()=>{stopTimer()},1e3*(longRecInSec<=60&&longRecInSec>0?longRecInSec:10)),void 0===timerId&&(timerId=setInterval(()=>{setCurrentTime(Date.now())},1e3))};return(0,react.useEffect)(()=>{startStatus&&startTimer()},[startStatus]),(0,jsx_runtime.jsxs)("div",{className:"chat-message-text-container",children:[(0,jsx_runtime.jsx)("div",{onClick:()=>{stopTimer()},onTouchStart:()=>{stopTimer()},className:"chat-message-text-container__stop_record_button"}),(0,jsx_runtime.jsx)("div",{children:timeString})]})};try{VoiceRecordingProgress_VoiceRecordingProgress.displayName="VoiceRecordingProgress",VoiceRecordingProgress_VoiceRecordingProgress.__docgenInfo={description:"",displayName:"VoiceRecordingProgress",props:{startStatus:{defaultValue:null,description:"",name:"startStatus",required:!0,type:{name:"boolean"}},longRecInSec:{defaultValue:null,description:"",name:"longRecInSec",required:!0,type:{name:"number"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"FunctionTypeVoidToVoid"}},onTouch:{defaultValue:null,description:"",name:"onTouch",required:!1,type:{name:"FunctionTypeVoidToVoid"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx#VoiceRecordingProgress"]={docgenInfo:VoiceRecordingProgress_VoiceRecordingProgress.__docgenInfo,name:"VoiceRecordingProgress",path:"src/Presentation/ui-components/MessageInput/VoiceRecordingProgress/VoiceRecordingProgress.tsx#VoiceRecordingProgress"})}catch(__react_docgen_typescript_loader_error){}let AttachmentUploader=_ref=>{let{icon,onChangeFile,disableAction}=_ref;return(0,jsx_runtime.jsxs)("label",{htmlFor:"btnUploadAttachment",style:{cursor:"pointer"},children:[(0,jsx_runtime.jsx)("div",{children:icon}),(0,jsx_runtime.jsx)("input",{id:"btnUploadAttachment",type:"file",accept:"image/*, audio/*, video/*, .pdf, .txt, .apk, .zip, .ipa, .ppt, .pptx, .doc, .docx, .xls, .xlsx, .json, .log",style:{display:"none"},onChange:event=>{onChangeFile(event),event.target.value=""},disabled:disableAction})]})};try{AttachmentUploader.displayName="AttachmentUploader",AttachmentUploader.__docgenInfo={description:"",displayName:"AttachmentUploader",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"ReactNode"}},onChangeFile:{defaultValue:null,description:"",name:"onChangeFile",required:!0,type:{name:"(event: ChangeEvent<HTMLInputElement>) => void"}},disableAction:{defaultValue:null,description:"",name:"disableAction",required:!0,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx#AttachmentUploader"]={docgenInfo:AttachmentUploader.__docgenInfo,name:"AttachmentUploader",path:"src/Presentation/ui-components/MessageInput/AttachmentUploader/AttachmentUploader.tsx#AttachmentUploader"})}catch(__react_docgen_typescript_loader_error){}var icons=__webpack_require__("./src/Presentation/icons/index.ts"),Loader=__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx");let MessageInput_MessageInput=_ref=>{let{value,onChange,onChanging,onSend,enableVoice,onVoice,disableAttachment,onAttachment,previewMessage,rephrase,loading,placeholder,disableActions=!1,className}=_ref,[isVoiceMessage,setVoiceMessage]=(0,react.useState)(!0);function sendTextMessageActions(){value&&onSend&&(onSend(value),onChange&&!disableActions&&onChange(""))}return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("chat-container",className),children:[previewMessage,(0,jsx_runtime.jsxs)("div",{onBlur:()=>{value&&value.length>0||setVoiceMessage(!0)},className:"chat-input",children:[(0,jsx_runtime.jsx)(AttachmentUploader,{disableAction:disableActions,icon:(0,jsx_runtime.jsx)(icons.EO,{className:classnames_default()("chat-container__icon",{"chat-container__icon--mute":disableAttachment||loading,"chat-container__icon--disable":disableActions})}),onChangeFile:onAttachment}),!enableVoice&&(0,jsx_runtime.jsxs)("div",{className:"input-text-message type-message",children:[(0,jsx_runtime.jsx)("textarea",{disabled:loading,value:value,onFocus:()=>{setVoiceMessage(!1)},onChange:event=>{onChange&&onChange(event.target.value)},onInput:event=>{onChanging&&onChanging(event.target.value)},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.ctrlKey||sendTextMessageActions()},placeholder:placeholder||"Type message"}),rephrase]}),enableVoice&&(0,jsx_runtime.jsx)(VoiceRecordingProgress_VoiceRecordingProgress,{startStatus:enableVoice,longRecInSec:60,onClick:()=>{onVoice&&onVoice()}}),!isVoiceMessage&&!loading&&(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)(icons.bf,{className:classnames_default()("chat-container__icon__send",{"chat-container__icon--mute":loading,"chat-container__icon--disable":disableActions}),onClick:()=>{sendTextMessageActions()}})}),loading?(0,jsx_runtime.jsx)(Loader.Z,{size:"sm",className:"chat-container__loader"}):isVoiceMessage&&(0,jsx_runtime.jsx)(icons.ye,{className:classnames_default()("chat-container__icon",{"chat-container__icon--red":enableVoice,"chat-container__icon--disable":disableActions}),onClick:()=>{onVoice&&onVoice()}})]})]})};try{MessageInput_MessageInput.displayName="MessageInput",MessageInput_MessageInput.__docgenInfo={description:"",displayName:"MessageInput",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"FunctionTypeStringToVoid"}},onChanging:{defaultValue:null,description:"",name:"onChanging",required:!1,type:{name:"FunctionTypeStringToVoid"}},onSend:{defaultValue:null,description:"",name:"onSend",required:!1,type:{name:"FunctionTypeStringToVoid"}},enableVoice:{defaultValue:null,description:"",name:"enableVoice",required:!1,type:{name:"boolean"}},onVoice:{defaultValue:null,description:"",name:"onVoice",required:!1,type:{name:"FunctionTypeVoidToVoid"}},disableAttachment:{defaultValue:null,description:"",name:"disableAttachment",required:!1,type:{name:"boolean"}},onAttachment:{defaultValue:null,description:"",name:"onAttachment",required:!0,type:{name:"(event: ChangeEvent<HTMLInputElement>) => void"}},previewMessage:{defaultValue:null,description:"",name:"previewMessage",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},rephrase:{defaultValue:null,description:"",name:"rephrase",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string"}},disableActions:{defaultValue:{value:"false"},description:"",name:"disableActions",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/MessageInput/MessageInput.tsx#MessageInput"]={docgenInfo:MessageInput_MessageInput.__docgenInfo,name:"MessageInput",path:"src/Presentation/ui-components/MessageInput/MessageInput.tsx#MessageInput"})}catch(__react_docgen_typescript_loader_error){}function ReplyField(){let theme=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return(0,jsx_runtime.jsx)("svg",{width:theme&&theme.width?theme.width:"44",height:theme&&theme.height?theme.height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)("path",{d:"M18.3333 15.5833V8.25L5.5 21.0833L18.3333 33.9167V26.4C27.5 26.4 33.9167 29.3333 38.5 35.75C36.6667 26.5833 31.1667 17.4167 18.3333 15.5833Z",id:"ReplyField",fill:theme&&theme.color?theme.color:"var(--color-icon)"})})}let ReplyFilled=ReplyField;try{ReplyField.displayName="ReplyField",ReplyField.__docgenInfo={description:"",displayName:"ReplyField",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"string"}},height:{defaultValue:null,description:"",name:"height",required:!1,type:{name:"string"}},applyZoom:{defaultValue:null,description:"",name:"applyZoom",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx#ReplyField"]={docgenInfo:ReplyField.__docgenInfo,name:"ReplyField",path:"src/Presentation/components/UI/svgs/Icons/Actions/ReplyFilled/index.tsx#ReplyField"})}catch(__react_docgen_typescript_loader_error){}class FileType{}FileType.audio="audio",FileType.video="video",FileType.image="image",FileType.text="text";let ReplyImagePreviewAttachment_ReplyImagePreviewAttachment=_ref=>{let{imageFile}=_ref;return(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsx)("a",{href:imageFile.url,download:"file",target:"_blank",rel:"noreferrer",children:(0,jsx_runtime.jsx)("img",{className:"reply-preview-image-body",src:imageFile.url,alt:imageFile.name||"attached image"},imageFile.id)})})};try{ReplyImagePreviewAttachment_ReplyImagePreviewAttachment.displayName="ReplyImagePreviewAttachment",ReplyImagePreviewAttachment_ReplyImagePreviewAttachment.__docgenInfo={description:"",displayName:"ReplyImagePreviewAttachment",props:{imageFile:{defaultValue:null,description:"",name:"imageFile",required:!0,type:{name:"FileEntity"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx#ReplyImagePreviewAttachment"]={docgenInfo:ReplyImagePreviewAttachment_ReplyImagePreviewAttachment.__docgenInfo,name:"ReplyImagePreviewAttachment",path:"src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyImagePreviewAttachment/ReplyImagePreviewAttachment.tsx#ReplyImagePreviewAttachment"})}catch(__react_docgen_typescript_loader_error){}function TextDocument(){let theme=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return(0,jsx_runtime.jsx)("svg",{width:theme&&theme.width?theme.width:"44",height:theme&&theme.height?theme.height:"44",viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,jsx_runtime.jsx)("path",{d:"M25.6668 3.66675H11.0002C8.9835 3.66675 7.35183 5.31675 7.35183 7.33341L7.3335 36.6667C7.3335 38.6834 8.96516 40.3334 10.9818 40.3334H33.0002C35.0168 40.3334 36.6668 38.6834 36.6668 36.6667V14.6667L25.6668 3.66675ZM29.3335 33.0001H14.6668V29.3334H29.3335V33.0001ZM29.3335 25.6667H14.6668V22.0001H29.3335V25.6667ZM23.8335 16.5001V6.41675L33.9168 16.5001H23.8335Z",id:"TextDocument",fill:theme&&theme.color?theme.color:"var(--color-icon)"})})}let Media_TextDocument=TextDocument;try{TextDocument.displayName="TextDocument",TextDocument.__docgenInfo={description:"",displayName:"TextDocument",props:{color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"string"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"string"}},height:{defaultValue:null,description:"",name:"height",required:!1,type:{name:"string"}},applyZoom:{defaultValue:null,description:"",name:"applyZoom",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx#TextDocument"]={docgenInfo:TextDocument.__docgenInfo,name:"TextDocument",path:"src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx#TextDocument"})}catch(__react_docgen_typescript_loader_error){}var quickblox=__webpack_require__("./node_modules/quickblox/quickblox.js"),quickblox_default=__webpack_require__.n(quickblox);class RemoteMessageDTO{constructor(){this.id=void 0,this.dialogId=void 0,this.message=void 0,this.created_at=void 0,this.date_sent=void 0,this.delivered_ids=void 0,this.read_ids=void 0,this.read=void 0,this.recipient_id=void 0,this.sender_id=void 0,this.updated_at=void 0,this.notification_type=void 0,this.dialog_type=void 0,this.markable=void 0,this.attachments=void 0,this.qb_message_action=void 0,this.origin_sender_name=void 0,this.qb_original_messages=void 0,this.id=new Date().getTime().toString(),this.dialogId="",this.message="",this.created_at=new Date().toString(),this.date_sent=new Date().getTime(),this.delivered_ids=[],this.read_ids=[],this.recipient_id=0,this.read=0,this.sender_id=0,this.updated_at=new Date().toString(),this.notification_type="",this.attachments=[]}}class RepositoryException extends Error{constructor(message,code){super(message),this.message=message,this.code=void 0,this.code=code}}let UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE="Error. Mapper DTO Unexpected exception .",INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE="Error. Mapper DTO Incorrect data exception .";class MapperDTOException extends RepositoryException{constructor(message,code){let description=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";super(message,code),this._description=void 0,this._description=description,this._description&&(this.message+=" ".concat(this._description))}}class MessageDTOMapper{fromDTO(dto){return MessageDTOMapper.validateDTO(dto),Promise.resolve({_id:"",attachments:[],chat_dialog_id:"",created_at:"",date_sent:0,delivered_ids:[],message:"",read:0,read_ids:[],recipient_id:0,sender_id:0,updated_at:""})}static transformAttachment(qbMessage,qbAtts){return qbAtts.map(item=>{let newItem={id:item.id,name:item.name,size:item.size,type:item.type,uid:item.uid,url:item.uid&&quickblox_default().content.privateUrl(item.uid),file:{id:item.id,name:item.name,size:item.size,type:item.type,uid:item.uid||"",url:item.uid&&quickblox_default().content.privateUrl(item.uid)}},messageParts=MessageDTOMapper.getMessageParts(qbMessage);return messageParts&&messageParts.length>3&&(newItem.uid=messageParts[2],newItem.name=messageParts[1],newItem.type=messageParts[3],newItem.url=newItem.uid&&quickblox_default().content.privateUrl(newItem.uid),newItem.file&&(newItem.file.uid=newItem.uid,newItem.file.name=newItem.name,newItem.file.url=newItem.uid&&quickblox_default().content.privateUrl(newItem.uid),newItem.file.type=newItem.type)),newItem})}toTDO(entity){var _MessageDTOMapper$tra;let dto=this.QBChatMessageToRemoteMessageDTO(entity),operationResult=!0;return dto.qb_original_messages=null===(_MessageDTOMapper$tra=MessageDTOMapper.translateJSONToOriginalData(entity.qb_original_messages))||void 0===_MessageDTOMapper$tra?void 0:_MessageDTOMapper$tra.map(item=>{let result;try{result=this.QBChatMessageToRemoteMessageDTO(item,!0)}catch(e){operationResult=!1,console.log(e)}return result}),dto.qb_message_action=entity.qb_message_action,dto.origin_sender_name=entity.origin_sender_name,operationResult||(dto.qb_original_messages=void 0,dto.qb_message_action=void 0,dto.origin_sender_name=void 0),Promise.resolve(dto)}QBChatMessageToRemoteMessageDTO(qbMessage){let offValidate=arguments.length>1&&void 0!==arguments[1]&&arguments[1],dto=new RemoteMessageDTO;return offValidate?(dto.id=qbMessage._id,dto.dialogId=qbMessage.chat_dialog_id,dto.message=qbMessage.message,dto.created_at=qbMessage.created_at||Date.now().toString(),dto.date_sent=qbMessage.date_sent||1e3*Date.now(),dto.delivered_ids=qbMessage.delivered_ids||[],dto.read_ids=qbMessage.read_ids||[],dto.recipient_id=qbMessage.recipient_id||0,dto.attachments=MessageDTOMapper.transformAttachment(qbMessage.message||"",qbMessage.attachments||[]),dto.read=qbMessage.read||1,dto.sender_id=qbMessage.sender_id,dto.updated_at=qbMessage.updated_at||Date.now().toString()):(MessageDTOMapper.validateQBMessage(qbMessage),dto.id=qbMessage._id,dto.dialogId=qbMessage.chat_dialog_id,dto.message=qbMessage.message,dto.created_at=qbMessage.created_at,dto.date_sent=1e3*qbMessage.date_sent,dto.delivered_ids=qbMessage.delivered_ids||[],dto.read_ids=qbMessage.read_ids||[],dto.recipient_id=qbMessage.recipient_id||0,dto.attachments=MessageDTOMapper.transformAttachment(qbMessage.message||"",qbMessage.attachments||[]),dto.read=qbMessage.read,dto.sender_id=qbMessage.sender_id,dto.updated_at=qbMessage.updated_at),dto.notification_type=qbMessage.notification_type||"",dto.markable=qbMessage.notification_type||"",dto}static convertAttachment(attachment){return{id:attachment.id.toString(),uid:attachment.uid||"",type:attachment.type.toString(),url:attachment.url||"",name:attachment.name||"",size:attachment.size||0}}static convertToQBChatNewMessage(messages){return messages.map(message=>{var _message$attachments;return{_id:message.id,attachments:(null===(_message$attachments=message.attachments)||void 0===_message$attachments?void 0:_message$attachments.map(attachment=>MessageDTOMapper.convertAttachment(attachment)))||[],chat_dialog_id:message.dialogId,created_at:message.created_at,date_sent:message.date_sent,delivered_ids:message.delivered_ids,message:message.message,read_ids:message.read_ids,read:message.read,recipient_id:message.recipient_id,sender_id:message.sender_id,updated_at:message.updated_at,notification_type:message.notification_type,qb_message_action:message.qb_message_action,origin_sender_name:message.origin_sender_name,qb_original_messages:message.qb_original_messages?MessageDTOMapper.translateOriginalDataToJSON(MessageDTOMapper.convertToQBChatNewMessage(message.qb_original_messages||[])||[]):void 0}})}static translateOriginalDataToJSON(qb_original_message){return qb_original_message&&qb_original_message.length>0?JSON.stringify(qb_original_message):""}static translateJSONToOriginalData(json_data){if(json_data)try{let originalData=JSON.parse(json_data);if(Array.isArray(originalData)&&originalData.every(item=>item instanceof Object))return originalData}catch(error){console.error("Error parsing JSON:",error)}}static isForwardedOrRepliedMessage(qbMessage){return qbMessage.includes(MessageDTOMapper.FORWARD_MESSAGE_PREFIX)||qbMessage.includes(MessageDTOMapper.REPLY_MESSAGE_PREFIX)}static isMediaOrAttachmentMessage(message){return message.includes(MessageDTOMapper.MEDIA_CONTENT_ENTITY_PREFIX)||message.includes(MessageDTOMapper.ATTACHMENT_PREFIX)}static formatMessage(qbMessage){return MessageDTOMapper.isMediaOrAttachmentMessage(qbMessage)?this.splitMessageParts(qbMessage)[1]||"":MessageDTOMapper.isForwardedOrRepliedMessage(qbMessage)?"":qbMessage}static getMessageParts(qbMessage){return MessageDTOMapper.isMediaOrAttachmentMessage(qbMessage)?MessageDTOMapper.splitMessageParts(qbMessage):[]}static splitMessageParts(message){return message.split("|")}static validateDTO(messageDTO){let messageDTOValidator={created_at(v){let{created_at}=v;return null!=created_at&&created_at.length>0},date_sent(v){let{date_sent}=v;return null!=date_sent},delivered_ids(v){let{delivered_ids}=v;return null!=delivered_ids},dialogId(v){let{dialogId}=v;return null!=dialogId&&dialogId.length>0},id(v){let{id}=v;return null!=id},message(v){let{message}=v;return null!=message&&message.length>0},read(v){let{read}=v;return null!=read},read_ids(v){let{read_ids}=v;return null!=read_ids},recipient_id(v){let{recipient_id}=v;return null!=recipient_id},sender_id(v){let{sender_id}=v;return null!=sender_id},updated_at(v){let{updated_at}=v;return null!=updated_at&&updated_at.length>0},attachments(v){let{attachments}=v;return null!=attachments}};if(!messageDTOValidator.created_at(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty");if(!messageDTOValidator.date_sent(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {date_sent} does not exist or empty");if(!messageDTOValidator.delivered_ids(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {delivered_ids} does not exist or empty");if(!messageDTOValidator.dialogId(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {dialogId} does not exist or empty");if(!messageDTOValidator.id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!messageDTOValidator.message(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {message} does not exist or empty");if(!messageDTOValidator.read(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read} does not exist or empty");if(!messageDTOValidator.read_ids(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read_ids} does not exist or empty");if(!messageDTOValidator.recipient_id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {recipient_id} does not exist or empty");if(!messageDTOValidator.sender_id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {sender_id} does not exist or empty");if(!messageDTOValidator.updated_at(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty")}static validateQBMessage(qbMessage){let qbMessageValidator={delivered_ids(v){let{delivered_ids}=v;return null!=delivered_ids},read_ids(v){let{read_ids}=v;return null!=read_ids},_id(v){let{_id}=v;return null!=_id&&_id.length>0},attachments(v){let{attachments}=v;return null!=attachments},chat_dialog_id(v){let{chat_dialog_id}=v;return null!=chat_dialog_id&&chat_dialog_id.length>0},created_at(v){let{created_at}=v;return null!=created_at&&created_at.length>0},date_sent(v){let{date_sent}=v;return null!=date_sent},message(v){let{message}=v;return null!=message&&message.length>0},read(v){let{read}=v;return null!=read},recipient_id(v){let{recipient_id}=v;return null!=recipient_id},sender_id(v){let{sender_id}=v;return null!=sender_id},updated_at(v){let{updated_at}=v;return null!=updated_at&&updated_at.length>0}};if(!qbMessageValidator._id(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {_id} does not exist or empty");if(!qbMessageValidator.chat_dialog_id(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {chat_dialog_id} does not exist or empty");if(!qbMessageValidator.created_at(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty");if(!qbMessageValidator.date_sent(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {date_sent} does not exist or empty");if(!qbMessageValidator.message(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {message} does not exist or empty");if(!qbMessageValidator.read(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read} does not exist or empty");if(!qbMessageValidator.recipient_id(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {recipient_id} does not exist or empty");if(!qbMessageValidator.sender_id(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {sender_id} does not exist or empty");if(!qbMessageValidator.updated_at(qbMessage))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty")}}function trimMessage(messageText){return"".concat(messageText.substring(0,39)," ...")}MessageDTOMapper.FORWARD_MESSAGE_PREFIX="[Forwarded_Message]",MessageDTOMapper.REPLY_MESSAGE_PREFIX="[Replied_Message]",MessageDTOMapper.ATTACHMENT_PREFIX="[Attachment]",MessageDTOMapper.MEDIA_CONTENT_ENTITY_PREFIX="MediaContentEntity";let ReplyMessagePreview_ReplyMessagePreview=_ref=>{var _messages$;let{messages,userNameSentMessage,onClose}=_ref,[messageTextValue,setMessageTextValue]=react.useState("");return(0,react.useEffect)(()=>{setMessageTextValue(MessageDTOMapper.formatMessage(messages[0].message))},[null===(_messages$=messages[0])||void 0===_messages$?void 0:_messages$.message]),(0,jsx_runtime.jsxs)("div",{className:"reply-message-preview-row",children:[(0,jsx_runtime.jsxs)("div",{className:"reply-message-preview-row-card",children:[messages.length>0&&messages[0].attachments&&messages[0].attachments.length>0?(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-placeholder",children:(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-placeholder-icon",children:messages&&messages[0].attachments&&messages[0].attachments.length>0&&messages[0].attachments[0].type.toString().includes(FileType.image)&&messages[0].attachments[0].file?(0,jsx_runtime.jsx)(ReplyImagePreviewAttachment_ReplyImagePreviewAttachment,{imageFile:messages[0].attachments[0].file}):(0,jsx_runtime.jsx)(Media_TextDocument,{width:"24",height:"24",color:"var(--caption)"})})}):null,(0,jsx_runtime.jsxs)("div",{className:"reply-message-preview-message",children:[(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-message-caption",children:(0,jsx_runtime.jsxs)("div",{className:"reply-message-preview-message-caption-info",children:[(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-message-caption-info-icon",children:(0,jsx_runtime.jsx)(ReplyFilled,{width:"16",height:"16",color:"var(--caption)"})}),(0,jsx_runtime.jsxs)("div",{className:"reply-message-preview-message-caption-info-replied-to-name",children:["Reply to ",userNameSentMessage]})]})}),messages.length>0&&(!messages[0].attachments||messages[0].attachments&&0===messages[0].attachments.length)?(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-message-caption-info-text",children:messages.length>1?"2 messages":trimMessage(messageTextValue)}):(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-message-caption-info-file",children:messages.length>1?"2 messages":trimMessage(messageTextValue)})]})]}),(0,jsx_runtime.jsx)("div",{className:"reply-message-preview-message-navigation-close",onClick:onClose,children:(0,jsx_runtime.jsx)(icons.sZ,{className:"reply-message-icon"})})]})};try{ReplyMessagePreview_ReplyMessagePreview.displayName="ReplyMessagePreview",ReplyMessagePreview_ReplyMessagePreview.__docgenInfo={description:"",displayName:"ReplyMessagePreview",props:{messages:{defaultValue:null,description:"",name:"messages",required:!0,type:{name:"MessageEntity[]"}},userNameSentMessage:{defaultValue:null,description:"",name:"userNameSentMessage",required:!0,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!0,type:{name:"FunctionTypeVoidToVoid"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.tsx#ReplyMessagePreview"]={docgenInfo:ReplyMessagePreview_ReplyMessagePreview.__docgenInfo,name:"ReplyMessagePreview",path:"src/Presentation/ui-components/MessageInput/ReplyMessagePreview/ReplyMessagePreview.tsx#ReplyMessagePreview"})}catch(__react_docgen_typescript_loader_error){}class DialogType{}DialogType.private=3,DialogType.public=1,DialogType.group=2;class PublicDialogEntity{constructor(customData,id,lastMessage,ownerId,type,unreadMessageCount,updatedAt,name,photo){this.customData=void 0,this.id=void 0,this.lastMessage=void 0,this.ownerId=void 0,this.type=void 0,this.unreadMessageCount=void 0,this.updatedAt=void 0,this.name=void 0,this.photo=void 0,this.customData=customData,this.id=id,this.lastMessage=lastMessage,this.ownerId=ownerId,this.type=type,this.unreadMessageCount=unreadMessageCount,this.updatedAt=updatedAt,this.name=name,this.photo=photo}}PublicDialogEntity.getParticipants=d=>d.type===DialogType.group?d.participantIds:d.type===DialogType.private&&d.participantIds&&d.participantIds.length>0?[d.participantIds[0]]:d.type===DialogType.private&&d.participantId?[d.participantId]:[],PublicDialogEntity.getNewParticipants=d=>d.type===DialogType.group&&d.newParticipantIds||[];class PrivateDialogEntity{constructor(customData,id,name,lastMessage,ownerId,type,unreadMessageCount,updatedAt,participantId){this.customData=void 0,this.id=void 0,this.name=void 0,this.lastMessage=void 0,this.ownerId=void 0,this.type=void 0,this.unreadMessageCount=void 0,this.updatedAt=void 0,this.participantId=void 0,this.customData=customData,this.id=id,this.name=name,this.lastMessage=lastMessage,this.ownerId=ownerId,this.type=type,this.unreadMessageCount=unreadMessageCount,this.updatedAt=updatedAt,this.participantId=participantId}}class GroupDialogEntity{constructor(customData,id,lastMessage,ownerId,type,unreadMessageCount,updatedAt,participantIds,name,photo){this.customData=void 0,this.id=void 0,this.lastMessage=void 0,this.ownerId=void 0,this.type=void 0,this.unreadMessageCount=void 0,this.updatedAt=void 0,this.participantIds=void 0,this.newParticipantIds=void 0,this.participantsToRemoveIds=void 0,this.name=void 0,this.photo=void 0,this.customData=customData,this.id=id,this.lastMessage=lastMessage,this.ownerId=ownerId,this.type=type,this.unreadMessageCount=unreadMessageCount,this.updatedAt=updatedAt,this.participantIds=participantIds,this.name=name,this.photo=photo}}class RemoteDialogDTO{constructor(){this.id=void 0,this.type=void 0,this.ownerId=void 0,this.participantId=void 0,this.participantsIds=void 0,this.newParticipantsIds=void 0,this.updatedAt=void 0,this.lastMessageText=void 0,this.lastMessageUserId=void 0,this.lastMessageDateSent=void 0,this.lastMessageId=void 0,this.unreadMessageCount=void 0,this.name=void 0,this.photo=void 0,this.id="",this.type=0,this.ownerId="",this.participantId="",this.participantsIds=[],this.updatedAt="",this.lastMessageText="",this.lastMessageUserId=0,this.lastMessageDateSent=0,this.lastMessageId="",this.unreadMessageCount=0,this.name="",this.photo=""}}class RemoteUserDTO{constructor(){this.id=void 0,this.name=void 0,this.full_name=void 0,this.email=void 0,this.login=void 0,this.created_at=void 0,this.updated_at=void 0,this.last_request_at=void 0,this.custom_data=void 0,this.user_tags=void 0,this.blob_id=void 0,this.id="",this.name="",this.full_name="",this.email="",this.login="",this.created_at="",this.updated_at="",this.last_request_at="",this.custom_data="",this.user_tags="",this.blob_id=0}}class Creator{static async createBlobFromUrl(imageSrc){let imgSrc="",setBlob=async function(response){let blob=await (null==response?void 0:response.blob());imgSrc=URL.createObjectURL(blob)},blobFile=await fetch(imageSrc).catch(async function(){let response=await fetch(imageSrc);response.ok&&await setBlob(response)}).then(function(response){return null==response?void 0:response.blob()});return{imgSrc,blobFile}}static async getInfoPromise(fileId){return new Promise((resolve,reject)=>{quickblox_default().content.getInfo(fileId,function(error,result){error?reject(error):resolve(result.blob.uid)})})}static createMessageEntity(params){return{id:params.id||"",dialogId:params.dialogId,message:params.message,created_at:params.created_at||new Date().toISOString(),date_sent:params.date_sent||Date.now(),updated_at:params.updated_at||new Date().toISOString(),delivered_ids:params.delivered_ids||[],read_ids:params.read_ids||[],read:params.read||1,sender_id:params.sender_id,recipient_id:params.recipient_id,attachments:params.attachments,notification_type:params.notification_type,dialogType:params.dialog_type}}static createFileEntity(){return{id:"0",uid:"",url:"",name:"",size:0,type:FileType.image}}}Creator.createPhotoByBlob=async blob_id=>{let file_uid=await Creator.getInfoPromise(blob_id||0),imageSrc=quickblox_default().content.privateUrl(file_uid),{imgSrc,blobFile}=await Creator.createBlobFromUrl(imageSrc);return blobFile?URL.createObjectURL(blobFile):imgSrc||""};class UserRemoteDTOMapper{fromEntity(entity){if(null==entity)throw new MapperDTOException(UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,131,"entity is null or undefined");let userDTO=new RemoteUserDTO;return UserRemoteDTOMapper.validateEntity(entity),userDTO.id=entity.id.toString(),userDTO.full_name=entity.full_name,userDTO.email=entity.email,userDTO.login=entity.login,userDTO.created_at=entity.created_at,userDTO.updated_at=entity.updated_at,userDTO.last_request_at=entity.last_request_at,userDTO.custom_data=entity.custom_data,userDTO.user_tags=entity.user_tags,Promise.resolve(userDTO)}async toEntity(data){if(null==data)throw new MapperDTOException(UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,131,"userDTO is null or undefined");UserRemoteDTOMapper.validateDTO(data);let userEntity=UserRemoteDTOMapper.createDefaultUserEntity();return userEntity.id=parseInt(data.id,10),userEntity.full_name=data.full_name,userEntity.email=data.email,userEntity.login=data.login,userEntity.created_at=data.created_at,userEntity.updated_at=data.updated_at,userEntity.last_request_at=data.last_request_at,userEntity.custom_data=data.custom_data,userEntity.user_tags=data.user_tags,data.blob_id&&(userEntity.photo=await Creator.createPhotoByBlob(data.blob_id)),Promise.resolve(userEntity)}static validateEntity(userEntity){let userEntityValidator={blob_id(v){let{blob_id}=v;return(blob_id||"").length>=0},photo(v){let{photo}=v;return null!=photo&&photo.length>0},created_at(v){let{created_at}=v;return null!=created_at&&created_at.length>0},custom_data(v){let{custom_data}=v;return custom_data||!0},email(v){let{email}=v;return null!=email&&email.length>0},full_name(v){let{full_name}=v;return null!=full_name&&full_name.length>0},id(v){let{id}=v;return null!=id},last_request_at(v){let{last_request_at}=v;return null!=last_request_at&&last_request_at.length>0},login(v){let{login}=v;return null!=login&&login.length>0},updated_at(v){let{updated_at}=v;return null!=updated_at&&updated_at.length>0},user_tags(v){let{user_tags}=v;return user_tags||!0}};if(!userEntityValidator.blob_id(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {blob_id} does not exists or empty");if(!userEntityValidator.created_at(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty");if(!userEntityValidator.custom_data(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {custom_data} does not exist or empty");if(!userEntityValidator.email(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {email} does not exist or empty");if(!userEntityValidator.full_name(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {full_name} does not exist or empty");if(!userEntityValidator.id(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!userEntityValidator.last_request_at(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {last_request_at} does not exist or empty");if(!userEntityValidator.id(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!userEntityValidator.updated_at(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty");if(!userEntityValidator.user_tags(userEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {user_tags} does not exist or empty")}static validateDTO(userDTO){let dtoValidator={blob_id(v){let{blob_id}=v,result=blob_id||"";return result&&result.length&&result.length>=0||!0},created_at(v){let{created_at}=v;return void 0!==created_at},custom_data(v){let{created_at}=v;return void 0!==created_at},email(v){let{email}=v;return void 0!==email},full_name(v){let{full_name}=v;return void 0!==full_name},id(v){let{id}=v;return void 0!==id},last_request_at(v){let{last_request_at}=v;return void 0!==last_request_at},login(v){let{login}=v;return void 0!==login},name(v){let{name}=v;return void 0!==name},updated_at(v){let{updated_at}=v;return void 0!==updated_at},user_tags(v){let{user_tags}=v;return void 0!==user_tags}};if(!dtoValidator.blob_id(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {blob_id} does not exists or empty in DTO");if(!dtoValidator.created_at(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty in DTO");if(!dtoValidator.custom_data(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {custom_data} does not exist or empty in DTO");if(!dtoValidator.email(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {email} does not exist or empty in DTO");if(!dtoValidator.full_name(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {full_name} does not exist or empty in DTO");if(!dtoValidator.id(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty in DTO");if(!dtoValidator.last_request_at(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {last_request_at} does not exist or empty in DTO");if(!dtoValidator.login(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {login} does not exist or empty in DTO");if(!dtoValidator.name(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {name} does not exist or empty in DTO");if(!dtoValidator.updated_at(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty in DTO");if(!dtoValidator.user_tags(userDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {user_tags} does not exist or empty in DTO")}static createDefaultUserEntity(){return{created_at:"",custom_data:"",email:"",full_name:"",id:0,last_request_at:"",login:"",updated_at:"",user_tags:"",blob_id:"",photo:""}}}class LocalDialogDTO{constructor(){this.id=void 0,this.type=void 0,this.ownerId=void 0,this.participantId=void 0,this.participantsIds=void 0,this.updatedAt=void 0,this.lastMessageText=void 0,this.lastMessageDateSent=void 0,this.lastMessageUserId=void 0,this.unreadMessageCount=void 0,this.name=void 0,this.photo=void 0,this.id="",this.type=0,this.ownerId="",this.participantId="",this.participantsIds=[],this.updatedAt="",this.lastMessageText="",this.lastMessageDateSent=0,this.lastMessageUserId="",this.unreadMessageCount=0,this.name="",this.photo=""}}class DialogLocalDTOMapper{fromEntity(entity){let dialog=new LocalDialogDTO,dialogEntity=this.defineType(entity);return DialogLocalDTOMapper.validateEntity(dialogEntity),dialog.id=dialogEntity.id,dialog.type=dialogEntity.type,dialog.ownerId=dialogEntity.ownerId,dialog.participantsIds=DialogLocalDTOMapper.getParticipantsIds(dialogEntity),dialog.participantId=DialogLocalDTOMapper.getParticipantId(dialogEntity),dialog.updatedAt=dialogEntity.updatedAt,dialog.lastMessageText=dialogEntity.lastMessage.text,dialog.lastMessageUserId=dialogEntity.lastMessage.userId.toString(),dialog.lastMessageDateSent=dialogEntity.lastMessage.dateSent,dialog.unreadMessageCount=dialogEntity.unreadMessageCount,dialog.name=DialogLocalDTOMapper.getDialogName(dialogEntity),dialog.photo=DialogLocalDTOMapper.getPhoto(dialogEntity),Promise.resolve(dialog)}toEntity(data){DialogLocalDTOMapper.validateLocalDTO(data);let entity=DialogLocalDTOMapper.createDefaultDialogEntity(data.ownerId);switch(data.type){case DialogType.private:entity=new PrivateDialogEntity({todo:""},data.id,data.name,{dateSent:data.lastMessageDateSent,text:data.lastMessageText?data.lastMessageText:"",userId:parseInt(data.lastMessageUserId,10)},data.ownerId,data.type,data.unreadMessageCount,data.updatedAt,parseInt(data.participantId,10));break;case DialogType.public:entity=new PublicDialogEntity({todo:""},data.id,{dateSent:data.lastMessageDateSent,text:data.lastMessageText?data.lastMessageText:"",userId:parseInt(data.lastMessageUserId,10)},data.ownerId,data.type,data.unreadMessageCount,data.updatedAt,data.name,data.photo);break;case DialogType.group:entity=new GroupDialogEntity({todo:""},data.id,{dateSent:data.lastMessageDateSent,text:data.lastMessageText?data.lastMessageText:"",userId:parseInt(data.lastMessageUserId,10)},data.ownerId,data.type,data.unreadMessageCount,data.updatedAt,data.participantsIds,data.name,data.photo);break;default:return Promise.reject(new MapperDTOException(UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,131,"undefinded type dialog in DTO"))}return Promise.resolve(entity)}defineType(entity){let dialogEntity=entity;switch(dialogEntity.type){case DialogType.private:dialogEntity=entity instanceof PrivateDialogEntity?entity:null;break;case DialogType.public:dialogEntity=entity instanceof PublicDialogEntity?entity:null;break;case DialogType.group:dialogEntity=entity instanceof GroupDialogEntity?entity:null;break;default:dialogEntity=null}if(!dialogEntity)throw new MapperDTOException(UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,131,"wrong type");return dialogEntity}static getPhoto(dialogEntity){return(dialogEntity instanceof GroupDialogEntity||dialogEntity instanceof PublicDialogEntity)&&dialogEntity.photo||""}static getDialogName(dialogEntity){return dialogEntity instanceof GroupDialogEntity||dialogEntity instanceof PublicDialogEntity||dialogEntity instanceof PrivateDialogEntity?dialogEntity.name:""}static getParticipantId(dialogEntity){return dialogEntity instanceof PrivateDialogEntity?dialogEntity.participantId.toString():""}static getParticipantsIds(dialogEntity){return dialogEntity instanceof GroupDialogEntity?dialogEntity.participantIds:[]}static validateEntity(dialogEntity){return dialogEntity instanceof PrivateDialogEntity?DialogLocalDTOMapper.validateIsPrivateDialogCorrect(dialogEntity):dialogEntity instanceof PublicDialogEntity?DialogLocalDTOMapper.validateIsPublicDialogCorrect(dialogEntity):dialogEntity instanceof GroupDialogEntity?DialogLocalDTOMapper.validateIsGroupDialogCorrect(dialogEntity):Promise.resolve()}static validateIsPrivateDialogCorrect(dialogEntity){let privateDialogEntityValidator={name(v){let{name}=v;return null!=name&&name.length>0},customData(v){let{customData}=v;return void 0!==customData&&void 0!==customData.todo},id(v){let{id}=v;return null!=id},lastMessage(v){let{lastMessage}=v;return null!=lastMessage&&void 0!==lastMessage.dateSent&&void 0!==lastMessage.text&&void 0!==lastMessage.userId},ownerId(v){let{ownerId}=v;return null!=ownerId},participantId(v){let{participantId}=v;return null!=participantId},type(v){let{type}=v;return null!=type},unreadMessageCount(v){let{unreadMessageCount}=v;return null!=unreadMessageCount},updatedAt(v){let{updatedAt}=v;return null!=updatedAt}};if(!privateDialogEntityValidator.id(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!privateDialogEntityValidator.name(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {name} does not exist or empty");if(!privateDialogEntityValidator.customData(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {customData} does not exist or empty");if(!privateDialogEntityValidator.lastMessage(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {lastMessage} does not exist or empty");if(!privateDialogEntityValidator.ownerId(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {ownerId} does not exist or empty");if(!privateDialogEntityValidator.participantId(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {participantId} does not exist or empty");if(!privateDialogEntityValidator.type(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {type} does not exist or empty");if(!privateDialogEntityValidator.unreadMessageCount(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {unreadMessageCount} does not exist or empty");if(!privateDialogEntityValidator.updatedAt(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updatedAt} does not exist or empty")}static validateIsPublicDialogCorrect(dialogEntity){let publicDialogEntityValidator={customData(v){let{customData}=v;return void 0!==customData&&void 0!==customData.todo},id(v){let{id}=v;return null!=id},lastMessage(v){let{lastMessage}=v;return null!=lastMessage&&void 0!==lastMessage.dateSent&&void 0!==lastMessage.text&&void 0!==lastMessage.userId},ownerId(v){let{ownerId}=v;return null!=ownerId},type(v){let{type}=v;return null!=type},unreadMessageCount(v){let{unreadMessageCount}=v;return null!=unreadMessageCount},updatedAt(v){let{updatedAt}=v;return null!=updatedAt},name(v){let{name}=v;return null!=name&&name.length>0},photo(v){let{photo}=v;return null!=photo}};if(!publicDialogEntityValidator.id(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!publicDialogEntityValidator.customData(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {customData} does not exist or empty");if(!publicDialogEntityValidator.lastMessage(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {lastMessage} does not exist or empty");if(!publicDialogEntityValidator.ownerId(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {ownerId} does not exist or empty");if(!publicDialogEntityValidator.type(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {type} does not exist or empty");if(!publicDialogEntityValidator.unreadMessageCount(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {unreadMessageCount} does not exist or empty");if(!publicDialogEntityValidator.updatedAt(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updatedAt} does not exist or empty");if(!publicDialogEntityValidator.name(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {name} does not exist or empty");if(!publicDialogEntityValidator.photo(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {photo} does not exist or empty")}static validateIsGroupDialogCorrect(dialogEntity){let groupDialogEntityValidator={customData(v){let{customData}=v;return void 0!==customData&&void 0!==customData.todo},id(v){let{id}=v;return null!=id},lastMessage(v){let{lastMessage}=v;return null!=lastMessage&&void 0!==lastMessage.dateSent&&void 0!==lastMessage.text&&void 0!==lastMessage.userId},ownerId(v){let{ownerId}=v;return null!=ownerId},type(v){let{type}=v;return null!=type},unreadMessageCount(v){let{unreadMessageCount}=v;return null!=unreadMessageCount},updatedAt(v){let{updatedAt}=v;return null!=updatedAt},name(v){let{name}=v;return null!=name},photo(v){let{photo}=v;return null!=photo},participantIds(v){let{participantIds}=v;return null!=participantIds}};if(!groupDialogEntityValidator.id(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!groupDialogEntityValidator.customData(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {customData} does not exist or empty");if(!groupDialogEntityValidator.lastMessage(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {lastMessage} does not exist or empty");if(!groupDialogEntityValidator.ownerId(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {ownerId} does not exist or empty");if(!groupDialogEntityValidator.type(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {type} does not exist or empty");if(!groupDialogEntityValidator.unreadMessageCount(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {unreadMessageCount} does not exist or empty");if(!groupDialogEntityValidator.updatedAt(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updatedAt} does not exist or empty");if(!groupDialogEntityValidator.name(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {name} does not exist or empty");if(!groupDialogEntityValidator.photo(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {photo} does not exist or empty");if(!groupDialogEntityValidator.participantIds(dialogEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {participantIds} does not exist or empty")}static validateLocalDTO(data){let dtoValidator={id(v){let{id}=v;return void 0!==id},lastMessageDateSent(v){let{lastMessageDateSent}=v;return void 0!==lastMessageDateSent},lastMessageText(v){let{lastMessageText}=v;return void 0!==lastMessageText},lastMessageUserId(v){let{lastMessageUserId}=v;return void 0!==lastMessageUserId},name(v){let{name}=v;return void 0!==name},ownerId(v){let{ownerId}=v;return void 0!==ownerId},participantId(v){let{participantId}=v;return void 0!==participantId},participantsIds(v){let{participantsIds}=v;return void 0!==participantsIds},photo(v){let{photo}=v;return void 0!==photo},type(v){let{type}=v;return void 0!==type},unreadMessageCount(v){let{unreadMessageCount}=v;return void 0!==unreadMessageCount},updatedAt(v){let{updatedAt}=v;return void 0!==updatedAt}};if(!dtoValidator.id(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty in DTO");if(!dtoValidator.lastMessageDateSent(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {lastMessageDateSent} does not exist or empty in DTO");if(!dtoValidator.lastMessageText(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {lastMessageText} does not exist or empty in DTO");if(!dtoValidator.name(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {name} does not exist or empty in DTO");if(!dtoValidator.ownerId(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {ownerId} does not exist or empty in DTO");if(!dtoValidator.participantId(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {participantId} does not exist or empty in DTO");if(!dtoValidator.participantsIds(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {participantsIds} does not exist or empty in DTO");if(!dtoValidator.photo(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {photo} does not exist or empty in DTO");if(!dtoValidator.type(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {type} does not exist or empty in DTO");if(!dtoValidator.unreadMessageCount(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {unreadMessageCount} does not exist or empty in DTO");if(!dtoValidator.updatedAt(data))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updatedAt} does not exist or empty in DTO")}static createDefaultDialogEntity(owner_id){return{customData:{todo:""},lastMessage:{dateSent:0,text:"",userId:0},ownerId:owner_id,type:DialogType.public,unreadMessageCount:0,updatedAt:"",id:"",name:"_"}}}class LocalMessageDTO{constructor(){this.id=void 0,this.dialogId=void 0,this.dialog_type=void 0,this.message=void 0,this.created_at=void 0,this.date_sent=void 0,this.delivered_ids=void 0,this.read_ids=void 0,this.read=void 0,this.recipient_id=void 0,this.sender_id=void 0,this.updated_at=void 0,this.attachments=void 0,this.notification_type=void 0,this.markable=void 0,this.id="",this.dialogId="",this.message="",this.created_at="",this.date_sent=0,this.delivered_ids=[],this.read_ids=[],this.recipient_id=0,this.read=0,this.sender_id=0,this.updated_at="",this.attachments=[]}}class MessageLocalDTOMapper{fromEntity(entity){let messageDTO=new LocalMessageDTO;if(null==entity)throw new MapperDTOException(UNEXPECTED_MAPPER_DTO_EXCEPTION_MESSAGE,131,"entity is null or undefined");return MessageLocalDTOMapper.validateEntity(entity),messageDTO.id=entity.id.toString(),messageDTO.dialogId=entity.dialogId,messageDTO.created_at=entity.created_at,messageDTO.date_sent=entity.date_sent,messageDTO.delivered_ids=entity.delivered_ids,messageDTO.message=entity.message,messageDTO.read_ids=entity.read_ids,messageDTO.read=entity.read?1:0,null!==entity.recipient_id&&(messageDTO.recipient_id=entity.recipient_id),messageDTO.notification_type=entity.notification_type,messageDTO.dialog_type=entity.dialogType,messageDTO.sender_id=entity.sender_id,messageDTO.updated_at=entity.updated_at,entity.attachments&&entity.attachments.length&&entity.attachments.forEach(att=>{let newAtt={...att};messageDTO.attachments.push(newAtt)}),Promise.resolve(messageDTO)}toEntity(data){MessageLocalDTOMapper.validateLocalDTO(data);let messageEntity=MessageLocalDTOMapper.createDefaultMessageEntity();return messageEntity.id=data.id,messageEntity.dialogId=data.dialogId,messageEntity.created_at=data.created_at,messageEntity.date_sent=data.date_sent,messageEntity.delivered_ids=data.delivered_ids,messageEntity.message=data.message,messageEntity.read_ids=data.read_ids,messageEntity.read=data.read,messageEntity.recipient_id=data.recipient_id,messageEntity.sender_id=data.sender_id,messageEntity.updated_at=data.updated_at,data.attachments&&data.attachments.length&&(messageEntity.attachments=[],data.attachments.forEach(att=>{var _messageEntity$attach;let newAtt={...att};null===(_messageEntity$attach=messageEntity.attachments)||void 0===_messageEntity$attach||_messageEntity$attach.push(newAtt)})),messageEntity.notification_type=null!=data&&data.notification_type?null==data?void 0:data.notification_type:"",messageEntity.markable=null!=data&&data.markable?null==data?void 0:data.markable:"",Promise.resolve(messageEntity)}static validateEntity(messageEntity){let messageEntityValidator={created_at(v){let{created_at}=v;return null!=created_at&&created_at.length>0},date_sent(v){let{date_sent}=v;return null!=date_sent},delivered_ids(v){let{delivered_ids}=v;return null!=delivered_ids},dialogId(v){let{dialogId}=v;return null!=dialogId&&dialogId.length>0},id(v){let{id}=v;return null!=id},message(v){let{message}=v;return null!=message&&message.length>0},read(v){let{read}=v;return null!=read},read_ids(v){let{read_ids}=v;return null!=read_ids},recipient_id(v){let{recipient_id}=v;return null!=recipient_id},sender_id(v){let{sender_id}=v;return null!=sender_id},updated_at(v){let{updated_at}=v;return null!=updated_at&&updated_at.length>0}};if(!messageEntityValidator.created_at(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty");if(!messageEntityValidator.date_sent(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {date_sent} does not exist or empty");if(!messageEntityValidator.delivered_ids(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {delivered_ids} does not exist or empty");if(!messageEntityValidator.dialogId(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {dialogId} does not exist or empty");if(!messageEntityValidator.id(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!messageEntityValidator.message(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {message} does not exist or empty");if(!messageEntityValidator.read(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read} does not exist or empty");if(!messageEntityValidator.read_ids(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read_ids} does not exist or empty");if(!messageEntityValidator.recipient_id(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {recipient_id} does not exist or empty");if(!messageEntityValidator.sender_id(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {sender_id} does not exist or empty");if(!messageEntityValidator.updated_at(messageEntity))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty");return Promise.resolve()}static validateLocalDTO(messageDTO){let dtoValidator={created_at(v){let{created_at}=v;return null!=created_at&&created_at.length>0},date_sent(v){let{date_sent}=v;return null!=date_sent},delivered_ids(v){let{delivered_ids}=v;return null!=delivered_ids},dialogId(v){let{dialogId}=v;return null!=dialogId&&dialogId.length>0},id(v){let{id}=v;return null!=id},message(v){let{message}=v;return null!=message&&message.length>0},read(v){let{read}=v;return null!=read},read_ids(v){let{read_ids}=v;return null!=read_ids},recipient_id(v){let{recipient_id}=v;return null!=recipient_id},sender_id(v){let{sender_id}=v;return null!=sender_id},updated_at(v){let{updated_at}=v;return null!=updated_at&&updated_at.length>0},attachments(v){let{attachments}=v;return null!=attachments}};if(!dtoValidator.created_at(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {created_at} does not exist or empty");if(!dtoValidator.date_sent(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {date_sent} does not exist or empty");if(!dtoValidator.delivered_ids(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {delivered_ids} does not exist or empty");if(!dtoValidator.dialogId(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {dialogId} does not exist or empty");if(!dtoValidator.id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {id} does not exist or empty");if(!dtoValidator.message(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {message} does not exist or empty");if(!dtoValidator.read(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read} does not exist or empty");if(!dtoValidator.read_ids(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {read_ids} does not exist or empty");if(!dtoValidator.recipient_id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {recipient_id} does not exist or empty");if(!dtoValidator.sender_id(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {sender_id} does not exist or empty");if(!dtoValidator.updated_at(messageDTO))throw new MapperDTOException(INCORRECT_DATA_MAPPER_DTO_EXCEPTION_MESSAGE,132,"field {updated_at} does not exist or empty")}static createDefaultMessageEntity(){return{id:"",dialogId:"",created_at:"",date_sent:0,delivered_ids:[],message:"",read_ids:[],read:0,recipient_id:0,sender_id:0,updated_at:""}}}class Stubs{static createMessageEntityWithParams(id,dialogId,message,created_at,date_sent,updated_at,delivered_ids,read_ids,read,sender_id,recipient_id,attachments,notification_type,dialog_type){return{created_at,date_sent,delivered_ids,dialogId,id,message,read,read_ids,recipient_id,sender_id,updated_at,attachments,notification_type,dialogType:dialog_type}}static createFileEntityWithDefaultValues(){return{id:"0",uid:"",url:"",name:"",size:0,type:FileType.image}}static async initializeWithUsersMockData(ds){console.log("local datasource sync status: ",ds.isLocalSynced());let userEntities=Stubs.createUsersForTest(),userEntityToDTOMapper=new UserRemoteDTOMapper;for(let entity of userEntities)try{let userDTO=await userEntityToDTOMapper.fromEntity(entity);await ds.saveUser(userDTO)}catch(e){console.log("EXCEPTION UserEntity perform: ",JSON.stringify(entity)),console.log(e.message),console.log(e._description)}}static async initializeWithDialogsMockData(ds){console.log("local datasource sync status: ",ds.isLocalSynced());let dialogsDTOtoEntityMapper=new DialogLocalDTOMapper;for(let item of Stubs.createDialogsForTest()){let dialogDTO=await dialogsDTOtoEntityMapper.fromEntity(item);ds.saveDialog(dialogDTO).then(_=>{console.log("added mock item ".concat(JSON.stringify(dialogDTO)))}).catch(e=>{console.log("EXCEPTION:",e.message)})}}static async initializeWithMessagesMockData(ds){console.log("call initializeWithMessagesMockData");let initFirstPageMessages=[],photoAttachments=[{id:"10231",type:FileType.image,uid:"10231",url:"https://via.placeholder.com/600/92c952",file:{id:"10231",uid:"",type:FileType.image,url:"https://via.placeholder.com/600/92c952"}}],videoAttachments=[{id:"10232",type:FileType.video,uid:"10232",url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4",file:{id:"10232",uid:"",type:FileType.video,url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4"}}];FileType.audio,FileType.audio;let textAttachments=[{id:"10233",type:FileType.text,uid:"10233",url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt",file:{id:"10233",uid:"",type:FileType.text,url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt"},name:"textFile.txt"}];for(let i=0;i<47;i+=1){let newMessageEntity=Stubs.createMessageEntityWithParams(i.toString(),"103",i%9==0?"".concat(i+1," very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc"):"".concat(i+1," test message for dialog 103"),"31.03.2023",Date.now(),"31.03.2023",[134885168,12,13],[134885168,12,13],1,i%2==0?134885168:12,i%2==0?12:134885168,4===i?photoAttachments:5===i?videoAttachments:void 0,i%7==0?"3":void 0);initFirstPageMessages.push(newMessageEntity)}for(let i=47;i<100;i+=1){let newMessageEntity=Stubs.createMessageEntityWithParams(i.toString(),"103","".concat(i+1," test message for dialog 103"),"31.03.2023",Date.now(),"31.03.2023",[134885168,12,13],[134885168,12,13],1,134885168,12,textAttachments);initFirstPageMessages.push(newMessageEntity)}let messageEntityToDTOMapper=new MessageLocalDTOMapper;for(let entity of initFirstPageMessages)try{let messageDTO=await messageEntityToDTOMapper.fromEntity(entity);await ds.saveMessage(messageDTO)}catch(e){console.log("EXCEPTION MessageEntity perform: ",JSON.stringify(entity)),console.log(e.message),console.log(e._description)}}static initializeMessagesWithMockData(){let initFirstPageMessages=[],photoAttachments=[{id:"10231",type:FileType.image,uid:"10231",url:"https://via.placeholder.com/600/92c952",file:{id:"10231",uid:"",type:FileType.image,url:"https://via.placeholder.com/600/92c952"}}],videoAttachments=[{id:"10232",type:FileType.video,uid:"10232",url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4",file:{id:"10232",uid:"",type:FileType.video,url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4"}}],audioAttachments=[{id:"10233",type:FileType.audio,uid:"10233",url:"https://cdn.freesound.org/previews/681/681715_1648170-lq.mp3",file:{id:"10233",uid:"",type:FileType.audio,url:"https://cdn.freesound.org/previews/681/681715_1648170-lq.mp3"}}],textAttachments=[{id:"10233",type:FileType.text,uid:"10233",url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt",file:{id:"10233",uid:"",type:FileType.text,url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt"},name:"textFile.txt"}],createAttachment=i=>{switch(i){case 1:return photoAttachments;case 2:return videoAttachments;case 3:return audioAttachments;case 4:return textAttachments;default:return[]}};for(let i=1;i<=4;i+=1){let newMessageEntity=Stubs.createMessageEntityWithParams(i.toString(),"103",i%3==0?"".concat(i+1," very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc"):"".concat(i+1," test message for dialog 103"),"31.03.2023",Date.now(),"31.03.2023",[134885168,12,13],[134885168,12,13],1,i%2==0?134885168:12,i%2==0?12:134885168,createAttachment(i),i%7==0?"3":void 0);initFirstPageMessages.push(newMessageEntity)}return initFirstPageMessages}static createDialogEntityByTypeWithEmptyValues(dialogType){let dialogEntity;switch(dialogType){case DialogType.private:dialogEntity=new PrivateDialogEntity({todo:""},"","_",{dateSent:0,text:"",userId:0},"",DialogType.private,0,"",0);break;case DialogType.public:dialogEntity=new PublicDialogEntity({todo:""},"",{dateSent:0,text:"",userId:0},"",DialogType.public,0,"","","");break;case DialogType.group:dialogEntity=new GroupDialogEntity({todo:""},"",{dateSent:0,text:"",userId:0},"",DialogType.group,0,"",[],"","");break;default:dialogEntity={customData:{todo:""},id:"",name:"_",lastMessage:{dateSent:0,text:"",userId:0},ownerId:"",type:-1,unreadMessageCount:0,updatedAt:""}}return dialogEntity}static createDialogEntityWithError(){return Stubs.createDialogEntityByTypeWithEmptyValues(-1)}static createDialogEntityByTypeWithDefaultValues(dialogType){let dialogEntity;switch(dialogType){case DialogType.private:dialogEntity=new PrivateDialogEntity({todo:""},"111","_111",{dateSent:0,text:"text test",userId:777},"999",DialogType.private,555,"02.02.2023",333);break;case DialogType.public:dialogEntity=new PublicDialogEntity({todo:""},"111",{dateSent:0,text:"text test",userId:777},"999",DialogType.public,555,"02.02.2023","test public dialog","no photo public dialog");break;case DialogType.group:dialogEntity=new GroupDialogEntity({todo:""},"111",{dateSent:0,text:"text test",userId:777},"999",DialogType.group,555,"02.02.2023",[],"test group dialog","no photo group dialog");break;default:dialogEntity={customData:{todo:""},id:"111",name:"_111",lastMessage:{dateSent:0,text:"text test",userId:777},ownerId:"999",type:-1,unreadMessageCount:555,updatedAt:"03.02.2023"}}return dialogEntity}static createDialogDTOByTypeWithDefaultValues(dialogType){let dto=new RemoteDialogDTO;switch(dialogType){case DialogType.private:dto.id="111",dto.lastMessageDateSent=0,dto.lastMessageText="text test",dto.lastMessageUserId=777,dto.ownerId="999",dto.type=dialogType,dto.unreadMessageCount=555,dto.updatedAt="02.02.2023",dto.participantId="333";break;case DialogType.public:dto.id="111",dto.lastMessageDateSent=0,dto.lastMessageText="text test",dto.lastMessageUserId=777,dto.ownerId="999",dto.type=dialogType,dto.unreadMessageCount=555,dto.updatedAt="02.02.2023",dto.name="test public dialog",dto.photo="no photo public dialog";break;case DialogType.group:dto.id="111",dto.lastMessageDateSent=0,dto.lastMessageText="text test",dto.lastMessageUserId=777,dto.ownerId="999",dto.type=dialogType,dto.unreadMessageCount=555,dto.updatedAt="02.02.2023",dto.participantsIds=[],dto.name="test group dialog",dto.photo="no photo group dialog"}return dto}static createArrayDialogDTOByTypeWithDefaultValues(count,dialogType){let arrayDialogs=[];for(let i=0;i<count;i+=1)Stubs.createDialogDTOByTypeWithDefaultValues(dialogType).id=(1e3+i).toString(),arrayDialogs.push();return arrayDialogs}static createArrayPublicDialogDTO(){return console.log("call createArrayPublicDialogDTO"),[{id:"1",name:"Cash Chat 1",ownerId:"1",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"2",name:"Cash Chat 2",ownerId:"2",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"3",name:"Chat 3 from Cash",ownerId:"3",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"4",name:"Chat 4 from Cash",ownerId:"4",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"5",name:"Chat 5 from Cash",ownerId:"5",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"6",name:"Chat 6 from Cash",ownerId:"6",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"7",name:"Chat 7 Lucky Room",ownerId:"7",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:0,lastMessageUserId:0,lastMessageId:"",unreadMessageCount:0,updatedAt:""}]}static createPublicDialogQBWithEmptyValues(){return{_id:"111",created_at:"01.03.2023",last_message:"test message",last_message_date_sent:0,last_message_id:"100",last_message_user_id:112,name:"",occupants_ids:[],new_occupants_ids:[],photo:null,type:DialogType.public,unread_messages_count:0,updated_at:"02.03.2023",user_id:0,xmpp_room_jid:null}}static createPrivateDialogQBWithEmptyValues(){return{_id:"111",created_at:"01.03.2023",last_message:"test message",last_message_date_sent:0,last_message_id:"100",last_message_user_id:112,name:"",occupants_ids:[],new_occupants_ids:[],photo:null,type:DialogType.private,unread_messages_count:0,updated_at:"02.03.2023",user_id:0,xmpp_room_jid:null}}static createGroupDialogQBWithEmptyValues(){return{_id:"111",created_at:"01.03.2023",last_message:"test message",last_message_date_sent:0,last_message_id:"100",last_message_user_id:112,name:"",occupants_ids:[],new_occupants_ids:[],photo:null,type:DialogType.group,unread_messages_count:0,updated_at:"02.03.2023",user_id:0,xmpp_room_jid:null}}static createDialogEntityWithParams(dialogType,id,name,dateSentLastMessage,textLastMessage,userIdLastMessage,ownerId,unreadMessageCount,updatedAt,participantId){let dialogEntity,photo=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"",participantIds=arguments.length>11&&void 0!==arguments[11]?arguments[11]:[];switch(dialogType){case DialogType.private:dialogEntity=new PrivateDialogEntity({todo:""},id,name,{dateSent:dateSentLastMessage,text:textLastMessage,userId:userIdLastMessage},ownerId,DialogType.private,unreadMessageCount,updatedAt,participantId);break;case DialogType.public:dialogEntity=new PublicDialogEntity({todo:""},id,{dateSent:dateSentLastMessage,text:textLastMessage,userId:userIdLastMessage},ownerId,DialogType.public,unreadMessageCount,updatedAt,name,photo);break;case DialogType.group:dialogEntity=new GroupDialogEntity({todo:""},id,{dateSent:dateSentLastMessage,text:textLastMessage,userId:userIdLastMessage},ownerId,DialogType.group,unreadMessageCount,updatedAt,participantIds,name,photo);break;default:dialogEntity={customData:{todo:""},id:"012345",name:"error dialog",lastMessage:{dateSent:0,text:"text test",userId:12345},ownerId:"12345",type:-1,unreadMessageCount:0,updatedAt:"31.03.2023"}}return dialogEntity}static createUserEntityWithParams(id,full_name,email,login,created_at,updated_at,last_request_at){let custom_data=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,user_tags=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,blob_id=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",photo=arguments.length>10&&void 0!==arguments[10]?arguments[10]:"";return{id,full_name,email,login,created_at,updated_at,last_request_at,blob_id,photo,custom_data,user_tags}}static createDialogsForTest(){let dialogs=[];return dialogs.push(Stubs.createDialogEntityWithParams(DialogType.private,"101","Stub1 Private Dialog",0,"Test text message for private dialog",11,"11",1,"31.03.20223",12)),dialogs.push(Stubs.createDialogEntityWithParams(DialogType.public,"102","Stub2 Public Dialog",0,"Test text message for public dialog",12,"12",1,"31.03.20223",12,"no photo",[11,12,13])),dialogs.push(Stubs.createDialogEntityWithParams(DialogType.group,"103","Stub 3 Group Dialog",0,"Test text message for group dialog",13,"13",1,"31.03.20223",13,"no photo",[11,12,13])),dialogs}static createUsersForTest(){let users=[],user11=Stubs.createUserEntityWithParams(11,"fl_user11","fl_user11@q.ua","login_user11","31.03.2023","31.03.2023",""),user12=Stubs.createUserEntityWithParams(12,"fl_user12","fl_user12@q.ua","login_user12","31.03.2023","31.03.2023",""),user13=Stubs.createUserEntityWithParams(13,"fl_user13","fl_user13@q.ua","login_user13","31.03.2023","31.03.2023","");return users.push(user11),users.push(user12),users.push(user13),users}static createMessagesForTest(){let messages=[],message102_1=Stubs.createMessageEntityWithParams("1021","102","1 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),message102_2=Stubs.createMessageEntityWithParams("1022","102","2 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),photo={id:"10231",type:FileType.image,uid:"10231",url:"https://via.placeholder.com/600/92c952",file:{id:"10231",uid:"",type:FileType.image,url:"https://via.placeholder.com/600/92c952"}},message102_3=Stubs.createMessageEntityWithParams("1023","102","3 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12,[photo]),video={id:"10232",type:FileType.video,uid:"10232",url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4",file:{id:"10232",uid:"",type:FileType.video,url:"https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/WhatCarCanYouGetForAGrand.mp4"}},message102_4=Stubs.createMessageEntityWithParams("1024","102","3 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12,[video]),audio={id:"10233",type:FileType.audio,uid:"10233",url:"https://cdn.freesound.org/previews/681/681715_1648170-lq.mp3",file:{id:"10233",uid:"",type:FileType.audio,url:"https://cdn.freesound.org/previews/681/681715_1648170-lq.mp3"}},message102_5=Stubs.createMessageEntityWithParams("1025","102","3 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12,[audio]),text={id:"10233",type:FileType.text,uid:"10233",url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt",file:{id:"10233",uid:"",type:FileType.text,url:"https://www.learningcontainer.com/wp-content/uploads/2020/04/sample-text-file.txt"}},message102_6=Stubs.createMessageEntityWithParams("1026","102","3 test message for dialog 102","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12,[text]);messages.push(message102_1),messages.push(message102_2),messages.push(message102_3),messages.push(message102_4),messages.push(message102_5),messages.push(message102_6);let message112_1=Stubs.createMessageEntityWithParams("1121","112","1 test message for dialog 112","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),message112_2=Stubs.createMessageEntityWithParams("1122","112","2 test message for dialog 112","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),message112_3=Stubs.createMessageEntityWithParams("1123","112","3 test message for dialog 112","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12);messages.push(message112_1),messages.push(message112_2),messages.push(message112_3);let message113_1=Stubs.createMessageEntityWithParams("1131","113","1 test message for dialog 113","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),message113_2=Stubs.createMessageEntityWithParams("1132","113","2 test message for dialog 113","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12),message113_3=Stubs.createMessageEntityWithParams("1133","113","3 test message for dialog 113","31.03.2023",Date.now(),"31.03.2023",[11,12,13],[11,12,13],1,11,12);return messages.push(message113_1),messages.push(message113_2),messages.push(message113_3),messages}}let MessageInput_stories={title:"@quickblox-react-ui-kit/Presentation/ui-components/MessageInput",component:MessageInput_MessageInput,tags:["autodocs"],parameters:{layout:"centered"},argTypes:{rephrase:{control:!1},value:{control:"text",description:"Input value"},onChange:{action:"changed",description:"Change event handler"},onSend:{action:"sent",description:"Send event handler"},enableVoice:{control:"boolean",description:"Enable voice message option"},onVoice:{action:"voice activated",description:"Voice event handler"},disableAttachment:{control:"boolean",description:"Disable attachment option"},onAttachment:{action:"attachment added",description:"Attachment event handler"},loading:{control:"boolean",description:"Enable loading state"},previewMessage:{description:"Last message by type",control:"select",options:["Text","Image","Video","Audio","None"],mapping:{Text:(0,jsx_runtime.jsx)(ReplyMessagePreview_ReplyMessagePreview,{messages:[Stubs.initializeMessagesWithMockData()[3]],userNameSentMessage:"",onClose:()=>{console.log("closed")}}),Image:(0,jsx_runtime.jsx)(ReplyMessagePreview_ReplyMessagePreview,{messages:[Stubs.initializeMessagesWithMockData()[0]],userNameSentMessage:"",onClose:()=>{console.log("closed")}}),Video:(0,jsx_runtime.jsx)(ReplyMessagePreview_ReplyMessagePreview,{messages:[Stubs.initializeMessagesWithMockData()[1]],userNameSentMessage:"",onClose:()=>{console.log("closed")}}),Audio:(0,jsx_runtime.jsx)(ReplyMessagePreview_ReplyMessagePreview,{messages:[Stubs.initializeMessagesWithMockData()[2]],userNameSentMessage:"",onClose:()=>{console.log("closed")}}),None:void 0}},className:{control:"text",description:"CSS class"}}},MessageInputDefault={name:"MessageInput Default",args:{value:"",enableVoice:!1,disableAttachment:!1,loading:!1}},MessageInputWithVoiceMessage={name:"MessageInput With Voice Message",args:{...MessageInputDefault.args,enableVoice:!0}},MessageInputWithPreview={name:"MessageInput With Preview",args:{...MessageInputDefault.args,previewMessage:(0,jsx_runtime.jsx)(ReplyMessagePreview_ReplyMessagePreview,{messages:[Stubs.initializeMessagesWithMockData()[0]],userNameSentMessage:"",onClose:()=>{console.log("closed")}})}},MessageInputLoadingState={name:"MessageInput Loading State",args:{...MessageInputDefault.args,loading:!0}};MessageInputDefault.parameters={...MessageInputDefault.parameters,docs:{...MessageInputDefault.parameters?.docs,source:{originalSource:"{\n name: 'MessageInput Default',\n args: {\n value: '',\n enableVoice: false,\n disableAttachment: false,\n loading: false\n }\n}",...MessageInputDefault.parameters?.docs?.source}}},MessageInputWithVoiceMessage.parameters={...MessageInputWithVoiceMessage.parameters,docs:{...MessageInputWithVoiceMessage.parameters?.docs,source:{originalSource:"{\n name: 'MessageInput With Voice Message',\n args: {\n ...MessageInputDefault.args,\n enableVoice: true\n }\n}",...MessageInputWithVoiceMessage.parameters?.docs?.source}}},MessageInputWithPreview.parameters={...MessageInputWithPreview.parameters,docs:{...MessageInputWithPreview.parameters?.docs,source:{originalSource:"{\n name: 'MessageInput With Preview',\n args: {\n ...MessageInputDefault.args,\n previewMessage: <ReplyMessagePreview messages={[Stubs.initializeMessagesWithMockData()[0]]} userNameSentMessage=\"\" onClose={() => {\n console.log('closed');\n }} />\n }\n}",...MessageInputWithPreview.parameters?.docs?.source}}},MessageInputLoadingState.parameters={...MessageInputLoadingState.parameters,docs:{...MessageInputLoadingState.parameters?.docs,source:{originalSource:"{\n name: 'MessageInput Loading State',\n args: {\n ...MessageInputDefault.args,\n loading: true\n }\n}",...MessageInputLoadingState.parameters?.docs?.source}}};let __namedExportsOrder=["MessageInputDefault","MessageInputWithVoiceMessage","MessageInputWithPreview","MessageInputLoadingState"]},"./src/Presentation/ui-components/Loader/Loader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Loader_Loader});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),icons=__webpack_require__("./src/Presentation/icons/index.ts"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Loader_Loader(_ref){let{className,size="md"}=_ref;return(0,jsx_runtime.jsx)(icons.t$,{className:classnames_default()("loader",size&&"loader--".concat(size),className)})}try{Loader_Loader.displayName="Loader",Loader_Loader.__docgenInfo={description:"",displayName:"Loader",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"md"'},{value:'"lg"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Loader/Loader.tsx#Loader"]={docgenInfo:Loader_Loader.__docgenInfo,name:"Loader",path:"src/Presentation/ui-components/Loader/Loader.tsx#Loader"})}catch(__react_docgen_typescript_loader_error){}},"./node_modules/quickblox sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/quickblox sync recursive",module.exports=webpackEmptyContext}}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[909],{"./src/Presentation/ui-components/TextField/TextField.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TextFieldDefault:()=>TextFieldDefault,TextFieldDisabled:()=>TextFieldDisabled,TextFieldReset:()=>TextFieldReset,__namedExportsOrder:()=>__namedExportsOrder,default:()=>TextField_stories});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),icons=__webpack_require__("./src/Presentation/icons/index.ts"),Loader=__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let TextField_TextField=(0,react.forwardRef)((_ref,ref)=>{let{label,icon,loading=!1,disabled=!1,className,id,value,onChange,...inputProps}=_ref,defaultId=(0,react.useId)();return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("text-field",{"text-field--disabled":disabled},className),children:[label&&(0,jsx_runtime.jsx)("label",{htmlFor:id||defaultId,className:"text-field__label",children:label}),(0,jsx_runtime.jsxs)("div",{className:"text-field__wrapper",children:[icon&&(0,jsx_runtime.jsx)("span",{className:"text-field__icon",children:icon}),(0,jsx_runtime.jsx)("input",{...inputProps,ref:ref,disabled:loading||disabled,className:"text-field__input",id:id||defaultId,value:value,onChange:e=>onChange(e.currentTarget.value)}),!loading&&value&&(0,jsx_runtime.jsx)(icons.OE,{className:"text-field__reset",onClick:()=>onChange("")}),loading&&!disabled&&(0,jsx_runtime.jsx)(Loader.Z,{size:"sm",className:"text-field__loader"})]})]})});try{TextField_TextField.displayName="TextField",TextField_TextField.__docgenInfo={description:"",displayName:"TextField",props:{
|
|
1
|
+
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[909],{"./src/Presentation/ui-components/TextField/TextField.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{TextFieldDefault:()=>TextFieldDefault,TextFieldDisabled:()=>TextFieldDisabled,TextFieldReset:()=>TextFieldReset,__namedExportsOrder:()=>__namedExportsOrder,default:()=>TextField_stories});var react=__webpack_require__("./node_modules/react/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),icons=__webpack_require__("./src/Presentation/icons/index.ts"),Loader=__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let TextField_TextField=(0,react.forwardRef)((_ref,ref)=>{let{label,icon,loading=!1,disabled=!1,className,id,value,onChange,...inputProps}=_ref,defaultId=(0,react.useId)();return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("text-field",{"text-field--disabled":disabled},className),children:[label&&(0,jsx_runtime.jsx)("label",{htmlFor:id||defaultId,className:"text-field__label",children:label}),(0,jsx_runtime.jsxs)("div",{className:"text-field__wrapper",children:[icon&&(0,jsx_runtime.jsx)("span",{className:"text-field__icon",children:icon}),(0,jsx_runtime.jsx)("input",{...inputProps,ref:ref,disabled:loading||disabled,className:"text-field__input",id:id||defaultId,value:value,onChange:e=>onChange(e.currentTarget.value)}),!loading&&value&&(0,jsx_runtime.jsx)(icons.OE,{className:"text-field__reset",onClick:()=>onChange("")}),loading&&!disabled&&(0,jsx_runtime.jsx)(Loader.Z,{size:"sm",className:"text-field__loader"})]})]})});try{TextField_TextField.displayName="TextField",TextField_TextField.__docgenInfo={description:"",displayName:"TextField",props:{onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/TextField/TextField.tsx#TextField"]={docgenInfo:TextField_TextField.__docgenInfo,name:"TextField",path:"src/Presentation/ui-components/TextField/TextField.tsx#TextField"})}catch(__react_docgen_typescript_loader_error){}let TextField_stories={title:"@quickblox-react-ui-kit/Presentation/ui-components/TextField",component:TextField_TextField,tags:["autodocs"],parameters:{layout:"centered"},args:{label:"",disabled:!1,loading:!1,className:""},argTypes:{value:{table:{type:{summary:"function"}},description:"Value change function"},onChange:{table:{defaultValue:{summary:"''"},type:{summary:"string"}},description:"Text field label"},id:{table:{defaultValue:{summary:"''"},type:{summary:"string"}},description:"Custom id for text field"},label:{table:{defaultValue:{summary:"''"},type:{summary:"string"}},description:"Text field label"},icon:{control:!1,table:{type:{summary:"svg"}},description:"Format plug svg"},loading:{table:{defaultValue:{summary:!1}},description:"Displays the load"},disabled:{table:{type:{summary:"boolean"},defaultValue:{summary:!1}},description:"Active"},className:{table:{type:{summary:"string"}},description:"Additional classes"}}},TextFieldDefault={name:"TextField Default"},TextFieldDisabled={name:"TextField Disabled",args:{disabled:!0,label:"Text Label",placeholder:"Placeholder"}},TextFieldReset={name:"TextField Reset",args:{label:"Text Label",placeholder:"Placeholder",value:"Text"}};TextFieldDefault.parameters={...TextFieldDefault.parameters,docs:{...TextFieldDefault.parameters?.docs,source:{originalSource:"{\n name: 'TextField Default'\n}",...TextFieldDefault.parameters?.docs?.source}}},TextFieldDisabled.parameters={...TextFieldDisabled.parameters,docs:{...TextFieldDisabled.parameters?.docs,source:{originalSource:"{\n name: 'TextField Disabled',\n args: {\n disabled: true,\n label: 'Text Label',\n placeholder: 'Placeholder'\n }\n}",...TextFieldDisabled.parameters?.docs?.source}}},TextFieldReset.parameters={...TextFieldReset.parameters,docs:{...TextFieldReset.parameters?.docs,source:{originalSource:"{\n name: 'TextField Reset',\n args: {\n label: 'Text Label',\n placeholder: 'Placeholder',\n value: 'Text'\n }\n}",...TextFieldReset.parameters?.docs?.source}}};let __namedExportsOrder=["TextFieldDefault","TextFieldDisabled","TextFieldReset"]},"./src/Presentation/ui-components/Loader/Loader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{Z:()=>Loader_Loader});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),icons=__webpack_require__("./src/Presentation/icons/index.ts"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Loader_Loader(_ref){let{className,size="md"}=_ref;return(0,jsx_runtime.jsx)(icons.t$,{className:classnames_default()("loader",size&&"loader--".concat(size),className)})}try{Loader_Loader.displayName="Loader",Loader_Loader.__docgenInfo={description:"",displayName:"Loader",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"sm"'},{value:'"md"'},{value:'"lg"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Loader/Loader.tsx#Loader"]={docgenInfo:Loader_Loader.__docgenInfo,name:"Loader",path:"src/Presentation/ui-components/Loader/Loader.tsx#Loader"})}catch(__react_docgen_typescript_loader_error){}},"./node_modules/classnames/index.js":(module,exports)=>{var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
2
2
|
Copyright (c) 2018 Jed Watson.
|
|
3
3
|
Licensed under the MIT License (MIT), see
|
|
4
4
|
http://jedwatson.github.io/classnames
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
* This source code is licensed under the MIT license found in the
|
|
12
12
|
* LICENSE file in the root directory of this source tree.
|
|
13
13
|
*/var f=__webpack_require__("./node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.min.js")}}]);
|
|
14
|
-
//# sourceMappingURL=Presentation-ui-components-TextField-TextField-stories.
|
|
14
|
+
//# sourceMappingURL=Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Presentation-ui-components-TextField-TextField-stories.
|
|
1
|
+
{"version":3,"file":"Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js","mappings":";;;;AAIA;;;;;;;;ACIA","sources":["webpack://quickblox-react-ui-kit/./node_modules/classnames/index.js","webpack://quickblox-react-ui-kit/./node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":[],"sourceRoot":""}
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
window['DOCS_OPTIONS'] = {"defaultName":"Docs","autodocs":"tag"};</script><script type="module">import './sb-preview/runtime.js';
|
|
349
349
|
|
|
350
350
|
|
|
351
|
-
import './runtime~main.
|
|
351
|
+
import './runtime~main.3464b25a.iframe.bundle.js';
|
|
352
352
|
|
|
353
353
|
import './926.f5308089.iframe.bundle.js';
|
|
354
354
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1714125082245,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"CRA","packageName":"react-scripts","version":"5.0.1"},"packageManager":{"type":"npm","version":"10.2.4"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-webpack5","options":{"builder":{"useSWC":true}}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.6.12","storybookVersionSpecifier":"^7.6.12","language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"7.6.12"},"@storybook/react":{"version":"7.6.12"},"@storybook/react-webpack5":{"version":"7.6.12"},"@storybook/test":{"version":"7.6.12"},"eslint-plugin-storybook":{"version":"0.6.15"},"storybook":{"version":"7.6.12"}},"addons":{"@storybook/addon-links":{"version":"7.6.12"},"@storybook/addon-essentials":{"version":"7.6.12"},"@storybook/preset-create-react-app":{"version":"7.6.12"},"@storybook/addon-onboarding":{"version":"1.0.11"},"@storybook/addon-interactions":{"version":"7.6.12"},"@storybook/addon-viewport":{"version":"7.6.16"}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var chunkIds=deferred[i][0],fn=deferred[i][1],priority=deferred[i][2],fulfilled=!0,j=0;j<chunkIds.length;j++)notFulfilled>=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",229:"docs-Styling-mdx",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",715:"docs-Introduction-mdx",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]||chunkId)+"."+({119:"bf8a24d1",148:"141a3ae7",181:"9449e470",229:"1d6c1212",231:"429a72d5",267:"1b8758fc",356:"af01e15d",426:"be971fb5",433:"dffc897e",594:"a9f5cd67",603:"4cf0423b",607:"b04b9f0b",626:"84103f20",658:"a7d43c0b",665:"f81a8e38",687:"264d251d",703:"2cbec951",715:"bcb06844",729:"734b4ae4",752:"9f45c30e",768:"e44c05aa",794:"bf9005d3",797:"b3873e04",874:"97287936",909:"33c5683e",938:"56e9d83c",944:"fa91d2c7",949:"1b74ae55",968:"8781472b"})[chunkId]+".iframe.bundle.js",__webpack_require__.miniCssF=chunkId=>"static/css/"+({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]+"."+({119:"7eb916fc",148:"e37f549d",181:"7b8317f8",231:"b67b748b",267:"3c874f4c",356:"dab34da1",594:"015ac417",626:"1b6e1c55",658:"34aa36b2",665:"4f813450",687:"4c915c89",752:"fb1001e7",794:"2a9e5bc3",874:"cb7fb80a",909:"412027f8",944:"bd07fad3",949:"7b228eb0",968:"655aa6c1"})[chunkId]+".chunk.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="quickblox-react-ui-kit:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")==dataWebpackPrefix+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack",dataWebpackPrefix+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{if("undefined"!=typeof document){var createStylesheet=(chunkId,fullhref,oldTag,resolve,reject)=>{var linkTag=document.createElement("link");return linkTag.rel="stylesheet",linkTag.type="text/css",linkTag.onerror=linkTag.onload=event=>{if(linkTag.onerror=linkTag.onload=null,"load"===event.type)resolve();else{var errorType=event&&("load"===event.type?"missing":event.type),realHref=event&&event.target&&event.target.href||fullhref,err=Error("Loading CSS chunk "+chunkId+" failed.\n("+realHref+")");err.code="CSS_CHUNK_LOAD_FAILED",err.type=errorType,err.request=realHref,linkTag.parentNode.removeChild(linkTag),reject(err)}},linkTag.href=fullhref,oldTag?oldTag.parentNode.insertBefore(linkTag,oldTag.nextSibling):document.head.appendChild(linkTag),linkTag},findStylesheet=(href,fullhref)=>{for(var existingLinkTags=document.getElementsByTagName("link"),i=0;i<existingLinkTags.length;i++){var tag=existingLinkTags[i],dataHref=tag.getAttribute("data-href")||tag.getAttribute("href");if("stylesheet"===tag.rel&&(dataHref===href||dataHref===fullhref))return tag}for(var existingStyleTags=document.getElementsByTagName("style"),i=0;i<existingStyleTags.length;i++){var tag=existingStyleTags[i],dataHref=tag.getAttribute("data-href");if(dataHref===href||dataHref===fullhref)return tag}},loadStylesheet=chunkId=>new Promise((resolve,reject)=>{var href=__webpack_require__.miniCssF(chunkId),fullhref=__webpack_require__.p+href;if(findStylesheet(href,fullhref))return resolve();createStylesheet(chunkId,fullhref,null,resolve,reject)}),installedCssChunks={303:0};__webpack_require__.f.miniCss=(chunkId,promises)=>{installedCssChunks[chunkId]?promises.push(installedCssChunks[chunkId]):0!==installedCssChunks[chunkId]&&({119:1,148:1,181:1,231:1,267:1,356:1,594:1,626:1,658:1,665:1,687:1,752:1,794:1,874:1,909:1,944:1,949:1,968:1})[chunkId]&&promises.push(installedCssChunks[chunkId]=loadStylesheet(chunkId).then(()=>{installedCssChunks[chunkId]=0},e=>{throw delete installedCssChunks[chunkId],e}))}}})(),(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
1
|
+
(()=>{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var chunkIds=deferred[i][0],fn=deferred[i][1],priority=deferred[i][2],fulfilled=!0,j=0;j<chunkIds.length;j++)notFulfilled>=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",229:"docs-Styling-mdx",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",715:"docs-Introduction-mdx",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]||chunkId)+"."+({119:"0d1800d9",148:"141a3ae7",181:"9449e470",229:"1d6c1212",231:"429a72d5",267:"1b8758fc",356:"af01e15d",426:"be971fb5",433:"dffc897e",594:"a9f5cd67",603:"4cf0423b",607:"b04b9f0b",626:"84103f20",658:"a7d43c0b",665:"f81a8e38",687:"264d251d",703:"776b9f13",715:"bcb06844",729:"734b4ae4",752:"9f45c30e",768:"e44c05aa",794:"bf9005d3",797:"b3873e04",874:"97287936",909:"fd8caf6c",938:"56e9d83c",944:"fa91d2c7",949:"1b74ae55",968:"8781472b"})[chunkId]+".iframe.bundle.js",__webpack_require__.miniCssF=chunkId=>"static/css/"+({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]+"."+({119:"7eb916fc",148:"e37f549d",181:"7b8317f8",231:"b67b748b",267:"a5b284f4",356:"dab34da1",594:"31cd021e",626:"1b6e1c55",658:"34aa36b2",665:"4f813450",687:"4c915c89",752:"fb1001e7",794:"6d563072",874:"cb7fb80a",909:"412027f8",944:"bd07fad3",949:"7b228eb0",968:"655aa6c1"})[chunkId]+".chunk.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="quickblox-react-ui-kit:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")==dataWebpackPrefix+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack",dataWebpackPrefix+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{if("undefined"!=typeof document){var createStylesheet=(chunkId,fullhref,oldTag,resolve,reject)=>{var linkTag=document.createElement("link");return linkTag.rel="stylesheet",linkTag.type="text/css",linkTag.onerror=linkTag.onload=event=>{if(linkTag.onerror=linkTag.onload=null,"load"===event.type)resolve();else{var errorType=event&&("load"===event.type?"missing":event.type),realHref=event&&event.target&&event.target.href||fullhref,err=Error("Loading CSS chunk "+chunkId+" failed.\n("+realHref+")");err.code="CSS_CHUNK_LOAD_FAILED",err.type=errorType,err.request=realHref,linkTag.parentNode.removeChild(linkTag),reject(err)}},linkTag.href=fullhref,oldTag?oldTag.parentNode.insertBefore(linkTag,oldTag.nextSibling):document.head.appendChild(linkTag),linkTag},findStylesheet=(href,fullhref)=>{for(var existingLinkTags=document.getElementsByTagName("link"),i=0;i<existingLinkTags.length;i++){var tag=existingLinkTags[i],dataHref=tag.getAttribute("data-href")||tag.getAttribute("href");if("stylesheet"===tag.rel&&(dataHref===href||dataHref===fullhref))return tag}for(var existingStyleTags=document.getElementsByTagName("style"),i=0;i<existingStyleTags.length;i++){var tag=existingStyleTags[i],dataHref=tag.getAttribute("data-href");if(dataHref===href||dataHref===fullhref)return tag}},loadStylesheet=chunkId=>new Promise((resolve,reject)=>{var href=__webpack_require__.miniCssF(chunkId),fullhref=__webpack_require__.p+href;if(findStylesheet(href,fullhref))return resolve();createStylesheet(chunkId,fullhref,null,resolve,reject)}),installedCssChunks={303:0};__webpack_require__.f.miniCss=(chunkId,promises)=>{installedCssChunks[chunkId]?promises.push(installedCssChunks[chunkId]):0!==installedCssChunks[chunkId]&&({119:1,148:1,181:1,231:1,267:1,356:1,594:1,626:1,658:1,665:1,687:1,752:1,794:1,874:1,909:1,944:1,949:1,968:1})[chunkId]&&promises.push(installedCssChunks[chunkId]=loadStylesheet(chunkId).then(()=>{installedCssChunks[chunkId]=0},e=>{throw delete installedCssChunks[chunkId],e}))}}})(),(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.dialog-item-preview{display:flex;align-items:center;padding:8px 16px;gap:16px}.dialog-item-preview,.dialog-item-preview *{box-sizing:border-box}.dialog-item-preview:hover{background:var(--divider)}.dialog-item-preview--active{box-shadow:4px 0px 0px 0px var(--primary) inset;background:var(--divider)}.dialog-item-preview__content{width:calc(100% - 72px);display:flex;flex-direction:column;gap:2px}.dialog-item-preview__content-top{display:flex;justify-content:space-between}.dialog-item-preview__content-top-title{font:500 12px/16px "Roboto", sans-serif;font:var(--label-label-medium, 500 12px/16px "Roboto", sans-serif);color:#0b1b0f;color:var(--main-text, #0b1b0f);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dialog-item-preview__content-top-date{color:#636d78;color:var(--tertiary-elements, #636d78);font:500 11px/16px "Roboto", sans-serif;font:var(--label-label-small, 500 11px/16px "Roboto", sans-serif)}.dialog-item-preview__content-bottom{display:flex;justify-content:space-between;gap:5px;height:32px}.dialog-item-preview__content-bottom-message{color:#636d78;color:var(--secondary-text, #636d78);text-align:left;font:400 12px/16px "Roboto", sans-serif;font:var(--body-body-small, 400 12px/16px "Roboto", sans-serif);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.dialog-item-preview__content-bottom-controls{display:flex;align-items:center;gap:5px}.dialog-item-preview__content-bottom-controls-menu{width:24px;height:24px}
|
|
2
2
|
.badge{display:flex;justify-content:center;align-items:center;height:20px;border-radius:30px;padding:2px 6px;font-family:"Roboto";font-weight:500;font-size:12px;line-height:16px;letter-spacing:.5px;background-color:var(--main-elements);color:var(--secondary-background)}.badge--mute{background-color:var(--disabled-elements);color:var(--secondary-background)}
|
|
3
3
|
.avatar{display:flex;flex-shrink:0;align-items:center;justify-content:center;overflow:hidden;border-radius:50%;background-color:var(--disabled-elements);color:var(--secondary-text)}.avatar,.avatar *{box-sizing:border-box}.avatar svg{height:100%;width:100%;fill:var(--secondary-text);padding:10px}.avatar__image{object-fit:cover;width:100%;height:100%}.avatar--xs{width:32px;height:32px}.avatar--sm{width:36px;height:36px}.avatar--md{width:40px;height:40px}.avatar--lg{width:56px;height:56px}.avatar--xl{width:64px;height:64px}.avatar--xxl{width:80px;height:80px}
|
|
4
|
-
.preview-file-message{display:flex;gap:8px;align-items:center}.preview-file-message__image{object-fit:cover;display:
|
|
4
|
+
.preview-file-message{display:flex;gap:8px;align-items:center}.preview-file-message__image{object-fit:cover;display:flex;width:32px;height:32px;background:#e4e6e8;background:var(--incoming-background, #e4e6e8);border-radius:8px;flex-shrink:0}.preview-file-message__icon{fill:var(--caption);padding:6px}.preview-file-message__name{color:var(--secondary-text);text-align:left;font:400 12px/16px "Roboto",sans-serif;letter-spacing:.4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
5
5
|
.dropdown{width:100%;height:100%;position:relative}.dropdown,.dropdown *{box-sizing:border-box}.dropdown__toggle{width:100%;height:100%;background:none;border:none;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;margin:0;cursor:pointer;outline:none}.dropdown__menu{background-color:var(--main-background);box-shadow:0 3px 5px 0 rgba(0,0,0,.04),0 3px 14px 0 rgba(0,0,0,.08);border-radius:4px;padding:8px 0px;margin:0;z-index:100;position:absolute;overflow:hidden;list-style-type:none;display:none}.dropdown__menu--topRight{bottom:100%}.dropdown__menu--left{top:50%;transform:translateY(-50%);right:100%}.dropdown__menu--opened{display:block}.dropdown__option{display:flex;justify-content:space-between;align-items:center;font-family:"Roboto";font-weight:400;font-size:14px;line-height:20px;letter-spacing:.25px;height:32px;width:135px;padding:4px 16px;cursor:pointer}.dropdown__option--disabled{color:var(--caption)}.dropdown__label{width:100%;display:flex;align-items:center;gap:3px}
|
|
6
6
|
|
|
7
|
-
/*# sourceMappingURL=Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.
|
|
7
|
+
/*# sourceMappingURL=Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css.map*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.
|
|
1
|
+
{"version":3,"file":"static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6d563072.chunk.css","mappings":"AAEA;AEFA;ACEA;ACFA;ACEA","sources":["webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.scss","webpack://quickblox-react-ui-kit/./src/Presentation/themes/styles/_mixins.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Badge/Badge.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Avatar/Avatar.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Dropdown/Dropdown.scss"],"sourcesContent":["@import '../../themes/styles/mixins';\n\n.dialog-item-preview {\n @include applyBorderBox;\n display: flex;\n align-items: center;\n padding: 8px 16px;\n gap: 16px;\n\n &:hover {\n background: var(--divider);\n }\n\n &--active {\n box-shadow: 4px 0px 0px 0px var(--primary) inset;\n background: var(--divider);\n }\n\n &__content {\n width: calc(100% - 72px);\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n &-top {\n display: flex;\n justify-content: space-between;\n\n &-title {\n font: var(--label-label-medium, 500 12px/16px \"Roboto\", sans-serif);\n color: var(--main-text, #0b1b0f);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n\n &-date {\n color: var(--tertiary-elements, #636d78);\n font: var(--label-label-small, 500 11px/16px \"Roboto\", sans-serif);\n }\n }\n\n &-bottom {\n display: flex;\n justify-content: space-between;\n gap: 5px;\n height: 32px;\n\n &-message {\n color: var(--secondary-text, #636d78);\n text-align: left;\n font: var(--body-body-small, 400 12px/16px \"Roboto\", sans-serif);\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n }\n\n &-controls {\n display: flex;\n align-items: center;\n gap: 5px;\n\n &-menu {\n width: 24px;\n height: 24px;\n }\n }\n }\n }\n}\n","@mixin applyBorderBox {\n &,\n * {\n box-sizing: border-box;\n }\n}\n",".badge {\n display: flex;\n justify-content: center;\n align-items: center;\n\n height: 20px;\n border-radius: 30px;\n padding: 2px 6px;\n\n font-family: 'Roboto';\n font-weight: 500;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: 0.5px;\n\n background-color: var(--main-elements);\n color: var(--secondary-background);\n\n &--mute {\n background-color: var(--disabled-elements);\n color: var(--secondary-background);\n }\n}\n","@import '../../themes/styles/mixins';\n\n.avatar {\n @include applyBorderBox;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n border-radius: 50%;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n\n svg {\n height: 100%;\n width: 100%;\n \n fill: var(--secondary-text);\n padding: 10px;\n }\n\n &__image {\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n\n &--xs {\n width: 32px;\n height: 32px;\n }\n\n &--sm {\n width: 36px;\n height: 36px;\n }\n\n &--md {\n width: 40px;\n height: 40px;\n }\n\n &--lg {\n width: 56px;\n height: 56px;\n }\n\n &--xl {\n width: 64px;\n height: 64px;\n }\n\n &--xxl {\n width: 80px;\n height: 80px;\n }\n}\n",".preview-file-message {\n display: flex;\n gap: 8px;\n align-items: center;\n\n &__image {\n object-fit: cover;\n display: flex;\n width: 32px;\n height: 32px;\n background: var(--incoming-background, #e4e6e8);\n border-radius: 8px;\n flex-shrink: 0;\n }\n\n &__icon {\n fill: var(--caption);\n padding: 6px;\n }\n\n &__name {\n color: var(--secondary-text);\n text-align: left;\n font: 400 12px/16px \"Roboto\", sans-serif;\n letter-spacing: 0.4px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n","@import '../../themes/styles/mixins';\n\n.dropdown {\n width: 100%;\n height: 100%;\n position: relative;\n\n @include applyBorderBox;\n\n &__toggle {\n width: 100%;\n height: 100%;\n background: none;\n border: none;\n color: inherit;\n font: inherit;\n line-height: normal;\n overflow: visible;\n padding: 0;\n margin: 0;\n cursor: pointer;\n outline: none;\n }\n\n &__menu {\n background-color: var(--main-background);\n box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.04),\n 0 3px 14px 0 rgba(0, 0, 0, 0.08);\n border-radius: 4px;\n\n padding: 8px 0px;\n margin: 0;\n z-index: 100;\n position: absolute;\n overflow: hidden;\n list-style-type: none;\n display: none;\n\n &--topRight {\n bottom: 100%;\n }\n\n &--left {\n top: 50%;\n transform: translateY(-50%);\n right: 100%;\n }\n\n &--opened {\n display: block;\n }\n }\n\n &__option {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n font-family: 'Roboto';\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n letter-spacing: 0.25px;\n\n height: 32px;\n width: 135px;\n padding: 4px 16px;\n\n cursor: pointer;\n\n &--disabled {\n color: var(--caption);\n }\n }\n\n &__label {\n width: 100%;\n display: flex;\n align-items: center;\n gap: 3px;\n }\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
.preview-file-message{display:flex;gap:8px;align-items:center}.preview-file-message__image{object-fit:cover;display:flex;width:32px;height:32px;background:#e4e6e8;background:var(--incoming-background, #e4e6e8);border-radius:8px;flex-shrink:0}.preview-file-message__icon{fill:var(--caption);padding:6px}.preview-file-message__name{color:var(--secondary-text);text-align:left;font:400 12px/16px "Roboto",sans-serif;letter-spacing:.4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
|
|
2
|
+
|
|
3
|
+
/*# sourceMappingURL=Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css.map*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.31cd021e.chunk.css","mappings":"AAAA","sources":["webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.scss"],"sourcesContent":[".preview-file-message {\n display: flex;\n gap: 8px;\n align-items: center;\n\n &__image {\n object-fit: cover;\n display: flex;\n width: 32px;\n height: 32px;\n background: var(--incoming-background, #e4e6e8);\n border-radius: 8px;\n flex-shrink: 0;\n }\n\n &__icon {\n fill: var(--caption);\n padding: 6px;\n }\n\n &__name {\n color: var(--secondary-text);\n text-align: left;\n font: 400 12px/16px \"Roboto\", sans-serif;\n letter-spacing: 0.4px;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -747,8 +747,8 @@
|
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
/*# sourceMappingURL=ReactToastify.css.map */
|
|
750
|
-
.container{width:
|
|
750
|
+
.container{width:25%}.toast{min-height:24px;padding:4px 12px;opacity:60% !important;border-radius:4px;background-color:var(--toast-color)}.toast__body{padding:0;font-family:"Roboto";font-weight:500;font-size:12px;line-height:16px;letter-spacing:.5px;color:var(--main-background);text-align:center}
|
|
751
751
|
.loader{animation:rotate 1s infinite linear}.loader--sm{width:24px;height:24px}.loader--md{width:48px;height:48px}.loader--lg{width:52px;height:52px}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
|
|
752
752
|
.button{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:8px 16px;height:32px;border-radius:4px;flex:none;order:1;flex-grow:0;font-family:"Roboto";font-style:normal;font-weight:700;font-size:14px;line-height:16px;letter-spacing:.4px;cursor:pointer;border:none;outline:none}.button,.button *{box-sizing:border-box}.button--default{color:var(--secondary-background);background-color:var(--main-elements)}.button--default:hover{background-color:var(--color-default-hover)}.button--default:focus{outline:2px solid var(--color-background-info)}.button--default:active{background-color:var(--color-default-hover);color:var(--color-background-info)}.button--default.button--disabled{cursor:not-allowed;background-color:var(--disabled-elements);color:var(--secondary-text)}.button--outlined{background-color:inherit;border:1px solid var(--main-elements);color:var(--main-elements)}.button--outlined:hover{background-color:var(--outgoing-background)}.button--outlined:focus{border:2px solid var(--color-background-info)}.button--outlined:active{border:1px solid var(--main-elements);color:var(--main-elements)}.button--outlined.button--disabled{cursor:not-allowed;border:1px solid var(--disabled-elements);color:var(--disabled-elements)}.button--danger{background-color:var(--error);color:var(--secondary-background)}.button--danger:focus{outline:2px solid var(--error-secondary)}.button--danger:active{color:var(--error-secondary)}.button--danger.button--disabled{cursor:not-allowed;background-color:var(--disabled-elements);color:var(--secondary-text)}.button--text{background-color:inherit;color:var(--main-elements)}.button--text:focus{outline:2px solid var(--color-background-info)}.button--text:active{color:var(--color-default-hover)}.button--text.button--disabled{cursor:not-allowed;color:var(--disabled-elements)}.button__loader--default{fill:var(--secondary-background)}.button__loader--outlined{fill:var(--main-elements)}.button__loader--danger{fill:var(--secondary-background)}.button__loader--text{fill:var(--disabled-elements)}
|
|
753
753
|
|
|
754
|
-
/*# sourceMappingURL=Presentation-ui-components-Toast-Toast-stories.
|
|
754
|
+
/*# sourceMappingURL=Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css.map*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/css/Presentation-ui-components-Toast-Toast-stories.
|
|
1
|
+
{"version":3,"file":"static/css/Presentation-ui-components-Toast-Toast-stories.a5b284f4.chunk.css","mappings":"AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAGA;AACA;AACA;AACA;AAEA;AACA;AAGA;;;;;;;;AAAA;AAUA;AACA;AACA;AACA;AACA;AACA;ACXA;;AC/CA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;ADkDA;ACjDA;AACA;AAAA;AACA;AAAA;ADmDA;ACjDA;AACA;AAAA;AACA;AACA;ADmDA;ACjDA;AACA;AAAA;AACA;AAAA;ADmDA;ACjDA;AACA;AAAA;AACA;AAAA;ADmDA;ACjDA;AACA;AAAA;AACA;AACA;ADmDA;ACjDA;AACA;AAAA;AACA;AAAA;ADmDA;;AC/CA;AACA;AACA;AACA;AACA;AACA;ADkDA;ACjDA;AAGA;AACA;ADiDA;AC/CA;AAGA;AACA;AD+CA;AC7CA;AACA;AACA;AAAA;AD+CA;AACA;AExGA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AF0GA;AExGA;AACA;AACA;AACA;AACA;AF0GA;AExGA;AACA;AF0GA;AEvGA;AACA;AFyGA;AEtGA;AACA;AFwGA;AErGA;AACA;AACA;AACA;AACA;AACA;AACA;AFuGA;AEpGA;AACA;AFsGA;AEnGA;AACA;AFqGA;AElGA;AACA;AFoGA;AEjGA;AACA;AFmGA;AEhGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AFkGA;AE9FA;AACA;AFgGA;AE9FA;AACA;AFgGA;AE9FA;AACA;AACA;AACA;AACA;AACA;AFgGA;AE/FA;AACA;AACA;AFiGA;AE9FA;AACA;AACA;AACA;AACA;AFgGA;;AE5FA;AACA;AACA;AF+FA;;AE5FA;AACA;AACA;AF+FA;;AE5FA;AACA;AACA;AACA;AF+FA;AACA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;AGhNA;AACA;AAAA;AACA;AAAA;AHkNA;;AG7MA;AACA;;;;;;;;AAAA;AAAA;AHgNA;AG9MA;AACA;AAAA;AHgNA;AG9MA;AACA;AAAA;AHgNA;AG9MA;AACA;AAAA;AHgNA;AG9MA;AACA;AAAA;AHgNA;AG9MA;AACA;AAAA;AHgNA;AG9MA;AAIA;AAAA;AH6MA;;AInQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AJsQA;AIrQA;AACA;AACA;AJuQA;AIpQA;AACA;AACA;AACA;AJsQA;AInQA;AAEA;AJoQA;;AK5RA;AACA;AACA;AL+RA;AK7RA;AACA;AL+RA;AACA;AK5RA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AL8RA;AK5RA;AACA;AL8RA;AK3RA;AACA;AL6RA;AK1RA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AL4RA;AKzRA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AL2RA;AKxRA;AACA;AL0RA;AKvRA;AACA;AAAA;AACA;AACA;ALyRA;;AM7UA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;ANgVA;;AOpVA;AACA;AAJA;AP4VA;AOjVA;AACA;AACA;APmVA;AOjVA;AACA;AACA;APmVA;AOjVA;AACA;APmVA;AOjVA;AACA;APmVA;AOjVA;AACA;APmVA;AACA;AOhVA;AACA;AACA;AACA;APkVA;AOhVA;AACA;AACA;APkVA;AACA;AO/UA;AACA;AA1CA;AP4XA;AO3UA;AACA;AACA;AP6UA;AO3UA;AACA;AACA;AP6UA;AO3UA;AACA;AP6UA;AO3UA;AACA;AP6UA;AO3UA;AACA;AP6UA;AACA;AO1UA;AACA;AACA;AACA;AP4UA;AO1UA;AACA;AACA;AP4UA;AACA;AOzUA;AACA;AAhFA;AP4ZA;AOrUA;AACA;AACA;APuUA;AOrUA;AACA;AACA;APuUA;AOrUA;AACA;APuUA;AOrUA;AACA;APuUA;AOrUA;AACA;APuUA;AACA;AOpUA;AACA;AACA;APsUA;AOpUA;AAEA;AACA;APqUA;AOnUA;AACA;AACA;APqUA;AACA;AOlUA;AACA;AA1HA;AP+bA;AO9TA;AACA;AACA;APgUA;AO9TA;AACA;AACA;APgUA;AO9TA;AACA;APgUA;AO9TA;AACA;APgUA;AO9TA;AACA;APgUA;AACA;AO7TA;AACA;AACA;AP+TA;AO7TA;AAEA;AACA;AP8TA;AO5TA;AACA;AACA;AP8TA;AACA;AO1TA;AAEA;AP2TA;AOzTA;AAEA;AP0TA;AOxTA;AACA;AP0TA;AOxTA;AACA;AP0TA;;AOrTA;AAEA;APuTA;AOrTA;AAEA;APsTA;AOpTA;AACA;APsTA;AOpTA;AACA;APsTA;;AQxfA;AACA;AACA;AACA;AR2fA;AQzfA;AACA;AR2fA;AACA;AQxfA;AACA;AACA;AR0fA;AQxfA;AACA;AACA;AR0fA;AQxfA;AACA;AR0fA;AACA;AQvfA;AACA;ARyfA;;AQtfA;AACA;ARyfA;;ASrhBA;AACA;AACA;AACA;AACA;ATwhBA;ASthBA;AACA;AACA;ATwhBA;ASthBA;AACA;AACA;ATwhBA;ASthBA;AACA;ATwhBA;ASthBA;AACA;ATwhBA;AACA;ASrhBA;AACA;AACA;ATuhBA;ASrhBA;AACA;AACA;ATuhBA;ASrhBA;AACA;AACA;ATuhBA;AACA;ASphBA;AACA;ATshBA;;ASnhBA;AACA;ATshBA;;AU3jBA;AACA;AACA;AACA;AV8jBA;AU5jBA;AARA;AVukBA;AACA;AU3jBA;AACA;AACA;AACA;AV6jBA;AU3jBA;AAlBA;AVglBA;AACA;AU1jBA;AACA;AACA;AACA;AV4jBA;AU1jBA;AA5BA;AVylBA;AACA;AUzjBA;AACA;AACA;AACA;AV2jBA;AUzjBA;AAtCA;AVkmBA;AACA;AUxjBA;AACA;AA5CA;AVumBA;AUxjBA;AACA;AACA;AV0jBA;AACA;AUvjBA;AACA;AAtDA;AVgnBA;AUvjBA;AACA;AACA;AVyjBA;AACA;AUtjBA;AACA;AAhEA;AVynBA;AUtjBA;AACA;AACA;AVwjBA;AACA;AUrjBA;AACA;AA1EA;AVkoBA;AUrjBA;AACA;AACA;AVujBA;AACA;AU9iBA;AAEA;AV+iBA;AU7iBA;AAEA;AV8iBA;AU5iBA;AACA;AV8iBA;AU5iBA;AACA;AV8iBA;;AUziBA;AAEA;AAxBA;AACA;AVokBA;AU1iBA;AAEA;AA7BA;AACA;AVykBA;AU1iBA;AACA;AAjCA;AACA;AV8kBA;AU3iBA;AACA;AArCA;AACA;AVmlBA;;AWzqBA;AACA;AACA;AX4qBA;AW1qBA;AACA;AX4qBA;AACA;;AAaA;AY/rBA;ACAA;ACEA","sources":["webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_variables.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/dist/ReactToastify.css","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_toastContainer.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_toast.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_theme.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_closeButton.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_progressBar.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/_icons.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/animations/_bounce.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/animations/_zoom.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/animations/_flip.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/animations/_slide.scss","webpack://quickblox-react-ui-kit/./node_modules/react-toastify/scss/animations/_spin.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Toast/Toast.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Loader/Loader.scss","webpack://quickblox-react-ui-kit/./src/Presentation/ui-components/Button/Button.scss","webpack://quickblox-react-ui-kit/./src/Presentation/themes/styles/_mixins.scss"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,".container {\n width: 25%;\n}\n\n.toast {\n min-height: 24px;\n padding: 4px 12px;\n opacity: 60% !important;\n border-radius: 4px;\n background-color: var(--toast-color);\n\n &__body {\n padding: 0;\n font-family: 'Roboto';\n font-weight: 500;\n font-size: 12px;\n line-height: 16px;\n letter-spacing: 0.5px;\n color: var(--main-background);\n text-align: center;\n }\n}\n",".loader {\n &--sm {\n width: 24px;\n height: 24px;\n }\n\n &--md {\n width: 48px;\n height: 48px;\n }\n\n &--lg {\n width: 52px;\n height: 52px;\n }\n\n animation: rotate 1s infinite linear;\n\n @keyframes rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n}\n","@import '../../themes/styles/mixins';\n\n.button {\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n padding: 8px 16px;\n\n height: 32px;\n\n border-radius: 4px;\n\n flex: none;\n order: 1;\n flex-grow: 0;\n\n font-family: 'Roboto';\n font-style: normal;\n font-weight: 700;\n font-size: 14px;\n line-height: 16px;\n letter-spacing: 0.4px;\n\n cursor: pointer;\n border: none;\n outline: none;\n @include applyBorderBox;\n\n &--default {\n color: var(--secondary-background);\n background-color: var(--main-elements);\n\n &:hover {\n background-color: var(--color-default-hover);\n }\n\n &:focus {\n outline: 2px solid var(--color-background-info);\n }\n\n &:active {\n background-color: var(--color-default-hover);\n color: var(--color-background-info);\n }\n\n &.button--disabled {\n cursor: not-allowed;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n }\n }\n\n &--outlined {\n background-color: inherit;\n border: 1px solid var(--main-elements);\n color: var(--main-elements);\n\n &:hover {\n background-color: var(--outgoing-background);\n }\n\n &:focus {\n border: 2px solid var(--color-background-info);\n }\n\n &:active {\n border: 1px solid var(--main-elements);\n color: var(--main-elements);\n }\n\n &.button--disabled {\n cursor: not-allowed;\n border: 1px solid var(--disabled-elements);\n color: var(--disabled-elements);\n }\n }\n\n &--danger {\n background-color: var(--error);\n color: var(--secondary-background);\n\n &:focus {\n outline: 2px solid var(--error-secondary);\n }\n\n &:active {\n color: var(--error-secondary);\n }\n\n &.button--disabled {\n cursor: not-allowed;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n }\n }\n\n &--text {\n background-color: inherit;\n color: var(--main-elements);\n\n &:focus {\n outline: 2px solid var(--color-background-info);\n }\n\n &:active {\n color: var(--color-default-hover);\n }\n\n &.button--disabled {\n cursor: not-allowed;\n color: var(--disabled-elements);\n }\n }\n\n &__loader {\n &--default {\n fill: var(--secondary-background);\n }\n\n &--outlined {\n fill: var(--main-elements);\n }\n\n &--danger {\n fill: var(--secondary-background);\n }\n\n &--text {\n fill: var(--disabled-elements);\n }\n }\n}\n","@mixin applyBorderBox {\n &,\n * {\n box-sizing: border-box;\n }\n}\n"],"names":[],"sourceRoot":""}
|