@azure/communication-react 1.13.0-alpha-202402040013 → 1.13.0-alpha-202402060012
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 +114 -56
- package/dist/dist-cjs/communication-react/index.js +772 -645
- 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/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +3 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +2 -2
- package/dist/dist-esm/communication-react/src/index.js +2 -2
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +3 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js +3 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageContent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js +3 -3
- package/dist/dist-esm/react-components/src/components/ChatMessage/FluentChatMessageComponentWrapper.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ImageOverlay.d.ts +62 -0
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js +52 -0
- package/dist/dist-esm/react-components/src/components/ImageOverlay.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/MessageThread.js +2 -2
- package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js +4 -4
- package/dist/dist-esm/react-components/src/components/Survey/StarSurvey/StarSurvey.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js +3 -1
- package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js +56 -56
- package/dist/dist-esm/react-components/src/components/assets/RaisedHandIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/index.js +2 -2
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/{ImageGallery.style.d.ts → ImageOverlay.style.d.ts} +1 -1
- package/dist/dist-esm/react-components/src/components/styles/{ImageGallery.style.js → ImageOverlay.style.js} +7 -7
- package/dist/dist-esm/react-components/src/components/styles/{ImageGallery.style.js.map → ImageOverlay.style.js.map} +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -3
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +1 -1
- package/dist/dist-esm/react-components/src/theming/themes.d.ts +2 -2
- package/dist/dist-esm/react-components/src/theming/themes.js +2 -2
- package/dist/dist-esm/react-components/src/theming/themes.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +25 -22
- 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 +8 -4
- 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 +60 -8
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +113 -77
- 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 +13 -7
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.d.ts +0 -35
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js +1 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/NoticePage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.d.ts +56 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js +29 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/SurveyPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.d.ts +14 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js +27 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ThankYouForFeedbackPage.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +9 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +3 -2
- 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 +4 -2
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +9 -4
- 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 +6 -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/CallWithChatBackedCallAdapter.d.ts +4 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +9 -5
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +30 -34
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Survey.d.ts +20 -0
- package/dist/dist-esm/react-composites/src/composites/common/Survey.js +136 -0
- package/dist/dist-esm/react-composites/src/composites/common/Survey.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/{SurveyPaneContent.d.ts → SurveyContent.d.ts} +2 -2
- package/dist/dist-esm/react-composites/src/composites/common/{SurveyPaneContent.js → SurveyContent.js} +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/SurveyContent.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +3 -2
- package/package.json +1 -1
- package/dist/dist-esm/react-components/src/components/ImageGallery.d.ts +0 -71
- package/dist/dist-esm/react-components/src/components/ImageGallery.js +0 -53
- package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.d.ts +0 -13
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js +0 -87
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPane.js.map +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/SurveyPaneContent.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Survey.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/Survey.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,qDAAqD;AACrD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAS,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3F,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAGhD,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAGnD,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,qDAAqD;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,eAAe;AACf,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAqCtB,EAAe,EAAE;IAChB,qDAAqD;IACrD,MAAM,EACJ,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,QAAQ,EACR,KAAK,EACL,WAAW,EACX,sBAAsB,EACtB,QAAQ,EACT,GAAG,KAAK,CAAC;IACV,qDAAqD;IACrD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,qDAAqD;I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rB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,mCAAI,EAAE,EACjB,MAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,EAAE,mCAAI,EAAE,EACb,aAAa,EACb,sBAAsB,CACvB,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC,CAAC;gCAC/C,CAAC;qCAAM,CAAC;oCACN,kFAAkF;oCAClF,uBAAuB,CAAC,KAAK,CAAC,CAAC;gCACjC,CAAC;gCAED,yBAAyB;gCACzB,IAAI,cAAc,EAAE,CAAC;oCACnB,gEAAgE;oCAChE,cAAc,CAAC,MAAM,CAAC,CAAC;gCACzB,CAAC;qCAAM,CAAC;oCACN,wDAAwD;oCACxD,+BAA+B,CAAC,IAAI,CAAC,CAAC;gCACxC,CAAC;4BACH,CAAC,CAAC;iCACD,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;gCACX,2EAA2E;gCAC3E,OAAO,CAAC,GAAG,CAAC,gCAAgC,GAAG,CAAC,CAAC,CAAC;gCAClD,qHAAqH;gCACrH,IAAI,cAAc,EAAE,CAAC;oCACnB,cAAc,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;gCAC7B,CAAC;4BACH,CAAC,CAAC,CAAC;wBACP,CAAC;oBACH,CAAC,CAAA,IAEA,OAAO,CAAC,wBAAwB,CACnB,CACjB,CACK,CACF,CACT,CACA,CACJ,CAAC;IACF,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 { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Text, PrimaryButton, Stack, Theme, mergeStyles, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { SurveyContent } from './SurveyContent';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallCompositeIcons } from './icons';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { NoticePage } from '../CallComposite/pages/NoticePage';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { ThankYouForFeedbackPage } from '../CallComposite/pages/ThankYouForFeedbackPage';\n\n/** @private */\nexport const Survey = (props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n iconName?: keyof CallCompositeIcons;\n /* @conditional-compile-remove(end-of-call-survey) */\n title: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n moreDetails?: string;\n /* @conditional-compile-remove(end-of-call-survey) */\n disableStartCallButton?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n isMobile?: boolean;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey) */\n /**\n * Optional callback to redirect users to custom screens when survey is done, note that default end call screen will be shown if this callback is not provided\n * This callback can be used to redirect users to different screens depending on survey state, whether it is submitted, skipped or has a problem when submitting the survey\n */\n onSurveyClosed?: (surveyState: 'sent' | 'skipped' | 'error', surveyError?: string) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const {\n onSubmitSurvey,\n onSurveySubmittedCustom,\n onSurveyClosed,\n iconName,\n title,\n moreDetails,\n disableStartCallButton,\n isMobile\n } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\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 [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterSubmitScreen, setShowDefaultAfterSubmitScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [showDefaultAfterDismissedScreen, setShowDefaultAfterDismissedScreen] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const [submitButtonDisabled, setSubmitButtonDisabled] = useState<boolean>(false);\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const theme = useTheme();\n\n /* @conditional-compile-remove(end-of-call-survey) */\n const questionTextStyle = (theme: Theme): string =>\n mergeStyles({\n fontWeight: 600,\n fontSize: _pxToRem(20),\n lineHeight: _pxToRem(20),\n color: theme.palette.neutralPrimary\n });\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <>\n {showDefaultAfterSubmitScreen && <ThankYouForFeedbackPage iconName={iconName} />}\n {showDefaultAfterDismissedScreen && (\n <NoticePage\n iconName={iconName}\n title={title}\n moreDetails={moreDetails}\n dataUiId={'left-call-page'}\n disableStartCallButton={disableStartCallButton}\n />\n )}\n {!showDefaultAfterSubmitScreen && !showDefaultAfterDismissedScreen && (\n <Stack verticalAlign=\"center\" style={{ width: isMobile ? '20rem' : '24rem' }}>\n <Text className={questionTextStyle(theme)}>{strings.surveyTitle}</Text>\n <SurveyContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n <Stack horizontal horizontalAlign=\"end\">\n <PrimaryButton\n style={{ marginTop: '1rem', marginRight: '0.5rem' }}\n onClick={() => {\n if (onSurveyClosed) {\n onSurveyClosed('skipped');\n } else {\n setShowDefaultAfterDismissedScreen(true);\n }\n }}\n >\n {strings.surveySkipButtonLabel}\n </PrimaryButton>\n\n {showSubmitFeedbackButton && (\n <PrimaryButton\n disabled={submitButtonDisabled}\n style={{ marginTop: '1rem', marginLeft: '0.5rem' }}\n onClick={async () => {\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 = {\n score: ratings,\n issues: issuesSelected.screenshareRating.issues\n };\n }\n if (issuesSelected?.videoRating) {\n surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };\n }\n if (onSubmitSurvey) {\n // disable submit button while waiting for the survey to submit\n setSubmitButtonDisabled(true);\n // submitting survey results to calling\n onSubmitSurvey(surveyResults)\n .then((res) => {\n // if contoso provided callback to handle their own survey data, send over the submitted survey results\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n ).then(() => setSubmitButtonDisabled(false));\n } else {\n // if callback is not provided, enable the submit button after survey is submitted\n setSubmitButtonDisabled(false);\n }\n\n // redirect to new screen\n if (onSurveyClosed) {\n // redirect to new screen according to contoso's callback set up\n onSurveyClosed('sent');\n } else {\n // if call back not provided, redirect to default screen\n setShowDefaultAfterSubmitScreen(true);\n }\n })\n .catch((e) => {\n // if there is an error submitting the survey, log the error in the console\n console.log('error when submitting survey: ' + e);\n // if contoso provided redirect callback, pass contoso the error so they can redirect to a corresponding error screen\n if (onSurveyClosed) {\n onSurveyClosed('error', e);\n }\n });\n }\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n )}\n </Stack>\n </Stack>\n )}\n </>\n );\n return <></>;\n};\n"]}
|
@@ -4,10 +4,10 @@ import { CallSurvey } from '@azure/communication-calling';
|
|
4
4
|
/**
|
5
5
|
* @private
|
6
6
|
*/
|
7
|
-
export declare const
|
7
|
+
export declare const SurveyContent: (props: {
|
8
8
|
setShowSubmitFeedbackButton: (showButton: boolean) => void;
|
9
9
|
setRatings: (rating: number) => void;
|
10
10
|
setIssuesSelected: (issuesSelected: CallSurvey) => void;
|
11
11
|
setImprovementSuggestions?: ((improvementSuggestions: CallSurveyImprovementSuggestions) => void) | undefined;
|
12
12
|
}) => JSX.Element;
|
13
|
-
//# sourceMappingURL=
|
13
|
+
//# sourceMappingURL=SurveyContent.d.ts.map
|
@@ -12,13 +12,13 @@ import { Stack } from '@fluentui/react';
|
|
12
12
|
/**
|
13
13
|
* @private
|
14
14
|
*/
|
15
|
-
export const
|
15
|
+
export const SurveyContent = (
|
16
16
|
/* @conditional-compile-remove(end-of-call-survey) */ props) => {
|
17
17
|
/* @conditional-compile-remove(end-of-call-survey) */
|
18
18
|
const [showTagsSurvey, setShowTagsSurvey] = useState(false);
|
19
19
|
/* @conditional-compile-remove(end-of-call-survey) */
|
20
20
|
const onStarRatingSelected = (ratings) => {
|
21
|
-
if (ratings
|
21
|
+
if (ratings < 5) {
|
22
22
|
setShowTagsSurvey(true);
|
23
23
|
props.setShowSubmitFeedbackButton(true);
|
24
24
|
}
|
@@ -36,9 +36,9 @@ export const SurveyPaneContent = (
|
|
36
36
|
}
|
37
37
|
};
|
38
38
|
/* @conditional-compile-remove(end-of-call-survey) */
|
39
|
-
return (React.createElement(Stack,
|
39
|
+
return (React.createElement(Stack, { "data-ui-id": "call-composite-survey" },
|
40
40
|
React.createElement(StarSurvey, { onStarRatingSelected: onStarRatingSelected }),
|
41
41
|
showTagsSurvey && (React.createElement(TagsSurvey, { onConfirm: onIssuesSelected, showFreeFormTextField: !(props.setImprovementSuggestions === undefined) }))));
|
42
42
|
return React.createElement(React.Fragment, null);
|
43
43
|
};
|
44
|
-
//# sourceMappingURL=
|
44
|
+
//# sourceMappingURL=SurveyContent.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SurveyContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SurveyContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAWjC,qDAAqD;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;AAC3B,qDAAqD,CAAC,KASrD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,qDAAqD;IACrD,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAQ,EAAE;QACrD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YAChB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC;IACF,qDAAqD;IACrD,MAAM,gBAAgB,GAAG,CACvB,YAAwB,EACxB,sBAAyD,EACnD,EAAE;QACR,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACtC,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,sBAAsB,IAAI,KAAK,CAAC,yBAAyB,EAAE,CAAC;YAC9D,KAAK,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC;IACF,qDAAqD;IACrD,OAAO,CACL,oBAAC,KAAK,kBAAY,uBAAuB;QACvC,oBAAC,UAAU,IAAC,oBAAoB,EAAE,oBAAoB,GAAI;QAEzD,cAAc,IAAI,CACjB,oBAAC,UAAU,IACT,SAAS,EAAE,gBAAgB,EAC3B,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,KAAK,SAAS,CAAC,GACvE,CACH,CACK,CACT,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 { 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 {\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Stack } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const SurveyContent = (\n /* @conditional-compile-remove(end-of-call-survey) */ props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n setShowSubmitFeedbackButton: (showButton: boolean) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setRatings: (rating: number) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setIssuesSelected: (issuesSelected: CallSurvey) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setImprovementSuggestions?: (improvementSuggestions: CallSurveyImprovementSuggestions) => 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 onStarRatingSelected = (ratings: number): void => {\n if (ratings < 5) {\n setShowTagsSurvey(true);\n props.setShowSubmitFeedbackButton(true);\n } else {\n props.setShowSubmitFeedbackButton(true);\n }\n props.setRatings(ratings);\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n const onIssuesSelected = (\n selectedTags: CallSurvey,\n improvementSuggestions?: CallSurveyImprovementSuggestions\n ): void => {\n props.setIssuesSelected(selectedTags);\n props.setShowSubmitFeedbackButton(true);\n if (improvementSuggestions && props.setImprovementSuggestions) {\n props.setImprovementSuggestions(improvementSuggestions);\n }\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <Stack data-ui-id=\"call-composite-survey\">\n <StarSurvey onStarRatingSelected={onStarRatingSelected} />\n\n {showTagsSurvey && (\n <TagsSurvey\n onConfirm={onIssuesSelected}\n showFreeFormTextField={!(props.setImprovementSuggestions === undefined)}\n />\n )}\n </Stack>\n );\n\n return <></>;\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json
CHANGED
@@ -243,7 +243,7 @@
|
|
243
243
|
"grantedDueToRoleChangeToPresenter": "You're a presenter. You can share content and facilitate the meeting."
|
244
244
|
}
|
245
245
|
},
|
246
|
-
"
|
246
|
+
"surveyTitle": "Help us improve",
|
247
247
|
"starSurveyHelperText": "How was the quality of the call?",
|
248
248
|
"starSurveyOneStarText": "The quality was bad.",
|
249
249
|
"starSurveyTwoStarText": "The quality was poor.",
|
@@ -252,11 +252,12 @@
|
|
252
252
|
"starSurveyFiveStarText": "The quality was excellent.",
|
253
253
|
"surveyConfirmButtonLabel": "Send Feedback",
|
254
254
|
"starRatingAriaLabel": "Select {0} of {1} stars",
|
255
|
-
"
|
255
|
+
"surveySkipButtonLabel": "Skip",
|
256
256
|
"tagsSurveyQuestion": "What could have been better?",
|
257
257
|
"tagsSurveyTextFieldDefaultText": "Other, please specify",
|
258
258
|
"tagsSurveyHelperText": "Check any issues you experienced",
|
259
259
|
"surveyTextboxDefaultText": "Other, please specify",
|
260
|
+
"endOfSurveyText": "Thank you for your feedback!",
|
260
261
|
"surveyIssues": {
|
261
262
|
"overallRating": {
|
262
263
|
"callCannotJoin": "I could not join call",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@azure/communication-react",
|
3
|
-
"version": "1.13.0-alpha-
|
3
|
+
"version": "1.13.0-alpha-202402060012",
|
4
4
|
"sideEffects": false,
|
5
5
|
"description": "React library for building modern communication user experiences utilizing Azure Communication Services",
|
6
6
|
"keywords": [
|
@@ -1,71 +0,0 @@
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
2
|
-
/**
|
3
|
-
* Props for {@link ImageGallery}.
|
4
|
-
*
|
5
|
-
* @beta
|
6
|
-
*/
|
7
|
-
export interface ImageGalleryImageProps {
|
8
|
-
/** Image Url used to display the image in a large scale. */
|
9
|
-
imageUrl: string;
|
10
|
-
/** String used as a file name when downloading this image to user's local device. */
|
11
|
-
downloadFilename: string;
|
12
|
-
/** Optional string used as a alt text for the image. @default 'image' */
|
13
|
-
altText?: string;
|
14
|
-
/** Optional string used as the title of the image and displayed on the top left corner of the ImageGallery. */
|
15
|
-
title?: string;
|
16
|
-
/** Optional JSX element used as a title icon and displayed to the left of the title element. */
|
17
|
-
titleIcon?: JSX.Element;
|
18
|
-
}
|
19
|
-
/**
|
20
|
-
* Props for {@link ImageGallery}.
|
21
|
-
*
|
22
|
-
* @beta
|
23
|
-
*/
|
24
|
-
export interface ImageGalleryProps {
|
25
|
-
/**
|
26
|
-
* Boolean that controls whether the modal is displayed.
|
27
|
-
*/
|
28
|
-
isOpen: boolean;
|
29
|
-
/**
|
30
|
-
* Array of images used to populate the ImageGallery
|
31
|
-
*/
|
32
|
-
images: Array<ImageGalleryImageProps>;
|
33
|
-
/**
|
34
|
-
* Callback to invoke when the ImageGallery modal is dismissed
|
35
|
-
*/
|
36
|
-
onDismiss: () => void;
|
37
|
-
/**
|
38
|
-
* Callback called when the download button is clicked.
|
39
|
-
*/
|
40
|
-
onImageDownloadButtonClicked: (imageUrl: string, downloadFilename: string) => void;
|
41
|
-
/**
|
42
|
-
* Callback called when there's an error loading the image.
|
43
|
-
*/
|
44
|
-
onError?: (event: SyntheticEvent<HTMLImageElement, Event>) => void;
|
45
|
-
/**
|
46
|
-
* Indicating which index of the images array to start with.
|
47
|
-
*/
|
48
|
-
startIndex?: number;
|
49
|
-
}
|
50
|
-
/**
|
51
|
-
* Strings of {@link ImageGallery} that can be overridden.
|
52
|
-
*
|
53
|
-
* @beta
|
54
|
-
*/
|
55
|
-
export interface ImageGalleryStrings {
|
56
|
-
/**
|
57
|
-
* Download button label for ImageGallery
|
58
|
-
*/
|
59
|
-
downloadButtonLabel: string;
|
60
|
-
/**
|
61
|
-
* Dismiss button aria label for ImageGallery
|
62
|
-
*/
|
63
|
-
dismissButtonAriaLabel: string;
|
64
|
-
}
|
65
|
-
/**
|
66
|
-
* Component to render a fullscreen modal for a selected image.
|
67
|
-
*
|
68
|
-
* @beta
|
69
|
-
*/
|
70
|
-
export declare const ImageGallery: (props: ImageGalleryProps) => JSX.Element;
|
71
|
-
//# sourceMappingURL=ImageGallery.d.ts.map
|
@@ -1,53 +0,0 @@
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
2
|
-
// Licensed under the MIT License.
|
3
|
-
/* @conditional-compile-remove(image-gallery) */
|
4
|
-
import { DefaultButton, Icon, IconButton, Modal, Stack, mergeStyles } from '@fluentui/react';
|
5
|
-
/* @conditional-compile-remove(image-gallery) */
|
6
|
-
import React, { useState } from 'react';
|
7
|
-
/* @conditional-compile-remove(image-gallery) */
|
8
|
-
import { bodyContainer, brokenImageStyle, cancelIcon, closeButtonStyles, controlBarContainerStyle, downloadButtonStyle, downloadIcon, downloadIconStyle, focusTrapZoneStyle, headerStyle, normalImageStyle, overlayStyles, scrollableContentStyle, smallDownloadButtonContainerStyle, titleBarContainerStyle, titleStyle } from './styles/ImageGallery.style';
|
9
|
-
/* @conditional-compile-remove(image-gallery) */
|
10
|
-
import { useTheme } from '../theming/FluentThemeProvider';
|
11
|
-
/* @conditional-compile-remove(image-gallery) */
|
12
|
-
import { useLocale } from '../localization';
|
13
|
-
/* @conditional-compile-remove(image-gallery) */
|
14
|
-
/**
|
15
|
-
* Component to render a fullscreen modal for a selected image.
|
16
|
-
*
|
17
|
-
* @beta
|
18
|
-
*/
|
19
|
-
export const ImageGallery = (props) => {
|
20
|
-
const { isOpen, images, onImageDownloadButtonClicked, onDismiss, onError, startIndex = 0 } = props;
|
21
|
-
const theme = useTheme();
|
22
|
-
/* @conditional-compile-remove(image-gallery) */
|
23
|
-
const localeStrings = useLocale().strings.imageGallery;
|
24
|
-
const [isImageLoaded, setIsImageLoaded] = useState(true);
|
25
|
-
const imageStyle = isImageLoaded ? normalImageStyle : brokenImageStyle(theme);
|
26
|
-
const image = images[startIndex];
|
27
|
-
const renderHeaderBar = () => {
|
28
|
-
return (React.createElement(Stack, { className: mergeStyles(headerStyle) },
|
29
|
-
React.createElement(Stack, { className: mergeStyles(titleBarContainerStyle) }, image === null || image === void 0 ? void 0 :
|
30
|
-
image.titleIcon,
|
31
|
-
React.createElement(Stack.Item, { className: mergeStyles(titleStyle(theme)), "aria-label": image === null || image === void 0 ? void 0 : image.title }, image === null || image === void 0 ? void 0 : image.title)),
|
32
|
-
React.createElement(Stack, { className: mergeStyles(controlBarContainerStyle) },
|
33
|
-
React.createElement(DefaultButton, { className: mergeStyles(downloadButtonStyle(theme)),
|
34
|
-
/* @conditional-compile-remove(image-gallery) */
|
35
|
-
text: localeStrings.downloadButtonLabel, onClick: () => onImageDownloadButtonClicked((image === null || image === void 0 ? void 0 : image.imageUrl) || '', (image === null || image === void 0 ? void 0 : image.downloadFilename) || 'image'), onRenderIcon: () => React.createElement(Icon, { iconName: downloadIcon.iconName, className: mergeStyles(downloadIconStyle) }), "aria-live": 'polite', "aria-label": localeStrings.downloadButtonLabel }),
|
36
|
-
React.createElement(IconButton, { iconProps: downloadIcon, className: mergeStyles(smallDownloadButtonContainerStyle(theme)), onClick: () => onImageDownloadButtonClicked(image === null || image === void 0 ? void 0 : image.imageUrl, image === null || image === void 0 ? void 0 : image.downloadFilename), "aria-label": localeStrings.downloadButtonLabel, "aria-live": 'polite' }),
|
37
|
-
React.createElement(IconButton, { iconProps: cancelIcon, className: mergeStyles(closeButtonStyles(theme)), onClick: onDismiss,
|
38
|
-
/* @conditional-compile-remove(image-gallery) */
|
39
|
-
ariaLabel: localeStrings.dismissButtonAriaLabel, "aria-live": 'polite' }))));
|
40
|
-
};
|
41
|
-
const renderBodyWithLightDismiss = () => {
|
42
|
-
return (React.createElement(Stack, { className: mergeStyles(bodyContainer), onClick: () => props.onDismiss() }, images.length > startIndex && (React.createElement("img", { src: image === null || image === void 0 ? void 0 : image.imageUrl, className: mergeStyles(imageStyle), alt: (image === null || image === void 0 ? void 0 : image.altText) || 'image', "aria-label": 'image-gallery-main-image', "aria-live": 'polite', onError: (event) => {
|
43
|
-
setIsImageLoaded(false);
|
44
|
-
onError && onError(event);
|
45
|
-
}, onClick: (event) => event.stopPropagation(), onDoubleClick: (event) => {
|
46
|
-
event.persist();
|
47
|
-
} }))));
|
48
|
-
};
|
49
|
-
return (React.createElement(Modal, { titleAriaId: image === null || image === void 0 ? void 0 : image.title, isOpen: isOpen, onDismiss: onDismiss, overlay: { styles: Object.assign({}, overlayStyles(theme)) }, styles: { main: focusTrapZoneStyle, scrollableContent: scrollableContentStyle }, isDarkOverlay: true },
|
50
|
-
renderHeaderBar(),
|
51
|
-
renderBodyWithLightDismiss()));
|
52
|
-
};
|
53
|
-
//# sourceMappingURL=ImageGallery.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ImageGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ImageGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7F,gDAAgD;AAChD,OAAO,KAAK,EAAE,EAAkB,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,gDAAgD;AAChD,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACtB,iCAAiC,EACjC,sBAAsB,EACtB,UAAU,EACX,MAAM,6BAA6B,CAAC;AACrC,gDAAgD;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAoE5C,gDAAgD;AAChD;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE;IACpE,MAAM,EAAE,MAAM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,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,gBAAgB,CAAC,KAAK,CAAC,CAAC;gBACxB,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;YAC5B,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,EAC3C,aAAa,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,KAAK,CAAC,OAAO,EAAE,CAAC;YAClB,CAAC,GACD,CACH,CACK,CACT,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,IACJ,WAAW,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EACzB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,EAAE,MAAM,oBAAO,aAAa,CAAC,KAAK,CAAC,CAAE,EAAE,EAChD,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,EAC/E,aAAa,EAAE,IAAI;QAElB,eAAe,EAAE;QACjB,0BAA0B,EAAE,CACvB,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(image-gallery) */\nimport { DefaultButton, Icon, IconButton, Modal, Stack, mergeStyles } from '@fluentui/react';\n/* @conditional-compile-remove(image-gallery) */\nimport React, { SyntheticEvent, useState } from 'react';\n/* @conditional-compile-remove(image-gallery) */\nimport {\n bodyContainer,\n brokenImageStyle,\n cancelIcon,\n closeButtonStyles,\n controlBarContainerStyle,\n downloadButtonStyle,\n downloadIcon,\n downloadIconStyle,\n focusTrapZoneStyle,\n headerStyle,\n normalImageStyle,\n overlayStyles,\n scrollableContentStyle,\n smallDownloadButtonContainerStyle,\n titleBarContainerStyle,\n titleStyle\n} from './styles/ImageGallery.style';\n/* @conditional-compile-remove(image-gallery) */\nimport { useTheme } from '../theming/FluentThemeProvider';\n/* @conditional-compile-remove(image-gallery) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(image-gallery) */\nimport { ChatTheme } from '../theming';\n/**\n * Props for {@link ImageGallery}.\n *\n * @beta\n */\nexport interface ImageGalleryImageProps {\n /** Image Url used to display the image in a large scale. */\n imageUrl: string;\n /** String used as a file name when downloading this image to user's local device. */\n downloadFilename: string;\n /** Optional string used as a alt text for the image. @default 'image' */\n altText?: string;\n /** Optional string used as the title of the image and displayed on the top left corner of the ImageGallery. */\n title?: string;\n /** Optional JSX element used as a title icon and displayed to the left of the title element. */\n titleIcon?: JSX.Element;\n}\n/* @conditional-compile-remove(image-gallery) */\n/**\n * Props for {@link ImageGallery}.\n *\n * @beta\n */\nexport interface ImageGalleryProps {\n /**\n * Boolean that controls whether the modal is displayed.\n */\n isOpen: boolean;\n /**\n * Array of images used to populate the ImageGallery\n */\n images: Array<ImageGalleryImageProps>;\n /**\n * Callback to invoke when the ImageGallery modal is dismissed\n */\n onDismiss: () => void;\n /**\n * Callback called when the download button is clicked.\n */\n onImageDownloadButtonClicked: (imageUrl: string, downloadFilename: string) => void;\n /**\n * Callback called when there's an error loading the image.\n */\n onError?: (event: SyntheticEvent<HTMLImageElement, Event>) => void;\n /**\n * Indicating which index of the images array to start with.\n */\n startIndex?: number;\n}\n/* @conditional-compile-remove(image-gallery) */\n/**\n * Strings of {@link ImageGallery} that can be overridden.\n *\n * @beta\n */\nexport interface ImageGalleryStrings {\n /**\n * Download button label for ImageGallery\n */\n downloadButtonLabel: string;\n /**\n * Dismiss button aria label for ImageGallery\n */\n dismissButtonAriaLabel: string;\n}\n/* @conditional-compile-remove(image-gallery) */\n/**\n * Component to render a fullscreen modal for a selected image.\n *\n * @beta\n */\nexport const ImageGallery = (props: ImageGalleryProps): JSX.Element => {\n const { isOpen, images, onImageDownloadButtonClicked, onDismiss, onError, startIndex = 0 } = props;\n const theme = useTheme() as unknown as ChatTheme;\n\n /* @conditional-compile-remove(image-gallery) */\n const localeStrings = useLocale().strings.imageGallery;\n\n const [isImageLoaded, setIsImageLoaded] = useState<boolean>(true);\n\n const imageStyle = isImageLoaded ? normalImageStyle : brokenImageStyle(theme);\n\n const image = images[startIndex];\n const renderHeaderBar = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(headerStyle)}>\n <Stack className={mergeStyles(titleBarContainerStyle)}>\n {image?.titleIcon}\n <Stack.Item className={mergeStyles(titleStyle(theme))} aria-label={image?.title}>\n {image?.title}\n </Stack.Item>\n </Stack>\n <Stack className={mergeStyles(controlBarContainerStyle)}>\n <DefaultButton\n className={mergeStyles(downloadButtonStyle(theme))}\n /* @conditional-compile-remove(image-gallery) */\n text={localeStrings.downloadButtonLabel}\n onClick={() => onImageDownloadButtonClicked(image?.imageUrl || '', image?.downloadFilename || 'image')}\n onRenderIcon={() => <Icon iconName={downloadIcon.iconName} className={mergeStyles(downloadIconStyle)} />}\n aria-live={'polite'}\n /* @conditional-compile-remove(image-gallery) */\n aria-label={localeStrings.downloadButtonLabel}\n />\n <IconButton\n iconProps={downloadIcon}\n className={mergeStyles(smallDownloadButtonContainerStyle(theme))}\n onClick={() => onImageDownloadButtonClicked(image?.imageUrl, image?.downloadFilename)}\n /* @conditional-compile-remove(image-gallery) */\n aria-label={localeStrings.downloadButtonLabel}\n aria-live={'polite'}\n />\n <IconButton\n iconProps={cancelIcon}\n className={mergeStyles(closeButtonStyles(theme))}\n onClick={onDismiss}\n /* @conditional-compile-remove(image-gallery) */\n ariaLabel={localeStrings.dismissButtonAriaLabel}\n aria-live={'polite'}\n />\n </Stack>\n </Stack>\n );\n };\n\n const renderBodyWithLightDismiss = (): JSX.Element => {\n return (\n <Stack className={mergeStyles(bodyContainer)} onClick={() => props.onDismiss()}>\n {images.length > startIndex && (\n <img\n src={image?.imageUrl}\n className={mergeStyles(imageStyle)}\n alt={image?.altText || 'image'}\n aria-label={'image-gallery-main-image'}\n aria-live={'polite'}\n onError={(event) => {\n setIsImageLoaded(false);\n onError && onError(event);\n }}\n onClick={(event) => event.stopPropagation()}\n onDoubleClick={(event) => {\n event.persist();\n }}\n />\n )}\n </Stack>\n );\n };\n\n return (\n <Modal\n titleAriaId={image?.title}\n isOpen={isOpen}\n onDismiss={onDismiss}\n overlay={{ styles: { ...overlayStyles(theme) } }}\n styles={{ main: focusTrapZoneStyle, scrollableContent: scrollableContentStyle }}\n isDarkOverlay={true}\n >\n {renderHeaderBar()}\n {renderBodyWithLightDismiss()}\n </Modal>\n );\n};\n"]}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';
|
3
|
-
import { CallSurveyImprovementSuggestions } from "../../../../react-components/src";
|
4
|
-
/** @private */
|
5
|
-
export declare const SurveyPane: (props: {
|
6
|
-
onSubmitSurvey?: ((survey: CallSurvey) => Promise<CallSurveyResponse | undefined>) | undefined;
|
7
|
-
/**
|
8
|
-
* Optional callback to add extra logic when survey is dismissed. For self-host only
|
9
|
-
*/
|
10
|
-
onSurveyDismissed?: (() => void) | undefined;
|
11
|
-
onSurveySubmittedCustom?: ((callId: string, surveyId: string, submittedSurvey: CallSurvey, improvementSuggestions: CallSurveyImprovementSuggestions) => Promise<void>) | undefined;
|
12
|
-
}) => JSX.Element;
|
13
|
-
//# sourceMappingURL=SurveyPane.d.ts.map
|
@@ -1,87 +0,0 @@
|
|
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 { useState } from 'react';
|
6
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
7
|
-
import { useLocale } from '../localization';
|
8
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
9
|
-
import { Panel, PanelType, PrimaryButton, Stack } from '@fluentui/react';
|
10
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
11
|
-
import { SurveyPaneContent } from './SurveyPaneContent';
|
12
|
-
/** @private */
|
13
|
-
export const SurveyPane = (props) => {
|
14
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
15
|
-
const { onSubmitSurvey, onSurveySubmittedCustom } = props;
|
16
|
-
/* @conditional-compile-remove(end-of-call-survey-self-host) */ /* @conditional-compile-remove(end-of-call-survey) */
|
17
|
-
const { onSurveyDismissed } = props;
|
18
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
19
|
-
const strings = useLocale().strings.call;
|
20
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
21
|
-
const [isOpen, setIsOpen] = useState(true);
|
22
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
23
|
-
const [ratings, setRatings] = useState(0);
|
24
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
25
|
-
const [issuesSelected, setIssuesSelected] = useState();
|
26
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
27
|
-
const [showSubmitFeedbackButton, setShowSubmitFeedbackButton] = useState(false);
|
28
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
29
|
-
const [improvementSuggestions, setImprovementSuggestions] = useState({});
|
30
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
31
|
-
const onRenderFooterContent = React.useCallback(() => (React.createElement(React.Fragment, null, showSubmitFeedbackButton && (React.createElement(Stack, { horizontalAlign: "end" },
|
32
|
-
React.createElement(PrimaryButton, { style: { marginTop: '1rem' }, onClick: () => {
|
33
|
-
const surveyResults = { overallRating: { score: ratings } };
|
34
|
-
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.overallRating) {
|
35
|
-
surveyResults.overallRating = { score: ratings, issues: issuesSelected.overallRating.issues };
|
36
|
-
}
|
37
|
-
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.audioRating) {
|
38
|
-
surveyResults.audioRating = { score: ratings, issues: issuesSelected.audioRating.issues };
|
39
|
-
}
|
40
|
-
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.screenshareRating) {
|
41
|
-
surveyResults.screenshareRating = { score: ratings, issues: issuesSelected.screenshareRating.issues };
|
42
|
-
}
|
43
|
-
if (issuesSelected === null || issuesSelected === void 0 ? void 0 : issuesSelected.videoRating) {
|
44
|
-
surveyResults.videoRating = { score: ratings, issues: issuesSelected.videoRating.issues };
|
45
|
-
}
|
46
|
-
if (onSubmitSurvey) {
|
47
|
-
onSubmitSurvey(surveyResults)
|
48
|
-
.then((res) => {
|
49
|
-
var _a, _b;
|
50
|
-
if (onSurveySubmittedCustom) {
|
51
|
-
onSurveySubmittedCustom((_a = res === null || res === void 0 ? void 0 : res.callId) !== null && _a !== void 0 ? _a : '', (_b = res === null || res === void 0 ? void 0 : res.id) !== null && _b !== void 0 ? _b : '', surveyResults, improvementSuggestions);
|
52
|
-
}
|
53
|
-
})
|
54
|
-
.catch((e) => console.log('error when submitting survey: ' + e));
|
55
|
-
}
|
56
|
-
setIsOpen(false);
|
57
|
-
} }, strings.surveyConfirmButtonLabel))))), [
|
58
|
-
showSubmitFeedbackButton,
|
59
|
-
ratings,
|
60
|
-
issuesSelected,
|
61
|
-
onSubmitSurvey,
|
62
|
-
strings.surveyConfirmButtonLabel,
|
63
|
-
onSurveySubmittedCustom,
|
64
|
-
improvementSuggestions
|
65
|
-
]);
|
66
|
-
/* @conditional-compile-remove(end-of-call-survey) */
|
67
|
-
return (React.createElement(Panel, { headerText: strings.surveyQuestion, isOpen: isOpen, onDismiss: () => {
|
68
|
-
/* @conditional-compile-remove(end-of-call-survey-self-host) */
|
69
|
-
if (onSurveyDismissed) {
|
70
|
-
onSurveyDismissed();
|
71
|
-
}
|
72
|
-
setIsOpen(false);
|
73
|
-
}, closeButtonAriaLabel: strings.surveyCancelButtonAriaLabel, type: PanelType.custom, customWidth: "24rem", onRenderFooterContent: onRenderFooterContent, isFooterAtBottom: true },
|
74
|
-
React.createElement(SurveyPaneContent, { setShowSubmitFeedbackButton: (showButton) => {
|
75
|
-
setShowSubmitFeedbackButton(showButton);
|
76
|
-
}, setRatings: (rating) => {
|
77
|
-
setRatings(rating);
|
78
|
-
}, setIssuesSelected: (issuesSelected) => {
|
79
|
-
setIssuesSelected(issuesSelected);
|
80
|
-
}, setImprovementSuggestions: onSurveySubmittedCustom
|
81
|
-
? (improvementSuggestions) => {
|
82
|
-
setImprovementSuggestions(improvementSuggestions);
|
83
|
-
}
|
84
|
-
: undefined })));
|
85
|
-
return React.createElement(React.Fragment, null);
|
86
|
-
};
|
87
|
-
//# sourceMappingURL=SurveyPane.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SurveyPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SurveyPane.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,qDAAqD;AACrD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACzE,qDAAqD;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,eAAe;AACf,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KA0B1B,EAAe,EAAE;IAChB,qDAAqD;IACrD,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,GAAG,KAAK,CAAC;IAC1D,+DAA+D,CAAC,qDAAqD;IACrH,MAAM,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IACpC,qDAAqD;IACrD,MAAM,OAAO,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACzC,qDAAqD;IACrD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3C,qDAAqD;I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;QACnB,CAAC,EACD,oBAAoB,EAAE,OAAO,CAAC,2BAA2B,EACzD,IAAI,EAAE,SAAS,CAAC,MAAM,EACtB,WAAW,EAAC,OAAO,EACnB,qBAAqB,EAAE,qBAAqB,EAC5C,gBAAgB;QAEhB,oBAAC,iBAAiB,IAChB,2BAA2B,EAAE,CAAC,UAAmB,EAAE,EAAE;gBACnD,2BAA2B,CAAC,UAAU,CAAC,CAAC;YAC1C,CAAC,EACD,UAAU,EAAE,CAAC,MAAc,EAAE,EAAE;gBAC7B,UAAU,CAAC,MAAM,CAAC,CAAC;YACrB,CAAC,EACD,iBAAiB,EAAE,CAAC,cAA0B,EAAE,EAAE;gBAChD,iBAAiB,CAAC,cAAc,CAAC,CAAC;YACpC,CAAC,EACD,yBAAyB,EACvB,uBAAuB;gBACrB,CAAC,CAAC,CAAC,sBAAwD,EAAE,EAAE;oBAC3D,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;gBACpD,CAAC;gBACH,CAAC,CAAC,SAAS,GAEf,CACI,CACT,CAAC;IACF,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 { useState } from 'react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey, CallSurveyResponse } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Panel, PanelType, PrimaryButton, Stack } from '@fluentui/react';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { SurveyPaneContent } from './SurveyPaneContent';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurveyImprovementSuggestions } from '@internal/react-components';\n\n/** @private */\nexport const SurveyPane = (props: {\n /* @conditional-compile-remove(end-of-call-survey) */\n onSubmitSurvey?: (survey: CallSurvey) => Promise<CallSurveyResponse | undefined>;\n /* @conditional-compile-remove(end-of-call-survey-self-host) */\n /**\n * Optional callback to add extra logic when survey is dismissed. For self-host only\n */\n onSurveyDismissed?: () => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n onSurveySubmittedCustom?: (\n callId: string,\n surveyId: string,\n /**\n * This is the survey results containing star survey data and API tag survey data.\n * This part of the result will always be sent to the calling sdk\n * This callback provides user with the ability to gain access to survey data\n */\n submittedSurvey: CallSurvey,\n /**\n * This is the survey results containing free form text\n * This part of the result will not be handled by composites\n * User will need to collect and handle this information 100% on their own\n * Free form text survey is not going to show in the UI if onSurveySubmitted is not populated\n */\n improvementSuggestions: CallSurveyImprovementSuggestions\n ) => Promise<void>;\n}): JSX.Element => {\n /* @conditional-compile-remove(end-of-call-survey) */\n const { onSubmitSurvey, onSurveySubmittedCustom } = props;\n /* @conditional-compile-remove(end-of-call-survey-self-host) */ /* @conditional-compile-remove(end-of-call-survey) */\n const { onSurveyDismissed } = props;\n /* @conditional-compile-remove(end-of-call-survey) */\n const strings = useLocale().strings.call;\n /* @conditional-compile-remove(end-of-call-survey) */\n const [isOpen, setIsOpen] = useState(true);\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 [improvementSuggestions, setImprovementSuggestions] = useState<CallSurveyImprovementSuggestions>({});\n /* @conditional-compile-remove(end-of-call-survey) */\n const onRenderFooterContent = React.useCallback(\n () => (\n <>\n {showSubmitFeedbackButton && (\n <Stack horizontalAlign=\"end\">\n <PrimaryButton\n style={{ marginTop: '1rem' }}\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 (onSubmitSurvey) {\n onSubmitSurvey(surveyResults)\n .then((res) => {\n if (onSurveySubmittedCustom) {\n onSurveySubmittedCustom(\n res?.callId ?? '',\n res?.id ?? '',\n surveyResults,\n improvementSuggestions\n );\n }\n })\n .catch((e) => console.log('error when submitting survey: ' + e));\n }\n setIsOpen(false);\n }}\n >\n {strings.surveyConfirmButtonLabel}\n </PrimaryButton>\n </Stack>\n )}\n </>\n ),\n [\n showSubmitFeedbackButton,\n ratings,\n issuesSelected,\n onSubmitSurvey,\n strings.surveyConfirmButtonLabel,\n onSurveySubmittedCustom,\n improvementSuggestions\n ]\n );\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <Panel\n headerText={strings.surveyQuestion}\n isOpen={isOpen}\n onDismiss={() => {\n /* @conditional-compile-remove(end-of-call-survey-self-host) */\n if (onSurveyDismissed) {\n onSurveyDismissed();\n }\n setIsOpen(false);\n }}\n closeButtonAriaLabel={strings.surveyCancelButtonAriaLabel}\n type={PanelType.custom}\n customWidth=\"24rem\"\n onRenderFooterContent={onRenderFooterContent}\n isFooterAtBottom\n >\n <SurveyPaneContent\n setShowSubmitFeedbackButton={(showButton: boolean) => {\n setShowSubmitFeedbackButton(showButton);\n }}\n setRatings={(rating: number) => {\n setRatings(rating);\n }}\n setIssuesSelected={(issuesSelected: CallSurvey) => {\n setIssuesSelected(issuesSelected);\n }}\n setImprovementSuggestions={\n onSurveySubmittedCustom\n ? (improvementSuggestions: CallSurveyImprovementSuggestions) => {\n setImprovementSuggestions(improvementSuggestions);\n }\n : undefined\n }\n />\n </Panel>\n );\n return <></>;\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"SurveyPaneContent.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/common/SurveyPaneContent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAWjC,qDAAqD;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;AAC/B,qDAAqD,CAAC,KASrD,EACY,EAAE;IACf,qDAAqD;IACrD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5D,qDAAqD;IACrD,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAQ,EAAE;QACrD,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;YACjB,iBAAiB,CAAC,IAAI,CAAC,CAAC;YACxB,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;QACD,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC5B,CAAC,CAAC;IACF,qDAAqD;IACrD,MAAM,gBAAgB,GAAG,CACvB,YAAwB,EACxB,sBAAyD,EACnD,EAAE;QACR,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACtC,KAAK,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,sBAAsB,IAAI,KAAK,CAAC,yBAAyB,EAAE,CAAC;YAC9D,KAAK,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC,CAAC;IACF,qDAAqD;IACrD,OAAO,CACL,oBAAC,KAAK;QACJ,oBAAC,UAAU,IAAC,oBAAoB,EAAE,oBAAoB,GAAI;QAEzD,cAAc,IAAI,CACjB,oBAAC,UAAU,IACT,SAAS,EAAE,gBAAgB,EAC3B,qBAAqB,EAAE,CAAC,CAAC,KAAK,CAAC,yBAAyB,KAAK,SAAS,CAAC,GACvE,CACH,CACK,CACT,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 { 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 {\n _AudioIssue,\n _OverallIssue,\n _ScreenshareIssue,\n _VideoIssue,\n CallSurveyImprovementSuggestions\n} from '@internal/react-components';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { CallSurvey } from '@azure/communication-calling';\n/* @conditional-compile-remove(end-of-call-survey) */\nimport { Stack } from '@fluentui/react';\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 setShowSubmitFeedbackButton: (showButton: boolean) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setRatings: (rating: number) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setIssuesSelected: (issuesSelected: CallSurvey) => void;\n /* @conditional-compile-remove(end-of-call-survey) */\n setImprovementSuggestions?: (improvementSuggestions: CallSurveyImprovementSuggestions) => 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 onStarRatingSelected = (ratings: number): void => {\n if (ratings <= 2) {\n setShowTagsSurvey(true);\n props.setShowSubmitFeedbackButton(true);\n } else {\n props.setShowSubmitFeedbackButton(true);\n }\n props.setRatings(ratings);\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n const onIssuesSelected = (\n selectedTags: CallSurvey,\n improvementSuggestions?: CallSurveyImprovementSuggestions\n ): void => {\n props.setIssuesSelected(selectedTags);\n props.setShowSubmitFeedbackButton(true);\n if (improvementSuggestions && props.setImprovementSuggestions) {\n props.setImprovementSuggestions(improvementSuggestions);\n }\n };\n /* @conditional-compile-remove(end-of-call-survey) */\n return (\n <Stack>\n <StarSurvey onStarRatingSelected={onStarRatingSelected} />\n\n {showTagsSurvey && (\n <TagsSurvey\n onConfirm={onIssuesSelected}\n showFreeFormTextField={!(props.setImprovementSuggestions === undefined)}\n />\n )}\n </Stack>\n );\n\n return <></>;\n};\n"]}
|