quickblox-react-ui-kit 0.3.0 → 0.3.1-beta.2
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/CommonTypes/CommonTypes.d.ts +142 -0
- package/dist/CommonTypes/FunctionResult.d.ts +0 -54
- package/dist/Data/DefaultConfigurations.d.ts +2 -2
- package/dist/Data/Stubs.d.ts +6 -5
- package/dist/Data/dto/dialog/LocalDialogDTO.d.ts +1 -1
- package/dist/Data/dto/dialog/RemoteDialogDTO.d.ts +2 -2
- package/dist/Data/dto/user/LocalUserDTO.d.ts +1 -1
- package/dist/Data/dto/user/RemoteUserDTO.d.ts +1 -1
- package/dist/Data/source/remote/Mapper/MessageDTOMapper.d.ts +1 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +1 -1
- package/dist/Domain/entity/LastMessageEntity.d.ts +1 -1
- package/dist/Domain/entity/UserEntity.d.ts +1 -1
- package/dist/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.d.ts +3 -1
- package/dist/Presentation/ui-components/TextField/TextField.d.ts +2 -2
- package/dist/QBconfig.d.ts +2 -76
- package/dist/index-ui.js +767 -787
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +14 -12
- package/dist/utils/formatFileSize.d.ts +1 -0
- package/dist/utils/parse.d.ts +1 -0
- package/global.d.ts +158 -2835
- package/package.json +3 -1
- package/src/App.tsx +3 -2
- package/src/CommonTypes/CommonTypes.ts +229 -0
- package/src/CommonTypes/FunctionResult.ts +0 -59
- package/src/Data/Creator.ts +1 -0
- package/src/Data/DefaultConfigurations.ts +6 -2
- package/src/Data/Stubs.ts +47 -47
- package/src/Data/dto/dialog/LocalDialogDTO.ts +2 -2
- package/src/Data/dto/dialog/RemoteDialogDTO.ts +4 -4
- package/src/Data/dto/user/LocalUserDTO.ts +2 -2
- package/src/Data/dto/user/RemoteUserDTO.ts +2 -2
- package/src/Data/mapper/DialogLocalDTOMapper.ts +4 -10
- package/src/Data/mapper/DialogRemoteDTOMapper.ts +11 -22
- package/src/Data/mapper/UserLocalDTOMapper.ts +2 -2
- package/src/Data/mapper/UserRemoteDTOMapper.ts +2 -2
- package/src/Data/repository/ConnectionRepository.ts +1 -0
- package/src/Data/repository/UsersRepository.ts +1 -1
- package/src/Data/source/local/ChatLocalStorageDataSource.ts +14 -14
- package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +70 -52
- package/src/Data/source/remote/Mapper/FileDTOMapper.ts +4 -0
- package/src/Data/source/remote/Mapper/MessageDTOMapper.ts +1 -0
- package/src/Data/source/remote/Mapper/UserDTOMapper.ts +1 -0
- package/src/Data/source/remote/RemoteDataSource.ts +76 -12
- package/src/Domain/entity/LastMessageEntity.ts +1 -1
- package/src/Domain/entity/UserEntity.ts +1 -1
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +2 -2
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +44 -150
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +2 -1
- package/src/Presentation/Views/DialogList/DialogList.tsx +65 -2
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +3 -0
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +4 -3
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +9 -1
- package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +11 -1
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +1 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +9 -41
- package/src/Presentation/layouts/TestStage/LoginView/Login.tsx +7 -11
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +30 -2
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +1 -0
- package/src/Presentation/ui-components/TextField/TextField.tsx +58 -48
- package/src/QBconfig.ts +13 -11
- package/src/qb-api-calls/index.ts +44 -14
- package/src/utils/formatFileSize.ts +8 -0
- package/src/utils/parse.ts +2 -0
- package/storybook-static/703.2cbec951.iframe.bundle.js +33 -0
- package/storybook-static/703.2cbec951.iframe.bundle.js.map +1 -0
- package/storybook-static/{758.53b4954a.iframe.bundle.js → 938.56e9d83c.iframe.bundle.js} +1 -14
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.1b74ae55.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.84103f20.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bf9005d3.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.f81a8e38.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.141a3ae7.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.9f45c30e.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.af01e15d.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.264d251d.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.bf8a24d1.iframe.bundle.js +1 -0
- package/storybook-static/{Presentation-ui-components-Placeholder-Placeholder-stories.871f508c.iframe.bundle.js → Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js} +14 -1
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.97287936.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.a9f5cd67.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.429a72d5.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.fd8caf6c.iframe.bundle.js.map +1 -0
- package/storybook-static/{Presentation-ui-components-Toast-Toast-stories.55e63162.iframe.bundle.js → Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js} +14 -1
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.b903385b.iframe.bundle.js.map +1 -0
- package/storybook-static/{Presentation-ui-components-UserListItem-UserListItem-stories.04d3eefe.iframe.bundle.js → Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js} +14 -1
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.8781472b.iframe.bundle.js.map +1 -0
- package/storybook-static/iframe.html +2 -2
- package/storybook-static/{main.597d432b.iframe.bundle.js → main.2f6d7582.iframe.bundle.js} +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/runtime~main.af13ca55.iframe.bundle.js +1 -0
- package/webpack.config.js +2 -1
- package/storybook-static/758.53b4954a.iframe.bundle.js.map +0 -1
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.cf806856.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Button-Button-stories.4fac7996.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.6665bbfb.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.cf340397.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.b32a1e17.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-Message-Message-stories.343dfae0.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.c2ead6a5.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.527e000e.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.2ff75703.iframe.bundle.js +0 -1
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.4a2eef3e.iframe.bundle.js +0 -1
- package/storybook-static/runtime~main.7ee2126e.iframe.bundle.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[794],{"./node_modules/@storybook/addon-viewport/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{p:()=>INITIAL_VIEWPORTS});var INITIAL_VIEWPORTS={iphone5:{name:"iPhone 5",styles:{height:"568px",width:"320px"},type:"mobile"},iphone6:{name:"iPhone 6",styles:{height:"667px",width:"375px"},type:"mobile"},iphone6p:{name:"iPhone 6 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphone8p:{name:"iPhone 8 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphonex:{name:"iPhone X",styles:{height:"812px",width:"375px"},type:"mobile"},iphonexr:{name:"iPhone XR",styles:{height:"896px",width:"414px"},type:"mobile"},iphonexsmax:{name:"iPhone XS Max",styles:{height:"896px",width:"414px"},type:"mobile"},iphonese2:{name:"iPhone SE (2nd generation)",styles:{height:"667px",width:"375px"},type:"mobile"},iphone12mini:{name:"iPhone 12 mini",styles:{height:"812px",width:"375px"},type:"mobile"},iphone12:{name:"iPhone 12",styles:{height:"844px",width:"390px"},type:"mobile"},iphone12promax:{name:"iPhone 12 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphoneSE3:{name:"iPhone SE 3rd generation",styles:{height:"667px",width:"375px"},type:"mobile"},iphone13:{name:"iPhone 13",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13pro:{name:"iPhone 13 Pro",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13promax:{name:"iPhone 13 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphone14:{name:"iPhone 14",styles:{height:"844px",width:"390px"},type:"mobile"},iphone14pro:{name:"iPhone 14 Pro",styles:{height:"852px",width:"393px"},type:"mobile"},iphone14promax:{name:"iPhone 14 Pro Max",styles:{height:"932px",width:"430px"},type:"mobile"},ipad:{name:"iPad",styles:{height:"1024px",width:"768px"},type:"tablet"},ipad10p:{name:"iPad Pro 10.5-in",styles:{height:"1112px",width:"834px"},type:"tablet"},ipad11p:{name:"iPad Pro 11-in",styles:{height:"1194px",width:"834px"},type:"tablet"},ipad12p:{name:"iPad Pro 12.9-in",styles:{height:"1366px",width:"1024px"},type:"tablet"},galaxys5:{name:"Galaxy S5",styles:{height:"640px",width:"360px"},type:"mobile"},galaxys9:{name:"Galaxy S9",styles:{height:"740px",width:"360px"},type:"mobile"},nexus5x:{name:"Nexus 5X",styles:{height:"660px",width:"412px"},type:"mobile"},nexus6p:{name:"Nexus 6P",styles:{height:"732px",width:"412px"},type:"mobile"},pixel:{name:"Pixel",styles:{height:"960px",width:"540px"},type:"mobile"},pixelxl:{name:"Pixel XL",styles:{height:"1280px",width:"720px"},type:"mobile"}}},"./src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DialogItemPreviewDefault:()=>DialogItemPreviewDefault,DialogItemPreviewFullScreen:()=>DialogItemPreviewFullScreen,DialogItemPreviewMobileScreen:()=>DialogItemPreviewMobileScreen,DialogItemPreviewMobileScreenIPad:()=>DialogItemPreviewMobileScreenIPad,__namedExportsOrder:()=>__namedExportsOrder,default:()=>DialogItemPreview_stories});var dist=__webpack_require__("./node_modules/@storybook/addon-viewport/dist/index.mjs"),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 DialogItemPreview_DialogItemPreview=_ref=>{let{avatar,title,date,active,lastMessage,badge,contextMenu,onClick,className}=_ref;return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("dialog-item-preview",{"dialog-item-preview--active":active},className),onClick:onClick,children:[avatar,(0,jsx_runtime.jsxs)("div",{className:"dialog-item-preview__content",children:[(0,jsx_runtime.jsxs)("div",{className:"dialog-item-preview__content-top",children:[(0,jsx_runtime.jsx)("span",{className:"dialog-item-preview__content-top-title",children:title}),date&&(0,jsx_runtime.jsx)("span",{className:"dialog-item-preview__content-top-date",children:date})]}),(0,jsx_runtime.jsxs)("div",{className:"dialog-item-preview__content-bottom",children:[(0,jsx_runtime.jsx)("div",{className:"dialog-item-preview__content-bottom-message",children:lastMessage}),(0,jsx_runtime.jsxs)("div",{onClick:event=>event.stopPropagation(),className:"dialog-item-preview__content-bottom-controls",children:[badge,contextMenu&&(0,jsx_runtime.jsx)("div",{className:"dialog-item-preview__content-bottom-controls-menu",children:contextMenu})]})]})]})]})};try{DialogItemPreview_DialogItemPreview.displayName="DialogItemPreview",DialogItemPreview_DialogItemPreview.__docgenInfo={description:"",displayName:"DialogItemPreview",props:{avatar:{defaultValue:null,description:"",name:"avatar",required:!0,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"string"}},lastMessage:{defaultValue:null,description:"",name:"lastMessage",required:!1,type:{name:"string | ReactElement<any, string | JSXElementConstructor<any>>"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},contextMenu:{defaultValue:null,description:"",name:"contextMenu",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"FunctionTypeVoidToVoid"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx#DialogItemPreview"]={docgenInfo:DialogItemPreview_DialogItemPreview.__docgenInfo,name:"DialogItemPreview",path:"src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx#DialogItemPreview"})}catch(__react_docgen_typescript_loader_error){}var Badge=__webpack_require__("./src/Presentation/ui-components/Badge/Badge.tsx"),Avatar=__webpack_require__("./src/Presentation/ui-components/Avatar/Avatar.tsx"),icons=__webpack_require__("./src/Presentation/icons/index.ts"),PreviewFileMessage=__webpack_require__("./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx"),Dropdown=__webpack_require__("./src/Presentation/ui-components/Dropdown/Dropdown.tsx");let DialogItemPreview_stories={title:"@quickblox-react-ui-kit/Presentation/ui-components/DialogItemPreview",tags:["autodocs"],component:DialogItemPreview_DialogItemPreview,decorators:[],parameters:{viewport:{viewports:dist.p}},argTypes:{avatar:{description:"Avatar or Icon",control:"select",options:["User","Group","Conference","Public","Photo"],mapping:{User:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.vw,{})}),Group:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.Av,{})}),Conference:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.pP,{})}),Public:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.UZ,{})}),Photo:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",src:"https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg"})}},lastMessage:{description:"Last message by type",control:"select",options:["ShortText","LongText","Image","File","None"],mapping:{ShortText:"Hello, world!How are you?",LongText:"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.",Image:(0,jsx_runtime.jsx)(PreviewFileMessage.Z,{name:"My avatar.png",src:"https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg"}),File:(0,jsx_runtime.jsx)(PreviewFileMessage.Z,{name:"My Document.txt"}),None:void 0}},badge:{description:"Badge",control:"select",options:["Default","OverCount","None"],mapping:{Default:(0,jsx_runtime.jsx)(Badge.Z,{count:5}),OverCount:(0,jsx_runtime.jsx)(Badge.Z,{count:15,limit:9}),None:void 0}},active:{table:{defaultValue:{summary:!1},type:{summary:"boolean"}},description:"Active"},contextMenu:{description:"Context action icon",control:"select",options:["Default","Leave","None"],mapping:{Default:(0,jsx_runtime.jsx)(icons.Qf,{}),Leave:(0,jsx_runtime.jsx)(Dropdown.Z,{placement:"left",options:[{value:"Leave",label:"Leave"}],onSelect:value=>{console.log(value)},children:(0,jsx_runtime.jsx)(icons.Qf,{})}),None:void 0}}}},DialogItemPreviewDefault={name:"DialogItemPreview Default",args:{title:"Name",avatar:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.vw,{})})},render:args=>(args.date=new Date(args.date).toLocaleDateString(),(0,jsx_runtime.jsx)(DialogItemPreview_DialogItemPreview,{...args}))},DialogItemPreviewFullScreen={name:"DialogItemPreview FullScreen",args:{title:"Name",avatar:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.vw,{})}),lastMessage:"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.",badge:(0,jsx_runtime.jsx)(Badge.Z,{count:5}),contextMenu:(0,jsx_runtime.jsx)(icons.Qf,{})},parameters:{viewport:{defaultViewport:"responsive"}},render:args=>(args.date=new Date(args.date).toLocaleDateString(),(0,jsx_runtime.jsx)(DialogItemPreview_DialogItemPreview,{...args}))},DialogItemPreviewMobileScreen={name:"DialogItemPreview MobileScreen",args:{title:"Name",avatar:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.vw,{})}),lastMessage:"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.",badge:(0,jsx_runtime.jsx)(Badge.Z,{count:5}),contextMenu:(0,jsx_runtime.jsx)(icons.Qf,{})},parameters:{viewport:{defaultViewport:"iphonese2"}},render:args=>(args.date=new Date(args.date).toLocaleDateString(),(0,jsx_runtime.jsx)(DialogItemPreview_DialogItemPreview,{...args}))},DialogItemPreviewMobileScreenIPad={name:"DialogItemPreview MobileScreen IPad",args:{title:"Name",avatar:(0,jsx_runtime.jsx)(Avatar.Z,{size:"lg",icon:(0,jsx_runtime.jsx)(icons.vw,{})}),lastMessage:"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.",badge:(0,jsx_runtime.jsx)(Badge.Z,{count:5}),contextMenu:(0,jsx_runtime.jsx)(icons.Qf,{})},parameters:{viewport:{defaultViewport:"ipad"}},render:args=>(args.date=new Date(args.date).toLocaleDateString(),(0,jsx_runtime.jsx)(DialogItemPreview_DialogItemPreview,{...args}))};DialogItemPreviewDefault.parameters={...DialogItemPreviewDefault.parameters,docs:{...DialogItemPreviewDefault.parameters?.docs,source:{originalSource:"{\n name: 'DialogItemPreview Default',\n args: {\n title: 'Name',\n avatar: <Avatar size=\"lg\" icon={<UserSvg />} />\n },\n render: args => {\n // eslint-disable-next-line no-param-reassign\n args.date = new Date(args.date!).toLocaleDateString();\n return <DialogItemPreview {...args} />;\n }\n}",...DialogItemPreviewDefault.parameters?.docs?.source}}},DialogItemPreviewFullScreen.parameters={...DialogItemPreviewFullScreen.parameters,docs:{...DialogItemPreviewFullScreen.parameters?.docs,source:{originalSource:"{\n name: 'DialogItemPreview FullScreen',\n args: {\n title: 'Name',\n avatar: <Avatar size=\"lg\" icon={<UserSvg />} />,\n lastMessage: \"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.\",\n badge: <Badge count={5} />,\n contextMenu: <MoreSvg />\n },\n parameters: {\n viewport: {\n defaultViewport: 'responsive'\n }\n },\n render: args => {\n // eslint-disable-next-line no-param-reassign\n args.date = new Date(args.date!).toLocaleDateString();\n return <DialogItemPreview {...args} />;\n }\n}",...DialogItemPreviewFullScreen.parameters?.docs?.source}}},DialogItemPreviewMobileScreen.parameters={...DialogItemPreviewMobileScreen.parameters,docs:{...DialogItemPreviewMobileScreen.parameters?.docs,source:{originalSource:"{\n name: 'DialogItemPreview MobileScreen',\n args: {\n title: 'Name',\n avatar: <Avatar size=\"lg\" icon={<UserSvg />} />,\n lastMessage: \"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.\",\n badge: <Badge count={5} />,\n contextMenu: <MoreSvg />\n },\n parameters: {\n viewport: {\n defaultViewport: 'iphonese2'\n }\n },\n render: args => {\n // eslint-disable-next-line no-param-reassign\n args.date = new Date(args.date!).toLocaleDateString();\n return <DialogItemPreview {...args} />;\n }\n}",...DialogItemPreviewMobileScreen.parameters?.docs?.source}}},DialogItemPreviewMobileScreenIPad.parameters={...DialogItemPreviewMobileScreenIPad.parameters,docs:{...DialogItemPreviewMobileScreenIPad.parameters?.docs,source:{originalSource:"{\n name: 'DialogItemPreview MobileScreen IPad',\n args: {\n title: 'Name',\n avatar: <Avatar size=\"lg\" icon={<UserSvg />} />,\n lastMessage: \"Hello, dear Mr. User. Thank you for choosing us. I'm here to assist with your order's delivery. Please provide your preferred address and any specific instructions. We offer standard, express, and same-day delivery in select areas. Let us know your convenience, and we'll ensure a smooth process.\",\n badge: <Badge count={5} />,\n contextMenu: <MoreSvg />\n },\n parameters: {\n viewport: {\n defaultViewport: 'ipad'\n }\n },\n render: args => {\n // eslint-disable-next-line no-param-reassign\n args.date = new Date(args.date!).toLocaleDateString();\n return <DialogItemPreview {...args} />;\n }\n}",...DialogItemPreviewMobileScreenIPad.parameters?.docs?.source}}};let __namedExportsOrder=["DialogItemPreviewDefault","DialogItemPreviewFullScreen","DialogItemPreviewMobileScreen","DialogItemPreviewMobileScreenIPad"]},"./src/Presentation/ui-components/Avatar/Avatar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Avatar_Avatar});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 Avatar_Avatar(_ref){let{icon=(0,jsx_runtime.jsx)(icons.vw,{}),size="md",className,src}=_ref;return src?(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:(0,jsx_runtime.jsx)("img",{src:src,className:"avatar__image",alt:"Avatar"})}):(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:icon})}try{Avatar_Avatar.displayName="Avatar",Avatar_Avatar.__docgenInfo={description:"",displayName:"Avatar",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"xl"'},{value:'"xxl"'}]}},icon:{defaultValue:{value:"<UserSvg />"},description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"]={docgenInfo:Avatar_Avatar.__docgenInfo,name:"Avatar",path:"src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Badge/Badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Badge_Badge});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Badge_Badge(_ref){let{count,limit,mute=!1,classNames}=_ref;return(0,jsx_runtime.jsx)("div",{className:classnames_default()("badge",{"badge--mute":mute},classNames),children:limit&&count>limit?"".concat(limit,"+"):count})}try{Badge_Badge.displayName="Badge",Badge_Badge.__docgenInfo={description:"",displayName:"Badge",props:{count:{defaultValue:null,description:"",name:"count",required:!0,type:{name:"number"}},limit:{defaultValue:null,description:"",name:"limit",required:!1,type:{name:"number"}},mute:{defaultValue:{value:"false"},description:"",name:"mute",required:!1,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Badge/Badge.tsx#Badge"]={docgenInfo:Badge_Badge.__docgenInfo,name:"Badge",path:"src/Presentation/ui-components/Badge/Badge.tsx#Badge"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Dropdown_Dropdown});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");function DropdownOption(_ref){let{label,value,disabled,leftIcon,rightIcon,onSelect}=_ref;return(0,jsx_runtime.jsxs)("li",{className:classnames_default()("dropdown__option",{"dropdown__option--disabled":disabled}),onClick:()=>!disabled&&onSelect(value),children:[(0,jsx_runtime.jsxs)("span",{className:"dropdown__label",children:[leftIcon,label]}),rightIcon]})}try{DropdownOption.displayName="DropdownOption",DropdownOption.__docgenInfo={description:"",displayName:"DropdownOption",props:{onSelect:{defaultValue:null,description:"",name:"onSelect",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},leftIcon:{defaultValue:null,description:"",name:"leftIcon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},rightIcon:{defaultValue:null,description:"",name:"rightIcon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Dropdown/DropdownOption.tsx#DropdownOption"]={docgenInfo:DropdownOption.__docgenInfo,name:"DropdownOption",path:"src/Presentation/ui-components/Dropdown/DropdownOption.tsx#DropdownOption"})}catch(__react_docgen_typescript_loader_error){}function Dropdown_Dropdown(_ref){let{options,disabled=!1,onSelect,className,children,placement="bottomRight"}=_ref,[isOpen,setIsOpen]=(0,react.useState)(!1),dropdownRef=(0,react.useRef)(null),handleSelect=value=>{onSelect(value),setIsOpen(!1)};return(0,react.useEffect)(()=>{let handleBlur=e=>{dropdownRef.current&&e.target instanceof Node&&!dropdownRef.current.contains(e.target)&&setIsOpen(!1)};return isOpen&&document.addEventListener("click",handleBlur,{capture:!0}),()=>document.removeEventListener("click",handleBlur)},[isOpen]),(0,jsx_runtime.jsxs)("div",{ref:dropdownRef,className:classnames_default()("dropdown",className),children:[(0,jsx_runtime.jsx)("button",{type:"button",className:"dropdown__toggle",onClick:e=>{e.stopPropagation(),setIsOpen(state=>!state)},children:children}),(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dropdown__menu","dropdown__menu--".concat(placement),{"dropdown__menu--opened":isOpen}),children:options.map(_ref2=>{let{label,value,leftIcon,rightIcon}=_ref2;return(0,jsx_runtime.jsx)(DropdownOption,{label:label,value:value,disabled:disabled,onSelect:handleSelect,leftIcon:leftIcon,rightIcon:rightIcon},value)})})]})}try{Dropdown_Dropdown.displayName="Dropdown",Dropdown_Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},onSelect:{defaultValue:null,description:"",name:"onSelect",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},placement:{defaultValue:{value:"bottomRight"},description:"",name:"placement",required:!1,type:{name:"enum",value:[{value:'"topRight"'},{value:'"bottomRight"'},{value:'"left"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown_Dropdown.__docgenInfo,name:"Dropdown",path:"src/Presentation/ui-components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>PreviewFileMessage_PreviewFileMessage});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");let iconDictionary={document:icons.K,audio:icons.rR,video:icons.Hd};function PreviewFileMessage_PreviewFileMessage(_ref){let{type="document",name,src,className}=_ref,Icon=iconDictionary[type];return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("preview-file-message",className),children:[src?(0,jsx_runtime.jsx)("img",{src:src,alt:"",className:"preview-file-message__image"}):(0,jsx_runtime.jsx)("span",{className:"preview-file-message__image",children:(0,jsx_runtime.jsx)(Icon,{className:"preview-file-message__icon"})}),(0,jsx_runtime.jsx)("span",{className:"preview-file-message__name",children:name})]})}try{PreviewFileMessage_PreviewFileMessage.displayName="PreviewFileMessage",PreviewFileMessage_PreviewFileMessage.__docgenInfo={description:"",displayName:"PreviewFileMessage",props:{type:{defaultValue:{value:"document"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"document"'},{value:'"audio"'},{value:'"video"'}]}},name:{defaultValue:null,description:"",name:"name",required:!0,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx#PreviewFileMessage"]={docgenInfo:PreviewFileMessage_PreviewFileMessage.__docgenInfo,name:"PreviewFileMessage",path:"src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx#PreviewFileMessage"})}catch(__react_docgen_typescript_loader_error){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[665],{"./src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DialogWindowDefault:()=>DialogWindowDefault,__namedExportsOrder:()=>__namedExportsOrder,default:()=>DialogWindow_stories});var react=__webpack_require__("./node_modules/react/index.js"),react_dom=__webpack_require__("./node_modules/react-dom/index.js"),classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),Header=__webpack_require__("./src/Presentation/ui-components/Header/Header.tsx"),icons=__webpack_require__("./src/Presentation/icons/index.ts"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function DialogWindow_DialogWindow(_ref){let{children,onClose,open=!1,title,className,disableActions=!1}=_ref;return open?(0,react_dom.createPortal)((0,jsx_runtime.jsxs)("div",{className:classnames_default()("dialog-window",className),children:[(0,jsx_runtime.jsx)("div",{className:classnames_default()("",{"dialog-window--disable":disableActions})}),(0,jsx_runtime.jsxs)("div",{className:"dialog-window__content",children:[(0,jsx_runtime.jsx)(Header.Z,{className:"dialog-window__header",onGoBack:onClose,title:title,children:(0,jsx_runtime.jsx)(icons.sZ,{onClick:onClose,className:"dialog-window__close"})}),children]})]}),document.body):null}try{DialogWindow_DialogWindow.displayName="DialogWindow",DialogWindow_DialogWindow.__docgenInfo={description:"",displayName:"DialogWindow",props:{open:{defaultValue:{value:"false"},description:"",name:"open",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"VoidFunction"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},disableActions:{defaultValue:{value:"false"},description:"",name:"disableActions",required:!1,type:{name:"boolean"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/DialogWindow/DialogWindow.tsx#DialogWindow"]={docgenInfo:DialogWindow_DialogWindow.__docgenInfo,name:"DialogWindow",path:"src/Presentation/ui-components/DialogWindow/DialogWindow.tsx#DialogWindow"})}catch(__react_docgen_typescript_loader_error){}var Button=__webpack_require__("./src/Presentation/ui-components/Button/Button.tsx");let DialogWindow_stories={title:"@quickblox-react-ui-kit/Presentation/ui-components/DialogWindow",component:DialogWindow_DialogWindow,tags:["autodocs"],parameters:{layout:"centered"},args:{children:void 0,open:!1,title:"",className:"",onClose:void 0},argTypes:{title:{table:{defaultValue:{summary:""},type:{summary:"string"}},description:"Title for modal window"},children:{table:{defaultValue:{summary:"ReactNode"},type:{summary:"ReactElement | ReactElement[]"}},description:"Primary content"},open:{table:{defaultValue:{summary:!1},type:{summary:"boolean"}},description:"Open modal window"},className:{table:{defaultValue:{summary:"string"},type:{summary:"string"}},description:"Additional classes"},onClose:{table:{type:{summary:"VoidFunction"}},description:"closes the modal window"}}};function DialogWindowExample(){let[isOpen,setIsOpen]=(0,react.useState)(!1),handleOnChange=()=>{setIsOpen(state=>!state)};return(0,jsx_runtime.jsxs)("div",{children:[(0,jsx_runtime.jsx)(Button.Z,{onClick:handleOnChange,type:"button",children:"Button"}),(0,jsx_runtime.jsx)(DialogWindow_DialogWindow,{open:isOpen,title:"Headline",onClose:handleOnChange,children:(0,jsx_runtime.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:"48px",gap:"8px"},children:[(0,jsx_runtime.jsx)(Button.Z,{variant:"outlined",onClick:handleOnChange,children:"Button"}),(0,jsx_runtime.jsx)(Button.Z,{variant:"danger",onClick:handleOnChange,children:"Button"})]})})]})}let DialogWindowDefault={name:"DialogWindow Default",render:()=>(0,jsx_runtime.jsx)(DialogWindowExample,{})};DialogWindowDefault.parameters={...DialogWindowDefault.parameters,docs:{...DialogWindowDefault.parameters?.docs,source:{originalSource:"{\n name: 'DialogWindow Default',\n render: () => <DialogWindowExample />\n}",...DialogWindowDefault.parameters?.docs?.source}}};let __namedExportsOrder=["DialogWindowDefault"]},"./src/Presentation/ui-components/Button/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Button_Button});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),Loader=__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Button_Button(_ref){let{variant="default",className,disabled=!1,loading=!1,children,...rest}=_ref;return(0,jsx_runtime.jsx)("button",{className:classnames_default()("button","button--".concat(variant),{"button--disabled":disabled},className),disabled:disabled||loading,...rest,children:loading&&!disabled?(0,jsx_runtime.jsx)(Loader.Z,{className:classnames_default()("button__loader","button__loader--".concat(variant))}):children})}try{Button_Button.displayName="Button",Button_Button.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"default"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"default"'},{value:'"outlined"'},{value:'"danger"'}]}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",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/Button/Button.tsx#Button"]={docgenInfo:Button_Button.__docgenInfo,name:"Button",path:"src/Presentation/ui-components/Button/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Header/Header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>ui_components_Header_Header});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"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let Header_Header=_ref=>{let{title,avatar,badge,children,onGoBack,className}=_ref;return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("dialog-header",className),children:[onGoBack&&(0,jsx_runtime.jsx)(icons.Hg,{className:"dialog-header__icon dialog-header__back",onClick:onGoBack}),(0,jsx_runtime.jsxs)("div",{className:"dialog-header__body",children:[(0,jsx_runtime.jsxs)("div",{className:"dialog-header__body-left",children:[avatar,(0,jsx_runtime.jsx)("span",{className:"dialog-header__title",children:title}),badge]}),children&&(0,jsx_runtime.jsx)("div",{className:"dialog-header__body-right",children:react.Children.map(children,child=>(0,jsx_runtime.jsx)("span",{className:"dialog-header__icon",children:child}))})]})]})},ui_components_Header_Header=Header_Header;try{Header_Header.displayName="Header",Header_Header.__docgenInfo={description:"",displayName:"Header",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},avatar:{defaultValue:null,description:"",name:"avatar",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},onGoBack:{defaultValue:null,description:"",name:"onGoBack",required:!1,type:{name:"FunctionTypeVoidToVoid"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Header/Header.tsx#Header"]={docgenInfo:Header_Header.__docgenInfo,name:"Header",path:"src/Presentation/ui-components/Header/Header.tsx#Header"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Loader/Loader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[148],{"./src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{DropdownDefault:()=>DropdownDefault,DropdownLeftIcon:()=>DropdownLeftIcon,DropdownRightIcon:()=>DropdownRightIcon,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _icons__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/Presentation/icons/index.ts"),_Dropdown__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/Presentation/ui-components/Dropdown/Dropdown.tsx"),_Button_Button__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/Presentation/ui-components/Button/Button.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/react/jsx-runtime.js");let __WEBPACK_DEFAULT_EXPORT__={title:"@quickblox-react-ui-kit/Presentation/ui-components/Dropdown",component:_Dropdown__WEBPACK_IMPORTED_MODULE_1__.Z,tags:["autodocs"],parameters:{layout:"centered"},args:{disabled:!1,options:[{value:"",label:"",leftIcon:void 0,rightIcon:void 0}],className:""},argTypes:{children:{control:!1,table:{defaultValue:{summary:null},type:{summary:"ReactElement | string | number"}},description:"Primary content"},placement:{table:{defaultValue:{summary:"bottomRight"},type:{summary:"topRight | bottomRight | left"}},description:"The property that will determine where the Dropdown will appear"},className:{table:{type:{summary:"string"}},description:"Additional classes"},onSelect:{table:{type:{summary:"function"}},description:"Dropdown option selection function"},disabled:{table:{defaultValue:{summary:!1},type:{summary:"boolean"}},description:"Active"},options:{table:{defaultValue:{summary:"array",detail:'[{ value: "", label: "" }]'},type:{summary:"object",detail:"\n{\n value: string; \n label: string; \n leftIcon?: ReactElement; \n rightIcon?: ReactElement; \n} "}},description:"A set of options that can be passed to the dropdown"}}},DropdownDefault={args:{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button_Button__WEBPACK_IMPORTED_MODULE_2__.Z,{children:"Button"}),disabled:!1,options:[{value:"Text 1",label:"Text 1"},{value:"Text 2",label:"Text 2"},{value:"Text 3",label:"Text 3"}]}},DropdownRightIcon={args:{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button_Button__WEBPACK_IMPORTED_MODULE_2__.Z,{children:"Button"}),disable:!1,options:[{value:"Text 1",label:"Text 1",rightIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.wh,{style:{width:"18px",height:"18px"}})},{value:"Text 2",label:"Text 2",rightIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.wh,{style:{width:"18px",height:"18px"}})},{value:"Text 3",label:"Text 3",rightIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.wh,{style:{width:"18px",height:"18px"}})}]}},DropdownLeftIcon={args:{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Button_Button__WEBPACK_IMPORTED_MODULE_2__.Z,{children:"Button"}),disable:!1,options:[{value:"Text 1",label:"Text 1",leftIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.iO,{style:{width:"18px",height:"18px"}})},{value:"Text 2",label:"Text 2",leftIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.iO,{style:{width:"18px",height:"18px"}})},{value:"Text 3",label:"Text 3",leftIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_0__.iO,{style:{width:"18px",height:"18px"}})}]}};DropdownDefault.parameters={...DropdownDefault.parameters,docs:{...DropdownDefault.parameters?.docs,source:{originalSource:"{\n args: {\n children: <Button>Button</Button>,\n disabled: false,\n options: [{\n value: 'Text 1',\n label: 'Text 1'\n }, {\n value: 'Text 2',\n label: 'Text 2'\n }, {\n value: 'Text 3',\n label: 'Text 3'\n }]\n }\n}",...DropdownDefault.parameters?.docs?.source}}},DropdownRightIcon.parameters={...DropdownRightIcon.parameters,docs:{...DropdownRightIcon.parameters?.docs,source:{originalSource:"{\n args: {\n children: <Button>Button</Button>,\n disable: false,\n options: [{\n value: 'Text 1',\n label: 'Text 1',\n rightIcon: <NextSVG style={{\n width: '18px',\n height: '18px'\n }} />\n }, {\n value: 'Text 2',\n label: 'Text 2',\n rightIcon: <NextSVG style={{\n width: '18px',\n height: '18px'\n }} />\n }, {\n value: 'Text 3',\n label: 'Text 3',\n rightIcon: <NextSVG style={{\n width: '18px',\n height: '18px'\n }} />\n }]\n }\n}",...DropdownRightIcon.parameters?.docs?.source}}},DropdownLeftIcon.parameters={...DropdownLeftIcon.parameters,docs:{...DropdownLeftIcon.parameters?.docs,source:{originalSource:"{\n args: {\n children: <Button>Button</Button>,\n disable: false,\n options: [{\n value: 'Text 1',\n label: 'Text 1',\n leftIcon: <LocationSvg style={{\n width: '18px',\n height: '18px'\n }} />\n }, {\n value: 'Text 2',\n label: 'Text 2',\n leftIcon: <LocationSvg style={{\n width: '18px',\n height: '18px'\n }} />\n }, {\n value: 'Text 3',\n label: 'Text 3',\n leftIcon: <LocationSvg style={{\n width: '18px',\n height: '18px'\n }} />\n }]\n }\n}",...DropdownLeftIcon.parameters?.docs?.source}}};let __namedExportsOrder=["DropdownDefault","DropdownRightIcon","DropdownLeftIcon"]},"./src/Presentation/ui-components/Button/Button.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Button_Button});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),Loader=__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Button_Button(_ref){let{variant="default",className,disabled=!1,loading=!1,children,...rest}=_ref;return(0,jsx_runtime.jsx)("button",{className:classnames_default()("button","button--".concat(variant),{"button--disabled":disabled},className),disabled:disabled||loading,...rest,children:loading&&!disabled?(0,jsx_runtime.jsx)(Loader.Z,{className:classnames_default()("button__loader","button__loader--".concat(variant))}):children})}try{Button_Button.displayName="Button",Button_Button.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"default"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"default"'},{value:'"outlined"'},{value:'"danger"'}]}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",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/Button/Button.tsx#Button"]={docgenInfo:Button_Button.__docgenInfo,name:"Button",path:"src/Presentation/ui-components/Button/Button.tsx#Button"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Dropdown/Dropdown.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Dropdown_Dropdown});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");function DropdownOption(_ref){let{label,value,disabled,leftIcon,rightIcon,onSelect}=_ref;return(0,jsx_runtime.jsxs)("li",{className:classnames_default()("dropdown__option",{"dropdown__option--disabled":disabled}),onClick:()=>!disabled&&onSelect(value),children:[(0,jsx_runtime.jsxs)("span",{className:"dropdown__label",children:[leftIcon,label]}),rightIcon]})}try{DropdownOption.displayName="DropdownOption",DropdownOption.__docgenInfo={description:"",displayName:"DropdownOption",props:{onSelect:{defaultValue:null,description:"",name:"onSelect",required:!0,type:{name:"(value: string) => void"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},leftIcon:{defaultValue:null,description:"",name:"leftIcon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},rightIcon:{defaultValue:null,description:"",name:"rightIcon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Dropdown/DropdownOption.tsx#DropdownOption"]={docgenInfo:DropdownOption.__docgenInfo,name:"DropdownOption",path:"src/Presentation/ui-components/Dropdown/DropdownOption.tsx#DropdownOption"})}catch(__react_docgen_typescript_loader_error){}function Dropdown_Dropdown(_ref){let{options,disabled=!1,onSelect,className,children,placement="bottomRight"}=_ref,[isOpen,setIsOpen]=(0,react.useState)(!1),dropdownRef=(0,react.useRef)(null),handleSelect=value=>{onSelect(value),setIsOpen(!1)};return(0,react.useEffect)(()=>{let handleBlur=e=>{dropdownRef.current&&e.target instanceof Node&&!dropdownRef.current.contains(e.target)&&setIsOpen(!1)};return isOpen&&document.addEventListener("click",handleBlur,{capture:!0}),()=>document.removeEventListener("click",handleBlur)},[isOpen]),(0,jsx_runtime.jsxs)("div",{ref:dropdownRef,className:classnames_default()("dropdown",className),children:[(0,jsx_runtime.jsx)("button",{type:"button",className:"dropdown__toggle",onClick:e=>{e.stopPropagation(),setIsOpen(state=>!state)},children:children}),(0,jsx_runtime.jsx)("ul",{className:classnames_default()("dropdown__menu","dropdown__menu--".concat(placement),{"dropdown__menu--opened":isOpen}),children:options.map(_ref2=>{let{label,value,leftIcon,rightIcon}=_ref2;return(0,jsx_runtime.jsx)(DropdownOption,{label:label,value:value,disabled:disabled,onSelect:handleSelect,leftIcon:leftIcon,rightIcon:rightIcon},value)})})]})}try{Dropdown_Dropdown.displayName="Dropdown",Dropdown_Dropdown.__docgenInfo={description:"",displayName:"Dropdown",props:{options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"Option[]"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},onSelect:{defaultValue:null,description:"",name:"onSelect",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},placement:{defaultValue:{value:"bottomRight"},description:"",name:"placement",required:!1,type:{name:"enum",value:[{value:'"topRight"'},{value:'"bottomRight"'},{value:'"left"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Dropdown/Dropdown.tsx#Dropdown"]={docgenInfo:Dropdown_Dropdown.__docgenInfo,name:"Dropdown",path:"src/Presentation/ui-components/Dropdown/Dropdown.tsx#Dropdown"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Loader/Loader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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){}}}]);
|
package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[752],{"./node_modules/@storybook/addon-viewport/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{p:()=>INITIAL_VIEWPORTS});var INITIAL_VIEWPORTS={iphone5:{name:"iPhone 5",styles:{height:"568px",width:"320px"},type:"mobile"},iphone6:{name:"iPhone 6",styles:{height:"667px",width:"375px"},type:"mobile"},iphone6p:{name:"iPhone 6 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphone8p:{name:"iPhone 8 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphonex:{name:"iPhone X",styles:{height:"812px",width:"375px"},type:"mobile"},iphonexr:{name:"iPhone XR",styles:{height:"896px",width:"414px"},type:"mobile"},iphonexsmax:{name:"iPhone XS Max",styles:{height:"896px",width:"414px"},type:"mobile"},iphonese2:{name:"iPhone SE (2nd generation)",styles:{height:"667px",width:"375px"},type:"mobile"},iphone12mini:{name:"iPhone 12 mini",styles:{height:"812px",width:"375px"},type:"mobile"},iphone12:{name:"iPhone 12",styles:{height:"844px",width:"390px"},type:"mobile"},iphone12promax:{name:"iPhone 12 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphoneSE3:{name:"iPhone SE 3rd generation",styles:{height:"667px",width:"375px"},type:"mobile"},iphone13:{name:"iPhone 13",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13pro:{name:"iPhone 13 Pro",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13promax:{name:"iPhone 13 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphone14:{name:"iPhone 14",styles:{height:"844px",width:"390px"},type:"mobile"},iphone14pro:{name:"iPhone 14 Pro",styles:{height:"852px",width:"393px"},type:"mobile"},iphone14promax:{name:"iPhone 14 Pro Max",styles:{height:"932px",width:"430px"},type:"mobile"},ipad:{name:"iPad",styles:{height:"1024px",width:"768px"},type:"tablet"},ipad10p:{name:"iPad Pro 10.5-in",styles:{height:"1112px",width:"834px"},type:"tablet"},ipad11p:{name:"iPad Pro 11-in",styles:{height:"1194px",width:"834px"},type:"tablet"},ipad12p:{name:"iPad Pro 12.9-in",styles:{height:"1366px",width:"1024px"},type:"tablet"},galaxys5:{name:"Galaxy S5",styles:{height:"640px",width:"360px"},type:"mobile"},galaxys9:{name:"Galaxy S9",styles:{height:"740px",width:"360px"},type:"mobile"},nexus5x:{name:"Nexus 5X",styles:{height:"660px",width:"412px"},type:"mobile"},nexus6p:{name:"Nexus 6P",styles:{height:"732px",width:"412px"},type:"mobile"},pixel:{name:"Pixel",styles:{height:"960px",width:"540px"},type:"mobile"},pixelxl:{name:"Pixel XL",styles:{height:"1280px",width:"720px"},type:"mobile"}}},"./src/Presentation/ui-components/Header/Header.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{HeaderDefault:()=>HeaderDefault,HeaderWithAvatar:()=>HeaderWithAvatar,HeaderWithAvatarAndBack:()=>HeaderWithAvatarAndBack,HeaderWithOneChildrenIcon:()=>HeaderWithOneChildrenIcon,HeaderWithTwoChildrenIcon:()=>HeaderWithTwoChildrenIcon,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var _storybook_addon_viewport__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@storybook/addon-viewport/dist/index.mjs"),_Header__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/Presentation/ui-components/Header/Header.tsx"),_icons__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./src/Presentation/icons/index.ts"),_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./src/Presentation/ui-components/Avatar/Avatar.tsx"),react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./node_modules/react/jsx-runtime.js");let __WEBPACK_DEFAULT_EXPORT__={title:"@quickblox-react-ui-kit/Presentation/ui-components/Header",component:_Header__WEBPACK_IMPORTED_MODULE_1__.Z,tags:["autodocs"],parameters:{viewport:{viewports:_storybook_addon_viewport__WEBPACK_IMPORTED_MODULE_0__.p}},argTypes:{title:{control:{type:"text"},description:"Dialog title"},avatar:{description:"Avatar or Icon",type:"function",options:["None","User","Group","Public","Photo"],control:"select",mapping:{None:void 0,User:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.vw,{})}),Group:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.Av,{})}),Public:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.UZ,{})}),Photo:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{src:"https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg"})}},badge:{control:!1,description:"Badge or dialog status"},children:{type:"function",options:["None","SingleIcon","MultiplyIcons","Close"],control:"select",mapping:{None:void 0,SingleIcon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.VY,{}),MultiplyIcons:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.K1,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.Xg,{})],Close:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.sZ,{})},table:{type:{summary:"svg"}},description:"Additional content: list of icons"},onGoBack:{action:"clicked back button"},classNames:{table:{type:{summary:"string"}},description:"Additional classes"}}},HeaderDefault={args:{title:"Default Dialog desktop"},parameters:{layout:"centered"}},HeaderWithAvatar={args:{title:"Default Dialog desktop",avatar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.vw,{})})},parameters:{layout:"centered"}},HeaderWithAvatarAndBack={args:{title:"Default Dialog mobile",avatar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.vw,{})}),onGoBack:()=>{window.alert("onGoBack")}},parameters:{viewport:{defaultViewport:"iphonese2"}}},HeaderWithOneChildrenIcon={args:{title:"Default Dialog desktop",avatar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.vw,{})}),children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.sZ,{}),onGoBack:void 0},parameters:{layout:"centered"}},HeaderWithTwoChildrenIcon={args:{title:"Default Dialog desktop",avatar:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_Avatar_Avatar__WEBPACK_IMPORTED_MODULE_3__.Z,{icon:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.vw,{})}),children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.K1,{}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_2__.Xg,{})],onGoBack:void 0},parameters:{layout:"centered"}};HeaderDefault.parameters={...HeaderDefault.parameters,docs:{...HeaderDefault.parameters?.docs,source:{originalSource:"{\n args: {\n title: 'Default Dialog desktop'\n },\n parameters: {\n layout: 'centered'\n }\n}",...HeaderDefault.parameters?.docs?.source}}},HeaderWithAvatar.parameters={...HeaderWithAvatar.parameters,docs:{...HeaderWithAvatar.parameters?.docs,source:{originalSource:"{\n args: {\n title: 'Default Dialog desktop',\n avatar: <Avatar icon={<UserSvg />} />\n },\n parameters: {\n layout: 'centered'\n }\n}",...HeaderWithAvatar.parameters?.docs?.source}}},HeaderWithAvatarAndBack.parameters={...HeaderWithAvatarAndBack.parameters,docs:{...HeaderWithAvatarAndBack.parameters?.docs,source:{originalSource:"{\n args: {\n title: 'Default Dialog mobile',\n avatar: <Avatar icon={<UserSvg />} />,\n onGoBack: () => {\n window.alert('onGoBack');\n }\n },\n parameters: {\n viewport: {\n defaultViewport: 'iphonese2'\n }\n }\n}",...HeaderWithAvatarAndBack.parameters?.docs?.source}}},HeaderWithOneChildrenIcon.parameters={...HeaderWithOneChildrenIcon.parameters,docs:{...HeaderWithOneChildrenIcon.parameters?.docs,source:{originalSource:"{\n args: {\n title: 'Default Dialog desktop',\n avatar: <Avatar icon={<UserSvg />} />,\n children: <CloseSvg />,\n onGoBack: undefined\n },\n parameters: {\n layout: 'centered'\n }\n}",...HeaderWithOneChildrenIcon.parameters?.docs?.source}}},HeaderWithTwoChildrenIcon.parameters={...HeaderWithTwoChildrenIcon.parameters,docs:{...HeaderWithTwoChildrenIcon.parameters?.docs,source:{originalSource:"{\n args: {\n title: 'Default Dialog desktop',\n avatar: <Avatar icon={<UserSvg />} />,\n children: [<SearchSvg />, <NewChatSvg />],\n onGoBack: undefined\n },\n parameters: {\n layout: 'centered'\n }\n}",...HeaderWithTwoChildrenIcon.parameters?.docs?.source}}};let __namedExportsOrder=["HeaderDefault","HeaderWithAvatar","HeaderWithAvatarAndBack","HeaderWithOneChildrenIcon","HeaderWithTwoChildrenIcon"]},"./src/Presentation/ui-components/Avatar/Avatar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Avatar_Avatar});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 Avatar_Avatar(_ref){let{icon=(0,jsx_runtime.jsx)(icons.vw,{}),size="md",className,src}=_ref;return src?(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:(0,jsx_runtime.jsx)("img",{src:src,className:"avatar__image",alt:"Avatar"})}):(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:icon})}try{Avatar_Avatar.displayName="Avatar",Avatar_Avatar.__docgenInfo={description:"",displayName:"Avatar",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"xl"'},{value:'"xxl"'}]}},icon:{defaultValue:{value:"<UserSvg />"},description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"]={docgenInfo:Avatar_Avatar.__docgenInfo,name:"Avatar",path:"src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Header/Header.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>ui_components_Header_Header});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"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let Header_Header=_ref=>{let{title,avatar,badge,children,onGoBack,className}=_ref;return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("dialog-header",className),children:[onGoBack&&(0,jsx_runtime.jsx)(icons.Hg,{className:"dialog-header__icon dialog-header__back",onClick:onGoBack}),(0,jsx_runtime.jsxs)("div",{className:"dialog-header__body",children:[(0,jsx_runtime.jsxs)("div",{className:"dialog-header__body-left",children:[avatar,(0,jsx_runtime.jsx)("span",{className:"dialog-header__title",children:title}),badge]}),children&&(0,jsx_runtime.jsx)("div",{className:"dialog-header__body-right",children:react.Children.map(children,child=>(0,jsx_runtime.jsx)("span",{className:"dialog-header__icon",children:child}))})]})]})},ui_components_Header_Header=Header_Header;try{Header_Header.displayName="Header",Header_Header.__docgenInfo={description:"",displayName:"Header",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},avatar:{defaultValue:null,description:"",name:"avatar",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},badge:{defaultValue:null,description:"",name:"badge",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},onGoBack:{defaultValue:null,description:"",name:"onGoBack",required:!1,type:{name:"FunctionTypeVoidToVoid"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Header/Header.tsx#Header"]={docgenInfo:Header_Header.__docgenInfo,name:"Header",path:"src/Presentation/ui-components/Header/Header.tsx#Header"})}catch(__react_docgen_typescript_loader_error){}}}]);
|
package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[356],{"./src/Presentation/ui-components/Loader/Loader.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{LoaderDefault:()=>LoaderDefault,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__={title:"@quickblox-react-ui-kit/Presentation/ui-components/Loader",component:__webpack_require__("./src/Presentation/ui-components/Loader/Loader.tsx").Z,tags:["autodocs"],parameters:{layout:"centered"},args:{className:""},argTypes:{size:{options:["sm","md","lg"],control:{type:"select"},table:{defaultValue:{summary:"md"},type:{summary:"string"}},description:"Size"},className:{table:{defaultValue:{summary:"string"},type:{summary:"string"}},description:"Additional classes"}}},LoaderDefault={};LoaderDefault.parameters={...LoaderDefault.parameters,docs:{...LoaderDefault.parameters?.docs,source:{originalSource:"{}",...LoaderDefault.parameters?.docs?.source}}};let __namedExportsOrder=["LoaderDefault"]},"./src/Presentation/ui-components/Loader/Loader.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__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){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[687],{"./node_modules/@storybook/addon-viewport/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{p:()=>INITIAL_VIEWPORTS});var INITIAL_VIEWPORTS={iphone5:{name:"iPhone 5",styles:{height:"568px",width:"320px"},type:"mobile"},iphone6:{name:"iPhone 6",styles:{height:"667px",width:"375px"},type:"mobile"},iphone6p:{name:"iPhone 6 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphone8p:{name:"iPhone 8 Plus",styles:{height:"736px",width:"414px"},type:"mobile"},iphonex:{name:"iPhone X",styles:{height:"812px",width:"375px"},type:"mobile"},iphonexr:{name:"iPhone XR",styles:{height:"896px",width:"414px"},type:"mobile"},iphonexsmax:{name:"iPhone XS Max",styles:{height:"896px",width:"414px"},type:"mobile"},iphonese2:{name:"iPhone SE (2nd generation)",styles:{height:"667px",width:"375px"},type:"mobile"},iphone12mini:{name:"iPhone 12 mini",styles:{height:"812px",width:"375px"},type:"mobile"},iphone12:{name:"iPhone 12",styles:{height:"844px",width:"390px"},type:"mobile"},iphone12promax:{name:"iPhone 12 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphoneSE3:{name:"iPhone SE 3rd generation",styles:{height:"667px",width:"375px"},type:"mobile"},iphone13:{name:"iPhone 13",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13pro:{name:"iPhone 13 Pro",styles:{height:"844px",width:"390px"},type:"mobile"},iphone13promax:{name:"iPhone 13 Pro Max",styles:{height:"926px",width:"428px"},type:"mobile"},iphone14:{name:"iPhone 14",styles:{height:"844px",width:"390px"},type:"mobile"},iphone14pro:{name:"iPhone 14 Pro",styles:{height:"852px",width:"393px"},type:"mobile"},iphone14promax:{name:"iPhone 14 Pro Max",styles:{height:"932px",width:"430px"},type:"mobile"},ipad:{name:"iPad",styles:{height:"1024px",width:"768px"},type:"tablet"},ipad10p:{name:"iPad Pro 10.5-in",styles:{height:"1112px",width:"834px"},type:"tablet"},ipad11p:{name:"iPad Pro 11-in",styles:{height:"1194px",width:"834px"},type:"tablet"},ipad12p:{name:"iPad Pro 12.9-in",styles:{height:"1366px",width:"1024px"},type:"tablet"},galaxys5:{name:"Galaxy S5",styles:{height:"640px",width:"360px"},type:"mobile"},galaxys9:{name:"Galaxy S9",styles:{height:"740px",width:"360px"},type:"mobile"},nexus5x:{name:"Nexus 5X",styles:{height:"660px",width:"412px"},type:"mobile"},nexus6p:{name:"Nexus 6P",styles:{height:"732px",width:"412px"},type:"mobile"},pixel:{name:"Pixel",styles:{height:"960px",width:"540px"},type:"mobile"},pixelxl:{name:"Pixel XL",styles:{height:"1280px",width:"720px"},type:"mobile"}}},"./src/Presentation/ui-components/Message/Message.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{MessageFile:()=>MessageFile,MessageImage:()=>MessageImage,MessageText:()=>MessageText,__namedExportsOrder:()=>__namedExportsOrder,default:()=>Message_stories});var react=__webpack_require__("./node_modules/react/index.js"),dist=__webpack_require__("./node_modules/@storybook/addon-viewport/dist/index.mjs"),Avatar=__webpack_require__("./src/Presentation/ui-components/Avatar/Avatar.tsx"),CheckBox=__webpack_require__("./src/Presentation/ui-components/CheckBox/CheckBox.tsx"),forward_filled=__webpack_require__("./src/Presentation/icons/actions/forward-filled.svg"),reply_filled=__webpack_require__("./src/Presentation/icons/actions/reply-filled.svg"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");let subtypeIconDictionary={forward:forward_filled.r,reply:reply_filled.r},renderSubtype=subtype=>{let SubTypeIcon=subtypeIconDictionary[subtype];return(0,jsx_runtime.jsx)(SubTypeIcon,{className:"message-caption__forward-reply--".concat(subtype)})};function MessageCaption_MessageCaption(_ref){let{type,subtype,userName}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"message-caption__user__caption",children:[(0,jsx_runtime.jsxs)("div",{className:"message-caption__forward-reply",children:[subtype&&renderSubtype(subtype),(0,jsx_runtime.jsxs)("span",{className:"message-caption__forward-reply__from",children:["forward"===subtype&&"Forwarded from ","reply"===subtype&&"Replied to "]})]}),("incoming"===type||"reply"===subtype||"forward"===subtype)&&(0,jsx_runtime.jsx)("div",{className:"message-caption__user__caption__name",children:userName})]})}try{MessageCaption_MessageCaption.displayName="MessageCaption",MessageCaption_MessageCaption.__docgenInfo={description:"",displayName:"MessageCaption",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"outgoing"'},{value:'"incoming"'}]}},subtype:{defaultValue:null,description:"",name:"subtype",required:!1,type:{name:"enum",value:[{value:'"reply"'},{value:'"forward"'}]}},userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/MessageCaption/MessageCaption.tsx#MessageCaption"]={docgenInfo:MessageCaption_MessageCaption.__docgenInfo,name:"MessageCaption",path:"src/Presentation/ui-components/Message/MessageCaption/MessageCaption.tsx#MessageCaption"})}catch(__react_docgen_typescript_loader_error){}var sent=__webpack_require__("./src/Presentation/icons/status/sent.svg"),viewed_delivered=__webpack_require__("./src/Presentation/icons/status/viewed-delivered.svg"),error=__webpack_require__("./src/Presentation/icons/status/error.svg");let statusIconDictionary={sent:sent.r,delivered:viewed_delivered.r,viewed:viewed_delivered.r,error:error.r};function TimeAndStatus_TimeAndStatus(_ref){let{status,time}=_ref,StatusIcon=statusIconDictionary[status];return(0,jsx_runtime.jsxs)("div",{className:"time-status__caption",children:[status&&(0,jsx_runtime.jsx)("div",{className:"time-status__caption__status",children:(0,jsx_runtime.jsx)(StatusIcon,{className:"status-message--".concat(status)})}),(0,jsx_runtime.jsx)("div",{className:"time-status__time",children:time})]})}try{TimeAndStatus_TimeAndStatus.displayName="TimeAndStatus",TimeAndStatus_TimeAndStatus.__docgenInfo={description:"",displayName:"TimeAndStatus",props:{status:{defaultValue:null,description:"",name:"status",required:!1,type:{name:"enum",value:[{value:'"sent"'},{value:'"delivered"'},{value:'"viewed"'},{value:'"error"'}]}},time:{defaultValue:null,description:"",name:"time",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.tsx#TimeAndStatus"]={docgenInfo:TimeAndStatus_TimeAndStatus.__docgenInfo,name:"TimeAndStatus",path:"src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.tsx#TimeAndStatus"})}catch(__react_docgen_typescript_loader_error){}function Message_Message(_ref){let{userName,avatar=(0,jsx_runtime.jsx)(Avatar.Z,{}),time,type,status,subtype,enableSelect=!1,isSelect=!1,disabled=!1,onSelect,bottomPart,additionalPart,children}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"message-item",children:[enableSelect&&(0,jsx_runtime.jsx)(CheckBox.Z,{disabled:disabled,checked:isSelect,onChange:onSelect}),"outgoing"===type?(0,jsx_runtime.jsx)("div",{className:"message-item__right",children:(0,jsx_runtime.jsxs)("div",{className:"message-item__outgoing",children:[(0,jsx_runtime.jsx)(TimeAndStatus_TimeAndStatus,{status:status,time:time}),additionalPart,(0,jsx_runtime.jsxs)("div",{className:"message-item__outgoing__chat",children:[(0,jsx_runtime.jsx)(MessageCaption_MessageCaption,{type:type,subtype:subtype,userName:userName}),children]})]})}):(0,jsx_runtime.jsx)("div",{children:(0,jsx_runtime.jsxs)("div",{className:"message-item__incoming-mes",children:[avatar,(0,jsx_runtime.jsxs)("div",{className:"message-item__incoming",children:[(0,jsx_runtime.jsx)(MessageCaption_MessageCaption,{type:type,subtype:subtype,userName:userName}),(0,jsx_runtime.jsxs)("div",{className:"message-item__incoming__chat",children:[(0,jsx_runtime.jsxs)("div",{className:"message-item__incoming__chat__bubble",children:[children,bottomPart]}),additionalPart,(0,jsx_runtime.jsx)(TimeAndStatus_TimeAndStatus,{time:time})]})]})]})})]})}try{Message_Message.displayName="Message",Message_Message.__docgenInfo={description:"",displayName:"Message",props:{userName:{defaultValue:null,description:"",name:"userName",required:!0,type:{name:"string"}},avatar:{defaultValue:{value:"<Avatar />"},description:"",name:"avatar",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},time:{defaultValue:null,description:"",name:"time",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"outgoing"'},{value:'"incoming"'}]}},subtype:{defaultValue:null,description:"",name:"subtype",required:!1,type:{name:"enum",value:[{value:'"reply"'},{value:'"forward"'}]}},status:{defaultValue:null,description:"",name:"status",required:!1,type:{name:"enum",value:[{value:'"sent"'},{value:'"delivered"'},{value:'"viewed"'},{value:'"error"'}]}},enableSelect:{defaultValue:{value:"false"},description:"",name:"enableSelect",required:!1,type:{name:"boolean"}},isSelect:{defaultValue:{value:"false"},description:"",name:"isSelect",required:!1,type:{name:"boolean"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},onSelect:{defaultValue:null,description:"",name:"onSelect",required:!1,type:{name:"((isSelected: boolean) => void)"}},bottomPart:{defaultValue:null,description:"",name:"bottomPart",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},additionalPart:{defaultValue:null,description:"",name:"additionalPart",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Message.tsx#Message"]={docgenInfo:Message_Message.__docgenInfo,name:"Message",path:"src/Presentation/ui-components/Message/Message.tsx#Message"})}catch(__react_docgen_typescript_loader_error){}let pattern=/(https?:\/\/)?([\p{L}\p{N}_-]+(?:(?:\.[\p{L}\p{N}_-]+)+)[\p{L}\p{N}.,@?^=%&:/~+#-]*[\p{L}\p{N}@?^=%&/~+#-])/gu;function removeLastPunctuation(str){if(str.length>0){let lastChar=str.charAt(str.length-1);if(/[!;%:?*_.,:-]/.test(lastChar)||/[.,]/.test(lastChar))return str.slice(0,-1)}return str}let isURL=str=>{let regex=new RegExp(pattern);return regex.test(str)||regex.test(removeLastPunctuation(str))},getURIParts=url=>{let matches=url.match(/^(\w+?:\/\/)?([\w-\\.]+(?=\/?))?:?(\d*)?([^:]*)/);return{scheme:matches?matches[1]:void 0,host:matches?matches[2]:"",port:matches?matches[3]:void 0,pathname:matches?matches[4]:""}},getRuleUrl=url=>{let uriParts=getURIParts(url),result=url;return void 0===uriParts.scheme&&(result="http://".concat(url)),result},messageHasUrls=message=>{let result=0;return message.split(/\n| /).forEach(s=>{(s.match(pattern)||removeLastPunctuation(s).match(pattern))&&(result+=1)}),result>0},HighLightLink_HighLightLink=_ref=>{let{messageText}=_ref,elements=messageText.split(/\n| /).map((item,index)=>isURL(item)?(0,jsx_runtime.jsx)("div",{className:"message-urls",children:(0,jsx_runtime.jsxs)("span",{children:[(0,jsx_runtime.jsx)("a",{href:"".concat(getRuleUrl(item)),target:"_blank",rel:"noreferrer",children:item},index)," "]})}):(0,jsx_runtime.jsxs)("span",{children:[item," "]}));return(0,jsx_runtime.jsx)("div",{children:elements})};try{isURL.displayName="isURL",isURL.__docgenInfo={description:"",displayName:"isURL",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#isURL"]={docgenInfo:isURL.__docgenInfo,name:"isURL",path:"src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#isURL"})}catch(__react_docgen_typescript_loader_error){}try{messageHasUrls.displayName="messageHasUrls",messageHasUrls.__docgenInfo={description:"",displayName:"messageHasUrls",props:{}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#messageHasUrls"]={docgenInfo:messageHasUrls.__docgenInfo,name:"messageHasUrls",path:"src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#messageHasUrls"})}catch(__react_docgen_typescript_loader_error){}try{HighLightLink_HighLightLink.displayName="HighLightLink",HighLightLink_HighLightLink.__docgenInfo={description:"",displayName:"HighLightLink",props:{messageText:{defaultValue:null,description:"",name:"messageText",required:!0,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#HighLightLink"]={docgenInfo:HighLightLink_HighLightLink.__docgenInfo,name:"HighLightLink",path:"src/Presentation/Views/Dialog/Message/HighLightLink/HighLightLink.tsx#HighLightLink"})}catch(__react_docgen_typescript_loader_error){}function TextBubble_TextBubble(_ref){let{text,type}=_ref;return(0,jsx_runtime.jsx)("div",{className:"text-bubble-background__".concat(type),children:(0,jsx_runtime.jsx)("div",{className:"bubble-content-text",children:messageHasUrls(text)?(0,jsx_runtime.jsx)(HighLightLink_HighLightLink,{messageText:text}):text})})}try{TextBubble_TextBubble.displayName="TextBubble",TextBubble_TextBubble.__docgenInfo={description:"",displayName:"TextBubble",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"outgoing"'},{value:'"incoming"'}]}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx#TextBubble"]={docgenInfo:TextBubble_TextBubble.__docgenInfo,name:"TextBubble",path:"src/Presentation/ui-components/Message/Bubble/TextBubble/TextBubble.tsx#TextBubble"})}catch(__react_docgen_typescript_loader_error){}var file=__webpack_require__("./src/Presentation/icons/media/file.svg");let trimFileName=fileName=>fileName.length>10?"".concat(fileName.substring(0,9),"... .").concat(fileName.slice((Math.max(0,fileName.lastIndexOf("."))||1/0)+1)):fileName;function FileUrl_FileUrl(_ref){let{title,href}=_ref;return(0,jsx_runtime.jsxs)("div",{className:"file-attachment",children:[(0,jsx_runtime.jsxs)("div",{className:"file-attachment__placeholder",children:[(0,jsx_runtime.jsx)("div",{className:"file-attachment__placeholder__bg"}),href?(0,jsx_runtime.jsx)("a",{href:href,target:"_blank",download:!0,rel:"noreferrer",className:"file-attachment__placeholder__bg__icon",children:(0,jsx_runtime.jsx)(file.r,{className:"message-icon-file"})}):(0,jsx_runtime.jsx)("div",{className:"file-attachment__placeholder__bg__icon",children:(0,jsx_runtime.jsx)(file.r,{className:"message-icon-file"})})]}),(0,jsx_runtime.jsx)("div",{className:"file-attachment__file-name",children:trimFileName(title)})]})}try{FileUrl_FileUrl.displayName="FileUrl",FileUrl_FileUrl.__docgenInfo={description:"",displayName:"FileUrl",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx#FileUrl"]={docgenInfo:FileUrl_FileUrl.__docgenInfo,name:"FileUrl",path:"src/Presentation/ui-components/Message/FileUrl/FileUrl.tsx#FileUrl"})}catch(__react_docgen_typescript_loader_error){}function FileBubble_FileBubble(_ref){let{type,title,href}=_ref;return(0,jsx_runtime.jsx)("div",{className:"file-bubble-background__".concat(type),children:(0,jsx_runtime.jsx)(FileUrl_FileUrl,{title:title,href:href})})}try{FileBubble_FileBubble.displayName="FileBubble",FileBubble_FileBubble.__docgenInfo={description:"",displayName:"FileBubble",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"outgoing"'},{value:'"incoming"'}]}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx#FileBubble"]={docgenInfo:FileBubble_FileBubble.__docgenInfo,name:"FileBubble",path:"src/Presentation/ui-components/Message/Bubble/FileBubble/FileBubble.tsx#FileBubble"})}catch(__react_docgen_typescript_loader_error){}function ImageBubble_ImageBubble(_ref){let{title,href}=_ref;return(0,jsx_runtime.jsx)("a",{href:href,download:"file",target:"_blank",rel:"noreferrer",className:"message-attachment-image",children:(0,jsx_runtime.jsx)("img",{className:"message-attachment-image-body",src:href,alt:title||"attached image"},href)})}try{ImageBubble_ImageBubble.displayName="ImageBubble",ImageBubble_ImageBubble.__docgenInfo={description:"",displayName:"ImageBubble",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx#ImageBubble"]={docgenInfo:ImageBubble_ImageBubble.__docgenInfo,name:"ImageBubble",path:"src/Presentation/ui-components/Message/Bubble/ImageBubble/ImageBubble.tsx#ImageBubble"})}catch(__react_docgen_typescript_loader_error){}var play=__webpack_require__("./src/Presentation/icons/toggle/play.svg"),pause=__webpack_require__("./src/Presentation/icons/toggle/pause.svg");function AudioBubble_AudioBubble(_ref){let{type,title,href,fileUid,audioFileType}=_ref,[isPlaying,setIsPlaying]=(0,react.useState)(!1),audioRef=(0,react.useRef)(null),[secondsElapsed,setSecondsElapsed]=(0,react.useState)(0),handleAudioEnd=()=>{setIsPlaying(!1),setSecondsElapsed(0)};(0,react.useEffect)(()=>{let audio=audioRef.current;if(audio)return audio.addEventListener("ended",handleAudioEnd),()=>{audio.removeEventListener("ended",handleAudioEnd)}},[]),(0,react.useEffect)(()=>{let intervalId;return isPlaying&&(intervalId=setInterval(()=>{setSecondsElapsed(prevSeconds=>prevSeconds+1)},100)),()=>{clearInterval(intervalId)}},[isPlaying]);let generateUniqueNumbers=(inputString,count)=>{let uniqueNumbers=[];for(let i=0;i<count;i+=1)uniqueNumbers.push(Math.abs(inputString.charCodeAt(i)%11)+2);return uniqueNumbers};return(0,jsx_runtime.jsxs)("div",{className:"audio-bubble-background__".concat(type),children:[(0,jsx_runtime.jsxs)("audio",{ref:audioRef,className:"audio-body",preload:"auto",children:[(0,jsx_runtime.jsx)("source",{src:href,type:audioFileType}),(0,jsx_runtime.jsx)("source",{src:href,type:"audio/mpeg"}),(0,jsx_runtime.jsx)("source",{src:href,type:"audio/ogg"}),"Your browser does not support the audio element."]}),(0,jsx_runtime.jsxs)("div",{className:"audio-player",children:[(0,jsx_runtime.jsx)("div",{className:"audio-body__controls",onClick:()=>{let audio=audioRef.current;audio?(isPlaying?audio.pause():audio.play(),setIsPlaying(!isPlaying)):console.error("Audio element not found")},children:isPlaying?(0,jsx_runtime.jsx)(pause.r,{className:"audio-body__controls--color"}):(0,jsx_runtime.jsx)(play.r,{className:"audio-body__controls--color"})}),(0,jsx_runtime.jsxs)("div",{className:"audio-player__equalizer-time",children:[(0,jsx_runtime.jsx)("div",{className:"equalizer",children:isPlaying?(()=>{let divElements=[];for(let i=0;i<30;i+=1){let randomHeight=Math.floor(12*Math.random())+1,divStyle={height:"".concat(randomHeight,"px")};divElements.push((0,jsx_runtime.jsx)("div",{className:"equalizer__rectangle",style:divStyle},i))}return divElements})():(uid=>{let divElements=[],nums=generateUniqueNumbers(uid,30);for(let i=0;i<30;i+=1){let divStyle={height:"".concat(nums[i],"px")};divElements.push((0,jsx_runtime.jsx)("div",{className:"equalizer__rectangle",style:divStyle},i))}return divElements})(fileUid)}),(0,jsx_runtime.jsx)("div",{className:"time-play",children:(time=>{let formattedMinutes=Math.floor(time%3600/60).toString().padStart(2,"0"),formattedSeconds=Math.floor(time%60).toString().padStart(2,"0");return"".concat(formattedMinutes,":").concat(formattedSeconds)})(secondsElapsed)})]})]})]})}try{AudioBubble_AudioBubble.displayName="AudioBubble",AudioBubble_AudioBubble.__docgenInfo={description:"",displayName:"AudioBubble",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"outgoing"'},{value:'"incoming"'}]}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}},fileUid:{defaultValue:null,description:"",name:"fileUid",required:!1,type:{name:"string"}},audioFileType:{defaultValue:null,description:"",name:"audioFileType",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx#AudioBubble"]={docgenInfo:AudioBubble_AudioBubble.__docgenInfo,name:"AudioBubble",path:"src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx#AudioBubble"})}catch(__react_docgen_typescript_loader_error){}function VideoBubble_VideoBubble(_ref){let{title,href,className}=_ref;return(0,jsx_runtime.jsxs)("div",{className:className,children:[(0,jsx_runtime.jsx)("div",{className:"message-attachment-video",children:(0,jsx_runtime.jsx)("video",{className:"message-attachment-video-body",controls:!0,playsInline:!0,src:href,children:(0,jsx_runtime.jsx)("a",{href:href,download:!0,children:"Download"})},title)}),(0,jsx_runtime.jsx)("a",{href:href,download:!0,className:"message-attachment-video-body__link",children:"Download"})]})}try{VideoBubble_VideoBubble.displayName="VideoBubble",VideoBubble_VideoBubble.__docgenInfo={description:"",displayName:"VideoBubble",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx#VideoBubble"]={docgenInfo:VideoBubble_VideoBubble.__docgenInfo,name:"VideoBubble",path:"src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx#VideoBubble"})}catch(__react_docgen_typescript_loader_error){}function createBubbleByType(type,children){let isTextBubbleType=(null==children?void 0:children.type)===TextBubble_TextBubble,isFileBubbleType=(null==children?void 0:children.type)===FileBubble_FileBubble,isImageBubbleType=(null==children?void 0:children.type)===ImageBubble_ImageBubble,isAudioBubbleType=(null==children?void 0:children.type)===AudioBubble_AudioBubble,isVideoBubbleType=(null==children?void 0:children.type)===VideoBubble_VideoBubble;return isTextBubbleType?(0,jsx_runtime.jsx)(TextBubble_TextBubble,{text:"The QuickBlox UIKit for React is a comprehensive user interface kit specifically designed for building chat applications. It provides a collection of pre-built components, modules, and utilities that simplify the process of creating chat applications.",type:type}):isFileBubbleType?(0,jsx_runtime.jsx)(FileBubble_FileBubble,{title:"00b5563-small-qb-logo-docs-white-9px.png",href:"https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png",type:type}):isImageBubbleType?(0,jsx_runtime.jsx)(ImageBubble_ImageBubble,{title:"QuickBlox",href:"https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png"}):isAudioBubbleType?(0,jsx_runtime.jsx)(AudioBubble_AudioBubble,{title:"1.mp3",href:"//samplelib.com/lib/preview/mp3/sample-3s.mp3",audioFileType:"mp3",fileUid:"12345678901234544",type:type}):isVideoBubbleType?(0,jsx_runtime.jsx)(VideoBubble_VideoBubble,{title:"QuickBlox",href:"https://www.youtube.com/watch?v=0QFqNjhP-wM"}):void 0}function getChildrenByType(type,children){if(("incoming"===type||"outgoing"===type)&&children)return createBubbleByType(type,children)}let Message_stories={tags:["autodocs"],title:"@quickblox-react-ui-kit/Presentation/ui-components/Message",component:Message_Message,decorators:[(StoryFn,context)=>{let{type,children}=context.args,modifiedArgs={...context.args,children:getChildrenByType(type,children)};return(0,jsx_runtime.jsx)(StoryFn,{...context,args:modifiedArgs})}],parameters:{viewport:{viewports:dist.p}},args:{userName:"Nate",time:"16:58",type:"incoming",status:void 0,enableSelect:!0,isSelect:!1,disabled:!1},argTypes:{userName:{table:{type:{summary:"string"},defaultValue:{summary:""}},description:"User name"},avatar:{control:!1,table:{type:{summary:"ReactElement"}},description:"Message sender avatar"},time:{table:{type:{summary:"string"},defaultValue:{summary:""}},description:"Time of sending the message"},type:{table:{type:{summary:"outgoing | incoming"},defaultValue:{summary:"incoming"}},control:"radio",options:["incoming","outgoing"],description:"The type of message can be either outgoing or incoming"},enableSelect:{description:"Enables the option to select a message"},isSelect:{description:"The status of message selection"},disabled:{description:"Active"},status:{table:{type:{summary:"sent | delivered | viewed | error"},defaultValue:{summary:""}},control:"select",options:["sent","delivered","viewed","error"],description:"The status of the message"},children:{table:{type:{summary:"ReactElement"}},description:"Message bubble",control:"select",options:["TextMessage","FileMessage","ImageMessage","AudioMessage","VideoMessage"],mapping:{TextMessage:(0,jsx_runtime.jsx)(TextBubble_TextBubble,{text:"The QuickBlox UIKit for React is a comprehensive user interface kit specifically designed for building chat applications. It provides a collection of pre-built components, modules, and utilities that simplify the process of creating chat applications.",type:"incoming"}),FileMessage:(0,jsx_runtime.jsx)(FileBubble_FileBubble,{title:"00b5563-small-qb-logo-docs-white-9px.png",href:"https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png",type:"incoming"}),ImageMessage:(0,jsx_runtime.jsx)(ImageBubble_ImageBubble,{title:"QuickBlox",href:"https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png"}),AudioMessage:(0,jsx_runtime.jsx)(AudioBubble_AudioBubble,{title:"1.mp3",href:"//samplelib.com/lib/preview/mp3/sample-3s.mp3",audioFileType:"mp3",fileUid:"12345678901234544",type:"incoming"}),VideoMessage:(0,jsx_runtime.jsx)(VideoBubble_VideoBubble,{title:"QuickBlox",href:"https://www.youtube.com/watch?v=0QFqNjhP-wM"})}},subtype:{description:"Additional message subtype"},onSelect:{table:{type:{summary:"function"}},description:"The function responsible for message selection"},bottomPart:{table:{type:{summary:"ReactElement"}},control:!1,description:"The bottom part of the message layout"},additionalPart:{table:{type:{summary:"ReactElement"}},control:!1,description:"Additional section of the message layout"}}},MessageText={args:{children:(0,jsx_runtime.jsx)(TextBubble_TextBubble,{text:"Test Message",type:"incoming"})}},MessageImage={args:{children:(0,jsx_runtime.jsx)(ImageBubble_ImageBubble,{title:"QuickBlox",href:"https://files.readme.io/0a66fe7-SreenModulesDialogList.png"})}},MessageFile={args:{children:(0,jsx_runtime.jsx)(FileBubble_FileBubble,{type:"incoming",title:"QuickBlox",href:"https://raw.githubusercontent.com/QuickBlox/react-ui-kit/main/README.md"})}};MessageText.parameters={...MessageText.parameters,docs:{...MessageText.parameters?.docs,source:{originalSource:'{\n args: {\n children: <TextBubble text="Test Message" type="incoming" />\n }\n}',...MessageText.parameters?.docs?.source}}},MessageImage.parameters={...MessageImage.parameters,docs:{...MessageImage.parameters?.docs,source:{originalSource:'{\n args: {\n children: <ImageBubble title="QuickBlox" href="https://files.readme.io/0a66fe7-SreenModulesDialogList.png" />\n }\n}',...MessageImage.parameters?.docs?.source}}},MessageFile.parameters={...MessageFile.parameters,docs:{...MessageFile.parameters?.docs,source:{originalSource:'{\n args: {\n children: <FileBubble type="incoming" title="QuickBlox" href="https://raw.githubusercontent.com/QuickBlox/react-ui-kit/main/README.md" />\n }\n}',...MessageFile.parameters?.docs?.source}}};let __namedExportsOrder=["MessageText","MessageImage","MessageFile"]},"./src/Presentation/ui-components/Avatar/Avatar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Avatar_Avatar});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 Avatar_Avatar(_ref){let{icon=(0,jsx_runtime.jsx)(icons.vw,{}),size="md",className,src}=_ref;return src?(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:(0,jsx_runtime.jsx)("img",{src:src,className:"avatar__image",alt:"Avatar"})}):(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:icon})}try{Avatar_Avatar.displayName="Avatar",Avatar_Avatar.__docgenInfo={description:"",displayName:"Avatar",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"xl"'},{value:'"xxl"'}]}},icon:{defaultValue:{value:"<UserSvg />"},description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"]={docgenInfo:Avatar_Avatar.__docgenInfo,name:"Avatar",path:"src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/CheckBox/CheckBox.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>CheckBox_CheckBox});var jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function CheckBox_CheckBox(_ref){let{disabled,checked,onChange}=_ref;return(0,jsx_runtime.jsx)("input",{className:"checkbox",type:"checkbox",checked:checked,disabled:disabled,onChange:()=>null==onChange?void 0:onChange(!checked)})}try{CheckBox_CheckBox.displayName="CheckBox",CheckBox_CheckBox.__docgenInfo={description:"",displayName:"CheckBox",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},checked:{defaultValue:null,description:"",name:"checked",required:!0,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((isSelected: boolean) => void)"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/CheckBox/CheckBox.tsx#CheckBox"]={docgenInfo:CheckBox_CheckBox.__docgenInfo,name:"CheckBox",path:"src/Presentation/ui-components/CheckBox/CheckBox.tsx#CheckBox"})}catch(__react_docgen_typescript_loader_error){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(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__)=>{__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)},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){}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&&QB.content.privateUrl(item.uid),file:{id:item.id,name:item.name,size:item.size,type:item.type,uid:item.uid||"",url:item.uid&&QB.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&&QB.content.privateUrl(newItem.uid),newItem.file&&(newItem.file.uid=newItem.uid,newItem.file.name=newItem.name,newItem.file.url=newItem.uid&&QB.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="",this.lastMessageDateSent="",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=0,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)=>{QB.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=QB.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>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:0,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="",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?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?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?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:"",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:"",text:"",userId:0},"",DialogType.private,0,"",0);break;case DialogType.public:dialogEntity=new PublicDialogEntity({todo:""},"",{dateSent:"",text:"",userId:0},"",DialogType.public,0,"","","");break;case DialogType.group:dialogEntity=new GroupDialogEntity({todo:""},"",{dateSent:"",text:"",userId:0},"",DialogType.group,0,"",[],"","");break;default:dialogEntity={customData:{todo:""},id:"",name:"_",lastMessage:{dateSent:"",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:"01.02.2023",text:"text test",userId:777},"999",DialogType.private,555,"02.02.2023",333);break;case DialogType.public:dialogEntity=new PublicDialogEntity({todo:""},"111",{dateSent:"01.02.2023",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:"01.02.2023",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:"01.02.2023",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="01.02.2023",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="01.02.2023",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="01.02.2023",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:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"2",name:"Cash Chat 2",ownerId:"2",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"3",name:"Chat 3 from Cash",ownerId:"3",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"4",name:"Chat 4 from Cash",ownerId:"4",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"5",name:"Chat 5 from Cash",ownerId:"5",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"6",name:"Chat 6 from Cash",ownerId:"6",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""},{id:"7",name:"Chat 7 Lucky Room",ownerId:"7",photo:"",type:DialogType.public,participantId:"",participantsIds:[],lastMessageText:"",lastMessageDateSent:"",lastMessageUserId:"",lastMessageId:"",unreadMessageCount:0,updatedAt:""}]}static createPublicDialogQBWithEmptyValues(){return{_id:"111",created_at:"01.03.2023",last_message:"test message",last_message_date_sent:"02.03.2023",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:"02.03.2023",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:"02.03.2023",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:"31.03.2023",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","31.03.2023","Test text message for private dialog",11,"11",1,"31.03.20223",12)),dialogs.push(Stubs.createDialogEntityWithParams(DialogType.public,"102","Stub2 Public Dialog","31.03.2023","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","31.03.2023","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",0),user12=Stubs.createUserEntityWithParams(12,"fl_user12","fl_user12@q.ua","login_user12","31.03.2023","31.03.2023",0),user13=Stubs.createUserEntityWithParams(13,"fl_user13","fl_user13@q.ua","login_user13","31.03.2023","31.03.2023",0);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__)=>{__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){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[594],{"./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PreviewFileMessageAudio:()=>PreviewFileMessageAudio,PreviewFileMessageDefault:()=>PreviewFileMessageDefault,PreviewFileMessageImage:()=>PreviewFileMessageImage,PreviewFileMessageVideo:()=>PreviewFileMessageVideo,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});let __WEBPACK_DEFAULT_EXPORT__={title:"@quickblox-react-ui-kit/Presentation/ui-components/PreviewFileMessage",tags:["autodocs"],component:__webpack_require__("./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx").Z,parameters:{layout:"centered"},argTypes:{type:{options:["document","audio","video"],control:{type:"select"},table:{defaultValue:{summary:"document"},type:{summary:"string"}},description:"File type"},name:{table:{type:{summary:"string"}},description:"Name of the file"},className:{table:{type:{summary:"string"}},description:"Additional classes"},src:{table:{type:{summary:"string"}},description:"Source file"}}},PreviewFileMessageDefault={name:"PreviewFileMessage Default",args:{name:"text document.txt"}},PreviewFileMessageAudio={name:"PreviewFileMessage Audio",args:{type:"audio",name:"audio.mp3"}},PreviewFileMessageVideo={name:"PreviewFileMessage Video",args:{type:"video",name:"video.mp4"}},PreviewFileMessageImage={name:"PreviewFileMessage Image",args:{src:"https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg",name:"screenshot.jpg"}};PreviewFileMessageDefault.parameters={...PreviewFileMessageDefault.parameters,docs:{...PreviewFileMessageDefault.parameters?.docs,source:{originalSource:"{\n name: 'PreviewFileMessage Default',\n args: {\n name: 'text document.txt'\n }\n}",...PreviewFileMessageDefault.parameters?.docs?.source}}},PreviewFileMessageAudio.parameters={...PreviewFileMessageAudio.parameters,docs:{...PreviewFileMessageAudio.parameters?.docs,source:{originalSource:"{\n name: 'PreviewFileMessage Audio',\n args: {\n type: 'audio',\n name: 'audio.mp3'\n }\n}",...PreviewFileMessageAudio.parameters?.docs?.source}}},PreviewFileMessageVideo.parameters={...PreviewFileMessageVideo.parameters,docs:{...PreviewFileMessageVideo.parameters?.docs,source:{originalSource:"{\n name: 'PreviewFileMessage Video',\n args: {\n type: 'video',\n name: 'video.mp4'\n }\n}",...PreviewFileMessageVideo.parameters?.docs?.source}}},PreviewFileMessageImage.parameters={...PreviewFileMessageImage.parameters,docs:{...PreviewFileMessageImage.parameters?.docs,source:{originalSource:"{\n name: 'PreviewFileMessage Image',\n args: {\n src: 'https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg',\n name: 'screenshot.jpg'\n }\n}",...PreviewFileMessageImage.parameters?.docs?.source}}};let __namedExportsOrder=["PreviewFileMessageDefault","PreviewFileMessageAudio","PreviewFileMessageVideo","PreviewFileMessageImage"]},"./src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>PreviewFileMessage_PreviewFileMessage});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");let iconDictionary={document:icons.K,audio:icons.rR,video:icons.Hd};function PreviewFileMessage_PreviewFileMessage(_ref){let{type="document",name,src,className}=_ref,Icon=iconDictionary[type];return(0,jsx_runtime.jsxs)("div",{className:classnames_default()("preview-file-message",className),children:[src?(0,jsx_runtime.jsx)("img",{src:src,alt:"",className:"preview-file-message__image"}):(0,jsx_runtime.jsx)("span",{className:"preview-file-message__image",children:(0,jsx_runtime.jsx)(Icon,{className:"preview-file-message__icon"})}),(0,jsx_runtime.jsx)("span",{className:"preview-file-message__name",children:name})]})}try{PreviewFileMessage_PreviewFileMessage.displayName="PreviewFileMessage",PreviewFileMessage_PreviewFileMessage.__docgenInfo={description:"",displayName:"PreviewFileMessage",props:{type:{defaultValue:{value:"document"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"document"'},{value:'"audio"'},{value:'"video"'}]}},name:{defaultValue:null,description:"",name:"name",required:!0,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx#PreviewFileMessage"]={docgenInfo:PreviewFileMessage_PreviewFileMessage.__docgenInfo,name:"PreviewFileMessage",path:"src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.tsx#PreviewFileMessage"})}catch(__react_docgen_typescript_loader_error){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[231],{"./src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{SettingsItemDefault:()=>SettingsItemDefault,SettingsItemMembers:()=>SettingsItemMembers,SettingsItemNotification:()=>SettingsItemNotification,__namedExportsOrder:()=>__namedExportsOrder,default:()=>SettingsItem_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"),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function SettingsItem_SettingsItem(_ref){let{icon,title,rightSection,children,className,onClick}=_ref,[isShow,setIsShow]=(0,react.useState)(!1);return(0,jsx_runtime.jsxs)("div",{onClick:onClick,className:classnames_default()("settings-item",className),children:[(0,jsx_runtime.jsxs)("div",{className:"settings-item__body",children:[(0,jsx_runtime.jsxs)("div",{className:"settings-item__left-section",children:[(0,jsx_runtime.jsx)("span",{className:"settings-item__icon",children:icon}),(0,jsx_runtime.jsx)("span",{className:"settings-item__title",children:title})]}),(0,jsx_runtime.jsxs)("div",{className:"settings-item__right-section",children:[rightSection,children&&(0,jsx_runtime.jsx)(icons.PB,{className:classnames_default()("settings-item__arrow",{"settings-item__arrow--opened":isShow}),onClick:()=>setIsShow(!isShow)})]})]}),children&&(0,jsx_runtime.jsx)("div",{className:classnames_default()("settings-item__children",{"settings-item__children--opened":isShow}),children:children})]})}try{SettingsItem_SettingsItem.displayName="SettingsItem",SettingsItem_SettingsItem.__docgenInfo={description:"",displayName:"SettingsItem",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},rightSection:{defaultValue:null,description:"",name:"rightSection",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>> | ReactElement<any, string | JSXElementConstructor<any>>[]"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"VoidFunction"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/SettingsItem/SettingsItem.tsx#SettingsItem"]={docgenInfo:SettingsItem_SettingsItem.__docgenInfo,name:"SettingsItem",path:"src/Presentation/ui-components/SettingsItem/SettingsItem.tsx#SettingsItem"})}catch(__react_docgen_typescript_loader_error){}var Badge=__webpack_require__("./src/Presentation/ui-components/Badge/Badge.tsx"),Avatar=__webpack_require__("./src/Presentation/ui-components/Avatar/Avatar.tsx");let SettingsItem_stories={title:"@quickblox-react-ui-kit/Presentation/ui-components/SettingsItem",component:SettingsItem_SettingsItem,tags:["autodocs"],parameters:{layout:"centered"},argTypes:{title:{table:{defaultValue:{summary:""},type:{summary:"string"}},description:"Name Setting item "},className:{table:{defaultValue:{summary:""},type:{summary:"string"}},description:"Additional classes"},icon:{control:!1,table:{defaultValue:{summary:"svg | ReactElement"},type:{summary:"svg | ReactElement"}},description:"Format plug svg or React element "},rightSection:{control:!1,table:{defaultValue:{summary:"ReactElement | ReactElement[]"},type:{summary:"ReactElement | ReactElement[]"}},description:"Elements for the right section"},onClick:{control:!1,table:{defaultValue:{summary:"VoidFunction"},type:{summary:"VoidFunction"}},description:"function onClick for icon"},children:{table:{defaultValue:{summary:"ReactElement | ReactElement[]"},type:{summary:"ReactElement | ReactElement[]"}},description:"Elements that will be contained in the additional section"}}},SettingsItemDefault={name:"SettingsItem Default",args:{title:"Search in dialog",icon:(0,jsx_runtime.jsx)(icons.K1,{style:{fill:"#3978FC"}})}},SettingsItemNotification={name:"SettingsItem Notification",args:{title:"Notification",icon:(0,jsx_runtime.jsx)(icons.Dn,{style:{fill:"#3978FC"}}),rightSection:(0,jsx_runtime.jsx)(icons.sZ,{style:{cursor:"pointer"}})}},SettingsItemMembers={name:"SettingsItem Members",args:{title:"Notification",icon:(0,jsx_runtime.jsx)(icons.Av,{style:{fill:"#3978FC"}}),rightSection:(0,jsx_runtime.jsx)(Badge.Z,{count:10,limit:99,mute:!0}),children:(0,jsx_runtime.jsxs)("ul",{style:{listStyle:"none",overflow:"hidden",margin:"0",padding:"0"},children:[(0,jsx_runtime.jsxs)("li",{style:{display:"flex",alignItems:"center",padding:"8px 16px",gap:"16px"},children:[(0,jsx_runtime.jsx)(Avatar.Z,{size:"sm"})," Name"]}),(0,jsx_runtime.jsxs)("li",{style:{display:"flex",alignItems:"center",padding:"8px 16px",gap:"16px"},children:[(0,jsx_runtime.jsx)(Avatar.Z,{size:"sm"})," Name"]}),(0,jsx_runtime.jsxs)("li",{style:{display:"flex",alignItems:"center",padding:"8px 16px",gap:"16px"},children:[(0,jsx_runtime.jsx)(Avatar.Z,{size:"sm"})," Name"]}),(0,jsx_runtime.jsxs)("li",{style:{display:"flex",alignItems:"center",padding:"8px 16px",gap:"16px"},children:[(0,jsx_runtime.jsx)(Avatar.Z,{size:"sm"})," Name"]})]})}};SettingsItemDefault.parameters={...SettingsItemDefault.parameters,docs:{...SettingsItemDefault.parameters?.docs,source:{originalSource:"{\n name: 'SettingsItem Default',\n args: {\n title: 'Search in dialog',\n icon: <SearchSvg style={{\n fill: '#3978FC'\n }} />\n }\n}",...SettingsItemDefault.parameters?.docs?.source}}},SettingsItemNotification.parameters={...SettingsItemNotification.parameters,docs:{...SettingsItemNotification.parameters?.docs,source:{originalSource:"{\n name: 'SettingsItem Notification',\n args: {\n title: 'Notification',\n icon: <NotificationsSvg style={{\n fill: '#3978FC'\n }} />,\n rightSection: <CloseSvg style={{\n cursor: 'pointer'\n }} />\n }\n}",...SettingsItemNotification.parameters?.docs?.source}}},SettingsItemMembers.parameters={...SettingsItemMembers.parameters,docs:{...SettingsItemMembers.parameters?.docs,source:{originalSource:"{\n name: 'SettingsItem Members',\n args: {\n title: 'Notification',\n icon: <GroupChatSvg style={{\n fill: '#3978FC'\n }} />,\n rightSection: <Badge count={10} limit={99} mute />,\n children: <ul style={{\n listStyle: 'none',\n overflow: 'hidden',\n margin: '0',\n padding: '0'\n }}>\n <li style={{\n display: 'flex',\n alignItems: 'center',\n padding: '8px 16px',\n gap: '16px'\n }}>\n <Avatar size=\"sm\" /> Name\n </li>\n <li style={{\n display: 'flex',\n alignItems: 'center',\n padding: '8px 16px',\n gap: '16px'\n }}>\n <Avatar size=\"sm\" /> Name\n </li>\n <li style={{\n display: 'flex',\n alignItems: 'center',\n padding: '8px 16px',\n gap: '16px'\n }}>\n <Avatar size=\"sm\" /> Name\n </li>\n <li style={{\n display: 'flex',\n alignItems: 'center',\n padding: '8px 16px',\n gap: '16px'\n }}>\n <Avatar size=\"sm\" /> Name\n </li>\n </ul>\n }\n}",...SettingsItemMembers.parameters?.docs?.source}}};let __namedExportsOrder=["SettingsItemDefault","SettingsItemNotification","SettingsItemMembers"]},"./src/Presentation/ui-components/Avatar/Avatar.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Avatar_Avatar});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 Avatar_Avatar(_ref){let{icon=(0,jsx_runtime.jsx)(icons.vw,{}),size="md",className,src}=_ref;return src?(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:(0,jsx_runtime.jsx)("img",{src:src,className:"avatar__image",alt:"Avatar"})}):(0,jsx_runtime.jsx)("div",{className:classnames_default()("avatar","avatar--".concat(size),className),children:icon})}try{Avatar_Avatar.displayName="Avatar",Avatar_Avatar.__docgenInfo={description:"",displayName:"Avatar",props:{size:{defaultValue:{value:"md"},description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xs"'},{value:'"sm"'},{value:'"md"'},{value:'"lg"'},{value:'"xl"'},{value:'"xxl"'}]}},icon:{defaultValue:{value:"<UserSvg />"},description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"]={docgenInfo:Avatar_Avatar.__docgenInfo,name:"Avatar",path:"src/Presentation/ui-components/Avatar/Avatar.tsx#Avatar"})}catch(__react_docgen_typescript_loader_error){}},"./src/Presentation/ui-components/Badge/Badge.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Z:()=>Badge_Badge});var classnames=__webpack_require__("./node_modules/classnames/index.js"),classnames_default=__webpack_require__.n(classnames),jsx_runtime=__webpack_require__("./node_modules/react/jsx-runtime.js");function Badge_Badge(_ref){let{count,limit,mute=!1,classNames}=_ref;return(0,jsx_runtime.jsx)("div",{className:classnames_default()("badge",{"badge--mute":mute},classNames),children:limit&&count>limit?"".concat(limit,"+"):count})}try{Badge_Badge.displayName="Badge",Badge_Badge.__docgenInfo={description:"",displayName:"Badge",props:{count:{defaultValue:null,description:"",name:"count",required:!0,type:{name:"number"}},limit:{defaultValue:null,description:"",name:"limit",required:!1,type:{name:"number"}},mute:{defaultValue:{value:"false"},description:"",name:"mute",required:!1,type:{name:"boolean"}},classNames:{defaultValue:null,description:"",name:"classNames",required:!1,type:{name:"string"}}}},"undefined"!=typeof STORYBOOK_REACT_CLASSES&&(STORYBOOK_REACT_CLASSES["src/Presentation/ui-components/Badge/Badge.tsx#Badge"]={docgenInfo:Badge_Badge.__docgenInfo,name:"Badge",path:"src/Presentation/ui-components/Badge/Badge.tsx#Badge"})}catch(__react_docgen_typescript_loader_error){}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(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__)=>{__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");function TextField_TextField(_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,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:{label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"ReactElement<any, string | JSXElementConstructor<any>>"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}},"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__)=>{__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){}}}]);
|