quickblox-react-ui-kit 0.5.0-beta.7 → 0.5.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts.map +1 -1
- package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
- package/dist/Presentation/Views/Dialog/useDialogViewModel.d.ts.map +1 -1
- package/dist/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.d.ts.map +1 -1
- package/dist/index-ui.js +83 -44
- package/package.json +1 -1
- package/src/App.tsx +0 -1
- package/src/Data/source/remote/RemoteDataSource.ts +0 -2
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +5 -13
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +5 -5
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +89 -29
- package/storybook-static/project.json +1 -1
- package/webpack.app.config.js +1 -0
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,OAAO,YAAY,CAAC;AAkBpB,iBAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AACA,OAAO,YAAY,CAAC;AAkBpB,iBAAS,GAAG,4CAwOX;AAED,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteDataSource.d.ts","sourceRoot":"","sources":["../../../../src/Data/source/remote/RemoteDataSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAgBL,aAAa,EACb,gBAAgB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAQnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAA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B,SAAS,EAAE,eAAe,EAC1B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC;IAUV,WAAW,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6E7D,iBAAiB,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC;IA+B1D,aAAa,CAEjB,GAAG,EAAE,gBAAgB,GACpB,OAAO,CAAC,gBAAgB,CAAC;IA8BtB,aAAa,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAgCnD,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAuCtD,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;IAKnD,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAK7C,+BAA+B,CAEnC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;CAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDialogViewModel.d.ts","sourceRoot":"","sources":["../../../../src/Presentation/Views/Dialog/useDialogViewModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqCpD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GACzB,eAAe,
|
|
1
|
+
{"version":3,"file":"useDialogViewModel.d.ts","sourceRoot":"","sources":["../../../../src/Presentation/Views/Dialog/useDialogViewModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAqCpD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,YAAY,GACzB,eAAe,CAgvBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuickBloxUIKitDesktopLayout.d.ts","sourceRoot":"","sources":["../../../../src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,gCAAgC,CAAC;AACxC,OAAO,oEAAoE,CAAC;AA4C5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF,QAAA,MAAM,2BAA2B,qEAM9B,gCAAgC,
|
|
1
|
+
{"version":3,"file":"QuickBloxUIKitDesktopLayout.d.ts","sourceRoot":"","sources":["../../../../src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx"],"names":[],"mappings":"AAEA,OAAO,gCAAgC,CAAC;AACxC,OAAO,oEAAoE,CAAC;AA4C5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AAEpF,QAAA,MAAM,2BAA2B,qEAM9B,gCAAgC,4CAquBlC,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
package/dist/index-ui.js
CHANGED
|
@@ -65951,13 +65951,11 @@ class RemoteDataSource {
|
|
|
65951
65951
|
}
|
|
65952
65952
|
const firstBatch = joinDialogIds.slice(0, 12);
|
|
65953
65953
|
await this.processDialogs(firstBatch);
|
|
65954
|
-
// Оставшиеся элементы обрабатываются асинхронно в фоне
|
|
65955
65954
|
const remainingDialogs = joinDialogIds.slice(12);
|
|
65956
65955
|
if (remainingDialogs.length) {
|
|
65957
65956
|
this.processDialogsInBackground(remainingDialogs).then();
|
|
65958
65957
|
}
|
|
65959
65958
|
}
|
|
65960
|
-
// Возвращаем результат после первой партии
|
|
65961
65959
|
return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
|
|
65962
65960
|
}
|
|
65963
65961
|
// async getDialogs(pagination?: Pagination): Promise<RemoteDialogsDTO> {
|
|
@@ -74652,7 +74650,7 @@ additionalSettings = undefined, }) => {
|
|
|
74652
74650
|
const QB = getQB();
|
|
74653
74651
|
setMessageContentParts(messageParts);
|
|
74654
74652
|
if (messageParts &&
|
|
74655
|
-
messageParts.length > 0 &&
|
|
74653
|
+
messageParts.length > 0 && messageParts[3] &&
|
|
74656
74654
|
messageParts[3].includes('image')) {
|
|
74657
74655
|
const fileUid = messageParts[2];
|
|
74658
74656
|
let tmpFileUrl = fileUid && QB.content.privateUrl(fileUid);
|
|
@@ -74712,16 +74710,16 @@ additionalSettings = undefined, }) => {
|
|
|
74712
74710
|
const getPreviewMessage = (message) => {
|
|
74713
74711
|
if (messageContentParts && messageContentParts.length > 0) {
|
|
74714
74712
|
const [, fileName, , type] = messageContentParts;
|
|
74715
|
-
if (type.includes('audio')) {
|
|
74713
|
+
if (type && type.includes('audio')) {
|
|
74716
74714
|
return ((0,jsx_runtime_.jsx)(PreviewFileMessage_PreviewFileMessage_PreviewFileMessage, { type: "audio", name: trimFileName(fileName) }));
|
|
74717
74715
|
}
|
|
74718
|
-
if (type.includes('video')) {
|
|
74716
|
+
if (type && type.includes('video')) {
|
|
74719
74717
|
return ((0,jsx_runtime_.jsx)(PreviewFileMessage_PreviewFileMessage_PreviewFileMessage, { type: "video", name: trimFileName(fileName) }));
|
|
74720
74718
|
}
|
|
74721
|
-
if (type.includes('image')) {
|
|
74719
|
+
if (type && type.includes('image')) {
|
|
74722
74720
|
return ((0,jsx_runtime_.jsx)(PreviewFileMessage_PreviewFileMessage_PreviewFileMessage, { name: trimFileName(fileName), src: fileUrl }));
|
|
74723
74721
|
}
|
|
74724
|
-
if (fileName.length > 0 && fileName.includes('.')) {
|
|
74722
|
+
if (fileName && fileName.length > 0 && fileName.includes('.')) {
|
|
74725
74723
|
return (0,jsx_runtime_.jsx)(PreviewFileMessage_PreviewFileMessage_PreviewFileMessage, { name: trimFileName(fileName) });
|
|
74726
74724
|
}
|
|
74727
74725
|
return message;
|
|
@@ -77191,9 +77189,7 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77191
77189
|
const startPagination = new Pagination(0, 0);
|
|
77192
77190
|
const [pagination, setPagination] = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)(startPagination);
|
|
77193
77191
|
const [messages, setMessages] = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)([]);
|
|
77194
|
-
// const [users, setUsers] = useState<Record<number, UserEntity>>();
|
|
77195
77192
|
const [dialog, setDialog] = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)(dialogEntity);
|
|
77196
|
-
// const [dialogsParticipants, setDialogsParticipants] = useState<number[]>([]);
|
|
77197
77193
|
const currentContext = QuickBloxUIKitProvider_useQbInitializedDataContext();
|
|
77198
77194
|
const remoteDataSourceMock = currentContext.storage.REMOTE_DATA_SOURCE;
|
|
77199
77195
|
const QBConfig = currentContext.InitParams.qbConfig ||
|
|
@@ -77208,8 +77204,7 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77208
77204
|
function informDataSources(item) {
|
|
77209
77205
|
const updateCurrentDialogInDataSourceUseCase = new UpdateCurrentDialogInDataSourceUseCase(new DialogsRepository(currentContext.storage.LOCAL_DATA_SOURCE, remoteDataSourceMock), item, QBConfig);
|
|
77210
77206
|
updateCurrentDialogInDataSourceUseCase.execute().catch((e) => {
|
|
77211
|
-
console.log('useDialogViewModel Error updateCurrentDialogInDataSourceUseCase: ', parse_stringifyError(e));
|
|
77212
|
-
throw new Error(parse_stringifyError(e));
|
|
77207
|
+
console.log('Error: useDialogViewModel Error updateCurrentDialogInDataSourceUseCase: ', parse_stringifyError(e));
|
|
77213
77208
|
});
|
|
77214
77209
|
}
|
|
77215
77210
|
const getSender = async (sender_id) => {
|
|
@@ -77441,8 +77436,7 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77441
77436
|
console.log('call release in MessagesViewModelWithMockUseCase');
|
|
77442
77437
|
userTypingMessageUseCase.execute().catch((reason) => {
|
|
77443
77438
|
const errorMessage = parse_stringifyError(reason);
|
|
77444
|
-
console.log('have exception in sendTypingTextMessage: ', errorMessage);
|
|
77445
|
-
throw new Error(errorMessage);
|
|
77439
|
+
console.log('Error: have exception in sendTypingTextMessage: ', errorMessage);
|
|
77446
77440
|
});
|
|
77447
77441
|
};
|
|
77448
77442
|
const uploadFile = async (file) => {
|
|
@@ -77499,9 +77493,8 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77499
77493
|
})
|
|
77500
77494
|
.catch((reason) => {
|
|
77501
77495
|
const errorMessage = parse_stringifyError(reason);
|
|
77502
|
-
console.log('exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77496
|
+
console.log('Error: exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77503
77497
|
setLoading(false);
|
|
77504
|
-
throw new Error(errorMessage);
|
|
77505
77498
|
})
|
|
77506
77499
|
.finally(() => {
|
|
77507
77500
|
setLoading(false);
|
|
@@ -77578,9 +77571,8 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77578
77571
|
.execute()
|
|
77579
77572
|
.catch((reason) => {
|
|
77580
77573
|
const errorMessage = parse_stringifyError(reason);
|
|
77581
|
-
console.log('exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77574
|
+
console.log('Error: exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77582
77575
|
setLoading(false);
|
|
77583
|
-
throw new Error(errorMessage);
|
|
77584
77576
|
})
|
|
77585
77577
|
.finally(() => {
|
|
77586
77578
|
setLoading(false);
|
|
@@ -77641,9 +77633,8 @@ function useDialogViewModel(dialogType, dialogEntity) {
|
|
|
77641
77633
|
})
|
|
77642
77634
|
.catch((reason) => {
|
|
77643
77635
|
const errorMessage = parse_stringifyError(reason);
|
|
77644
|
-
console.log('exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77636
|
+
console.log('Error: exception in sendMessage in useDialogViewModel', errorMessage);
|
|
77645
77637
|
setLoading(false);
|
|
77646
|
-
throw new Error(errorMessage);
|
|
77647
77638
|
})
|
|
77648
77639
|
.finally(() => {
|
|
77649
77640
|
setLoading(false);
|
|
@@ -78971,12 +78962,80 @@ const QuickBloxUIKitDesktopLayout = ({ theme, AITranslate, AIRephrase, AIAssist,
|
|
|
78971
78962
|
const [dialogsToView, setDialogsToView] = external_commonjs_react_commonjs2_react_amd_react_root_React_default().useState([]);
|
|
78972
78963
|
//
|
|
78973
78964
|
const [selectedItem, setSelectedItem] = external_commonjs_react_commonjs2_react_amd_react_root_React_default().useState(undefined);
|
|
78974
|
-
const
|
|
78975
|
-
|
|
78976
|
-
|
|
78977
|
-
|
|
78978
|
-
|
|
78965
|
+
const [pointerEventsValue, setPointerEventsValue] = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)('auto');
|
|
78966
|
+
const pointerEventsRef = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useRef)('auto');
|
|
78967
|
+
let timeout = null;
|
|
78968
|
+
(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(() => {
|
|
78969
|
+
return () => {
|
|
78970
|
+
if (timeout !== null) {
|
|
78971
|
+
clearTimeout(timeout);
|
|
78972
|
+
timeout = null;
|
|
78979
78973
|
}
|
|
78974
|
+
};
|
|
78975
|
+
}, []);
|
|
78976
|
+
(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(() => {
|
|
78977
|
+
if (dialogsViewModel.loading) {
|
|
78978
|
+
pointerEventsRef.current = 'none';
|
|
78979
|
+
setPointerEventsValue('none');
|
|
78980
|
+
if (timeout !== null) {
|
|
78981
|
+
clearTimeout(timeout);
|
|
78982
|
+
}
|
|
78983
|
+
timeout = window.setTimeout(() => {
|
|
78984
|
+
console.warn('Forced unlock after 12 seconds due to loading timeout.');
|
|
78985
|
+
pointerEventsRef.current = 'auto';
|
|
78986
|
+
setPointerEventsValue('auto');
|
|
78987
|
+
// Ensure loading status is reset
|
|
78988
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
78989
|
+
timeout = null;
|
|
78990
|
+
}, 12000);
|
|
78991
|
+
}
|
|
78992
|
+
else {
|
|
78993
|
+
if (timeout !== null) {
|
|
78994
|
+
clearTimeout(timeout);
|
|
78995
|
+
timeout = null;
|
|
78996
|
+
}
|
|
78997
|
+
pointerEventsRef.current = 'auto';
|
|
78998
|
+
setPointerEventsValue('auto');
|
|
78999
|
+
// Ensure loading status is reset on successful load
|
|
79000
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
79001
|
+
}
|
|
79002
|
+
}, [dialogsViewModel.loading]);
|
|
79003
|
+
// previous version
|
|
79004
|
+
// let timeout: NodeJS.Timeout | number | undefined;
|
|
79005
|
+
//
|
|
79006
|
+
// useEffect(() => {
|
|
79007
|
+
// return () => {
|
|
79008
|
+
// if (timeout) {
|
|
79009
|
+
// clearTimeout(timeout);
|
|
79010
|
+
// }
|
|
79011
|
+
// };
|
|
79012
|
+
// }, []);
|
|
79013
|
+
//
|
|
79014
|
+
// useEffect(() => {
|
|
79015
|
+
//
|
|
79016
|
+
// if (dialogsViewModel.loading) {
|
|
79017
|
+
// setPointerEventsValue('none');
|
|
79018
|
+
//
|
|
79019
|
+
// timeout = setTimeout(() => {
|
|
79020
|
+
// console.warn('Forced unlock after 12 seconds due to loading timeout.');
|
|
79021
|
+
// setPointerEventsValue('auto');
|
|
79022
|
+
// }, 12000);
|
|
79023
|
+
// } else {
|
|
79024
|
+
// setPointerEventsValue('auto');
|
|
79025
|
+
// }
|
|
79026
|
+
//
|
|
79027
|
+
// }, [dialogsViewModel.loading]);
|
|
79028
|
+
(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(() => {
|
|
79029
|
+
if (pointerEventsValue === 'auto') {
|
|
79030
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
79031
|
+
}
|
|
79032
|
+
}, [pointerEventsValue]);
|
|
79033
|
+
const selectDialogActions = (item) => {
|
|
79034
|
+
if (isOnline &&
|
|
79035
|
+
(pointerEventsValue !== 'none' ||
|
|
79036
|
+
pointerEventsRef.current === 'auto' ||
|
|
79037
|
+
!dialogsViewModel.loading)) {
|
|
79038
|
+
setSelectedDialog(item.entity);
|
|
78980
79039
|
}
|
|
78981
79040
|
};
|
|
78982
79041
|
const handleSelectedDialog = (dialog, index) => {
|
|
@@ -79020,26 +79079,6 @@ const QuickBloxUIKitDesktopLayout = ({ theme, AITranslate, AIRephrase, AIAssist,
|
|
|
79020
79079
|
const searchedDialogs = nameDialogForSearch
|
|
79021
79080
|
? dialogsToView.filter(({ entity }) => entity.name.toUpperCase().includes(nameDialogForSearch.toUpperCase()))
|
|
79022
79081
|
: dialogsToView;
|
|
79023
|
-
const [pointerEventsValue, setPointerEventsValue] = (0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useState)('auto');
|
|
79024
|
-
let timeout;
|
|
79025
|
-
(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(() => {
|
|
79026
|
-
return () => {
|
|
79027
|
-
if (timeout) {
|
|
79028
|
-
clearTimeout(timeout);
|
|
79029
|
-
}
|
|
79030
|
-
};
|
|
79031
|
-
}, []);
|
|
79032
|
-
(0,external_commonjs_react_commonjs2_react_amd_react_root_React_.useEffect)(() => {
|
|
79033
|
-
if (dialogsViewModel.loading) {
|
|
79034
|
-
setPointerEventsValue('none');
|
|
79035
|
-
timeout = setTimeout(() => {
|
|
79036
|
-
setPointerEventsValue('auto');
|
|
79037
|
-
}, 12000);
|
|
79038
|
-
}
|
|
79039
|
-
else {
|
|
79040
|
-
setPointerEventsValue('auto');
|
|
79041
|
-
}
|
|
79042
|
-
}, [dialogsViewModel.loading]);
|
|
79043
79082
|
function getMessageDateTimeSent(item) {
|
|
79044
79083
|
let dateInt = 0;
|
|
79045
79084
|
let formattedValue = '';
|
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -966,14 +966,12 @@ export class RemoteDataSource implements IRemoteDataSource {
|
|
|
966
966
|
const firstBatch = joinDialogIds.slice(0, 12);
|
|
967
967
|
await this.processDialogs(firstBatch);
|
|
968
968
|
|
|
969
|
-
// Оставшиеся элементы обрабатываются асинхронно в фоне
|
|
970
969
|
const remainingDialogs = joinDialogIds.slice(12);
|
|
971
970
|
if (remainingDialogs.length) {
|
|
972
971
|
this.processDialogsInBackground(remainingDialogs).then();
|
|
973
972
|
}
|
|
974
973
|
}
|
|
975
974
|
|
|
976
|
-
// Возвращаем результат после первой партии
|
|
977
975
|
return Promise.resolve(new RemoteDialogsDTO(dialogsDTO, currentPagination));
|
|
978
976
|
}
|
|
979
977
|
|
|
@@ -49,9 +49,7 @@ export default function useDialogViewModel(
|
|
|
49
49
|
const startPagination: Pagination = new Pagination(0, 0);
|
|
50
50
|
const [pagination, setPagination] = useState<Pagination>(startPagination);
|
|
51
51
|
const [messages, setMessages] = useState<MessageEntity[]>([]);
|
|
52
|
-
// const [users, setUsers] = useState<Record<number, UserEntity>>();
|
|
53
52
|
const [dialog, setDialog] = useState<DialogEntity>(dialogEntity);
|
|
54
|
-
// const [dialogsParticipants, setDialogsParticipants] = useState<number[]>([]);
|
|
55
53
|
|
|
56
54
|
const currentContext = useQbInitializedDataContext();
|
|
57
55
|
const remoteDataSourceMock: RemoteDataSource =
|
|
@@ -83,10 +81,9 @@ export default function useDialogViewModel(
|
|
|
83
81
|
|
|
84
82
|
updateCurrentDialogInDataSourceUseCase.execute().catch((e) => {
|
|
85
83
|
console.log(
|
|
86
|
-
'useDialogViewModel Error updateCurrentDialogInDataSourceUseCase: ',
|
|
84
|
+
'Error: useDialogViewModel Error updateCurrentDialogInDataSourceUseCase: ',
|
|
87
85
|
stringifyError(e),
|
|
88
86
|
);
|
|
89
|
-
throw new Error(stringifyError(e));
|
|
90
87
|
});
|
|
91
88
|
}
|
|
92
89
|
|
|
@@ -412,9 +409,7 @@ export default function useDialogViewModel(
|
|
|
412
409
|
userTypingMessageUseCase.execute().catch((reason) => {
|
|
413
410
|
const errorMessage: string = stringifyError(reason);
|
|
414
411
|
|
|
415
|
-
console.log('have exception in sendTypingTextMessage: ', errorMessage);
|
|
416
|
-
|
|
417
|
-
throw new Error(errorMessage);
|
|
412
|
+
console.log('Error: have exception in sendTypingTextMessage: ', errorMessage);
|
|
418
413
|
});
|
|
419
414
|
};
|
|
420
415
|
|
|
@@ -490,11 +485,10 @@ export default function useDialogViewModel(
|
|
|
490
485
|
const errorMessage: string = stringifyError(reason);
|
|
491
486
|
|
|
492
487
|
console.log(
|
|
493
|
-
'exception in sendMessage in useDialogViewModel',
|
|
488
|
+
'Error: exception in sendMessage in useDialogViewModel',
|
|
494
489
|
errorMessage,
|
|
495
490
|
);
|
|
496
491
|
setLoading(false);
|
|
497
|
-
throw new Error(errorMessage);
|
|
498
492
|
})
|
|
499
493
|
.finally(() => {
|
|
500
494
|
setLoading(false);
|
|
@@ -614,11 +608,10 @@ export default function useDialogViewModel(
|
|
|
614
608
|
const errorMessage: string = stringifyError(reason);
|
|
615
609
|
|
|
616
610
|
console.log(
|
|
617
|
-
'exception in sendMessage in useDialogViewModel',
|
|
611
|
+
'Error: exception in sendMessage in useDialogViewModel',
|
|
618
612
|
errorMessage,
|
|
619
613
|
);
|
|
620
614
|
setLoading(false);
|
|
621
|
-
throw new Error(errorMessage);
|
|
622
615
|
})
|
|
623
616
|
.finally(() => {
|
|
624
617
|
setLoading(false);
|
|
@@ -707,11 +700,10 @@ export default function useDialogViewModel(
|
|
|
707
700
|
const errorMessage: string = stringifyError(reason);
|
|
708
701
|
|
|
709
702
|
console.log(
|
|
710
|
-
'exception in sendMessage in useDialogViewModel',
|
|
703
|
+
'Error: exception in sendMessage in useDialogViewModel',
|
|
711
704
|
errorMessage,
|
|
712
705
|
);
|
|
713
706
|
setLoading(false);
|
|
714
|
-
throw new Error(errorMessage);
|
|
715
707
|
})
|
|
716
708
|
.finally(() => {
|
|
717
709
|
setLoading(false);
|
|
@@ -177,7 +177,7 @@ const PreviewDialog = ({
|
|
|
177
177
|
|
|
178
178
|
if (
|
|
179
179
|
messageParts &&
|
|
180
|
-
messageParts.length > 0 &&
|
|
180
|
+
messageParts.length > 0 && messageParts[3] &&
|
|
181
181
|
messageParts[3].includes('image')
|
|
182
182
|
) {
|
|
183
183
|
const fileUid: string = messageParts[2];
|
|
@@ -256,22 +256,22 @@ const PreviewDialog = ({
|
|
|
256
256
|
if (messageContentParts && messageContentParts.length > 0) {
|
|
257
257
|
const [, fileName, , type] = messageContentParts;
|
|
258
258
|
|
|
259
|
-
if (type.includes('audio')) {
|
|
259
|
+
if (type && type.includes('audio')) {
|
|
260
260
|
return (
|
|
261
261
|
<PreviewFileMessage type="audio" name={trimFileName(fileName)} />
|
|
262
262
|
);
|
|
263
263
|
}
|
|
264
|
-
if (type.includes('video')) {
|
|
264
|
+
if (type && type.includes('video')) {
|
|
265
265
|
return (
|
|
266
266
|
<PreviewFileMessage type="video" name={trimFileName(fileName)} />
|
|
267
267
|
);
|
|
268
268
|
}
|
|
269
|
-
if (type.includes('image')) {
|
|
269
|
+
if (type && type.includes('image')) {
|
|
270
270
|
return (
|
|
271
271
|
<PreviewFileMessage name={trimFileName(fileName)} src={fileUrl} />
|
|
272
272
|
);
|
|
273
273
|
}
|
|
274
|
-
if (fileName.length > 0 && fileName.includes('.')) {
|
|
274
|
+
if (fileName && fileName.length > 0 && fileName.includes('.')) {
|
|
275
275
|
return <PreviewFileMessage name={trimFileName(fileName)} />;
|
|
276
276
|
}
|
|
277
277
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useState } from 'react';
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import '../../Views/Dialog/Dialog.scss';
|
|
4
4
|
import '../../Views/Dialog/DialogHeader/DialogInfoIcon/DialogInfoIcon.scss';
|
|
@@ -204,13 +204,96 @@ const QuickBloxUIKitDesktopLayout = ({
|
|
|
204
204
|
const [selectedItem, setSelectedItem] = React.useState<
|
|
205
205
|
BaseViewModel<DialogEntity> | undefined
|
|
206
206
|
>(undefined);
|
|
207
|
+
const [pointerEventsValue, setPointerEventsValue] = useState<'auto' | 'none'>(
|
|
208
|
+
'auto',
|
|
209
|
+
);
|
|
207
210
|
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
const pointerEventsRef = useRef<'auto' | 'none'>('auto');
|
|
212
|
+
|
|
213
|
+
let timeout: number | null = null;
|
|
214
|
+
|
|
215
|
+
useEffect(() => {
|
|
216
|
+
return () => {
|
|
217
|
+
if (timeout !== null) {
|
|
218
|
+
clearTimeout(timeout);
|
|
219
|
+
timeout = null;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
}, []);
|
|
223
|
+
|
|
224
|
+
useEffect(() => {
|
|
225
|
+
if (dialogsViewModel.loading) {
|
|
226
|
+
pointerEventsRef.current = 'none';
|
|
227
|
+
setPointerEventsValue('none');
|
|
228
|
+
|
|
229
|
+
if (timeout !== null) {
|
|
230
|
+
clearTimeout(timeout);
|
|
213
231
|
}
|
|
232
|
+
|
|
233
|
+
timeout = window.setTimeout(() => {
|
|
234
|
+
console.warn('Forced unlock after 12 seconds due to loading timeout.');
|
|
235
|
+
pointerEventsRef.current = 'auto';
|
|
236
|
+
setPointerEventsValue('auto');
|
|
237
|
+
|
|
238
|
+
// Ensure loading status is reset
|
|
239
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
240
|
+
|
|
241
|
+
timeout = null;
|
|
242
|
+
}, 12000);
|
|
243
|
+
} else {
|
|
244
|
+
if (timeout !== null) {
|
|
245
|
+
clearTimeout(timeout);
|
|
246
|
+
timeout = null;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
pointerEventsRef.current = 'auto';
|
|
250
|
+
setPointerEventsValue('auto');
|
|
251
|
+
|
|
252
|
+
// Ensure loading status is reset on successful load
|
|
253
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
254
|
+
}
|
|
255
|
+
}, [dialogsViewModel.loading]);
|
|
256
|
+
|
|
257
|
+
// previous version
|
|
258
|
+
// let timeout: NodeJS.Timeout | number | undefined;
|
|
259
|
+
//
|
|
260
|
+
// useEffect(() => {
|
|
261
|
+
// return () => {
|
|
262
|
+
// if (timeout) {
|
|
263
|
+
// clearTimeout(timeout);
|
|
264
|
+
// }
|
|
265
|
+
// };
|
|
266
|
+
// }, []);
|
|
267
|
+
//
|
|
268
|
+
// useEffect(() => {
|
|
269
|
+
//
|
|
270
|
+
// if (dialogsViewModel.loading) {
|
|
271
|
+
// setPointerEventsValue('none');
|
|
272
|
+
//
|
|
273
|
+
// timeout = setTimeout(() => {
|
|
274
|
+
// console.warn('Forced unlock after 12 seconds due to loading timeout.');
|
|
275
|
+
// setPointerEventsValue('auto');
|
|
276
|
+
// }, 12000);
|
|
277
|
+
// } else {
|
|
278
|
+
// setPointerEventsValue('auto');
|
|
279
|
+
// }
|
|
280
|
+
//
|
|
281
|
+
// }, [dialogsViewModel.loading]);
|
|
282
|
+
|
|
283
|
+
useEffect(() => {
|
|
284
|
+
if (pointerEventsValue === 'auto') {
|
|
285
|
+
dialogsViewModel.setWaitLoadingStatus(false);
|
|
286
|
+
}
|
|
287
|
+
}, [pointerEventsValue]);
|
|
288
|
+
|
|
289
|
+
const selectDialogActions = (item: BaseViewModel<DialogEntity>): void => {
|
|
290
|
+
if (
|
|
291
|
+
isOnline &&
|
|
292
|
+
(pointerEventsValue !== 'none' ||
|
|
293
|
+
pointerEventsRef.current === 'auto' ||
|
|
294
|
+
!dialogsViewModel.loading)
|
|
295
|
+
) {
|
|
296
|
+
setSelectedDialog(item.entity);
|
|
214
297
|
}
|
|
215
298
|
};
|
|
216
299
|
|
|
@@ -274,29 +357,6 @@ const QuickBloxUIKitDesktopLayout = ({
|
|
|
274
357
|
)
|
|
275
358
|
: dialogsToView;
|
|
276
359
|
|
|
277
|
-
const [pointerEventsValue, setPointerEventsValue] = useState<string>('auto');
|
|
278
|
-
|
|
279
|
-
let timeout: NodeJS.Timeout | number | undefined;
|
|
280
|
-
|
|
281
|
-
useEffect(() => {
|
|
282
|
-
return () => {
|
|
283
|
-
if (timeout) {
|
|
284
|
-
clearTimeout(timeout);
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
}, []);
|
|
288
|
-
|
|
289
|
-
useEffect(() => {
|
|
290
|
-
if (dialogsViewModel.loading) {
|
|
291
|
-
setPointerEventsValue('none');
|
|
292
|
-
timeout = setTimeout(() => {
|
|
293
|
-
setPointerEventsValue('auto');
|
|
294
|
-
}, 12000);
|
|
295
|
-
} else {
|
|
296
|
-
setPointerEventsValue('auto');
|
|
297
|
-
}
|
|
298
|
-
}, [dialogsViewModel.loading]);
|
|
299
|
-
|
|
300
360
|
function getMessageDateTimeSent(item: PreviewDialogViewModel): string {
|
|
301
361
|
let dateInt = 0;
|
|
302
362
|
let formattedValue = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1742471407634,"hasCustomBabel":false,"hasCustomWebpack":true,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@testing-library/jest-dom":"6.6.3","@testing-library/react":"16.2.0","@testing-library/user-event":null,"@types/jest":"27.5.2"},"hasRouterPackage":true,"packageManager":{"type":"npm","version":"10.2.4"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-webpack5","options":{}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","portableStoriesFileCount":0,"applicationFileCount":2,"storybookVersion":"8.6.4","storybookVersionSpecifier":"^8.5.8","language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"8.6.4"},"@storybook/react":{"version":"8.6.4"},"@storybook/react-webpack5":{"version":"8.6.4"},"@storybook/test":{"version":"8.6.4"},"eslint-plugin-storybook":{"version":"0.11.4"},"storybook":{"version":"8.6.4"}},"addons":{"@storybook/addon-webpack5-compiler-swc":{"version":"2.1.0"},"@storybook/addon-onboarding":{"version":"8.6.4"},"@storybook/addon-essentials":{"version":"8.6.4"},"@chromatic-com/storybook":{"version":"3.2.5"},"@storybook/addon-interactions":{"version":"8.6.4"}}}
|