@nethesis/phone-island 1.0.15 → 1.0.16-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +1 -1
- package/dist/App.js.map +1 -1
- package/dist/_virtual/index8.js +1 -1
- package/dist/_virtual/index9.js +1 -1
- package/dist/components/AlertView/index.js +1 -1
- package/dist/components/AlertView/index.js.map +1 -1
- package/dist/components/AudioPlayerView/Avatar.js +1 -1
- package/dist/components/AudioPlayerView/Avatar.js.map +1 -1
- package/dist/components/AudioPlayerView/PlayerFooterActions.js +1 -1
- package/dist/components/AudioPlayerView/PlayerFooterActions.js.map +1 -1
- package/dist/components/AudioPlayerView/Progress.js +1 -1
- package/dist/components/AudioPlayerView/Progress.js.map +1 -1
- package/dist/components/AudioPlayerView/index.js +1 -1
- package/dist/components/AudioPlayerView/index.js.map +1 -1
- package/dist/components/AvatarGroup.js +1 -1
- package/dist/components/AvatarGroup.js.map +1 -1
- package/dist/components/CallView/Actions.js +1 -1
- package/dist/components/CallView/Actions.js.map +1 -1
- package/dist/components/CallView/Avatar.js +1 -1
- package/dist/components/CallView/Avatar.js.map +1 -1
- package/dist/components/CallView/BackCall.js +1 -1
- package/dist/components/CallView/BackCall.js.map +1 -1
- package/dist/components/CallView/DeviceIcon.js +2 -0
- package/dist/components/CallView/DeviceIcon.js.map +1 -0
- package/dist/components/CallView/NumberPopover.js +2 -0
- package/dist/components/CallView/NumberPopover.js.map +1 -0
- package/dist/components/CallView/index.js +1 -1
- package/dist/components/CallView/index.js.map +1 -1
- package/dist/components/ConferenceView/ConferenceUsersList.js +1 -1
- package/dist/components/ConferenceView/ConferenceUsersList.js.map +1 -1
- package/dist/components/ConferenceView/index.js +1 -1
- package/dist/components/ConferenceView/index.js.map +1 -1
- package/dist/components/ContactView/ContactListView.js +1 -1
- package/dist/components/ContactView/ContactListView.js.map +1 -1
- package/dist/components/ContactView/ListAvatar.js +1 -1
- package/dist/components/ContactView/ListAvatar.js.map +1 -1
- package/dist/components/ContactView/SelectContactNumberView.js +1 -1
- package/dist/components/ContactView/SelectContactNumberView.js.map +1 -1
- package/dist/components/ContactView/TransferActions.js +1 -1
- package/dist/components/ContactView/TransferActions.js.map +1 -1
- package/dist/components/CustomThemedTooltip.js +1 -1
- package/dist/components/CustomThemedTooltip.js.map +1 -1
- package/dist/components/Dropdown.js +1 -1
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/GenericAvatar.js +1 -1
- package/dist/components/GenericAvatar.js.map +1 -1
- package/dist/components/Hangup.js +1 -1
- package/dist/components/Hangup.js.map +1 -1
- package/dist/components/IslandMotion.js +1 -1
- package/dist/components/IslandMotion.js.map +1 -1
- package/dist/components/KeypadView/Actions.js +1 -1
- package/dist/components/KeypadView/Actions.js.map +1 -1
- package/dist/components/KeypadView/index.js +1 -1
- package/dist/components/KeypadView/index.js.map +1 -1
- package/dist/components/OperatorBusyView/index.js +1 -1
- package/dist/components/OperatorBusyView/index.js.map +1 -1
- package/dist/components/PhysicalRecorderView/index.js +1 -1
- package/dist/components/PhysicalRecorderView/index.js.map +1 -1
- package/dist/components/RecorderView/Actions.js +1 -1
- package/dist/components/RecorderView/Actions.js.map +1 -1
- package/dist/components/RecorderView/index.js +1 -1
- package/dist/components/RecorderView/index.js.map +1 -1
- package/dist/components/SettingsView/AudioView.js +1 -1
- package/dist/components/SettingsView/AudioView.js.map +1 -1
- package/dist/components/SettingsView/MicrophoneView.js +1 -1
- package/dist/components/SettingsView/MicrophoneView.js.map +1 -1
- package/dist/components/SettingsView/SettingsHeader.js +1 -1
- package/dist/components/SettingsView/SettingsHeader.js.map +1 -1
- package/dist/components/SettingsView/ThemeView.js +1 -1
- package/dist/components/SettingsView/ThemeView.js.map +1 -1
- package/dist/components/SettingsView/VideoInputView.js +1 -1
- package/dist/components/SettingsView/VideoInputView.js.map +1 -1
- package/dist/components/SettingsView/index.js +1 -1
- package/dist/components/SettingsView/index.js.map +1 -1
- package/dist/components/SideView/SideView.js.map +1 -1
- package/dist/components/SideView/components/SideViewButton.js +1 -1
- package/dist/components/SideView/components/SideViewButton.js.map +1 -1
- package/dist/components/Socket.js +1 -1
- package/dist/components/Socket.js.map +1 -1
- package/dist/components/StreamingAnswerView/index.js +1 -1
- package/dist/components/StreamingAnswerView/index.js.map +1 -1
- package/dist/components/SwitchDeviceView/index.js +1 -1
- package/dist/components/SwitchDeviceView/index.js.map +1 -1
- package/dist/components/SwitchInputView/DropdownContent.js +1 -1
- package/dist/components/SwitchInputView/DropdownContent.js.map +1 -1
- package/dist/components/SwitchInputView/Index.js +1 -1
- package/dist/components/TranscriptionView/TranscriptionView.js +1 -1
- package/dist/components/TranscriptionView/TranscriptionView.js.map +1 -1
- package/dist/components/TransferButton.js +1 -1
- package/dist/components/TransferButton.js.map +1 -1
- package/dist/components/VideoStreamingEmptyState/index.js +1 -1
- package/dist/components/VideoStreamingEmptyState/index.js.map +1 -1
- package/dist/components/VideoStreamingSkeleton/index.js +1 -1
- package/dist/components/VideoStreamingSkeleton/index.js.map +1 -1
- package/dist/components/VideoView/index.js +1 -1
- package/dist/components/VideoView/index.js.map +1 -1
- package/dist/components/WebRTC.js +1 -1
- package/dist/components/WebRTC.js.map +1 -1
- package/dist/events/CallEvents.js +1 -1
- package/dist/events/CallEvents.js.map +1 -1
- package/dist/events/RecorderEvents.js +1 -1
- package/dist/events/RecorderEvents.js.map +1 -1
- package/dist/index.css +1 -1
- package/dist/lib/devices/devices.js +1 -1
- package/dist/lib/devices/devices.js.map +1 -1
- package/dist/lib/phone/call.js +1 -1
- package/dist/lib/phone/call.js.map +1 -1
- package/dist/lib/phone/conversation.js +1 -1
- package/dist/lib/phone/conversation.js.map +1 -1
- package/dist/lib/phone/counterpartDevice.js +2 -0
- package/dist/lib/phone/counterpartDevice.js.map +1 -0
- package/dist/lib/phone/video.js +2 -0
- package/dist/lib/phone/video.js.map +1 -0
- package/dist/lib/webrtc/messages.js +1 -1
- package/dist/lib/webrtc/messages.js.map +1 -1
- package/dist/models/currentCall.js +1 -1
- package/dist/models/currentCall.js.map +1 -1
- package/dist/models/motions.js.map +1 -1
- package/dist/models/webrtc.js.map +1 -1
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js +3 -3
- package/dist/node_modules/@fortawesome/fontawesome-svg-core/index.mjs.js.map +1 -1
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js +1 -1
- package/dist/node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js.map +1 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js +2 -0
- package/dist/node_modules/@fortawesome/react-fontawesome/dist/index.js.map +1 -0
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/label/label.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/menu/menu-machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/components/transition/transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-element-size.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-flags.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-inert-others.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-owner.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-quick-release.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-scroll-lock.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-transition.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/hooks/use-tree-walker.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/floating.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/internal/open-closed.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/machine.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/react-glue.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/class-names.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/disposables.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/focus-management.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/match.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/render.js.map +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js +1 -1
- package/dist/node_modules/@headlessui/react/dist/utils/store.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/FocusScope.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js +1 -1
- package/dist/node_modules/@react-aria/focus/dist/useFocusRing.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useEffectEvent.mjs.js.map +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js +1 -1
- package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.mjs.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/polling-xhr.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/transports/webtransport.js.map +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js +1 -1
- package/dist/node_modules/engine.io-client/build/esm/util.js.map +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js +1 -1
- package/dist/node_modules/engine.io-parser/build/esm/encodePacket.browser.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/press.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/index.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/get-context-window.mjs.js.map +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.mjs.js.map +1 -1
- package/dist/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/dist/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js +1 -1
- package/dist/node_modules/js-base64/base64.mjs.js.map +1 -1
- package/dist/node_modules/moment/moment.js +2 -2
- package/dist/node_modules/moment/moment.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/JSAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/drivers/frame.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/inertia.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/keyframes.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/spring.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/motion-value.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-target.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element-variant.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/interfaces/visual-element.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/KeyframesResolver.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/get-final.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/utils/unit-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/calc-child-stagger.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/css-variables-conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/default-transitions.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/easing/cubic-bezier.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/start-waapi-animation.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/apply-generator.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/waapi/utils/linear.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/events/add-dom-event.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/batcher.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/frameloop/render-step.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/hover.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/gestures/press/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/conversion.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-apply.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-calc.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/geometry/delta-remove.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/node/create-projection-node.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-box-shadow.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/projection/utils/has-transform.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/VisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/dom/DOMVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/render.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/animation-state.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/resize/handle-element.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/delay.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/utils/interpolate.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla-to-rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/hsla.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/color/rgba.mjs.js.map +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/value/types/complex/index.mjs.js.map +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js +1 -1
- package/dist/node_modules/motion-utils/dist/es/pipe.mjs.js.map +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js +1 -1
- package/dist/node_modules/react-redux/es/components/Provider.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useDispatch.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useReduxContext.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useReduxContext.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useSelector.js.map +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js +1 -1
- package/dist/node_modules/react-redux/es/hooks/useStore.js.map +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js +1 -1
- package/dist/node_modules/react-tooltip/dist/react-tooltip.min.mjs.js.map +1 -1
- package/dist/node_modules/redux/es/redux.js +1 -1
- package/dist/node_modules/redux/es/redux.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/index.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/socket.js.map +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js +1 -1
- package/dist/node_modules/socket.io-client/build/esm/url.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/index.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/ebml/index.js.map +1 -1
- package/dist/node_modules/webm-duration-fix/lib/index.js +1 -1
- package/dist/node_modules/webm-duration-fix/lib/index.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/adapter_factory.js.map +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js +1 -1
- package/dist/node_modules/webrtc-adapter/src/js/safari/safari_shim.js.map +1 -1
- package/dist/package.json.js +1 -1
- package/dist/public/locales/en/translation.json.js +1 -1
- package/dist/public/locales/it/translation.json.js +1 -1
- package/dist/services/astproxy.js.map +1 -1
- package/package.json +13 -28
- package/dist/_virtual/index10.js +0 -2
- package/dist/_virtual/index10.js.map +0 -1
- package/dist/_virtual/index11.js +0 -2
- package/dist/_virtual/index11.js.map +0 -1
- package/dist/_virtual/react-is.development4.js +0 -2
- package/dist/_virtual/react-is.development4.js.map +0 -1
- package/dist/_virtual/react-is.production.min4.js +0 -2
- package/dist/_virtual/react-is.production.min4.js.map +0 -1
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js +0 -2
- package/dist/node_modules/@fortawesome/react-fontawesome/index.es.js.map +0 -1
- package/dist/node_modules/object-assign/index.js +0 -8
- package/dist/node_modules/object-assign/index.js.map +0 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +0 -2
- package/dist/node_modules/prop-types/checkPropTypes.js.map +0 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -2
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +0 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +0 -1
- package/dist/node_modules/prop-types/index.js +0 -2
- package/dist/node_modules/prop-types/index.js.map +0 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -2
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +0 -1
- package/dist/node_modules/prop-types/lib/has.js +0 -2
- package/dist/node_modules/prop-types/lib/has.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -10
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -10
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -2
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hangup.js","sources":["../../src/components/Hangup.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { motion } from 'framer-motion'\nimport { Button } from './Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faDownLeftAndUpRightToCenter, faGear, faPhone, faUpRightAndDownLeftFromCenter } from '@fortawesome/free-solid-svg-icons'\nimport { endConference, hangupCurrentCall, hangupCurrentPhysicalRecording } from '../lib/phone/call'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { RootState } from '../store'\nimport { Dispatch } from '../store'\nimport { hangupAllExtensions } from '../lib/phone/call'\nimport { useTranslation } from 'react-i18next'\nimport { eventDispatch } from '../utils'\nimport { CustomThemedTooltip } from './CustomThemedTooltip'\n\n/**\n * Return the status of the\n */\nconst Hangup: FC<HangupProps> = ({\n clickCallback,\n isDestination,\n description,\n isPhysicalRecording,\n buttonsVariant = 'transparent',\n showFullscreenButton = false,\n isExtraLarge = false,\n onToggleExtraLarge,\n}) => {\n const { transferring, incoming, accepted } = useSelector((state: RootState) => state.currentCall)\n const dispatch = useDispatch<Dispatch>()\n const { isOpen, sideViewIsVisible, view } = useSelector((state: RootState) => state.island)\n const { isActive, conferenceStartedFrom } = useSelector((state: RootState) => state.conference)\n const { username } = useSelector((state: RootState) => state.currentUser)\n\n function handleHangup() {\n if (incoming) {\n hangupAllExtensions()\n } else {\n hangupCurrentCall()\n }\n\n // Delay the dispatch actions\n setTimeout(() => {\n dispatch.listen.setUpdateIntrudeStatus(false, '')\n dispatch.listen.setUpdateListenStatus(false, '')\n }, 2000)\n\n // Show confirmation message when a call is transferred\n if (transferring) {\n setTimeout(() => {\n dispatch.alerts.setAlert('call_transfered')\n eventDispatch('phone-island-call-transfer-successfully-popup-open', {})\n setTimeout(() => {\n dispatch.alerts.removeAlert('call_transfered')\n eventDispatch('phone-island-call-transfer-successfully-popup-close', {})\n }, 2000)\n }, 300)\n }\n }\n\n const { t } = useTranslation()\n const showSecondaryControls = (isOpen && accepted) || (view === 'waitingConference' && isOpen)\n const useCompactLayout = !transferring\n\n // Helper function to determine tooltip content\n const getToggleTooltipContent = () => {\n if (view === 'streamingAnswer') {\n return isExtraLarge ? t('Tooltip.Decrease') : t('Tooltip.Increase')\n }\n return t('Tooltip.Toggle fullscreen')\n }\n\n // Close side view and open settings view\n const closeSideViewOpenSettings = () => {\n if (sideViewIsVisible) {\n eventDispatch('phone-island-sideview-close', {})\n }\n eventDispatch('phone-island-transcription-close', {})\n dispatch.island.setIslandView('settings')\n }\n\n // Phone island footer section\n return (\n <>\n <div\n className={` ${transferring\n ? 'pi-grid pi-w-full pi-space-x-2 pi-justify-start'\n : 'pi-flex pi-justify-center'\n }`}\n >\n {/* The button to hangup the currentCall */}\n <motion.div\n className={`${transferring && description\n ? 'pi-grid pi-grid-cols-4 pi-ml-4 pi-justify-start'\n : useCompactLayout && showSecondaryControls\n ? 'pi-relative pi-flex pi-h-12 pi-w-64 pi-items-center pi-justify-center pi-overflow-hidden'\n : 'pi-flex pi-w-12 pi-items-center pi-justify-center'\n } `}\n >\n {/* collapse phone island button */}\n {showSecondaryControls && !showFullscreenButton && (\n <div className={useCompactLayout ? 'pi-absolute pi-left-0 pi-top-0 pi-grid pi-grid-cols-1' : 'pi-grid pi-grid-cols-1'}>\n <Button\n variant={buttonsVariant}\n onClick={() => dispatch.island.handleToggleIsOpen()}\n data-tooltip-id='tooltip-open-close-phone-island'\n data-tooltip-content={\n isOpen ? t('Tooltip.Collapse') || '' : t('Tooltip.Open') || ''\n }\n >\n <FontAwesomeIcon icon={faDownLeftAndUpRightToCenter} className='pi-w-6 pi-h-6' />\n </Button>\n </div>\n )}\n\n {/* expand/compress button for streaming */}\n {showSecondaryControls && showFullscreenButton && (\n <div className={useCompactLayout ? 'pi-absolute pi-left-0 pi-top-0 pi-grid pi-grid-cols-1' : 'pi-grid pi-grid-cols-1'}>\n <Button\n variant={buttonsVariant}\n onClick={onToggleExtraLarge}\n data-tooltip-id='tooltip-toggle-fullscreen-hangup'\n data-tooltip-content={getToggleTooltipContent()}\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isExtraLarge ? faDownLeftAndUpRightToCenter : faUpRightAndDownLeftFromCenter}\n />\n </Button>\n </div>\n )}\n\n <Button\n onClick={() => {\n if (isPhysicalRecording) {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n hangupCurrentPhysicalRecording()\n } else if (isActive) {\n if (conferenceStartedFrom === username && view === 'waitingConference') {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n endConference()\n } else {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n handleHangup()\n }\n } else {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n handleHangup()\n }\n }}\n variant='red'\n className={`${transferring && description\n ? 'pi-gap-4 pi-font-medium pi-text-base pi-transition pi-min-w-12 pi-w-full pi-col-span-2'\n : useCompactLayout && showSecondaryControls\n ? 'pi-relative pi-z-10 pi-gap-4 pi-font-medium pi-text-base pi-transition pi-h-12 pi-w-12 pi-min-w-12 pi-overflow-hidden'\n : 'pi-gap-4 pi-font-medium pi-text-base pi-transition pi-min-w-12 pi-w-full'\n }`}\n data-tooltip-id={\n (description && transferring) || (view === 'waitingConference' && isActive)\n ? 'tooltip-top-transfer'\n : 'tooltip-left-transfer'\n }\n data-tooltip-content={\n description && transferring\n ? description\n : view === 'waitingConference' && isActive\n ? t('Conference.End conference')\n : `${t('Tooltip.Hangup')}`\n }\n >\n <FontAwesomeIcon className='pi-rotate-135 pi-h-6 pi-w-6' icon={faPhone} />\n {transferring && description && (\n <motion.div\n style={{ height: '17px' }}\n className='pi-whitespace-nowrap pi-overflow-hidden'\n >\n {description}\n </motion.div>\n )}\n </Button>\n {showSecondaryControls && (\n <Button\n variant={buttonsVariant}\n onClick={() => closeSideViewOpenSettings()}\n data-tooltip-id='tooltip-settings-view'\n data-tooltip-content={t('Tooltip.Go to settings') || ''}\n className={`${transferring && description\n ? 'pi-ml-5'\n : useCompactLayout\n ? 'pi-absolute pi-right-0 pi-top-0 pi-justify-end'\n : 'pi-justify-end pi-ml-16'\n } pi-flex pi-items-center`}\n >\n <FontAwesomeIcon icon={faGear} className={`pi-h-6 pi-w-6`} />\n </Button>\n )}\n </motion.div>\n </div>\n <CustomThemedTooltip className='pi-z-20' id='tooltip-left-transfer' place='left' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-top-transfer' place='top' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-open-close-phone-island' place='right' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-settings-view' place='left' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-fullscreen-hangup' place='top' />\n </>\n )\n}\n\nexport default Hangup\n\ninterface HangupProps {\n clickCallback?: () => void\n isDestination?: boolean\n description?: any\n isPhysicalRecording?: boolean\n buttonsVariant?:\n | 'transparent'\n | 'default'\n | 'red'\n | 'green'\n | 'neutral'\n | 'transparentSideView'\n | 'transparentSettings'\n showFullscreenButton?: boolean\n isFullscreen?: boolean\n onToggleFullscreen?: () => void\n isExtraLarge?: boolean\n onToggleExtraLarge?: () => void\n}\n"],"names":["_a","clickCallback","isDestination","description","isPhysicalRecording","_b","buttonsVariant","_c","showFullscreenButton","_d","isExtraLarge","onToggleExtraLarge","_e","useSelector","state","currentCall","transferring","incoming","accepted","dispatch","useDispatch","_f","island","isOpen","sideViewIsVisible","view","_g","conference","isActive","conferenceStartedFrom","username","currentUser","handleHangup","hangupAllExtensions","hangupCurrentCall","setTimeout","listen","setUpdateIntrudeStatus","setUpdateListenStatus","alerts","setAlert","eventDispatch","removeAlert","t","useTranslation","showSecondaryControls","useCompactLayout","React","createElement","Fragment","className","concat","motion","div","Button","variant","onClick","handleToggleIsOpen","FontAwesomeIcon","icon","faDownLeftAndUpRightToCenter","faUpRightAndDownLeftFromCenter","hangupCurrentPhysicalRecording","endConference","faPhone","style","height","setIslandView","faGear","CustomThemedTooltip","id","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be,EAAE,6BACF,GAAGQ,OAAAR,EAAE,oBAGbI,EAAC,QAAAC,cAAAU,mBAAgBR,UAAU,8BAA8BS,KAAMK,EAAAA,UAC9DhD,GAAgBb,GACf4C,EAAA,QAAAC,cAACI,EAAMA,OAACC,IACN,CAAAY,MAAO,CAAEC,OAAQ,QACjBhB,UAAU,2CAET/C,IAIN0C,GACCE,EAAC,QAAAC,cAAAM,EAAAA,QACCC,QAASjD,EACTkD,QAAS,WAAM,OAjHrBhC,GACFiB,gBAAc,8BAA+B,CAAA,GAE/CA,gBAAc,mCAAoC,CAAA,QAClDtB,EAASG,OAAO6C,cAAc,WA6GsB,EAAA,kBAC1B,wBAAuB,uBACjBxB,EAAE,2BAA6B,GACrDO,UAAW,GAAGC,OAAAnC,GAAgBb,EAC1B,UACA2C,EACE,iDACA,0BACsB,6BAE5BC,UAAAC,cAACU,EAAeA,gBAAA,CAACC,KAAMS,SAAQlB,UAAW,qBAKlDH,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,wBAAwBC,MAAM,SAC1ExB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,uBAAuBC,MAAM,QACzExB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,kCAAkCC,MAAM,UACpFxB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,wBAAwBC,MAAM,SAC1ExB,EAAAA,QAAAC,cAACqB,sBAAoB,CAAAnB,UAAU,UAAUoB,GAAG,mCAAmCC,MAAM,QAG3F"}
|
|
1
|
+
{"version":3,"file":"Hangup.js","sources":["../../src/components/Hangup.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { motion } from 'framer-motion'\nimport { Button } from './Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faDownLeftAndUpRightToCenter, faGear, faPhone, faUpRightAndDownLeftFromCenter } from '@fortawesome/free-solid-svg-icons'\nimport { endConference, hangupCurrentCall, hangupCurrentPhysicalRecording } from '../lib/phone/call'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { RootState } from '../store'\nimport { Dispatch } from '../store'\nimport { hangupAllExtensions } from '../lib/phone/call'\nimport { useTranslation } from 'react-i18next'\nimport { eventDispatch } from '../utils'\nimport { CustomThemedTooltip } from './CustomThemedTooltip'\n\n/**\n * Return the status of the\n */\nconst Hangup: FC<HangupProps> = ({\n clickCallback,\n isDestination,\n description,\n isPhysicalRecording,\n buttonsVariant = 'transparent',\n showFullscreenButton = false,\n isExtraLarge = false,\n onToggleExtraLarge,\n}) => {\n const { transferring, incoming, accepted } = useSelector((state: RootState) => state.currentCall)\n const dispatch = useDispatch<Dispatch>()\n const { isOpen, sideViewIsVisible, view } = useSelector((state: RootState) => state.island)\n const { isActive, conferenceStartedFrom } = useSelector((state: RootState) => state.conference)\n const { username } = useSelector((state: RootState) => state.currentUser)\n\n function handleHangup() {\n if (incoming) {\n hangupAllExtensions()\n } else {\n hangupCurrentCall()\n }\n\n // Delay the dispatch actions\n setTimeout(() => {\n dispatch.listen.setUpdateIntrudeStatus(false, '')\n dispatch.listen.setUpdateListenStatus(false, '')\n }, 2000)\n\n // Show confirmation message when a call is transferred\n if (transferring) {\n setTimeout(() => {\n dispatch.alerts.setAlert('call_transfered')\n eventDispatch('phone-island-call-transfer-successfully-popup-open', {})\n setTimeout(() => {\n dispatch.alerts.removeAlert('call_transfered')\n eventDispatch('phone-island-call-transfer-successfully-popup-close', {})\n }, 2000)\n }, 300)\n }\n }\n\n const { t } = useTranslation()\n const showSecondaryControls = (isOpen && accepted) || (view === 'waitingConference' && isOpen)\n const useCompactLayout = !transferring\n\n // Helper function to determine tooltip content\n const getToggleTooltipContent = () => {\n if (view === 'streamingAnswer') {\n return isExtraLarge ? t('Tooltip.Decrease') : t('Tooltip.Increase')\n }\n return t('Tooltip.Toggle fullscreen')\n }\n\n // Close side view and open settings view\n const closeSideViewOpenSettings = () => {\n if (sideViewIsVisible) {\n eventDispatch('phone-island-sideview-close', {})\n }\n eventDispatch('phone-island-transcription-close', {})\n dispatch.island.setIslandView('settings')\n }\n\n // Phone island footer section\n return (\n <>\n <div\n className={` ${transferring\n ? 'pi-grid pi-w-full pi-space-x-2 pi-justify-start'\n : 'pi-flex pi-justify-center'\n }`}\n >\n {/* The button to hangup the currentCall */}\n <motion.div\n className={`${transferring && description\n ? 'pi-grid pi-grid-cols-4 pi-ml-4 pi-justify-start'\n : useCompactLayout && showSecondaryControls\n ? 'pi-relative pi-flex pi-h-12 pi-w-64 pi-items-center pi-justify-center pi-overflow-hidden'\n : 'pi-flex pi-w-12 pi-items-center pi-justify-center'\n } `}\n >\n {/* collapse phone island button */}\n {showSecondaryControls && !showFullscreenButton && (\n <div className={useCompactLayout ? 'pi-absolute pi-left-0 pi-top-0 pi-grid pi-grid-cols-1' : 'pi-grid pi-grid-cols-1'}>\n <Button\n variant={buttonsVariant}\n onClick={() => dispatch.island.handleToggleIsOpen()}\n data-tooltip-id='tooltip-open-close-phone-island'\n data-tooltip-content={\n isOpen ? t('Tooltip.Collapse') || '' : t('Tooltip.Open') || ''\n }\n >\n <FontAwesomeIcon icon={faDownLeftAndUpRightToCenter} className='pi-w-6 pi-h-6' />\n </Button>\n </div>\n )}\n\n {/* expand/compress button for streaming */}\n {showSecondaryControls && showFullscreenButton && (\n <div className={useCompactLayout ? 'pi-absolute pi-left-0 pi-top-0 pi-grid pi-grid-cols-1' : 'pi-grid pi-grid-cols-1'}>\n <Button\n variant={buttonsVariant}\n onClick={onToggleExtraLarge}\n data-tooltip-id='tooltip-toggle-fullscreen-hangup'\n data-tooltip-content={getToggleTooltipContent()}\n >\n <FontAwesomeIcon\n className='pi-h-6 pi-w-6'\n icon={isExtraLarge ? faDownLeftAndUpRightToCenter : faUpRightAndDownLeftFromCenter}\n />\n </Button>\n </div>\n )}\n\n <Button\n onClick={() => {\n if (isPhysicalRecording) {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n hangupCurrentPhysicalRecording()\n } else if (isActive) {\n if (conferenceStartedFrom === username && view === 'waitingConference') {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n endConference()\n } else {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n handleHangup()\n }\n } else {\n eventDispatch('phone-island-sideview-close', {})\n eventDispatch('phone-island-transcription-close', {})\n handleHangup()\n }\n }}\n variant='red'\n className={`${transferring && description\n ? 'pi-gap-4 pi-font-medium pi-text-base pi-transition pi-min-w-12 pi-w-full pi-col-span-2'\n : useCompactLayout && showSecondaryControls\n ? 'pi-relative pi-z-10 pi-gap-4 pi-font-medium pi-text-base pi-transition pi-h-12 pi-w-12 pi-min-w-12 pi-overflow-hidden'\n : 'pi-gap-4 pi-font-medium pi-text-base pi-transition pi-min-w-12 pi-w-full'\n }`}\n data-tooltip-id={\n (description && transferring) || (view === 'waitingConference' && isActive)\n ? 'tooltip-top-transfer'\n : 'tooltip-left-transfer'\n }\n data-tooltip-content={\n description && transferring\n ? description\n : view === 'waitingConference' && isActive\n ? t('Conference.End conference')\n : `${t('Tooltip.Hangup')}`\n }\n >\n <FontAwesomeIcon className='pi-rotate-135 pi-h-6 pi-w-6' icon={faPhone} />\n {transferring && description && (\n <motion.div\n style={{ height: '17px' }}\n className='pi-whitespace-nowrap pi-overflow-hidden'\n >\n {description}\n </motion.div>\n )}\n </Button>\n {showSecondaryControls && (\n <Button\n variant={buttonsVariant}\n onClick={() => closeSideViewOpenSettings()}\n data-tooltip-id='tooltip-settings-view'\n data-tooltip-content={t('Tooltip.Go to settings') || ''}\n className={`${transferring && description\n ? 'pi-ml-5'\n : useCompactLayout\n ? 'pi-absolute pi-right-0 pi-top-0 pi-justify-end'\n : 'pi-justify-end pi-ml-16'\n } pi-flex pi-items-center`}\n >\n <FontAwesomeIcon icon={faGear} className={`pi-h-6 pi-w-6`} />\n </Button>\n )}\n </motion.div>\n </div>\n <CustomThemedTooltip className='pi-z-20' id='tooltip-left-transfer' place='left' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-top-transfer' place='top' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-open-close-phone-island' place='right' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-settings-view' place='left' />\n <CustomThemedTooltip className='pi-z-20' id='tooltip-toggle-fullscreen-hangup' place='top' />\n </>\n )\n}\n\nexport default Hangup\n\ninterface HangupProps {\n clickCallback?: () => void\n isDestination?: boolean\n description?: any\n isPhysicalRecording?: boolean\n buttonsVariant?:\n | 'transparent'\n | 'default'\n | 'red'\n | 'green'\n | 'neutral'\n | 'transparentSideView'\n | 'transparentSettings'\n showFullscreenButton?: boolean\n isFullscreen?: boolean\n onToggleFullscreen?: () => void\n isExtraLarge?: boolean\n onToggleExtraLarge?: () => void\n}\n"],"names":["_a","clickCallback","isDestination","description","isPhysicalRecording","_b","buttonsVariant","_c","showFullscreenButton","_d","isExtraLarge","onToggleExtraLarge","_e","useSelector","state","currentCall","transferring","incoming","accepted","dispatch","useDispatch","_f","island","isOpen","sideViewIsVisible","view","_g","conference","isActive","conferenceStartedFrom","username","currentUser","handleHangup","hangupAllExtensions","hangupCurrentCall","setTimeout","listen","setUpdateIntrudeStatus","setUpdateListenStatus","alerts","setAlert","eventDispatch","removeAlert","t","useTranslation","showSecondaryControls","useCompactLayout","React","createElement","Fragment","className","concat","motion","div","Button","variant","onClick","handleToggleIsOpen","FontAwesomeIcon","icon","faDownLeftAndUpRightToCenter","faUpRightAndDownLeftFromCenter","hangupCurrentPhysicalRecording","endConference","faPhone","style","height","setIslandView","faGear","CustomThemedTooltip","id","place"],"mappings":"gzCAoBgC,SAACA,GAClBA,EAAAC,cACAD,EAAAE,cACb,IAAAC,EAAWH,EAAAG,YACXC,EAAmBJ,EAAAI,oBACnBC,EAA8B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Bb,GACf4C,EAAA,QAAAC,cAACI,EAAMA,OAACC,IACN,CAAAY,MAAO,CAAEC,OAAQ,QACjBhB,UAAU,2CAET/C,IAIN0C,GACCE,EAAC,QAAAC,cAAAM,EAAAA,QACCC,QAASjD,EACTkD,QAAS,WAAM,OAjHrBhC,GACFiB,gBAAc,8BAA+B,CAAA,GAE/CA,gBAAc,mCAAoC,CAAA,QAClDtB,EAASG,OAAO6C,cAAc,WA6GsB,EAAA,kBAC1B,wBAAuB,uBACjBxB,EAAE,2BAA6B,GACrDO,UAAW,GAAGC,OAAAnC,GAAgBb,EAC1B,UACA2C,EACE,iDACA,0BACsB,6BAE5BC,UAAAC,cAACU,EAAeA,gBAAA,CAACC,KAAMS,SAAQlB,UAAW,qBAKlDH,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,wBAAwBC,MAAM,SAC1ExB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,uBAAuBC,MAAM,QACzExB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,kCAAkCC,MAAM,UACpFxB,UAAAC,cAACqB,EAAmBA,oBAAA,CAACnB,UAAU,UAAUoB,GAAG,wBAAwBC,MAAM,SAC1ExB,EAAAA,QAAAC,cAACqB,sBAAoB,CAAAnB,UAAU,UAAUoB,GAAG,mCAAmCC,MAAM,QAG3F"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../node_modules/react-redux/es/index.js");var i=require("../utils/genericFunctions/eventDispatch.js");require("../node_modules/tslib/tslib.es6.js"),require("../store/index.js");var t=require("../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../node_modules/react-redux/es/index.js");var i=require("../utils/genericFunctions/eventDispatch.js");require("../node_modules/tslib/tslib.es6.js"),require("../store/index.js");var t=require("../lib/phone/conversation.js"),d=require("../node_modules/framer-motion/dist/es/render/components/motion/proxy.mjs.js"),a=require("../node_modules/react-redux/es/hooks/useSelector.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(e),h=function(n){var h=n.children,o=a.useSelector(function(e){return e.currentCall}),s=o.incoming,c=o.outgoing,l=o.accepted,g=o.transferring,p=o.incomingWebRTC,u=o.incomingSocket,w=o.conferencing,x=o.throughQueue,f=o.queueName,m=o.queueNumber,v=o.displayName,b=a.useSelector(function(e){return e.listen}).isListen,y=a.useSelector(function(e){return e.island}),_=y.view,k=y.isOpen,S=y.actionsExpanded,A=y.sideViewIsVisible,j=y.transcriptionViewIsVisible,q=y.isFromStreaming,C=y.isExtraLarge,E=a.useSelector(function(e){return e.alerts.status}).activeAlertsCount,B=a.useSelector(function(e){return e.motions}),N=B.variants,D=B.border_radius_collapsed,L=B.border_radius_expanded,I=B.border_radius_collapsed_conference,O=B.padding_x_collapsed,V=B.padding_y_collapsed,M=B.padding_expanded,Q=B.alert_padding_expanded,R=a.useSelector(function(e){return e.conference}).isActive,z=e.useMemo(function(){var e={width:0,height:0,padding:M};switch(_){case"call":if(k)if(l&&g&&w)e=S?{width:N.call.expanded.transfer.actionsExpanded.width,height:N.call.expanded.transfer.actionsExpanded.height}:{width:N.call.expanded.transfer.width,height:N.call.expanded.transfer.height};else if(l&&S)e={width:N.call.expanded.accepted.actionsExpanded.width,height:N.call.expanded.accepted.actionsExpanded.height};else if(l&&!b)e={width:N.call.expanded.accepted.width,height:N.call.expanded.accepted.height};else if(l&&b)e={width:N.call.expanded.listening.width,height:N.call.expanded.listening.height};else if(s&&!q){e=s&&!l&&x&&Boolean(f||m)&&!t.isNumberOnlyName(v)?{width:N.call.expanded.incomingQueue.width,height:N.call.expanded.incomingQueue.height}:{width:N.call.expanded.incoming.width,height:N.call.expanded.incoming.height}}else s&&q?e={width:N.call.expanded.incomingStreaming.width,height:N.call.expanded.incomingStreaming.height}:c&&!q?e={width:N.call.expanded.outgoing.width,height:N.call.expanded.outgoing.height}:c&&q&&(e={width:N.call.expanded.outgoingStreaming.width,height:N.call.expanded.outgoingStreaming.height});else e={width:N.call.collapsed.width,height:N.call.collapsed.height};break;case"keypad":e=k?{width:N.keypad.expanded.width,height:N.keypad.expanded.height}:{width:N.transfer.collapsed.width,height:N.transfer.collapsed.height};break;case"video":e=k?{width:N.video.expanded.width,height:N.video.expanded.height,padding:N.video.expanded.padding}:{width:N.video.collapsed.width,height:N.video.collapsed.height};break;case"transfer":case"player":case"recorder":case"physicalPhoneRecorder":case"settings":case"conference":e=k?{width:N[_].expanded.width,height:N[_].expanded.height}:{width:N[_].collapsed.width,height:N[_].collapsed.height};break;case"switchDevice":e=k?{width:N.switchDevice.expanded.width,height:N.switchDevice.expanded.height}:{width:N.video.collapsed.width,height:N.video.collapsed.height};break;case"waitingConference":e=k?{width:N.waitingConference.expanded.width,height:N.waitingConference.expanded.height}:{width:N.waitingConference.collapsed.width,height:N.waitingConference.collapsed.height};break;case"streamingAnswer":e=k?C?{width:N.streamingAnswer.extraLarge.width,height:N.streamingAnswer.extraLarge.height,padding:N.streamingAnswer.extraLarge.padding}:{width:N.streamingAnswer.expanded.width,height:N.streamingAnswer.expanded.height,padding:N.streamingAnswer.expanded.padding}:{width:N.streamingAnswer.collapsed.width,height:N.streamingAnswer.collapsed.height};break;case"operatorBusy":e=k?{width:N.operatorBusy.expanded.width,height:N.operatorBusy.expanded.height}:{width:N.operatorBusy.collapsed.width,height:N.operatorBusy.collapsed.height}}var i=E>0;return{width:"".concat(0===e.width&&i?N.alerts.width:e.width,"px"),height:"".concat(i&&k?N.alerts.height+(0===e.height?2*Q:Q):e.height,"px"),borderRadius:"".concat(k?L:R&&"waitingConference"===_?I:D,"px"),padding:k?null!=e.padding?"".concat(e.padding,"px"):"".concat(M,"px"):"".concat(O,"px ").concat(V,"px")}},[_,k,l,g,S,b,s,c,E,N,D,L,O,V,M,Q,p,u,R,q,C,x,f,m,v]);return e.useEffect(function(){var e={};e.width=null==z?void 0:z.width,e.height=null==z?void 0:z.height,i.eventDispatch("phone-island-size-change",{sizeInformation:e})},[z,_,k,l,g,S,b,s,c,E,N,D,L,O,V,M,Q,A,j,u,p,R,C]),r.default.createElement(d.motion.div,{className:"".concat(k?"pi-cursor-grab":"pi-cursor-pointer"," pi-pointer-events-auto pi-overflow-hidden dark:pi-bg-gray-950 pi-bg-gray-50 pi-border pi-border-solid pi-border-gray-200 dark:pi-border-gray-800 pi-text-xs dark:pi-text-white pi-text-gray-900 hover:pi-shadow-2xl pi-rounded-3xl pi-transition-shadow"),animate:z,transition:{duration:.15,ease:"easeOut"}},h)};exports.IslandMotion=h,exports.default=h;
|
|
2
2
|
//# sourceMappingURL=IslandMotion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IslandMotion.js","sources":["../../src/components/IslandMotion.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type ReactNode, FC, useMemo, useEffect } from 'react'\nimport { RootState } from '../store'\nimport { useSelector } from 'react-redux'\nimport { motion } from 'framer-motion'\nimport { eventDispatch } from '../utils'\n\nexport const IslandMotion: FC<IslandMotionProps> = ({ children }) => {\n // Retrieve needed stored variables\n const {\n incoming,\n outgoing,\n accepted,\n transferring,\n incomingWebRTC,\n incomingSocket,\n conferencing,\n throughQueue,\n queueName,\n queueNumber,\n } = useSelector((state: RootState) => state.currentCall)\n const { isListen } = useSelector((state: RootState) => state.listen)\n const { view, isOpen, actionsExpanded, sideViewIsVisible,transcriptionViewIsVisible, isFromStreaming, isExtraLarge } = useSelector(\n (state: RootState) => state.island,\n )\n const { activeAlertsCount } = useSelector((state: RootState) => state.alerts.status)\n const {\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n border_radius_collapsed_conference,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n } = useSelector((state: RootState) => state.motions)\n const { isActive } = useSelector((state: RootState) => state.conference)\n\n const motionVariants = useMemo(() => {\n // Initial size\n let size: SizeTypes = {\n width: 0,\n height: 0,\n padding: padding_expanded,\n }\n\n switch (view) {\n case 'call':\n if (isOpen) {\n if (accepted && transferring && conferencing) {\n if (actionsExpanded) {\n size = {\n width: variants.call.expanded.transfer.actionsExpanded.width,\n height: variants.call.expanded.transfer.actionsExpanded.height,\n }\n } else {\n size = {\n width: variants.call.expanded.transfer.width,\n height: variants.call.expanded.transfer.height,\n }\n }\n } else if (accepted && actionsExpanded) {\n size = {\n width: variants.call.expanded.accepted.actionsExpanded.width,\n height: variants.call.expanded.accepted.actionsExpanded.height,\n }\n } else if (accepted && !isListen) {\n size = {\n width: variants.call.expanded.accepted.width,\n height: variants.call.expanded.accepted.height,\n }\n } else if (accepted && isListen) {\n size = {\n width: variants.call.expanded.listening.width,\n height: variants.call.expanded.listening.height,\n }\n } else if (incoming && !isFromStreaming) {\n const showIncomingQueueBadge =\n incoming && !accepted && throughQueue && Boolean(queueName || queueNumber)\n size = showIncomingQueueBadge\n ? {\n width: variants.call.expanded.incomingQueue.width,\n height: variants.call.expanded.incomingQueue.height,\n }\n : {\n width: variants.call.expanded.incoming.width,\n height: variants.call.expanded.incoming.height,\n }\n } else if (incoming && isFromStreaming) {\n size = {\n width: variants.call.expanded.incomingStreaming.width,\n height: variants.call.expanded.incomingStreaming.height,\n }\n } else if (outgoing && !isFromStreaming) {\n size = {\n width: variants.call.expanded.outgoing.width,\n height: variants.call.expanded.outgoing.height,\n }\n } else if (outgoing && isFromStreaming) {\n size = {\n width: variants.call.expanded.outgoingStreaming.width,\n height: variants.call.expanded.outgoingStreaming.height,\n }\n }\n } else {\n size = {\n width: variants.call.collapsed.width,\n height: variants.call.collapsed.height,\n }\n }\n break\n\n case 'keypad':\n size = isOpen\n ? {\n width: variants.keypad.expanded.width,\n height: variants.keypad.expanded.height,\n }\n : {\n width: variants.transfer.collapsed.width,\n height: variants.transfer.collapsed.height,\n }\n break\n\n case 'video':\n if (isOpen) {\n size = {\n width: variants.video.expanded.width,\n height: variants.video.expanded.height,\n padding: variants.video.expanded.padding,\n }\n } else {\n size = {\n width: variants.video.collapsed.width,\n height: variants.video.collapsed.height,\n }\n }\n break\n case 'transfer':\n case 'player':\n case 'recorder':\n case 'physicalPhoneRecorder':\n case 'settings':\n case 'conference':\n size = isOpen\n ? {\n width: variants[view].expanded.width,\n height: variants[view].expanded.height,\n }\n : {\n width: variants[view].collapsed.width,\n height: variants[view].collapsed.height,\n }\n break\n\n case 'switchDevice':\n size = isOpen\n ? {\n width: variants.switchDevice.expanded.width,\n height: variants.switchDevice.expanded.height,\n }\n : {\n width: variants.video.collapsed.width,\n height: variants.video.collapsed.height,\n }\n break\n\n case 'waitingConference':\n size = isOpen\n ? {\n width: variants.waitingConference.expanded.width,\n height: variants.waitingConference.expanded.height,\n }\n : {\n width: variants.waitingConference.collapsed.width,\n height: variants.waitingConference.collapsed.height,\n }\n break\n case 'streamingAnswer':\n size = isOpen\n ? isExtraLarge\n ? {\n width: variants.streamingAnswer.extraLarge.width,\n height: variants.streamingAnswer.extraLarge.height,\n padding: variants.streamingAnswer.extraLarge.padding,\n }\n : {\n width: variants.streamingAnswer.expanded.width,\n height: variants.streamingAnswer.expanded.height,\n padding: variants.streamingAnswer.expanded.padding,\n }\n : {\n width: variants.streamingAnswer.collapsed.width,\n height: variants.streamingAnswer.collapsed.height,\n }\n break\n case 'operatorBusy':\n size = isOpen\n ? {\n width: variants.operatorBusy.expanded.width,\n height: variants.operatorBusy.expanded.height,\n }\n : {\n width: variants.operatorBusy.collapsed.width,\n height: variants.operatorBusy.collapsed.height,\n }\n break\n }\n\n const isAlert: boolean = activeAlertsCount > 0\n\n return {\n width: `${size.width === 0 && isAlert ? variants.alerts.width : size.width}px`,\n height: `${\n // If there is an alert and the island is open put the correct height\n isAlert && isOpen\n ? variants.alerts.height +\n (size.height === 0 ? alert_padding_expanded * 2 : alert_padding_expanded)\n : size.height\n }px`,\n borderRadius: isOpen\n ? `${border_radius_expanded}px`\n : isActive && view === 'waitingConference'\n ? `${border_radius_collapsed_conference}px`\n : `${border_radius_collapsed}px`,\n padding: isOpen\n ? size.padding != undefined\n ? `${size.padding}px`\n : `${padding_expanded}px`\n : `${padding_x_collapsed}px ${padding_y_collapsed}px`,\n }\n }, [\n view,\n isOpen,\n accepted,\n transferring,\n actionsExpanded,\n isListen,\n incoming,\n outgoing,\n activeAlertsCount,\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n incomingWebRTC,\n incomingSocket,\n isActive,\n isFromStreaming,\n isExtraLarge,\n throughQueue,\n queueName,\n queueNumber,\n ])\n\n useEffect(() => {\n let sizeInformation: any = {}\n sizeInformation.width = motionVariants?.width\n sizeInformation.height = motionVariants?.height\n eventDispatch('phone-island-size-change', {\n sizeInformation,\n })\n }, [\n motionVariants,\n view,\n isOpen,\n accepted,\n transferring,\n actionsExpanded,\n isListen,\n incoming,\n outgoing,\n activeAlertsCount,\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n sideViewIsVisible,\n transcriptionViewIsVisible,\n incomingSocket,\n incomingWebRTC,\n isActive,\n isExtraLarge,\n ])\n\n return (\n <motion.div\n className={`${isOpen ? 'pi-cursor-grab' : 'pi-cursor-pointer'\n } pi-pointer-events-auto pi-overflow-hidden dark:pi-bg-gray-950 pi-bg-gray-50 pi-text-xs dark:pi-text-white pi-text-gray-900 hover:pi-shadow-2xl pi-rounded-3xl pi-transition-shadow`}\n animate={motionVariants}\n transition={{\n duration: 0.15,\n ease: 'easeOut',\n }}\n >\n {children}\n </motion.div>\n )\n}\n\ninterface IslandMotionProps {\n children: ReactNode\n}\n\ntype SizeTypes = {\n width: number\n height: number\n padding?: number\n}\n\nexport default IslandMotion\n"],"names":["IslandMotion","_a","children","_b","useSelector","state","currentCall","incoming","outgoing","accepted","transferring","incomingWebRTC","incomingSocket","conferencing","throughQueue","queueName","queueNumber","isListen","listen","_c","island","view","isOpen","actionsExpanded","sideViewIsVisible","transcriptionViewIsVisible","isFromStreaming","isExtraLarge","activeAlertsCount","alerts","status","_d","motions","variants","border_radius_collapsed","border_radius_expanded","border_radius_collapsed_conference","padding_x_collapsed","padding_y_collapsed","padding_expanded","alert_padding_expanded","isActive","conference","motionVariants","useMemo","size","width","height","padding","call","expanded","transfer","listening","Boolean","incomingQueue","incomingStreaming","outgoingStreaming","collapsed","keypad","video","switchDevice","waitingConference","streamingAnswer","extraLarge","operatorBusy","isAlert","concat","borderRadius","undefined","useEffect","sizeInformation","eventDispatch","React","createElement","motion","div","className","animate","transition","duration","ease"],"mappings":"sgBASaA,EAAsC,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAEtDC,EAWFC,EAAWA,YAAC,SAACC,GAAqB,OAAAA,EAAMC,WAAN,GAVpCC,aACAC,aACAC,aACAC,iBACAC,mBACAC,mBACAC,iBACAC,iBACAC,cACAC,gBAEMC,EAAab,cAAY,SAACC,GAAqB,OAAAA,EAAMa,kBACvDC,EAAiHf,EAAWA,YAChI,SAACC,GAAqB,OAAAA,EAAMe,MAAN,GADhBC,EAAIF,EAAAE,KAAEC,EAAMH,EAAAG,OAAEC,EAAeJ,EAAAI,gBAAEC,EAAiBL,EAAAK,kBAACC,EAA0BN,EAAAM,2BAAEC,EAAeP,EAAAO,gBAAEC,iBAG9FC,EAAsBxB,EAAAA,YAAY,SAACC,GAAqB,OAAAA,EAAMwB,OAAOC,2BACvEC,EASF3B,EAAAA,YAAY,SAACC,GAAqB,OAAAA,EAAM2B,UAR1CC,aACAC,EAAuBH,EAAAG,wBACvBC,EAAsBJ,EAAAI,uBACtBC,EAAkCL,EAAAK,mCAClCC,EAAmBN,EAAAM,oBACnBC,wBACAC,qBACAC,2BAEMC,EAAarC,cAAY,SAACC,GAAqB,OAA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C,EACAC,EACAE,EACAC,EACAC,EACAC,EACA7B,EACAC,EACA6B,EACAf,EACAC,EACAb,EACAC,EACAC,IAoCF,OAjCAqD,EAAAA,UAAU,WACR,IAAIC,EAAuB,CAAA,EAC3BA,EAAgBxB,MAAQH,aAAA,EAAAA,EAAgBG,MACxCwB,EAAgBvB,OAASJ,aAAA,EAAAA,EAAgBI,OACzCwB,EAAAA,cAAc,2BAA4B,CACxCD,gBAAeA,GAEnB,EAAG,CACD3B,EACAtB,EACAC,EACAb,EACAC,EACAa,EACAN,EACAV,EACAC,EACAoB,EACAK,EACAC,EACAC,EACAE,EACAC,EACAC,EACAC,EACAhB,EACAC,EACAb,EACAD,EACA8B,EACAd,IAIA6C,EAAAA,QAACC,cAAAC,EAAAA,OAAOC,KACNC,UAAW,GAAGV,OAAA5C,EAAS,iBAAmB,oBAAmB,uLAE7DuD,QAASlC,EACTmC,WAAY,CACVC,SAAU,IACVC,KAAM,YAGP9E,EAGP"}
|
|
1
|
+
{"version":3,"file":"IslandMotion.js","sources":["../../src/components/IslandMotion.tsx"],"sourcesContent":["// Copyright (C) 2025 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type ReactNode, FC, useMemo, useEffect } from 'react'\nimport { RootState } from '../store'\nimport { useSelector } from 'react-redux'\nimport { motion } from 'framer-motion'\nimport { eventDispatch } from '../utils'\nimport { isNumberOnlyName } from '../lib/phone/conversation'\n\nexport const IslandMotion: FC<IslandMotionProps> = ({ children }) => {\n // Retrieve needed stored variables\n const {\n incoming,\n outgoing,\n accepted,\n transferring,\n incomingWebRTC,\n incomingSocket,\n conferencing,\n throughQueue,\n queueName,\n queueNumber,\n displayName,\n } = useSelector((state: RootState) => state.currentCall)\n const { isListen } = useSelector((state: RootState) => state.listen)\n const { view, isOpen, actionsExpanded, sideViewIsVisible,transcriptionViewIsVisible, isFromStreaming, isExtraLarge } = useSelector(\n (state: RootState) => state.island,\n )\n const { activeAlertsCount } = useSelector((state: RootState) => state.alerts.status)\n const {\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n border_radius_collapsed_conference,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n } = useSelector((state: RootState) => state.motions)\n const { isActive } = useSelector((state: RootState) => state.conference)\n\n const motionVariants = useMemo(() => {\n // Initial size\n let size: SizeTypes = {\n width: 0,\n height: 0,\n padding: padding_expanded,\n }\n\n switch (view) {\n case 'call':\n if (isOpen) {\n if (accepted && transferring && conferencing) {\n if (actionsExpanded) {\n size = {\n width: variants.call.expanded.transfer.actionsExpanded.width,\n height: variants.call.expanded.transfer.actionsExpanded.height,\n }\n } else {\n size = {\n width: variants.call.expanded.transfer.width,\n height: variants.call.expanded.transfer.height,\n }\n }\n } else if (accepted && actionsExpanded) {\n size = {\n width: variants.call.expanded.accepted.actionsExpanded.width,\n height: variants.call.expanded.accepted.actionsExpanded.height,\n }\n } else if (accepted && !isListen) {\n size = {\n width: variants.call.expanded.accepted.width,\n height: variants.call.expanded.accepted.height,\n }\n } else if (accepted && isListen) {\n size = {\n width: variants.call.expanded.listening.width,\n height: variants.call.expanded.listening.height,\n }\n } else if (incoming && !isFromStreaming) {\n const showIncomingQueueBadge =\n incoming && !accepted && throughQueue && Boolean(queueName || queueNumber)\n size = showIncomingQueueBadge && !isNumberOnlyName(displayName)\n ? {\n width: variants.call.expanded.incomingQueue.width,\n height: variants.call.expanded.incomingQueue.height,\n }\n : {\n width: variants.call.expanded.incoming.width,\n height: variants.call.expanded.incoming.height,\n }\n } else if (incoming && isFromStreaming) {\n size = {\n width: variants.call.expanded.incomingStreaming.width,\n height: variants.call.expanded.incomingStreaming.height,\n }\n } else if (outgoing && !isFromStreaming) {\n size = {\n width: variants.call.expanded.outgoing.width,\n height: variants.call.expanded.outgoing.height,\n }\n } else if (outgoing && isFromStreaming) {\n size = {\n width: variants.call.expanded.outgoingStreaming.width,\n height: variants.call.expanded.outgoingStreaming.height,\n }\n }\n } else {\n size = {\n width: variants.call.collapsed.width,\n height: variants.call.collapsed.height,\n }\n }\n break\n\n case 'keypad':\n size = isOpen\n ? {\n width: variants.keypad.expanded.width,\n height: variants.keypad.expanded.height,\n }\n : {\n width: variants.transfer.collapsed.width,\n height: variants.transfer.collapsed.height,\n }\n break\n\n case 'video':\n if (isOpen) {\n size = {\n width: variants.video.expanded.width,\n height: variants.video.expanded.height,\n padding: variants.video.expanded.padding,\n }\n } else {\n size = {\n width: variants.video.collapsed.width,\n height: variants.video.collapsed.height,\n }\n }\n break\n case 'transfer':\n case 'player':\n case 'recorder':\n case 'physicalPhoneRecorder':\n case 'settings':\n case 'conference':\n size = isOpen\n ? {\n width: variants[view].expanded.width,\n height: variants[view].expanded.height,\n }\n : {\n width: variants[view].collapsed.width,\n height: variants[view].collapsed.height,\n }\n break\n\n case 'switchDevice':\n size = isOpen\n ? {\n width: variants.switchDevice.expanded.width,\n height: variants.switchDevice.expanded.height,\n }\n : {\n width: variants.video.collapsed.width,\n height: variants.video.collapsed.height,\n }\n break\n\n case 'waitingConference':\n size = isOpen\n ? {\n width: variants.waitingConference.expanded.width,\n height: variants.waitingConference.expanded.height,\n }\n : {\n width: variants.waitingConference.collapsed.width,\n height: variants.waitingConference.collapsed.height,\n }\n break\n case 'streamingAnswer':\n size = isOpen\n ? isExtraLarge\n ? {\n width: variants.streamingAnswer.extraLarge.width,\n height: variants.streamingAnswer.extraLarge.height,\n padding: variants.streamingAnswer.extraLarge.padding,\n }\n : {\n width: variants.streamingAnswer.expanded.width,\n height: variants.streamingAnswer.expanded.height,\n padding: variants.streamingAnswer.expanded.padding,\n }\n : {\n width: variants.streamingAnswer.collapsed.width,\n height: variants.streamingAnswer.collapsed.height,\n }\n break\n case 'operatorBusy':\n size = isOpen\n ? {\n width: variants.operatorBusy.expanded.width,\n height: variants.operatorBusy.expanded.height,\n }\n : {\n width: variants.operatorBusy.collapsed.width,\n height: variants.operatorBusy.collapsed.height,\n }\n break\n }\n\n const isAlert: boolean = activeAlertsCount > 0\n\n return {\n width: `${size.width === 0 && isAlert ? variants.alerts.width : size.width}px`,\n height: `${\n // If there is an alert and the island is open put the correct height\n isAlert && isOpen\n ? variants.alerts.height +\n (size.height === 0 ? alert_padding_expanded * 2 : alert_padding_expanded)\n : size.height\n }px`,\n borderRadius: isOpen\n ? `${border_radius_expanded}px`\n : isActive && view === 'waitingConference'\n ? `${border_radius_collapsed_conference}px`\n : `${border_radius_collapsed}px`,\n padding: isOpen\n ? size.padding != undefined\n ? `${size.padding}px`\n : `${padding_expanded}px`\n : `${padding_x_collapsed}px ${padding_y_collapsed}px`,\n }\n }, [\n view,\n isOpen,\n accepted,\n transferring,\n actionsExpanded,\n isListen,\n incoming,\n outgoing,\n activeAlertsCount,\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n incomingWebRTC,\n incomingSocket,\n isActive,\n isFromStreaming,\n isExtraLarge,\n throughQueue,\n queueName,\n queueNumber,\n displayName,\n ])\n\n useEffect(() => {\n let sizeInformation: any = {}\n sizeInformation.width = motionVariants?.width\n sizeInformation.height = motionVariants?.height\n eventDispatch('phone-island-size-change', {\n sizeInformation,\n })\n }, [\n motionVariants,\n view,\n isOpen,\n accepted,\n transferring,\n actionsExpanded,\n isListen,\n incoming,\n outgoing,\n activeAlertsCount,\n variants,\n border_radius_collapsed,\n border_radius_expanded,\n padding_x_collapsed,\n padding_y_collapsed,\n padding_expanded,\n alert_padding_expanded,\n sideViewIsVisible,\n transcriptionViewIsVisible,\n incomingSocket,\n incomingWebRTC,\n isActive,\n isExtraLarge,\n ])\n\n return (\n <motion.div\n className={`${isOpen ? 'pi-cursor-grab' : 'pi-cursor-pointer'\n } pi-pointer-events-auto pi-overflow-hidden dark:pi-bg-gray-950 pi-bg-gray-50 pi-border pi-border-solid pi-border-gray-200 dark:pi-border-gray-800 pi-text-xs dark:pi-text-white pi-text-gray-900 hover:pi-shadow-2xl pi-rounded-3xl pi-transition-shadow`}\n animate={motionVariants}\n transition={{\n duration: 0.15,\n ease: 'easeOut',\n }}\n >\n {children}\n </motion.div>\n )\n}\n\ninterface IslandMotionProps {\n children: ReactNode\n}\n\ntype SizeTypes = {\n width: number\n height: number\n padding?: number\n}\n\nexport default IslandMotion\n"],"names":["IslandMotion","_a","children","_b","useSelector","state","currentCall","incoming","outgoing","accepted","transferring","incomingWebRTC","incomingSocket","conferencing","throughQueue","queueName","queueNumber","displayName","isListen","listen","_c","island","view","isOpen","actionsExpanded","sideViewIsVisible","transcriptionViewIsVisible","isFromStreaming","isExtraLarge","activeAlertsCount","alerts","status","_d","motions","variants","border_radius_collapsed","border_radius_expanded","border_radius_collapsed_conference","padding_x_collapsed","padding_y_collapsed","padding_expanded","alert_padding_expanded","isActive","conference","motionVariants","useMemo","size","width","height","padding","call","expanded","transfer","listening","Boolean","isNumberOnlyName","incomingQueue","incomingStreaming","outgoingStreaming","collapsed","keypad","video","switchDevice","waitingConference","streamingAnswer","extraLarge","operatorBusy","isAlert","concat","borderRadius","undefined","useEffect","sizeInformation","eventDispatch","React","createElement","motion","div","className","animate","transition","duration","ease"],"mappings":"gjBAUaA,EAAsC,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAEtDC,EAYFC,EAAWA,YAAC,SAACC,GAAqB,OAAAA,EAAMC,WAAW,GAXrDC,EAAQJ,EAAAI,SACRC,EAAQL,EAAAK,SACRC,EAAQN,EAAAM,SACRC,EAAYP,EAAAO,aACZC,EAAcR,EAAAQ,eACdC,EAAcT,EAAAS,eACdC,EAAYV,EAAAU,aACZC,EAAYX,EAAAW,aACZC,EAASZ,EAAAY,UACTC,EAAWb,EAAAa,YACXC,EAAWd,EAAAc,YAELC,EAAad,cAAY,SAACC,GAAqB,OAAAA,EAAMc,kBACvDC,EAAiHhB,EAAWA,YAChI,SAACC,GAAqB,OAAAA,EAAMgB,MAAN,GADhBC,EAAIF,EAAAE,KAAEC,EAAMH,EAAAG,OAAEC,EAAeJ,EAAA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OAEND,GAAW5C,EACPW,EAASJ,OAAOkB,QACD,IAAhBF,EAAKE,OAAwC,EAAzBP,EAA6BA,GAChDK,EAAKE,OACL,MACNqB,aACI,GAAGD,OADO7C,EACPa,EACHM,GAAqB,sBAATpB,EACPe,EACAF,EAHwB,MAIjCc,QAAS1B,EACW+C,MAAhBxB,EAAKG,QACH,GAAAmB,OAAGtB,EAAKG,QAAW,MACnB,GAAGmB,OAAA5B,EAAoB,MACzB,GAAA4B,OAAG9B,EAAmB,OAAA8B,OAAM7B,EAAuB,MAE3D,EAAG,CACDjB,EACAC,EACAd,EACAC,EACAc,EACAN,EACAX,EACAC,EACAqB,EACAK,EACAC,EACAC,EACAE,EACAC,EACAC,EACAC,EACA9B,EACAC,EACA8B,EACAf,EACAC,EACAd,EACAC,EACAC,EACAC,IAoCF,OAjCAsD,EAAAA,UAAU,WACR,IAAIC,EAAuB,CAAA,EAC3BA,EAAgBzB,MAAQH,aAAA,EAAAA,EAAgBG,MACxCyB,EAAgBxB,OAASJ,aAAA,EAAAA,EAAgBI,OACzCyB,EAAAA,cAAc,2BAA4B,CACxCD,gBAAeA,GAEnB,EAAG,CACD5B,EACAtB,EACAC,EACAd,EACAC,EACAc,EACAN,EACAX,EACAC,EACAqB,EACAK,EACAC,EACAC,EACAE,EACAC,EACAC,EACAC,EACAhB,EACAC,EACAd,EACAD,EACA+B,EACAd,IAIA8C,EAAAA,QAACC,cAAAC,EAAAA,OAAOC,KACNC,UAAW,GAAGV,OAAA7C,EAAS,iBAAmB,oBAAmB,4PAE7DwD,QAASnC,EACToC,WAAY,CACVC,SAAU,IACVC,KAAM,YAGPhF,EAGP"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/tslib/tslib.es6.js"),require("../../store/index.js"),require("../../node_modules/react-redux/es/index.js"),require("../../lib/webrtc/janus.js"),require("../../node_modules/webrtc-adapter/src/js/adapter_core.js"),require("../../node_modules/mic-check/lib/index.js"),require("../../node_modules/socket.io-client/build/esm/index.js"),require("../Island.js");var r=require("../Button.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/tslib/tslib.es6.js"),require("../../store/index.js"),require("../../node_modules/react-redux/es/index.js"),require("../../lib/webrtc/janus.js"),require("../../node_modules/webrtc-adapter/src/js/adapter_core.js"),require("../../node_modules/mic-check/lib/index.js"),require("../../node_modules/socket.io-client/build/esm/index.js"),require("../Island.js");var r=require("../Button.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),require("../../node_modules/i18next/dist/esm/i18next.js"),require("../../node_modules/react-tooltip/dist/react-tooltip.min.mjs.js"),require("../TranscriptionView/TranscriptionView.js");var i=t(e),s=Array.from(Array(9).keys()),n=["*","0","#"];exports.default=function(e){var t=e.keyCallback;return i.default.createElement("div",{className:"pi-grid pi-grid-cols-3 pi-auto-cols-max pi-gap-y-6 pi-justify-items-center pi-place-items-center pi-justify-center pi-px-3"},s.map(function(e){return i.default.createElement(r.Button,{key:e+1,onClick:function(){return t(e+1)},variant:"default",className:"pi-text-2xl",style:{transform:"scale(1.15)"}},e+1)}),n.map(function(e){return i.default.createElement(r.Button,{key:e+1,onClick:function(){return t(e)},variant:"default",className:"pi-text-2xl",style:{transform:"scale(1.15)"}},e)}))};
|
|
2
2
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../src/components/KeypadView/Actions.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { Button } from '..'\n\nconst keys = Array.from(Array(9).keys())\n\nconst bottomKeys = ['*', '0', '#']\n\nconst Actions: FC<ActionsTypes> = ({ keyCallback }) => {\n return (\n <div className='pi-grid pi-grid-cols-3 pi-auto-cols-max pi-gap-y-6 pi-justify-items-center pi-place-items-center pi-justify-center pi-px-3'>\n {keys.map((key) => (\n <Button\n key={key + 1}\n onClick={() => keyCallback(key + 1)}\n variant='default'\n className={'pi-text-2xl'}\n style={{ transform: 'scale(1.15)' }}\n >\n {key + 1}\n </Button>\n ))}\n {bottomKeys.map((bottomKey) => (\n <Button\n key={bottomKey + 1}\n onClick={() => keyCallback(bottomKey)}\n variant='default'\n className={'pi-text-2xl'}\n style={{ transform: 'scale(1.15)' }}\n >\n {bottomKey}\n </Button>\n ))}\n </div>\n )\n}\n\nexport default Actions\n\ninterface ActionsTypes {\n keyCallback: any\n}\n"],"names":["keys","Array","from","bottomKeys","_a","keyCallback","React","createElement","className","map","key","Button","onClick","variant","style","transform","bottomKey"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../src/components/KeypadView/Actions.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC } from 'react'\nimport { Button } from '..'\n\nconst keys = Array.from(Array(9).keys())\n\nconst bottomKeys = ['*', '0', '#']\n\nconst Actions: FC<ActionsTypes> = ({ keyCallback }) => {\n return (\n <div className='pi-grid pi-grid-cols-3 pi-auto-cols-max pi-gap-y-6 pi-justify-items-center pi-place-items-center pi-justify-center pi-px-3'>\n {keys.map((key) => (\n <Button\n key={key + 1}\n onClick={() => keyCallback(key + 1)}\n variant='default'\n className={'pi-text-2xl'}\n style={{ transform: 'scale(1.15)' }}\n >\n {key + 1}\n </Button>\n ))}\n {bottomKeys.map((bottomKey) => (\n <Button\n key={bottomKey + 1}\n onClick={() => keyCallback(bottomKey)}\n variant='default'\n className={'pi-text-2xl'}\n style={{ transform: 'scale(1.15)' }}\n >\n {bottomKey}\n </Button>\n ))}\n </div>\n )\n}\n\nexport default Actions\n\ninterface ActionsTypes {\n keyCallback: any\n}\n"],"names":["keys","Array","from","bottomKeys","_a","keyCallback","React","createElement","className","map","key","Button","onClick","variant","style","transform","bottomKey"],"mappings":"+0BAMMA,EAAOC,MAAMC,KAAKD,MAAM,GAAGD,QAE3BG,EAAa,CAAC,IAAK,IAAK,qBAEI,SAACC,GAAE,IAAAC,EAAWD,EAAAC,YAC9C,OACEC,EAAA,QAAAC,cAAA,MAAA,CAAKC,UAAU,8HACZR,EAAKS,IAAI,SAACC,GAAQ,OACjBJ,EAAC,QAAAC,cAAAI,EAAMA,OACL,CAAAD,IAAKA,EAAM,EACXE,QAAS,WAAM,OAAAP,EAAYK,EAAM,EAAlB,EACfG,QAAQ,UACRL,UAAW,cACXM,MAAO,CAAEC,UAAW,gBAEnBL,EAAM,EARQ,GAWlBP,EAAWM,IAAI,SAACO,GAAc,OAC7BV,EAAC,QAAAC,cAAAI,SACC,CAAAD,IAAKM,EAAY,EACjBJ,QAAS,WAAM,OAAAP,EAAYW,EAAU,EACrCH,QAAQ,UACRL,UAAW,cACXM,MAAO,CAAEC,UAAW,gBAEnBC,KAKX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("../Button.js");require("../../node_modules/react-redux/es/index.js");var t=require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("../Button.js");require("../../node_modules/react-redux/es/index.js");var t=require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),i=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),a=require("./Actions.js"),s=require("../../lib/webrtc/messages.js"),o=require("../../lib/island/island.js"),n=require("../../lib/phone/call.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var l=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var u=require("../../lib/user/default_device.js"),d=require("../../services/astproxy.js"),c=require("../../utils/customHooks/useEventListener.js"),p=require("../../utils/genericFunctions/eventDispatch.js");require("../../node_modules/tslib/tslib.es6.js"),require("../../store/index.js");var m=require("../CustomThemedTooltip.js"),f=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),b=require("../../node_modules/react-redux/es/hooks/useSelector.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var j=y(e),v=["0","1","2","3","4","5","6","7","8","9","*","#"];exports.default=function(){var y=f.useDispatch(),h=b.useSelector(function(e){return e.currentCall}).keypadValue,q=b.useSelector(function(e){return e.island}).isOpen,x=e.useRef(h);function k(e){y.currentCall.updateKeypadValue("".concat(x.current).concat(e)),x.current="".concat(x.current).concat(e),n.playDtmfAudio(e),u.isWebRTC()?s.sendDTMF(e):d.sendPhysicalDTMF(e),p.eventDispatch("phone-island-call-keypad-sent",{})}c.useEventListener("phone-island-call-keypad-send",function(e){k(e.key)}),e.useEffect(function(){function e(e){v.includes(e.key)&&k(e.key)}return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[]);var g=l.useTranslation().t;return j.default.createElement(j.default.Fragment,null,q?j.default.createElement("div",{className:"pi-flex pi-flex-col pi-gap-7"},j.default.createElement("div",{className:"pi-flex pi-gap-4"},j.default.createElement(r.Button,{variant:"transparent",onClick:o.backToPreviousView,"data-tooltip-id":"keyboard-tooltip","data-tooltip-content":g("Tooltip.Back to call")||""},j.default.createElement(t.FontAwesomeIcon,{size:"xl",icon:i.faArrowLeft})),j.default.createElement("input",{"data-stop-propagation":!0,type:"text",readOnly:!0,placeholder:g("Common.Enter a phone number")||"",value:h,autoFocus:!0,className:"pi-w-full pi-rounded-full dark:pi-bg-gray-950 pi-bg-gray-50 pi-border-2 pi-border-emerald-500 dark:pi-border-emerald-200 active:pi-border-emerald-500 dark:active:focus:pi-border-emerald-200 focus:pi-border-emerald-500 dark:focus:pi-border-emerald-200 pi-text-gray-900 dark:pi-text-gray-50 pi-font-light pi-text-xl pi-text-center pi-px-2 focus:pi-outline-0 focus:pi-ring-0 pi-placeholder-gray-400 dark:pi-placeholder-gray-500 pi-font-[inherit]"})),j.default.createElement(a.default,{keyCallback:k})):j.default.createElement("div",{className:"pi-font-medium pi-text-base"},"Keypad"),j.default.createElement(m.CustomThemedTooltip,{className:"pi-z-1000",id:"keyboard-tooltip",place:"right"}))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/KeypadView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useEffect, useRef } from 'react'\nimport { Button } from '../Button'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState } from '../../store'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faArrowLeft } from '@fortawesome/free-solid-svg-icons'\nimport Actions from './Actions'\nimport { sendDTMF } from '../../lib/webrtc/messages'\nimport { backToPreviousView } from '../../lib/island/island'\nimport { playDtmfAudio } from '../../lib/phone/call'\nimport { useTranslation } from 'react-i18next'\nimport { isWebRTC } from '../../lib/user/default_device'\nimport { sendPhysicalDTMF } from '../../services/astproxy'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\n\nconst DTMF_KEYS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '#']\n\nconst KeypadView: FC<KeypadViewTypes> = () => {\n const dispatch = useDispatch<Dispatch>()\n const { keypadValue } = useSelector((state: RootState) => state.currentCall)\n const { isOpen } = useSelector((state: RootState) => state.island)\n const keypadValueRef = useRef<typeof keypadValue>(keypadValue)\n\n function sendKey(key: string) {\n dispatch.currentCall.updateKeypadValue(`${keypadValueRef.current}${key}`)\n keypadValueRef.current = `${keypadValueRef.current}${key}`\n playDtmfAudio(key)\n if (isWebRTC()) {\n sendDTMF(key)\n } else {\n sendPhysicalDTMF(key)\n }\n\n eventDispatch('phone-island-call-keypad-sent', {})\n }\n useEventListener('phone-island-call-keypad-send', (data: KeypadTypes) => {\n sendKey(data.key)\n })\n\n useEffect(() => {\n function handlePhysicalKeydown(event) {\n if (DTMF_KEYS.includes(event.key)) {\n sendKey(event.key)\n }\n }\n window.addEventListener('keydown', handlePhysicalKeydown)\n return () => window.removeEventListener('keydown', handlePhysicalKeydown)\n }, [])\n\n const { t } = useTranslation()\n\n return (\n <>\n {isOpen ? (\n <div className='pi-flex pi-flex-col pi-gap-7'>\n <div className='pi-flex pi-gap-4'>\n <Button\n variant='transparent'\n onClick={backToPreviousView}\n data-tooltip-id='keyboard-tooltip'\n data-tooltip-content={t('Tooltip.Back to call') || ''}\n >\n <FontAwesomeIcon size='xl' icon={faArrowLeft} />\n </Button>\n <input\n data-stop-propagation={true}\n type='text'\n readOnly\n placeholder={t('Common.Enter a phone number') || ''}\n value={keypadValue}\n autoFocus\n className='pi-w-full pi-rounded-full dark:pi-bg-gray-950 pi-bg-gray-50 pi-border-2 pi-border-emerald-500 dark:pi-border-emerald-200 active:pi-border-emerald-500 dark:active:focus:pi-border-emerald-200 focus:pi-border-emerald-500 dark:focus:pi-border-emerald-200 pi-text-gray-900 dark:pi-text-gray-50 pi-font-light pi-text-xl pi-text-center pi-px-2 focus:pi-outline-0 focus:pi-ring-0 pi-placeholder-gray-400 dark:pi-placeholder-gray-500 pi-font-[inherit]'\n />\n </div>\n <Actions keyCallback={sendKey} />\n </div>\n ) : (\n <div className='pi-font-medium pi-text-base'>Keypad</div>\n )}\n <CustomThemedTooltip className='pi-z-1000' id='keyboard-tooltip' place='right' />\n </>\n )\n}\n\nexport default KeypadView\n\nexport interface KeypadViewTypes {}\n\ninterface KeypadTypes {\n key: string\n}\n"],"names":["DTMF_KEYS","dispatch","useDispatch","keypadValue","useSelector","state","currentCall","isOpen","island","keypadValueRef","useRef","sendKey","key","updateKeypadValue","concat","current","playDtmfAudio","isWebRTC","sendDTMF","sendPhysicalDTMF","eventDispatch","useEventListener","data","useEffect","handlePhysicalKeydown","event","includes","window","addEventListener","removeEventListener","t","useTranslation","React","createElement","Fragment","className","Button","variant","onClick","backToPreviousView","FontAwesomeIcon","size","icon","faArrowLeft","type","readOnly","placeholder","value","autoFocus","Actions","keyCallback","CustomThemedTooltip","id","place"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/KeypadView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useEffect, useRef } from 'react'\nimport { Button } from '../Button'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState } from '../../store'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faArrowLeft } from '@fortawesome/free-solid-svg-icons'\nimport Actions from './Actions'\nimport { sendDTMF } from '../../lib/webrtc/messages'\nimport { backToPreviousView } from '../../lib/island/island'\nimport { playDtmfAudio } from '../../lib/phone/call'\nimport { useTranslation } from 'react-i18next'\nimport { isWebRTC } from '../../lib/user/default_device'\nimport { sendPhysicalDTMF } from '../../services/astproxy'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\n\nconst DTMF_KEYS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '*', '#']\n\nconst KeypadView: FC<KeypadViewTypes> = () => {\n const dispatch = useDispatch<Dispatch>()\n const { keypadValue } = useSelector((state: RootState) => state.currentCall)\n const { isOpen } = useSelector((state: RootState) => state.island)\n const keypadValueRef = useRef<typeof keypadValue>(keypadValue)\n\n function sendKey(key: string) {\n dispatch.currentCall.updateKeypadValue(`${keypadValueRef.current}${key}`)\n keypadValueRef.current = `${keypadValueRef.current}${key}`\n playDtmfAudio(key)\n if (isWebRTC()) {\n sendDTMF(key)\n } else {\n sendPhysicalDTMF(key)\n }\n\n eventDispatch('phone-island-call-keypad-sent', {})\n }\n useEventListener('phone-island-call-keypad-send', (data: KeypadTypes) => {\n sendKey(data.key)\n })\n\n useEffect(() => {\n function handlePhysicalKeydown(event) {\n if (DTMF_KEYS.includes(event.key)) {\n sendKey(event.key)\n }\n }\n window.addEventListener('keydown', handlePhysicalKeydown)\n return () => window.removeEventListener('keydown', handlePhysicalKeydown)\n }, [])\n\n const { t } = useTranslation()\n\n return (\n <>\n {isOpen ? (\n <div className='pi-flex pi-flex-col pi-gap-7'>\n <div className='pi-flex pi-gap-4'>\n <Button\n variant='transparent'\n onClick={backToPreviousView}\n data-tooltip-id='keyboard-tooltip'\n data-tooltip-content={t('Tooltip.Back to call') || ''}\n >\n <FontAwesomeIcon size='xl' icon={faArrowLeft} />\n </Button>\n <input\n data-stop-propagation={true}\n type='text'\n readOnly\n placeholder={t('Common.Enter a phone number') || ''}\n value={keypadValue}\n autoFocus\n className='pi-w-full pi-rounded-full dark:pi-bg-gray-950 pi-bg-gray-50 pi-border-2 pi-border-emerald-500 dark:pi-border-emerald-200 active:pi-border-emerald-500 dark:active:focus:pi-border-emerald-200 focus:pi-border-emerald-500 dark:focus:pi-border-emerald-200 pi-text-gray-900 dark:pi-text-gray-50 pi-font-light pi-text-xl pi-text-center pi-px-2 focus:pi-outline-0 focus:pi-ring-0 pi-placeholder-gray-400 dark:pi-placeholder-gray-500 pi-font-[inherit]'\n />\n </div>\n <Actions keyCallback={sendKey} />\n </div>\n ) : (\n <div className='pi-font-medium pi-text-base'>Keypad</div>\n )}\n <CustomThemedTooltip className='pi-z-1000' id='keyboard-tooltip' place='right' />\n </>\n )\n}\n\nexport default KeypadView\n\nexport interface KeypadViewTypes {}\n\ninterface KeypadTypes {\n key: string\n}\n"],"names":["DTMF_KEYS","dispatch","useDispatch","keypadValue","useSelector","state","currentCall","isOpen","island","keypadValueRef","useRef","sendKey","key","updateKeypadValue","concat","current","playDtmfAudio","isWebRTC","sendDTMF","sendPhysicalDTMF","eventDispatch","useEventListener","data","useEffect","handlePhysicalKeydown","event","includes","window","addEventListener","removeEventListener","t","useTranslation","React","createElement","Fragment","className","Button","variant","onClick","backToPreviousView","FontAwesomeIcon","size","icon","faArrowLeft","type","readOnly","placeholder","value","autoFocus","Actions","keyCallback","CustomThemedTooltip","id","place"],"mappings":"w/CAmBMA,EAAY,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,qBAElC,WACtC,IAAMC,EAAWC,EAAAA,cACTC,EAAgBC,cAAY,SAACC,GAAqB,OAAAA,EAAMC,0BACxDC,EAAWH,cAAY,SAACC,GAAqB,OAAAA,EAAMG,gBACrDC,EAAiBC,SAA2BP,GAElD,SAASQ,EAAQC,GACfX,EAASK,YAAYO,kBAAkB,GAAAC,OAAGL,EAAeM,SAAOD,OAAGF,IACnEH,EAAeM,QAAU,GAAGD,OAAAL,EAAeM,SAAOD,OAAGF,GACrDI,EAAaA,cAACJ,GACVK,EAAQA,WACVC,EAAQA,SAACN,GAETO,EAAgBA,iBAACP,GAGnBQ,gBAAc,gCAAiC,CAAA,EAChD,CACDC,mBAAiB,gCAAiC,SAACC,GACjDX,EAAQW,EAAKV,IACf,GAEAW,EAAAA,UAAU,WACR,SAASC,EAAsBC,GACzBzB,EAAU0B,SAASD,EAAMb,MAC3BD,EAAQc,EAAMb,IAEjB,CAED,OADAe,OAAOC,iBAAiB,UAAWJ,GAC5B,WAAM,OAAAG,OAAOE,oBAAoB,UAAWL,GACpD,EAAE,IAEK,IAAAM,EAAMC,qBAEd,OACEC,UAAAC,cAAAD,EAAA,QAAAE,SAAA,KACG3B,EACCyB,EAAK,QAAAC,cAAA,MAAA,CAAAE,UAAU,gCACbH,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,oBACbH,EAAAA,QAAAC,cAACG,EAAAA,OACC,CAAAC,QAAQ,cACRC,QAASC,EAAkBA,mBAAA,kBACX,mBACM,uBAAAT,EAAE,yBAA2B,IAEnDE,UAACC,cAAAO,EAAAA,gBAAgB,CAAAC,KAAK,KAAKC,KAAMC,EAAWA,eAE9CX,UACyBC,cAAA,QAAA,CAAA,yBAAA,EACvBW,KAAK,OACLC,UACA,EAAAC,YAAahB,EAAE,gCAAkC,GACjDiB,MAAO5C,EACP6C,WAAS,EACTb,UAAU,gcAGdH,EAAA,QAAAC,cAACgB,EAAO,QAAC,CAAAC,YAAavC,KAGxBqB,EAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,yCAEjBH,EAAAA,QAAAC,cAACkB,sBAAoB,CAAAhB,UAAU,YAAYiB,GAAG,mBAAmBC,MAAM,UAG7E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/react-redux/es/index.js"),require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var t=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var r=require("../Button.js"),l=require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/react-redux/es/index.js"),require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var t=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var r=require("../Button.js"),l=require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),u=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),n=require("../GenericAvatar.js"),i=require("../CustomThemedTooltip.js"),o=require("../../node_modules/react-redux/es/hooks/useSelector.js"),a=require("../../node_modules/react-redux/es/hooks/useDispatch.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(e);exports.OperatorBusyView=function(){var s=o.useSelector(function(e){return e.island}),d=s.operatorBusy,m=s.previousView,f=o.useSelector(function(e){return e.avatars}).avatars,p=o.useSelector(function(e){return e.users}).extensions,v=t.useTranslation().t,b=a.useDispatch(),x=o.useSelector(function(e){return e.conference}),y=x.isActive,j=x.conferenceStartedFrom,N=o.useSelector(function(e){return e.currentUser}).username,q=o.useSelector(function(e){return e.currentCall}),w=q.accepted,h=q.incoming,_=q.outgoing,E=e.useCallback(function(){return y&&j===N?"waitingConference":w||h||_?m||"call":null},[w,j,h,y,_,m,N]),C=e.useCallback(function(){b.player.stopAudioPlayer(),b.island.resetOperatorBusyCompletely(),b.island.setIslandView(E())},[b,E]),g=e.useMemo(function(){if((null==d?void 0:d.calledNumber)&&p){var e=Object.values(p).find(function(e){return e.exten===(null==d?void 0:d.calledNumber)});return e?null==e?void 0:e.username:null}return null},[p,null==d?void 0:d.calledNumber]),k=e.useMemo(function(){return g&&f&&f[g]?f[g]:null},[f,g]),T=e.useMemo(function(){return null!==g},[g]),S=e.useMemo(function(){if(p&&(null==d?void 0:d.calledNumber)&&""!==(null==d?void 0:d.calledNumber)){var e=Object.values(p).find(function(e){return(null==e?void 0:e.exten)===(null==d?void 0:d.calledNumber)});return e&&(null==e?void 0:e.name)&&""!==(null==e?void 0:e.name)?null==e?void 0:e.name:null==d?void 0:d.calledNumber}return"-"},[null==d?void 0:d.calledNumber,p]),A=e.useMemo(function(){return v(T?"Call.User busy":"Call.Number busy")},[v,T]);return e.useEffect(function(){return function(){b.player.stopAudioPlayer()}},[b]),e.useEffect(function(){var e=window.setTimeout(function(){C()},4e3);return function(){window.clearTimeout(e)}},[C]),c.default.createElement(c.default.Fragment,null,c.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-between pi-w-full"},c.default.createElement("div",{className:"pi-flex pi-items-center pi-space-x-3"},c.default.createElement(n.GenericAvatar,{avatarUrl:k,size:"open",showPulseEffect:!1}),c.default.createElement("div",{className:"pi-flex pi-flex-col"},c.default.createElement("div",{className:"pi-text-lg pi-font-medium pi-text-primaryNeutral dark:pi-text-primaryNeutralDark"},S),c.default.createElement("div",{className:"pi-text-sm pi-font-regular pi-text-primaryNeutral dark:pi-text-primaryNeutralDark"},A))),c.default.createElement(r.Button,{variant:"default",onClick:C,className:"pi-p-2","data-tooltip-id":"tooltip-close-busy-call","data-tooltip-content":v("Tooltip.Close")||"Close"},c.default.createElement(l.FontAwesomeIcon,{icon:u.faXmark,className:"pi-w-5 pi-h-5"}))),c.default.createElement(i.CustomThemedTooltip,{className:"pi-z-20",id:"tooltip-close-busy-call",place:"left"}))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/OperatorBusyView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useCallback, useMemo, useEffect } from 'react'\nimport { useSelector, useDispatch } from 'react-redux'\nimport { RootState, Dispatch } from '../../store'\nimport { useTranslation } from 'react-i18next'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faXmark } from '@fortawesome/free-solid-svg-icons'\nimport { GenericAvatar } from '../GenericAvatar'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\n\nexport const OperatorBusyView: FC<OperatorBusyViewProps> = () => {\n const { operatorBusy, previousView } = useSelector((state: RootState) => state.island)\n const { avatars } = useSelector((state: RootState) => state.avatars)\n const { extensions } = useSelector((state: RootState) => state.users)\n const { t } = useTranslation()\n const dispatch = useDispatch<Dispatch>()\n const { isActive, conferenceStartedFrom } = useSelector((state: RootState) => state.conference)\n const { username } = useSelector((state: RootState) => state.currentUser)\n const { accepted, incoming, outgoing } = useSelector((state: RootState) => state.currentCall)\n\n const getNextViewOnClose = useCallback(() => {\n if (isActive && conferenceStartedFrom === username) {\n return 'waitingConference'\n }\n\n if (accepted || incoming || outgoing) {\n return previousView || 'call'\n }\n\n return null\n }, [accepted, conferenceStartedFrom, incoming, isActive, outgoing, previousView, username])\n\n const handleClose = useCallback(() => {\n // Stop any playing busy tone\n dispatch.player.stopAudioPlayer()\n // Reset operator busy state completely when user closes manually\n dispatch.island.resetOperatorBusyCompletely()\n dispatch.island.setIslandView(getNextViewOnClose())\n }, [dispatch, getNextViewOnClose])\n\n // Get the username of the operator based on called extension number\n const operatorUsername = useMemo(() => {\n // Check if we have the called number and extensions are loaded\n if (operatorBusy?.calledNumber && extensions) {\n // Find the extension that matches the called number\n const extension = Object.values(extensions).find(\n (ext) => ext.exten === operatorBusy?.calledNumber,\n )\n // Return the username if found\n return extension ? extension?.username : null\n }\n return null\n }, [extensions, operatorBusy?.calledNumber])\n\n // Get avatar URL based on operator's username\n const avatarUrl = useMemo(() => {\n // If we have the username and avatars, look for the avatar\n if (operatorUsername && avatars && avatars[operatorUsername]) {\n return avatars[operatorUsername]\n }\n return null\n }, [avatars, operatorUsername])\n\n // Check if the called number is an operator (has username)\n const isOperator = useMemo(() => {\n return operatorUsername !== null\n }, [operatorUsername])\n\n // Format display text - show the operator name or called number\n const displayText = useMemo(() => {\n if (extensions && operatorBusy?.calledNumber && operatorBusy?.calledNumber !== '') {\n // Try to get the extension to display the name if available\n const extension = Object.values(extensions).find(\n (ext) => ext?.exten === operatorBusy?.calledNumber,\n )\n\n // If we found the extension and it has a name, show the name\n if (extension && extension?.name && extension?.name !== '') {\n return extension?.name\n }\n\n // Otherwise just show the extension number\n return operatorBusy?.calledNumber\n }\n //fallback string\n return '-'\n }, [operatorBusy?.calledNumber, extensions])\n\n const statusText = useMemo(() => {\n // If it's an operator, show \"User busy\", otherwise show \"Number busy\"\n if (isOperator) {\n return t('Call.User busy')\n }\n return t('Call.Number busy')\n }, [t, isOperator])\n\n // Stop busy tone when component unmounts\n useEffect(() => {\n return () => {\n dispatch.player.stopAudioPlayer()\n }\n }, [dispatch])\n\n useEffect(() => {\n const timeoutId = window.setTimeout(() => {\n handleClose()\n }, 4000)\n\n return () => {\n window.clearTimeout(timeoutId)\n }\n }, [handleClose])\n\n return (\n <>\n <div className='pi-flex pi-items-center pi-justify-between pi-w-full'>\n {/* Left side - Avatar and info */}\n <div className='pi-flex pi-items-center pi-space-x-3'>\n {/* Avatar */}\n <GenericAvatar avatarUrl={avatarUrl} size='open' showPulseEffect={false} />\n\n {/* Number and status */}\n <div className='pi-flex pi-flex-col'>\n <div className='pi-text-lg pi-font-medium pi-text-primaryNeutral dark:pi-text-primaryNeutralDark'>\n {displayText}\n </div>\n <div className='pi-text-sm pi-font-regular pi-text-primaryNeutral dark:pi-text-primaryNeutralDark'>\n {statusText}\n </div>\n </div>\n </div>\n\n {/* Right side - Close button */}\n <Button\n variant='default'\n onClick={handleClose}\n className='pi-p-2'\n data-tooltip-id='tooltip-close-busy-call'\n data-tooltip-content={t('Tooltip.Close') || 'Close'}\n >\n <FontAwesomeIcon icon={faXmark} className='pi-w-5 pi-h-5' />\n </Button>\n </div>\n <CustomThemedTooltip className='pi-z-20' id='tooltip-close-busy-call' place='left' />\n </>\n )\n}\n\nexport interface OperatorBusyViewProps {}\n"],"names":["_a","useSelector","state","island","operatorBusy","previousView","avatars","extensions","users","t","useTranslation","dispatch","useDispatch","_b","conference","isActive","conferenceStartedFrom","username","currentUser","_c","currentCall","accepted","incoming","outgoing","getNextViewOnClose","useCallback","handleClose","player","stopAudioPlayer","resetOperatorBusyCompletely","setIslandView","operatorUsername","useMemo","calledNumber","extension","Object","values","find","ext","exten","avatarUrl","isOperator","displayText","name","statusText","useEffect","timeoutId","window","setTimeout","clearTimeout","React","createElement","Fragment","className","GenericAvatar","size","showPulseEffect","Button","variant","onClick","FontAwesomeIcon","icon","faXmark","CustomThemedTooltip","id","place"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/OperatorBusyView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useCallback, useMemo, useEffect } from 'react'\nimport { useSelector, useDispatch } from 'react-redux'\nimport { RootState, Dispatch } from '../../store'\nimport { useTranslation } from 'react-i18next'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faXmark } from '@fortawesome/free-solid-svg-icons'\nimport { GenericAvatar } from '../GenericAvatar'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\n\nexport const OperatorBusyView: FC<OperatorBusyViewProps> = () => {\n const { operatorBusy, previousView } = useSelector((state: RootState) => state.island)\n const { avatars } = useSelector((state: RootState) => state.avatars)\n const { extensions } = useSelector((state: RootState) => state.users)\n const { t } = useTranslation()\n const dispatch = useDispatch<Dispatch>()\n const { isActive, conferenceStartedFrom } = useSelector((state: RootState) => state.conference)\n const { username } = useSelector((state: RootState) => state.currentUser)\n const { accepted, incoming, outgoing } = useSelector((state: RootState) => state.currentCall)\n\n const getNextViewOnClose = useCallback(() => {\n if (isActive && conferenceStartedFrom === username) {\n return 'waitingConference'\n }\n\n if (accepted || incoming || outgoing) {\n return previousView || 'call'\n }\n\n return null\n }, [accepted, conferenceStartedFrom, incoming, isActive, outgoing, previousView, username])\n\n const handleClose = useCallback(() => {\n // Stop any playing busy tone\n dispatch.player.stopAudioPlayer()\n // Reset operator busy state completely when user closes manually\n dispatch.island.resetOperatorBusyCompletely()\n dispatch.island.setIslandView(getNextViewOnClose())\n }, [dispatch, getNextViewOnClose])\n\n // Get the username of the operator based on called extension number\n const operatorUsername = useMemo(() => {\n // Check if we have the called number and extensions are loaded\n if (operatorBusy?.calledNumber && extensions) {\n // Find the extension that matches the called number\n const extension = Object.values(extensions).find(\n (ext) => ext.exten === operatorBusy?.calledNumber,\n )\n // Return the username if found\n return extension ? extension?.username : null\n }\n return null\n }, [extensions, operatorBusy?.calledNumber])\n\n // Get avatar URL based on operator's username\n const avatarUrl = useMemo(() => {\n // If we have the username and avatars, look for the avatar\n if (operatorUsername && avatars && avatars[operatorUsername]) {\n return avatars[operatorUsername]\n }\n return null\n }, [avatars, operatorUsername])\n\n // Check if the called number is an operator (has username)\n const isOperator = useMemo(() => {\n return operatorUsername !== null\n }, [operatorUsername])\n\n // Format display text - show the operator name or called number\n const displayText = useMemo(() => {\n if (extensions && operatorBusy?.calledNumber && operatorBusy?.calledNumber !== '') {\n // Try to get the extension to display the name if available\n const extension = Object.values(extensions).find(\n (ext) => ext?.exten === operatorBusy?.calledNumber,\n )\n\n // If we found the extension and it has a name, show the name\n if (extension && extension?.name && extension?.name !== '') {\n return extension?.name\n }\n\n // Otherwise just show the extension number\n return operatorBusy?.calledNumber\n }\n //fallback string\n return '-'\n }, [operatorBusy?.calledNumber, extensions])\n\n const statusText = useMemo(() => {\n // If it's an operator, show \"User busy\", otherwise show \"Number busy\"\n if (isOperator) {\n return t('Call.User busy')\n }\n return t('Call.Number busy')\n }, [t, isOperator])\n\n // Stop busy tone when component unmounts\n useEffect(() => {\n return () => {\n dispatch.player.stopAudioPlayer()\n }\n }, [dispatch])\n\n useEffect(() => {\n const timeoutId = window.setTimeout(() => {\n handleClose()\n }, 4000)\n\n return () => {\n window.clearTimeout(timeoutId)\n }\n }, [handleClose])\n\n return (\n <>\n <div className='pi-flex pi-items-center pi-justify-between pi-w-full'>\n {/* Left side - Avatar and info */}\n <div className='pi-flex pi-items-center pi-space-x-3'>\n {/* Avatar */}\n <GenericAvatar avatarUrl={avatarUrl} size='open' showPulseEffect={false} />\n\n {/* Number and status */}\n <div className='pi-flex pi-flex-col'>\n <div className='pi-text-lg pi-font-medium pi-text-primaryNeutral dark:pi-text-primaryNeutralDark'>\n {displayText}\n </div>\n <div className='pi-text-sm pi-font-regular pi-text-primaryNeutral dark:pi-text-primaryNeutralDark'>\n {statusText}\n </div>\n </div>\n </div>\n\n {/* Right side - Close button */}\n <Button\n variant='default'\n onClick={handleClose}\n className='pi-p-2'\n data-tooltip-id='tooltip-close-busy-call'\n data-tooltip-content={t('Tooltip.Close') || 'Close'}\n >\n <FontAwesomeIcon icon={faXmark} className='pi-w-5 pi-h-5' />\n </Button>\n </div>\n <CustomThemedTooltip className='pi-z-20' id='tooltip-close-busy-call' place='left' />\n </>\n )\n}\n\nexport interface OperatorBusyViewProps {}\n"],"names":["_a","useSelector","state","island","operatorBusy","previousView","avatars","extensions","users","t","useTranslation","dispatch","useDispatch","_b","conference","isActive","conferenceStartedFrom","username","currentUser","_c","currentCall","accepted","incoming","outgoing","getNextViewOnClose","useCallback","handleClose","player","stopAudioPlayer","resetOperatorBusyCompletely","setIslandView","operatorUsername","useMemo","calledNumber","extension","Object","values","find","ext","exten","avatarUrl","isOperator","displayText","name","statusText","useEffect","timeoutId","window","setTimeout","clearTimeout","React","createElement","Fragment","className","GenericAvatar","size","showPulseEffect","Button","variant","onClick","FontAwesomeIcon","icon","faXmark","CustomThemedTooltip","id","place"],"mappings":"8nCAa2D,WACnD,IAAAA,EAAiCC,EAAAA,YAAY,SAACC,GAAqB,OAAAA,EAAMC,MAAM,GAA7EC,iBAAcC,iBACdC,EAAYL,cAAY,SAACC,GAAqB,OAAAA,EAAMI,kBACpDC,EAAeN,cAAY,SAACC,GAAqB,OAAAA,EAAMM,mBACvDC,EAAMC,qBACRC,EAAWC,EAAAA,cACXC,EAAsCZ,EAAAA,YAAY,SAACC,GAAqB,OAAAA,EAAMY,UAAU,GAAtFC,aAAUC,0BACVC,EAAahB,cAAY,SAACC,GAAqB,OAAAA,EAAMgB,uBACvDC,EAAmClB,EAAAA,YAAY,S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A,EAAWS,KAIbvC,eAAAA,EAAc6B,YACtB,CAED,MAAO,GACR,EAAE,CAAC7B,aAAY,EAAZA,EAAc6B,aAAc1B,IAE1BqC,EAAaZ,EAAAA,QAAQ,WAEzB,OACSvB,EADLgC,EACO,iBAEF,mBACX,EAAG,CAAChC,EAAGgC,IAmBP,OAhBAI,EAAAA,UAAU,WACR,OAAO,WACLlC,EAASgB,OAAOC,iBAClB,CACF,EAAG,CAACjB,IAEJkC,EAAAA,UAAU,WACR,IAAMC,EAAYC,OAAOC,WAAW,WAClCtB,GACD,EAAE,KAEH,OAAO,WACLqB,OAAOE,aAAaH,EACtB,CACF,EAAG,CAACpB,IAGFwB,UAAAC,cAAAD,EAAA,QAAAE,SAAA,KACEF,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,wDAEbH,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,wCAEbH,UAAAC,cAACG,EAAaA,cAAA,CAACd,UAAWA,EAAWe,KAAK,OAAOC,iBAAiB,IAGlEN,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,uBACbH,EAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,oFACZX,GAEHQ,EAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,qFACZT,KAMPM,EAAC,QAAAC,cAAAM,EAAMA,QACLC,QAAQ,UACRC,QAASjC,EACT2B,UAAU,2BACM,0BAAyB,uBACnB5C,EAAE,kBAAoB,SAE5CyC,UAACC,cAAAS,EAAAA,gBAAgB,CAAAC,KAAMC,EAAAA,QAAST,UAAU,oBAG9CH,EAAAA,QAAAC,cAACY,sBAAoB,CAAAV,UAAU,UAAUW,GAAG,0BAA0BC,MAAM,SAGlF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react");require("../../node_modules/react-redux/es/index.js");var i=require("../../store/index.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var r=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var s=require("../Hangup.js"),n=require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react");require("../../node_modules/react-redux/es/index.js");var i=require("../../store/index.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var r=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var s=require("../Hangup.js"),n=require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),a=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),o=require("../../utils/customHooks/useEventListener.js"),l=require("../../utils/genericFunctions/eventDispatch.js"),c=require("../../services/offhour.js");require("../../lib/webrtc/janus.js"),require("../../node_modules/webrtc-adapter/src/js/adapter_core.js"),require("../../node_modules/mic-check/lib/index.js");var d=require("../../events/RecorderEvents.js"),u=require("./PhysicalRecordingTimer.js"),p=require("../../node_modules/react-redux/es/hooks/useSelector.js"),m=require("../../node_modules/react-redux/es/hooks/useDispatch.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=f(t);exports.PhysicalRecorderView=function(){var f=p.useSelector(function(e){return e.island}).isOpen,v=p.useSelector(function(e){return{recording:e.physicalRecorder.recording}}).recording,j=i.store.getState().currentUser.username,g=t.useRef(null),w=m.useDispatch();t.useEffect(function(){return w.recorder.setVisibleContainerRef(g),function(){w.recorder.reset()}},[]);var x=r.useTranslation().t;o.useEventListener("phone-island-physical-recording-open",function(){!function(){e.__awaiter(this,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return w.physicalRecorder.setRecording(!0),[4,c.startAnnouncementRecording()];case 1:return(t=e.sent()).tempFilename&&w.physicalRecorder.setTempFilename(t.tempFilename),l.eventDispatch("phone-island-recording-started",{}),[2]}})})}()});var y=i.store.getState().physicalRecorder.recordingTempVariable;return o.useEventListener("phone-island-conversations",function(e){Object.keys(e).forEach(function(t){var i;if(t===j){var r=null===(i=e[t])||void 0===i?void 0:i.conversations;if(r){var s=Object.keys(r);if(s.length>0&&"REC"===r[s[0]].counterpartName){w.physicalRecorder.setStartTime("".concat(Date.now()/1e3));var n=r[s[0]];if(n&&n.chSource){var a={conversationId:n.id,endpointId:n.chSource.callerNum};w.physicalRecorder.setCallRecordingInformations({recordingCallInformation:a})}}0===s.length&&v&&!y&&(d.dispatchPhysicalRecordingSave(),w.island.setIslandView(null),w.physicalRecorder.setRecording(!1))}}})}),h.default.createElement(h.default.Fragment,null,f?h.default.createElement("div",{className:""},y&&h.default.createElement("div",{className:"pi-flex pi-w-full pi-justify-center pi-items-center pi-pt-4 pi-pb-9"},h.default.createElement("div",{className:"pi-font-medium pi-text-4xl pi-w-fit pi-h-fit dark:pi-text-white"},h.default.createElement(u.default,null))),h.default.createElement("div",{className:"pi-flex pi-w-full pi-justify-center pi-items-center"},y?h.default.createElement("div",{className:"pi-sans pi-text-sm pi-w-fit pi-h-fit dark:pi-text-white"},x("Common.Close the call to stop recording")):h.default.createElement("div",{className:"pi-mt-12 pi-font-regular pi-text-lg pi-w-fit pi-h-fit dark:pi-text-white"},x("Common.Answer phone to start recording"))),h.default.createElement("div",{className:"pi-grid pi-pt-2 pi-mt-8"},h.default.createElement("div",{className:"pi-grid pi-justify-items-center"},h.default.createElement(s.default,{description:x("Tooltip.Interrupt recording"),isPhysicalRecording:!0})))):h.default.createElement("div",{className:"pi-flex pi-justify-between pi-items-center"},h.default.createElement("div",{className:"pi-font-medium pi-text-base"},x("Common.Recording")),h.default.createElement("div",{className:"".concat(f?"pi-h-12 pi-w-12":"pi-h-6 pi-w-6"," pi-flex pi-justify-center pi-items-center")},h.default.createElement("div",{className:"".concat(f?"pi-h-8":"pi-h-4 pi-w-4 pi-rounded-full"," pi-w-fit pi-flex pi-justify-center pi-items-center pi-gap-1 pi-overflow-hidden")},h.default.createElement("span",{className:"".concat(f?"pi-w-8 pi-h-8":"pi-h-6 pi-w-6"," pi-animate-ping pi-absolute pi-inline-flex pi-rounded-full pi-bg-red-400 pi-opacity-75 ")}),h.default.createElement(n.FontAwesomeIcon,{className:"pi-w-4 pi-h-6 pi-rotate-45 pi-text-red-500",icon:a.faCircle})))))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/PhysicalRecorderView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useRef, useEffect } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { useTranslation } from 'react-i18next'\nimport Hangup from '../Hangup'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faCircle } from '@fortawesome/free-solid-svg-icons'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { startAnnouncementRecording } from '../../services/offhour'\nimport { dispatchPhysicalRecordingSave } from '../../events'\nimport PhysicalRecordingTimer from './PhysicalRecordingTimer'\n\nexport const PhysicalRecorderView: FC<PhysicalRecorderViewProps> = () => {\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { recording } = useSelector((state: RootState) => ({\n recording: state.physicalRecorder.recording,\n }))\n\n const { username } = store.getState().currentUser\n const visibleContainerRef = useRef<HTMLDivElement>(null)\n\n // Initialize state dispatch\n const dispatch = useDispatch<Dispatch>()\n\n // Handle view close and reset state\n useEffect(() => {\n // Set visible container reference to recorder state\n dispatch.recorder.setVisibleContainerRef(visibleContainerRef)\n\n return () => {\n dispatch.recorder.reset()\n }\n }, [])\n\n const { t } = useTranslation()\n\n async function handleStart() {\n // Update the recorder state\n dispatch.physicalRecorder.setRecording(true)\n // Call the api to start the recording call\n const data: { tempFilename: string } | null = await startAnnouncementRecording()\n // Set the returned temp file name to the store\n if (data.tempFilename) dispatch.physicalRecorder.setTempFilename(data.tempFilename)\n eventDispatch('phone-island-recording-started', {})\n }\n\n // Save recording inside store and make api request\n useEventListener('phone-island-physical-recording-open', () => {\n handleStart()\n })\n\n const { recordingTempVariable } = store.getState().physicalRecorder\n // recording true and conversation not empty recording is started\n // recording true and conversation empty recording is stopped\n useEventListener('phone-island-conversations', (data: { [key: string]: any }) => {\n const keys = Object.keys(data)\n\n keys.forEach((key) => {\n if (key === username) {\n let conversations = data[key]?.conversations\n\n if (conversations) {\n const conversationKeys = Object.keys(conversations)\n if (\n conversationKeys.length > 0 &&\n conversations[conversationKeys[0]].counterpartName === 'REC'\n ) {\n // Set the start time of recording\n dispatch.physicalRecorder.setStartTime(`${Date.now() / 1000}`)\n let firstConversationKey = conversationKeys[0]\n let userRecordingData = conversations[firstConversationKey]\n if (userRecordingData) {\n if (userRecordingData.chSource) {\n let recordingCallInformation = {\n conversationId: userRecordingData.id,\n endpointId: userRecordingData.chSource.callerNum,\n }\n dispatch.physicalRecorder.setCallRecordingInformations({\n recordingCallInformation,\n })\n }\n }\n }\n if (conversationKeys.length === 0 && recording && !recordingTempVariable) {\n // close physical recording phone island view\n dispatchPhysicalRecordingSave()\n dispatch.island.setIslandView(null)\n dispatch.physicalRecorder.setRecording(false)\n }\n }\n }\n })\n })\n\n return (\n <>\n {isOpen ? (\n <div className=''>\n {recordingTempVariable && (\n <div className='pi-flex pi-w-full pi-justify-center pi-items-center pi-pt-4 pi-pb-9'>\n <div className='pi-font-medium pi-text-4xl pi-w-fit pi-h-fit dark:pi-text-white'>\n <PhysicalRecordingTimer />\n </div>\n </div>\n )}\n <div className='pi-flex pi-w-full pi-justify-center pi-items-center'>\n {recordingTempVariable ? (\n <div className='pi-sans pi-text-sm pi-w-fit pi-h-fit dark:pi-text-white'>\n {t('Common.Close the call to stop recording')}\n </div>\n ) : (\n <div className='pi-mt-12 pi-font-regular pi-text-lg pi-w-fit pi-h-fit dark:pi-text-white'>\n {t('Common.Answer phone to start recording')}\n </div>\n )}\n </div>\n <div className='pi-grid pi-pt-2 pi-mt-8'>\n <div className='pi-grid pi-justify-items-center'>\n <Hangup description={t('Tooltip.Interrupt recording')} isPhysicalRecording />\n </div>\n </div>\n </div>\n ) : (\n <div className='pi-flex pi-justify-between pi-items-center'>\n <div className='pi-font-medium pi-text-base'>{t('Common.Recording')}</div>\n <div\n className={`${\n !isOpen ? 'pi-h-6 pi-w-6' : 'pi-h-12 pi-w-12'\n } pi-flex pi-justify-center pi-items-center`}\n >\n <div\n className={`${\n !isOpen ? 'pi-h-4 pi-w-4 pi-rounded-full' : 'pi-h-8'\n } pi-w-fit pi-flex pi-justify-center pi-items-center pi-gap-1 pi-overflow-hidden`}\n >\n <span\n className={`${\n !isOpen ? 'pi-h-6 pi-w-6' : 'pi-w-8 pi-h-8'\n } pi-animate-ping pi-absolute pi-inline-flex pi-rounded-full pi-bg-red-400 pi-opacity-75 `}\n ></span>\n <FontAwesomeIcon\n className='pi-w-4 pi-h-6 pi-rotate-45 pi-text-red-500'\n icon={faCircle}\n ></FontAwesomeIcon>\n </div>\n </div>\n </div>\n )}\n </>\n )\n}\n\nexport interface PhysicalRecorderViewProps {}\n"],"names":["isOpen","useSelector","state","island","recording","physicalRecorder","username","store","getState","currentUser","visibleContainerRef","useRef","dispatch","useDispatch","useEffect","recorder","setVisibleContainerRef","reset","t","useTranslation","useEventListener","setRecording","startAnnouncementRecording","data","_a","sent","tempFilename","setTempFilename","eventDispatch","handleStart","recordingTempVariable","Object","keys","forEach","key","conversations","conversationKeys","length","counterpartName","setStartTime","concat","Date","now","userRecordingData","chSource","recordingCallInformation","conversationId","id","endpointId","callerNum","setCallRecordingInformations","dispatchPhysicalRecordingSave","setIslandView","React","createElement","Fragment","className","PhysicalRecordingTimer","Hangup","description","isPhysicalRecording","FontAwesomeIcon","icon","faCircle"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/PhysicalRecorderView/index.tsx"],"sourcesContent":["// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n\nimport React, { type FC, useRef, useEffect } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Dispatch, RootState, store } from '../../store'\nimport { useTranslation } from 'react-i18next'\nimport Hangup from '../Hangup'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport { faCircle } from '@fortawesome/free-solid-svg-icons'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { startAnnouncementRecording } from '../../services/offhour'\nimport { dispatchPhysicalRecordingSave } from '../../events'\nimport PhysicalRecordingTimer from './PhysicalRecordingTimer'\n\nexport const PhysicalRecorderView: FC<PhysicalRecorderViewProps> = () => {\n const { isOpen } = useSelector((state: RootState) => state.island)\n const { recording } = useSelector((state: RootState) => ({\n recording: state.physicalRecorder.recording,\n }))\n\n const { username } = store.getState().currentUser\n const visibleContainerRef = useRef<HTMLDivElement>(null)\n\n // Initialize state dispatch\n const dispatch = useDispatch<Dispatch>()\n\n // Handle view close and reset state\n useEffect(() => {\n // Set visible container reference to recorder state\n dispatch.recorder.setVisibleContainerRef(visibleContainerRef)\n\n return () => {\n dispatch.recorder.reset()\n }\n }, [])\n\n const { t } = useTranslation()\n\n async function handleStart() {\n // Update the recorder state\n dispatch.physicalRecorder.setRecording(true)\n // Call the api to start the recording call\n const data: { tempFilename: string } | null = await startAnnouncementRecording()\n // Set the returned temp file name to the store\n if (data.tempFilename) dispatch.physicalRecorder.setTempFilename(data.tempFilename)\n eventDispatch('phone-island-recording-started', {})\n }\n\n // Save recording inside store and make api request\n useEventListener('phone-island-physical-recording-open', () => {\n handleStart()\n })\n\n const { recordingTempVariable } = store.getState().physicalRecorder\n // recording true and conversation not empty recording is started\n // recording true and conversation empty recording is stopped\n useEventListener('phone-island-conversations', (data: { [key: string]: any }) => {\n const keys = Object.keys(data)\n\n keys.forEach((key) => {\n if (key === username) {\n let conversations = data[key]?.conversations\n\n if (conversations) {\n const conversationKeys = Object.keys(conversations)\n if (\n conversationKeys.length > 0 &&\n conversations[conversationKeys[0]].counterpartName === 'REC'\n ) {\n // Set the start time of recording\n dispatch.physicalRecorder.setStartTime(`${Date.now() / 1000}`)\n let firstConversationKey = conversationKeys[0]\n let userRecordingData = conversations[firstConversationKey]\n if (userRecordingData) {\n if (userRecordingData.chSource) {\n let recordingCallInformation = {\n conversationId: userRecordingData.id,\n endpointId: userRecordingData.chSource.callerNum,\n }\n dispatch.physicalRecorder.setCallRecordingInformations({\n recordingCallInformation,\n })\n }\n }\n }\n if (conversationKeys.length === 0 && recording && !recordingTempVariable) {\n // close physical recording phone island view\n dispatchPhysicalRecordingSave()\n dispatch.island.setIslandView(null)\n dispatch.physicalRecorder.setRecording(false)\n }\n }\n }\n })\n })\n\n return (\n <>\n {isOpen ? (\n <div className=''>\n {recordingTempVariable && (\n <div className='pi-flex pi-w-full pi-justify-center pi-items-center pi-pt-4 pi-pb-9'>\n <div className='pi-font-medium pi-text-4xl pi-w-fit pi-h-fit dark:pi-text-white'>\n <PhysicalRecordingTimer />\n </div>\n </div>\n )}\n <div className='pi-flex pi-w-full pi-justify-center pi-items-center'>\n {recordingTempVariable ? (\n <div className='pi-sans pi-text-sm pi-w-fit pi-h-fit dark:pi-text-white'>\n {t('Common.Close the call to stop recording')}\n </div>\n ) : (\n <div className='pi-mt-12 pi-font-regular pi-text-lg pi-w-fit pi-h-fit dark:pi-text-white'>\n {t('Common.Answer phone to start recording')}\n </div>\n )}\n </div>\n <div className='pi-grid pi-pt-2 pi-mt-8'>\n <div className='pi-grid pi-justify-items-center'>\n <Hangup description={t('Tooltip.Interrupt recording')} isPhysicalRecording />\n </div>\n </div>\n </div>\n ) : (\n <div className='pi-flex pi-justify-between pi-items-center'>\n <div className='pi-font-medium pi-text-base'>{t('Common.Recording')}</div>\n <div\n className={`${\n !isOpen ? 'pi-h-6 pi-w-6' : 'pi-h-12 pi-w-12'\n } pi-flex pi-justify-center pi-items-center`}\n >\n <div\n className={`${\n !isOpen ? 'pi-h-4 pi-w-4 pi-rounded-full' : 'pi-h-8'\n } pi-w-fit pi-flex pi-justify-center pi-items-center pi-gap-1 pi-overflow-hidden`}\n >\n <span\n className={`${\n !isOpen ? 'pi-h-6 pi-w-6' : 'pi-w-8 pi-h-8'\n } pi-animate-ping pi-absolute pi-inline-flex pi-rounded-full pi-bg-red-400 pi-opacity-75 `}\n ></span>\n <FontAwesomeIcon\n className='pi-w-4 pi-h-6 pi-rotate-45 pi-text-red-500'\n icon={faCircle}\n ></FontAwesomeIcon>\n </div>\n </div>\n </div>\n )}\n </>\n )\n}\n\nexport interface PhysicalRecorderViewProps {}\n"],"names":["isOpen","useSelector","state","island","recording","physicalRecorder","username","store","getState","currentUser","visibleContainerRef","useRef","dispatch","useDispatch","useEffect","recorder","setVisibleContainerRef","reset","t","useTranslation","useEventListener","setRecording","startAnnouncementRecording","data","_a","sent","tempFilename","setTempFilename","eventDispatch","handleStart","recordingTempVariable","Object","keys","forEach","key","conversations","conversationKeys","length","counterpartName","setStartTime","concat","Date","now","userRecordingData","chSource","recordingCallInformation","conversationId","id","endpointId","callerNum","setCallRecordingInformations","dispatchPhysicalRecordingSave","setIslandView","React","createElement","Fragment","className","PhysicalRecordingTimer","Hangup","description","isPhysicalRecording","FontAwesomeIcon","icon","faCircle"],"mappings":"qiDAemE,WACzD,IAAAA,EAAWC,cAAY,SAACC,GAAqB,OAAAA,EAAMC,gBACnDC,EAAcH,EAAAA,YAAY,SAACC,GAAqB,MAAC,CAC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,GAE1C,CACF,CACH,EACF,GAGEgC,UACGC,cAAAD,EAAA,QAAAE,SAAA,KAAAvD,EACCqD,EAAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,IACZ1B,GACCuB,EAAK,QAAAC,cAAA,MAAA,CAAAE,UAAU,uEACbH,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,mEACbH,EAAAA,QAAAC,cAACG,EAAAA,QAAsB,QAI7BJ,EAAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,uDACZ1B,EACCuB,+BAAKG,UAAU,2DACZtC,EAAE,4CAGLmC,+BAAKG,UAAU,4EACZtC,EAAE,4CAITmC,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,2BACbH,EAAAA,QAAKC,cAAA,MAAA,CAAAE,UAAU,mCACbH,EAAC,QAAAC,cAAAI,WAAOC,YAAazC,EAAE,+BAAgC0C,qBAAmB,OAKhFP,EAAA,QAAAC,cAAA,MAAA,CAAKE,UAAU,8CACbH,UAAKC,cAAA,MAAA,CAAAE,UAAU,+BAA+BtC,EAAE,qBAChDmC,EAAAA,QAAAC,cAAA,MAAA,CACEE,UAAW,GACThB,OAACxC,EAA2B,kBAAlB,gBACgC,+CAE5CqD,EAAAA,QAAAC,cAAA,MAAA,CACEE,UAAW,GACThB,OAACxC,EAA2C,SAAlC,gCACqE,oFAEjFqD,EAAAA,QAAAC,cAAA,OAAA,CACEE,UAAW,GACThB,OAACxC,EAA2B,gBAAlB,8GAGdqD,EAAAA,QAAAC,cAACO,kBACC,CAAAL,UAAU,6CACVM,KAAMC,gBAQtB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("../Button.js"),i=require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react"),r=require("../Button.js"),i=require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),o=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),n=require("../../services/offhour.js");require("../../node_modules/react-redux/es/index.js");var s=require("../../lib/phone/call.js"),a=require("../../utils/customHooks/useEventListener.js"),l=require("../../utils/genericFunctions/eventDispatch.js");require("../../store/index.js");var c=require("../../events/RecorderEvents.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var d=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var u=require("../CustomThemedTooltip.js"),p=require("../../node_modules/@nethesis/nethesis-solid-svg-icons/index.mjs.js"),m=require("../../node_modules/react-redux/es/utils/shallowEqual.js");require("../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),require("../../node_modules/react-redux/node_modules/react-is/index.js");var f=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),g=require("../../node_modules/react-redux/es/hooks/useSelector.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=h(t);exports.Actions=function(){var h=f.useDispatch(),w=g.useSelector(function(e){return{incoming:e.recorder.incoming,waiting:e.recorder.waiting,recording:e.recorder.recording,recorded:e.recorder.recorded,playing:e.recorder.playing}},m.default),j=w.incoming,x=w.waiting,q=w.recording,E=w.recorded,y=w.playing;function _(){return e.__awaiter(this,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return h.recorder.setRecording(!0),h.recorder.setWaiting(!0),[4,n.startAnnouncementRecording()];case 1:return(t=e.sent()).tempFilename&&h.recorder.setTempFilename(t.tempFilename),h.recorder.setStartTime("".concat(Date.now()/1e3)),l.eventDispatch("phone-island-recording-started",{}),[2]}})})}function T(){h.recorder.setWaiting(!0),s.hangupCurrentCall(),h.recorder.setRecorded(!0),l.eventDispatch("phone-island-recording-stopped",{})}function b(){y&&(h.player.pauseAudioPlayer(),h.recorder.setPlaying(!1),h.recorder.setPaused(!0)),c.dispatchRecordingSave(),h.island.setIslandView(null)}a.useEventListener("phone-island-recording-start",function(e){_()}),a.useEventListener("phone-island-recording-stop",function(e){T()}),a.useEventListener("phone-island-recording-save",function(e){b()}),t.useEffect(function(){q||h.recorder.setWaiting(!1)},[q]),t.useEffect(function(){j&&(s.answerIncomingCall(),h.recorder.setIncoming(!1),h.recorder.setWaiting(!1))},[j]);var C=d.useTranslation().t;return v.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-between pi-px-6 pi-py-2 pi-gap-0 pi-w-full pi-mt-auto"},v.default.createElement(r.Button,{variant:"transparent",disabled:!0,className:"pi-w-6 pi-h-6 pi-flex pi-items-center pi-justify-center pi-flex-none"},v.default.createElement(i.FontAwesomeIcon,{icon:o.faDownLeftAndUpRightToCenter,className:"pi-w-6 pi-h-6"})),v.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-center pi-flex-grow"},q&&v.default.createElement(r.Button,{onClick:T,variant:"default",className:"pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center","data-tooltip-id":"tooltip-stop-recorder-view","data-tooltip-content":C("Tooltip.Stop")||""},x?v.default.createElement(i.FontAwesomeIcon,{icon:o.faCircleNotch,className:"fa-spin pi-loader",size:"lg"}):v.default.createElement(i.FontAwesomeIcon,{icon:o.faStop,size:"xl"})),E&&!q&&v.default.createElement(r.Button,{onClick:b,variant:"default",className:"pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center","data-tooltip-id":"tooltip-confirm-record-view","data-tooltip-content":C("Tooltip.Confirm")||""},v.default.createElement(i.FontAwesomeIcon,{icon:o.faFloppyDisk,className:"pi-h-6 pi-w-6"})),!q&&!E&&v.default.createElement(r.Button,{onClick:_,variant:"default",className:"pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center","data-tooltip-id":"tooltip-start-recording-recorder-view","data-tooltip-content":C("Tooltip.Start recording")||""},x?v.default.createElement(i.FontAwesomeIcon,{icon:o.faCircleNotch,className:"fa-spin pi-loader",size:"lg"}):v.default.createElement(i.FontAwesomeIcon,{icon:p.faRecord,className:"pi-h-6 pi-w-6"}))),v.default.createElement("div",{onClick:function(){return h.island.setIslandView("settings")},"data-tooltip-id":"tooltip-settings-view-recorder","data-tooltip-content":C("Tooltip.Go to settings")||"",className:"pi-flex pi-items-center pi-justify-center pi-cursor-pointer pi-text-gray-700 dark:pi-text-gray-200 pi-w-6 pi-h-6 pi-flex-none"},v.default.createElement(i.FontAwesomeIcon,{icon:o.faGear,className:"pi-h-6 pi-w-6"})),v.default.createElement(u.CustomThemedTooltip,{id:"tooltip-start-recording-recorder-view",place:"top"}),v.default.createElement(u.CustomThemedTooltip,{id:"tooltip-stop-recorder-view",place:"top"}),v.default.createElement(u.CustomThemedTooltip,{id:"tooltip-confirm-record-view",place:"top"}),v.default.createElement(u.CustomThemedTooltip,{id:"tooltip-settings-view-recorder",place:"top"}))};
|
|
2
2
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../src/components/RecorderView/Actions.tsx"],"sourcesContent":["//\n// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n//\n\nimport React, { type FC, useEffect } from 'react'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport {\n faStop,\n faCircleNotch,\n faGear,\n faDownLeftAndUpRightToCenter,\n faFloppyDisk,\n} from '@fortawesome/free-solid-svg-icons'\nimport { startAnnouncementRecording } from '../../services/offhour'\nimport { useDispatch, useSelector, shallowEqual } from 'react-redux'\nimport { Dispatch, RootState } from '../../store'\nimport { hangupCurrentCall, answerIncomingCall } from '../../lib/phone/call'\nimport { dispatchRecordingSave } from '../../events'\nimport { useTranslation } from 'react-i18next'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { faRecord } from '@nethesis/nethesis-solid-svg-icons'\n\nexport const Actions: FC<{}> = () => {\n const dispatch = useDispatch<Dispatch>()\n const { incoming, waiting, recording, recorded, playing } = useSelector(\n (state: RootState) => ({\n incoming: state.recorder.incoming,\n waiting: state.recorder.waiting,\n recording: state.recorder.recording,\n recorded: state.recorder.recorded,\n playing: state.recorder.playing,\n }),\n shallowEqual,\n )\n\n async function handleStart() {\n // Update the recorder state\n dispatch.recorder.setRecording(true)\n dispatch.recorder.setWaiting(true)\n // Call the api to start the recording call\n const data: { tempFilename: string } | null = await startAnnouncementRecording()\n // Set the returned temp file name to the store\n if (data.tempFilename) dispatch.recorder.setTempFilename(data.tempFilename)\n // Set the start time of recording\n dispatch.recorder.setStartTime(`${Date.now() / 1000}`)\n eventDispatch('phone-island-recording-started', {})\n }\n useEventListener('phone-island-recording-start', (data: {}) => {\n handleStart()\n })\n\n function handleStop() {\n // Set waiting to true\n dispatch.recorder.setWaiting(true)\n // Call the function to hangup the current call used for recording\n hangupCurrentCall()\n dispatch.recorder.setRecorded(true)\n eventDispatch('phone-island-recording-stopped', {})\n }\n useEventListener('phone-island-recording-stop', (data: {}) => {\n handleStop()\n })\n\n function handleSaveRecording() {\n // check if the audio is playing and pause it\n if (playing) {\n dispatch.player.pauseAudioPlayer()\n dispatch.recorder.setPlaying(false)\n dispatch.recorder.setPaused(true)\n }\n // Dispatch the reconrding save event\n dispatchRecordingSave()\n // Close the Island\n dispatch.island.setIslandView(null)\n }\n useEventListener('phone-island-recording-save', (data: {}) => {\n handleSaveRecording()\n })\n\n useEffect(() => {\n if (!recording) {\n dispatch.recorder.setWaiting(false)\n }\n }, [recording])\n\n useEffect(() => {\n if (incoming) {\n // Answer the incoming call for recording\n answerIncomingCall()\n // Reset incoming to recorder state\n dispatch.recorder.setIncoming(false)\n dispatch.recorder.setWaiting(false)\n }\n }, [incoming])\n\n const { t } = useTranslation()\n\n return (\n <div\n className={`pi-flex pi-items-center pi-justify-between pi-px-6 pi-py-2 pi-gap-0 pi-w-full pi-mt-auto`}\n >\n <Button\n variant='transparent'\n disabled\n className='pi-w-6 pi-h-6 pi-flex pi-items-center pi-justify-center pi-flex-none'\n >\n <FontAwesomeIcon icon={faDownLeftAndUpRightToCenter} className='pi-w-6 pi-h-6' />\n </Button>\n\n <div className='pi-flex pi-items-center pi-justify-center pi-flex-grow'>\n {recording && (\n <Button\n onClick={handleStop}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-stop-recorder-view'\n data-tooltip-content={t('Tooltip.Stop') || ''}\n >\n {waiting ? (\n <FontAwesomeIcon icon={faCircleNotch} className='fa-spin pi-loader' size='lg' />\n ) : (\n <FontAwesomeIcon icon={faStop} size='xl' />\n )}\n </Button>\n )}\n {recorded && !recording && (\n <Button\n onClick={handleSaveRecording}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-confirm-record-view'\n data-tooltip-content={t('Tooltip.Confirm') || ''}\n >\n <FontAwesomeIcon icon={faFloppyDisk} className='pi-h-6 pi-w-6' />\n </Button>\n )}\n {!recording && !recorded && (\n <Button\n onClick={handleStart}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-start-recording-recorder-view'\n data-tooltip-content={t('Tooltip.Start recording') || ''}\n >\n {waiting ? (\n <FontAwesomeIcon icon={faCircleNotch} className='fa-spin pi-loader' size='lg' />\n ) : (\n <FontAwesomeIcon icon={faRecord} className='pi-h-6 pi-w-6' />\n )}\n </Button>\n )}\n </div>\n\n <div\n onClick={() => dispatch.island.setIslandView('settings')}\n data-tooltip-id='tooltip-settings-view-recorder'\n data-tooltip-content={t('Tooltip.Go to settings') || ''}\n className='pi-flex pi-items-center pi-justify-center pi-cursor-pointer pi-text-gray-700 dark:pi-text-gray-200 pi-w-6 pi-h-6 pi-flex-none'\n >\n <FontAwesomeIcon icon={faGear} className={`pi-h-6 pi-w-6`} />\n </div>\n\n {/* Buttons tooltips */}\n <CustomThemedTooltip id='tooltip-start-recording-recorder-view' place='top' />\n <CustomThemedTooltip id='tooltip-stop-recorder-view' place='top' />\n <CustomThemedTooltip id='tooltip-confirm-record-view' place='top' />\n <CustomThemedTooltip id='tooltip-settings-view-recorder' place='top' />\n </div>\n )\n}\n"],"names":["dispatch","useDispatch","_a","useSelector","state","incoming","recorder","waiting","recording","recorded","playing","shallowEqual","handleStart","setRecording","setWaiting","startAnnouncementRecording","data","sent","tempFilename","setTempFilename","setStartTime","concat","Date","now","eventDispatch","handleStop","hangupCurrentCall","setRecorded","handleSaveRecording","player","pauseAudioPlayer","setPlaying","setPaused","dispatchRecordingSave","island","setIslandView","useEventListener","useEffect","answerIncomingCall","setIncoming","t","useTranslation","React","createElement","className","Button","variant","disabled","FontAwesomeIcon","icon","faDownLeftAndUpRightToCenter","onClick","faCircleNotch","size","faStop","faFloppyDisk","faRecord","faGear","CustomThemedTooltip","id","place"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../src/components/RecorderView/Actions.tsx"],"sourcesContent":["//\n// Copyright (C) 2024 Nethesis S.r.l.\n// SPDX-License-Identifier: AGPL-3.0-or-later\n//\n\nimport React, { type FC, useEffect } from 'react'\nimport { Button } from '../Button'\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\nimport {\n faStop,\n faCircleNotch,\n faGear,\n faDownLeftAndUpRightToCenter,\n faFloppyDisk,\n} from '@fortawesome/free-solid-svg-icons'\nimport { startAnnouncementRecording } from '../../services/offhour'\nimport { useDispatch, useSelector, shallowEqual } from 'react-redux'\nimport { Dispatch, RootState } from '../../store'\nimport { hangupCurrentCall, answerIncomingCall } from '../../lib/phone/call'\nimport { dispatchRecordingSave } from '../../events'\nimport { useTranslation } from 'react-i18next'\nimport { useEventListener, eventDispatch } from '../../utils'\nimport { CustomThemedTooltip } from '../CustomThemedTooltip'\nimport { faRecord } from '@nethesis/nethesis-solid-svg-icons'\n\nexport const Actions: FC<{}> = () => {\n const dispatch = useDispatch<Dispatch>()\n const { incoming, waiting, recording, recorded, playing } = useSelector(\n (state: RootState) => ({\n incoming: state.recorder.incoming,\n waiting: state.recorder.waiting,\n recording: state.recorder.recording,\n recorded: state.recorder.recorded,\n playing: state.recorder.playing,\n }),\n shallowEqual,\n )\n\n async function handleStart() {\n // Update the recorder state\n dispatch.recorder.setRecording(true)\n dispatch.recorder.setWaiting(true)\n // Call the api to start the recording call\n const data: { tempFilename: string } | null = await startAnnouncementRecording()\n // Set the returned temp file name to the store\n if (data.tempFilename) dispatch.recorder.setTempFilename(data.tempFilename)\n // Set the start time of recording\n dispatch.recorder.setStartTime(`${Date.now() / 1000}`)\n eventDispatch('phone-island-recording-started', {})\n }\n useEventListener('phone-island-recording-start', (data: {}) => {\n handleStart()\n })\n\n function handleStop() {\n // Set waiting to true\n dispatch.recorder.setWaiting(true)\n // Call the function to hangup the current call used for recording\n hangupCurrentCall()\n dispatch.recorder.setRecorded(true)\n eventDispatch('phone-island-recording-stopped', {})\n }\n useEventListener('phone-island-recording-stop', (data: {}) => {\n handleStop()\n })\n\n function handleSaveRecording() {\n // check if the audio is playing and pause it\n if (playing) {\n dispatch.player.pauseAudioPlayer()\n dispatch.recorder.setPlaying(false)\n dispatch.recorder.setPaused(true)\n }\n // Dispatch the reconrding save event\n dispatchRecordingSave()\n // Close the Island\n dispatch.island.setIslandView(null)\n }\n useEventListener('phone-island-recording-save', (data: {}) => {\n handleSaveRecording()\n })\n\n useEffect(() => {\n if (!recording) {\n dispatch.recorder.setWaiting(false)\n }\n }, [recording])\n\n useEffect(() => {\n if (incoming) {\n // Answer the incoming call for recording\n answerIncomingCall()\n // Reset incoming to recorder state\n dispatch.recorder.setIncoming(false)\n dispatch.recorder.setWaiting(false)\n }\n }, [incoming])\n\n const { t } = useTranslation()\n\n return (\n <div\n className={`pi-flex pi-items-center pi-justify-between pi-px-6 pi-py-2 pi-gap-0 pi-w-full pi-mt-auto`}\n >\n <Button\n variant='transparent'\n disabled\n className='pi-w-6 pi-h-6 pi-flex pi-items-center pi-justify-center pi-flex-none'\n >\n <FontAwesomeIcon icon={faDownLeftAndUpRightToCenter} className='pi-w-6 pi-h-6' />\n </Button>\n\n <div className='pi-flex pi-items-center pi-justify-center pi-flex-grow'>\n {recording && (\n <Button\n onClick={handleStop}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-stop-recorder-view'\n data-tooltip-content={t('Tooltip.Stop') || ''}\n >\n {waiting ? (\n <FontAwesomeIcon icon={faCircleNotch} className='fa-spin pi-loader' size='lg' />\n ) : (\n <FontAwesomeIcon icon={faStop} size='xl' />\n )}\n </Button>\n )}\n {recorded && !recording && (\n <Button\n onClick={handleSaveRecording}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-confirm-record-view'\n data-tooltip-content={t('Tooltip.Confirm') || ''}\n >\n <FontAwesomeIcon icon={faFloppyDisk} className='pi-h-6 pi-w-6' />\n </Button>\n )}\n {!recording && !recorded && (\n <Button\n onClick={handleStart}\n variant='default'\n className='pi-rounded-full pi-w-14 pi-h-14 pi-flex pi-items-center pi-justify-center'\n data-tooltip-id='tooltip-start-recording-recorder-view'\n data-tooltip-content={t('Tooltip.Start recording') || ''}\n >\n {waiting ? (\n <FontAwesomeIcon icon={faCircleNotch} className='fa-spin pi-loader' size='lg' />\n ) : (\n <FontAwesomeIcon icon={faRecord} className='pi-h-6 pi-w-6' />\n )}\n </Button>\n )}\n </div>\n\n <div\n onClick={() => dispatch.island.setIslandView('settings')}\n data-tooltip-id='tooltip-settings-view-recorder'\n data-tooltip-content={t('Tooltip.Go to settings') || ''}\n className='pi-flex pi-items-center pi-justify-center pi-cursor-pointer pi-text-gray-700 dark:pi-text-gray-200 pi-w-6 pi-h-6 pi-flex-none'\n >\n <FontAwesomeIcon icon={faGear} className={`pi-h-6 pi-w-6`} />\n </div>\n\n {/* Buttons tooltips */}\n <CustomThemedTooltip id='tooltip-start-recording-recorder-view' place='top' />\n <CustomThemedTooltip id='tooltip-stop-recorder-view' place='top' />\n <CustomThemedTooltip id='tooltip-confirm-record-view' place='top' />\n <CustomThemedTooltip id='tooltip-settings-view-recorder' place='top' />\n </div>\n )\n}\n"],"names":["dispatch","useDispatch","_a","useSelector","state","incoming","recorder","waiting","recording","recorded","playing","shallowEqual","handleStart","setRecording","setWaiting","startAnnouncementRecording","data","sent","tempFilename","setTempFilename","setStartTime","concat","Date","now","eventDispatch","handleStop","hangupCurrentCall","setRecorded","handleSaveRecording","player","pauseAudioPlayer","setPlaying","setPaused","dispatchRecordingSave","island","setIslandView","useEventListener","useEffect","answerIncomingCall","setIncoming","t","useTranslation","React","createElement","className","Button","variant","disabled","FontAwesomeIcon","icon","faDownLeftAndUpRightToCenter","onClick","faCircleNotch","size","faStop","faFloppyDisk","faRecord","faGear","CustomThemedTooltip","id","place"],"mappings":"utDAyB+B,WAC7B,IAAMA,EAAWC,EAAAA,cACXC,EAAsDC,EAAAA,YAC1D,SAACC,GAAqB,MAAC,CACrBC,SAAUD,EAAME,SAASD,SACzBE,QAASH,EAAME,SAASC,QACxBC,UAAWJ,EAAME,SAASE,UAC1BC,SAAUL,EAAME,SAASG,SACzBC,QAASN,EAAME,SAASI,QACxB,EACFC,EAAAA,SARMN,aAAUE,YAASC,cAAWC,aAAUC,YAWhD,SAAeE,wHAKiC,OAH9CZ,EAASM,SAASO,cAAa,GAC/Bb,EAASM,SAASQ,YAAW,GAEiB,CAAA,EAAMC,8CAA9CC,EAAwCd,EAAkCe,QAEvEC,cAAclB,EAASM,SAASa,gBAAgBH,EAAKE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K,EAAAA,gBAAgB,CAAAC,KAAMK,EAAAA,OAAQD,KAAK,QAIzC5C,IAAaD,GACZkC,UAACC,cAAAE,EAAAA,OACC,CAAAM,QAASvB,EACTkB,QAAQ,UACRF,UAAU,4EACM,kBAAA,8BACM,uBAAAJ,EAAE,oBAAsB,IAE9CE,UAACC,cAAAK,EAAAA,gBAAgB,CAAAC,KAAMM,EAAAA,aAAcX,UAAU,oBAGjDpC,IAAcC,GACdiC,EAAA,QAAAC,cAACE,SAAM,CACLM,QAASvC,EACTkC,QAAQ,UACRF,UAAU,4EACM,kBAAA,+DACMJ,EAAE,4BAA8B,IAErDjC,EACCmC,EAAAA,QAAAC,cAACK,EAAeA,gBAAA,CAACC,KAAMG,EAAaA,cAAER,UAAU,oBAAoBS,KAAK,OAEzEX,EAAAA,QAAAC,cAACK,kBAAe,CAACC,KAAMO,EAAAA,SAAUZ,UAAU,oBAMnDF,UACEC,cAAA,MAAA,CAAAQ,QAAS,WAAM,OAAAnD,EAASkC,OAAOC,cAAc,aAC7B,kBAAA,iCACM,uBAAAK,EAAE,2BAA6B,GACrDI,UAAU,iIAEVF,UAACC,cAAAK,EAAAA,gBAAgB,CAAAC,KAAMQ,EAAAA,OAAQb,UAAW,mBAI5CF,EAAC,QAAAC,cAAAe,uBAAoBC,GAAG,wCAAwCC,MAAM,QACtElB,EAAC,QAAAC,cAAAe,uBAAoBC,GAAG,6BAA6BC,MAAM,QAC3DlB,EAAC,QAAAC,cAAAe,uBAAoBC,GAAG,8BAA8BC,MAAM,QAC5DlB,UAAAC,cAACe,EAAAA,oBAAmB,CAACC,GAAG,iCAAiCC,MAAM,QAGrE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react");require("../../node_modules/react-redux/es/index.js");var r=require("./Actions.js"),i=require("./BarsGroup.js"),a=require("../AudioPlayerView/Progress.js"),n=require("../../lib/phone/audio.js"),s=require("../../node_modules/webm-duration-fix/lib/index.js"),l=require("./Timer.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var o=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var u=require("../Button.js"),d=require("../../node_modules/@fortawesome/react-fontawesome/index.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../node_modules/tslib/tslib.es6.js"),t=require("react");require("../../node_modules/react-redux/es/index.js");var r=require("./Actions.js"),i=require("./BarsGroup.js"),a=require("../AudioPlayerView/Progress.js"),n=require("../../lib/phone/audio.js"),s=require("../../node_modules/webm-duration-fix/lib/index.js"),l=require("./Timer.js");require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var o=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var u=require("../Button.js"),d=require("../../node_modules/@fortawesome/react-fontawesome/dist/index.js"),c=require("../../node_modules/@fortawesome/free-solid-svg-icons/index.mjs.js"),f=require("../../node_modules/react-redux/es/hooks/useSelector.js"),m=require("../../node_modules/react-redux/es/hooks/useDispatch.js"),p=require("../../node_modules/react-redux/es/utils/shallowEqual.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var v=x(t),w="audio/webm";exports.RecorderView=function(){var x=f.useSelector(function(e){return e.island}).isOpen,b=f.useSelector(function(e){return e.player}).audioPlayerPlaying,h=t.useRef(null),g=t.useRef(null),j=t.useRef([]),y=m.useDispatch(),E=f.useSelector(function(e){return e.webrtc.localAudioStream}),q=f.useSelector(function(e){return{recording:e.recorder.recording,recorded:e.recorder.recorded,waiting:e.recorder.waiting}},p.default),_=q.recording,N=q.recorded,A=q.waiting;function P(e){j.current.push(e.data)}function k(){return e.__awaiter(this,void 0,void 0,function(){var t,r;return e.__generator(this,function(e){switch(e.label){case 0:return[4,s.default(new Blob(j.current,{type:w}))];case 1:return t=e.sent(),r=URL.createObjectURL(t),n.updateAudioPlayerSource(r),[2]}})})}t.useEffect(function(){(null==E?void 0:E.active)&&_&&(g.current=new MediaRecorder(E,{mimeType:w}),g.current.ondataavailable=P,g.current.onstop=k,g.current.start())},[null==E?void 0:E.active,_]),t.useEffect(function(){var e;N&&(j.current=[],null===(e=g.current)||void 0===e||e.stop())},[N]),t.useEffect(function(){return y.recorder.setVisibleContainerRef(h),function(){y.recorder.reset()}},[]);var S=o.useTranslation().t;return v.default.createElement(v.default.Fragment,null,x?v.default.createElement(v.default.Fragment,null," ",v.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-between pi-text-gray-900 dark:pi-text-gray-50"},v.default.createElement("h1",{className:"pi-text-lg pi-font-medium pi-leading-7"},S("Common.Record message")),v.default.createElement(u.Button,{onClick:function(){return b&&y.player.stopAudioPlayer(),void y.island.resetPlayerClose()},variant:"transparentSettings","data-tooltip-id":"tooltip-close-settings","data-tooltip-content":S("Common.Close")||""},v.default.createElement(d.FontAwesomeIcon,{icon:c.faXmark,className:"pi-w-5 pi-h-5"}))),v.default.createElement("div",{className:"pi-pt-4"},v.default.createElement("div",{className:"".concat(!_||A||b?"pi-mb-3":""," pi-flex pi-w-full pi-justify-center pi-items-center")},v.default.createElement("div",{className:"pi-font-medium pi-text-4xl pi-w-fit pi-h-fit dark:pi-text-white"},v.default.createElement(l.default,null))),v.default.createElement("div",{className:"pi-relative pi-w-full pi-justify-center pi-overflow-hidden pi-flex pi-items-center",ref:h},N?v.default.createElement(a.Progress,null):_&&!A?v.default.createElement("div",{className:"pi-flex pi-items-center pi-justify-between pi-w-full pi-pb-3 pi-overflow-hidden"},v.default.createElement(u.Button,{variant:"transparent",disabled:!0,className:"pi-flex pi-flex-none"},v.default.createElement(d.FontAwesomeIcon,{icon:c.faPlay,className:"pi-h-4 pi-w-4 pi-text-gray-700 dark:pi-text-gray-200"})),v.default.createElement("div",{className:"pi-relative pi-overflow-hidden pi-flex pi-flex-grow pi-justify-center pi-h-4"},Array.from({length:2}).map(function(e,t){return v.default.createElement(i.BarsGroup,{key:t,index:t,startAnimation:_,audioStream:E})})),v.default.createElement(u.Button,{variant:"transparent",disabled:!0,className:"pi-flex pi-flex-none"},v.default.createElement(d.FontAwesomeIcon,{icon:c.faTrash,className:"pi-h-4 pi-w-4 pi-text-gray-700 dark:pi-text-gray-200"}))):_&&A?v.default.createElement("div",{className:"pi-sans pi-text-sm pi-w-fit pi-h-fit dark:pi-text-white pi-pb-7"},S("Common.Start recording message after")):v.default.createElement("div",{className:"pi-sans pi-text-sm pi-w-fit pi-h-fit dark:pi-text-white pi-pb-7"},S("Common.Start recording message before")))),v.default.createElement(r.Actions,null)):v.default.createElement("div",{className:"pi-font-medium pi-text-base"},"Recorder"))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|