@azure/communication-react 1.12.1-alpha-202401310012 → 1.12.1-alpha-202402010012
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/communication-react.d.ts +6 -10
- package/dist/dist-cjs/communication-react/index.js +20 -22
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.d.ts +0 -4
- package/dist/dist-esm/react-components/src/components/FileDownloadCards.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js +5 -3
- package/dist/dist-esm/react-components/src/components/styles/Dialpad.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js +5 -9
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/ChatAdapter.js.map +1 -1
- package/package.json +1 -1
@@ -247,10 +247,6 @@ export declare type AreTypeEqual<A, B> = A extends B ? (B extends A ? true : fal
|
|
247
247
|
* @beta
|
248
248
|
*/
|
249
249
|
export declare interface AttachmentDownloadResult {
|
250
|
-
/**
|
251
|
-
* Unique ID of the attachment.
|
252
|
-
*/
|
253
|
-
attachmentId: string;
|
254
250
|
/**
|
255
251
|
* Blob URL for the attachment.
|
256
252
|
*/
|
@@ -3087,9 +3083,9 @@ export declare interface CallWithChatAdapterManagement {
|
|
3087
3083
|
updateFileUploadErrorMessage: (id: string, errorMessage: string) => void;
|
3088
3084
|
/** @beta */
|
3089
3085
|
updateFileUploadMetadata: (id: string, metadata: AttachmentMetadata) => void;
|
3090
|
-
|
3091
|
-
|
3092
|
-
}) => Promise<AttachmentDownloadResult
|
3086
|
+
downloadAttachment: (options: {
|
3087
|
+
attachmentUrl: string;
|
3088
|
+
}) => Promise<AttachmentDownloadResult>;
|
3093
3089
|
/**
|
3094
3090
|
* Puts the Call in a Localhold.
|
3095
3091
|
*
|
@@ -4343,9 +4339,9 @@ export declare interface ChatAdapterThreadManagement {
|
|
4343
4339
|
*
|
4344
4340
|
*/
|
4345
4341
|
loadPreviousChatMessages(messagesToLoad: number): Promise<boolean>;
|
4346
|
-
|
4347
|
-
|
4348
|
-
}) => Promise<AttachmentDownloadResult
|
4342
|
+
downloadAttachment: (options: {
|
4343
|
+
attachmentUrl: string;
|
4344
|
+
}) => Promise<AttachmentDownloadResult>;
|
4349
4345
|
}
|
4350
4346
|
|
4351
4347
|
/**
|
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.12.1-alpha-
|
176
|
+
var telemetryVersion = '1.12.1-alpha-202402010012';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -18198,17 +18198,18 @@ const digitStyles = (theme) => {
|
|
18198
18198
|
/**
|
18199
18199
|
* @private
|
18200
18200
|
*/
|
18201
|
-
const textFieldStyles = (theme) => ({
|
18201
|
+
const textFieldStyles = (theme, buttonPresent) => ({
|
18202
18202
|
field: {
|
18203
18203
|
padding: 0,
|
18204
18204
|
textAlign: 'center',
|
18205
18205
|
fontSize: `${_pxToRem(18)}`,
|
18206
18206
|
fontWeight: 400,
|
18207
|
-
width: `${
|
18207
|
+
width: `${buttonPresent ? '10rem' : '12rem'}`,
|
18208
18208
|
height: '3rem',
|
18209
18209
|
borderRadius: '0.5rem',
|
18210
18210
|
position: 'relative',
|
18211
|
-
overflowX: '
|
18211
|
+
overflowX: 'hidden',
|
18212
|
+
textOverflow: 'clip'
|
18212
18213
|
},
|
18213
18214
|
root: {
|
18214
18215
|
backgroundColor: `${theme.palette.neutralLighter}`,
|
@@ -18219,6 +18220,7 @@ const textFieldStyles = (theme) => ({
|
|
18219
18220
|
fieldGroup: {
|
18220
18221
|
border: 'none',
|
18221
18222
|
borderRadius: '0.5rem',
|
18223
|
+
width: '12rem',
|
18222
18224
|
height: '3rem',
|
18223
18225
|
backgroundColor: `${theme.palette.neutralLighter}`,
|
18224
18226
|
':after': {
|
@@ -18533,7 +18535,7 @@ const DialpadContainer = (props) => {
|
|
18533
18535
|
setText(modifiedInput);
|
18534
18536
|
};
|
18535
18537
|
return (React.createElement(react.Stack, { className: react.mergeStyles(containerStyles$3(theme), (_a = props.styles) === null || _a === void 0 ? void 0 : _a.root), "data-test-id": "dialpadContainer", "data-ui-id": "dialpadContainer", horizontalAlign: 'center' },
|
18536
|
-
dialpadMode === 'dialer' && (React.createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
|
18538
|
+
dialpadMode === 'dialer' && (React.createElement(react.TextField, { styles: react.concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), (_b = props.styles) === null || _b === void 0 ? void 0 : _b.textField), value: textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue),
|
18537
18539
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
18538
18540
|
onChange: (e) => {
|
18539
18541
|
setText(e.target.value);
|
@@ -23378,7 +23380,7 @@ class AzureCommunicationChatAdapter {
|
|
23378
23380
|
/* @conditional-compile-remove(file-sharing) */
|
23379
23381
|
this.updateFileUploadMetadata = this.updateFileUploadMetadata.bind(this);
|
23380
23382
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
23381
|
-
this.
|
23383
|
+
this.downloadAttachment = this.downloadAttachment.bind(this);
|
23382
23384
|
}
|
23383
23385
|
dispose() {
|
23384
23386
|
this.unsubscribeAllEvents();
|
@@ -23520,7 +23522,7 @@ class AzureCommunicationChatAdapter {
|
|
23520
23522
|
this.fileUploadAdapter.updateFileUploadMetadata(id, metadata);
|
23521
23523
|
}
|
23522
23524
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
23523
|
-
|
23525
|
+
downloadAttachment(options) {
|
23524
23526
|
return __awaiter$l(this, void 0, void 0, function* () {
|
23525
23527
|
return this.asyncTeeErrorToEventEmitter(() => __awaiter$l(this, void 0, void 0, function* () {
|
23526
23528
|
if (this.credential === undefined) {
|
@@ -23549,13 +23551,9 @@ class AzureCommunicationChatAdapter {
|
|
23549
23551
|
}
|
23550
23552
|
});
|
23551
23553
|
}
|
23552
|
-
const
|
23553
|
-
|
23554
|
-
|
23555
|
-
const blob = yield response.blob();
|
23556
|
-
attachmentDownloadResults.push({ attachmentId: id, blobUrl: URL.createObjectURL(blob) });
|
23557
|
-
}
|
23558
|
-
return attachmentDownloadResults;
|
23554
|
+
const response = yield fetchWithAuthentication(options.attachmentUrl, accessToken);
|
23555
|
+
const blob = yield response.blob();
|
23556
|
+
return { blobUrl: URL.createObjectURL(blob) };
|
23559
23557
|
});
|
23560
23558
|
}
|
23561
23559
|
messageReceivedListener(event) {
|
@@ -24590,9 +24588,9 @@ const ChatScreen = (props) => {
|
|
24590
24588
|
}
|
24591
24589
|
if (attachment.attachmentType === 'inlineImage' && attachment.url) {
|
24592
24590
|
// TBD: Need to begin investigating how to download HQ images.
|
24593
|
-
const blob = yield adapter.
|
24594
|
-
if (blob
|
24595
|
-
const blobUrl = blob
|
24591
|
+
const blob = yield adapter.downloadAttachment({ attachmentUrl: attachment.url });
|
24592
|
+
if (blob) {
|
24593
|
+
const blobUrl = blob.blobUrl;
|
24596
24594
|
setFullSizeAttachments((prev) => (Object.assign(Object.assign({}, prev), { [attachment.id]: blobUrl })));
|
24597
24595
|
setGalleryImages([
|
24598
24596
|
Object.assign(Object.assign({}, galleryImage), { imageUrl: blobUrl })
|
@@ -34577,9 +34575,9 @@ class CallWithChatBackedChatAdapter {
|
|
34577
34575
|
this.callWithChatAdapter = callWithChatAdapter;
|
34578
34576
|
}
|
34579
34577
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
34580
|
-
|
34578
|
+
downloadAttachment(options) {
|
34581
34579
|
return __awaiter$3(this, void 0, void 0, function* () {
|
34582
|
-
return yield this.callWithChatAdapter.
|
34580
|
+
return yield this.callWithChatAdapter.downloadAttachment(options);
|
34583
34581
|
});
|
34584
34582
|
}
|
34585
34583
|
}
|
@@ -35227,7 +35225,7 @@ class AzureCommunicationCallWithChatAdapter {
|
|
35227
35225
|
/* @conditional-compile-remove(file-sharing) */
|
35228
35226
|
this.updateFileUploadMetadata = this.updateFileUploadMetadata.bind(this);
|
35229
35227
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
35230
|
-
this.
|
35228
|
+
this.downloadAttachment = this.downloadAttachment.bind(this);
|
35231
35229
|
/* @conditional-compile-remove(PSTN-calls) */
|
35232
35230
|
this.holdCall.bind(this);
|
35233
35231
|
/* @conditional-compile-remove(PSTN-calls) */
|
@@ -35478,9 +35476,9 @@ class AzureCommunicationCallWithChatAdapter {
|
|
35478
35476
|
});
|
35479
35477
|
}
|
35480
35478
|
/* @conditional-compile-remove(teams-inline-images-and-file-sharing) */
|
35481
|
-
|
35479
|
+
downloadAttachment(options) {
|
35482
35480
|
return __awaiter$2(this, void 0, void 0, function* () {
|
35483
|
-
return yield this.chatAdapter.
|
35481
|
+
return yield this.chatAdapter.downloadAttachment(options);
|
35484
35482
|
});
|
35485
35483
|
}
|
35486
35484
|
/* @conditional-compile-remove(PSTN-calls) */
|