@azure/communication-react 1.25.0-alpha-202502190016 → 1.25.0-alpha-202502210016

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.
Files changed (17) hide show
  1. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DbT6eOZX.js → ChatMessageComponentAsRichTextEditBox-DsokkWhL.js} +2 -3
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DbT6eOZX.js.map → ChatMessageComponentAsRichTextEditBox-DsokkWhL.js.map} +1 -1
  3. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-NiF-fAKy.js → RichTextSendBoxWrapper-_CM_ICZr.js} +2 -3
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-NiF-fAKy.js.map → RichTextSendBoxWrapper-_CM_ICZr.js.map} +1 -1
  5. package/dist/dist-cjs/communication-react/{index-XSIxbvhZ.js → index-B1vKDCnW.js} +26 -20
  6. package/dist/dist-cjs/communication-react/index-B1vKDCnW.js.map +1 -0
  7. package/dist/dist-cjs/communication-react/index.js +1 -2
  8. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +6 -3
  12. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.d.ts +6 -0
  14. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +15 -12
  15. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  16. package/package.json +1 -1
  17. package/dist/dist-cjs/communication-react/index-XSIxbvhZ.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-XSIxbvhZ.js');
3
+ var index = require('./index-B1vKDCnW.js');
4
4
  require('react');
5
5
  require('@fluentui/react');
6
6
  require('@fluentui/react-components');
@@ -27,7 +27,6 @@ require('html-react-parser');
27
27
  require('react-linkify');
28
28
  require('dompurify');
29
29
  require('react-use-draggable-scroll');
30
- require('@fluentui/react-window-provider');
31
30
  require('copy-to-clipboard');
32
31
  require('@azure/communication-chat');
33
32
  require('nanoid');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.25.0-alpha-202502190016';
5
+ module.exports = '1.25.0-alpha-202502210016';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -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.25.0-alpha-202502190016';\n"]}
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.25.0-alpha-202502210016';\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo } from './baseSelectors';
3
+ import { getDeviceManager, getDiagnostics, getLatestErrors, getEnvironmentInfo, getCallState } from './baseSelectors';
4
4
  /* @conditional-compile-remove(breakout-rooms) */
5
5
  import { getAssignedBreakoutRoom } from './baseSelectors';
6
6
  import { getLatestNotifications } from './baseSelectors';
@@ -21,10 +21,11 @@ export const notificationStackSelector = createSelector([
21
21
  getLatestNotifications,
22
22
  getDiagnostics,
23
23
  getDeviceManager,
24
+ getCallState,
24
25
  getEnvironmentInfo,
25
26
  getMeetingConferencePhones,
26
27
  /* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom
27
- ], (latestErrors, latestNotifications, diagnostics, deviceManager, environmentInfo, meetingConference,
28
+ ], (latestErrors, latestNotifications, diagnostics, deviceManager, callStatus, environmentInfo, meetingConference,
28
29
  /* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom) => {
29
30
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
30
31
  // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.
@@ -152,7 +153,9 @@ export const notificationStackSelector = createSelector([
152
153
  }
153
154
  //below is for active notifications
154
155
  const activeNotifications = [];
155
- if ((_u = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.speakingWhileMicrophoneIsMuted) === null || _u === void 0 ? void 0 : _u.value) {
156
+ if (((_u = diagnostics === null || diagnostics === void 0 ? void 0 : diagnostics.media.latest.speakingWhileMicrophoneIsMuted) === null || _u === void 0 ? void 0 : _u.value) &&
157
+ // only show this notification when the participant is in an active call and not on screens such as Lobby
158
+ callStatus === 'Connected') {
156
159
  activeNotifications.push({
157
160
  type: 'speakingWhileMuted',
158
161
  timestamp: new Date(Date.now()),
@@ -1 +1 @@
1
- {"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAI7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAejE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B,cAAc,CAChF;IACE,eAAe;IACf,sBAAsB;IACtB,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,iDAAiD,CAAC,uBAAuB;CAC1E,EACD,CACE,YAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB;AACjB,iDAAiD,CAAC,oBAAoB,EACoB,EAAE;;IAC5F,sHAAsH;IACtH,8CAA8C;IAC9C,wEAAwE;IACxE,iCAAiC;IAC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AAC;IACL,CAAC;IAED,IAAI,mBAAmB,CAAC,2BAA2B,CAAC,EAAE,CAAC;QACrD,mBAAmB,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,2BAA2B;YACjC,SAAS,EAAE,mBAAmB,CAAC,2BAA2B,CAAC,CAAC,SAAS;SACtE,CAAC,CAAC;IACL,CAAC;IAED,gDAAgD;IAChD,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,EAAE,CAAC;QAC/C,mBAAmB,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,qBAAqB;YAC3B,SAAS,EAAE,mBAAmB,CAAC,qBAAqB,CAAC,CAAC,SAAS;YAC/D,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;IACD,gDAAgD;IAChD,IAAI,mBAAmB,CAAC,mBAAmB,CAAC,EAAE,CAAC;QAC7C,mBAAmB,CAAC,IAAI,CAAC;YACvB,IAAI,EAAE,mBAAmB;YACzB,SAAS,EAAE,mBAAmB,CAAC,mBAAmB,CAAC,CAAC,SAAS;YAC7D,WAAW,EAAE,IAAI;SAClB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;AAChG,CAAC,CACF,CAAC;AAEF,MAAM,0BAA0B,GAAG,CACjC,mBAAyC,EACzC,YAAwB,EACxB,MAAuB,EACvB,eAAiC,EAC3B,EAAE;IACR,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallingBaseSelectorProps,\n getDeviceManager,\n getDiagnostics,\n getLatestErrors,\n getEnvironmentInfo\n} from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { getAssignedBreakoutRoom } from './baseSelectors';\n\nimport { getLatestNotifications } from './baseSelectors';\n\nimport { getMeetingConferencePhones } from './baseSelectors';\n\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\n\nimport { createSelector } from 'reselect';\n\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector(\n [\n getLatestErrors,\n getLatestNotifications,\n getDiagnostics,\n getDeviceManager,\n getEnvironmentInfo,\n getMeetingConferencePhones,\n /* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom\n ],\n (\n latestErrors: CallErrors,\n latestNotifications,\n diagnostics,\n deviceManager,\n environmentInfo,\n meetingConference,\n /* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom\n ): { activeErrorMessages: ActiveNotification[]; activeNotifications: ActiveNotification[] } => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({ type: 'teamsMeetingCallNetworkQualityLow' });\n } else {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'cameraFrozenForRemoteParticipants' });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'startScreenShareGeneric' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n if (\n latestNotifications &&\n !latestNotifications['capabilityUnmuteMicAbsent'] &&\n !latestNotifications['capabilityUnmuteMicPresent']\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'VideoEffectsFeature.startEffects',\n 'unableToStartVideoEffect'\n );\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n if (\n latestErrors['Call.feature']?.message.match(\n /Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g\n )\n ) {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'Call.feature',\n 'startSpotlightWhileMaxParticipantsAreSpotlighted'\n );\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomClosed']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomClosed',\n timestamp: latestNotifications['assignedBreakoutRoomClosed'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeStarted']) {\n activeNotifications.push({\n type: 'togetherModeStarted',\n timestamp: latestNotifications['togetherModeStarted'].timestamp,\n autoDismiss: true\n });\n }\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeEnded']) {\n activeNotifications.push({\n type: 'togetherModeEnded',\n timestamp: latestNotifications['togetherModeEnded'].timestamp,\n autoDismiss: true\n });\n }\n\n return { activeErrorMessages: activeErrorMessages, activeNotifications: activeNotifications };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: NotificationType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n"]}
1
+ {"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,YAAY,EACb,MAAM,iBAAiB,CAAC;AACzB,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAI7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAejE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B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ACxB,MAAuB,EACvB,eAAiC,EAC3B,EAAE;IACR,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallingBaseSelectorProps,\n getDeviceManager,\n getDiagnostics,\n getLatestErrors,\n getEnvironmentInfo,\n getCallState\n} from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { getAssignedBreakoutRoom } from './baseSelectors';\n\nimport { getLatestNotifications } from './baseSelectors';\n\nimport { getMeetingConferencePhones } from './baseSelectors';\n\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\n\nimport { createSelector } from 'reselect';\n\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector(\n [\n getLatestErrors,\n getLatestNotifications,\n getDiagnostics,\n getDeviceManager,\n getCallState,\n getEnvironmentInfo,\n getMeetingConferencePhones,\n /* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom\n ],\n (\n latestErrors: CallErrors,\n latestNotifications,\n diagnostics,\n deviceManager,\n callStatus,\n environmentInfo,\n meetingConference,\n /* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom\n ): { activeErrorMessages: ActiveNotification[]; activeNotifications: ActiveNotification[] } => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({ type: 'teamsMeetingCallNetworkQualityLow' });\n } else {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'cameraFrozenForRemoteParticipants' });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'startScreenShareGeneric' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n if (\n latestNotifications &&\n !latestNotifications['capabilityUnmuteMicAbsent'] &&\n !latestNotifications['capabilityUnmuteMicPresent']\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'VideoEffectsFeature.startEffects',\n 'unableToStartVideoEffect'\n );\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n if (\n latestErrors['Call.feature']?.message.match(\n /Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g\n )\n ) {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'Call.feature',\n 'startSpotlightWhileMaxParticipantsAreSpotlighted'\n );\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (\n diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value &&\n // only show this notification when the participant is in an active call and not on screens such as Lobby\n callStatus === 'Connected'\n ) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomClosed']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomClosed',\n timestamp: latestNotifications['assignedBreakoutRoomClosed'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeStarted']) {\n activeNotifications.push({\n type: 'togetherModeStarted',\n timestamp: latestNotifications['togetherModeStarted'].timestamp,\n autoDismiss: true\n });\n }\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeEnded']) {\n activeNotifications.push({\n type: 'togetherModeEnded',\n timestamp: latestNotifications['togetherModeEnded'].timestamp,\n autoDismiss: true\n });\n }\n\n return { activeErrorMessages: activeErrorMessages, activeNotifications: activeNotifications };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: NotificationType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n"]}
@@ -5,6 +5,12 @@ export interface _ExtendedIModalProps extends IModalProps {
5
5
  minDragPosition?: _ICoordinates;
6
6
  maxDragPosition?: _ICoordinates;
7
7
  dataUiId?: string;
8
+ /**
9
+ * Originally the FluentUI modal used window to capture key events that trigger the move/close menu.
10
+ * As we want to avoid global listeners, we are allowing the user to pass in a specific element
11
+ * to capture the key events.
12
+ */
13
+ keyEventElement?: HTMLElement | Window;
8
14
  }
9
15
  /** @internal */
10
16
  export type _ICoordinates = {
@@ -8,7 +8,6 @@
8
8
  import * as React from 'react';
9
9
  import { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';
10
10
  import { allowOverscrollOnElement, allowScrollOnElement, AnimationVariables, classNamesFunction, DirectionalHint, elementContains, EventGroup, FocusTrapZone, getGlobalClassNames, getPropsWithDefaults, Icon, KeyCodes, Layer, memoizeFunction, mergeStyles, on, Overlay, Popup, ResponsiveMode, styled, useResponsiveMode, ZIndexes } from '@fluentui/react';
11
- import { useWindow } from '@fluentui/react-window-provider';
12
11
  const animationDuration = AnimationVariables.durationValue2;
13
12
  const ZERO = { x: 0, y: 0 };
14
13
  const DEFAULT_PROPS = {
@@ -43,20 +42,21 @@ const useComponentRef = (props, focusTrapZone) => {
43
42
  const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
44
43
  var _a;
45
44
  const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);
46
- const { allowTouchBodyScroll, className, children, containerClassName, scrollableContentClassName, elementToFocusOnDismiss, firstFocusableSelector, forceFocusInsideTrap, ignoreExternalFocusing, isBlocking, isAlert, isClickableOutsideFocusTrap, isDarkOverlay, onDismiss, layerProps, overlay, isOpen, titleAriaId, styles, subtitleAriaId, theme, topOffsetFixed, responsiveMode, onLayerDidMount, isModeless, dragOptions, onDismissed, minDragPosition, maxDragPosition, dataUiId } = props;
45
+ const { allowTouchBodyScroll, className, children, containerClassName, scrollableContentClassName, elementToFocusOnDismiss, firstFocusableSelector, forceFocusInsideTrap, ignoreExternalFocusing, isBlocking, isAlert, isClickableOutsideFocusTrap, isDarkOverlay, onDismiss, layerProps, overlay, isOpen, titleAriaId, styles, subtitleAriaId, theme, topOffsetFixed, responsiveMode, onLayerDidMount, isModeless, dragOptions, onDismissed, minDragPosition, maxDragPosition, dataUiId, keyEventElement = window } = props;
47
46
  const rootRef = React.useRef(null);
48
47
  const focusTrapZone = React.useRef(null);
49
48
  const focusTrapZoneElm = React.useRef(null);
50
49
  const mergedRef = useMergedRefs(rootRef, ref);
51
50
  const modalResponsiveMode = useResponsiveMode(mergedRef);
52
51
  const focusTrapZoneId = useId('ModalFocusTrapZone');
53
- const win = useWindow();
54
52
  const { setTimeout, clearTimeout } = useSetTimeout();
55
53
  const [isModalOpen, setIsModalOpen] = React.useState(isOpen);
56
54
  const [isVisible, setIsVisible] = React.useState(isOpen);
57
55
  const [coordinates, setCoordinates] = React.useState(ZERO);
58
56
  const [modalRectangleTop, setModalRectangleTop] = React.useState();
59
- const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);
57
+ const [isModalMenuOpen, { setTrue: setModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);
58
+ const [_, forceUpdate] = React.useState(0);
59
+ const forceUpdateCallback = React.useCallback(() => forceUpdate((prev) => prev + 1), []);
60
60
  const internalState = useConst(() => ({
61
61
  onModalCloseTimer: 0,
62
62
  allowTouchBodyScroll,
@@ -80,7 +80,7 @@ const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
80
80
  topOffsetFixed,
81
81
  isModeless,
82
82
  layerClassName,
83
- windowInnerHeight: win === null || win === void 0 ? void 0 : win.innerHeight,
83
+ windowInnerHeight: window === null || window === void 0 ? void 0 : window.innerHeight,
84
84
  isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector
85
85
  });
86
86
  const mergedLayerProps = Object.assign(Object.assign({ eventBubblingEnabled: false }, layerProps), { onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount, insertFirst: isModeless, className: classNames.layer });
@@ -162,7 +162,8 @@ const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
162
162
  const handleEnterKeyboardMoveMode = () => {
163
163
  // We need a global handleKeyDown event when we are in the move mode so that we can
164
164
  // handle the key presses and the components inside the modal do not get the events
165
- const handleKeyDown = (ev) => {
165
+ const handleKeyDown = (event) => {
166
+ const ev = event;
166
167
  if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {
167
168
  // CTRL + ALT + SPACE is handled during keyUp
168
169
  ev.preventDefault();
@@ -175,6 +176,7 @@ const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
175
176
  }
176
177
  if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {
177
178
  internalState.isInKeyboardMoveMode = false;
179
+ forceUpdateCallback();
178
180
  ev.preventDefault();
179
181
  ev.stopPropagation();
180
182
  }
@@ -221,9 +223,9 @@ const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
221
223
  internalState.lastSetCoordinates = coordinates;
222
224
  setModalMenuClose();
223
225
  internalState.isInKeyboardMoveMode = true;
224
- internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);
226
+ keyEventElement.addEventListener('keydown', handleKeyDown, true /* useCapture */);
225
227
  internalState.disposeOnKeyDown = () => {
226
- internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);
228
+ keyEventElement.removeEventListener('keydown', handleKeyDown, true /* useCapture */);
227
229
  internalState.disposeOnKeyDown = undefined;
228
230
  };
229
231
  };
@@ -234,21 +236,22 @@ const ModalBase = React.forwardRef((propsWithoutDefaults, ref) => {
234
236
  (_a = internalState.disposeOnKeyDown) === null || _a === void 0 ? void 0 : _a.call(internalState);
235
237
  };
236
238
  const registerForKeyUp = () => {
237
- const handleKeyUp = (ev) => {
239
+ const handleKeyUp = (event) => {
240
+ const ev = event;
238
241
  // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:
239
242
  // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143
240
243
  if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {
241
244
  if (elementContains(internalState.scrollableContent, ev.target)) {
242
- toggleModalMenuOpen();
245
+ setModalMenuOpen();
243
246
  ev.preventDefault();
244
247
  ev.stopPropagation();
245
248
  }
246
249
  }
247
250
  };
248
251
  if (!internalState.disposeOnKeyUp) {
249
- internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);
252
+ keyEventElement.addEventListener('keyup', handleKeyUp, true /* useCapture */);
250
253
  internalState.disposeOnKeyUp = () => {
251
- internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);
254
+ keyEventElement.removeEventListener('keyup', handleKeyUp, true /* useCapture */);
252
255
  internalState.disposeOnKeyUp = undefined;
253
256
  };
254
257
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ModalClone.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ModalClone/ModalClone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qCAAqC;AACrC,sDAAsD;AACtD,qEAAqE;AACrE,sEAAsE;AACtE,uDAAuD;AAEvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,IAAI,EAOJ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,OAAO,EACP,KAAK,EACL,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAW5D,MAAM,iBAAiB,GAAG,kBAAkB,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AE;YACjB,UAAU,CAAC,iBAAiB;YAC5B;gBACE,SAAS,EAAE,MAAM;gBACjB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE;oBACT,CAAC,+CAA+C,CAAC,EAAE;wBACjD,SAAS,EAAE,iBAAiB;qBAC7B;iBACF;aACF;YACD,0BAA0B;SAC3B;QACD,KAAK,EAAE,UAAU,IAAI;YACnB,cAAc;YACd,UAAU,CAAC,KAAK;YAChB;gBACE,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,OAAO;aAChB;SACF;QACD,yBAAyB,EAAE;YACzB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\nimport { useWindow } from '@fluentui/react-window-provider';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n dataUiId?: string;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: React.KeyboardEvent<HTMLElement>): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition,\n dataUiId\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const win = useWindow();\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: win?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n\n internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n toggleModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={dataUiId}\n // enableAriaHiddenSiblings is handled by the Popup\n {...(props.focusTrapZoneProps ?? {})}\n >\n {dragOptions && internalState.isInKeyboardMoveMode && (\n <div className={classNames.keyboardMoveIconContainer}>\n {dragOptions.keyboardMoveIconProps ? (\n <Icon {...dragOptions.keyboardMoveIconProps} />\n ) : (\n <Icon iconName=\"move\" className={classNames.keyboardMoveIcon} />\n )}\n </div>\n )}\n <div ref={allowScrollOnModal} className={classNames.scrollableContent} data-is-scrollable>\n {dragOptions && isModalMenuOpen && (\n <dragOptions.menu\n items={[\n { key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },\n { key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose }\n ]}\n onDismiss={setModalMenuClose}\n alignTargetEdge\n coverTarget\n directionalHint={DirectionalHint.topLeftEdge}\n directionalHintFixed\n shouldFocusOnMount\n target={internalState.scrollableContent}\n />\n )}\n {children}\n </div>\n </FocusTrapZone>\n );\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && (\n <Layer ref={mergedRef} {...mergedLayerProps}>\n <Popup\n role={isAlertRole ? 'alertdialog' : 'dialog'}\n ariaLabelledBy={titleAriaId}\n ariaDescribedBy={subtitleAriaId}\n // onDismiss={onDismiss}\n shouldRestoreFocus={!ignoreExternalFocusing}\n // Modeless modals shouldn't hide siblings.\n // Popup will automatically handle this based on the aria-modal setting.\n // enableAriaHiddenSiblings={enableAriaHiddenSiblings}\n aria-modal={!isModeless}\n >\n <div className={classNames.root} role={!isModeless ? 'document' : undefined}>\n {!isModeless && (\n <Overlay\n aria-hidden={true}\n isDarkThemed={isDarkOverlay}\n onClick={isBlocking ? undefined : onDismiss}\n allowTouchBodyScroll={allowTouchBodyScroll}\n {...overlay}\n />\n )}\n {dragOptions ? (\n <DraggableZone\n handleSelector={dragOptions.dragHandleSelector || `#${focusTrapZoneId}`}\n preventDragSelector=\"button\"\n onStart={handleDragStart}\n onDragChange={handleDrag}\n onStop={handleDragStop}\n position={coordinates}\n >\n {modalContent}\n </DraggableZone>\n ) : (\n modalContent\n )}\n </div>\n </Popup>\n </Layer>\n )) ||\n null\n );\n }\n);\nModalBase.displayName = 'ModalBase';\n\ninterface IDraggableZoneStyles {\n root: string;\n}\n\nconst getDraggableZoneClassNames = memoizeFunction((className: string, isDragging: boolean): IDraggableZoneStyles => {\n return {\n root: mergeStyles(\n className,\n isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none'\n }\n }\n }\n )\n };\n});\n\ninterface IDragData {\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n delta: _ICoordinates;\n}\n\ninterface IDraggableZoneProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Specifies a selector to be used as the handle that initiates drag\n */\n handleSelector?: string;\n\n /**\n * Specifies a selector to be used to prevent drag initialization.\n * For example, if you do not want buttons inside of your handleSelector\n * to have the cursor change to move or to allow users to select from buttons,\n * you could pass button here (the close button in the header of a dialog is a concrete example)\n */\n preventDragSelector?: string;\n\n /**\n * the X and Y coordinates to use as an offest to position the draggable content\n */\n position?: _ICoordinates;\n\n /**\n * Callback for when dragging starts\n */\n onStart?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when the drag changes, while dragging\n */\n onDragChange?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when dragging stops\n */\n onStop?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n}\n\ninterface IDraggableZoneState {\n isDragging: boolean;\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n}\n\nconst eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// These are needed so that we can generalize the events\n// and so we have access to clientX and clientY in the touch events\ntype MouseTouchEvent<T> = React.MouseEvent<T> & React.TouchEvent<T> & Event;\n\nclass DraggableZone extends React.Component<IDraggableZoneProps, IDraggableZoneState> {\n private _touchId?: number;\n private _currentEventType = eventMapping.mouse;\n private _events: (() => void)[] = [];\n\n constructor(props: IDraggableZoneProps) {\n super(props);\n\n this.state = {\n isDragging: false,\n position: this.props.position || { x: 0, y: 0 },\n lastPosition: undefined\n };\n }\n\n public componentDidUpdate(prevProps: IDraggableZoneProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n }\n\n public componentWillUnmount() {\n this._events.forEach((dispose) => dispose());\n }\n\n public render() {\n const child: any = React.Children.only(this.props.children);\n const { props } = child;\n const { position } = this.props;\n const { position: statePosition, isDragging } = this.state;\n let x = statePosition.x;\n let y = statePosition.y;\n\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n\n return React.cloneElement(child, {\n style: {\n ...props.style,\n transform: `translate(${x}px, ${y}px)`\n },\n className: getDraggableZoneClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd\n });\n }\n\n private _onMouseDown = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseDown = (React.Children.only(this.props.children) as any).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStart(event);\n };\n\n private _onMouseUp = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseUp = (React.Children.only(this.props.children) as any).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStop(event);\n };\n\n private _onTouchStart = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchStart = (React.Children.only(this.props.children) as any).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n\n this._currentEventType = eventMapping.touch;\n return this._onDragStart(event);\n };\n\n private _onTouchEnd = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchEnd = (React.Children.only(this.props.children) as any).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n\n this._currentEventType = eventMapping.touch;\n this._onDragStop(event);\n };\n\n private _onDragStart = (event: MouseTouchEvent<HTMLElement>) => {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if (\n (this.props.handleSelector && !this._matchesSelector(event.target as HTMLElement, this.props.handleSelector)) ||\n (this.props.preventDragSelector &&\n this._matchesSelector(event.target as HTMLElement, this.props.preventDragSelector))\n ) {\n return;\n }\n\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n this._touchId = this._getTouchId(event);\n\n const position = this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n\n const dragData = this._createDragDataFromPosition(position);\n this.props.onStart && this.props.onStart(event, dragData);\n\n this.setState({\n isDragging: true,\n lastPosition: position\n });\n\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n this._events = [\n on(document.body, this._currentEventType.move, this._onDrag, true /* use capture phase */),\n on(document.body, this._currentEventType.stop, this._onDragStop, true /* use capture phase */)\n ];\n\n return;\n };\n\n private _onDrag = (event: any) => {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n // create the updated drag data from the position data\n const updatedData = this._createUpdatedDragData(this._createDragDataFromPosition(position));\n const updatedPosition = updatedData.position;\n\n this.props.onDragChange && this.props.onDragChange(event, updatedData);\n\n this.setState({\n position: updatedPosition,\n lastPosition: position\n });\n };\n\n private _onDragStop = (event: any) => {\n if (!this.state.isDragging) {\n return;\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n const baseDragData = this._createDragDataFromPosition(position);\n\n // Set dragging to false and reset the lastPosition\n this.setState({\n isDragging: false,\n lastPosition: undefined\n });\n\n this.props.onStop && this.props.onStop(event, baseDragData);\n\n if (this.props.position) {\n this.setState({\n position: this.props.position\n });\n }\n\n // Remove event handlers\n this._events.forEach((dispose) => dispose());\n };\n\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n private _getControlPosition(event: MouseTouchEvent<HTMLElement>): _ICoordinates | undefined {\n const touchObj = this._getActiveTouch(event);\n\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n\n const eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY\n };\n }\n\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n private _getActiveTouch(event: MouseTouchEvent<HTMLElement>): React.Touch | undefined {\n return (\n (event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches))\n );\n }\n\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n private _getTouchId(event: MouseTouchEvent<HTMLElement>): number | undefined {\n const touch: React.Touch | undefined =\n (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n if (touch) {\n return touch.identifier;\n }\n\n return;\n }\n\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n private _matchesSelector(element: HTMLElement | null, selector: string): boolean {\n if (!element || element === document.body) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const matchesSelectorFn: Function =\n element.matches || element.webkitMatchesSelector || (element as any).msMatchesSelector; /* for IE */\n\n if (!matchesSelectorFn) {\n return false;\n }\n\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n }\n\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n private _findTouchInTouchList(touchList: React.TouchList): React.Touch | undefined {\n if (this._touchId === undefined) {\n return;\n }\n\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i]?.identifier === this._touchId) {\n return touchList[i];\n }\n }\n\n return undefined;\n }\n\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n private _createDragDataFromPosition(position: _ICoordinates): IDragData {\n const { lastPosition } = this.state;\n\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position\n };\n }\n\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y\n },\n lastPosition,\n position\n };\n }\n\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n private _createUpdatedDragData(baseDragData: IDragData): IDragData {\n const { position } = this.state;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y\n },\n delta: baseDragData.delta,\n lastPosition: position\n };\n }\n}\n\nconst globalClassNames = {\n root: 'ms-Modal',\n main: 'ms-Dialog-main',\n scrollableContent: 'ms-Modal-scrollableContent',\n isOpen: 'is-open',\n layer: 'ms-Modal-Layer'\n};\n\nconst getStyles = (props: IModalStyleProps): IModalStyles => {\n const {\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened,\n modalRectangleTop,\n theme,\n topOffsetFixed,\n isModeless,\n layerClassName,\n isDefaultDragHandle,\n windowInnerHeight\n } = props;\n const { palette, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n {\n backgroundColor: 'transparent',\n position: isModeless ? 'absolute' : 'fixed',\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}`\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n alignItems: 'flex-start'\n },\n isOpen && classNames.isOpen,\n isVisible && {\n opacity: 1,\n pointerEvents: 'auto'\n },\n className\n ],\n main: [\n classNames.main,\n {\n boxShadow: effects.elevation64,\n borderRadius: effects.roundedCorner2,\n backgroundColor: palette.white,\n boxSizing: 'border-box',\n position: 'relative',\n textAlign: 'left',\n outline: '3px solid transparent',\n maxHeight: 'calc(100% - 32px)',\n maxWidth: 'calc(100% - 32px)',\n minHeight: '176px',\n minWidth: '288px',\n overflowY: 'auto',\n zIndex: isModeless ? ZIndexes.Layer : undefined\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n top: modalRectangleTop\n },\n isDefaultDragHandle && {\n cursor: 'move'\n },\n containerClassName\n ],\n scrollableContent: [\n classNames.scrollableContent,\n {\n overflowY: 'auto',\n flexGrow: 1,\n maxHeight: '100vh',\n selectors: {\n ['@supports (-webkit-overflow-scrolling: touch)']: {\n maxHeight: windowInnerHeight\n }\n }\n },\n scrollableContentClassName\n ],\n layer: isModeless && [\n layerClassName,\n classNames.layer,\n {\n position: 'static',\n width: 'unset',\n height: 'unset'\n }\n ],\n keyboardMoveIconContainer: {\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n padding: '3px 0px'\n },\n keyboardMoveIcon: {\n fontSize: fonts.xLargePlus.fontSize,\n width: '24px'\n }\n };\n};\n\n/** @internal */\nexport const _ModalClone: React.FunctionComponent<_ExtendedIModalProps> = styled<\n _ExtendedIModalProps,\n IModalStyleProps,\n IModalStyles\n>(ModalBase, getStyles, undefined, {\n scope: 'Modal',\n fields: ['theme', 'styles', 'enableAriaHiddenSiblings']\n});\n_ModalClone.displayName = 'Modal';\n"]}
1
+ {"version":3,"file":"ModalClone.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Mod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ACd,MAAM,EAAE,OAAO;aAChB;SACF;QACD,yBAAyB,EAAE;YACzB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n dataUiId?: string;\n\n /**\n * Originally the FluentUI modal used window to capture key events that trigger the move/close menu.\n * As we want to avoid global listeners, we are allowing the user to pass in a specific element\n * to capture the key events.\n */\n keyEventElement?: HTMLElement | Window;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: KeyboardEvent): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition,\n dataUiId,\n keyEventElement = window\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { setTrue: setModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const [_, forceUpdate] = React.useState(0);\n const forceUpdateCallback = React.useCallback(() => forceUpdate((prev) => prev + 1), []);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: window?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (event: Event): void => {\n const ev = event as KeyboardEvent;\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n forceUpdateCallback();\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n keyEventElement.addEventListener('keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n keyEventElement.removeEventListener('keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (event: Event): void => {\n const ev = event as KeyboardEvent;\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n setModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n keyEventElement.addEventListener('keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n keyEventElement.removeEventListener('keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={dataUiId}\n // enableAriaHiddenSiblings is handled by the Popup\n {...(props.focusTrapZoneProps ?? {})}\n >\n {dragOptions && internalState.isInKeyboardMoveMode && (\n <div className={classNames.keyboardMoveIconContainer}>\n {dragOptions.keyboardMoveIconProps ? (\n <Icon {...dragOptions.keyboardMoveIconProps} />\n ) : (\n <Icon iconName=\"move\" className={classNames.keyboardMoveIcon} />\n )}\n </div>\n )}\n <div ref={allowScrollOnModal} className={classNames.scrollableContent} data-is-scrollable>\n {dragOptions && isModalMenuOpen && (\n <dragOptions.menu\n items={[\n { key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },\n { key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose }\n ]}\n onDismiss={setModalMenuClose}\n alignTargetEdge\n coverTarget\n directionalHint={DirectionalHint.topLeftEdge}\n directionalHintFixed\n shouldFocusOnMount\n target={internalState.scrollableContent}\n />\n )}\n {children}\n </div>\n </FocusTrapZone>\n );\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && (\n <Layer ref={mergedRef} {...mergedLayerProps}>\n <Popup\n role={isAlertRole ? 'alertdialog' : 'dialog'}\n ariaLabelledBy={titleAriaId}\n ariaDescribedBy={subtitleAriaId}\n // onDismiss={onDismiss}\n shouldRestoreFocus={!ignoreExternalFocusing}\n // Modeless modals shouldn't hide siblings.\n // Popup will automatically handle this based on the aria-modal setting.\n // enableAriaHiddenSiblings={enableAriaHiddenSiblings}\n aria-modal={!isModeless}\n >\n <div className={classNames.root} role={!isModeless ? 'document' : undefined}>\n {!isModeless && (\n <Overlay\n aria-hidden={true}\n isDarkThemed={isDarkOverlay}\n onClick={isBlocking ? undefined : onDismiss}\n allowTouchBodyScroll={allowTouchBodyScroll}\n {...overlay}\n />\n )}\n {dragOptions ? (\n <DraggableZone\n handleSelector={dragOptions.dragHandleSelector || `#${focusTrapZoneId}`}\n preventDragSelector=\"button\"\n onStart={handleDragStart}\n onDragChange={handleDrag}\n onStop={handleDragStop}\n position={coordinates}\n >\n {modalContent}\n </DraggableZone>\n ) : (\n modalContent\n )}\n </div>\n </Popup>\n </Layer>\n )) ||\n null\n );\n }\n);\nModalBase.displayName = 'ModalBase';\n\ninterface IDraggableZoneStyles {\n root: string;\n}\n\nconst getDraggableZoneClassNames = memoizeFunction((className: string, isDragging: boolean): IDraggableZoneStyles => {\n return {\n root: mergeStyles(\n className,\n isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none'\n }\n }\n }\n )\n };\n});\n\ninterface IDragData {\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n delta: _ICoordinates;\n}\n\ninterface IDraggableZoneProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Specifies a selector to be used as the handle that initiates drag\n */\n handleSelector?: string;\n\n /**\n * Specifies a selector to be used to prevent drag initialization.\n * For example, if you do not want buttons inside of your handleSelector\n * to have the cursor change to move or to allow users to select from buttons,\n * you could pass button here (the close button in the header of a dialog is a concrete example)\n */\n preventDragSelector?: string;\n\n /**\n * the X and Y coordinates to use as an offest to position the draggable content\n */\n position?: _ICoordinates;\n\n /**\n * Callback for when dragging starts\n */\n onStart?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when the drag changes, while dragging\n */\n onDragChange?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when dragging stops\n */\n onStop?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n}\n\ninterface IDraggableZoneState {\n isDragging: boolean;\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n}\n\nconst eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// These are needed so that we can generalize the events\n// and so we have access to clientX and clientY in the touch events\ntype MouseTouchEvent<T> = React.MouseEvent<T> & React.TouchEvent<T> & Event;\n\nclass DraggableZone extends React.Component<IDraggableZoneProps, IDraggableZoneState> {\n private _touchId?: number;\n private _currentEventType = eventMapping.mouse;\n private _events: (() => void)[] = [];\n\n constructor(props: IDraggableZoneProps) {\n super(props);\n\n this.state = {\n isDragging: false,\n position: this.props.position || { x: 0, y: 0 },\n lastPosition: undefined\n };\n }\n\n public componentDidUpdate(prevProps: IDraggableZoneProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n }\n\n public componentWillUnmount() {\n this._events.forEach((dispose) => dispose());\n }\n\n public render() {\n const child: any = React.Children.only(this.props.children);\n const { props } = child;\n const { position } = this.props;\n const { position: statePosition, isDragging } = this.state;\n let x = statePosition.x;\n let y = statePosition.y;\n\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n\n return React.cloneElement(child, {\n style: {\n ...props.style,\n transform: `translate(${x}px, ${y}px)`\n },\n className: getDraggableZoneClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd\n });\n }\n\n private _onMouseDown = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseDown = (React.Children.only(this.props.children) as any).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStart(event);\n };\n\n private _onMouseUp = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseUp = (React.Children.only(this.props.children) as any).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStop(event);\n };\n\n private _onTouchStart = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchStart = (React.Children.only(this.props.children) as any).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n\n this._currentEventType = eventMapping.touch;\n return this._onDragStart(event);\n };\n\n private _onTouchEnd = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchEnd = (React.Children.only(this.props.children) as any).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n\n this._currentEventType = eventMapping.touch;\n this._onDragStop(event);\n };\n\n private _onDragStart = (event: MouseTouchEvent<HTMLElement>) => {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if (\n (this.props.handleSelector && !this._matchesSelector(event.target as HTMLElement, this.props.handleSelector)) ||\n (this.props.preventDragSelector &&\n this._matchesSelector(event.target as HTMLElement, this.props.preventDragSelector))\n ) {\n return;\n }\n\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n this._touchId = this._getTouchId(event);\n\n const position = this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n\n const dragData = this._createDragDataFromPosition(position);\n this.props.onStart && this.props.onStart(event, dragData);\n\n this.setState({\n isDragging: true,\n lastPosition: position\n });\n\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n this._events = [\n on(document.body, this._currentEventType.move, this._onDrag, true /* use capture phase */),\n on(document.body, this._currentEventType.stop, this._onDragStop, true /* use capture phase */)\n ];\n\n return;\n };\n\n private _onDrag = (event: any) => {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n // create the updated drag data from the position data\n const updatedData = this._createUpdatedDragData(this._createDragDataFromPosition(position));\n const updatedPosition = updatedData.position;\n\n this.props.onDragChange && this.props.onDragChange(event, updatedData);\n\n this.setState({\n position: updatedPosition,\n lastPosition: position\n });\n };\n\n private _onDragStop = (event: any) => {\n if (!this.state.isDragging) {\n return;\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n const baseDragData = this._createDragDataFromPosition(position);\n\n // Set dragging to false and reset the lastPosition\n this.setState({\n isDragging: false,\n lastPosition: undefined\n });\n\n this.props.onStop && this.props.onStop(event, baseDragData);\n\n if (this.props.position) {\n this.setState({\n position: this.props.position\n });\n }\n\n // Remove event handlers\n this._events.forEach((dispose) => dispose());\n };\n\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n private _getControlPosition(event: MouseTouchEvent<HTMLElement>): _ICoordinates | undefined {\n const touchObj = this._getActiveTouch(event);\n\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n\n const eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY\n };\n }\n\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n private _getActiveTouch(event: MouseTouchEvent<HTMLElement>): React.Touch | undefined {\n return (\n (event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches))\n );\n }\n\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n private _getTouchId(event: MouseTouchEvent<HTMLElement>): number | undefined {\n const touch: React.Touch | undefined =\n (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n if (touch) {\n return touch.identifier;\n }\n\n return;\n }\n\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n private _matchesSelector(element: HTMLElement | null, selector: string): boolean {\n if (!element || element === document.body) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const matchesSelectorFn: Function =\n element.matches || element.webkitMatchesSelector || (element as any).msMatchesSelector; /* for IE */\n\n if (!matchesSelectorFn) {\n return false;\n }\n\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n }\n\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n private _findTouchInTouchList(touchList: React.TouchList): React.Touch | undefined {\n if (this._touchId === undefined) {\n return;\n }\n\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i]?.identifier === this._touchId) {\n return touchList[i];\n }\n }\n\n return undefined;\n }\n\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n private _createDragDataFromPosition(position: _ICoordinates): IDragData {\n const { lastPosition } = this.state;\n\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position\n };\n }\n\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y\n },\n lastPosition,\n position\n };\n }\n\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n private _createUpdatedDragData(baseDragData: IDragData): IDragData {\n const { position } = this.state;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y\n },\n delta: baseDragData.delta,\n lastPosition: position\n };\n }\n}\n\nconst globalClassNames = {\n root: 'ms-Modal',\n main: 'ms-Dialog-main',\n scrollableContent: 'ms-Modal-scrollableContent',\n isOpen: 'is-open',\n layer: 'ms-Modal-Layer'\n};\n\nconst getStyles = (props: IModalStyleProps): IModalStyles => {\n const {\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened,\n modalRectangleTop,\n theme,\n topOffsetFixed,\n isModeless,\n layerClassName,\n isDefaultDragHandle,\n windowInnerHeight\n } = props;\n const { palette, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n {\n backgroundColor: 'transparent',\n position: isModeless ? 'absolute' : 'fixed',\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}`\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n alignItems: 'flex-start'\n },\n isOpen && classNames.isOpen,\n isVisible && {\n opacity: 1,\n pointerEvents: 'auto'\n },\n className\n ],\n main: [\n classNames.main,\n {\n boxShadow: effects.elevation64,\n borderRadius: effects.roundedCorner2,\n backgroundColor: palette.white,\n boxSizing: 'border-box',\n position: 'relative',\n textAlign: 'left',\n outline: '3px solid transparent',\n maxHeight: 'calc(100% - 32px)',\n maxWidth: 'calc(100% - 32px)',\n minHeight: '176px',\n minWidth: '288px',\n overflowY: 'auto',\n zIndex: isModeless ? ZIndexes.Layer : undefined\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n top: modalRectangleTop\n },\n isDefaultDragHandle && {\n cursor: 'move'\n },\n containerClassName\n ],\n scrollableContent: [\n classNames.scrollableContent,\n {\n overflowY: 'auto',\n flexGrow: 1,\n maxHeight: '100vh',\n selectors: {\n ['@supports (-webkit-overflow-scrolling: touch)']: {\n maxHeight: windowInnerHeight\n }\n }\n },\n scrollableContentClassName\n ],\n layer: isModeless && [\n layerClassName,\n classNames.layer,\n {\n position: 'static',\n width: 'unset',\n height: 'unset'\n }\n ],\n keyboardMoveIconContainer: {\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n padding: '3px 0px'\n },\n keyboardMoveIcon: {\n fontSize: fonts.xLargePlus.fontSize,\n width: '24px'\n }\n };\n};\n\n/** @internal */\nexport const _ModalClone: React.FunctionComponent<_ExtendedIModalProps> = styled<\n _ExtendedIModalProps,\n IModalStyleProps,\n IModalStyles\n>(ModalBase, getStyles, undefined, {\n scope: 'Modal',\n fields: ['theme', 'styles', 'enableAriaHiddenSiblings']\n});\n_ModalClone.displayName = 'Modal';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.25.0-alpha-202502190016",
3
+ "version": "1.25.0-alpha-202502210016",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [