@azure/communication-react 1.11.1-alpha-202401130013 → 1.11.1-alpha-202401140014

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.
@@ -1 +1 @@
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,KAqB1B,EAAe,EAAE;IAChB,qDAAqD;IACrD,MAAM,EAAE,cAAc,EAAE,uBAAuB,EAAE,GAAG,KAAK,CAAC;IAC1D,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;IACrD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC1C,qDAAqD;IACrD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,EAA0B,CAAC;IAC/E,qDAAqD;IACrD,MAAM,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChF,qDAAqD;IACrD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AE,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) */\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) */\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={() => setIsOpen(false)}\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
+ {"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,E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,CACL,oBAAC,KAAK,IACJ,UAAU,EAAE,OAAO,CAAC,cAAc,EAClC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,GAAG,EAAE;YACd,+DAA+D;YAC/D,IAAI,iBAAiB,EAAE,CAAC;gBACtB,iBAAiB,EAAE,CAAC;YACtB,CAAC;YACD,SAAS,CAAC,KAAK,CAAC,CAAC;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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.11.1-alpha-202401130013",
3
+ "version": "1.11.1-alpha-202401140014",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [
@@ -51,7 +51,7 @@
51
51
  "uuid": "^9.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
- "@azure/communication-calling": "1.20.1-beta.2",
54
+ "@azure/communication-calling": "1.21.1-beta.4",
55
55
  "@azure/communication-calling-effects": "1.0.1",
56
56
  "@azure/communication-chat": "1.5.0-beta.1",
57
57
  "@types/react": ">=16.8.0 <19.0.0",