botframework-webchat 4.15.1 → 4.15.2-main.20220413.af6e8a3
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/lib/FullComposer.d.ts.map +1 -1
- package/lib/FullComposer.js +3 -3
- package/lib/FullReactWebChat.js +2 -2
- package/lib/adaptiveCards/Attachment/AdaptiveCardAttachment.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardAttachment.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardAttachment.js +3 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardBuilder.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardBuilder.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardBuilder.js +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardContent.js +2 -2
- package/lib/adaptiveCards/Attachment/AdaptiveCardRenderer.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardRenderer.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/AdaptiveCardRenderer.js +1 -1
- package/lib/adaptiveCards/Attachment/AnimationCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/AnimationCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/AnimationCardContent.js +3 -1
- package/lib/adaptiveCards/Attachment/AudioCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/AudioCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/AudioCardContent.js +3 -1
- package/lib/adaptiveCards/Attachment/HeroCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/HeroCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/HeroCardContent.js +4 -2
- package/lib/adaptiveCards/Attachment/OAuthCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/OAuthCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/OAuthCardContent.js +3 -1
- package/lib/adaptiveCards/Attachment/ReceiptCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/ReceiptCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/ReceiptCardContent.js +3 -1
- package/lib/adaptiveCards/Attachment/SignInCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/SignInCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/SignInCardContent.js +1 -1
- package/lib/adaptiveCards/Attachment/ThumbnailCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/ThumbnailCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/ThumbnailCardContent.js +3 -1
- package/lib/adaptiveCards/Attachment/VideoCardContent.d.ts +1 -1
- package/lib/adaptiveCards/Attachment/VideoCardContent.d.ts.map +1 -1
- package/lib/adaptiveCards/Attachment/VideoCardContent.js +5 -3
- package/lib/adaptiveCards/Styles/adaptiveCardHostConfig.js +2 -2
- package/lib/adaptiveCards/Styles/createAdaptiveCardsStyleSet.js +2 -2
- package/lib/adaptiveCards/normalizeStyleOptions.js +2 -2
- package/lib/addVersion.js +2 -2
- package/lib/createDirectLineSpeechAdapters.d.ts +1 -1
- package/lib/createDirectLineSpeechAdapters.d.ts.map +1 -1
- package/lib/createDirectLineSpeechAdapters.js +1 -1
- package/lib/createFullStyleSet.d.ts +1 -1
- package/lib/createFullStyleSet.js +2 -2
- package/lib/fullBundleDefaultStyleOptions.js +2 -2
- package/lib/index-es5.js +2 -2
- package/lib/index-minimal.js +2 -2
- package/lib/index.d.ts +20 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/speech/bytesPerSample.d.ts.map +1 -1
- package/lib/speech/bytesPerSample.js +3 -1
- package/lib/speech/createMicrophoneAudioConfigAndAudioContext.d.ts.map +1 -1
- package/lib/speech/createMicrophoneAudioConfigAndAudioContext.js +3 -1
- package/lib/speech/getUserMedia.d.ts.map +1 -1
- package/lib/speech/getUserMedia.js +5 -2
- package/package.json +38 -31
- package/src/FullComposer.tsx +2 -0
- package/src/adaptiveCards/Attachment/AdaptiveCardAttachment.tsx +3 -1
- package/src/adaptiveCards/Attachment/AdaptiveCardBuilder.ts +2 -1
- package/src/adaptiveCards/Attachment/AdaptiveCardRenderer.tsx +1 -1
- package/src/adaptiveCards/Attachment/AnimationCardContent.tsx +3 -1
- package/src/adaptiveCards/Attachment/AudioCardContent.tsx +3 -1
- package/src/adaptiveCards/Attachment/HeroCardContent.tsx +4 -2
- package/src/adaptiveCards/Attachment/OAuthCardContent.tsx +3 -1
- package/src/adaptiveCards/Attachment/ReceiptCardContent.tsx +28 -48
- package/src/adaptiveCards/Attachment/SignInCardContent.tsx +1 -1
- package/src/adaptiveCards/Attachment/ThumbnailCardContent.tsx +3 -1
- package/src/adaptiveCards/Attachment/VideoCardContent.tsx +5 -3
- package/src/createDirectLineSpeechAdapters.ts +1 -1
- package/src/speech/bytesPerSample.ts +2 -0
- package/src/speech/createMicrophoneAudioConfigAndAudioContext.ts +2 -0
- package/src/speech/getUserMedia.ts +4 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DirectLineSignInCard } from 'botframework-webchat-core';
|
|
2
1
|
import { hooks } from 'botframework-webchat-component';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import React, { FC } from 'react';
|
|
4
|
+
import type { DirectLineSignInCard } from 'botframework-webchat-core';
|
|
5
5
|
|
|
6
6
|
import CommonCard from './CommonCard';
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint no-magic-numbers: ["error", { "ignore": [25, 75] }] */
|
|
2
2
|
|
|
3
|
-
import { DirectLineThumbnailCard } from 'botframework-webchat-core';
|
|
4
3
|
import { hooks } from 'botframework-webchat-component';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import React, { FC, useMemo } from 'react';
|
|
6
|
+
import type { DirectLineThumbnailCard } from 'botframework-webchat-core';
|
|
7
7
|
|
|
8
8
|
import AdaptiveCardBuilder from './AdaptiveCardBuilder';
|
|
9
9
|
import AdaptiveCardRenderer from './AdaptiveCardRenderer';
|
|
@@ -68,6 +68,8 @@ ThumbnailCardContent.defaultProps = {
|
|
|
68
68
|
|
|
69
69
|
ThumbnailCardContent.propTypes = {
|
|
70
70
|
actionPerformedClassName: PropTypes.string,
|
|
71
|
+
// PropTypes cannot fully capture TypeScript types.
|
|
72
|
+
// @ts-ignore
|
|
71
73
|
content: PropTypes.shape({
|
|
72
74
|
buttons: PropTypes.array,
|
|
73
75
|
images: PropTypes.arrayOf(
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint react/no-array-index-key: "off" */
|
|
2
2
|
|
|
3
|
-
import { DirectLineVideoCard } from 'botframework-webchat-core';
|
|
4
3
|
import { Components, hooks } from 'botframework-webchat-component';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
6
5
|
import React, { FC } from 'react';
|
|
6
|
+
import type { DirectLineVideoCard } from 'botframework-webchat-core';
|
|
7
7
|
|
|
8
8
|
import CommonCard from './CommonCard';
|
|
9
9
|
|
|
@@ -46,6 +46,8 @@ VideoCardContent.defaultProps = {
|
|
|
46
46
|
|
|
47
47
|
VideoCardContent.propTypes = {
|
|
48
48
|
actionPerformedClassName: PropTypes.string,
|
|
49
|
+
// PropTypes cannot fully capture TypeScript types.
|
|
50
|
+
// @ts-ignore
|
|
49
51
|
content: PropTypes.shape({
|
|
50
52
|
autoloop: PropTypes.bool,
|
|
51
53
|
autostart: PropTypes.bool,
|
|
@@ -54,10 +56,10 @@ VideoCardContent.propTypes = {
|
|
|
54
56
|
}),
|
|
55
57
|
media: PropTypes.arrayOf(
|
|
56
58
|
PropTypes.shape({
|
|
57
|
-
profile: PropTypes.string
|
|
59
|
+
profile: PropTypes.string,
|
|
58
60
|
url: PropTypes.string.isRequired
|
|
59
61
|
})
|
|
60
|
-
)
|
|
62
|
+
).isRequired
|
|
61
63
|
}).isRequired,
|
|
62
64
|
disabled: PropTypes.bool
|
|
63
65
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AudioConfig } from 'microsoft-cognitiveservices-speech-sdk';
|
|
2
2
|
import { createAdapters } from 'botframework-directlinespeech-sdk';
|
|
3
|
-
import { DirectLineJSBotConnection } from 'botframework-webchat-core';
|
|
4
3
|
import { WebSpeechPonyfill } from 'botframework-webchat-api';
|
|
4
|
+
import type { DirectLineJSBotConnection } from 'botframework-webchat-core';
|
|
5
5
|
|
|
6
6
|
import CognitiveServicesAudioOutputFormat from './types/CognitiveServicesAudioOutputFormat';
|
|
7
7
|
import CognitiveServicesCredentials from './types/CognitiveServicesCredentials';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export default function bytesPerSample(settings: MediaTrackSettings) {
|
|
2
|
+
// `channelCount` is not on @types/web@0.0.54 yet, related to https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1290.
|
|
3
|
+
// @ts-ignore
|
|
2
4
|
// eslint-disable-next-line no-magic-numbers
|
|
3
5
|
return ((settings.sampleSize as number) >> 3) * (settings.channelCount as number) * (settings.sampleRate as number);
|
|
4
6
|
}
|
|
@@ -22,6 +22,8 @@ const PCM_RECORDER_HARDCODED_SETTINGS: MediaTrackSettings = Object.freeze({
|
|
|
22
22
|
|
|
23
23
|
const PCM_RECORDER_HARDCODED_FORMAT: Format = Object.freeze({
|
|
24
24
|
bitsPerSample: PCM_RECORDER_HARDCODED_SETTINGS.sampleSize,
|
|
25
|
+
// `channelCount` is not on @types/web@0.0.54 yet, related to https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1290.
|
|
26
|
+
// @ts-ignore
|
|
25
27
|
channels: PCM_RECORDER_HARDCODED_SETTINGS.channelCount,
|
|
26
28
|
samplesPerSec: PCM_RECORDER_HARDCODED_SETTINGS.sampleRate
|
|
27
29
|
});
|
|
@@ -5,8 +5,11 @@ export default function getUserMedia(constraints: MediaStreamConstraints): Promi
|
|
|
5
5
|
return navigator.mediaDevices.getUserMedia(constraints);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
//
|
|
8
|
+
// We are intentionally using the deprecated `navigator.getUserMedia` to make sure backward compatibility.
|
|
9
|
+
// @ts-ignore
|
|
9
10
|
if (typeof navigator.getUserMedia !== 'undefined') {
|
|
11
|
+
// We are intentionally using the deprecated `navigator.getUserMedia` to make sure backward compatibility.
|
|
12
|
+
// @ts-ignore
|
|
10
13
|
return new Promise((resolve, reject) => navigator.getUserMedia(constraints, resolve, reject));
|
|
11
14
|
}
|
|
12
15
|
|