quickblox-react-ui-kit 0.3.1-beta.3 → 0.3.1-beta.5
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/Presentation/ui-components/TextField/TextField.d.ts +1 -1
- package/dist/index-ui.js +86 -18
- package/dist/index-ui.js.map +1 -1
- package/package.json +2 -2
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +30 -4
- package/src/Presentation/Views/DialogList/DialogList.tsx +1 -1
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +3 -2
- package/src/Presentation/Views/InviteMembers/useInviteMembersViewModel.ts +4 -1
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +10 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +49 -6
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +10 -2
- package/src/Presentation/ui-components/Avatar/Avatar.scss +3 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.af13ca55.iframe.bundle.js → runtime~main.bbf4d5b0.iframe.bundle.js} +1 -1
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.7b228eb0.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.7b228eb0.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bee082ca.chunk.css → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.bee082ca.chunk.css.map → Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.2a9e5bc3.chunk.css.map} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css → Presentation-ui-components-Header-Header-stories.fb1001e7.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css.map → Presentation-ui-components-Header-Header-stories.fb1001e7.chunk.css.map} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css → Presentation-ui-components-Message-Message-stories.4c915c89.chunk.css} +2 -2
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.4c915c89.chunk.css.map +1 -0
- package/storybook-static/static/css/{Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css → Presentation-ui-components-SettingsItem-SettingsItem-stories.b67b748b.chunk.css} +2 -2
- package/storybook-static/static/css/{Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css.map → Presentation-ui-components-SettingsItem-SettingsItem-stories.b67b748b.chunk.css.map} +1 -1
- package/storybook-static/static/css/{Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css → Presentation-ui-components-UserListItem-UserListItem-stories.655aa6c1.chunk.css} +2 -2
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.655aa6c1.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css +0 -3
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css.map +0 -1
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css.map +0 -1
|
@@ -9,5 +9,5 @@ interface TextFieldProps extends Omit<HTMLInputProps, 'onChange'> {
|
|
|
9
9
|
value: string;
|
|
10
10
|
onChange: (value: string) => void;
|
|
11
11
|
}
|
|
12
|
-
declare const TextField: import("react").ForwardRefExoticComponent<Pick<TextFieldProps, "id" | "name" | "size" | "type" | "value" | "children" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "
|
|
12
|
+
declare const TextField: import("react").ForwardRefExoticComponent<Pick<TextFieldProps, "id" | "name" | "size" | "type" | "value" | "children" | "form" | "label" | "slot" | "style" | "title" | "pattern" | "className" | "onClick" | "key" | "color" | "height" | "translate" | "width" | "onChange" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "list" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "placeholder" | "readOnly" | "required" | "src" | "step" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "icon" | "loading"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
13
|
export default TextField;
|
package/dist/index-ui.js
CHANGED
|
@@ -3805,7 +3805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3805
3805
|
|
|
3806
3806
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
3807
3807
|
// Module
|
|
3808
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".avatar {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 50%;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n}\n.avatar,\n.avatar * {\n box-sizing: border-box;\n}\n.avatar svg {\n fill: var(--secondary-text);\n padding: 10px;\n}\n.avatar__image {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n.avatar--xs {\n width: 32px;\n height: 32px;\n}\n.avatar--sm {\n width: 36px;\n height: 36px;\n}\n.avatar--md {\n width: 40px;\n height: 40px;\n}\n.avatar--lg {\n width: 56px;\n height: 56px;\n}\n.avatar--xl {\n width: 64px;\n height: 64px;\n}\n.avatar--xxl {\n width: 80px;\n height: 80px;\n}", "",{"version":3,"sources":["webpack://./src/Presentation/ui-components/Avatar/Avatar.scss","webpack://./src/Presentation/themes/styles/_mixins.scss"],"names":[],"mappings":"AAEA;EAEE,aAAA;EACA,cAAA;EACA,mBAAA;EACA,uBAAA;EAEA,gBAAA;EACA,kBAAA;EACA,0CAAA;EACA,4BAAA;AAHF;ACRE;;EAEE,sBAAA;ADUJ;AACE;EACE,
|
|
3808
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".avatar {\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n overflow: hidden;\n border-radius: 50%;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n}\n.avatar,\n.avatar * {\n box-sizing: border-box;\n}\n.avatar svg {\n height: 100%;\n width: 100%;\n fill: var(--secondary-text);\n padding: 10px;\n}\n.avatar__image {\n object-fit: cover;\n width: 100%;\n height: 100%;\n}\n.avatar--xs {\n width: 32px;\n height: 32px;\n}\n.avatar--sm {\n width: 36px;\n height: 36px;\n}\n.avatar--md {\n width: 40px;\n height: 40px;\n}\n.avatar--lg {\n width: 56px;\n height: 56px;\n}\n.avatar--xl {\n width: 64px;\n height: 64px;\n}\n.avatar--xxl {\n width: 80px;\n height: 80px;\n}", "",{"version":3,"sources":["webpack://./src/Presentation/ui-components/Avatar/Avatar.scss","webpack://./src/Presentation/themes/styles/_mixins.scss"],"names":[],"mappings":"AAEA;EAEE,aAAA;EACA,cAAA;EACA,mBAAA;EACA,uBAAA;EAEA,gBAAA;EACA,kBAAA;EACA,0CAAA;EACA,4BAAA;AAHF;ACRE;;EAEE,sBAAA;ADUJ;AACE;EACE,YAAA;EACA,WAAA;EAEA,2BAAA;EACA,aAAA;AAAJ;AAGE;EACE,iBAAA;EACA,WAAA;EACA,YAAA;AADJ;AAIE;EACE,WAAA;EACA,YAAA;AAFJ;AAKE;EACE,WAAA;EACA,YAAA;AAHJ;AAME;EACE,WAAA;EACA,YAAA;AAJJ;AAOE;EACE,WAAA;EACA,YAAA;AALJ;AAQE;EACE,WAAA;EACA,YAAA;AANJ;AASE;EACE,WAAA;EACA,YAAA;AAPJ","sourcesContent":["@import '../../themes/styles/mixins';\n\n.avatar {\n @include applyBorderBox;\n display: flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n border-radius: 50%;\n background-color: var(--disabled-elements);\n color: var(--secondary-text);\n\n svg {\n height: 100%;\n width: 100%;\n \n fill: var(--secondary-text);\n padding: 10px;\n }\n\n &__image {\n object-fit: cover;\n width: 100%;\n height: 100%;\n }\n\n &--xs {\n width: 32px;\n height: 32px;\n }\n\n &--sm {\n width: 36px;\n height: 36px;\n }\n\n &--md {\n width: 40px;\n height: 40px;\n }\n\n &--lg {\n width: 56px;\n height: 56px;\n }\n\n &--xl {\n width: 64px;\n height: 64px;\n }\n\n &--xxl {\n width: 80px;\n height: 80px;\n }\n}\n","@mixin applyBorderBox {\n &,\n * {\n box-sizing: border-box;\n }\n}\n"],"sourceRoot":""}]);
|
|
3809
3809
|
// Exports
|
|
3810
3810
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
|
3811
3811
|
|
|
@@ -24637,9 +24637,18 @@ var DialogInfo = function (_a) {
|
|
|
24637
24637
|
(_b = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _b === void 0 ? void 0 : _b.userId.toString();
|
|
24638
24638
|
var useSubContent = subHeaderContent || false;
|
|
24639
24639
|
var useUpContent = upHeaderContent || false;
|
|
24640
|
+
var _l = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), isLeaving = _l[0], setIsLeaving = _l[1];
|
|
24641
|
+
var toastLeavingId = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(null);
|
|
24640
24642
|
var leaveDialogHandler = function () {
|
|
24641
24643
|
if (!disableAction) {
|
|
24642
|
-
|
|
24644
|
+
setIsLeaving(true);
|
|
24645
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24646
|
+
// @ts-ignore
|
|
24647
|
+
toastLeavingId.current = (0,react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast)('leaving dialog', {
|
|
24648
|
+
autoClose: false,
|
|
24649
|
+
isLoading: true,
|
|
24650
|
+
});
|
|
24651
|
+
// eslint-disable-next-line promise/catch-or-return
|
|
24643
24652
|
dialogViewModel
|
|
24644
24653
|
.deleteDialog(((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog))
|
|
24645
24654
|
.then(function (result) {
|
|
@@ -24652,6 +24661,12 @@ var DialogInfo = function (_a) {
|
|
|
24652
24661
|
.catch(function (e) {
|
|
24653
24662
|
console.log(e);
|
|
24654
24663
|
(0,react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast)("Can't leave dialog");
|
|
24664
|
+
})
|
|
24665
|
+
.finally(function () {
|
|
24666
|
+
setIsLeaving(false);
|
|
24667
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
24668
|
+
// @ts-ignore
|
|
24669
|
+
react_toastify__WEBPACK_IMPORTED_MODULE_3__.toast.dismiss(toastLeavingId.current);
|
|
24655
24670
|
});
|
|
24656
24671
|
}
|
|
24657
24672
|
};
|
|
@@ -24818,12 +24833,21 @@ var DialogInfo = function (_a) {
|
|
|
24818
24833
|
}
|
|
24819
24834
|
};
|
|
24820
24835
|
}, []);
|
|
24821
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.
|
|
24822
|
-
|
|
24823
|
-
|
|
24824
|
-
|
|
24825
|
-
|
|
24826
|
-
|
|
24836
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ style: __assign({}, rootStyles), className: "dialog-information-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: {
|
|
24837
|
+
position: 'absolute',
|
|
24838
|
+
top: '0',
|
|
24839
|
+
left: '0',
|
|
24840
|
+
width: '100%',
|
|
24841
|
+
height: '100%',
|
|
24842
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
24843
|
+
zIndex: '100',
|
|
24844
|
+
display: isLeaving ? 'block' : 'none',
|
|
24845
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_5__["default"], { children: [useUpContent && upHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Header_Header__WEBPACK_IMPORTED_MODULE_19__["default"], __assign({ title: "Dialog information", className: "header-dialog-info" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.CloseSvg, { onClick: onCloseDialogInformationHandler, className: "header-dialog-info-icon" }) })), useSubContent && subHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-information-profile" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-avatar" }, { children: renderIconForTypeDialog((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-dialog-name" }, { children: ((_c = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) === null || _c === void 0 ? void 0 : _c.name) || (dialog === null || dialog === void 0 ? void 0 : dialog.name) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-information-profile-edit" }, { children: dialog.type !== _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_8__.DialogType["private"] &&
|
|
24846
|
+
dialog.ownerId === currentUserId ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('dialog-information-profile-edit-button', {
|
|
24847
|
+
'dialog-information-profile-edit-button--disable': disableAction,
|
|
24848
|
+
}) }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "text", onClick: editModal.toggleModal, disabled: disableAction }, { children: "Edit" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ title: "Edit dialog", onClose: editModal.toggleModal, open: editModal.isOpen }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__["default"], { disableActions: disableAction, nameDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.name) || (dialog === null || dialog === void 0 ? void 0 : dialog.name), typeDialog: (dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity.type) || (dialog === null || dialog === void 0 ? void 0 : dialog.type), ulrIcon: getUrlAvatar((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, clickUpdatedHandler: getDialogUpdatedInfoHandler, clickCancelHandler: editModal.toggleModal }) }))] }))) : null }))] })), dialog.type !== _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_8__.DialogType["private"] ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, __assign({ icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.GroupChatSvg, {}), title: "Members", rightSection: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Badge, { mute: true, count: users.length, limit: 100 }), className: "dialog-info-members" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_5__["default"], { children: [users && users.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", __assign({ className: "dialog-info-action-wrapper-settings no-padding" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UsersList_UsersList__WEBPACK_IMPORTED_MODULE_7__["default"], { maxHeight: 75, usersFirstPageToView: users, allUsers: users, usersInDialogCount: users.length }) }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-info-action-wrapper-settings" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ disableActions: disableAction, title: "Edit dialog", open: inviteMembersModal.isOpen, onClose: inviteMembersModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InviteMembers_InviteMembers__WEBPACK_IMPORTED_MODULE_20__["default"], { participants: _Domain_entity_PublicDialogEntity__WEBPACK_IMPORTED_MODULE_12__.PublicDialogEntity.getParticipants((dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.entity) || dialog), applyInviteUsersHandler: applyInviteUsersHandler, cancelInviteMembersHandler: inviteMembersModal.toggleModal, typeAddEditDialog: _EditDialog_EditDialog__WEBPACK_IMPORTED_MODULE_11__.TypeOpenDialog.edit, typeDialog: dialog.type, idOwnerDialog: dialog.ownerId }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: inviteMembersModal.toggleModal, variant: "outlined", disabled: dialog.ownerId !== currentUserId || disableAction }, { children: "Invite members" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ className: "dialog-info-action-wrapper-button", onClick: function () { return onShowAllMemberClick(true); }, variant: "outlined", disabled: disableAction }, { children: "See all members" }))] }))] }) }))) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.SettingsItem, { icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_16__.LeaveSvg, {}), title: "Leave dialog", onClick: !disableAction ? leaveModal.toggleModal : undefined, className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('dialog-info-leave', {
|
|
24849
|
+
'dialog-info-leave--disable': disableAction,
|
|
24850
|
+
}) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.DialogWindow, __assign({ open: leaveModal.isOpen, title: "Leave dialog?", onClose: leaveModal.toggleModal }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-leave-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "outlined", onClick: leaveModal.toggleModal }, { children: "Cancel" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components__WEBPACK_IMPORTED_MODULE_17__.Button, __assign({ variant: "danger", onClick: leaveDialogHandler }, { children: "Leave" }))] })) }))] })] })));
|
|
24827
24851
|
};
|
|
24828
24852
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DialogInfo);
|
|
24829
24853
|
|
|
@@ -25418,7 +25442,7 @@ var DialogList = function (_a) {
|
|
|
25418
25442
|
colorTheme: additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themePreview,
|
|
25419
25443
|
}, title: "".concat(item.entity.name || ''), unreadMessageCount: item.entity.unreadMessageCount > 0
|
|
25420
25444
|
? item.entity.unreadMessageCount
|
|
25421
|
-
: undefined, message_date_time_sent: getMessageDateTimeSent(), previewMessage: item.entity.lastMessage.text, dialogAvatar: getDialogAvatar(item), onLeaveDialog: onLeaveDialog }) }),
|
|
25445
|
+
: undefined, message_date_time_sent: getMessageDateTimeSent(), previewMessage: item.entity.lastMessage.text, dialogAvatar: getDialogAvatar(item), onLeaveDialog: onLeaveDialog }) }), item.entity.id));
|
|
25422
25446
|
};
|
|
25423
25447
|
var renderSearchDialogs = function () {
|
|
25424
25448
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_TextField_TextField__WEBPACK_IMPORTED_MODULE_17__["default"], { className: "search-dialog-text-field", disabled: dialogListViewModel === null || dialogListViewModel === void 0 ? void 0 : dialogListViewModel.loading, placeholder: "Search", icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icons__WEBPACK_IMPORTED_MODULE_11__.SearchSvg, { className: "search-dialog-text-field__icon" }), value: nameDialogForSearch, onChange: function (value) {
|
|
@@ -26094,7 +26118,7 @@ var EditDialog = function (_a) {
|
|
|
26094
26118
|
}
|
|
26095
26119
|
else {
|
|
26096
26120
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UserAvatar_UserAvatar__WEBPACK_IMPORTED_MODULE_6__["default"], { urlAvatar: urlAvatar, clickRemoveAvatarHandler: function () {
|
|
26097
|
-
setUrlAvatar('');
|
|
26121
|
+
setUrlAvatar('null');
|
|
26098
26122
|
setErrorMessageUpload('');
|
|
26099
26123
|
} }));
|
|
26100
26124
|
}
|
|
@@ -26107,7 +26131,8 @@ var EditDialog = function (_a) {
|
|
|
26107
26131
|
if (clickUpdatedHandler) {
|
|
26108
26132
|
var params = {
|
|
26109
26133
|
dialogTitle: dialogName,
|
|
26110
|
-
dialogAvatar: urlAvatar.length ? fileUploadAvatar : '',
|
|
26134
|
+
// dialogAvatar: urlAvatar.length ? fileUploadAvatar : '',
|
|
26135
|
+
dialogAvatar: urlAvatar === 'null' ? 'null' : fileUploadAvatar,
|
|
26111
26136
|
};
|
|
26112
26137
|
clickUpdatedHandler(params);
|
|
26113
26138
|
}
|
|
@@ -26769,7 +26794,8 @@ function useInviteMembersViewModel() {
|
|
|
26769
26794
|
if (regexUserName && regexUserName.length > 0) {
|
|
26770
26795
|
// work
|
|
26771
26796
|
var filteredUsers = data.ResultData.reduce(function (userList, u) {
|
|
26772
|
-
|
|
26797
|
+
var nameUserForTest = u.full_name || u.login || u.email || u.id.toString();
|
|
26798
|
+
if (!regex || regex.test(nameUserForTest)) {
|
|
26773
26799
|
userList.push(u);
|
|
26774
26800
|
}
|
|
26775
26801
|
return userList;
|
|
@@ -27088,6 +27114,14 @@ var PreviewDialog = function (_a) {
|
|
|
27088
27114
|
}
|
|
27089
27115
|
};
|
|
27090
27116
|
}, []);
|
|
27117
|
+
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
27118
|
+
getFileForPreview();
|
|
27119
|
+
return function () {
|
|
27120
|
+
if (fileUrl) {
|
|
27121
|
+
URL.revokeObjectURL(fileUrl);
|
|
27122
|
+
}
|
|
27123
|
+
};
|
|
27124
|
+
}, [previewMessage]);
|
|
27091
27125
|
var trimFileName = function (fileName) {
|
|
27092
27126
|
if (fileName.length > 16) {
|
|
27093
27127
|
return "".concat(fileName.substring(0, 15), "... .").concat(fileName.slice((Math.max(0, fileName.lastIndexOf('.')) || Infinity) + 1));
|
|
@@ -29166,6 +29200,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29166
29200
|
/* harmony import */ var _Views_Flow_CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../Views/Flow/CreateDialogFlow/CreateNewDialogFlow */ "./src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx");
|
|
29167
29201
|
/* harmony import */ var _hooks_useModal__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../../hooks/useModal */ "./src/hooks/useModal.ts");
|
|
29168
29202
|
/* harmony import */ var _providers_QuickBloxUIKitProvider_useQBConnection__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../providers/QuickBloxUIKitProvider/useQBConnection */ "./src/Presentation/providers/QuickBloxUIKitProvider/useQBConnection.ts");
|
|
29203
|
+
/* harmony import */ var _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../Domain/entity/EventMessageType */ "./src/Domain/entity/EventMessageType.ts");
|
|
29169
29204
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
29170
29205
|
__assign = Object.assign || function(t) {
|
|
29171
29206
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -29262,6 +29297,7 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
|
29262
29297
|
|
|
29263
29298
|
|
|
29264
29299
|
|
|
29300
|
+
|
|
29265
29301
|
|
|
29266
29302
|
|
|
29267
29303
|
var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
@@ -29380,7 +29416,7 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
29380
29416
|
setIsOnline(true);
|
|
29381
29417
|
else
|
|
29382
29418
|
setIsOnline(false);
|
|
29383
|
-
});
|
|
29419
|
+
}, _Domain_entity_EventMessageType__WEBPACK_IMPORTED_MODULE_42__["default"].LocalMessage, 'DESKTOP_LAYOUT');
|
|
29384
29420
|
var _z = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), needRefresh = _z[0], setNeedRefresh = _z[1];
|
|
29385
29421
|
var toastConnectionErrorId = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(null);
|
|
29386
29422
|
//
|
|
@@ -29781,8 +29817,18 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
29781
29817
|
}
|
|
29782
29818
|
setIsOpen(function (state) { return !state; });
|
|
29783
29819
|
};
|
|
29820
|
+
var _22 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), isLeaving = _22[0], setIsLeaving = _22[1];
|
|
29821
|
+
var toastLeavingId = react__WEBPACK_IMPORTED_MODULE_1___default().useRef(null);
|
|
29784
29822
|
var handleLeaveDialog = function () {
|
|
29785
29823
|
if (dialogToLeave) {
|
|
29824
|
+
setIsLeaving(true);
|
|
29825
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29826
|
+
// @ts-ignore
|
|
29827
|
+
toastLeavingId.current = (0,react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast)('leaving dialog', {
|
|
29828
|
+
autoClose: false,
|
|
29829
|
+
isLoading: true,
|
|
29830
|
+
});
|
|
29831
|
+
// eslint-disable-next-line promise/catch-or-return
|
|
29786
29832
|
dialogsViewModel
|
|
29787
29833
|
.deleteDialog(dialogToLeave)
|
|
29788
29834
|
.then(function (result) {
|
|
@@ -29795,6 +29841,12 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
29795
29841
|
.catch(function (e) {
|
|
29796
29842
|
console.log(e);
|
|
29797
29843
|
(0,react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast)("Can't leave dialog");
|
|
29844
|
+
})
|
|
29845
|
+
.finally(function () {
|
|
29846
|
+
setIsLeaving(false);
|
|
29847
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
29848
|
+
// @ts-ignore
|
|
29849
|
+
react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast.dismiss(toastLeavingId.current);
|
|
29798
29850
|
});
|
|
29799
29851
|
}
|
|
29800
29852
|
};
|
|
@@ -29966,11 +30018,15 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
29966
30018
|
if (!resultOperation) {
|
|
29967
30019
|
(0,react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast)("Incorrect data");
|
|
29968
30020
|
}
|
|
30021
|
+
})
|
|
30022
|
+
.finally(function () {
|
|
30023
|
+
setFileToSend(null);
|
|
29969
30024
|
});
|
|
29970
30025
|
}
|
|
29971
30026
|
}
|
|
29972
30027
|
else if (fileToSend) {
|
|
29973
30028
|
(0,react_toastify__WEBPACK_IMPORTED_MODULE_4__.toast)("file size ".concat(fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size, " must be less then ").concat(MAXSIZE_FOR_MESSAGE, " mb."));
|
|
30029
|
+
setFileToSend(null);
|
|
29974
30030
|
}
|
|
29975
30031
|
}, [fileToSend]);
|
|
29976
30032
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
@@ -30049,7 +30105,16 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
30049
30105
|
handleDialogOnClick();
|
|
30050
30106
|
}
|
|
30051
30107
|
}, [dialogToLeave]);
|
|
30052
|
-
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Toast_ToastProvider__WEBPACK_IMPORTED_MODULE_38__["default"], { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "qb-uikit-layout" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
30108
|
+
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Toast_ToastProvider__WEBPACK_IMPORTED_MODULE_38__["default"], { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "qb-uikit-layout" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: {
|
|
30109
|
+
position: 'absolute',
|
|
30110
|
+
top: '0',
|
|
30111
|
+
left: '0',
|
|
30112
|
+
width: '100%',
|
|
30113
|
+
height: '100%',
|
|
30114
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
30115
|
+
zIndex: '100',
|
|
30116
|
+
display: isLeaving ? 'block' : 'none',
|
|
30117
|
+
} }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DesktopLayout__WEBPACK_IMPORTED_MODULE_8__["default"], { mainContainerStyles: {
|
|
30053
30118
|
minHeight: workHeight,
|
|
30054
30119
|
maxHeight: workHeight,
|
|
30055
30120
|
}, onHeightChange: handleHeightChange, theme: theme, dialogsView: showDialogList ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_DialogList_DialogList__WEBPACK_IMPORTED_MODULE_6__["default"], { disableAction: !isOnline, scrollableHeight: dialogListScrollableHeight,
|
|
@@ -30133,8 +30198,7 @@ var QuickBloxUIKitDesktopLayout = function (_a) {
|
|
|
30133
30198
|
}, users: userViewModel.users, rootStyles: {
|
|
30134
30199
|
minHeight: clientContainerHeight,
|
|
30135
30200
|
maxHeight: clientContainerHeight,
|
|
30136
|
-
},
|
|
30137
|
-
// subHeaderContent={<CompanyLogo />}
|
|
30201
|
+
}, subHeaderContent: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "v0.3.1-beta.5" }) }),
|
|
30138
30202
|
// upHeaderContent={<CompanyLogo />}
|
|
30139
30203
|
dialog: selectedDialog, dialogViewModel: dialogsViewModel, onCloseDialogInformationHandler: informationCloseHandler }))) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogWindow_DialogWindow__WEBPACK_IMPORTED_MODULE_33__["default"], __assign({ open: isOpen, title: "Leave dialog?", onClose: handleDialogOnClick }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", __assign({ className: "dialog-leave-container" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Button_Button__WEBPACK_IMPORTED_MODULE_32__["default"], __assign({ variant: "outlined", onClick: handleDialogOnClick }, { children: "Cancel" })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_Button_Button__WEBPACK_IMPORTED_MODULE_32__["default"], __assign({ variant: "danger", onClick: handleLeaveDialog }, { children: "Leave" }))] })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ui_components_DialogWindow_DialogWindow__WEBPACK_IMPORTED_MODULE_33__["default"], __assign({ title: "New dialog", onClose: newModal.toggleModal, open: newModal.isOpen, className: isMobile
|
|
30140
30204
|
? 'dialog-list-new-dialog-mobile-container'
|
|
@@ -30454,11 +30518,15 @@ function QuickBloxUIKitProvider(_a) {
|
|
|
30454
30518
|
// setAuthProcessed(status);
|
|
30455
30519
|
// };
|
|
30456
30520
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
|
30457
|
-
if (!accountData.accountKey ||
|
|
30521
|
+
if (!accountData.accountKey ||
|
|
30522
|
+
!accountData.appId ||
|
|
30523
|
+
(!accountData.authKey && !accountData.sessionToken)) {
|
|
30458
30524
|
(0,react_toastify__WEBPACK_IMPORTED_MODULE_2__.toast)('Please input AppId, AuthKey, AuthSecret, AccountKey to sign in/up');
|
|
30459
30525
|
}
|
|
30460
30526
|
}, []);
|
|
30461
|
-
if (!accountData.accountKey ||
|
|
30527
|
+
if (!accountData.accountKey ||
|
|
30528
|
+
!accountData.appId ||
|
|
30529
|
+
(!accountData.authKey && !accountData.sessionToken)) {
|
|
30462
30530
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_toastify__WEBPACK_IMPORTED_MODULE_2__.ToastContainer, { position: "top-center", autoClose: 5000, bodyClassName: "toast__body", toastClassName: "toast", pauseOnHover: false, closeButton: false, hideProgressBar: true }), children] }));
|
|
30463
30531
|
}
|
|
30464
30532
|
return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Provider, __assign({ value: {
|