@azure/communication-react 1.17.0-alpha-202405240014 → 1.17.0-alpha-202405260014
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 +308 -18
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CeKa8qDu.js → ChatMessageComponentAsRichTextEditBox-JJcSXeg5.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CeKa8qDu.js.map → ChatMessageComponentAsRichTextEditBox-JJcSXeg5.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-xx9t_FzT.js → RichTextSendBoxWrapper-X-3v6QTM.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-xx9t_FzT.js.map → RichTextSendBoxWrapper-X-3v6QTM.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-qGuuq6Hb.js → index-DpbIPxer.js} +253 -48
- package/dist/dist-cjs/communication-react/index-DpbIPxer.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +3 -1
- 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/createTeamsCallHandlers.d.ts +5 -5
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +18 -7
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallAgentProvider.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js +1 -1
- package/dist/dist-esm/calling-component-bindings/src/providers/CallProvider.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js +1 -0
- package/dist/dist-esm/calling-stateful-client/src/TeamsCallDeclarative.js.map +1 -1
- package/dist/dist-esm/communication-react/src/index.d.ts +4 -1
- package/dist/dist-esm/communication-react/src/index.js +2 -0
- package/dist/dist-esm/communication-react/src/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +1 -0
- package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/NotificationBar.d.ts +65 -0
- package/dist/dist-esm/react-components/src/components/NotificationBar.js +38 -0
- package/dist/dist-esm/react-components/src/components/NotificationBar.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/Notifications.d.ts +215 -0
- package/dist/dist-esm/react-components/src/components/Notifications.js +48 -0
- package/dist/dist-esm/react-components/src/components/Notifications.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +3 -3
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +6 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js +3 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/index.d.ts +3 -2
- package/dist/dist-esm/react-components/src/components/index.js +4 -0
- package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.d.ts +22 -0
- package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js +56 -0
- package/dist/dist-esm/react-components/src/components/styles/NotificationBar.styles.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils.d.ts +13 -0
- package/dist/dist-esm/react-components/src/components/utils.js +29 -0
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -0
- package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +157 -1
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/ComponentLocale.js +3 -1
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/ComponentLocale.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +5 -4
- 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 +4 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/package.json +2 -2
- package/dist/dist-cjs/communication-react/index-qGuuq6Hb.js.map +0 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
var index = require('./index-
|
3
|
+
var index = require('./index-DpbIPxer.js');
|
4
4
|
require('react');
|
5
5
|
require('@fluentui/react');
|
6
6
|
require('@fluentui/react-components');
|
@@ -106,6 +106,8 @@ exports.MessageStatusIndicator = index.MessageStatusIndicator;
|
|
106
106
|
exports.MessageThread = index.MessageThread;
|
107
107
|
exports.MicrophoneButton = index.MicrophoneButton;
|
108
108
|
exports.MicrophoneSitePermissions = index.MicrophoneSitePermissions;
|
109
|
+
exports.NotificationBar = index.NotificationBar;
|
110
|
+
exports.Notifications = index.Notifications;
|
109
111
|
exports.ParticipantItem = index.ParticipantItem;
|
110
112
|
exports.ParticipantList = index.ParticipantList;
|
111
113
|
exports.ParticipantsButton = index.ParticipantsButton;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.17.0-alpha-
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.17.0-alpha-202405260014';\n"]}
|
@@ -11,7 +11,7 @@ import { CommonCallingHandlers, VideoBackgroundEffectsDependency } from './creat
|
|
11
11
|
* Calling related components from this package are able to pick out relevant handlers from this object.
|
12
12
|
* See {@link useHandlers} and {@link usePropsFor}.
|
13
13
|
*
|
14
|
-
* @
|
14
|
+
* @public
|
15
15
|
*/
|
16
16
|
export interface TeamsCallingHandlers extends CommonCallingHandlers {
|
17
17
|
onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
|
@@ -22,11 +22,11 @@ export interface TeamsCallingHandlers extends CommonCallingHandlers {
|
|
22
22
|
* Useful when implementing a custom component that utilizes the providers
|
23
23
|
* exported from this library.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @public
|
26
26
|
*/
|
27
|
-
export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent
|
27
|
+
export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCallClient, callAgent?: TeamsCallAgent, deviceManager?: StatefulDeviceManager, call?: TeamsCall, options?: {
|
28
28
|
onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;
|
29
|
-
}) =>
|
29
|
+
}) => TeamsCallingHandlers;
|
30
30
|
/**
|
31
31
|
* Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with
|
32
32
|
* the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and
|
@@ -39,7 +39,7 @@ export declare const createDefaultTeamsCallingHandlers: (callClient: StatefulCal
|
|
39
39
|
* @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
|
40
40
|
* @param _ - React component that you want to generate handlers for.
|
41
41
|
*
|
42
|
-
* @
|
42
|
+
* @public
|
43
43
|
*/
|
44
44
|
export declare const createTeamsCallingHandlersForComponent: <Props>(callClient: StatefulCallClient, callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent, deviceManager: StatefulDeviceManager | undefined, call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall, _Component: (props: Props) => ReactElement | null) => Common<TeamsCallingHandlers, Props>;
|
45
45
|
//# sourceMappingURL=createTeamsCallHandlers.d.ts.map
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
});
|
11
11
|
};
|
12
12
|
import { isCommunicationUserIdentifier, isMicrosoftTeamsAppIdentifier } from '@azure/communication-common';
|
13
|
-
/* @conditional-compile-remove(
|
13
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
14
14
|
import { isPhoneNumberIdentifier } from '@azure/communication-common';
|
15
15
|
import { _toCommunicationIdentifier } from "../../../acs-ui-common/src";
|
16
16
|
import memoizeOne from 'memoize-one';
|
@@ -22,22 +22,24 @@ import { createDefaultCommonCallingHandlers } from './createCommonHandlers';
|
|
22
22
|
* Useful when implementing a custom component that utilizes the providers
|
23
23
|
* exported from this library.
|
24
24
|
*
|
25
|
-
* @
|
25
|
+
* @public
|
26
26
|
*/
|
27
27
|
export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAgent, deviceManager, call, options) => {
|
28
28
|
return Object.assign(Object.assign({}, createDefaultCommonCallingHandlers(callClient, deviceManager, call, options)), { onStartCall: (participants, options) => {
|
29
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
29
|
+
/* @conditional-compile-remove(teams-identity-support-beta) */
|
30
30
|
const threadId = options === null || options === void 0 ? void 0 : options.threadId;
|
31
31
|
if (!isTeamsCallParticipants(participants)) {
|
32
32
|
throw new Error('CommunicationIdentifier in Teams call is not supported!');
|
33
33
|
}
|
34
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
35
34
|
if (callAgent) {
|
36
|
-
|
35
|
+
/* @conditional-compile-remove(teams-identity-support-beta) */
|
36
|
+
return callAgent.startCall(participants, threadId ? Object.assign({ threadId }, options) : undefined);
|
37
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
38
|
+
// Remove when teams identity in stable support multiple participants
|
39
|
+
return teamsSingleParticipantTrampoline(callAgent, participants, options);
|
37
40
|
}
|
38
41
|
return undefined;
|
39
42
|
},
|
40
|
-
/* @conditional-compile-remove(teams-identity-support) */
|
41
43
|
/* @conditional-compile-remove(PSTN-calls) */
|
42
44
|
onAddParticipant: (userId, options) => __awaiter(void 0, void 0, void 0, function* () {
|
43
45
|
const participant = _toCommunicationIdentifier(userId);
|
@@ -79,9 +81,18 @@ export const createDefaultTeamsCallingHandlers = memoizeOne((callClient, callAge
|
|
79
81
|
* @param call - Instance of {@link @azure/communication-calling#TeamsCall}.
|
80
82
|
* @param _ - React component that you want to generate handlers for.
|
81
83
|
*
|
82
|
-
* @
|
84
|
+
* @public
|
83
85
|
*/
|
84
86
|
export const createTeamsCallingHandlersForComponent = (callClient, callAgent, deviceManager, call, _Component) => {
|
85
87
|
return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);
|
86
88
|
};
|
89
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
90
|
+
const teamsSingleParticipantTrampoline = (callAgent, participants, options) => {
|
91
|
+
if (participants.length !== 1) {
|
92
|
+
throw new Error('Only one participant is supported in Teams call!');
|
93
|
+
}
|
94
|
+
else {
|
95
|
+
return callAgent.startCall(participants[0], options);
|
96
|
+
}
|
97
|
+
};
|
87
98
|
//# sourceMappingURL=createTeamsCallHandlers.js.map
|
package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;
|
1
|
+
{"version":3,"file":"createTeamsCallHandlers.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/handlers/createTeamsCallHandlers.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAOlC,OAAO,EAEL,6BAA6B,EAC7B,6BAA6B,EAC9B,MAAM,6BAA6B,CAAC;AACrC,6CAA6C;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAU,0BAA0B,EAAE,mCAAgC;AAE7E,OAAO,UAAU,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,EACL,kCAAkC,EAGnC,MAAM,wBAAwB,CAAC;AAgBhC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,UAAU,CACzD,CACE,UAA8B,EAC9B,SAA0B,EAC1B,aAAqC,EACrC,IAAgB,EAChB,OAEC,EACqB,EAAE;IACxB,uCACK,kCAAkC,CAAC,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,CAAC,KAC/E,WAAW,EAAE,CAAC,YAAY,EAAE,OAAO,EAAE,EAAE;YACrC,8DAA8D;YAC9D,MAAM,QAAQ,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC;YACnC,IAAI,CAAC,uBAAu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CACnB,MAAsF,EACvE,EAAE;YACjB,MAAM,WAAW,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;YACvD,IAAI,6BAA6B,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;YAC7E,CAAC;YAED,IAAI,6BAA6B,CAAC,WAAW,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;YAC/E,CAAC;YACD,yDAAyD;YACzD,MAAM,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,iBAAiB,CAAC,WAAW,CAAC,CAAA,CAAC;QAC7C,CAAC,CAAA,IACD;AACJ,CAAC,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,UAA8B,EAC9B,SAA+F,EAC/F,aAAgD,EAChD,IAAqF,EACrF,UAAiD,EACZ,EAAE;IACvC,OAAO,iCAAiC,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACvF,CAAC,CAAC;AAEF,yDAAyD;AACzD,MAAM,gCAAgC,GAAG,CACvC,SAAyB,EACzB,YAAuC,EACvC,OAA+B,EACpB,EAAE;IACb,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;IACtE,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAQ,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { StartCallOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall, TeamsCallAgent, TeamsCallAgentOptions } from '@azure/communication-calling';\nimport {\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isMicrosoftTeamsAppIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { Common, _toCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { StatefulCallClient, StatefulDeviceManager } from '@internal/calling-stateful-client';\nimport memoizeOne from 'memoize-one';\nimport { ReactElement } from 'react';\nimport { isTeamsCallParticipants } from '../utils/callUtils';\nimport {\n createDefaultCommonCallingHandlers,\n CommonCallingHandlers,\n VideoBackgroundEffectsDependency\n} from './createCommonHandlers';\n/**\n * Object containing all the teams call handlers required for calling components.\n *\n * Calling related components from this package are able to pick out relevant handlers from this object.\n * See {@link useHandlers} and {@link usePropsFor}.\n *\n * @public\n */\nexport interface TeamsCallingHandlers extends CommonCallingHandlers {\n onStartCall: (\n participants: CommunicationIdentifier[],\n options?: StartCallOptions\n ) => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * Create the default implementation of {@link TeamsCallingHandlers} for teams call.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const createDefaultTeamsCallingHandlers = memoizeOne(\n (\n callClient: StatefulCallClient,\n callAgent?: TeamsCallAgent,\n deviceManager?: StatefulDeviceManager,\n call?: TeamsCall,\n options?: {\n onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>;\n }\n ): TeamsCallingHandlers => {\n return {\n ...createDefaultCommonCallingHandlers(callClient, deviceManager, call, options),\n onStartCall: (participants, options) => {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n const threadId = options?.threadId;\n if (!isTeamsCallParticipants(participants)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n if (callAgent) {\n /* @conditional-compile-remove(teams-identity-support-beta) */\n return callAgent.startCall(participants, threadId ? { threadId, ...options } : undefined);\n /* @conditional-compile-remove(teams-identity-support) */\n // Remove when teams identity in stable support multiple participants\n return teamsSingleParticipantTrampoline(callAgent as TeamsCallAgent, participants, options);\n }\n\n return undefined;\n },\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant: async (\n userId: string | CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n /* @conditional-compile-remove(teams-identity-support) */\n const threadId = options?.threadId;\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Adding Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n if (isPhoneNumberIdentifier(participant)) {\n call?.addParticipant(participant, threadId ? { threadId } : undefined);\n }\n /* @conditional-compile-remove(teams-identity-support) */\n call?.addParticipant(participant);\n },\n onRemoveParticipant: async (\n userId: string | /* @conditional-compile-remove(PSTN-calls) */ CommunicationIdentifier\n ): Promise<void> => {\n const participant = _toCommunicationIdentifier(userId);\n if (isCommunicationUserIdentifier(participant)) {\n throw new Error('CommunicationIdentifier in Teams call is not supported!');\n }\n\n if (isMicrosoftTeamsAppIdentifier(participant)) {\n throw new Error('Removing Microsoft Teams app identifier is not supported!');\n }\n /* @conditional-compile-remove(teams-identity-support) */\n await call?.removeParticipant(participant);\n }\n };\n }\n);\n\n/**\n * Create a set of default handlers for given component. Memoization is applied to the result. Multiple invocations with\n * the same arguments will return the same handler instances. DeclarativeCallAgent, DeclarativeDeviceManager, and\n * DeclarativeCall may be undefined. If undefined, their associated handlers will not be created and returned.\n *\n * @param callClient - StatefulCallClient returned from\n * {@link @azure/communication-react#createStatefulCallClient}.\n * @param callAgent - Instance of {@link @azure/communication-calling#TeamsCallClient}.\n * @param deviceManager - Instance of {@link @azure/communication-calling#DeviceManager}.\n * @param call - Instance of {@link @azure/communication-calling#TeamsCall}.\n * @param _ - React component that you want to generate handlers for.\n *\n * @public\n */\nexport const createTeamsCallingHandlersForComponent = <Props>(\n callClient: StatefulCallClient,\n callAgent: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent,\n deviceManager: StatefulDeviceManager | undefined,\n call: undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall,\n _Component: (props: Props) => ReactElement | null\n): Common<TeamsCallingHandlers, Props> => {\n return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call);\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\nconst teamsSingleParticipantTrampoline = (\n callAgent: TeamsCallAgent,\n participants: CommunicationIdentifier[],\n options?: TeamsCallAgentOptions\n): TeamsCall => {\n if (participants.length !== 1) {\n throw new Error('Only one participant is supported in Teams call!');\n } else {\n return callAgent.startCall(participants[0] as any, options);\n }\n};\n"]}
|
@@ -43,7 +43,7 @@ export declare const useCallAgent: () => CallAgent | undefined;
|
|
43
43
|
* Useful when implementing a custom component that utilizes the providers
|
44
44
|
* exported from this library.
|
45
45
|
*
|
46
|
-
* @
|
46
|
+
* @public
|
47
47
|
*/
|
48
48
|
export declare const useTeamsCallAgent: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;
|
49
49
|
//# sourceMappingURL=CallAgentProvider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @
|
1
|
+
{"version":3,"file":"CallAgentProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallAgentProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AASzD;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAmC,SAAS,CAAC,CAAC;AAY3F,MAAM,qBAAqB,GAAG,CAAC,KAA6B,EAAe,EAAE;IAC3E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5B,MAAM,YAAY,GAAyB;QACzC,SAAS;KACV,CAAC;IAEF,OAAO,oBAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,KAAK,CAAC,QAAQ,CAA6B,CAAC;AACtG,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE,CAAC,oBAAC,qBAAqB,oBAAK,KAAK,EAAI,CAAC;AAEtH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAA0B,EAAE;;IACtD,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,gEAAgE,CAAC,CAAC;IACpF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAE4C,EAAE;;IAC7E,MAAM,SAAS,GAAG,MAAA,UAAU,CAAC,gBAAgB,CAAC,0CAAE,SAAS,CAAC;IAC1D,IAAI,SAAS,IAAI,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;IAClF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallAgent } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCallAgent } from '@azure/communication-calling';\nimport { _isACSCallAgent } from '@internal/calling-stateful-client';\nimport React, { createContext, useContext } from 'react';\n\n/**\n * @private\n */\nexport type CallAgentContextType = {\n callAgent: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent | undefined;\n};\n\n/**\n * @private\n */\nexport const CallAgentContext = createContext<CallAgentContextType | undefined>(undefined);\n\n/**\n * Arguments to initialize a {@link CallAgentProvider}.\n *\n * @public\n */\nexport interface CallAgentProviderProps {\n children: React.ReactNode;\n callAgent?: CallAgent | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent;\n}\n\nconst CallAgentProviderBase = (props: CallAgentProviderProps): JSX.Element => {\n const { callAgent } = props;\n\n const initialState: CallAgentContextType = {\n callAgent\n };\n\n return <CallAgentContext.Provider value={initialState}>{props.children}</CallAgentContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}.\n *\n * Calling components from this package must be wrapped with a {@link CallAgentProvider}.\n *\n * @public\n */\nexport const CallAgentProvider = (props: CallAgentProviderProps): JSX.Element => <CallAgentProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useCallAgent = (): CallAgent | undefined => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && !_isACSCallAgent(callAgent)) {\n throw new Error('TeamsCallAgent object was provided, try useTeamsCall() instead');\n }\n return callAgent;\n};\n\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * @public\n */\nexport const useTeamsCallAgent = ():\n | undefined\n | /* @conditional-compile-remove(teams-identity-support) */ TeamsCallAgent => {\n const callAgent = useContext(CallAgentContext)?.callAgent;\n if (callAgent && _isACSCallAgent(callAgent)) {\n throw new Error('Regular CallAgent object was provided, try useCall() instead');\n }\n return callAgent;\n};\n"]}
|
@@ -47,7 +47,7 @@ export declare const useCall: () => Call | undefined;
|
|
47
47
|
*
|
48
48
|
* you must have previously used the CallProvider with a TeamsCall object to use this hook
|
49
49
|
*
|
50
|
-
* @
|
50
|
+
* @public
|
51
51
|
*/
|
52
52
|
export declare const useTeamsCall: () => undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;
|
53
53
|
//# sourceMappingURL=CallProvider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @
|
1
|
+
{"version":3,"file":"CallProvider.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/providers/CallProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAIzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,6CAA0C;AAmB7E;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAA8B,SAAS,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAwB,EAAe,EAAE;IACjE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEjC,MAAM,YAAY,GAAoB;QACpC,IAAI;KACL,CAAC;IAEF,OAAO,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,IAAG,QAAQ,CAAwB,CAAC;AACtF,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAe,EAAE,CAAC,oBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAC;AAEvG;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,GAAqB,EAAE;;IAC5C,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,yDAAyD;AACzD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,GAAoF,EAAE;;IAChH,MAAM,IAAI,GAAG,MAAA,UAAU,CAAC,WAAW,CAAC,0CAAE,IAAI,CAAC;IAC3C,IAAI,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useContext, createContext } from 'react';\nimport { Call } from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { TeamsCall } from '@azure/communication-calling';\nimport { _isACSCall, _isTeamsCall } from '@internal/calling-stateful-client';\n\n/**\n * @private\n */\nexport type CallContextType = {\n call: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall | undefined;\n};\n\n/**\n * Arguments to initialize a {@link CallProvider}.\n *\n * @public\n */\nexport interface CallProviderProps {\n children: React.ReactNode;\n call?: Call | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall;\n}\n\n/**\n * @private\n */\nexport const CallContext = createContext<CallContextType | undefined>(undefined);\n\n/**\n * @private\n */\nconst CallProviderBase = (props: CallProviderProps): JSX.Element => {\n const { children, call } = props;\n\n const initialState: CallContextType = {\n call\n };\n\n return <CallContext.Provider value={initialState}>{children}</CallContext.Provider>;\n};\n\n/**\n * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}.\n *\n * Calling components from this package must be wrapped with a {@link CallProvider}.\n *\n * @public\n */\nexport const CallProvider = (props: CallProviderProps): JSX.Element => <CallProviderBase {...props} />;\n\n/**\n * Hook to obtain {@link @azure/communication-calling#Call} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a Call object to use this hook\n *\n * @public\n */\nexport const useCall = (): Call | undefined => {\n const call = useContext(CallContext)?.call;\n if (call && !_isACSCall(call)) {\n throw new Error('Incorrect call type: Must provide a Regular Call object.');\n }\n return call;\n};\n\n/* @conditional-compile-remove(teams-identity-support) */\n/**\n * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider.\n *\n * Useful when implementing a custom component that utilizes the providers\n * exported from this library.\n *\n * you must have previously used the CallProvider with a TeamsCall object to use this hook\n *\n * @public\n */\nexport const useTeamsCall = (): undefined | /* @conditional-compile-remove(teams-identity-support) */ TeamsCall => {\n const call = useContext(CallContext)?.call;\n if (call && !_isTeamsCall(call)) {\n throw new Error('Incorrect call type: Must provide a TeamsCall object.');\n }\n return call;\n};\n"]}
|
@@ -14,6 +14,7 @@ class ProxyTeamsCall extends ProxyCallCommon {
|
|
14
14
|
get(target, prop) {
|
15
15
|
/* @conditional-compile-remove(teams-identity-support) */
|
16
16
|
switch (prop) {
|
17
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
17
18
|
case 'addParticipant': {
|
18
19
|
return this.getContext().withAsyncErrorTeedToState(function (...args) {
|
19
20
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
|
1
|
+
{"version":3,"file":"TeamsCallDeclarative.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/TeamsCallDeclarative.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAe1D,MAAM,cAAe,SAAQ,eAAe;IACnC,GAAG,CAA4B,MAAiB,EAAE,IAAO;QAC9D,yDAAyD;QACzD,QAAQ,IAAI,EAAE,CAAC;YACb,6CAA6C;YAC7C,KAAK,gBAAgB,CAAC,CAAC,CAAC;gBACtB,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC,yBAAyB,CAAC,UACjD,GAAG,IAA6C;;wBAEhD,OAAO,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,CAAC;oBAC9C,CAAC;iBAAA,EACD,0BAA0B,CAAC,CAAC;YAC9B,CAAC;YACD;gBACE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,IAAW,CAAC,CAAC;IACxC,CAAC;CACF;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAe,EAAE,OAAoB,EAAwB,EAAE;IAClG,MAAM,SAAS,GAAG,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;IAC9C,SAAS,CAAC,WAAW,EAAE,CAAC;IACxB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,aAAa,EAAE;QACzC,YAAY,EAAE,KAAK;QACnB,KAAK,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE;KACrC,CAAC,CAAC;IAEH,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE,SAAS,CAAyB,CAAC;AAC5D,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { ProxyCallCommon } from './CallDeclarativeCommon';\nimport { CallContext } from './CallContext';\nimport { TeamsCall } from './BetaToStableTypes';\n\n/**\n *\n * @private\n */\nexport type DeclarativeTeamsCall = TeamsCall & {\n /**\n * Stop any declarative specific subscriptions and remove declarative subscribers.\n */\n unsubscribe(): void;\n};\n\nclass ProxyTeamsCall extends ProxyCallCommon implements ProxyHandler<TeamsCall> {\n public get<P extends keyof TeamsCall>(target: TeamsCall, prop: P): any {\n /* @conditional-compile-remove(teams-identity-support) */\n switch (prop) {\n /* @conditional-compile-remove(PSTN-calls) */\n case 'addParticipant': {\n return this.getContext().withAsyncErrorTeedToState(async function (\n ...args: Parameters<TeamsCall['addParticipant']>\n ) {\n return await target.addParticipant(...args);\n },\n 'TeamsCall.addParticipant');\n }\n default:\n return super.get(target, prop as any);\n }\n return super.get(target, prop as any);\n }\n}\n\n/**\n * Creates a declarative Call by proxying Call with ProxyCall.\n * This should only be used with CallAgentDeclarative as CallAgentDeclarative will add that\n * call to the context properly (need to have the Call in context to update it - CallAgentDeclarative will add Call to\n * context)\n *\n * @param call - TeamsCall from SDK\n * @param context - CallContext from StatefulCallClient\n */\nexport const teamsCallDeclaratify = (call: TeamsCall, context: CallContext): DeclarativeTeamsCall => {\n const proxyCall = new ProxyTeamsCall(context);\n proxyCall.unsubscribe();\n Object.defineProperty(call, 'unsubscribe', {\n configurable: false,\n value: () => proxyCall.unsubscribe()\n });\n\n return new Proxy(call, proxyCall) as DeclarativeTeamsCall;\n};\n"]}
|
@@ -55,7 +55,8 @@ export type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../reac
|
|
55
55
|
export { defaultAttachmentMenuAction } from '../../react-components/src';
|
56
56
|
export type { ChatAttachmentType } from '../../react-components/src';
|
57
57
|
export type { InlineImageOptions, InlineImage } from '../../react-components/src';
|
58
|
-
export type { HoldButtonProps, HoldButtonStrings
|
58
|
+
export type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';
|
59
|
+
export type { VideoTileStrings } from '../../react-components/src';
|
59
60
|
export type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';
|
60
61
|
export type { BrowserPermissionDeniedIOSStrings, BrowserPermissionDeniedStyles, BrowserPermissionDeniedIOSProps } from '../../react-components/src';
|
61
62
|
export type { OverflowGalleryPosition } from '../../react-components/src';
|
@@ -80,4 +81,6 @@ export type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-
|
|
80
81
|
export type { SurveyIssues } from '../../react-components/src';
|
81
82
|
export type { SurveyIssuesHeadingStrings } from '../../react-components/src';
|
82
83
|
export type { CallSurveyImprovementSuggestions } from '../../react-components/src';
|
84
|
+
export { Notifications, NotificationBar } from '../../react-components/src';
|
85
|
+
export type { NotificationsProps, NotificationBarProps, NotificationBarStrings, NotificationsStrings, NotificationType, ActiveNotification } from '../../react-components/src';
|
83
86
|
//# sourceMappingURL=index.d.ts.map
|
@@ -45,4 +45,6 @@ export { UnsupportedBrowser } from '../../react-components/src';
|
|
45
45
|
export { UnsupportedBrowserVersion } from '../../react-components/src';
|
46
46
|
/* @conditional-compile-remove(unsupported-browser) */
|
47
47
|
export { UnsupportedOperatingSystem } from '../../react-components/src';
|
48
|
+
/* @conditional-compile-remove(notifications) */
|
49
|
+
export { Notifications, NotificationBar } from '../../react-components/src';
|
48
50
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAoCzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAsB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA0IpC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAsC7D,sDAAsD;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAezE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAe1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(attachment-upload) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\n/* @conditional-compile-remove(spotlight) */\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-upload) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-upload) */\nexport type {\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(attachment-upload) */\nexport type {\n AttachmentMetadata,\n AttachmentMetadataInProgress,\n AttachmentProgressError\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(attachment-download) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-download) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { SurveyIssues } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n"]}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,+BAA+B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAoCzG,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAE9C,yDAAyD;AACzD,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,iCAAiC,EAClC,MAAM,sCAAsC,CAAC;AAsB9C,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,yBAAyB,EAC1B,MAAM,mCAAmC,CAAC;AAU3C,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,UAAU,EACV,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,OAAO,EACP,WAAW,EACX,eAAe,EACf,YAAY,EACZ,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,6CAA6C;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAErD,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,yBAAyB,EACzB,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AA0IpC,mDAAmD;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAsC7D,sDAAsD;AACtD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AAgBzE,cAAc,iDAAiD,CAAC;AAChE,cAAc,oCAAoC,CAAC;AACnD,cAAc,gDAAgD,CAAC;AAG/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAe1E,cAAc,yCAAyC,CAAC;AACxD,cAAc,eAAe,CAAC;AAE9B,sDAAsD;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,sDAAsD;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE,sDAAsD;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAgBxE,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * `@azure/communication-react` is an npm package that exports the functionality of the Azure Communication Services - UI Library.\n *\n * This package makes it easy for you to build modern communications user experiences using Azure Communication Services. It gives you a library of production-ready UI components that you can drop into your applications:\n * - Composites: These components are turn-key solutions that implement common communication scenarios. You can quickly add video calling or chat experiences to your applications. Composites are open-source higher order components built using UI components.\n * - UI Components - These components are open-source building blocks that let you build custom communications experience. Components are offered for both calling and chat capabilities that can be combined to build experiences.\n *\n * These UI client libraries all use Microsoft's Fluent design language and assets. Fluent UI provides a foundational layer for the UI Library and is actively used across Microsoft products.\n *\n * In conjunction with the UI components, the UI Library exposes a stateful client library for calling and chat. This client is agnostic to any specific state management framework and can be integrated with common state managers like Redux or React Context.\n * This stateful client library can be used with the UI Components to pass props and methods for the UI Components to render data. For more information, see Stateful Client Overview.\n *\n * For more information visit: https://aka.ms/acsstorybook\n *\n * @packageDocumentation\n */\n\nexport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '../../acs-ui-common/src';\nexport type {\n AreEqual,\n CommonProperties,\n MessageStatus,\n Common,\n AreTypeEqual,\n AreParamEqual\n} from '../../acs-ui-common/src';\n\n// Not to export chat/calling specific hook from binding package\nexport type {\n CallClientProviderProps,\n CallAgentProviderProps,\n CallProviderProps,\n GetCallingSelector,\n CallingHandlers,\n CallingBaseSelectorProps,\n CommonCallingHandlers\n} from '../../calling-component-bindings/src';\n\nexport type { VideoBackgroundEffectsDependency, CallingHandlersOptions } from '../../calling-component-bindings/src';\n\nexport type { CaptionsOptions } from '../../calling-component-bindings/src';\n\nexport type {\n ChatClientProviderProps,\n ChatThreadClientProviderProps,\n GetChatSelector,\n ChatHandlers,\n ChatBaseSelectorProps\n} from '../../chat-component-bindings/src';\n\n/* @conditional-compile-remove(attachment-upload) */\nexport type { MessageOptions, ChatMessageType } from '../../acs-ui-common/src';\n\nexport {\n CallClientProvider,\n CallAgentProvider,\n CallProvider,\n useCallClient,\n useCallAgent,\n useCall,\n useDeviceManager,\n getCallingSelector,\n createDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport {\n useTeamsCallAgent,\n useTeamsCall,\n createDefaultTeamsCallingHandlers\n} from '../../calling-component-bindings/src';\n\n/* @conditional-compile-remove(teams-identity-support) */\nexport type { TeamsCallingHandlers } from '../../calling-component-bindings/src';\n\nexport type {\n ScreenShareButtonSelector,\n CameraButtonSelector,\n VideoGallerySelector,\n DevicesButtonSelector,\n EmptySelector,\n ErrorBarSelector as CallErrorBarSelector,\n ParticipantListSelector,\n MicrophoneButtonSelector,\n ParticipantsButtonSelector,\n CreateDefaultCallingHandlers\n} from '../../calling-component-bindings/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonSelector } from '../../calling-component-bindings/src';\n\nexport type { RaiseHandButtonSelector } from '../../calling-component-bindings/src';\n\nexport {\n ChatClientProvider,\n ChatThreadClientProvider,\n useChatClient,\n useChatThreadClient,\n getChatSelector,\n createDefaultChatHandlers\n} from '../../chat-component-bindings/src';\n\nexport type {\n MessageThreadSelector,\n TypingIndicatorSelector,\n ChatParticipantListSelector,\n SendBoxSelector,\n ErrorBarSelector as ChatErrorBarSelector\n} from '../../chat-component-bindings/src';\n\nexport {\n _IdentifierProvider,\n CameraButton,\n ControlBar,\n ControlBarButton,\n DevicesButton,\n EndCallButton,\n ErrorBar,\n GridLayout,\n LocalizationProvider,\n MessageStatusIndicator,\n MessageThread,\n MicrophoneButton,\n ParticipantItem,\n ParticipantList,\n ParticipantsButton,\n ScreenShareButton,\n SendBox,\n StreamMedia,\n TypingIndicator,\n VideoGallery,\n VideoTile,\n COMPONENT_LOCALE_EN_GB,\n COMPONENT_LOCALE_AR_SA,\n COMPONENT_LOCALE_CS_CZ,\n COMPONENT_LOCALE_DE_DE,\n COMPONENT_LOCALE_ES_ES,\n COMPONENT_LOCALE_FI_FI,\n COMPONENT_LOCALE_FR_FR,\n COMPONENT_LOCALE_HE_IL,\n COMPONENT_LOCALE_IT_IT,\n COMPONENT_LOCALE_JA_JP,\n COMPONENT_LOCALE_KO_KR,\n COMPONENT_LOCALE_NB_NO,\n COMPONENT_LOCALE_NL_NL,\n COMPONENT_LOCALE_PL_PL,\n COMPONENT_LOCALE_PT_BR,\n COMPONENT_LOCALE_RU_RU,\n COMPONENT_LOCALE_SV_SE,\n COMPONENT_LOCALE_TR_TR,\n COMPONENT_LOCALE_ZH_CN,\n COMPONENT_LOCALE_ZH_TW\n} from '../../react-components/src';\nexport { ImageOverlay } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from '../../react-components/src';\n\nexport { RaiseHandButton } from '../../react-components/src';\n\nexport { Dialpad } from '../../react-components/src';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n SitePermissionsStrings,\n SitePermissionsStyles,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(total-participant-count) */\nexport type { ParticipantListStrings } from '../../react-components/src';\n\n/* @conditional-compile-remove(mention) */\nexport type {\n MentionOptions,\n MentionDisplayOptions,\n MentionLookupOptions,\n Mention,\n MentionPopoverStrings\n} from '../../react-components/src';\n\nexport type {\n _IdentifierProviderProps,\n _Identifiers,\n ActiveErrorMessage,\n BaseCustomStyles,\n CallParticipantListParticipant,\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles,\n ChatMessage,\n CommunicationParticipant,\n ComponentLocale,\n ComponentSlotStyle,\n ComponentStrings,\n ContentSystemMessage,\n ControlBarButtonProps,\n ControlBarButtonStrings,\n ControlBarButtonStyles,\n ControlBarLayout,\n ControlBarProps,\n CreateVideoStreamViewResult,\n CustomAvatarOptions,\n CustomMessage,\n DevicesButtonContextualMenuStyles,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n EndCallButtonProps,\n EndCallButtonStrings,\n ErrorBarProps,\n ErrorBarStrings,\n ErrorType,\n GridLayoutProps,\n GridLayoutStyles,\n HorizontalGalleryStyles,\n JumpToNewMessageButtonProps,\n LocalizationProviderProps,\n LocalVideoCameraCycleButtonProps,\n LoadingState,\n Message,\n MessageAttachedStatus,\n MessageCommon,\n MessageContentType,\n MessageProps,\n MessageRenderer,\n MessageStatusIndicatorProps,\n MessageStatusIndicatorStrings,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings,\n MicrophoneButtonStyles,\n OnRenderAvatarCallback,\n OptionsDevice,\n ParticipantAddedSystemMessage,\n ParticipantItemProps,\n ParticipantItemStrings,\n ParticipantItemStyles,\n ParticipantListItemStyles,\n ParticipantListParticipant,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback,\n ParticipantRemovedSystemMessage,\n ParticipantState,\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles,\n ReadReceiptsBySenderId,\n ScreenShareButtonProps,\n ScreenShareButtonStrings,\n SendBoxProps,\n SendBoxStrings,\n SendBoxStylesProps,\n StreamMediaProps,\n SystemMessage,\n SystemMessageCommon,\n TopicUpdatedSystemMessage,\n TypingIndicatorProps,\n TypingIndicatorStrings,\n TypingIndicatorStylesProps,\n UpdateMessageCallback,\n CancelEditCallback,\n VideoGalleryLayout,\n VideoGalleryLocalParticipant,\n VideoGalleryParticipant,\n VideoGalleryProps,\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n VideoGalleryStrings,\n VideoGalleryStyles,\n VideoStreamOptions,\n VideoTileProps,\n VideoTileStylesProps,\n ViewScalingMode,\n VideoTileContextualMenuProps,\n VideoTileDrawerMenuProps,\n VideoTilesOptions\n} from '../../react-components/src';\n\nexport type { RaiseHandButtonProps, RaiseHandButtonStrings, RaisedHand } from '../../react-components/src';\nexport type {\n ReactionButtonStrings,\n Reaction,\n ReactionButtonProps,\n ReactionResources,\n ReactionSprite\n} from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport { RichTextSendBox } from '../../react-components/src';\n/* @conditional-compile-remove(rich-text-editor) */\nexport type { RichTextSendBoxProps, RichTextSendBoxStrings, RichTextStrings } from '../../react-components/src';\n/* @conditional-compile-remove(spotlight) */\nexport type { Spotlight } from '../../react-components/src';\nexport type { ImageOverlayProps, ImageOverlayStrings } from '../../react-components/src';\n/* @conditional-compile-remove(data-loss-prevention) */\nexport type { BlockedMessage } from '../../react-components/src';\nexport type {\n DialpadMode,\n DialpadProps,\n DialpadStrings,\n DialpadStyles,\n DtmfTone,\n LongPressTrigger\n} from '../../react-components/src';\n/* @conditional-compile-remove(attachment-download) @conditional-compile-remove(attachment-upload) */\nexport type { AttachmentOptions } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-upload) */\nexport type { SendBoxErrorBarError } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-upload) */\nexport type {\n AttachmentActionHandler,\n AttachmentSelectionHandler,\n AttachmentRemovalHandler,\n AttachmentUploadOptions,\n AttachmentUploadTask\n} from '../../react-components/src';\n\n/* @conditional-compile-remove(attachment-upload) */\nexport type {\n AttachmentMetadata,\n AttachmentMetadataInProgress,\n AttachmentProgressError\n} from '../../acs-ui-common/src';\n\n/* @conditional-compile-remove(attachment-download) */\nexport type { AttachmentMenuAction, AttachmentDownloadOptions } from '../../react-components/src';\n/* @conditional-compile-remove(attachment-download) */\nexport { defaultAttachmentMenuAction } from '../../react-components/src';\nexport type { ChatAttachmentType } from '../../react-components/src';\nexport type { InlineImageOptions, InlineImage } from '../../react-components/src';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from '../../react-components/src';\nexport type { VideoTileStrings } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type { BrowserPermissionDeniedStrings, BrowserPermissionDeniedProps } from '../../react-components/src';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedIOSProps\n} from '../../react-components/src';\nexport type { OverflowGalleryPosition } from '../../react-components/src';\nexport type { LocalVideoTileSize } from '../../react-components/src';\nexport * from '../../react-components/src/localization/locales';\nexport * from '../../react-components/src/theming';\nexport * from '../../calling-stateful-client/src/index-public';\n/* @conditional-compile-remove(one-to-n-calling) */\nexport type { DeclarativeCallAgent } from '../../calling-stateful-client/src';\nexport { createStatefulChatClient } from '../../chat-stateful-client/src';\nexport type {\n StatefulChatClient,\n StatefulChatClientArgs,\n StatefulChatClientOptions,\n ChatMessageWithStatus,\n ChatClientState,\n ChatError,\n ChatErrors,\n ChatThreadClientState,\n ChatThreadProperties,\n ChatErrorTarget\n} from '../../chat-stateful-client/src';\n\nexport type { ResourceFetchResult } from '../../chat-stateful-client/src';\nexport * from '../../react-composites/src/index-public';\nexport * from './mergedHooks';\n\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowser } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedBrowserVersion } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport { UnsupportedOperatingSystem } from '../../react-components/src';\n/* @conditional-compile-remove(unsupported-browser) */\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from '../../react-components/src';\nexport type {\n VerticalGalleryStyles,\n VerticalGalleryStrings,\n VerticalGalleryControlBarStyles\n} from '../../react-components/src';\n\nexport type { SpokenLanguageStrings, CaptionLanguageStrings } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { SurveyIssues } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { SurveyIssuesHeadingStrings } from '../../react-components/src';\n/* @conditional-compile-remove(end-of-call-survey) */\nexport type { CallSurveyImprovementSuggestions } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport { Notifications, NotificationBar } from '../../react-components/src';\n/* @conditional-compile-remove(notifications) */\nexport type {\n NotificationsProps,\n NotificationBarProps,\n NotificationBarStrings,\n NotificationsStrings,\n NotificationType,\n ActiveNotification\n} from '../../react-components/src';\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,eAAe,EAChB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAuB,IAAI,EAAE,MAAM,qBAAqB,CAAC;AA0HjF,MAAM,qBAAqB,GAA6B;IACtD,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAC9E;QACE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE;QAC7B,EAAE,KA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AAE,eAAe,EAAC,SAAS,EAAC,MAAM,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,IAChG,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,CAAC,CACjC,oBAAC,aAAa,IACZ,GAAG,EAAE,UAAU,WAAW,EAAE;gBAC5B;;;;;;;;;;;;;;;;kBAgBE;gBACF,KAAK,EAAE,WAAW,GAAG,QAAQ,GAAG,IAAI,CAAC,MAAM,EAC3C,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,OAAO,EAAE,cAAc,EACvB,WAAW,EAAE,kBAAkB,EAC/B,gBAAgB,EAAE,gBAAgB,EAClC,oBAAoB,EAAE,oBAAoB,CAAC,OAAO,EAClD,mBAAmB,EAAE,mBAAmB,GACxC,CACH,CAAC,CACI,CACT,CAAC;QACJ,CAAC,CAAC,CACQ,CACN,CACT,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAe,EAAE;IAC1D,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IAElD,MAAM,OAAO,mCAAQ,aAAa,GAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IACvD,OAAO,oBAAC,gBAAgB,kBAAC,OAAO,EAAE,OAAO,IAAM,KAAK,EAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,sFAAsF;IACtF,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\n\nimport { IconButton } from '@fluentui/react';\nimport {\n concatStyleSets,\n DefaultButton,\n FocusZone,\n mergeStyles,\n Stack,\n Text,\n TextField,\n useTheme\n} from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\nimport { useLocale } from '../../localization';\nimport {\n buttonStyles,\n containerStyles,\n iconButtonStyles,\n digitStyles,\n letterStyles,\n textFieldStyles\n} from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\n\nimport { dtmfFrequencies, DtmfFrequenciesKeys, Tone } from './DTMFToneGenerator';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @public\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @public\n */\nexport type DtmfTone =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'Flash'\n | 'Num0'\n | 'Num1'\n | 'Num2'\n | 'Num3'\n | 'Num4'\n | 'Num5'\n | 'Num6'\n | 'Num7'\n | 'Num8'\n | 'Num9'\n | 'Pound'\n | 'Star';\n\n/**\n * Modes of the dialpad component.\n * @public\n */\nexport type DialpadMode = 'dtmf' | 'dialer';\n\n/**\n * Modes of how the longpress handlers can be tiggered.\n * @public\n */\nexport type LongPressTrigger = 'mouseAndTouch' | 'touch';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /**\n * function to send dtmf tones on button click\n */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /**\n * Callback for dialpad button behavior\n */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /**\n * set dialpad textfield content\n */\n textFieldValue?: string;\n /**\n * on change function for text field, provides an unformatted plain text\n */\n onChange?: (input: string) => void;\n /**\n * flag to determine when to show/hide delete button, default true\n */\n showDeleteButton?: boolean;\n /**\n * Determines what kind of device that the user is on and should respect that based on interaction\n * interfaces available to the user\n */\n longPressTrigger?: LongPressTrigger;\n /**\n * Styles for customizing the dialpad component\n */\n styles?: DialpadStyles;\n /**\n * Disables DTMF sounds when dialpad buttons are pressed. the actual\n * tones are still sent to the call.\n */\n disableDtmfPlayback?: boolean;\n /**\n * Dialer mode for the dialpad. The dtmf mode is for sending dtmf tones and the appearence of\n * the dialpad is changed like hiding the input box. When using dialer mode the input box is there\n * and can be edited to change the number being dialed.\n */\n dialpadMode?: DialpadMode;\n /**\n * Audio context for generating DTMF tones. If this if not provided the dialpad will create one iteslf.\n */\n dtmfAudioContext?: AudioContext;\n}\n\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: DtmfFrequenciesKeys;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\n\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [\n [{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],\n [\n { digit: '4', letter: 'GHI' },\n { digit: '5', letter: 'JKL' },\n { digit: '6', letter: 'MNO' }\n ],\n [\n { digit: '7', letter: 'PQRS' },\n { digit: '8', letter: 'TUV' },\n { digit: '9', letter: 'WXYZ' }\n ],\n [{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]\n];\n\nconst DtmfTones: DtmfTone[] = [\n 'Num1',\n 'Num2',\n 'Num3',\n 'Num4',\n 'Num5',\n 'Num6',\n 'Num7',\n 'Num8',\n 'Num9',\n 'Star',\n 'Num0',\n 'Pound'\n];\n\nconst DialpadButton = (props: {\n digit: DtmfFrequenciesKeys;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n longPressTrigger: LongPressTrigger;\n dtmfToneAudioContext: AudioContext;\n disableDtmfPlayback?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n\n const { digit, index, onClick, onLongPress, longPressTrigger, dtmfToneAudioContext, disableDtmfPlayback } = props;\n const [buttonPressed, setButtonPressed] = useState(false);\n\n const dtmfToneSound = useRef<Tone>(\n new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2)\n );\n\n const useLongPressProps = React.useMemo(\n () => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: longPressTrigger === 'touch'\n }),\n [digit, index, longPressTrigger, onClick, onLongPress]\n );\n\n const longPressHandlers = useLongPress(useLongPressProps);\n\n return (\n <DefaultButton\n data-test-id={`dialpad-button-${props.index}`}\n styles={concatStyleSets(buttonStyles(theme), props.styles?.button)}\n {...longPressHandlers}\n onKeyDown={(e) => {\n if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onKeyDown();\n setButtonPressed(true);\n return;\n }\n if (\n e.key === 'Tab' ||\n e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown'\n ) {\n dtmfToneSound.current.stop();\n }\n longPressHandlers.onKeyDown();\n }}\n onKeyUp={(e) => {\n if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {\n dtmfToneSound.current.stop();\n longPressHandlers.onKeyUp();\n setButtonPressed(false);\n }\n longPressHandlers.onKeyUp();\n }}\n onMouseDown={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onMouseDown();\n }}\n onMouseUp={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onMouseUp();\n }}\n onMouseLeave={() => {\n dtmfToneSound.current.stop();\n }}\n onTouchStart={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onTouchStart();\n }}\n onTouchEnd={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onTouchEnd();\n }}\n >\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>\n );\n};\n\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n longPressTrigger?: LongPressTrigger;\n styles?: DialpadStyles;\n disableDtmfPlayback?: boolean;\n dialpadMode?: DialpadMode;\n dtmfAudioContext?: AudioContext;\n}): JSX.Element => {\n const theme = useTheme();\n\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n longPressTrigger = 'mouseAndTouch',\n disableDtmfPlayback,\n dialpadMode = 'dialer',\n dtmfAudioContext\n } = props;\n\n const dtmfToneAudioContext = useRef(dtmfAudioContext ? dtmfAudioContext : new AudioContext());\n\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n const plainTextValuePreviousRenderValue = useRef(plainTextValue);\n\n useEffect(() => {\n if (plainTextValuePreviousRenderValue.current !== plainTextValue) {\n onChange?.(plainTextValue);\n }\n plainTextValuePreviousRenderValue.current = plainTextValue;\n }, [plainTextValuePreviousRenderValue, plainTextValue, onChange]);\n\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n\n return (\n <Stack\n className={mergeStyles(containerStyles(theme), props.styles?.root)}\n data-test-id=\"dialpadContainer\"\n data-ui-id=\"dialpadContainer\"\n horizontalAlign={'center'}\n >\n {dialpadMode === 'dialer' && (\n <TextField\n styles={concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), props.styles?.textField)}\n value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }}\n onClick={(e) => {\n e.preventDefault();\n }}\n placeholder={props.strings.placeholderText}\n data-test-id=\"dialpad-input\"\n onRenderSuffix={(): JSX.Element => (\n <>\n {showDeleteButton && plainTextValue.length !== 0 && (\n <IconButton\n ariaLabel={props.strings.deleteButtonAriaLabel}\n onClick={deleteNumbers}\n styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)}\n iconProps={{ iconName: 'DialpadBackspace' }}\n />\n )}\n </>\n )}\n />\n )}\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return (\n <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\" tokens={{ childrenGap: '1rem' }}>\n {rows.map((button, columnIndex) => (\n <DialpadButton\n key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */\n index={columnIndex + rowIndex * rows.length}\n digit={button.digit}\n letter={button.letter}\n styles={props.styles}\n onClick={onClickDialpad}\n onLongPress={onLongPressDialpad}\n longPressTrigger={longPressTrigger}\n dtmfToneAudioContext={dtmfToneAudioContext.current}\n disableDtmfPlayback={disableDtmfPlayback}\n />\n ))}\n </Stack>\n );\n })}\n </FocusZone>\n </Stack>\n );\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @public\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n const localeStrings = useLocale().strings.dialpad;\n\n const strings = { ...localeStrings, ...props.strings };\n return <DialpadContainer strings={strings} {...props} />;\n};\n\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\n"]}
|
1
|
+
{"version":3,"file":"Dialpad.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Dialpad/Dialpad.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,EACT,MAAM,iBAAiB,CA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AAC,CACI,CACT,CAAC;QACJ,CAAC,CAAC,CACQ,CACN,CACT,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAe,EAAE;IAC1D,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;IAElD,MAAM,OAAO,mCAAQ,aAAa,GAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IACvD,OAAO,oBAAC,gBAAgB,kBAAC,OAAO,EAAE,OAAO,IAAM,KAAK,EAAI,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE;IAC9C,sFAAsF;IACtF,OAAO,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AACxC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef } from 'react';\nimport { IStyle, IButtonStyles, ITextFieldStyles } from '@fluentui/react';\n\nimport { IconButton } from '@fluentui/react';\nimport {\n concatStyleSets,\n DefaultButton,\n FocusZone,\n mergeStyles,\n Stack,\n Text,\n TextField,\n useTheme\n} from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { useState } from 'react';\nimport { useLocale } from '../../localization';\nimport {\n buttonStyles,\n containerStyles,\n iconButtonStyles,\n digitStyles,\n letterStyles,\n textFieldStyles\n} from '../styles/Dialpad.styles';\nimport { formatPhoneNumber } from '../utils/formatPhoneNumber';\nimport useLongPress from '../utils/useLongPress';\n\nimport { dtmfFrequencies, DtmfFrequenciesKeys, Tone } from './DTMFToneGenerator';\n\n/**\n * Strings of {@link Dialpad} that can be overridden.\n *\n * @public\n */\nexport interface DialpadStrings {\n placeholderText: string;\n deleteButtonAriaLabel?: string;\n}\n\n/**\n * Styles for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadStyles {\n root?: IStyle;\n button?: IButtonStyles;\n textField?: Partial<ITextFieldStyles>;\n digit?: IStyle;\n letter?: IStyle;\n deleteIcon?: IButtonStyles;\n}\n\n/**\n * DTMF tone for PSTN calls.\n *\n * @public\n */\nexport type DtmfTone =\n | 'A'\n | 'B'\n | 'C'\n | 'D'\n | 'Flash'\n | 'Num0'\n | 'Num1'\n | 'Num2'\n | 'Num3'\n | 'Num4'\n | 'Num5'\n | 'Num6'\n | 'Num7'\n | 'Num8'\n | 'Num9'\n | 'Pound'\n | 'Star';\n\n/**\n * Modes of the dialpad component.\n * @public\n */\nexport type DialpadMode = 'dtmf' | 'dialer';\n\n/**\n * Modes of how the longpress handlers can be tiggered.\n * @public\n */\nexport type LongPressTrigger = 'mouseAndTouch' | 'touch';\n\n/**\n * Props for {@link Dialpad} component.\n *\n * @public\n */\nexport interface DialpadProps {\n strings?: DialpadStrings;\n /**\n * function to send dtmf tones on button click\n */\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /**\n * Callback for dialpad button behavior\n */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /**\n * set dialpad textfield content\n */\n textFieldValue?: string;\n /**\n * on change function for text field, provides an unformatted plain text\n */\n onChange?: (input: string) => void;\n /**\n * flag to determine when to show/hide delete button, default true\n */\n showDeleteButton?: boolean;\n /**\n * Determines what kind of device that the user is on and should respect that based on interaction\n * interfaces available to the user\n */\n longPressTrigger?: LongPressTrigger;\n /**\n * Styles for customizing the dialpad component\n */\n styles?: DialpadStyles;\n /**\n * Disables DTMF sounds when dialpad buttons are pressed. the actual\n * tones are still sent to the call.\n */\n disableDtmfPlayback?: boolean;\n /**\n * Dialer mode for the dialpad. The dtmf mode is for sending dtmf tones and the appearence of\n * the dialpad is changed like hiding the input box. When using dialer mode the input box is there\n * and can be edited to change the number being dialed.\n */\n dialpadMode?: DialpadMode;\n /**\n * Audio context for generating DTMF tones. If this if not provided the dialpad will create one iteslf.\n */\n dtmfAudioContext?: AudioContext;\n}\n\ntype DialpadButtonContent = {\n /** Number displayed on each dialpad button */\n digit: DtmfFrequenciesKeys;\n /** Letters displayed on each dialpad button */\n letter?: string;\n};\n\nconst dialPadButtonsDefault: DialpadButtonContent[][] = [\n [{ digit: '1' }, { digit: '2', letter: 'ABC' }, { digit: '3', letter: 'DEF' }],\n [\n { digit: '4', letter: 'GHI' },\n { digit: '5', letter: 'JKL' },\n { digit: '6', letter: 'MNO' }\n ],\n [\n { digit: '7', letter: 'PQRS' },\n { digit: '8', letter: 'TUV' },\n { digit: '9', letter: 'WXYZ' }\n ],\n [{ digit: '*' }, { digit: '0', letter: '+' }, { digit: '#' }]\n];\n\nconst DtmfTones: DtmfTone[] = [\n 'Num1',\n 'Num2',\n 'Num3',\n 'Num4',\n 'Num5',\n 'Num6',\n 'Num7',\n 'Num8',\n 'Num9',\n 'Star',\n 'Num0',\n 'Pound'\n];\n\nconst DialpadButton = (props: {\n digit: DtmfFrequenciesKeys;\n letter?: string;\n styles?: DialpadStyles;\n index: number;\n onClick: (input: string, index: number) => void;\n onLongPress: (input: string, index: number) => void;\n longPressTrigger: LongPressTrigger;\n dtmfToneAudioContext: AudioContext;\n disableDtmfPlayback?: boolean;\n}): JSX.Element => {\n const theme = useTheme();\n\n const { digit, index, onClick, onLongPress, longPressTrigger, dtmfToneAudioContext, disableDtmfPlayback } = props;\n const [buttonPressed, setButtonPressed] = useState(false);\n\n const dtmfToneSound = useRef<Tone>(\n new Tone(dtmfToneAudioContext, dtmfFrequencies[digit].f1, dtmfFrequencies[digit].f2)\n );\n\n const useLongPressProps = React.useMemo(\n () => ({\n onClick: async () => {\n onClick(digit, index);\n },\n onLongPress: async () => {\n onLongPress(digit, index);\n },\n touchEventsOnly: longPressTrigger === 'touch'\n }),\n [digit, index, longPressTrigger, onClick, onLongPress]\n );\n\n const longPressHandlers = useLongPress(useLongPressProps);\n\n return (\n <DefaultButton\n data-test-id={`dialpad-button-${props.index}`}\n styles={concatStyleSets(buttonStyles(theme), props.styles?.button)}\n {...longPressHandlers}\n onKeyDown={(e) => {\n if ((e.key === 'Enter' || e.key === ' ') && !buttonPressed) {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onKeyDown();\n setButtonPressed(true);\n return;\n }\n if (\n e.key === 'Tab' ||\n e.key === 'ArrowLeft' ||\n e.key === 'ArrowRight' ||\n e.key === 'ArrowUp' ||\n e.key === 'ArrowDown'\n ) {\n dtmfToneSound.current.stop();\n return;\n }\n longPressHandlers.onKeyDown();\n }}\n onKeyUp={(e) => {\n if ((e.key === 'Enter' || e.key === ' ') && buttonPressed) {\n dtmfToneSound.current.stop();\n longPressHandlers.onKeyUp();\n setButtonPressed(false);\n }\n longPressHandlers.onKeyUp();\n }}\n onMouseDown={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onMouseDown();\n }}\n onMouseUp={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onMouseUp();\n }}\n onMouseLeave={() => {\n dtmfToneSound.current.stop();\n }}\n onTouchStart={() => {\n if (!disableDtmfPlayback) {\n dtmfToneSound.current.play();\n }\n longPressHandlers.onTouchStart();\n }}\n onTouchEnd={() => {\n dtmfToneSound.current.stop();\n longPressHandlers.onTouchEnd();\n }}\n >\n <Stack>\n <Text className={mergeStyles(digitStyles(theme), props.styles?.digit)}>{props.digit}</Text>\n\n <Text className={mergeStyles(letterStyles(theme), props.styles?.letter)}>{props.letter ?? ' '}</Text>\n </Stack>\n </DefaultButton>\n );\n};\n\nconst DialpadContainer = (props: {\n strings: DialpadStrings;\n onSendDtmfTone?: (dtmfTone: DtmfTone) => Promise<void>;\n /** Callback for dialpad button behavior */\n onClickDialpadButton?: (buttonValue: string, buttonIndex: number) => void;\n /** Pass in custom content to dialpad textfield */\n textFieldValue?: string;\n /** on change function for text field, provides an unformatted plain text */\n onChange?: (input: string) => void;\n /** boolean input to determine when to show/hide delete button, default true */\n showDeleteButton?: boolean;\n /** boolean input to determine if dialpad is in mobile view, default false */\n longPressTrigger?: LongPressTrigger;\n styles?: DialpadStyles;\n disableDtmfPlayback?: boolean;\n dialpadMode?: DialpadMode;\n dtmfAudioContext?: AudioContext;\n}): JSX.Element => {\n const theme = useTheme();\n\n const {\n onSendDtmfTone,\n onClickDialpadButton,\n textFieldValue,\n onChange,\n showDeleteButton = true,\n longPressTrigger = 'mouseAndTouch',\n disableDtmfPlayback,\n dialpadMode = 'dialer',\n dtmfAudioContext\n } = props;\n\n const dtmfToneAudioContext = useRef(dtmfAudioContext ? dtmfAudioContext : new AudioContext());\n\n const [plainTextValue, setPlainTextValue] = useState(textFieldValue ?? '');\n const plainTextValuePreviousRenderValue = useRef(plainTextValue);\n\n useEffect(() => {\n if (plainTextValuePreviousRenderValue.current !== plainTextValue) {\n onChange?.(plainTextValue);\n }\n plainTextValuePreviousRenderValue.current = plainTextValue;\n }, [plainTextValuePreviousRenderValue, plainTextValue, onChange]);\n\n useEffect(() => {\n setText(textFieldValue ?? '');\n }, [textFieldValue]);\n\n const onClickDialpad = (input: string, index: number): void => {\n setText(plainTextValue + input);\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n const onLongPressDialpad = (input: string, index: number): void => {\n if (input === '0' && index === 10) {\n setText(plainTextValue + '+');\n } else {\n setText(plainTextValue + input);\n }\n if (onSendDtmfTone) {\n onSendDtmfTone(DtmfTones[index]);\n }\n if (onClickDialpadButton) {\n onClickDialpadButton(input, index);\n }\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const setText = (input: string): void => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n const plainInput = sanitizeInput(input);\n setPlainTextValue(plainInput);\n };\n\n const deleteNumbers = (): void => {\n const modifiedInput = plainTextValue.substring(0, plainTextValue.length - 1);\n setText(modifiedInput);\n };\n\n return (\n <Stack\n className={mergeStyles(containerStyles(theme), props.styles?.root)}\n data-test-id=\"dialpadContainer\"\n data-ui-id=\"dialpadContainer\"\n horizontalAlign={'center'}\n >\n {dialpadMode === 'dialer' && (\n <TextField\n styles={concatStyleSets(textFieldStyles(theme, plainTextValue !== ''), props.styles?.textField)}\n value={textFieldValue ? textFieldValue : formatPhoneNumber(plainTextValue)}\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onChange={(e: any) => {\n setText(e.target.value);\n }}\n onClick={(e) => {\n e.preventDefault();\n }}\n placeholder={props.strings.placeholderText}\n data-test-id=\"dialpad-input\"\n onRenderSuffix={(): JSX.Element => (\n <>\n {showDeleteButton && plainTextValue.length !== 0 && (\n <IconButton\n ariaLabel={props.strings.deleteButtonAriaLabel}\n onClick={deleteNumbers}\n styles={concatStyleSets(iconButtonStyles(theme), props.styles?.deleteIcon)}\n iconProps={{ iconName: 'DialpadBackspace' }}\n />\n )}\n </>\n )}\n />\n )}\n <FocusZone>\n {dialPadButtonsDefault.map((rows, rowIndex) => {\n return (\n <Stack horizontal key={`row_${rowIndex}`} horizontalAlign=\"stretch\" tokens={{ childrenGap: '1rem' }}>\n {rows.map((button, columnIndex) => (\n <DialpadButton\n key={`button_${columnIndex}`}\n /* row index = 0\n columnIndex: (0,1,2) => (0,1,2)\n row index = 1\n columnIndex: (0,1,2)=> (3,4,5)\n row index = 2\n columnIndex: (0,1,2)=> (6,7,8)\n row index = 3\n columnIndex: (0,1,2)=> (9,10,11)\n columnIndex + rowIndex*rows.length calculates the corresponding index for each button\n dialpad index:\n 0 1 2\n 3 4 5\n 6 7 8\n 9 10 11\n then use this index to locate the corresponding dtmf tones\n DtmfTones[index]\n */\n index={columnIndex + rowIndex * rows.length}\n digit={button.digit}\n letter={button.letter}\n styles={props.styles}\n onClick={onClickDialpad}\n onLongPress={onLongPressDialpad}\n longPressTrigger={longPressTrigger}\n dtmfToneAudioContext={dtmfToneAudioContext.current}\n disableDtmfPlayback={disableDtmfPlayback}\n />\n ))}\n </Stack>\n );\n })}\n </FocusZone>\n </Stack>\n );\n};\n\n/**\n * A component to allow users to enter phone number through clicking on dialpad/using keyboard\n * It will return empty component for stable builds\n *\n * @public\n */\nexport const Dialpad = (props: DialpadProps): JSX.Element => {\n const localeStrings = useLocale().strings.dialpad;\n\n const strings = { ...localeStrings, ...props.strings };\n return <DialpadContainer strings={strings} {...props} />;\n};\n\nconst sanitizeInput = (input: string): string => {\n // remove non-valid characters from input: letters,special characters excluding +, *,#\n return input.replace(/[^\\d*#+]/g, '');\n};\n"]}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { IIconProps } from '@fluentui/react';
|
3
|
+
/**
|
4
|
+
* Props for {@link NotificationBar}.
|
5
|
+
*
|
6
|
+
* @beta
|
7
|
+
*/
|
8
|
+
export interface NotificationBarProps {
|
9
|
+
/**
|
10
|
+
* Notification bar strings;
|
11
|
+
*/
|
12
|
+
notificationBarStrings?: NotificationBarStrings;
|
13
|
+
/**
|
14
|
+
* Notification bar icon;
|
15
|
+
*/
|
16
|
+
notificationBarIconProps?: IIconProps;
|
17
|
+
/**
|
18
|
+
* If set, notifications will automatically dismiss after 5 seconds
|
19
|
+
* @defaultValue false
|
20
|
+
*/
|
21
|
+
autoDismiss?: boolean;
|
22
|
+
/**
|
23
|
+
* If set, notifications will be shown in a stacked effect
|
24
|
+
* @defaultValue false
|
25
|
+
*/
|
26
|
+
showStackedEffect?: boolean;
|
27
|
+
/**
|
28
|
+
* Callback called when the button inside notification bar is clicked.
|
29
|
+
*/
|
30
|
+
onClick?: () => void;
|
31
|
+
/**
|
32
|
+
* Callback called when the notification is dismissed.
|
33
|
+
*/
|
34
|
+
onDismiss?: () => void;
|
35
|
+
}
|
36
|
+
/**
|
37
|
+
* All strings that may be shown on the UI in the {@link NotificationBar}.
|
38
|
+
*
|
39
|
+
* @beta
|
40
|
+
*/
|
41
|
+
export interface NotificationBarStrings {
|
42
|
+
/**
|
43
|
+
* Notification bar title.
|
44
|
+
*/
|
45
|
+
title: string;
|
46
|
+
/**
|
47
|
+
* Notification bar close button aria label
|
48
|
+
*/
|
49
|
+
closeButtonAriaLabel: string;
|
50
|
+
/**
|
51
|
+
* Notification bar message.
|
52
|
+
*/
|
53
|
+
message?: string;
|
54
|
+
/**
|
55
|
+
* Notification bar button label
|
56
|
+
*/
|
57
|
+
buttonLabel?: string;
|
58
|
+
}
|
59
|
+
/**
|
60
|
+
* A component to show notification messages on the UI.
|
61
|
+
*
|
62
|
+
* @beta
|
63
|
+
*/
|
64
|
+
export declare const NotificationBar: (props: NotificationBarProps) => JSX.Element;
|
65
|
+
//# sourceMappingURL=NotificationBar.d.ts.map
|