@acorex/components 22.2.22 → 22.2.24
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/fesm2022/{acorex-components-conversation-acorex-components-conversation-ck1BG3Hi.mjs → acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs} +50 -9
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-CucWbe-K.mjs → acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs} +2 -2
- package/fesm2022/{acorex-components-conversation-picker-rename-file-dialog.component-CucWbe-K.mjs.map → acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs.map} +1 -1
- package/fesm2022/acorex-components-conversation.mjs +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation.d.ts +6 -0
- package/fesm2022/acorex-components-conversation-acorex-components-conversation-ck1BG3Hi.mjs.map +0 -1
|
@@ -4039,8 +4039,16 @@ class AXConversationService {
|
|
|
4039
4039
|
this.syncLastMessageIfRelevant(optimisticMessage);
|
|
4040
4040
|
// Sync with server
|
|
4041
4041
|
const updatedMessage = await this.callApi('editMessage', 'messageApi', 'editMessage', () => this.messageApi.editMessage(messageId, payload), messageId, payload);
|
|
4042
|
-
this.state.updateMessage(messageId,
|
|
4043
|
-
|
|
4042
|
+
this.state.updateMessage(messageId, {
|
|
4043
|
+
...updatedMessage,
|
|
4044
|
+
payload,
|
|
4045
|
+
editedAt: updatedMessage.editedAt ?? optimisticMessage.editedAt,
|
|
4046
|
+
});
|
|
4047
|
+
this.syncLastMessageIfRelevant({
|
|
4048
|
+
...updatedMessage,
|
|
4049
|
+
payload,
|
|
4050
|
+
editedAt: updatedMessage.editedAt ?? optimisticMessage.editedAt,
|
|
4051
|
+
});
|
|
4044
4052
|
}
|
|
4045
4053
|
catch (error) {
|
|
4046
4054
|
// Rollback on failure
|
|
@@ -4394,8 +4402,35 @@ class AXConversationService {
|
|
|
4394
4402
|
this.syncLastMessageIfRelevant(message);
|
|
4395
4403
|
return;
|
|
4396
4404
|
}
|
|
4397
|
-
this.
|
|
4398
|
-
this.
|
|
4405
|
+
const next = this.preferLocalEditedPayload(existing, message);
|
|
4406
|
+
this.state.updateMessage(message.id, next);
|
|
4407
|
+
this.syncLastMessageIfRelevant(next);
|
|
4408
|
+
}
|
|
4409
|
+
/**
|
|
4410
|
+
* After a local text edit, entity cache / status persist can echo the pre-edit payload.
|
|
4411
|
+
* Keep the newer local bubble until a strictly newer edit arrives.
|
|
4412
|
+
*/
|
|
4413
|
+
preferLocalEditedPayload(existing, incoming) {
|
|
4414
|
+
if (existing.type !== 'text' || incoming.type !== 'text') {
|
|
4415
|
+
return incoming;
|
|
4416
|
+
}
|
|
4417
|
+
const existingText = this.readTextPayload(existing.payload);
|
|
4418
|
+
const incomingText = this.readTextPayload(incoming.payload);
|
|
4419
|
+
if (!existingText || existingText === incomingText) {
|
|
4420
|
+
return incoming;
|
|
4421
|
+
}
|
|
4422
|
+
const existingEdited = existing.editedAt ? new Date(existing.editedAt).getTime() : 0;
|
|
4423
|
+
const incomingEdited = incoming.editedAt ? new Date(incoming.editedAt).getTime() : 0;
|
|
4424
|
+
if (existingEdited > 0 && incomingEdited <= existingEdited) {
|
|
4425
|
+
return { ...incoming, payload: existing.payload, editedAt: existing.editedAt };
|
|
4426
|
+
}
|
|
4427
|
+
return incoming;
|
|
4428
|
+
}
|
|
4429
|
+
readTextPayload(payload) {
|
|
4430
|
+
if (!payload || typeof payload !== 'object' || !('text' in payload)) {
|
|
4431
|
+
return '';
|
|
4432
|
+
}
|
|
4433
|
+
return typeof payload.text === 'string' ? payload.text : '';
|
|
4399
4434
|
}
|
|
4400
4435
|
/**
|
|
4401
4436
|
* Bump reply/forward counts locally when realtime events arrive outside the active message list.
|
|
@@ -7177,6 +7212,9 @@ class AXConversationComposerService {
|
|
|
7177
7212
|
if (this.isStopping()) {
|
|
7178
7213
|
return 'stopping';
|
|
7179
7214
|
}
|
|
7215
|
+
if (this.editMessage() && this.canSend()) {
|
|
7216
|
+
return 'send';
|
|
7217
|
+
}
|
|
7180
7218
|
if (this.isGenerating()) {
|
|
7181
7219
|
return 'cancel';
|
|
7182
7220
|
}
|
|
@@ -7609,13 +7647,15 @@ class AXConversationComposerComponent {
|
|
|
7609
7647
|
}
|
|
7610
7648
|
/** Handle send click */
|
|
7611
7649
|
async onSendClick() {
|
|
7612
|
-
if (!this.canSend() || this.
|
|
7650
|
+
if (!this.canSend() || this.isStopping())
|
|
7651
|
+
return;
|
|
7652
|
+
const editingMsg = this.editingMessage();
|
|
7653
|
+
if (!editingMsg && (this.isGenerating() || this.isStopping()))
|
|
7613
7654
|
return;
|
|
7614
7655
|
const conversation = this.activeConversation();
|
|
7615
7656
|
if (!conversation)
|
|
7616
7657
|
return;
|
|
7617
7658
|
const text = this.draftText().trim();
|
|
7618
|
-
const editingMsg = this.editingMessage();
|
|
7619
7659
|
if (editingMsg) {
|
|
7620
7660
|
try {
|
|
7621
7661
|
await this.conversationService.editMessage(editingMsg.id, { type: 'text', text });
|
|
@@ -7623,6 +7663,7 @@ class AXConversationComposerComponent {
|
|
|
7623
7663
|
this.attachments.set([]);
|
|
7624
7664
|
this.cancelEditReply();
|
|
7625
7665
|
this.composerService.clearDraft(conversation.id);
|
|
7666
|
+
this.messageListService.requestScrollToBottom();
|
|
7626
7667
|
this.composerService.focusComposer();
|
|
7627
7668
|
}
|
|
7628
7669
|
catch (error) {
|
|
@@ -12609,7 +12650,7 @@ class AXConversationAudioPickerComponent {
|
|
|
12609
12650
|
if (!item) {
|
|
12610
12651
|
return;
|
|
12611
12652
|
}
|
|
12612
|
-
const { AXConversationPickerRenameFileDialogComponent } = await import('./acorex-components-conversation-picker-rename-file-dialog.component-
|
|
12653
|
+
const { AXConversationPickerRenameFileDialogComponent } = await import('./acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs');
|
|
12613
12654
|
const result = await this.popupService.open(AXConversationPickerRenameFileDialogComponent, {
|
|
12614
12655
|
title: this.translation.translateSync('@acorex:chat.pickers.files.rename-title'),
|
|
12615
12656
|
size: 'sm',
|
|
@@ -13230,7 +13271,7 @@ class AXConversationFilePickerComponent {
|
|
|
13230
13271
|
if (!item) {
|
|
13231
13272
|
return;
|
|
13232
13273
|
}
|
|
13233
|
-
const { AXConversationPickerRenameFileDialogComponent } = await import('./acorex-components-conversation-picker-rename-file-dialog.component-
|
|
13274
|
+
const { AXConversationPickerRenameFileDialogComponent } = await import('./acorex-components-conversation-picker-rename-file-dialog.component-OAHRGH_G.mjs');
|
|
13234
13275
|
const result = await this.popupService.open(AXConversationPickerRenameFileDialogComponent, {
|
|
13235
13276
|
title: this.translation.translateSync('@acorex:chat.pickers.files.rename-title'),
|
|
13236
13277
|
size: 'sm',
|
|
@@ -19055,4 +19096,4 @@ function getErrorMessage(code, params) {
|
|
|
19055
19096
|
*/
|
|
19056
19097
|
|
|
19057
19098
|
export { AXConversationPickerCaptionComponent as $, AXConversationApi as A, AXConversationFileRendererComponent as B, AXConversationForwardMessageDialogComponent as C, AXConversationImageAttachmentComponent as D, AXConversationImageFileTypeProvider as E, AXConversationImagePickerComponent as F, AXConversationImageRendererComponent as G, AXConversationInfiniteScrollDirective as H, AXConversationInfoBarActionRegistry as I, AXConversationInfoBarComponent as J, AXConversationInfoBarSearchComponent as K, AXConversationInfoBarService as L, AXConversationItemActionRegistry as M, AXConversationLocationPickerComponent as N, AXConversationLocationRendererComponent as O, AXConversationMediaPlaybackInfoBarBannerComponent as P, AXConversationMessageActionRegistry as Q, AXConversationMessageApi as R, AXConversationMessageListComponent as S, AXConversationMessageListNoActiveDefaultComponent as T, AXConversationMessageListService as U, AXConversationMessageRendererCopyHostComponent as V, AXConversationMessageRendererRegistry as W, AXConversationMessageRendererStateComponent as X, AXConversationMessageUtilsService as Y, AXConversationModule as Z, AXConversationNewDialogComponent as _, AXConversationApiLoggerService as a, AX_CONVERSATION_IMAGE_CATALOG as a$, AXConversationPickerEmptyComponent as a0, AXConversationPickerFooterComponent as a1, AXConversationPickerHeaderComponent as a2, AXConversationPickerOptionsComponent as a3, AXConversationPickerShellComponent as a4, AXConversationPickerToolbarComponent as a5, AXConversationRealtimeApi as a6, AXConversationRegistryComponentOutletComponent as a7, AXConversationRegistryService as a8, AXConversationService as a9, AX_CONVERSATION_COMPOSER_VIDEO_ACTION as aA, AX_CONVERSATION_COMPOSER_VOICE_RECORDING_ACTION as aB, AX_CONVERSATION_CONFIG as aC, AX_CONVERSATION_CONNECTION_ERRORS as aD, AX_CONVERSATION_CONVERSATION_AVATAR_COMPONENT as aE, AX_CONVERSATION_DEFAULT_COMPOSER_ACTIONS as aF, AX_CONVERSATION_DEFAULT_COMPOSER_TABS as aG, AX_CONVERSATION_DEFAULT_CONVERSATION_ITEM_ACTIONS as aH, AX_CONVERSATION_DEFAULT_CONVERSATION_TABS as aI, AX_CONVERSATION_DEFAULT_GROUP_ICON as aJ, AX_CONVERSATION_DEFAULT_INFO_BAR_ACTIONS as aK, AX_CONVERSATION_DEFAULT_MESSAGE_ACTIONS as aL, AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND as aM, AX_CONVERSATION_DEFAULT_MESSAGE_LIST_BACKGROUND_PRESET_ID as aN, AX_CONVERSATION_DEFAULT_MESSAGE_LIST_THEME_BACKGROUND as aO, AX_CONVERSATION_DEFAULT_MESSAGE_RENDERERS as aP, AX_CONVERSATION_DEFAULT_ROOM_PREFERENCES as aQ, AX_CONVERSATION_DEFAULT_USER_ICON as aR, AX_CONVERSATION_ERRORS as aS, AX_CONVERSATION_ERROR_HANDLER_CONFIG as aT, AX_CONVERSATION_ERROR_MESSAGES as aU, AX_CONVERSATION_FALLBACK_RENDERER as aV, AX_CONVERSATION_FILE_CATALOG as aW, AX_CONVERSATION_FILE_ERRORS as aX, AX_CONVERSATION_FILE_PRESENTATION as aY, AX_CONVERSATION_FILE_RENDERER as aZ, AX_CONVERSATION_FILE_TYPES_READY as a_, AXConversationSidebarComponent as aa, AXConversationSidebarService as ab, AXConversationStickerRendererComponent as ac, AXConversationStickerTabComponent as ad, AXConversationSystemRendererComponent as ae, AXConversationTabRegistry as af, AXConversationTextRendererComponent as ag, AXConversationUserApi as ah, AXConversationVideoAttachmentComponent as ai, AXConversationVideoFileTypeProvider as aj, AXConversationVideoPickerComponent as ak, AXConversationVideoRendererComponent as al, AXConversationVoiceFileTypeProvider as am, AXConversationVoiceRecorderComponent as an, AXConversationVoiceRendererComponent as ao, AX_CONVERSATION_AUDIO_CATALOG as ap, AX_CONVERSATION_AUDIO_PRESENTATION as aq, AX_CONVERSATION_AUDIO_RENDERER as ar, AX_CONVERSATION_BUILTIN_COMPOSER_TABS as as, AX_CONVERSATION_COMPOSER_AUDIO_ACTION as at, AX_CONVERSATION_COMPOSER_EMOJI_ACTION as au, AX_CONVERSATION_COMPOSER_EMOJI_TAB as av, AX_CONVERSATION_COMPOSER_FILE_ACTION as aw, AX_CONVERSATION_COMPOSER_IMAGE_ACTION as ax, AX_CONVERSATION_COMPOSER_LOCATION_ACTION as ay, AX_CONVERSATION_COMPOSER_STICKER_TAB as az, AXConversationAudioAttachmentComponent as b, copyWithFileTypeFallback as b$, AX_CONVERSATION_IMAGE_PRESENTATION as b0, AX_CONVERSATION_IMAGE_RENDERER as b1, AX_CONVERSATION_INFO_BAR_ARCHIVE_ACTION as b2, AX_CONVERSATION_INFO_BAR_BLOCK_ACTION as b3, AX_CONVERSATION_INFO_BAR_DELETE_ACTION as b4, AX_CONVERSATION_INFO_BAR_DIVIDER as b5, AX_CONVERSATION_INFO_BAR_MUTE_ACTION as b6, AX_CONVERSATION_INFO_BAR_SEARCH_ACTION as b7, AX_CONVERSATION_ITEM_BLOCK_ACTION as b8, AX_CONVERSATION_ITEM_DELETE_ACTION as b9, AX_CONVERSATION_TEXT_RENDERER as bA, AX_CONVERSATION_URL_ERRORS as bB, AX_CONVERSATION_USER_AVATAR_COMPONENT as bC, AX_CONVERSATION_USER_ERRORS as bD, AX_CONVERSATION_VIDEO_CATALOG as bE, AX_CONVERSATION_VIDEO_PRESENTATION as bF, AX_CONVERSATION_VIDEO_RENDERER as bG, AX_CONVERSATION_VOICE_CATALOG as bH, AX_CONVERSATION_VOICE_PRESENTATION as bI, AX_CONVERSATION_VOICE_RENDERER as bJ, AX_DEFAULT_CONVERSATION_CONFIG as bK, abortPickerUploads as bL, applyAudioLocalPreview as bM, applyFileLocalPreview as bN, applyLocalPreview as bO, applyVideoLocalPreview as bP, applyVoiceLocalPreview as bQ, audioItemFromUpload as bR, bindMediaRendererContentState as bS, buildMediaGalleryTiles as bT, canShowRendererContentError as bU, cleanupPickerUploads as bV, conversationAudioUtilities as bW, conversationFileUtilities as bX, conversationImageUtilities as bY, conversationVideoUtilities as bZ, conversationVoiceUtilities as b_, AX_CONVERSATION_ITEM_DIVIDER as ba, AX_CONVERSATION_ITEM_MARK_READ_ACTION as bb, AX_CONVERSATION_ITEM_MUTE_ACTION as bc, AX_CONVERSATION_ITEM_PIN_ACTION as bd, AX_CONVERSATION_JUMBO_EMOJI_MAX as be, AX_CONVERSATION_LOCATION_ERRORS as bf, AX_CONVERSATION_LOCATION_RENDERER as bg, AX_CONVERSATION_MESSAGE_DELETE_ACTION as bh, AX_CONVERSATION_MESSAGE_EDIT_ACTION as bi, AX_CONVERSATION_MESSAGE_ERRORS as bj, AX_CONVERSATION_MESSAGE_FORWARD_ACTION as bk, AX_CONVERSATION_MESSAGE_LIST_BACKGROUND_PRESETS as bl, AX_CONVERSATION_MESSAGE_REPLY_ACTION as bm, AX_CONVERSATION_MESSAGE_TYPE_FILE_TYPE as bn, AX_CONVERSATION_PEER_AVATAR_TYPES as bo, AX_CONVERSATION_REGISTRY_CONFIG as bp, AX_CONVERSATION_STICKER_API_KEY as bq, AX_CONVERSATION_STICKER_RENDERER as br, AX_CONVERSATION_SYSTEM_RENDERER as bs, AX_CONVERSATION_TAB_ALL as bt, AX_CONVERSATION_TAB_ARCHIVED as bu, AX_CONVERSATION_TAB_BOT as bv, AX_CONVERSATION_TAB_CHANNELS as bw, AX_CONVERSATION_TAB_GROUPS as bx, AX_CONVERSATION_TAB_PRIVATE as by, AX_CONVERSATION_TAB_UNREAD as bz, AXConversationAudioFileTypeProvider as c, mergeWithDefaults as c$, countLoneEmojis as c0, createConversationAudioFileType as c1, createConversationFileFileType as c2, createConversationImageFileType as c3, createConversationVideoFileType as c4, createConversationVoiceFileType as c5, createLocalPreviewUrl as c6, createObjectUrl as c7, createPickerDragHandlers as c8, createPickerUploadItemId as c9, inferFileExtensionHintFromMessage as cA, isAttachmentListCategory as cB, isComposerTabEnabled as cC, isConversationReactionsEnabled as cD, isConversationRoomCreator as cE, isGenericPrivateConversationTitle as cF, isGridMediaCategory as cG, isGroupLikeConversation as cH, isJumboEmojiText as cI, isJumboEmojiTextMessage as cJ, isMessageDeliveryPending as cK, isMessageListThemeBackground as cL, isMessageVisibleAfterHistoryCutoff as cM, isNonPersistableMediaUrl as cN, isPickerItemReadyToSend as cO, isPlainChromeMessage as cP, isSameMessageListBackground as cQ, isUploadAborted as cR, limitFilesToCapacity as cS, listTextGraphemes as cT, mediaCopyText as cU, mergeAudioUploadResult as cV, mergeFileUploadResult as cW, mergeInfoPanelMessages as cX, mergeUploadResult as cY, mergeVideoUploadResult as cZ, mergeVoiceUploadResult as c_, createResolvedMediaUrlSignal as ca, deleteUploadedPickerMedia as cb, dismissComposerPickerHost as cc, ensureConversationFileCatalogRegistered as cd, fetchConversationMediaPage as ce, fileItemAsAudioMedia as cf, fileItemFromUpload as cg, filesFromClipboardEvent as ch, filterMessagesByMediaCategory as ci, filterSupplementalInfoPanelMessages as cj, findExistingPrivateConversation as ck, formatDuration as cl, formatErrorMessage as cm, formatFileByteSize as cn, formatFileSize as co, formatMediaDuration as cp, formatPickerValidationMessage as cq, getActiveComposerPickerPasteHandler as cr, getConversationMediaCategories as cs, getConversationProfileFields as ct, getErrorMessage as cu, getMessageAudioItems as cv, getMessageVideoItems as cw, getPickerCancelUploadLabel as cx, getPrivatePeerParticipant as cy, hasRegistryComponent as cz, AXConversationAudioPickerComponent as d, messageContainsLink as d0, normalizeAudioPayload as d1, normalizeFilePayload as d2, normalizeImagePayload as d3, normalizeMessageListBackgroundValue as d4, normalizeVideoPayload as d5, notifyMaxFilesCapacityExceeded as d6, notifyPickerValidationErrors as d7, openWithFileType as d8, pickDisplayMediaUrl as d9, resolvePersistedThumbnailUrl as dA, resolvePrivatePeerParticipant as dB, resolvePrivatePeerUserId as dC, resolveUserAvatarDisplay as dD, resolveVideoThumbnailUrl as dE, revokeObjectUrl as dF, revokePickerBlobPreviews as dG, sanitizeInput as dH, shouldUseUserAvatarForConversation as dI, sortUsersForForward as dJ, syncPlaybackInfoBarBanner as dK, toUploaderReference$1 as dL, toUploaderReference as dM, uploadPickerFile as dN, usesDefaultMessageListWallpaper as dO, validateConversationId as dP, validateEmail as dQ, validateLatitude as dR, validateLongitude as dS, validateMessagePayload as dT, validateMessageText as dU, validateMessageType as dV, validateUrl as dW, validateUserId as dX, validateUserIds as dY, videoItemFromUpload as dZ, pickEarliestJoinedParticipant as da, pickerItemToMediaReference as db, pickerItemToUploadResult as dc, probeImageDimensions as dd, probeVideoMedia as de, provideConversation as df, provideConversationComposerFileTypes as dg, provideConversationFileCatalog as dh, registerComposerPickerPasteHandler as di, reportMediaLoadError as dj, resolveComposerMaxFiles as dk, resolveConversationAvatarDisplay as dl, resolveConversationComposerTabs as dm, resolveConversationForViewer as dn, resolveConversationMessageFileType as dp, resolveConversationPeerParticipant as dq, resolveConversationPeerUserId as dr, resolveConversationTitleForViewer as ds, resolveGalleryImageUrl as dt, resolveImageDisplayUrl as du, resolveMessageChrome as dv, resolveMessageListBackgroundRaw as dw, resolveMessageListBackgroundStyle as dx, resolveParticipantProfile as dy, resolvePersistableMediaUrl as dz, AXConversationAudioRendererComponent as e, AXConversationAvatarComponent as f, AXConversationAvatarPickerComponent as g, AXConversationBaseRegistry as h, isValidPickerFileName as i, AXConversationComposerActionRegistry as j, AXConversationComposerComponent as k, AXConversationComposerFileTypesProvider as l, AXConversationComposerGenerationStateService as m, AXConversationComposerPopupComponent as n, AXConversationComposerService as o, AXConversationComposerTabRegistry as p, AXConversationContainerComponent as q, AXConversationContainerDirective as r, AXConversationDateUtilsService as s, AXConversationDeleteDialogComponent as t, AXConversationEmojiTabComponent as u, AXConversationErrorHandlerService as v, AXConversationFallbackRendererComponent as w, AXConversationFileAttachmentComponent as x, AXConversationFileFileTypeProvider as y, AXConversationFilePickerComponent as z };
|
|
19058
|
-
//# sourceMappingURL=acorex-components-conversation-acorex-components-conversation-
|
|
19099
|
+
//# sourceMappingURL=acorex-components-conversation-acorex-components-conversation-BBWe3tfe.mjs.map
|