@azure/communication-react 1.11.0-alpha-202312130012 → 1.11.0-alpha-202312150013
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 +200 -1
- package/dist/dist-cjs/communication-react/index.js +468 -56
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetry.js +2 -2
- package/dist/dist-esm/acs-ui-common/src/telemetry.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/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +2 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +39 -26
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/DeviceManagerDeclarative.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +4 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.d.ts +64 -0
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.js +54 -0
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js +39 -0
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Survey/SurveyTypes.d.ts +141 -0
- package/dist/dist-esm/react-components/src/components/Survey/SurveyTypes.js +4 -0
- package/dist/dist-esm/react-components/src/components/Survey/SurveyTypes.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.d.ts +59 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +81 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.d.ts +14 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js +30 -0
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/index.d.ts +5 -0
- package/dist/dist-esm/react-components/src/components/index.js +6 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +13 -9
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +2 -0
- package/dist/dist-esm/react-components/src/theming/icons.js +7 -1
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-components/src/types/SurveyIssues.d.ts +45 -0
- package/dist/dist-esm/react-components/src/types/SurveyIssues.js +4 -0
- package/dist/dist-esm/react-components/src/types/SurveyIssues.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.d.ts +11 -0
- package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js +4 -0
- package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js.map +1 -0
- package/dist/dist-esm/react-components/src/types/index.d.ts +2 -0
- package/dist/dist-esm/react-components/src/types/index.js +2 -0
- package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +33 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +17 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +61 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +11 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +12 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +33 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +33 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +6 -0
- 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 +7 -0
- 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/CallWithChatBackedCallAdapter.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +2 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js +29 -0
- package/dist/dist-esm/react-composites/src/composites/common/StarSurvey.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.d.ts +7 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js +23 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPaneContent.d.ts +10 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPaneContent.js +106 -0
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPaneContent.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.d.ts +8 -0
- package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +22 -0
- package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +59 -0
- package/package.json +1 -1
@@ -0,0 +1,106 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import React from 'react';
|
4
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
5
|
+
import { StarSurvey } from './StarSurvey';
|
6
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
7
|
+
import { TagsSurvey } from './TagsSurvey';
|
8
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
9
|
+
import { useState } from 'react';
|
10
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
11
|
+
import { PrimaryButton, Stack } from '@fluentui/react';
|
12
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
13
|
+
import { useLocale } from '../localization';
|
14
|
+
/**
|
15
|
+
* @private
|
16
|
+
*/
|
17
|
+
export const SurveyPaneContent = (
|
18
|
+
/* @conditional-compile-remove(end-of-call-survey) */ props) => {
|
19
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
20
|
+
const [showTagsSurvey, setShowTagsSurvey] = useState(false);
|
21
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
22
|
+
const [ratings, setRatings] = useState(0);
|
23
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
24
|
+
const [issuesSelected, setIssuesSelected] = useState();
|
25
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
26
|
+
const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);
|
27
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
28
|
+
const strings = useLocale().strings.call;
|
29
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
30
|
+
const onStarRatingSelected = (ratings) => {
|
31
|
+
if (ratings <= 3) {
|
32
|
+
setShowTagsSurvey(true);
|
33
|
+
}
|
34
|
+
else {
|
35
|
+
setShowSubmitFeedbackButton(true);
|
36
|
+
}
|
37
|
+
setRatings(ratings);
|
38
|
+
};
|
39
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
40
|
+
const onIssuesSelected = (selectedTags) => {
|
41
|
+
setIssuesSelected(selectedTags);
|
42
|
+
setShowSubmitFeedbackButton(true);
|
43
|
+
};
|
44
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
45
|
+
const issues = [
|
46
|
+
'NoLocalAudio',
|
47
|
+
'NoRemoteAudio',
|
48
|
+
'Echo',
|
49
|
+
'AudioNoise',
|
50
|
+
'LowVolume',
|
51
|
+
'AudioStoppedUnexpectedly',
|
52
|
+
'DistortedSpeech',
|
53
|
+
'AudioInterruption',
|
54
|
+
'OtherIssues',
|
55
|
+
'NoContentLocal',
|
56
|
+
'NoContentRemote',
|
57
|
+
'CannotPresent',
|
58
|
+
'LowQuality',
|
59
|
+
'Freezes',
|
60
|
+
'StoppedUnexpectedly',
|
61
|
+
'LargeDelay',
|
62
|
+
'NoVideoReceived',
|
63
|
+
'NoVideoSent',
|
64
|
+
'LowQuality',
|
65
|
+
'Freezes',
|
66
|
+
'StoppedUnexpectedly',
|
67
|
+
'DarkVideoReceived',
|
68
|
+
'AudioVideoOutOfSync',
|
69
|
+
'CallCannotJoin',
|
70
|
+
'CallCannotInvite',
|
71
|
+
'HadToRejoin',
|
72
|
+
'CallEndedUnexpectedly'
|
73
|
+
];
|
74
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
75
|
+
return (React.createElement(Stack, { verticalAlign: "space-between" },
|
76
|
+
React.createElement(Stack, null,
|
77
|
+
React.createElement(StarSurvey, { onStarRatingSelected: onStarRatingSelected }),
|
78
|
+
showTagsSurvey && React.createElement(TagsSurvey, { issues: issues, onConfirm: onIssuesSelected })),
|
79
|
+
showSubmitFeedbackButton && (React.createElement(Stack, { style: { borderTop: 'solid', borderTopColor: 'lightgrey' }, horizontalAlign: "end" },
|
80
|
+
React.createElement(PrimaryButton, { style: { marginTop: '2rem' }, onClick: () => {
|
81
|
+
const surveyResults = { overallRating: { score: ratings } };
|
82
|
+
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.overallRating) {
|
83
|
+
surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };
|
84
|
+
}
|
85
|
+
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.audioRating) {
|
86
|
+
surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };
|
87
|
+
}
|
88
|
+
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.screenshareRating) {
|
89
|
+
surveyResults.screenshareRating = { score: ratings, issues: issuesSelected.screenshareRating.issues };
|
90
|
+
}
|
91
|
+
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.videoRating) {
|
92
|
+
surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };
|
93
|
+
}
|
94
|
+
if (props.onSubmitSurvey) {
|
95
|
+
props
|
96
|
+
.onSubmitSurvey(surveyResults)
|
97
|
+
.then(() => console.log('survey submitted successfully', surveyResults))
|
98
|
+
.catch((e) => console.log('error when submitting survey: ' + e));
|
99
|
+
}
|
100
|
+
if (props.onDismissSidePane) {
|
101
|
+
props.onDismissSidePane();
|
102
|
+
}
|
103
|
+
} }, strings.surveyConfirmButtonLabel)))));
|
104
|
+
return React.createElement(React.Fragment, null);
|
105
|
+
};
|
106
|
+
//# sourceMappingURL=SurveyPaneContent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SurveyPaneContent.js","sourceRoot":"","sources":["../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,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { StarSurvey } from './StarSurvey';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { TagsSurvey } from './TagsSurvey';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _AudioIssue, _OverallIssue, _ScreenshareIssue, _VideoIssue } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { PrimaryButton, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n\n/**\n * @private\n */\nexport const SurveyPaneContent = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey) */\n onDismissSidePane?: () => void;\n }\n): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showTagsSurvey, setShowTagsSurvey] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [ratings, setRatings] = useState(0);\n /* @conditional-compile-remove(end-of-call-survey) */\n const [issuesSelected, setIssuesSelected] = useState<CallSurvey | undefined>();\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const onStarRatingSelected = (ratings: number): void => {\n if (ratings <= 3) {\n setShowTagsSurvey(true);\n } else {\n setShowSubmitFeedbackButton(true);\n }\n setRatings(ratings);\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n const onIssuesSelected = (selectedTags: CallSurvey): void => {\n setIssuesSelected(selectedTags);\n setShowSubmitFeedbackButton(true);\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n const issues: (_AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue)[] = [\n 'NoLocalAudio',\n 'NoRemoteAudio',\n 'Echo',\n 'AudioNoise',\n 'LowVolume',\n 'AudioStoppedUnexpectedly',\n 'DistortedSpeech',\n 'AudioInterruption',\n 'OtherIssues',\n 'NoContentLocal',\n 'NoContentRemote',\n 'CannotPresent',\n 'LowQuality',\n 'Freezes',\n 'StoppedUnexpectedly',\n 'LargeDelay',\n 'NoVideoReceived',\n 'NoVideoSent',\n 'LowQuality',\n 'Freezes',\n 'StoppedUnexpectedly',\n 'DarkVideoReceived',\n 'AudioVideoOutOfSync',\n 'CallCannotJoin',\n 'CallCannotInvite',\n 'HadToRejoin',\n 'CallEndedUnexpectedly'\n ];\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <Stack verticalAlign=\"space-between\">\n <Stack>\n <StarSurvey onStarRatingSelected={onStarRatingSelected} />\n\n {showTagsSurvey && <TagsSurvey issues={issues} onConfirm={onIssuesSelected} />}\n </Stack>\n {showSubmitFeedbackButton && (\n <Stack style={{ borderTop: 'solid', borderTopColor: 'lightgrey' }} horizontalAlign=\"end\">\n <PrimaryButton\n style={{ marginTop: '2rem' }}\n onClick={() => {\n const surveyResults: CallSurvey = { overallRating: { score: ratings } };\n if (issuesSelected?.overallRating) {\n surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };\n }\n if (issuesSelected?.audioRating) {\n surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };\n }\n if (issuesSelected?.screenshareRating) {\n surveyResults.screenshareRating = { score: ratings, issues: issuesSelected.screenshareRating.issues };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (props.onSubmitSurvey) {\n props\n .onSubmitSurvey(surveyResults)\n .then(() => console.log('survey submitted successfully', surveyResults))\n .catch((e) => console.log('error when submitting survey: ' + e));\n }\n if (props.onDismissSidePane) {\n props.onDismissSidePane();\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n </Stack>\n )}\n </Stack>\n );\n\n return <></>;\n};\n"]}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { _AudioIssue, _OverallIssue, _ScreenshareIssue, _VideoIssue, _CallSurvey } from "../../../../react-components/src";
|
3
|
+
/** @private */
|
4
|
+
export declare const TagsSurvey: (props: {
|
5
|
+
issues: (_AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue)[];
|
6
|
+
onConfirm?: ((survey: _CallSurvey) => void) | undefined;
|
7
|
+
}) => JSX.Element;
|
8
|
+
//# sourceMappingURL=TagsSurvey.d.ts.map
|
@@ -0,0 +1,22 @@
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
2
|
+
// Licensed under the MIT License.
|
3
|
+
import React from 'react';
|
4
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
5
|
+
import { _TagsSurvey } from "../../../../react-components/src";
|
6
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
7
|
+
import { useLocale } from '../localization';
|
8
|
+
/** @private */
|
9
|
+
export const TagsSurvey = (
|
10
|
+
/* @conditional-compile-remove(end-of-call-survey) */ props) => {
|
11
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
12
|
+
const strings = useLocale().strings.call;
|
13
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
14
|
+
const tagsSurveyStrings = {
|
15
|
+
tagsSurveyQuestion: strings.tagsSurveyQuestion,
|
16
|
+
tagsSurveyHelperText: strings.tagsSurveyHelperText
|
17
|
+
};
|
18
|
+
/* @conditional-compile-remove(end-of-call-survey) */
|
19
|
+
return (React.createElement(_TagsSurvey, { callIssuesToTag: strings.surveyIssues, categoryHeadings: strings.SurveyIssuesHeadingStrings, issues: props.issues, onConfirm: props.onConfirm, strings: tagsSurveyStrings }));
|
20
|
+
return React.createElement(React.Fragment, null);
|
21
|
+
};
|
22
|
+
//# sourceMappingURL=TagsSurvey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TagsSurvey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/TagsSurvey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EACL,WAAW,EAOZ,yCAAmC;AAGpC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG;AACxB,qDAAqD,CAAC,KAKrD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,qDAAqD;IACrD,MAAM,iBAAiB,GAAuB;QAC5C,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;KACnD,CAAC;IAEF,qDAAqD;IACrD,OAAO,CACL,oBAAC,WAAW,IACV,eAAe,EAAE,OAAO,CAAC,YAAY,EACrC,gBAAgB,EAAE,OAAO,CAAC,0BAA0B,EACpD,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,SAAS,EAAE,KAAK,CAAC,SAAS,EAC1B,OAAO,EAAE,iBAAiB,GAC1B,CACH,CAAC;IAEF,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport {\n _TagsSurvey,\n _TagsSurveyStrings,\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n _CallSurvey\n} from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _captionSettingsSelector } from '@internal/calling-component-bindings';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n\n/** @private */\nexport const TagsSurvey = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n issues: (_AudioIssue | _OverallIssue | _ScreenshareIssue | _VideoIssue)[];\n /* @conditional-compile-remove(end-of-call-survey) */\n onConfirm?: (survey: _CallSurvey) => void;\n }\n): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const tagsSurveyStrings: _TagsSurveyStrings = {\n tagsSurveyQuestion: strings.tagsSurveyQuestion,\n tagsSurveyHelperText: strings.tagsSurveyHelperText\n };\n\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <_TagsSurvey\n callIssuesToTag={strings.surveyIssues}\n categoryHeadings={strings.SurveyIssuesHeadingStrings}\n issues={props.issues}\n onConfirm={props.onConfirm}\n strings={tagsSurveyStrings}\n />\n );\n\n return <></>;\n};\n"]}
|
@@ -142,6 +142,8 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
|
|
142
142
|
ContextMenuCameraIcon: React.JSX.Element;
|
143
143
|
ContextMenuMicIcon: React.JSX.Element;
|
144
144
|
ContextMenuSpeakerIcon: React.JSX.Element;
|
145
|
+
SurveyStarIcon: React.JSX.Element;
|
146
|
+
SurveyStarIconFilled: React.JSX.Element;
|
145
147
|
};
|
146
148
|
/** @private */
|
147
149
|
export type CompositeIconProps<Icons> = IIconProps & {
|
package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json
CHANGED
@@ -229,6 +229,65 @@
|
|
229
229
|
"lostDueToRoleChangeToAttendee": "Your role has been changed. Some actions, like sharing content, won't be available to you.",
|
230
230
|
"grantedDueToRoleChangeToPresenter": "You're a presenter. You can share content and facilitate the meeting."
|
231
231
|
}
|
232
|
+
},
|
233
|
+
"surveyQuestion": "How was your call today?",
|
234
|
+
"starSurveyHelperText": "How was the quality of the call?",
|
235
|
+
"starSurveyOneStarText": "The quality was bad.",
|
236
|
+
"starSurveyTwoStarText": "The quality was poor.",
|
237
|
+
"starSurveyThreeStarText": "The quality was good.",
|
238
|
+
"starSurveyFourStarText": "The quality was great.",
|
239
|
+
"starSurveyFiveStarText": "The quality was excellent.",
|
240
|
+
"surveyConfirmButtonLabel": "Send Feedback",
|
241
|
+
"starRatingAriaLabel": "Select {0} of {1} stars",
|
242
|
+
"surveyCancelButtonAriaLabel": "Cancel",
|
243
|
+
"tagsSurveyQuestion": "What could have been better?",
|
244
|
+
"tagsSurveyHelperText": "Check any issues you experienced",
|
245
|
+
"surveyTextboxDefaultText": "Other,please specify",
|
246
|
+
"surveyIssues": {
|
247
|
+
"overallRating": {
|
248
|
+
"callCannotJoin": "I could not join call",
|
249
|
+
"callCannotInvite": "I could not invite others into the call",
|
250
|
+
"hadToRejoin": "I had to rejoin the call",
|
251
|
+
"callEndedUnexpectedly": "Call ended for me unexpectedly",
|
252
|
+
"otherIssues": "I was having other issues with the call"
|
253
|
+
},
|
254
|
+
"audioRating": {
|
255
|
+
"noLocalAudio": "The other side could not hear any sound",
|
256
|
+
"noRemoteAudio": "I could not hear any sound",
|
257
|
+
"echo": "I heard echos on the call",
|
258
|
+
"audioNoise": "I heard noise on the call",
|
259
|
+
"lowVolume": "Volume was low",
|
260
|
+
"audioStoppedUnexpectedly": "Audio stopped unexpectedly",
|
261
|
+
"distortedSpeech": "Audio was distorted",
|
262
|
+
"audioInterruption": "Audio was interrupted",
|
263
|
+
"otherIssues": "I was having other audio issues in this call"
|
264
|
+
},
|
265
|
+
"videoRating": {
|
266
|
+
"noVideoReceived": "I could not see any video",
|
267
|
+
"noVideoSent": "Others could not see me",
|
268
|
+
"lowQuality": "Video quality was low",
|
269
|
+
"freezes": "Video frozen",
|
270
|
+
"stoppedUnexpectedly": "Video stopped unexpectedly",
|
271
|
+
"darkVideoReceived": "I can only see dark screens when others turn on their camera",
|
272
|
+
"audioVideoOutOfSync": "Audio and Video was out of sync",
|
273
|
+
"otherIssues": "I was having other video issues in this call"
|
274
|
+
},
|
275
|
+
"screenshareRating": {
|
276
|
+
"noContentLocal": "Other people could not see my screenshare",
|
277
|
+
"noContentRemote": "I could not see other people's screenshare",
|
278
|
+
"cannotPresent": "I could not present my screen",
|
279
|
+
"lowQuality": "Screen share quality was low",
|
280
|
+
"freezes": "Screen share frozen",
|
281
|
+
"stoppedUnexpectedly": "Screen share stopped unexpectedly",
|
282
|
+
"largeDelay": "Screen share has a large delay",
|
283
|
+
"otherIssues": "I was having other screen share issues in this call"
|
284
|
+
}
|
285
|
+
},
|
286
|
+
"SurveyIssuesHeadingStrings": {
|
287
|
+
"overallRating": "Overall",
|
288
|
+
"audioRating": "Audio",
|
289
|
+
"videoRating": "Video",
|
290
|
+
"screenshareRating": "Presenting"
|
232
291
|
}
|
233
292
|
},
|
234
293
|
"chat": {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.11.0-alpha-
|
3
|
+
"version": "1.11.0-alpha-202312150013",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|